@cocreate/cli 1.42.1 → 1.42.2
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.
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
## [1.42.2](https://github.com/CoCreate-app/CoCreate-cli/compare/v1.42.1...v1.42.2) (2023-10-09)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* bump dependencies ([6a0c858](https://github.com/CoCreate-app/CoCreate-cli/commit/6a0c85895363879a8dc08e5400fd44a539ba06ab))
|
|
7
|
+
* update nginx config to route ws traffic to / ([8bc0775](https://github.com/CoCreate-app/CoCreate-cli/commit/8bc0775887e4abe3808e22186408f8dbb5090c15))
|
|
8
|
+
|
|
1
9
|
## [1.42.1](https://github.com/CoCreate-app/CoCreate-cli/compare/v1.42.0...v1.42.1) (2023-10-09)
|
|
2
10
|
|
|
3
11
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cocreate/cli",
|
|
3
|
-
"version": "1.42.
|
|
3
|
+
"version": "1.42.2",
|
|
4
4
|
"description": "Polyrepo management bash CLI tool. Run all git commands and yarn commands on multiple repositories. Also includes a few custom macros for cloning, installing, etc.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cli",
|
|
@@ -55,8 +55,8 @@
|
|
|
55
55
|
"coc": "src/coc.js"
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
|
-
"@cocreate/config": "^1.6.
|
|
59
|
-
"@cocreate/file": "^1.9.
|
|
58
|
+
"@cocreate/config": "^1.6.4",
|
|
59
|
+
"@cocreate/file": "^1.9.4",
|
|
60
60
|
"glob": "^7.1.7",
|
|
61
61
|
"prettier": "^2.3.2"
|
|
62
62
|
}
|
|
@@ -13,26 +13,12 @@ async function createServer(hosts) {
|
|
|
13
13
|
for (let host of hosts) {
|
|
14
14
|
const hostParts = host.split('.')
|
|
15
15
|
const domain = hostParts[0];
|
|
16
|
-
const tld =
|
|
16
|
+
const tld = hostParts[1];
|
|
17
17
|
const server = `
|
|
18
18
|
server {
|
|
19
19
|
server_name ~^(?<sub>.+)\.${domain}\.${tld} ${host};
|
|
20
20
|
|
|
21
21
|
location / {
|
|
22
|
-
proxy_pass http://localhost:3000;
|
|
23
|
-
proxy_set_header Host $host;
|
|
24
|
-
proxy_set_header X-Real-IP $remote_addr;
|
|
25
|
-
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
26
|
-
proxy_set_header X-Forwarded-Proto $scheme;
|
|
27
|
-
fastcgi_buffers 16 16k;
|
|
28
|
-
fastcgi_buffer_size 32k;
|
|
29
|
-
proxy_buffer_size 128k;
|
|
30
|
-
proxy_buffers 4 256k;
|
|
31
|
-
proxy_busy_buffers_size 256k;
|
|
32
|
-
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
location /ws/ {
|
|
36
22
|
proxy_pass http://localhost:3000;
|
|
37
23
|
proxy_set_header Host $host;
|
|
38
24
|
proxy_set_header X-Real-IP $remote_addr;
|
|
@@ -40,6 +26,7 @@ server {
|
|
|
40
26
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
41
27
|
proxy_set_header Upgrade $http_upgrade;
|
|
42
28
|
proxy_set_header Connection "Upgrade";
|
|
29
|
+
|
|
43
30
|
fastcgi_buffers 16 16k;
|
|
44
31
|
fastcgi_buffer_size 32k;
|
|
45
32
|
proxy_buffer_size 128k;
|
|
@@ -71,10 +58,10 @@ server {
|
|
|
71
58
|
|
|
72
59
|
`;
|
|
73
60
|
fs.writeFileSync(`${available}${host}`, server)
|
|
74
|
-
|
|
61
|
+
|
|
75
62
|
if (!fs.existsSync(`${enabled}${host}`))
|
|
76
63
|
await exec(`sudo ln -s ${available}${host} ${enabled}`);
|
|
77
|
-
|
|
64
|
+
|
|
78
65
|
let test = await exec(`sudo nginx -t`);
|
|
79
66
|
if (test.stderr.includes('test is successful')) {
|
|
80
67
|
await exec(`sudo systemctl reload nginx`);
|
|
@@ -96,7 +83,7 @@ server {
|
|
|
96
83
|
server_name _;
|
|
97
84
|
return 301 https://$host$request_uri;
|
|
98
85
|
}`
|
|
99
|
-
|
|
86
|
+
|
|
100
87
|
fs.writeFileSync(`${available}main`, main)
|
|
101
88
|
await exec(`sudo ln -s ${available}main ${enabled}`);
|
|
102
89
|
|
|
@@ -104,7 +91,7 @@ server {
|
|
|
104
91
|
fs.unlinkSync(`${enabled}default`)
|
|
105
92
|
if (fs.existsSync(`${available}default`))
|
|
106
93
|
fs.unlinkSync(`${available}default`)
|
|
107
|
-
|
|
94
|
+
|
|
108
95
|
let test = await exec(`sudo nginx -t`);
|
|
109
96
|
if (test.stderr.includes('test is successful')) {
|
|
110
97
|
await exec(`sudo systemctl reload nginx`);
|
|
@@ -114,7 +101,7 @@ server {
|
|
|
114
101
|
console.log('main test failed')
|
|
115
102
|
response['main'] = false
|
|
116
103
|
}
|
|
117
|
-
|
|
104
|
+
|
|
118
105
|
}
|
|
119
106
|
|
|
120
107
|
return response
|
|
@@ -129,10 +116,10 @@ async function deleteServer(hosts) {
|
|
|
129
116
|
fs.unlinkSync(`${enabled}${host}`)
|
|
130
117
|
if (fs.existsSync(`${available}${host}`))
|
|
131
118
|
fs.unlinkSync(`${available}${host}`)
|
|
132
|
-
|
|
119
|
+
|
|
133
120
|
response[host] = true
|
|
134
121
|
}
|
|
135
122
|
return response
|
|
136
123
|
}
|
|
137
124
|
|
|
138
|
-
module.exports = {createServer, deleteServer}
|
|
125
|
+
module.exports = { createServer, deleteServer }
|