@peerbit/server 5.2.3-bf22247 → 5.2.3-c5744ae
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/cli.d.ts.map +1 -1
- package/dist/src/cli.js +0 -18
- package/dist/src/cli.js.map +1 -1
- package/dist/src/client.d.ts +0 -2
- package/dist/src/client.d.ts.map +1 -1
- package/dist/src/client.js +9 -24
- package/dist/src/client.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui/assets/index-DfjdQIsv.js +66 -0
- package/dist/ui/index.html +1 -1
- package/package.json +4 -4
- package/src/cli.ts +0 -18
- package/src/client.ts +21 -44
- package/dist/ui/assets/index-C2EeKc-J.js +0 -66
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-DfjdQIsv.js"></script>
|
|
27
27
|
<link rel="stylesheet" crossorigin href="/assets/index-CIfVvUo9.css">
|
|
28
28
|
</head>
|
|
29
29
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@peerbit/server",
|
|
3
|
-
"version": "5.2.3-
|
|
3
|
+
"version": "5.2.3-c5744ae",
|
|
4
4
|
"author": "dao.xyz",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -66,8 +66,8 @@
|
|
|
66
66
|
"lint": "aegir lint"
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
|
-
"@peerbit/test-lib": "0.0.1-
|
|
70
|
-
"@peerbit/test-utils": "2.1.42-
|
|
69
|
+
"@peerbit/test-lib": "0.0.1-c5744ae",
|
|
70
|
+
"@peerbit/test-utils": "2.1.42-c5744ae",
|
|
71
71
|
"@types/yargs": "17.0.24",
|
|
72
72
|
"aws-sdk": "^2.1259.0",
|
|
73
73
|
"dotenv": "^16.1.4",
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"dependencies": {
|
|
79
79
|
"axios": "^1.4.0",
|
|
80
80
|
"chalk": "^5.3.0",
|
|
81
|
-
"peerbit": "4.1.32-
|
|
81
|
+
"peerbit": "4.1.32-c5744ae",
|
|
82
82
|
"yargs": "^17.7.2",
|
|
83
83
|
"tar-stream": "^3.1.7",
|
|
84
84
|
"tmp": "^0.2.1",
|
package/src/cli.ts
CHANGED
|
@@ -956,15 +956,6 @@ export const cli = async (args?: string[]) => {
|
|
|
956
956
|
}
|
|
957
957
|
},
|
|
958
958
|
})
|
|
959
|
-
.command({
|
|
960
|
-
command: "drop-all",
|
|
961
|
-
describe: "Drop all programs",
|
|
962
|
-
handler: async () => {
|
|
963
|
-
for (const api of apis) {
|
|
964
|
-
await api.api.program.dropAll();
|
|
965
|
-
}
|
|
966
|
-
},
|
|
967
|
-
})
|
|
968
959
|
.command({
|
|
969
960
|
command: "close <address>",
|
|
970
961
|
describe: "Close a program",
|
|
@@ -983,15 +974,6 @@ export const cli = async (args?: string[]) => {
|
|
|
983
974
|
}
|
|
984
975
|
},
|
|
985
976
|
})
|
|
986
|
-
.command({
|
|
987
|
-
command: "close-all",
|
|
988
|
-
describe: "Close all programs",
|
|
989
|
-
handler: async () => {
|
|
990
|
-
for (const api of apis) {
|
|
991
|
-
await api.api.program.closeAll();
|
|
992
|
-
}
|
|
993
|
-
},
|
|
994
|
-
})
|
|
995
977
|
.command({
|
|
996
978
|
command: "list",
|
|
997
979
|
describe: "List all running programs",
|
package/src/client.ts
CHANGED
|
@@ -87,32 +87,6 @@ export const createClient = async (
|
|
|
87
87
|
}),
|
|
88
88
|
).data;
|
|
89
89
|
|
|
90
|
-
const close = async (address: string) => {
|
|
91
|
-
return throwIfNot200(
|
|
92
|
-
await axiosInstance.delete(
|
|
93
|
-
endpoint + PROGRAM_PATH + "/" + encodeURIComponent(address.toString()),
|
|
94
|
-
{
|
|
95
|
-
validateStatus,
|
|
96
|
-
},
|
|
97
|
-
),
|
|
98
|
-
);
|
|
99
|
-
};
|
|
100
|
-
|
|
101
|
-
const drop = async (address: string) => {
|
|
102
|
-
return throwIfNot200(
|
|
103
|
-
await axiosInstance.delete(
|
|
104
|
-
endpoint +
|
|
105
|
-
PROGRAM_PATH +
|
|
106
|
-
"/" +
|
|
107
|
-
encodeURIComponent(address.toString()) +
|
|
108
|
-
"?delete=true",
|
|
109
|
-
{
|
|
110
|
-
validateStatus,
|
|
111
|
-
},
|
|
112
|
-
),
|
|
113
|
-
);
|
|
114
|
-
};
|
|
115
|
-
|
|
116
90
|
return {
|
|
117
91
|
peer: {
|
|
118
92
|
id: {
|
|
@@ -199,29 +173,32 @@ export const createClient = async (
|
|
|
199
173
|
},
|
|
200
174
|
|
|
201
175
|
close: async (address: string): Promise<void> => {
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
176
|
+
throwIfNot200(
|
|
177
|
+
await axiosInstance.delete(
|
|
178
|
+
endpoint +
|
|
179
|
+
PROGRAM_PATH +
|
|
180
|
+
"/" +
|
|
181
|
+
encodeURIComponent(address.toString()),
|
|
182
|
+
{
|
|
183
|
+
validateStatus,
|
|
184
|
+
},
|
|
185
|
+
),
|
|
210
186
|
);
|
|
211
|
-
await Promise.all(resp.data.map((address: string) => close(address)));
|
|
212
187
|
},
|
|
213
188
|
|
|
214
189
|
drop: async (address: string): Promise<void> => {
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
190
|
+
throwIfNot200(
|
|
191
|
+
await axiosInstance.delete(
|
|
192
|
+
endpoint +
|
|
193
|
+
PROGRAM_PATH +
|
|
194
|
+
"/" +
|
|
195
|
+
encodeURIComponent(address.toString()) +
|
|
196
|
+
"?delete=true",
|
|
197
|
+
{
|
|
198
|
+
validateStatus,
|
|
199
|
+
},
|
|
200
|
+
),
|
|
223
201
|
);
|
|
224
|
-
await Promise.all(resp.data.map((address: string) => drop(address)));
|
|
225
202
|
},
|
|
226
203
|
|
|
227
204
|
list: async (): Promise<string[]> => {
|