create-payload-app 3.0.0-canary.a192632 → 3.0.0-canary.a6e7305
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/lib/constants.d.ts +2 -0
- package/dist/lib/constants.d.ts.map +1 -0
- package/dist/lib/constants.js +9 -0
- package/dist/lib/constants.js.map +1 -0
- package/dist/lib/create-project.d.ts.map +1 -1
- package/dist/lib/create-project.js +9 -4
- package/dist/lib/create-project.js.map +1 -1
- package/dist/lib/create-project.spec.js +5 -7
- package/dist/lib/create-project.spec.js.map +1 -1
- package/dist/lib/download-template.d.ts +10 -0
- package/dist/lib/download-template.d.ts.map +1 -0
- package/dist/lib/download-template.js +21 -0
- package/dist/lib/download-template.js.map +1 -0
- package/dist/lib/get-package-manager.d.ts.map +1 -1
- package/dist/lib/get-package-manager.js +22 -10
- package/dist/lib/get-package-manager.js.map +1 -1
- package/dist/lib/init-next.d.ts.map +1 -1
- package/dist/lib/init-next.js +7 -5
- package/dist/lib/init-next.js.map +1 -1
- package/dist/lib/parse-project-name.d.ts.map +1 -1
- package/dist/lib/parse-project-name.js +9 -3
- package/dist/lib/parse-project-name.js.map +1 -1
- package/dist/lib/parse-template.d.ts.map +1 -1
- package/dist/lib/parse-template.js +3 -1
- package/dist/lib/parse-template.js.map +1 -1
- package/dist/lib/replacements.d.ts.map +1 -1
- package/dist/lib/replacements.js +15 -3
- package/dist/lib/replacements.js.map +1 -1
- package/dist/lib/select-db.d.ts.map +1 -1
- package/dist/lib/select-db.js +12 -3
- package/dist/lib/select-db.js.map +1 -1
- package/dist/lib/templates.d.ts.map +1 -1
- package/dist/lib/templates.js +3 -2
- package/dist/lib/templates.js.map +1 -1
- package/dist/lib/update-payload-in-project.d.ts.map +1 -1
- package/dist/lib/update-payload-in-project.js +7 -5
- package/dist/lib/update-payload-in-project.js.map +1 -1
- package/dist/lib/wrap-next-config.d.ts.map +1 -1
- package/dist/lib/wrap-next-config.js +1 -5
- package/dist/lib/wrap-next-config.js.map +1 -1
- package/dist/lib/write-env-file.d.ts +2 -1
- package/dist/lib/write-env-file.d.ts.map +1 -1
- package/dist/lib/write-env-file.js +9 -4
- package/dist/lib/write-env-file.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +10 -2
- package/dist/main.js.map +1 -1
- package/dist/scripts/pack-template-files.js +3 -3
- package/dist/scripts/pack-template-files.js.map +1 -1
- package/dist/template/src/app/(payload)/admin/[[...segments]]/not-found.tsx +8 -6
- package/dist/template/src/app/(payload)/admin/[[...segments]]/page.tsx +8 -6
- package/dist/template/src/app/(payload)/admin/importMap.js +1 -0
- package/dist/template/src/app/(payload)/api/[...slug]/route.ts +10 -2
- package/dist/template/src/app/(payload)/api/graphql/route.ts +4 -2
- package/dist/template/src/app/(payload)/api/graphql-playground/route.ts +1 -1
- package/dist/template/src/app/(payload)/layout.tsx +7 -2
- package/dist/template/src/payload-types.ts +127 -0
- package/dist/template/src/payload.config.ts +3 -0
- package/dist/types.d.ts +2 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/dist/utils/copy-recursive-sync.d.ts +1 -1
- package/dist/utils/copy-recursive-sync.d.ts.map +1 -1
- package/dist/utils/copy-recursive-sync.js +1 -1
- package/dist/utils/copy-recursive-sync.js.map +1 -1
- package/dist/utils/messages.d.ts.map +1 -1
- package/dist/utils/messages.js +1 -0
- package/dist/utils/messages.js.map +1 -1
- package/package.json +8 -4
@@ -1,22 +1,24 @@
|
|
1
1
|
/* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */
|
2
|
+
/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */
|
2
3
|
import type { Metadata } from 'next'
|
3
4
|
|
4
5
|
import config from '@payload-config'
|
5
|
-
/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */
|
6
6
|
import { NotFoundPage, generatePageMetadata } from '@payloadcms/next/views'
|
7
|
+
import { importMap } from '../importMap'
|
7
8
|
|
8
9
|
type Args = {
|
9
|
-
params: {
|
10
|
+
params: Promise<{
|
10
11
|
segments: string[]
|
11
|
-
}
|
12
|
-
searchParams: {
|
12
|
+
}>
|
13
|
+
searchParams: Promise<{
|
13
14
|
[key: string]: string | string[]
|
14
|
-
}
|
15
|
+
}>
|
15
16
|
}
|
16
17
|
|
17
18
|
export const generateMetadata = ({ params, searchParams }: Args): Promise<Metadata> =>
|
18
19
|
generatePageMetadata({ config, params, searchParams })
|
19
20
|
|
20
|
-
const NotFound = ({ params, searchParams }: Args) =>
|
21
|
+
const NotFound = ({ params, searchParams }: Args) =>
|
22
|
+
NotFoundPage({ config, params, searchParams, importMap })
|
21
23
|
|
22
24
|
export default NotFound
|
@@ -1,22 +1,24 @@
|
|
1
1
|
/* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */
|
2
|
+
/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */
|
2
3
|
import type { Metadata } from 'next'
|
3
4
|
|
4
5
|
import config from '@payload-config'
|
5
|
-
/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */
|
6
6
|
import { RootPage, generatePageMetadata } from '@payloadcms/next/views'
|
7
|
+
import { importMap } from '../importMap'
|
7
8
|
|
8
9
|
type Args = {
|
9
|
-
params: {
|
10
|
+
params: Promise<{
|
10
11
|
segments: string[]
|
11
|
-
}
|
12
|
-
searchParams: {
|
12
|
+
}>
|
13
|
+
searchParams: Promise<{
|
13
14
|
[key: string]: string | string[]
|
14
|
-
}
|
15
|
+
}>
|
15
16
|
}
|
16
17
|
|
17
18
|
export const generateMetadata = ({ params, searchParams }: Args): Promise<Metadata> =>
|
18
19
|
generatePageMetadata({ config, params, searchParams })
|
19
20
|
|
20
|
-
const Page = ({ params, searchParams }: Args) =>
|
21
|
+
const Page = ({ params, searchParams }: Args) =>
|
22
|
+
RootPage({ config, params, searchParams, importMap })
|
21
23
|
|
22
24
|
export default Page
|
@@ -0,0 +1 @@
|
|
1
|
+
export const importMap = {}
|
@@ -1,10 +1,18 @@
|
|
1
1
|
/* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */
|
2
|
-
/* DO NOT MODIFY
|
2
|
+
/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */
|
3
3
|
import config from '@payload-config'
|
4
|
-
import {
|
4
|
+
import {
|
5
|
+
REST_DELETE,
|
6
|
+
REST_GET,
|
7
|
+
REST_OPTIONS,
|
8
|
+
REST_PATCH,
|
9
|
+
REST_POST,
|
10
|
+
REST_PUT,
|
11
|
+
} from '@payloadcms/next/routes'
|
5
12
|
|
6
13
|
export const GET = REST_GET(config)
|
7
14
|
export const POST = REST_POST(config)
|
8
15
|
export const DELETE = REST_DELETE(config)
|
9
16
|
export const PATCH = REST_PATCH(config)
|
17
|
+
export const PUT = REST_PUT(config)
|
10
18
|
export const OPTIONS = REST_OPTIONS(config)
|
@@ -1,6 +1,8 @@
|
|
1
1
|
/* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */
|
2
|
-
/* DO NOT MODIFY
|
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,5 +1,5 @@
|
|
1
1
|
/* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */
|
2
|
-
/* DO NOT MODIFY
|
2
|
+
/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */
|
3
3
|
import config from '@payload-config'
|
4
4
|
import { GRAPHQL_PLAYGROUND_GET } from '@payloadcms/next/routes'
|
5
5
|
|
@@ -1,16 +1,21 @@
|
|
1
1
|
/* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */
|
2
|
+
/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */
|
2
3
|
import configPromise from '@payload-config'
|
3
4
|
import '@payloadcms/next/css'
|
4
5
|
import { RootLayout } from '@payloadcms/next/layouts'
|
5
|
-
/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */
|
6
6
|
import React from 'react'
|
7
7
|
|
8
8
|
import './custom.scss'
|
9
|
+
import { importMap } from './admin/importMap'
|
9
10
|
|
10
11
|
type Args = {
|
11
12
|
children: React.ReactNode
|
12
13
|
}
|
13
14
|
|
14
|
-
const Layout = ({ children }: Args) =>
|
15
|
+
const Layout = ({ children }: Args) => (
|
16
|
+
<RootLayout importMap={importMap} config={configPromise}>
|
17
|
+
{children}
|
18
|
+
</RootLayout>
|
19
|
+
)
|
15
20
|
|
16
21
|
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
|
+
}
|
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' | 'sqlite';
|
50
|
+
export type DbType = 'mongodb' | 'postgres' | 'sqlite' | 'vercel-postgres';
|
50
51
|
export type DbDetails = {
|
51
52
|
dbUri: string;
|
52
53
|
type: DbType;
|
package/dist/types.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,KAAK,CA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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' | 'sqlite'\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":"
|
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"}
|
@@ -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,
|
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
|
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
|
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,
|
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"}
|
package/dist/utils/messages.js
CHANGED
@@ -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
|
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;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,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"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "create-payload-app",
|
3
|
-
"version": "3.0.0-canary.
|
3
|
+
"version": "3.0.0-canary.a6e7305",
|
4
4
|
"homepage": "https://payloadcms.com",
|
5
5
|
"repository": {
|
6
6
|
"type": "git",
|
@@ -45,25 +45,29 @@
|
|
45
45
|
"arg": "^5.0.0",
|
46
46
|
"chalk": "^4.1.0",
|
47
47
|
"comment-json": "^4.2.3",
|
48
|
-
"degit": "^2.8.4",
|
49
48
|
"esprima-next": "^6.0.3",
|
50
49
|
"execa": "^5.0.0",
|
51
50
|
"figures": "^6.1.0",
|
52
51
|
"fs-extra": "^9.0.1",
|
53
52
|
"globby": "11.1.0",
|
53
|
+
"tar": "^7.4.3",
|
54
54
|
"terminal-link": "^2.1.1"
|
55
55
|
},
|
56
56
|
"devDependencies": {
|
57
|
-
"@types/degit": "^2.8.3",
|
58
57
|
"@types/esprima": "^4.0.6",
|
59
58
|
"@types/fs-extra": "^9.0.12",
|
60
59
|
"@types/jest": "29.5.12",
|
61
|
-
"@types/node": "
|
60
|
+
"@types/node": "22.5.4"
|
61
|
+
},
|
62
|
+
"engines": {
|
63
|
+
"node": "^18.20.2 || >=20.9.0"
|
62
64
|
},
|
63
65
|
"scripts": {
|
64
66
|
"build": "pnpm pack-template-files && pnpm typecheck && pnpm build:swc",
|
65
67
|
"build:swc": "swc ./src -d ./dist --config-file .swcrc --strip-leading-paths",
|
66
68
|
"clean": "rimraf {dist,*.tsbuildinfo}",
|
69
|
+
"lint": "eslint .",
|
70
|
+
"lint:fix": "eslint . --fix",
|
67
71
|
"pack-template-files": "node --no-deprecation --import @swc-node/register/esm-register src/scripts/pack-template-files.ts",
|
68
72
|
"test": "jest",
|
69
73
|
"typecheck": "tsc"
|