@agoric/solo 0.10.4-dev-28931a7.0 → 0.10.4-dev-e26232e.0
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/package.json +17 -17
- package/src/web.js +14 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agoric/solo",
|
|
3
|
-
"version": "0.10.4-dev-
|
|
3
|
+
"version": "0.10.4-dev-e26232e.0+e26232e",
|
|
4
4
|
"description": "Agoric's Solo vat runner",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -22,20 +22,20 @@
|
|
|
22
22
|
"author": "Agoric",
|
|
23
23
|
"license": "Apache-2.0",
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@agoric/access-token": "0.4.22-dev-
|
|
26
|
-
"@agoric/assert": "0.6.1-dev-
|
|
27
|
-
"@agoric/cache": "0.3.3-dev-
|
|
28
|
-
"@agoric/cosmic-swingset": "0.41.4-dev-
|
|
29
|
-
"@agoric/internal": "0.3.3-dev-
|
|
30
|
-
"@agoric/notifier": "0.6.3-dev-
|
|
31
|
-
"@agoric/spawner": "0.6.9-dev-
|
|
32
|
-
"@agoric/store": "0.9.3-dev-
|
|
33
|
-
"@agoric/swing-store": "0.9.2-dev-
|
|
34
|
-
"@agoric/swingset-vat": "0.32.3-dev-
|
|
35
|
-
"@agoric/telemetry": "0.6.3-dev-
|
|
36
|
-
"@agoric/time": "0.3.3-dev-
|
|
37
|
-
"@agoric/vats": "0.15.2-dev-
|
|
38
|
-
"@agoric/wallet": "0.18.4-dev-
|
|
25
|
+
"@agoric/access-token": "0.4.22-dev-e26232e.0+e26232e",
|
|
26
|
+
"@agoric/assert": "0.6.1-dev-e26232e.0+e26232e",
|
|
27
|
+
"@agoric/cache": "0.3.3-dev-e26232e.0+e26232e",
|
|
28
|
+
"@agoric/cosmic-swingset": "0.41.4-dev-e26232e.0+e26232e",
|
|
29
|
+
"@agoric/internal": "0.3.3-dev-e26232e.0+e26232e",
|
|
30
|
+
"@agoric/notifier": "0.6.3-dev-e26232e.0+e26232e",
|
|
31
|
+
"@agoric/spawner": "0.6.9-dev-e26232e.0+e26232e",
|
|
32
|
+
"@agoric/store": "0.9.3-dev-e26232e.0+e26232e",
|
|
33
|
+
"@agoric/swing-store": "0.9.2-dev-e26232e.0+e26232e",
|
|
34
|
+
"@agoric/swingset-vat": "0.32.3-dev-e26232e.0+e26232e",
|
|
35
|
+
"@agoric/telemetry": "0.6.3-dev-e26232e.0+e26232e",
|
|
36
|
+
"@agoric/time": "0.3.3-dev-e26232e.0+e26232e",
|
|
37
|
+
"@agoric/vats": "0.15.2-dev-e26232e.0+e26232e",
|
|
38
|
+
"@agoric/wallet": "0.18.4-dev-e26232e.0+e26232e",
|
|
39
39
|
"@endo/captp": "^3.1.4",
|
|
40
40
|
"@endo/eventual-send": "^0.17.5",
|
|
41
41
|
"@endo/import-bundle": "^0.4.1",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"ws": "^7.2.0"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
|
-
"@agoric/ertp": "0.16.3-dev-
|
|
59
|
+
"@agoric/ertp": "0.16.3-dev-e26232e.0+e26232e",
|
|
60
60
|
"@endo/bundle-source": "^2.7.0",
|
|
61
61
|
"ava": "^5.3.0",
|
|
62
62
|
"c8": "^7.13.0"
|
|
@@ -80,5 +80,5 @@
|
|
|
80
80
|
"typeCoverage": {
|
|
81
81
|
"atLeast": 68.59
|
|
82
82
|
},
|
|
83
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "e26232e68e2019db07078ae4962de47b3d0a6666"
|
|
84
84
|
}
|
package/src/web.js
CHANGED
|
@@ -9,6 +9,7 @@ import { createProxyMiddleware } from 'http-proxy-middleware';
|
|
|
9
9
|
import WebSocket from 'ws';
|
|
10
10
|
import anylogger from 'anylogger';
|
|
11
11
|
import morgan from 'morgan';
|
|
12
|
+
import { format as urlFormat } from 'url';
|
|
12
13
|
|
|
13
14
|
import { getAccessToken } from '@agoric/access-token';
|
|
14
15
|
|
|
@@ -148,21 +149,29 @@ export async function makeHTTPListener(
|
|
|
148
149
|
const htmldir = path.join(basedir, 'html');
|
|
149
150
|
log(`Serving static files from ${htmldir}`);
|
|
150
151
|
app.use(express.static(htmldir));
|
|
151
|
-
|
|
152
|
+
const soloHtmlDir = new URL('../public', import.meta.url).pathname;
|
|
153
|
+
app.use(express.static(soloHtmlDir));
|
|
152
154
|
|
|
153
155
|
if (walletHtmlDir && !bridgeTarget) {
|
|
154
|
-
//
|
|
156
|
+
// Guide all callers to /wallet/bridge.html
|
|
155
157
|
if (existsSync(path.join(walletHtmlDir, 'bridge.html'))) {
|
|
156
|
-
console.log('redirecting wallet bridge');
|
|
158
|
+
console.log('redirecting /wallet-bridge.html to /wallet/bridge.html');
|
|
157
159
|
app.get('/wallet-bridge.html', (req, res) =>
|
|
158
|
-
res.redirect(
|
|
160
|
+
res.redirect(
|
|
161
|
+
urlFormat({ pathname: '/wallet/bridge.html', query: req.query }),
|
|
162
|
+
),
|
|
163
|
+
);
|
|
164
|
+
} else {
|
|
165
|
+
console.log('serving /wallet/bridge.html from solo wallet-bridge.html');
|
|
166
|
+
app.get('/wallet/bridge.html', (_, res) =>
|
|
167
|
+
res.sendFile(path.resolve(soloHtmlDir, 'wallet-bridge.html')),
|
|
159
168
|
);
|
|
160
169
|
}
|
|
161
170
|
|
|
162
171
|
// Serve the wallet directory.
|
|
163
172
|
app.use('/wallet', express.static(walletHtmlDir));
|
|
164
173
|
|
|
165
|
-
// Default GETs to /wallet/index.html for history routing.
|
|
174
|
+
// Default non-bridge GETs to /wallet/index.html for history routing.
|
|
166
175
|
app.get('/wallet/*', (_, res) =>
|
|
167
176
|
res.sendFile(path.resolve(walletHtmlDir, 'index.html')),
|
|
168
177
|
);
|