diff options
author | fragosti <francesco.agosti93@gmail.com> | 2018-08-08 04:50:56 +0800 |
---|---|---|
committer | fragosti <francesco.agosti93@gmail.com> | 2018-08-08 04:50:56 +0800 |
commit | 57a44291233548da9785aec3cde92171342c9eb3 (patch) | |
tree | 90d19c24a8e07b3ee0b4835c3067dac9aba82617 | |
parent | 3b542bf356f14e7bfd5bbd740d2df55ff64e1309 (diff) | |
download | dexon-0x-contracts-57a44291233548da9785aec3cde92171342c9eb3.tar.gz dexon-0x-contracts-57a44291233548da9785aec3cde92171342c9eb3.tar.zst dexon-0x-contracts-57a44291233548da9785aec3cde92171342c9eb3.zip |
Add discharge config and deploy
-rw-r--r-- | packages/sra-api/.discharge.json | 13 | ||||
-rw-r--r-- | packages/sra-api/README.md | 20 | ||||
-rw-r--r-- | packages/sra-api/package.json | 6 | ||||
-rw-r--r-- | yarn.lock | 155 |
4 files changed, 180 insertions, 14 deletions
diff --git a/packages/sra-api/.discharge.json b/packages/sra-api/.discharge.json new file mode 100644 index 000000000..ddb76d50d --- /dev/null +++ b/packages/sra-api/.discharge.json @@ -0,0 +1,13 @@ +{ + "domain": "sra-api.com", + "build_command": "yarn build-site", + "upload_directory": "public", + "index_key": "index.html", + "error_key": "index.html", + "trailing_slashes": true, + "cache": 3600, + "aws_profile": "default", + "aws_region": "us-east-1", + "cdn": false, + "dns_configured": true +} diff --git a/packages/sra-api/README.md b/packages/sra-api/README.md index 552e37eeb..23eefe7d8 100644 --- a/packages/sra-api/README.md +++ b/packages/sra-api/README.md @@ -4,6 +4,8 @@ Contains the Standard Relayer API [OpenAPI Spec](https://github.com/OAI/OpenAPI- The package distributes both a javascript object version and a json version. +A deployed [ReDoc](https://github.com/Rebilly/ReDoc) static site with the API can be found here http://sra-api.com.s3-website-us-east-1.amazonaws.com/. + ## Usage ``` @@ -21,7 +23,7 @@ yarn install You can start a development server that will serve a [ReDoc](https://github.com/Rebilly/ReDoc) documentation instance. It uses the `api.json` file from `lib/` (you must have built at least once with `yarn build` or `yarn build-json`) that is based on the `api` object exported from `src`. ``` -yarn develop +yarn watch_without_deps ``` The process will watch for changes, but will not hot-reload so you must refresh the page to see the changes. @@ -60,6 +62,22 @@ Or continuously rebuild on change: PKG=@0xproject/sra-api yarn watch ``` +### Static Site + +We also [host a static HTML version of the docs on S3](http://sra-api.com.s3-website-us-east-1.amazonaws.com/) for easy sharing. + +To build the website run + +``` +yarn build-site +``` + +To build and deploy the site run + +``` +yarn deploy-site +``` + ### Clean ```bash diff --git a/packages/sra-api/package.json b/packages/sra-api/package.json index b7bcd588b..4e0fb1637 100644 --- a/packages/sra-api/package.json +++ b/packages/sra-api/package.json @@ -19,9 +19,10 @@ "run_mocha": "mocha lib/test/**/*_test.js --exit", "clean": "shx rm -rf lib", "build": "tsc && yarn build-json", - "build-site": "yarn build-json && redoc-cli bundle lib/api.json --output public/index.html", + "build-site": "yarn build && redoc-cli bundle lib/api.json --output public/index.html", "build-json": "ts-node scripts/buildJson.ts", - "build-json:watch": "chokidar 'src/**/*' -c 'yarn build-json' " + "build-json:watch": "chokidar 'src/**/*' -c 'yarn build-json' ", + "deploy-site": "discharge deploy" }, "repository": { "type": "git", @@ -44,6 +45,7 @@ "chai": "^4.0.1", "chokidar-cli": "^1.2.0", "dirty-chai": "^2.0.1", + "discharge": "^0.7.1", "mocha": "^4.0.1", "npm-run-all": "^4.1.3", "nyc": "^11.0.1", @@ -1741,6 +1741,20 @@ awesome-typescript-loader@^3.1.3: mkdirp "^0.5.1" source-map-support "^0.5.3" +aws-sdk@^2.127.0: + version "2.288.0" + resolved "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.288.0.tgz#9665f4a908cb2048bc1af6e0ef5084c5bf96a6c8" + dependencies: + buffer "4.9.1" + events "1.1.1" + ieee754 "1.1.8" + jmespath "0.15.0" + querystring "0.2.0" + sax "1.2.1" + url "0.10.3" + uuid "3.1.0" + xml2js "0.4.19" + aws-sign2@~0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.6.0.tgz#14342dd38dbcc94d0e5b87d763cd63612c0e794f" @@ -2875,19 +2889,19 @@ buffer-xor@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" -buffer@^3.0.1: - version "3.6.0" - resolved "https://registry.yarnpkg.com/buffer/-/buffer-3.6.0.tgz#a72c936f77b96bf52f5f7e7b467180628551defb" +buffer@4.9.1, buffer@^4.3.0, buffer@^4.9.0: + version "4.9.1" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-4.9.1.tgz#6d1bb601b07a4efced97094132093027c95bc298" dependencies: - base64-js "0.0.8" + base64-js "^1.0.2" ieee754 "^1.1.4" isarray "^1.0.0" -buffer@^4.3.0, buffer@^4.9.0: - version "4.9.1" - resolved "https://registry.yarnpkg.com/buffer/-/buffer-4.9.1.tgz#6d1bb601b07a4efced97094132093027c95bc298" +buffer@^3.0.1: + version "3.6.0" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-3.6.0.tgz#a72c936f77b96bf52f5f7e7b467180628551defb" dependencies: - base64-js "^1.0.2" + base64-js "0.0.8" ieee754 "^1.1.4" isarray "^1.0.0" @@ -4444,6 +4458,23 @@ dirty-chai@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/dirty-chai/-/dirty-chai-2.0.1.tgz#6b2162ef17f7943589da840abc96e75bda01aff3" +discharge@^0.7.1: + version "0.7.1" + resolved "https://registry.npmjs.org/discharge/-/discharge-0.7.1.tgz#9067f5b79b1123a565b5aa6f0cacc7305b7e22af" + dependencies: + aws-sdk "^2.127.0" + execa "^0.9.0" + glob "^7.1.2" + inquirer "^3.3.0" + listr "^0.12.0" + lodash.differenceby "^4.8.0" + lodash.intersectionby "^4.7.0" + lodash.intersectionwith "^4.4.0" + log-symbols "^2.2.0" + meow "^3.7.0" + mime "^2.0.3" + update-notifier "^2.3.0" + dns-equal@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/dns-equal/-/dns-equal-1.0.0.tgz#b39e7f1da6eb0a75ba9c17324b34753c47e0654d" @@ -5296,7 +5327,7 @@ eventemitter3@^3.0.0: version "3.1.0" resolved "https://registry.npmjs.org/eventemitter3/-/eventemitter3-3.1.0.tgz#090b4d6cdbd645ed10bf750d4b5407942d7ba163" -events@^1.0.0: +events@1.1.1, events@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/events/-/events-1.1.1.tgz#9ebdb7635ad099c70dcc4c2a1f5004288e8bd924" @@ -5341,6 +5372,18 @@ execa@^0.7.0: signal-exit "^3.0.0" strip-eof "^1.0.0" +execa@^0.9.0: + version "0.9.0" + resolved "https://registry.npmjs.org/execa/-/execa-0.9.0.tgz#adb7ce62cf985071f60580deb4a88b9e34712d01" + dependencies: + cross-spawn "^5.0.1" + get-stream "^3.0.0" + is-stream "^1.1.0" + npm-run-path "^2.0.0" + p-finally "^1.0.0" + signal-exit "^3.0.0" + strip-eof "^1.0.0" + exenv@^1.2.1: version "1.2.2" resolved "https://registry.yarnpkg.com/exenv/-/exenv-1.2.2.tgz#2ae78e85d9894158670b03d47bec1f03bd91bb9d" @@ -6855,6 +6898,10 @@ icss-utils@^2.1.0: dependencies: postcss "^6.0.1" +ieee754@1.1.8: + version "1.1.8" + resolved "https://registry.npmjs.org/ieee754/-/ieee754-1.1.8.tgz#be33d40ac10ef1926701f6f08a2d86fbfd1ad3e4" + ieee754@^1.1.4: version "1.1.11" resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.11.tgz#c16384ffe00f5b7835824e67b6f2bd44a5229455" @@ -6993,7 +7040,7 @@ inquirer@^0.8.2: rx "^2.4.3" through "^2.3.6" -inquirer@^3.0.6: +inquirer@^3.0.6, inquirer@^3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-3.3.0.tgz#9dd2f2ad765dcab1ff0443b491442a20ba227dc9" dependencies: @@ -7573,6 +7620,10 @@ isurl@^1.0.0-alpha5: has-to-string-tag-x "^1.2.0" is-object "^1.0.1" +jmespath@0.15.0: + version "0.15.0" + resolved "https://registry.npmjs.org/jmespath/-/jmespath-0.15.0.tgz#a3f222a9aae9f966f5d27c796510e28091764217" + js-base64@^2.1.9: version "2.4.3" resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.4.3.tgz#2e545ec2b0f2957f41356510205214e98fad6582" @@ -8015,6 +8066,19 @@ listr-silent-renderer@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/listr-silent-renderer/-/listr-silent-renderer-1.1.1.tgz#924b5a3757153770bf1a8e3fbf74b8bbf3f9242e" +listr-update-renderer@^0.2.0: + version "0.2.0" + resolved "https://registry.npmjs.org/listr-update-renderer/-/listr-update-renderer-0.2.0.tgz#ca80e1779b4e70266807e8eed1ad6abe398550f9" + dependencies: + chalk "^1.1.3" + cli-truncate "^0.2.1" + elegant-spinner "^1.0.1" + figures "^1.7.0" + indent-string "^3.0.0" + log-symbols "^1.0.2" + log-update "^1.0.2" + strip-ansi "^3.0.1" + listr-update-renderer@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/listr-update-renderer/-/listr-update-renderer-0.4.0.tgz#344d980da2ca2e8b145ba305908f32ae3f4cc8a7" @@ -8037,6 +8101,27 @@ listr-verbose-renderer@^0.4.0: date-fns "^1.27.2" figures "^1.7.0" +listr@^0.12.0: + version "0.12.0" + resolved "https://registry.npmjs.org/listr/-/listr-0.12.0.tgz#6bce2c0f5603fa49580ea17cd6a00cc0e5fa451a" + dependencies: + chalk "^1.1.3" + cli-truncate "^0.2.1" + figures "^1.7.0" + indent-string "^2.1.0" + is-promise "^2.1.0" + is-stream "^1.1.0" + listr-silent-renderer "^1.1.1" + listr-update-renderer "^0.2.0" + listr-verbose-renderer "^0.4.0" + log-symbols "^1.0.2" + log-update "^1.0.2" + ora "^0.2.3" + p-map "^1.1.1" + rxjs "^5.0.0-beta.11" + stream-to-observable "^0.1.0" + strip-ansi "^3.0.1" + listr@^0.13.0: version "0.13.0" resolved "https://registry.yarnpkg.com/listr/-/listr-0.13.0.tgz#20bb0ba30bae660ee84cc0503df4be3d5623887d" @@ -8198,6 +8283,10 @@ lodash.deburr@^3.0.0: dependencies: lodash._root "^3.0.0" +lodash.differenceby@^4.8.0: + version "4.8.0" + resolved "https://registry.npmjs.org/lodash.differenceby/-/lodash.differenceby-4.8.0.tgz#cfd59e94353af5de51da5d302ca4ebff33faac57" + lodash.escape@^3.0.0: version "3.2.0" resolved "https://registry.yarnpkg.com/lodash.escape/-/lodash.escape-3.2.0.tgz#995ee0dc18c1b48cc92effae71a10aab5b487698" @@ -8220,6 +8309,14 @@ lodash.get@^4.4.2: version "4.4.2" resolved "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99" +lodash.intersectionby@^4.7.0: + version "4.7.0" + resolved "https://registry.npmjs.org/lodash.intersectionby/-/lodash.intersectionby-4.7.0.tgz#12f125e4da00b22290febda1b6c1b68bb9255125" + +lodash.intersectionwith@^4.4.0: + version "4.4.0" + resolved "https://registry.npmjs.org/lodash.intersectionwith/-/lodash.intersectionwith-4.4.0.tgz#818949e293052ba7fc73a440f6114c2c81c38e1c" + lodash.isarguments@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz#2f573d85c6a24289ff00663b491c1d338ff3458a" @@ -8732,6 +8829,10 @@ mime@^1.2.11, mime@^1.3.4, mime@^1.5.0: version "1.6.0" resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" +mime@^2.0.3: + version "2.3.1" + resolved "https://registry.npmjs.org/mime/-/mime-2.3.1.tgz#b1621c54d63b97c47d3cfe7f7215f7d64517c369" + mimic-fn@^1.0.0: version "1.2.0" resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022" @@ -11767,6 +11868,12 @@ rx@^2.4.3: version "2.5.3" resolved "https://registry.yarnpkg.com/rx/-/rx-2.5.3.tgz#21adc7d80f02002af50dae97fd9dbf248755f566" +rxjs@^5.0.0-beta.11: + version "5.5.11" + resolved "https://registry.npmjs.org/rxjs/-/rxjs-5.5.11.tgz#f733027ca43e3bec6b994473be4ab98ad43ced87" + dependencies: + symbol-observable "1.0.1" + rxjs@^5.4.2, rxjs@^5.5.2: version "5.5.10" resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-5.5.10.tgz#fde02d7a614f6c8683d0d1957827f492e09db045" @@ -11804,7 +11911,11 @@ sanitize-html@1.15.0: srcset "^1.0.0" xtend "^4.0.0" -sax@^1.2.4, sax@~1.2.1: +sax@1.2.1: + version "1.2.1" + resolved "https://registry.npmjs.org/sax/-/sax-1.2.1.tgz#7b8e656190b228e81a66aea748480d828cd2d37a" + +sax@>=0.6.0, sax@^1.2.4, sax@~1.2.1: version "1.2.4" resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" @@ -12584,6 +12695,10 @@ stream-shift@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.0.tgz#d5c752825e5367e786f78e18e445ea223a155952" +stream-to-observable@^0.1.0: + version "0.1.0" + resolved "https://registry.npmjs.org/stream-to-observable/-/stream-to-observable-0.1.0.tgz#45bf1d9f2d7dc09bed81f1c307c430e68b84cffe" + stream-to-observable@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/stream-to-observable/-/stream-to-observable-0.2.0.tgz#59d6ea393d87c2c0ddac10aa0d561bc6ba6f0e10" @@ -13781,6 +13896,13 @@ url-to-options@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/url-to-options/-/url-to-options-1.0.1.tgz#1505a03a289a48cbd7a434efbaeec5055f5633a9" +url@0.10.3: + version "0.10.3" + resolved "https://registry.npmjs.org/url/-/url-0.10.3.tgz#021e4d9c7705f21bbf37d03ceb58767402774c64" + dependencies: + punycode "1.3.2" + querystring "0.2.0" + url@^0.11.0: version "0.11.0" resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1" @@ -14741,10 +14863,21 @@ xml-js@^1.6.4: dependencies: sax "^1.2.4" +xml2js@0.4.19: + version "0.4.19" + resolved "https://registry.npmjs.org/xml2js/-/xml2js-0.4.19.tgz#686c20f213209e94abf0d1bcf1efaa291c7827a7" + dependencies: + sax ">=0.6.0" + xmlbuilder "~9.0.1" + xmlbuilder@9.0.4: version "9.0.4" resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-9.0.4.tgz#519cb4ca686d005a8420d3496f3f0caeecca580f" +xmlbuilder@~9.0.1: + version "9.0.7" + resolved "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz#132ee63d2ec5565c557e20f4c22df9aca686b10d" + xmlhttprequest@*, xmlhttprequest@1.8.0: version "1.8.0" resolved "https://registry.yarnpkg.com/xmlhttprequest/-/xmlhttprequest-1.8.0.tgz#67fe075c5c24fef39f9d65f5f7b7fe75171968fc" |