-
Notifications
You must be signed in to change notification settings - Fork 0
/
dev-pm.config.js
96 lines (93 loc) · 3.22 KB
/
dev-pm.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
const packageFolderMapping = {
"@comet/brevo-api": "packages/api",
"@comet/brevo-admin": "packages/admin",
};
const waitOnPackages = (...packages) => {
return packages.map((package) => `${packageFolderMapping[package]}/lib/index.d.ts`);
};
module.exports = {
scripts: [
//group api
{
name: "api",
script: "pnpm --filter @comet/brevo-api run dev",
group: ["api"],
},
{
name: "api-codegen-schema",
script: "pnpm --filter @comet/brevo-api run generate-schema:watch",
group: ["api"],
},
//group admin
{
name: "admin",
script: "pnpm --filter @comet/brevo-admin run start",
group: ["admin"],
},
//group demo admin
{
name: "demo-admin",
script: "pnpm --filter comet-brevo-module-demo-admin run start",
group: ["demo-admin", "demo"],
waitOn: [...waitOnPackages("@comet/brevo-admin"), "tcp:$API_PORT"],
},
{
name: "demo-admin-codegen",
script: "pnpm --filter comet-brevo-module-demo-admin run gql:watch",
group: ["demo-admin", "demo"],
waitOn: ["tcp:$API_PORT"],
},
{
name: "demo-admin-block-codegen",
script: "pnpm --filter comet-brevo-module-demo-admin run generate-block-types:watch",
group: ["demo-admin", "demo"],
waitOn: ["tcp:$API_PORT"],
},
//group demo api
{
name: "demo-docker",
script: "docker compose up",
group: ["demo-api", "demo"],
},
{
name: "demo-api",
script: ["pnpm --filter comet-brevo-module-demo-api run db:migrate", "pnpm --filter comet-brevo-module-demo-api run start:dev"].join(
" && ",
),
group: ["demo-api", "demo"],
waitOn: [...waitOnPackages("@comet/brevo-api"), "tcp:$POSTGRESQL_PORT", "tcp:$IMGPROXY_PORT"],
},
//group demo site
{
name: "demo-site",
script: "pnpm --filter comet-brevo-module-demo-site run dev",
group: ["demo-site", "demo"],
waitOn: ["tcp:$API_PORT"],
},
{
name: "demo-site-codegen",
script: "pnpm --filter comet-brevo-module-demo-site run gql:watch",
group: ["demo-site", "demo"],
waitOn: ["tcp:$API_PORT"],
},
{
name: "demo-site-block-codegen",
script: "pnpm --filter comet-brevo-module-demo-site run generate-block-types:watch",
group: ["demo-site", "demo"],
waitOn: ["tcp:$API_PORT"],
},
// group demo campaign frontend
{
name: "demo-campaign",
script: "pnpm --filter comet-brevo-module-demo-campaign run dev",
group: ["demo-campaign", "demo"],
waitOn: ["tcp:$API_PORT"],
},
{
name: "demo-campaign-block-codegen",
script: "pnpm --filter comet-brevo-module-demo-campaign run generate-block-types:watch",
group: ["demo-campaign", "demo"],
waitOn: ["tcp:$API_PORT"],
},
],
};