@peerbit/server 5.4.14-a4bcfcf → 5.4.14
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/dist/src/domain.d.ts.map +1 -1
- package/dist/src/domain.js +1 -2
- package/dist/src/domain.js.map +1 -1
- package/dist/src/nginx-template.conf +10 -15
- package/dist/src/routes.d.ts +1 -1
- package/dist/src/routes.js +1 -1
- package/dist/src/trust.js +1 -1
- package/dist/src/trust.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui/assets/{index-BPdbODjv.js → index-BiNPt6Oq.js} +1 -1
- package/dist/ui/index.html +1 -1
- package/package.json +89 -89
- package/src/domain.ts +1 -2
- package/src/nginx-template.conf +10 -15
- package/src/routes.ts +1 -1
- package/src/trust.ts +1 -1
package/dist/ui/index.html
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
Learn how to configure a non-root public URL by running `npm run build`.
|
|
24
24
|
-->
|
|
25
25
|
<title>Peerbit</title>
|
|
26
|
-
<script type="module" crossorigin src="/assets/index-
|
|
26
|
+
<script type="module" crossorigin src="/assets/index-BiNPt6Oq.js"></script>
|
|
27
27
|
<link rel="stylesheet" crossorigin href="/assets/index-CIfVvUo9.css">
|
|
28
28
|
</head>
|
|
29
29
|
|
package/package.json
CHANGED
|
@@ -1,91 +1,91 @@
|
|
|
1
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
|
-
|
|
2
|
+
"name": "@peerbit/server",
|
|
3
|
+
"version": "5.4.14",
|
|
4
|
+
"author": "dao.xyz",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "https://github.com/dao-xyz/peerbit"
|
|
8
|
+
},
|
|
9
|
+
"license": "Apache-2.0",
|
|
10
|
+
"type": "module",
|
|
11
|
+
"sideEffects": false,
|
|
12
|
+
"bin": {
|
|
13
|
+
"peerbit": "./dist/src/bin.js"
|
|
14
|
+
},
|
|
15
|
+
"module": "dist/src/index.js",
|
|
16
|
+
"types": "dist/src/index.d.ts",
|
|
17
|
+
"exports": {
|
|
18
|
+
"import": "./dist/src/index.js"
|
|
19
|
+
},
|
|
20
|
+
"browser": {
|
|
21
|
+
"./dist/src/server.js": "./dist/src/server.browser.js",
|
|
22
|
+
"./server.js": "./dist/src/server.browser.js",
|
|
23
|
+
"./dist/src/config.js": "./dist/src/config.browser.js",
|
|
24
|
+
"./config.js": "./dist/src/config.browser.js",
|
|
25
|
+
"./dist/src/remotes.js": "./dist/src/remotes.browser.js",
|
|
26
|
+
"./remotes.js": "./dist/src/remotes.browser.js",
|
|
27
|
+
"./dist/src/docker.js": "./dist/src/docker.browser.js",
|
|
28
|
+
"./docker.js": "./dist/src/docker.browser.js",
|
|
29
|
+
"./dist/src/aws.js": "./dist/src/aws.browser.js"
|
|
30
|
+
},
|
|
31
|
+
"files": [
|
|
32
|
+
"dist",
|
|
33
|
+
"src",
|
|
34
|
+
"src/nginx-template.conf",
|
|
35
|
+
"!src/test",
|
|
36
|
+
"!src/**/__tests__",
|
|
37
|
+
"!lib/**/__tests__",
|
|
38
|
+
"patches",
|
|
39
|
+
"LICENSE"
|
|
40
|
+
],
|
|
41
|
+
"publishConfig": {
|
|
42
|
+
"access": "public"
|
|
43
|
+
},
|
|
44
|
+
"engines": {
|
|
45
|
+
"node": ">=18"
|
|
46
|
+
},
|
|
47
|
+
"eslintConfig": {
|
|
48
|
+
"extends": "peerbit",
|
|
49
|
+
"parserOptions": {
|
|
50
|
+
"project": true,
|
|
51
|
+
"sourceType": "module"
|
|
52
|
+
},
|
|
53
|
+
"ignorePatterns": [
|
|
54
|
+
"!.aegir.js",
|
|
55
|
+
"test/ts-use",
|
|
56
|
+
"*.d.ts"
|
|
57
|
+
]
|
|
58
|
+
},
|
|
59
|
+
"scripts": {
|
|
60
|
+
"clean": "shx rm -rf lib/*",
|
|
61
|
+
"build": "yarn clean && yarn build-lib && yarn build-ui",
|
|
62
|
+
"build-lib": "tsc -p tsconfig.json",
|
|
63
|
+
"build-ui": "cd ../frontend && yarn build && cd ../node",
|
|
64
|
+
"postbuild": "cp src/nginx-template.conf dist/src/ && cp -r ../frontend/dist/. dist/ui",
|
|
65
|
+
"test": "aegir test --t node",
|
|
66
|
+
"lint": "aegir lint"
|
|
67
|
+
},
|
|
68
|
+
"devDependencies": {
|
|
69
|
+
"@peerbit/test-lib": "^0.0.1",
|
|
70
|
+
"@peerbit/test-utils": "2.1.56",
|
|
71
|
+
"@types/yargs": "17.0.24",
|
|
72
|
+
"aws-sdk": "^2.1259.0",
|
|
73
|
+
"dotenv": "^16.1.4",
|
|
74
|
+
"@types/tmp": "^0.2.3",
|
|
75
|
+
"@types/tar-stream": "^3.1.3",
|
|
76
|
+
"shx": "^0.3.4"
|
|
77
|
+
},
|
|
78
|
+
"dependencies": {
|
|
79
|
+
"axios": "^1.4.0",
|
|
80
|
+
"chalk": "^5.3.0",
|
|
81
|
+
"peerbit": "4.1.45",
|
|
82
|
+
"yargs": "^17.7.2",
|
|
83
|
+
"tar-stream": "^3.1.7",
|
|
84
|
+
"tmp": "^0.2.1",
|
|
85
|
+
"tty-table": "^4.2.1"
|
|
86
|
+
},
|
|
87
|
+
"optionalDependencies": {
|
|
88
|
+
"@aws-sdk/client-ec2": "^3.390.0",
|
|
89
|
+
"@aws-sdk/client-route-53": "^3.391.0"
|
|
90
|
+
}
|
|
91
91
|
}
|
package/src/domain.ts
CHANGED
|
@@ -156,8 +156,7 @@ export const startCertbot = async (
|
|
|
156
156
|
-v $(pwd)/nginx_secrets:/etc/letsencrypt \
|
|
157
157
|
-v ${nginxConfigPath}:/etc/nginx/user_conf.d:ro \
|
|
158
158
|
-v $(pwd)/ui:/usr/share/nginx/html:ro \
|
|
159
|
-
--name ${dockerProcessName} jonasal/nginx-certbot:latest
|
|
160
|
-
--restart unless-stopped`;
|
|
159
|
+
--name ${dockerProcessName} jonasal/nginx-certbot:latest`;
|
|
161
160
|
|
|
162
161
|
console.log("Starting Certbot");
|
|
163
162
|
// try two times with some delay, because sometimes the docker daemon is not available immidatel
|
package/src/nginx-template.conf
CHANGED
|
@@ -86,16 +86,8 @@ server {
|
|
|
86
86
|
}
|
|
87
87
|
|
|
88
88
|
server {
|
|
89
|
-
server_name %DOMAIN%;
|
|
90
|
-
|
|
91
|
-
listen 443 ssl;
|
|
92
|
-
|
|
93
|
-
# Allow ACME challenge to resolve even if a client lands on https
|
|
94
|
-
location ^~ /.well-known/acme-challenge/ {
|
|
95
|
-
root /var/www/letsencrypt;
|
|
96
|
-
default_type text/plain;
|
|
97
|
-
}
|
|
98
|
-
|
|
89
|
+
server_name %DOMAIN%; # managed by Certbot
|
|
90
|
+
|
|
99
91
|
root /usr/share/nginx/html;
|
|
100
92
|
index index.html index.htm;
|
|
101
93
|
|
|
@@ -103,6 +95,8 @@ server {
|
|
|
103
95
|
try_files $uri $uri/ =404;
|
|
104
96
|
}
|
|
105
97
|
|
|
98
|
+
listen [::]:443 ssl ipv6only=on; # managed by Certbot
|
|
99
|
+
listen 443 ssl; # managed by Certbot
|
|
106
100
|
|
|
107
101
|
# Load the certificate files.
|
|
108
102
|
ssl_certificate /etc/letsencrypt/live/%DOMAIN%/fullchain.pem;
|
|
@@ -141,13 +135,14 @@ server {
|
|
|
141
135
|
# Anything requesting this particular URL should be served content from
|
|
142
136
|
# Certbot's folder so the HTTP-01 ACME challenges can be completed for the
|
|
143
137
|
# HTTPS certificates.
|
|
144
|
-
location
|
|
138
|
+
location '/.well-known/acme-challenge' {
|
|
139
|
+
default_type "text/plain";
|
|
145
140
|
root /var/www/letsencrypt;
|
|
146
|
-
default_type text/plain;
|
|
147
141
|
}
|
|
148
142
|
|
|
149
|
-
|
|
150
|
-
location / {
|
|
143
|
+
if ($host = %DOMAIN%) {
|
|
151
144
|
return 301 https://$host$request_uri;
|
|
152
|
-
}
|
|
145
|
+
} # managed by Certbot
|
|
146
|
+
|
|
147
|
+
return 404; # managed by Certbot
|
|
153
148
|
}
|
package/src/routes.ts
CHANGED
|
@@ -21,6 +21,6 @@ export const INSTALL_PATH = "/install";
|
|
|
21
21
|
export const BOOTSTRAP_PATH = "/network/bootstrap";
|
|
22
22
|
export const RESTART_PATH = "/restart";
|
|
23
23
|
export const TERMINATE_PATH = "/terminate";
|
|
24
|
-
export const STOP_PATH = "/
|
|
24
|
+
export const STOP_PATH = "/path";
|
|
25
25
|
export const LOG_PATH = "/log";
|
|
26
26
|
export const VERSIONS_PATH = "/versions";
|
package/src/trust.ts
CHANGED
|
@@ -29,7 +29,7 @@ export class Trust {
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
remove(hashcode: string) {
|
|
32
|
-
const existing = this.trusted.findIndex((x) => x
|
|
32
|
+
const existing = this.trusted.findIndex((x) => (x = hashcode));
|
|
33
33
|
if (existing >= 0) {
|
|
34
34
|
this.trusted.splice(existing, 1);
|
|
35
35
|
return true;
|