create-payload-app 3.0.0-canary.d6053cd → 3.0.0-canary.dc8b1fe

Sign up to get free protection for your applications and to get access to all the features.
Files changed (71) hide show
  1. package/dist/lib/constants.d.ts +2 -0
  2. package/dist/lib/constants.d.ts.map +1 -0
  3. package/dist/lib/constants.js +9 -0
  4. package/dist/lib/constants.js.map +1 -0
  5. package/dist/lib/create-project.d.ts.map +1 -1
  6. package/dist/lib/create-project.js +9 -4
  7. package/dist/lib/create-project.js.map +1 -1
  8. package/dist/lib/create-project.spec.js +5 -7
  9. package/dist/lib/create-project.spec.js.map +1 -1
  10. package/dist/lib/download-template.d.ts +10 -0
  11. package/dist/lib/download-template.d.ts.map +1 -0
  12. package/dist/lib/download-template.js +21 -0
  13. package/dist/lib/download-template.js.map +1 -0
  14. package/dist/lib/get-package-manager.js +26 -5
  15. package/dist/lib/get-package-manager.js.map +1 -1
  16. package/dist/lib/init-next.d.ts.map +1 -1
  17. package/dist/lib/init-next.js +54 -12
  18. package/dist/lib/init-next.js.map +1 -1
  19. package/dist/lib/parse-project-name.d.ts.map +1 -1
  20. package/dist/lib/parse-project-name.js +9 -3
  21. package/dist/lib/parse-project-name.js.map +1 -1
  22. package/dist/lib/parse-template.d.ts.map +1 -1
  23. package/dist/lib/parse-template.js +3 -1
  24. package/dist/lib/parse-template.js.map +1 -1
  25. package/dist/lib/replacements.d.ts.map +1 -1
  26. package/dist/lib/replacements.js +27 -3
  27. package/dist/lib/replacements.js.map +1 -1
  28. package/dist/lib/select-db.d.ts.map +1 -1
  29. package/dist/lib/select-db.js +23 -14
  30. package/dist/lib/select-db.js.map +1 -1
  31. package/dist/lib/templates.d.ts.map +1 -1
  32. package/dist/lib/templates.js +3 -2
  33. package/dist/lib/templates.js.map +1 -1
  34. package/dist/lib/update-payload-in-project.d.ts.map +1 -1
  35. package/dist/lib/update-payload-in-project.js +7 -5
  36. package/dist/lib/update-payload-in-project.js.map +1 -1
  37. package/dist/lib/wrap-next-config.d.ts +5 -5
  38. package/dist/lib/wrap-next-config.d.ts.map +1 -1
  39. package/dist/lib/wrap-next-config.js +119 -59
  40. package/dist/lib/wrap-next-config.js.map +1 -1
  41. package/dist/lib/wrap-next-config.spec.js +72 -22
  42. package/dist/lib/wrap-next-config.spec.js.map +1 -1
  43. package/dist/lib/write-env-file.d.ts +2 -1
  44. package/dist/lib/write-env-file.d.ts.map +1 -1
  45. package/dist/lib/write-env-file.js +9 -4
  46. package/dist/lib/write-env-file.js.map +1 -1
  47. package/dist/main.d.ts.map +1 -1
  48. package/dist/main.js +16 -3
  49. package/dist/main.js.map +1 -1
  50. package/dist/scripts/pack-template-files.js +3 -3
  51. package/dist/scripts/pack-template-files.js.map +1 -1
  52. package/dist/template/src/app/(payload)/admin/[[...segments]]/not-found.tsx +8 -6
  53. package/dist/template/src/app/(payload)/admin/[[...segments]]/page.tsx +8 -6
  54. package/dist/template/src/app/(payload)/admin/importMap.js +1 -0
  55. package/dist/template/src/app/(payload)/api/[...slug]/route.ts +11 -2
  56. package/dist/template/src/app/(payload)/api/graphql/route.ts +4 -2
  57. package/dist/template/src/app/(payload)/api/graphql-playground/route.ts +2 -1
  58. package/dist/template/src/app/(payload)/layout.tsx +19 -4
  59. package/dist/template/src/payload-types.ts +127 -0
  60. package/dist/template/src/payload.config.ts +3 -0
  61. package/dist/types.d.ts +5 -2
  62. package/dist/types.d.ts.map +1 -1
  63. package/dist/types.js.map +1 -1
  64. package/dist/utils/copy-recursive-sync.d.ts +1 -1
  65. package/dist/utils/copy-recursive-sync.d.ts.map +1 -1
  66. package/dist/utils/copy-recursive-sync.js +1 -1
  67. package/dist/utils/copy-recursive-sync.js.map +1 -1
  68. package/dist/utils/messages.d.ts.map +1 -1
  69. package/dist/utils/messages.js +1 -0
  70. package/dist/utils/messages.js.map +1 -1
  71. package/package.json +10 -5
@@ -1,10 +1,19 @@
1
1
  /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */
2
- /* DO NOT MODIFY it because it could be re-written at any time. */
2
+ /* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */
3
3
  import config from '@payload-config'
4
- import { REST_DELETE, REST_GET, REST_OPTIONS, REST_PATCH, REST_POST } from '@payloadcms/next/routes'
4
+ import '@payloadcms/next/css'
5
+ import {
6
+ REST_DELETE,
7
+ REST_GET,
8
+ REST_OPTIONS,
9
+ REST_PATCH,
10
+ REST_POST,
11
+ REST_PUT,
12
+ } from '@payloadcms/next/routes'
5
13
 
6
14
  export const GET = REST_GET(config)
7
15
  export const POST = REST_POST(config)
8
16
  export const DELETE = REST_DELETE(config)
9
17
  export const PATCH = REST_PATCH(config)
18
+ export const PUT = REST_PUT(config)
10
19
  export const OPTIONS = REST_OPTIONS(config)
@@ -1,6 +1,8 @@
1
1
  /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */
2
- /* DO NOT MODIFY it because it could be re-written at any time. */
2
+ /* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */
3
3
  import config from '@payload-config'
4
- import { GRAPHQL_POST } from '@payloadcms/next/routes'
4
+ import { GRAPHQL_POST, REST_OPTIONS } from '@payloadcms/next/routes'
5
5
 
6
6
  export const POST = GRAPHQL_POST(config)
7
+
8
+ export const OPTIONS = REST_OPTIONS(config)
@@ -1,6 +1,7 @@
1
1
  /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */
2
- /* DO NOT MODIFY it because it could be re-written at any time. */
2
+ /* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */
3
3
  import config from '@payload-config'
4
+ import '@payloadcms/next/css'
4
5
  import { GRAPHQL_PLAYGROUND_GET } from '@payloadcms/next/routes'
5
6
 
6
7
  export const GET = GRAPHQL_PLAYGROUND_GET(config)
@@ -1,16 +1,31 @@
1
1
  /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */
2
- import configPromise from '@payload-config'
3
- import '@payloadcms/next/css'
4
- import { RootLayout } from '@payloadcms/next/layouts'
5
2
  /* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */
3
+ import config from '@payload-config'
4
+ import '@payloadcms/next/css'
5
+ import type { ServerFunctionClient } from 'payload'
6
+ import { handleServerFunctions, RootLayout } from '@payloadcms/next/layouts'
6
7
  import React from 'react'
7
8
 
9
+ import { importMap } from './admin/importMap.js'
8
10
  import './custom.scss'
9
11
 
10
12
  type Args = {
11
13
  children: React.ReactNode
12
14
  }
13
15
 
14
- const Layout = ({ children }: Args) => <RootLayout config={configPromise}>{children}</RootLayout>
16
+ const serverFunction: ServerFunctionClient = async function (args) {
17
+ 'use server'
18
+ return handleServerFunctions({
19
+ ...args,
20
+ config,
21
+ importMap,
22
+ })
23
+ }
24
+
25
+ const Layout = ({ children }: Args) => (
26
+ <RootLayout config={config} importMap={importMap} serverFunction={serverFunction}>
27
+ {children}
28
+ </RootLayout>
29
+ )
15
30
 
16
31
  export default Layout
@@ -0,0 +1,127 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * This file was automatically generated by Payload.
5
+ * DO NOT MODIFY IT BY HAND. Instead, modify your source Payload config,
6
+ * and re-run `payload generate:types` to regenerate this file.
7
+ */
8
+
9
+ export interface Config {
10
+ auth: {
11
+ users: UserAuthOperations;
12
+ };
13
+ collections: {
14
+ users: User;
15
+ media: Media;
16
+ 'payload-preferences': PayloadPreference;
17
+ 'payload-migrations': PayloadMigration;
18
+ };
19
+ db: {
20
+ defaultIDType: string;
21
+ };
22
+ globals: {};
23
+ locale: null;
24
+ user: User & {
25
+ collection: 'users';
26
+ };
27
+ }
28
+ export interface UserAuthOperations {
29
+ forgotPassword: {
30
+ email: string;
31
+ password: string;
32
+ };
33
+ login: {
34
+ email: string;
35
+ password: string;
36
+ };
37
+ registerFirstUser: {
38
+ email: string;
39
+ password: string;
40
+ };
41
+ unlock: {
42
+ email: string;
43
+ password: string;
44
+ };
45
+ }
46
+ /**
47
+ * This interface was referenced by `Config`'s JSON-Schema
48
+ * via the `definition` "users".
49
+ */
50
+ export interface User {
51
+ id: string;
52
+ updatedAt: string;
53
+ createdAt: string;
54
+ email: string;
55
+ resetPasswordToken?: string | null;
56
+ resetPasswordExpiration?: string | null;
57
+ salt?: string | null;
58
+ hash?: string | null;
59
+ loginAttempts?: number | null;
60
+ lockUntil?: string | null;
61
+ password?: string | null;
62
+ }
63
+ /**
64
+ * This interface was referenced by `Config`'s JSON-Schema
65
+ * via the `definition` "media".
66
+ */
67
+ export interface Media {
68
+ id: string;
69
+ alt: string;
70
+ updatedAt: string;
71
+ createdAt: string;
72
+ url?: string | null;
73
+ thumbnailURL?: string | null;
74
+ filename?: string | null;
75
+ mimeType?: string | null;
76
+ filesize?: number | null;
77
+ width?: number | null;
78
+ height?: number | null;
79
+ focalX?: number | null;
80
+ focalY?: number | null;
81
+ }
82
+ /**
83
+ * This interface was referenced by `Config`'s JSON-Schema
84
+ * via the `definition` "payload-preferences".
85
+ */
86
+ export interface PayloadPreference {
87
+ id: string;
88
+ user: {
89
+ relationTo: 'users';
90
+ value: string | User;
91
+ };
92
+ key?: string | null;
93
+ value?:
94
+ | {
95
+ [k: string]: unknown;
96
+ }
97
+ | unknown[]
98
+ | string
99
+ | number
100
+ | boolean
101
+ | null;
102
+ updatedAt: string;
103
+ createdAt: string;
104
+ }
105
+ /**
106
+ * This interface was referenced by `Config`'s JSON-Schema
107
+ * via the `definition` "payload-migrations".
108
+ */
109
+ export interface PayloadMigration {
110
+ id: string;
111
+ name?: string | null;
112
+ batch?: number | null;
113
+ updatedAt: string;
114
+ createdAt: string;
115
+ }
116
+ /**
117
+ * This interface was referenced by `Config`'s JSON-Schema
118
+ * via the `definition` "auth".
119
+ */
120
+ export interface Auth {
121
+ [k: string]: unknown;
122
+ }
123
+
124
+
125
+ declare module 'payload' {
126
+ export interface GeneratedTypes extends Config {}
127
+ }
@@ -15,6 +15,9 @@ const dirname = path.dirname(filename)
15
15
  export default buildConfig({
16
16
  admin: {
17
17
  user: Users.slug,
18
+ importMap: {
19
+ baseDir: path.resolve(dirname),
20
+ },
18
21
  },
19
22
  collections: [Users, Media],
20
23
  editor: lexicalEditor(),
package/dist/types.d.ts CHANGED
@@ -15,6 +15,7 @@ export interface Args extends arg.Spec {
15
15
  '--secret': StringConstructor;
16
16
  '--template': StringConstructor;
17
17
  '--template-branch': StringConstructor;
18
+ '--use-bun': BooleanConstructor;
18
19
  '--use-npm': BooleanConstructor;
19
20
  '--use-pnpm': BooleanConstructor;
20
21
  '--use-yarn': BooleanConstructor;
@@ -46,7 +47,7 @@ interface Template {
46
47
  type: ProjectTemplate['type'];
47
48
  }
48
49
  export type PackageManager = 'bun' | 'npm' | 'pnpm' | 'yarn';
49
- export type DbType = 'mongodb' | 'postgres';
50
+ export type DbType = 'mongodb' | 'postgres' | 'sqlite' | 'vercel-postgres';
50
51
  export type DbDetails = {
51
52
  dbUri: string;
52
53
  type: DbType;
@@ -56,11 +57,13 @@ export type NextAppDetails = {
56
57
  hasTopLevelLayout: boolean;
57
58
  isPayloadInstalled?: boolean;
58
59
  isSrcDir: boolean;
60
+ isSupportedNextVersion: boolean;
59
61
  nextAppDir?: string;
60
62
  nextConfigPath?: string;
61
63
  nextConfigType?: NextConfigType;
64
+ nextVersion: null | string;
62
65
  };
63
- export type NextConfigType = 'cjs' | 'esm';
66
+ export type NextConfigType = 'cjs' | 'esm' | 'ts';
64
67
  export type StorageAdapterType = 'localDisk' | 'payloadCloud' | 'vercelBlobStorage';
65
68
  export {};
66
69
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,KAAK,CAAA;AAE1B,MAAM,WAAW,IAAK,SAAQ,GAAG,CAAC,IAAI;IACpC,QAAQ,EAAE,kBAAkB,CAAA;IAC5B,MAAM,EAAE,iBAAiB,CAAA;IACzB,yBAAyB,EAAE,kBAAkB,CAAA;IAC7C,wBA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nB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,cAAc,CAAC,EAAE,cAAc,CAAA;IAC/B,WAAW,EAAE,IAAI,GAAG,MAAM,CAAA;CAC3B,CAAA;AAED,MAAM,MAAM,cAAc,GAAG,KAAK,GAAG,KAAK,GAAG,IAAI,CAAA;AAEjD,MAAM,MAAM,kBAAkB,GAAG,WAAW,GAAG,cAAc,GAAG,mBAAmB,CAAA"}
package/dist/types.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/types.ts"],"sourcesContent":["import type arg from 'arg'\n\nexport interface Args extends arg.Spec {\n '--beta': BooleanConstructor\n '--db': StringConstructor\n '--db-accept-recommended': BooleanConstructor\n '--db-connection-string': StringConstructor\n '--debug': BooleanConstructor\n '--dry-run': BooleanConstructor\n '--help': BooleanConstructor\n '--init-next': BooleanConstructor\n '--local-template': StringConstructor\n '--name': StringConstructor\n '--no-deps': BooleanConstructor\n '--no-git': BooleanConstructor\n '--secret': StringConstructor\n '--template': StringConstructor\n '--template-branch': StringConstructor\n '--use-npm': BooleanConstructor\n '--use-pnpm': BooleanConstructor\n '--use-yarn': BooleanConstructor\n\n // Aliases\n\n '-h': string\n '-n': string\n '-t': string\n}\n\nexport type CliArgs = arg.Result<Args>\n\nexport type ProjectTemplate = GitTemplate | PluginTemplate\n\n/**\n * Template that is cloned verbatim from a git repo\n * Performs .env manipulation based upon input\n */\nexport interface GitTemplate extends Template {\n type: 'starter'\n url: string\n}\n\n/**\n * Type specifically for the plugin template\n * No .env manipulation is done\n */\nexport interface PluginTemplate extends Template {\n type: 'plugin'\n url: string\n}\n\ninterface Template {\n description?: string\n name: string\n type: ProjectTemplate['type']\n}\n\nexport type PackageManager = 'bun' | 'npm' | 'pnpm' | 'yarn'\n\nexport type DbType = 'mongodb' | 'postgres'\n\nexport type DbDetails = {\n dbUri: string\n type: DbType\n}\n\nexport type EditorType = 'lexical' | 'slate'\n\nexport type NextAppDetails = {\n hasTopLevelLayout: boolean\n isPayloadInstalled?: boolean\n isSrcDir: boolean\n nextAppDir?: string\n nextConfigPath?: string\n nextConfigType?: NextConfigType\n}\n\nexport type NextConfigType = 'cjs' | 'esm'\n\nexport type StorageAdapterType = 'localDisk' | 'payloadCloud' | 'vercelBlobStorage'\n"],"names":[],"mappings":"AA+EA,WAAmF"}
1
+ {"version":3,"sources":["../src/types.ts"],"sourcesContent":["import type arg from 'arg'\n\nexport interface Args extends arg.Spec {\n '--beta': BooleanConstructor\n '--db': StringConstructor\n '--db-accept-recommended': BooleanConstructor\n '--db-connection-string': StringConstructor\n '--debug': BooleanConstructor\n '--dry-run': BooleanConstructor\n '--help': BooleanConstructor\n '--init-next': BooleanConstructor\n '--local-template': StringConstructor\n '--name': StringConstructor\n '--no-deps': BooleanConstructor\n '--no-git': BooleanConstructor\n '--secret': StringConstructor\n '--template': StringConstructor\n '--template-branch': StringConstructor\n '--use-bun': BooleanConstructor\n '--use-npm': BooleanConstructor\n '--use-pnpm': BooleanConstructor\n '--use-yarn': BooleanConstructor\n\n // Aliases\n\n '-h': string\n '-n': string\n '-t': string\n}\n\nexport type CliArgs = arg.Result<Args>\n\nexport type ProjectTemplate = GitTemplate | PluginTemplate\n\n/**\n * Template that is cloned verbatim from a git repo\n * Performs .env manipulation based upon input\n */\nexport interface GitTemplate extends Template {\n type: 'starter'\n url: string\n}\n\n/**\n * Type specifically for the plugin template\n * No .env manipulation is done\n */\nexport interface PluginTemplate extends Template {\n type: 'plugin'\n url: string\n}\n\ninterface Template {\n description?: string\n name: string\n type: ProjectTemplate['type']\n}\n\nexport type PackageManager = 'bun' | 'npm' | 'pnpm' | 'yarn'\n\nexport type DbType = 'mongodb' | 'postgres' | 'sqlite' | 'vercel-postgres'\n\nexport type DbDetails = {\n dbUri: string\n type: DbType\n}\n\nexport type EditorType = 'lexical' | 'slate'\n\nexport type NextAppDetails = {\n hasTopLevelLayout: boolean\n isPayloadInstalled?: boolean\n isSrcDir: boolean\n isSupportedNextVersion: boolean\n nextAppDir?: string\n nextConfigPath?: string\n nextConfigType?: NextConfigType\n nextVersion: null | string\n}\n\nexport type NextConfigType = 'cjs' | 'esm' | 'ts'\n\nexport type StorageAdapterType = 'localDisk' | 'payloadCloud' | 'vercelBlobStorage'\n"],"names":[],"mappings":"AAkFA,WAAmF"}
@@ -3,5 +3,5 @@
3
3
  *
4
4
  * @internal
5
5
  */
6
- export declare function copyRecursiveSync(src: string, dest: string, debug?: boolean): void;
6
+ export declare function copyRecursiveSync(src: string, dest: string): void;
7
7
  //# sourceMappingURL=copy-recursive-sync.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"copy-recursive-sync.d.ts","sourceRoot":"","sources":["../../src/utils/copy-recursive-sync.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO,QAY3E"}
1
+ {"version":3,"file":"copy-recursive-sync.d.ts","sourceRoot":"","sources":["../../src/utils/copy-recursive-sync.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,QAY1D"}
@@ -4,7 +4,7 @@ import path from 'path';
4
4
  * Recursively copy files from src to dest
5
5
  *
6
6
  * @internal
7
- */ export function copyRecursiveSync(src, dest, debug) {
7
+ */ export function copyRecursiveSync(src, dest) {
8
8
  const exists = fs.existsSync(src);
9
9
  const stats = exists && fs.statSync(src);
10
10
  const isDirectory = exists && stats !== false && stats.isDirectory();
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/utils/copy-recursive-sync.ts"],"sourcesContent":["import fs from 'fs'\nimport path from 'path'\n\n/**\n * Recursively copy files from src to dest\n *\n * @internal\n */\nexport function copyRecursiveSync(src: string, dest: string, debug?: boolean) {\n const exists = fs.existsSync(src)\n const stats = exists && fs.statSync(src)\n const isDirectory = exists && stats !== false && stats.isDirectory()\n if (isDirectory) {\n fs.mkdirSync(dest, { recursive: true })\n fs.readdirSync(src).forEach((childItemName) => {\n copyRecursiveSync(path.join(src, childItemName), path.join(dest, childItemName))\n })\n } else {\n fs.copyFileSync(src, dest)\n }\n}\n"],"names":["fs","path","copyRecursiveSync","src","dest","debug","exists","existsSync","stats","statSync","isDirectory","mkdirSync","recursive","readdirSync","forEach","childItemName","join","copyFileSync"],"mappings":"AAAA,OAAOA,QAAQ,KAAI;AACnB,OAAOC,UAAU,OAAM;AAEvB;;;;CAIC,GACD,OAAO,SAASC,kBAAkBC,GAAW,EAAEC,IAAY,EAAEC,KAAe;IAC1E,MAAMC,SAASN,GAAGO,UAAU,CAACJ;IAC7B,MAAMK,QAAQF,UAAUN,GAAGS,QAAQ,CAACN;IACpC,MAAMO,cAAcJ,UAAUE,UAAU,SAASA,MAAME,WAAW;IAClE,IAAIA,aAAa;QACfV,GAAGW,SAAS,CAACP,MAAM;YAAEQ,WAAW;QAAK;QACrCZ,GAAGa,WAAW,CAACV,KAAKW,OAAO,CAAC,CAACC;YAC3Bb,kBAAkBD,KAAKe,IAAI,CAACb,KAAKY,gBAAgBd,KAAKe,IAAI,CAACZ,MAAMW;QACnE;IACF,OAAO;QACLf,GAAGiB,YAAY,CAACd,KAAKC;IACvB;AACF"}
1
+ {"version":3,"sources":["../../src/utils/copy-recursive-sync.ts"],"sourcesContent":["import fs from 'fs'\nimport path from 'path'\n\n/**\n * Recursively copy files from src to dest\n *\n * @internal\n */\nexport function copyRecursiveSync(src: string, dest: string) {\n const exists = fs.existsSync(src)\n const stats = exists && fs.statSync(src)\n const isDirectory = exists && stats !== false && stats.isDirectory()\n if (isDirectory) {\n fs.mkdirSync(dest, { recursive: true })\n fs.readdirSync(src).forEach((childItemName) => {\n copyRecursiveSync(path.join(src, childItemName), path.join(dest, childItemName))\n })\n } else {\n fs.copyFileSync(src, dest)\n }\n}\n"],"names":["fs","path","copyRecursiveSync","src","dest","exists","existsSync","stats","statSync","isDirectory","mkdirSync","recursive","readdirSync","forEach","childItemName","join","copyFileSync"],"mappings":"AAAA,OAAOA,QAAQ,KAAI;AACnB,OAAOC,UAAU,OAAM;AAEvB;;;;CAIC,GACD,OAAO,SAASC,kBAAkBC,GAAW,EAAEC,IAAY;IACzD,MAAMC,SAASL,GAAGM,UAAU,CAACH;IAC7B,MAAMI,QAAQF,UAAUL,GAAGQ,QAAQ,CAACL;IACpC,MAAMM,cAAcJ,UAAUE,UAAU,SAASA,MAAME,WAAW;IAClE,IAAIA,aAAa;QACfT,GAAGU,SAAS,CAACN,MAAM;YAAEO,WAAW;QAAK;QACrCX,GAAGY,WAAW,CAACT,KAAKU,OAAO,CAAC,CAACC;YAC3BZ,kBAAkBD,KAAKc,IAAI,CAACZ,KAAKW,gBAAgBb,KAAKc,IAAI,CAACX,MAAMU;QACnE;IACF,OAAO;QACLd,GAAGgB,YAAY,CAACb,KAAKC;IACvB;AACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../src/utils/messages.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,cAAc,EAAmB,MAAM,aAAa,CAAA;AAMlE,eAAO,MAAM,cAAc,QAE1B,CAAA;AAID,wBAAgB,WAAW,IAAI,IAAI,CA4BlC;AAQD,wBAAgB,cAAc,CAAC,UAAU,EAAE,MAAM,EAAE,cAAc,EAAE,cAAc,GAAG,MAAM,CAsBzF;AAED,wBAAgB,kBAAkB,IAAI,MAAM,CAO3C;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CAgBpF;AAED,wBAAgB,aAAa,IAAI,MAAM,CAEtC"}
1
+ {"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../src/utils/messages.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,cAAc,EAAmB,MAAM,aAAa,CAAA;AAMlE,eAAO,MAAM,cAAc,QAE1B,CAAA;AAID,wBAAgB,WAAW,IAAI,IAAI,CA6BlC;AAQD,wBAAgB,cAAc,CAAC,UAAU,EAAE,MAAM,EAAE,cAAc,EAAE,cAAc,GAAG,MAAM,CAsBzF;AAED,wBAAgB,kBAAkB,IAAI,MAAM,CAO3C;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CAgBpF;AAED,wBAAgB,aAAa,IAAI,MAAM,CAEtC"}
@@ -32,6 +32,7 @@ export function helpMessage() {
32
32
  --use-npm Use npm to install dependencies
33
33
  --use-yarn Use yarn to install dependencies
34
34
  --use-pnpm Use pnpm to install dependencies
35
+ --use-bun Use bun to install dependencies (experimental)
35
36
  --no-deps Do not install any dependencies
36
37
  -h Show help
37
38
  `);
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/utils/messages.ts"],"sourcesContent":["/* eslint-disable no-console */\nimport chalk from 'chalk'\nimport path from 'path'\nimport terminalLink from 'terminal-link'\n\nimport type { PackageManager, ProjectTemplate } from '../types.js'\n\nimport { getValidTemplates } from '../lib/templates.js'\n\nconst header = (message: string): string => chalk.bold(message)\n\nexport const welcomeMessage = chalk`\n {green Welcome to Payload. Let's create a project! }\n`\n\nconst spacer = ' '.repeat(8)\n\nexport function helpMessage(): void {\n const validTemplates = getValidTemplates()\n console.log(chalk`\n {bold USAGE}\n\n {dim Inside of an existing Next.js project}\n\n {dim $} {bold npx create-payload-app}\n\n {dim Create a new project from scratch}\n\n {dim $} {bold npx create-payload-app}\n {dim $} {bold npx create-payload-app} my-project\n {dim $} {bold npx create-payload-app} -n my-project -t template-name\n\n {bold OPTIONS}\n\n -n {underline my-payload-app} Set project name\n -t {underline template_name} Choose specific template\n\n {dim Available templates: ${formatTemplates(validTemplates)}}\n\n --use-npm Use npm to install dependencies\n --use-yarn Use yarn to install dependencies\n --use-pnpm Use pnpm to install dependencies\n --no-deps Do not install any dependencies\n -h Show help\n`)\n}\n\nfunction formatTemplates(templates: ProjectTemplate[]) {\n return `\\n\\n${spacer}${templates\n .map((t) => `${t.name}${' '.repeat(28 - t.name.length)}${t.description}`)\n .join(`\\n${spacer}`)}`\n}\n\nexport function successMessage(projectDir: string, packageManager: PackageManager): string {\n const relativePath = path.relative(process.cwd(), projectDir)\n return `\n${header('Launch Application:')}\n\n - cd ./${relativePath}\n - ${\n packageManager === 'npm' ? 'npm run' : packageManager\n } dev or follow directions in ${createTerminalLink(\n 'README.md',\n `file://${path.resolve(projectDir, 'README.md')}`,\n )}\n\n${header('Documentation:')}\n\n - ${createTerminalLink(\n 'Getting Started',\n 'https://payloadcms.com/docs/getting-started/what-is-payload',\n )}\n - ${createTerminalLink('Configuration', 'https://payloadcms.com/docs/configuration/overview')}\n\n`\n}\n\nexport function successfulNextInit(): string {\n return `- ${createTerminalLink(\n 'Getting Started',\n 'https://payloadcms.com/docs/getting-started/what-is-payload',\n )}\n- ${createTerminalLink('Configuration', 'https://payloadcms.com/docs/configuration/overview')}\n`\n}\n\nexport function moveMessage(args: { nextAppDir: string; projectDir: string }): string {\n const relativeAppDir = path.relative(process.cwd(), args.nextAppDir)\n return `\n${header('Next Steps:')}\n\nPayload does not support a top-level layout.tsx file in the app directory.\n\n${chalk.bold('To continue:')}\n\n- Create a new directory in ./${relativeAppDir} such as ./${relativeAppDir}/${chalk.bold('(app)')}\n- Move all files from ./${relativeAppDir} into that directory\n\nIt is recommended to do this from your IDE if your app has existing file references.\n\nOnce moved, rerun the create-payload-app command again.\n`\n}\n\nexport function feedbackOutro(): string {\n return `${chalk.bgCyan(chalk.black(' Have feedback? '))} Visit us on ${createTerminalLink('GitHub', 'https://github.com/payloadcms/payload')}.`\n}\n\n// Create terminalLink with fallback for unsupported terminals\nfunction createTerminalLink(text: string, url: string) {\n return terminalLink(text, url, {\n fallback: (text, url) => `${text}: ${url}`,\n })\n}\n"],"names":["chalk","path","terminalLink","getValidTemplates","header","message","bold","welcomeMessage","spacer","repeat","helpMessage","validTemplates","console","log","formatTemplates","templates","map","t","name","length","description","join","successMessage","projectDir","packageManager","relativePath","relative","process","cwd","createTerminalLink","resolve","successfulNextInit","moveMessage","args","relativeAppDir","nextAppDir","feedbackOutro","bgCyan","black","text","url","fallback"],"mappings":"AAAA,6BAA6B,GAC7B,OAAOA,WAAW,QAAO;AACzB,OAAOC,UAAU,OAAM;AACvB,OAAOC,kBAAkB,gBAAe;AAIxC,SAASC,iBAAiB,QAAQ,sBAAqB;AAEvD,MAAMC,SAAS,CAACC,UAA4BL,MAAMM,IAAI,CAACD;AAEvD,OAAO,MAAME,iBAAiBP,KAAK,CAAC;;AAEpC,CAAC,CAAA;AAED,MAAMQ,SAAS,IAAIC,MAAM,CAAC;AAE1B,OAAO,SAASC;IACd,MAAMC,iBAAiBR;IACvBS,QAAQC,GAAG,CAACb,KAAK,CAAC;;;;;;;;;;;;;;;;;;kCAkBc,EAAEc,gBAAgBH,gBAAgB;;;;;;;AAOpE,CAAC;AACD;AAEA,SAASG,gBAAgBC,SAA4B;IACnD,OAAO,CAAC,IAAI,EAAEP,OAAO,EAAEO,UACpBC,GAAG,CAAC,CAACC,IAAM,CAAC,EAAEA,EAAEC,IAAI,CAAC,EAAE,IAAIT,MAAM,CAAC,KAAKQ,EAAEC,IAAI,CAACC,MAAM,EAAE,EAAEF,EAAEG,WAAW,CAAC,CAAC,EACvEC,IAAI,CAAC,CAAC,EAAE,EAAEb,OAAO,CAAC,EAAE,CAAC;AAC1B;AAEA,OAAO,SAASc,eAAeC,UAAkB,EAAEC,cAA8B;IAC/E,MAAMC,eAAexB,KAAKyB,QAAQ,CAACC,QAAQC,GAAG,IAAIL;IAClD,OAAO,CAAC;AACV,EAAEnB,OAAO,uBAAuB;;SAEvB,EAAEqB,aAAa;IACpB,EACAD,mBAAmB,QAAQ,YAAYA,eACxC,6BAA6B,EAAEK,mBAC9B,aACA,CAAC,OAAO,EAAE5B,KAAK6B,OAAO,CAACP,YAAY,aAAa,CAAC,EACjD;;AAEJ,EAAEnB,OAAO,kBAAkB;;IAEvB,EAAEyB,mBACF,mBACA,+DACA;IACA,EAAEA,mBAAmB,iBAAiB,sDAAsD;;AAEhG,CAAC;AACD;AAEA,OAAO,SAASE;IACd,OAAO,CAAC,EAAE,EAAEF,mBACV,mBACA,+DACA;EACF,EAAEA,mBAAmB,iBAAiB,sDAAsD;AAC9F,CAAC;AACD;AAEA,OAAO,SAASG,YAAYC,IAAgD;IAC1E,MAAMC,iBAAiBjC,KAAKyB,QAAQ,CAACC,QAAQC,GAAG,IAAIK,KAAKE,UAAU;IACnE,OAAO,CAAC;AACV,EAAE/B,OAAO,eAAe;;;;AAIxB,EAAEJ,MAAMM,IAAI,CAAC,gBAAgB;;8BAEC,EAAE4B,eAAe,WAAW,EAAEA,eAAe,CAAC,EAAElC,MAAMM,IAAI,CAAC,SAAS;wBAC1E,EAAE4B,eAAe;;;;;AAKzC,CAAC;AACD;AAEA,OAAO,SAASE;IACd,OAAO,CAAC,EAAEpC,MAAMqC,MAAM,CAACrC,MAAMsC,KAAK,CAAC,qBAAqB,aAAa,EAAET,mBAAmB,UAAU,yCAAyC,CAAC,CAAC;AACjJ;AAEA,8DAA8D;AAC9D,SAASA,mBAAmBU,IAAY,EAAEC,GAAW;IACnD,OAAOtC,aAAaqC,MAAMC,KAAK;QAC7BC,UAAU,CAACF,MAAMC,MAAQ,CAAC,EAAED,KAAK,EAAE,EAAEC,IAAI,CAAC;IAC5C;AACF"}
1
+ {"version":3,"sources":["../../src/utils/messages.ts"],"sourcesContent":["/* eslint-disable no-console */\nimport chalk from 'chalk'\nimport path from 'path'\nimport terminalLink from 'terminal-link'\n\nimport type { PackageManager, ProjectTemplate } from '../types.js'\n\nimport { getValidTemplates } from '../lib/templates.js'\n\nconst header = (message: string): string => chalk.bold(message)\n\nexport const welcomeMessage = chalk`\n {green Welcome to Payload. Let's create a project! }\n`\n\nconst spacer = ' '.repeat(8)\n\nexport function helpMessage(): void {\n const validTemplates = getValidTemplates()\n console.log(chalk`\n {bold USAGE}\n\n {dim Inside of an existing Next.js project}\n\n {dim $} {bold npx create-payload-app}\n\n {dim Create a new project from scratch}\n\n {dim $} {bold npx create-payload-app}\n {dim $} {bold npx create-payload-app} my-project\n {dim $} {bold npx create-payload-app} -n my-project -t template-name\n\n {bold OPTIONS}\n\n -n {underline my-payload-app} Set project name\n -t {underline template_name} Choose specific template\n\n {dim Available templates: ${formatTemplates(validTemplates)}}\n\n --use-npm Use npm to install dependencies\n --use-yarn Use yarn to install dependencies\n --use-pnpm Use pnpm to install dependencies\n --use-bun Use bun to install dependencies (experimental)\n --no-deps Do not install any dependencies\n -h Show help\n`)\n}\n\nfunction formatTemplates(templates: ProjectTemplate[]) {\n return `\\n\\n${spacer}${templates\n .map((t) => `${t.name}${' '.repeat(28 - t.name.length)}${t.description}`)\n .join(`\\n${spacer}`)}`\n}\n\nexport function successMessage(projectDir: string, packageManager: PackageManager): string {\n const relativePath = path.relative(process.cwd(), projectDir)\n return `\n${header('Launch Application:')}\n\n - cd ./${relativePath}\n - ${\n packageManager === 'npm' ? 'npm run' : packageManager\n } dev or follow directions in ${createTerminalLink(\n 'README.md',\n `file://${path.resolve(projectDir, 'README.md')}`,\n )}\n\n${header('Documentation:')}\n\n - ${createTerminalLink(\n 'Getting Started',\n 'https://payloadcms.com/docs/getting-started/what-is-payload',\n )}\n - ${createTerminalLink('Configuration', 'https://payloadcms.com/docs/configuration/overview')}\n\n`\n}\n\nexport function successfulNextInit(): string {\n return `- ${createTerminalLink(\n 'Getting Started',\n 'https://payloadcms.com/docs/getting-started/what-is-payload',\n )}\n- ${createTerminalLink('Configuration', 'https://payloadcms.com/docs/configuration/overview')}\n`\n}\n\nexport function moveMessage(args: { nextAppDir: string; projectDir: string }): string {\n const relativeAppDir = path.relative(process.cwd(), args.nextAppDir)\n return `\n${header('Next Steps:')}\n\nPayload does not support a top-level layout.tsx file in the app directory.\n\n${chalk.bold('To continue:')}\n\n- Create a new directory in ./${relativeAppDir} such as ./${relativeAppDir}/${chalk.bold('(app)')}\n- Move all files from ./${relativeAppDir} into that directory\n\nIt is recommended to do this from your IDE if your app has existing file references.\n\nOnce moved, rerun the create-payload-app command again.\n`\n}\n\nexport function feedbackOutro(): string {\n return `${chalk.bgCyan(chalk.black(' Have feedback? '))} Visit us on ${createTerminalLink('GitHub', 'https://github.com/payloadcms/payload')}.`\n}\n\n// Create terminalLink with fallback for unsupported terminals\nfunction createTerminalLink(text: string, url: string) {\n return terminalLink(text, url, {\n fallback: (text, url) => `${text}: ${url}`,\n })\n}\n"],"names":["chalk","path","terminalLink","getValidTemplates","header","message","bold","welcomeMessage","spacer","repeat","helpMessage","validTemplates","console","log","formatTemplates","templates","map","t","name","length","description","join","successMessage","projectDir","packageManager","relativePath","relative","process","cwd","createTerminalLink","resolve","successfulNextInit","moveMessage","args","relativeAppDir","nextAppDir","feedbackOutro","bgCyan","black","text","url","fallback"],"mappings":"AAAA,6BAA6B,GAC7B,OAAOA,WAAW,QAAO;AACzB,OAAOC,UAAU,OAAM;AACvB,OAAOC,kBAAkB,gBAAe;AAIxC,SAASC,iBAAiB,QAAQ,sBAAqB;AAEvD,MAAMC,SAAS,CAACC,UAA4BL,MAAMM,IAAI,CAACD;AAEvD,OAAO,MAAME,iBAAiBP,KAAK,CAAC;;AAEpC,CAAC,CAAA;AAED,MAAMQ,SAAS,IAAIC,MAAM,CAAC;AAE1B,OAAO,SAASC;IACd,MAAMC,iBAAiBR;IACvBS,QAAQC,GAAG,CAACb,KAAK,CAAC;;;;;;;;;;;;;;;;;;kCAkBc,EAAEc,gBAAgBH,gBAAgB;;;;;;;;AAQpE,CAAC;AACD;AAEA,SAASG,gBAAgBC,SAA4B;IACnD,OAAO,CAAC,IAAI,EAAEP,OAAO,EAAEO,UACpBC,GAAG,CAAC,CAACC,IAAM,CAAC,EAAEA,EAAEC,IAAI,CAAC,EAAE,IAAIT,MAAM,CAAC,KAAKQ,EAAEC,IAAI,CAACC,MA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C,KAAK;QAC7BC,UAAU,CAACF,MAAMC,MAAQ,CAAC,EAAED,KAAK,EAAE,EAAEC,IAAI,CAAC;IAC5C;AACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-payload-app",
3
- "version": "3.0.0-canary.d6053cd",
3
+ "version": "3.0.0-canary.dc8b1fe",
4
4
  "homepage": "https://payloadcms.com",
5
5
  "repository": {
6
6
  "type": "git",
@@ -41,29 +41,34 @@
41
41
  "dependencies": {
42
42
  "@clack/prompts": "^0.7.0",
43
43
  "@sindresorhus/slugify": "^1.1.0",
44
+ "@swc/core": "1.7.10",
44
45
  "arg": "^5.0.0",
45
46
  "chalk": "^4.1.0",
46
47
  "comment-json": "^4.2.3",
47
- "degit": "^2.8.4",
48
48
  "esprima-next": "^6.0.3",
49
49
  "execa": "^5.0.0",
50
50
  "figures": "^6.1.0",
51
51
  "fs-extra": "^9.0.1",
52
52
  "globby": "11.1.0",
53
+ "tar": "^7.4.3",
53
54
  "terminal-link": "^2.1.1"
54
55
  },
55
56
  "devDependencies": {
56
- "@types/degit": "^2.8.3",
57
57
  "@types/esprima": "^4.0.6",
58
58
  "@types/fs-extra": "^9.0.12",
59
59
  "@types/jest": "29.5.12",
60
- "@types/node": "20.12.5"
60
+ "@types/node": "22.5.4"
61
+ },
62
+ "engines": {
63
+ "node": "^18.20.2 || >=20.9.0"
61
64
  },
62
65
  "scripts": {
63
66
  "build": "pnpm pack-template-files && pnpm typecheck && pnpm build:swc",
64
67
  "build:swc": "swc ./src -d ./dist --config-file .swcrc --strip-leading-paths",
65
68
  "clean": "rimraf {dist,*.tsbuildinfo}",
66
- "pack-template-files": "tsx src/scripts/pack-template-files.ts",
69
+ "lint": "eslint .",
70
+ "lint:fix": "eslint . --fix",
71
+ "pack-template-files": "node --no-deprecation --import @swc-node/register/esm-register src/scripts/pack-template-files.ts",
67
72
  "test": "jest",
68
73
  "typecheck": "tsc"
69
74
  }