create-payload-app 3.20.0-canary.fb49f3a → 3.21.0-canary.0a1cc6a
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.
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../src/lib/templates.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;
|
1
|
+
{"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../src/lib/templates.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAKlD,wBAAgB,gBAAgB,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAQ9D;AAED,wBAAgB,iBAAiB,IAAI,eAAe,EAAE,CAsBrD"}
|
package/dist/lib/templates.js
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
import { error, info } from '../utils/log.js';
|
2
|
+
import { PACKAGE_VERSION } from './constants.js';
|
2
3
|
export function validateTemplate(templateName) {
|
3
4
|
const validTemplates = getValidTemplates();
|
4
5
|
if (!validTemplates.map((t)=>t.name).includes(templateName)) {
|
@@ -15,13 +16,13 @@ export function getValidTemplates() {
|
|
15
16
|
name: 'blank',
|
16
17
|
type: 'starter',
|
17
18
|
description: 'Blank 3.0 Template',
|
18
|
-
url: `https://github.com/payloadcms/payload/templates/blank#
|
19
|
+
url: `https://github.com/payloadcms/payload/templates/blank#v${PACKAGE_VERSION}`
|
19
20
|
},
|
20
21
|
{
|
21
22
|
name: 'website',
|
22
23
|
type: 'starter',
|
23
24
|
description: 'Website Template',
|
24
|
-
url: `https://github.com/payloadcms/payload/templates/website#
|
25
|
+
url: `https://github.com/payloadcms/payload/templates/website#v${PACKAGE_VERSION}`
|
25
26
|
},
|
26
27
|
{
|
27
28
|
name: 'plugin',
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../src/lib/templates.ts"],"sourcesContent":["import type { ProjectTemplate } from '../types.js'\n\nimport { error, info } from '../utils/log.js'\n\nexport function validateTemplate(templateName: string): boolean {\n const validTemplates = getValidTemplates()\n if (!validTemplates.map((t) => t.name).includes(templateName)) {\n error(`'${templateName}' is not a valid template.`)\n info(`Valid templates: ${validTemplates.map((t) => t.name).join(', ')}`)\n return false\n }\n return true\n}\n\nexport function getValidTemplates(): ProjectTemplate[] {\n // Starters _must_ be a valid template name from the templates/ directory\n return [\n {\n name: 'blank',\n type: 'starter',\n description: 'Blank 3.0 Template',\n url: `https://github.com/payloadcms/payload/templates/blank#
|
1
|
+
{"version":3,"sources":["../../src/lib/templates.ts"],"sourcesContent":["import type { ProjectTemplate } from '../types.js'\n\nimport { error, info } from '../utils/log.js'\nimport { PACKAGE_VERSION } from './constants.js'\n\nexport function validateTemplate(templateName: string): boolean {\n const validTemplates = getValidTemplates()\n if (!validTemplates.map((t) => t.name).includes(templateName)) {\n error(`'${templateName}' is not a valid template.`)\n info(`Valid templates: ${validTemplates.map((t) => t.name).join(', ')}`)\n return false\n }\n return true\n}\n\nexport function getValidTemplates(): ProjectTemplate[] {\n // Starters _must_ be a valid template name from the templates/ directory\n return [\n {\n name: 'blank',\n type: 'starter',\n description: 'Blank 3.0 Template',\n url: `https://github.com/payloadcms/payload/templates/blank#v${PACKAGE_VERSION}`,\n },\n {\n name: 'website',\n type: 'starter',\n description: 'Website Template',\n url: `https://github.com/payloadcms/payload/templates/website#v${PACKAGE_VERSION}`,\n },\n {\n name: 'plugin',\n type: 'plugin',\n description: 'Template for creating a Payload plugin',\n url: 'https://github.com/payloadcms/payload/templates/plugin#main',\n },\n ]\n}\n"],"names":["error","info","PACKAGE_VERSION","validateTemplate","templateName","validTemplates","getValidTemplates","map","t","name","includes","join","type","description","url"],"mappings":"AAEA,SAASA,KAAK,EAAEC,IAAI,QAAQ,kBAAiB;AAC7C,SAASC,eAAe,QAAQ,iBAAgB;AAEhD,OAAO,SAASC,iBAAiBC,YAAoB;IACnD,MAAMC,iBAAiBC;IACvB,IAAI,CAACD,eAAeE,GAAG,CAAC,CAACC,IAAMA,EAAEC,IAAI,EAAEC,QAAQ,CAACN,eAAe;QAC7DJ,MAAM,CAAC,CAAC,EAAEI,aAAa,0BAA0B,CAAC;QAClDH,KAAK,CAAC,iBAAiB,EAAEI,eAAeE,GAAG,CAAC,CAACC,IAAMA,EAAEC,IAAI,EAAEE,IAAI,CAAC,OAAO;QACvE,OAAO;IACT;IACA,OAAO;AACT;AAEA,OAAO,SAASL;IACd,yEAAyE;IACzE,OAAO;QACL;YACEG,MAAM;YACNG,MAAM;YACNC,aAAa;YACbC,KAAK,CAAC,uDAAuD,EAAEZ,iBAAiB;QAClF;QACA;YACEO,MAAM;YACNG,MAAM;YACNC,aAAa;YACbC,KAAK,CAAC,yDAAyD,EAAEZ,iBAAiB;QACpF;QACA;YACEO,MAAM;YACNG,MAAM;YACNC,aAAa;YACbC,KAAK;QACP;KACD;AACH"}
|
@@ -13,7 +13,6 @@ export default async function HomePage() {
|
|
13
13
|
const payload = await getPayload({ config: payloadConfig })
|
14
14
|
const { user } = await payload.auth({ headers })
|
15
15
|
|
16
|
-
const adminRoute = payloadConfig.routes?.admin || '/admin'
|
17
16
|
const fileURL = `vscode://file/${fileURLToPath(import.meta.url)}`
|
18
17
|
|
19
18
|
return (
|
@@ -31,7 +30,12 @@ export default async function HomePage() {
|
|
31
30
|
{!user && <h1>Welcome to your new project.</h1>}
|
32
31
|
{user && <h1>Welcome back, {user.email}</h1>}
|
33
32
|
<div className="links">
|
34
|
-
<a
|
33
|
+
<a
|
34
|
+
className="admin"
|
35
|
+
href={payloadConfig.routes.admin}
|
36
|
+
rel="noopener noreferrer"
|
37
|
+
target="_blank"
|
38
|
+
>
|
35
39
|
Go to admin panel
|
36
40
|
</a>
|
37
41
|
<a
|
@@ -13,31 +13,17 @@ export interface Config {
|
|
13
13
|
collections: {
|
14
14
|
users: User;
|
15
15
|
media: Media;
|
16
|
-
'payload-locked-documents': PayloadLockedDocument;
|
17
16
|
'payload-preferences': PayloadPreference;
|
18
17
|
'payload-migrations': PayloadMigration;
|
19
18
|
};
|
20
|
-
collectionsJoins: {};
|
21
|
-
collectionsSelect: {
|
22
|
-
users: UsersSelect<false> | UsersSelect<true>;
|
23
|
-
media: MediaSelect<false> | MediaSelect<true>;
|
24
|
-
'payload-locked-documents': PayloadLockedDocumentsSelect<false> | PayloadLockedDocumentsSelect<true>;
|
25
|
-
'payload-preferences': PayloadPreferencesSelect<false> | PayloadPreferencesSelect<true>;
|
26
|
-
'payload-migrations': PayloadMigrationsSelect<false> | PayloadMigrationsSelect<true>;
|
27
|
-
};
|
28
19
|
db: {
|
29
20
|
defaultIDType: string;
|
30
21
|
};
|
31
22
|
globals: {};
|
32
|
-
globalsSelect: {};
|
33
23
|
locale: null;
|
34
24
|
user: User & {
|
35
25
|
collection: 'users';
|
36
26
|
};
|
37
|
-
jobs: {
|
38
|
-
tasks: unknown;
|
39
|
-
workflows: unknown;
|
40
|
-
};
|
41
27
|
}
|
42
28
|
export interface UserAuthOperations {
|
43
29
|
forgotPassword: {
|
@@ -93,29 +79,6 @@ export interface Media {
|
|
93
79
|
focalX?: number | null;
|
94
80
|
focalY?: number | null;
|
95
81
|
}
|
96
|
-
/**
|
97
|
-
* This interface was referenced by `Config`'s JSON-Schema
|
98
|
-
* via the `definition` "payload-locked-documents".
|
99
|
-
*/
|
100
|
-
export interface PayloadLockedDocument {
|
101
|
-
id: string;
|
102
|
-
document?:
|
103
|
-
| ({
|
104
|
-
relationTo: 'users';
|
105
|
-
value: string | User;
|
106
|
-
} | null)
|
107
|
-
| ({
|
108
|
-
relationTo: 'media';
|
109
|
-
value: string | Media;
|
110
|
-
} | null);
|
111
|
-
globalSlug?: string | null;
|
112
|
-
user: {
|
113
|
-
relationTo: 'users';
|
114
|
-
value: string | User;
|
115
|
-
};
|
116
|
-
updatedAt: string;
|
117
|
-
createdAt: string;
|
118
|
-
}
|
119
82
|
/**
|
120
83
|
* This interface was referenced by `Config`'s JSON-Schema
|
121
84
|
* via the `definition` "payload-preferences".
|
@@ -150,71 +113,6 @@ export interface PayloadMigration {
|
|
150
113
|
updatedAt: string;
|
151
114
|
createdAt: string;
|
152
115
|
}
|
153
|
-
/**
|
154
|
-
* This interface was referenced by `Config`'s JSON-Schema
|
155
|
-
* via the `definition` "users_select".
|
156
|
-
*/
|
157
|
-
export interface UsersSelect<T extends boolean = true> {
|
158
|
-
updatedAt?: T;
|
159
|
-
createdAt?: T;
|
160
|
-
email?: T;
|
161
|
-
resetPasswordToken?: T;
|
162
|
-
resetPasswordExpiration?: T;
|
163
|
-
salt?: T;
|
164
|
-
hash?: T;
|
165
|
-
loginAttempts?: T;
|
166
|
-
lockUntil?: T;
|
167
|
-
}
|
168
|
-
/**
|
169
|
-
* This interface was referenced by `Config`'s JSON-Schema
|
170
|
-
* via the `definition` "media_select".
|
171
|
-
*/
|
172
|
-
export interface MediaSelect<T extends boolean = true> {
|
173
|
-
alt?: T;
|
174
|
-
updatedAt?: T;
|
175
|
-
createdAt?: T;
|
176
|
-
url?: T;
|
177
|
-
thumbnailURL?: T;
|
178
|
-
filename?: T;
|
179
|
-
mimeType?: T;
|
180
|
-
filesize?: T;
|
181
|
-
width?: T;
|
182
|
-
height?: T;
|
183
|
-
focalX?: T;
|
184
|
-
focalY?: T;
|
185
|
-
}
|
186
|
-
/**
|
187
|
-
* This interface was referenced by `Config`'s JSON-Schema
|
188
|
-
* via the `definition` "payload-locked-documents_select".
|
189
|
-
*/
|
190
|
-
export interface PayloadLockedDocumentsSelect<T extends boolean = true> {
|
191
|
-
document?: T;
|
192
|
-
globalSlug?: T;
|
193
|
-
user?: T;
|
194
|
-
updatedAt?: T;
|
195
|
-
createdAt?: T;
|
196
|
-
}
|
197
|
-
/**
|
198
|
-
* This interface was referenced by `Config`'s JSON-Schema
|
199
|
-
* via the `definition` "payload-preferences_select".
|
200
|
-
*/
|
201
|
-
export interface PayloadPreferencesSelect<T extends boolean = true> {
|
202
|
-
user?: T;
|
203
|
-
key?: T;
|
204
|
-
value?: T;
|
205
|
-
updatedAt?: T;
|
206
|
-
createdAt?: T;
|
207
|
-
}
|
208
|
-
/**
|
209
|
-
* This interface was referenced by `Config`'s JSON-Schema
|
210
|
-
* via the `definition` "payload-migrations_select".
|
211
|
-
*/
|
212
|
-
export interface PayloadMigrationsSelect<T extends boolean = true> {
|
213
|
-
name?: T;
|
214
|
-
batch?: T;
|
215
|
-
updatedAt?: T;
|
216
|
-
createdAt?: T;
|
217
|
-
}
|
218
116
|
/**
|
219
117
|
* This interface was referenced by `Config`'s JSON-Schema
|
220
118
|
* via the `definition` "auth".
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "create-payload-app",
|
3
|
-
"version": "3.
|
3
|
+
"version": "3.21.0-canary.0a1cc6a",
|
4
4
|
"homepage": "https://payloadcms.com",
|
5
5
|
"repository": {
|
6
6
|
"type": "git",
|
@@ -49,7 +49,7 @@
|
|
49
49
|
"dependencies": {
|
50
50
|
"@clack/prompts": "^0.7.0",
|
51
51
|
"@sindresorhus/slugify": "^1.1.0",
|
52
|
-
"@swc/core": "1.
|
52
|
+
"@swc/core": "1.10.12",
|
53
53
|
"arg": "^5.0.0",
|
54
54
|
"chalk": "^4.1.0",
|
55
55
|
"comment-json": "^4.2.3",
|