Skip to content

Commit

Permalink
fix(wallet): copy HTML directly
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelfig committed Nov 2, 2019
1 parent 4038b2a commit dadfac8
Show file tree
Hide file tree
Showing 15 changed files with 106 additions and 5 deletions.
4 changes: 0 additions & 4 deletions lib/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,6 @@ export default async function installMain(progname, rawArgs, priv) {

if (!goCmd) {
console.log(chalk.bold.yellow(`To run Agoric locally you will need to install Go 1.12+ and rerun '${progname} install'`));
} else {
// FIXME: Build the wallet
await pspawn(pm, ['install'], { cwd: '.agservers/node_modules/@agoric/wallet-frontend' });
await pspawn(pm, ['run', 'build'], { cwd: '.agservers/node_modules/@agoric/wallet-frontend' });
}
console.log(chalk.bold.green('Done installing'));
}
2 changes: 1 addition & 1 deletion lib/start.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export default async function startMain(progname, rawArgs, priv) {
const htmlWallet = '.agservers/solo/html/wallet';
await Promise.all([fs.unlink(dappHtml).catch(() => {}), fs.unlink(htmlWallet).catch(() => {})]);
await Promise.all([fs.symlink('../../ui/build', dappHtml).catch(() => {}),
fs.symlink('../../node_modules/@agoric/wallet-frontend/build', htmlWallet).catch(() => {})]);
fs.symlink('../../../.agwallet', htmlWallet).catch(() => {})]);

await pspawn(`../${css}/bin/ag-solo`, ['start', '--role=three_client'], {
stdio: 'inherit',
Expand Down
18 changes: 18 additions & 0 deletions template/.agwallet/asset-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"files": {
"main.js": "./static/js/main.9cdb7e7e.chunk.js",
"main.js.map": "./static/js/main.9cdb7e7e.chunk.js.map",
"runtime-main.js": "./static/js/runtime-main.56b11e8e.js",
"runtime-main.js.map": "./static/js/runtime-main.56b11e8e.js.map",
"static/js/2.66b31cef.chunk.js": "./static/js/2.66b31cef.chunk.js",
"static/js/2.66b31cef.chunk.js.map": "./static/js/2.66b31cef.chunk.js.map",
"index.html": "./index.html",
"precache-manifest.dde2e211cc682b362e23c384f8bf7e32.js": "./precache-manifest.dde2e211cc682b362e23c384f8bf7e32.js",
"service-worker.js": "./service-worker.js"
},
"entrypoints": [
"static/js/runtime-main.56b11e8e.js",
"static/js/2.66b31cef.chunk.js",
"static/js/main.9cdb7e7e.chunk.js"
]
}
5 changes: 5 additions & 0 deletions template/.agwallet/assets/wallet-24px.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added template/.agwallet/favicon.ico
Binary file not shown.
1 change: 1 addition & 0 deletions template/.agwallet/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="shortcut icon" href="./favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><link rel="manifest" href="./manifest.json"/><link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap"/><title>Simple Wallet</title></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script>!function(f){function e(e){for(var r,t,n=e[0],o=e[1],u=e[2],l=0,a=[];l<n.length;l++)t=n[l],Object.prototype.hasOwnProperty.call(c,t)&&c[t]&&a.push(c[t][0]),c[t]=0;for(r in o)Object.prototype.hasOwnProperty.call(o,r)&&(f[r]=o[r]);for(s&&s(e);a.length;)a.shift()();return p.push.apply(p,u||[]),i()}function i(){for(var e,r=0;r<p.length;r++){for(var t=p[r],n=!0,o=1;o<t.length;o++){var u=t[o];0!==c[u]&&(n=!1)}n&&(p.splice(r--,1),e=l(l.s=t[0]))}return e}var t={},c={1:0},p=[];function l(e){if(t[e])return t[e].exports;var r=t[e]={i:e,l:!1,exports:{}};return f[e].call(r.exports,r,r.exports,l),r.l=!0,r.exports}l.m=f,l.c=t,l.d=function(e,r,t){l.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},l.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.t=function(r,e){if(1&e&&(r=l(r)),8&e)return r;if(4&e&&"object"==typeof r&&r&&r.__esModule)return r;var t=Object.create(null);if(l.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:r}),2&e&&"string"!=typeof r)for(var n in r)l.d(t,n,function(e){return r[e]}.bind(null,n));return t},l.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return l.d(r,"a",r),r},l.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},l.p="./";var r=this["webpackJsonp@agoric/wallet-frontend"]=this["webpackJsonp@agoric/wallet-frontend"]||[],n=r.push.bind(r);r.push=e,r=r.slice();for(var o=0;o<r.length;o++)e(r[o]);var s=n;i()}([])</script><script src="./static/js/2.66b31cef.chunk.js"></script><script src="./static/js/main.9cdb7e7e.chunk.js"></script></body></html>
15 changes: 15 additions & 0 deletions template/.agwallet/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"short_name": "Wallet",
"name": "Simple Wallet",
"icons": [
{
"src": "favicon.ico",
"sizes": "48x48 32x32 16x16",
"type": "image/x-icon"
}
],
"start_url": ".",
"display": "standalone",
"theme_color": "#000000",
"background_color": "#ffffff"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
self.__precacheManifest = (self.__precacheManifest || []).concat([
{
"revision": "9d5f98b43bf917384d9f0fd5b9d7c473",
"url": "./index.html"
},
{
"revision": "5c43fae301fa57a471cc",
"url": "./static/js/2.66b31cef.chunk.js"
},
{
"revision": "4273112fd267f0f6b3bb",
"url": "./static/js/main.9cdb7e7e.chunk.js"
},
{
"revision": "d876e33b40a9187281f5",
"url": "./static/js/runtime-main.56b11e8e.js"
}
]);
39 changes: 39 additions & 0 deletions template/.agwallet/service-worker.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/**
* Welcome to your Workbox-powered service worker!
*
* You'll need to register this file in your web app and you should
* disable HTTP caching for this file too.
* See https://goo.gl/nhQhGp
*
* The rest of the code is auto-generated. Please don't update this file
* directly; instead, make changes to your Workbox build configuration
* and re-run your build process.
* See https://goo.gl/2aRDsh
*/

importScripts("https://storage.googleapis.com/workbox-cdn/releases/4.3.1/workbox-sw.js");

importScripts(
"./precache-manifest.dde2e211cc682b362e23c384f8bf7e32.js"
);

self.addEventListener('message', (event) => {
if (event.data && event.data.type === 'SKIP_WAITING') {
self.skipWaiting();
}
});

workbox.core.clientsClaim();

/**
* The workboxSW.precacheAndRoute() method efficiently caches and responds to
* requests for URLs in the manifest.
* See https://goo.gl/S9QRab
*/
self.__precacheManifest = [].concat(self.__precacheManifest || []);
workbox.precaching.precacheAndRoute(self.__precacheManifest, {});

workbox.routing.registerNavigationRoute(workbox.precaching.getCacheKeyForURL("./index.html"), {

blacklist: [/^\/_/,/\/[^/?]+\.[^/]+$/],
});
2 changes: 2 additions & 0 deletions template/.agwallet/static/js/2.66b31cef.chunk.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions template/.agwallet/static/js/2.66b31cef.chunk.js.map

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions template/.agwallet/static/js/main.9cdb7e7e.chunk.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions template/.agwallet/static/js/main.9cdb7e7e.chunk.js.map

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions template/.agwallet/static/js/runtime-main.56b11e8e.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit dadfac8

Please sign in to comment.