create-payload-app 0.3.21 → 0.3.23

Sign up to get free protection for your applications and to get access to all the features.
@@ -12,7 +12,7 @@
12
12
  "serve": "cross-env PAYLOAD_CONFIG_PATH=dist/payload.config.js NODE_ENV=production node dist/server.js",
13
13
  "copyfiles": "copyfiles -u 1 \"src/**/*.{html,css,scss,ttf,woff,woff2,eot,svg,jpg,png}\" dist/",
14
14
  "generate:types": "cross-env PAYLOAD_CONFIG_PATH=src/payload.config.ts payload generate:types",
15
- "generate:graphQLSchema": "PAYLOAD_CONFIG_PATH=src/payload.config.ts payload generate:graphQLSchema"
15
+ "generate:graphQLSchema": "cross-env PAYLOAD_CONFIG_PATH=src/payload.config.ts payload generate:graphQLSchema"
16
16
  },
17
17
  "dependencies": {
18
18
  "payload": "1.1.17",
@@ -12,7 +12,12 @@
12
12
  "skipLibCheck": true,
13
13
  "outDir": "./dist",
14
14
  "rootDir": "./src",
15
- "jsx": "react"
15
+ "jsx": "react",
16
+ "paths": {
17
+ "payload/generated-types": [
18
+ "./src/payload-types.ts",
19
+ ],
20
+ }
16
21
  },
17
22
  "include": [
18
23
  "src"
@@ -23,6 +28,7 @@
23
28
  "build",
24
29
  ],
25
30
  "ts-node": {
26
- "transpileOnly": true
31
+ "transpileOnly": true,
32
+ "swc": true,
27
33
  }
28
34
  }
@@ -9,16 +9,20 @@ app.get('/', (_, res) => {
9
9
  res.redirect('/admin');
10
10
  });
11
11
 
12
- // Initialize Payload
13
- payload.init({
14
- secret: process.env.PAYLOAD_SECRET,
15
- mongoURL: process.env.MONGODB_URI,
16
- express: app,
17
- onInit: () => {
18
- payload.logger.info(`Payload Admin URL: ${payload.getAdminURL()}`)
19
- },
20
- })
12
+ const start = async () => {
13
+ // Initialize Payload
14
+ await payload.init({
15
+ secret: process.env.PAYLOAD_SECRET,
16
+ mongoURL: process.env.MONGODB_URI,
17
+ express: app,
18
+ onInit: async () => {
19
+ payload.logger.info(`Payload Admin URL: ${payload.getAdminURL()}`)
20
+ },
21
+ })
21
22
 
22
- // Add your own express routes here
23
+ // Add your own express routes here
23
24
 
24
- app.listen(3000);
25
+ app.listen(3000);
26
+ }
27
+
28
+ start();
@@ -9,16 +9,20 @@ app.get('/', (_, res) => {
9
9
  res.redirect('/admin');
10
10
  });
11
11
 
12
- // Initialize Payload
13
- payload.init({
14
- secret: process.env.PAYLOAD_SECRET,
15
- mongoURL: process.env.MONGODB_URI,
16
- express: app,
17
- onInit: () => {
18
- payload.logger.info(`Payload Admin URL: ${payload.getAdminURL()}`)
19
- },
20
- })
12
+ const start = async () => {
13
+ // Initialize Payload
14
+ await payload.init({
15
+ secret: process.env.PAYLOAD_SECRET,
16
+ mongoURL: process.env.MONGODB_URI,
17
+ express: app,
18
+ onInit: async () => {
19
+ payload.logger.info(`Payload Admin URL: ${payload.getAdminURL()}`)
20
+ },
21
+ })
21
22
 
22
- // Add your own express routes here
23
+ // Add your own express routes here
23
24
 
24
- app.listen(3000);
25
+ app.listen(3000);
26
+ }
27
+
28
+ start();
@@ -9,16 +9,20 @@ app.get('/', (_, res) => {
9
9
  res.redirect('/admin');
10
10
  });
11
11
 
12
- // Initialize Payload
13
- payload.init({
14
- secret: process.env.PAYLOAD_SECRET,
15
- mongoURL: process.env.MONGODB_URI,
16
- express: app,
17
- onInit: () => {
18
- payload.logger.info(`Payload Admin URL: ${payload.getAdminURL()}`)
19
- },
20
- })
12
+ const start = async () => {
13
+ // Initialize Payload
14
+ await payload.init({
15
+ secret: process.env.PAYLOAD_SECRET,
16
+ mongoURL: process.env.MONGODB_URI,
17
+ express: app,
18
+ onInit: async () => {
19
+ payload.logger.info(`Payload Admin URL: ${payload.getAdminURL()}`)
20
+ },
21
+ })
21
22
 
22
- // Add your own express routes here
23
+ // Add your own express routes here
23
24
 
24
- app.listen(3000);
25
+ app.listen(3000);
26
+ }
27
+
28
+ start();
package/package.json CHANGED
@@ -36,7 +36,7 @@
36
36
  "prompts": "^2.4.0",
37
37
  "terminal-link": "^2.1.1"
38
38
  },
39
- "version": "0.3.21",
39
+ "version": "0.3.23",
40
40
  "devDependencies": {
41
41
  "@types/command-exists": "^1.2.0",
42
42
  "@types/degit": "^2.8.3",