├── .gitignore
├── .jsbeautifyrc
├── Cargo.lock
├── Cargo.toml
├── LICENSE-APACHE
├── LICENSE-MIT
├── README.md
├── build.ps1
├── build.sh
├── index.html
├── main.js
├── main_module.js
├── package-lock.json
├── package.json
├── preload.js
├── src
└── lib.rs
└── style.css
/.gitignore:
--------------------------------------------------------------------------------
1 | /node_modules/
2 | /wasm/
3 | /target/
4 |
--------------------------------------------------------------------------------
/.jsbeautifyrc:
--------------------------------------------------------------------------------
1 | {
2 | "indent_with_tabs": true,
3 | "wrap_line_length": 80
4 | }
5 |
--------------------------------------------------------------------------------
/Cargo.lock:
--------------------------------------------------------------------------------
1 | # This file is automatically @generated by Cargo.
2 | # It is not intended for manual editing.
3 | [[package]]
4 | name = "backtrace"
5 | version = "0.3.32"
6 | source = "registry+https://github.com/rust-lang/crates.io-index"
7 | dependencies = [
8 | "backtrace-sys 0.1.30 (registry+https://github.com/rust-lang/crates.io-index)",
9 | "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
10 | "libc 0.2.59 (registry+https://github.com/rust-lang/crates.io-index)",
11 | "rustc-demangle 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)",
12 | ]
13 |
14 | [[package]]
15 | name = "backtrace-sys"
16 | version = "0.1.30"
17 | source = "registry+https://github.com/rust-lang/crates.io-index"
18 | dependencies = [
19 | "cc 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)",
20 | "libc 0.2.59 (registry+https://github.com/rust-lang/crates.io-index)",
21 | ]
22 |
23 | [[package]]
24 | name = "bumpalo"
25 | version = "2.5.0"
26 | source = "registry+https://github.com/rust-lang/crates.io-index"
27 |
28 | [[package]]
29 | name = "cc"
30 | version = "1.0.37"
31 | source = "registry+https://github.com/rust-lang/crates.io-index"
32 |
33 | [[package]]
34 | name = "cfg-if"
35 | version = "0.1.9"
36 | source = "registry+https://github.com/rust-lang/crates.io-index"
37 |
38 | [[package]]
39 | name = "failure"
40 | version = "0.1.5"
41 | source = "registry+https://github.com/rust-lang/crates.io-index"
42 | dependencies = [
43 | "backtrace 0.3.32 (registry+https://github.com/rust-lang/crates.io-index)",
44 | "failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
45 | ]
46 |
47 | [[package]]
48 | name = "failure_derive"
49 | version = "0.1.5"
50 | source = "registry+https://github.com/rust-lang/crates.io-index"
51 | dependencies = [
52 | "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)",
53 | "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)",
54 | "syn 0.15.39 (registry+https://github.com/rust-lang/crates.io-index)",
55 | "synstructure 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)",
56 | ]
57 |
58 | [[package]]
59 | name = "heck"
60 | version = "0.3.1"
61 | source = "registry+https://github.com/rust-lang/crates.io-index"
62 | dependencies = [
63 | "unicode-segmentation 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
64 | ]
65 |
66 | [[package]]
67 | name = "js-sys"
68 | version = "0.3.24"
69 | source = "registry+https://github.com/rust-lang/crates.io-index"
70 | dependencies = [
71 | "wasm-bindgen 0.2.47 (registry+https://github.com/rust-lang/crates.io-index)",
72 | ]
73 |
74 | [[package]]
75 | name = "lazy_static"
76 | version = "1.3.0"
77 | source = "registry+https://github.com/rust-lang/crates.io-index"
78 |
79 | [[package]]
80 | name = "libc"
81 | version = "0.2.59"
82 | source = "registry+https://github.com/rust-lang/crates.io-index"
83 |
84 | [[package]]
85 | name = "log"
86 | version = "0.4.6"
87 | source = "registry+https://github.com/rust-lang/crates.io-index"
88 | dependencies = [
89 | "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
90 | ]
91 |
92 | [[package]]
93 | name = "memchr"
94 | version = "2.2.1"
95 | source = "registry+https://github.com/rust-lang/crates.io-index"
96 |
97 | [[package]]
98 | name = "nom"
99 | version = "4.2.3"
100 | source = "registry+https://github.com/rust-lang/crates.io-index"
101 | dependencies = [
102 | "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
103 | "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
104 | ]
105 |
106 | [[package]]
107 | name = "proc-macro2"
108 | version = "0.4.30"
109 | source = "registry+https://github.com/rust-lang/crates.io-index"
110 | dependencies = [
111 | "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
112 | ]
113 |
114 | [[package]]
115 | name = "quote"
116 | version = "0.6.12"
117 | source = "registry+https://github.com/rust-lang/crates.io-index"
118 | dependencies = [
119 | "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)",
120 | ]
121 |
122 | [[package]]
123 | name = "rustc-demangle"
124 | version = "0.1.15"
125 | source = "registry+https://github.com/rust-lang/crates.io-index"
126 |
127 | [[package]]
128 | name = "sourcefile"
129 | version = "0.1.4"
130 | source = "registry+https://github.com/rust-lang/crates.io-index"
131 |
132 | [[package]]
133 | name = "syn"
134 | version = "0.15.39"
135 | source = "registry+https://github.com/rust-lang/crates.io-index"
136 | dependencies = [
137 | "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)",
138 | "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)",
139 | "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
140 | ]
141 |
142 | [[package]]
143 | name = "synstructure"
144 | version = "0.10.2"
145 | source = "registry+https://github.com/rust-lang/crates.io-index"
146 | dependencies = [
147 | "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)",
148 | "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)",
149 | "syn 0.15.39 (registry+https://github.com/rust-lang/crates.io-index)",
150 | "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
151 | ]
152 |
153 | [[package]]
154 | name = "unicode-segmentation"
155 | version = "1.3.0"
156 | source = "registry+https://github.com/rust-lang/crates.io-index"
157 |
158 | [[package]]
159 | name = "unicode-xid"
160 | version = "0.1.0"
161 | source = "registry+https://github.com/rust-lang/crates.io-index"
162 |
163 | [[package]]
164 | name = "version_check"
165 | version = "0.1.5"
166 | source = "registry+https://github.com/rust-lang/crates.io-index"
167 |
168 | [[package]]
169 | name = "wasm-bindgen"
170 | version = "0.2.47"
171 | source = "registry+https://github.com/rust-lang/crates.io-index"
172 | dependencies = [
173 | "wasm-bindgen-macro 0.2.47 (registry+https://github.com/rust-lang/crates.io-index)",
174 | ]
175 |
176 | [[package]]
177 | name = "wasm-bindgen-backend"
178 | version = "0.2.47"
179 | source = "registry+https://github.com/rust-lang/crates.io-index"
180 | dependencies = [
181 | "bumpalo 2.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
182 | "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
183 | "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
184 | "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)",
185 | "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)",
186 | "syn 0.15.39 (registry+https://github.com/rust-lang/crates.io-index)",
187 | "wasm-bindgen-shared 0.2.47 (registry+https://github.com/rust-lang/crates.io-index)",
188 | ]
189 |
190 | [[package]]
191 | name = "wasm-bindgen-macro"
192 | version = "0.2.47"
193 | source = "registry+https://github.com/rust-lang/crates.io-index"
194 | dependencies = [
195 | "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)",
196 | "wasm-bindgen-macro-support 0.2.47 (registry+https://github.com/rust-lang/crates.io-index)",
197 | ]
198 |
199 | [[package]]
200 | name = "wasm-bindgen-macro-support"
201 | version = "0.2.47"
202 | source = "registry+https://github.com/rust-lang/crates.io-index"
203 | dependencies = [
204 | "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)",
205 | "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)",
206 | "syn 0.15.39 (registry+https://github.com/rust-lang/crates.io-index)",
207 | "wasm-bindgen-backend 0.2.47 (registry+https://github.com/rust-lang/crates.io-index)",
208 | "wasm-bindgen-shared 0.2.47 (registry+https://github.com/rust-lang/crates.io-index)",
209 | ]
210 |
211 | [[package]]
212 | name = "wasm-bindgen-minimal-example"
213 | version = "0.1.0"
214 | dependencies = [
215 | "wasm-bindgen 0.2.47 (registry+https://github.com/rust-lang/crates.io-index)",
216 | "web-sys 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)",
217 | ]
218 |
219 | [[package]]
220 | name = "wasm-bindgen-shared"
221 | version = "0.2.47"
222 | source = "registry+https://github.com/rust-lang/crates.io-index"
223 |
224 | [[package]]
225 | name = "wasm-bindgen-webidl"
226 | version = "0.2.47"
227 | source = "registry+https://github.com/rust-lang/crates.io-index"
228 | dependencies = [
229 | "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
230 | "heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
231 | "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
232 | "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)",
233 | "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)",
234 | "syn 0.15.39 (registry+https://github.com/rust-lang/crates.io-index)",
235 | "wasm-bindgen-backend 0.2.47 (registry+https://github.com/rust-lang/crates.io-index)",
236 | "weedle 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
237 | ]
238 |
239 | [[package]]
240 | name = "web-sys"
241 | version = "0.3.24"
242 | source = "registry+https://github.com/rust-lang/crates.io-index"
243 | dependencies = [
244 | "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
245 | "js-sys 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)",
246 | "sourcefile 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
247 | "wasm-bindgen 0.2.47 (registry+https://github.com/rust-lang/crates.io-index)",
248 | "wasm-bindgen-webidl 0.2.47 (registry+https://github.com/rust-lang/crates.io-index)",
249 | ]
250 |
251 | [[package]]
252 | name = "weedle"
253 | version = "0.9.0"
254 | source = "registry+https://github.com/rust-lang/crates.io-index"
255 | dependencies = [
256 | "nom 4.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
257 | ]
258 |
259 | [metadata]
260 | "checksum backtrace 0.3.32 (registry+https://github.com/rust-lang/crates.io-index)" = "18b50f5258d1a9ad8396d2d345827875de4261b158124d4c819d9b351454fae5"
261 | "checksum backtrace-sys 0.1.30 (registry+https://github.com/rust-lang/crates.io-index)" = "5b3a000b9c543553af61bc01cbfc403b04b5caa9e421033866f2e98061eb3e61"
262 | "checksum bumpalo 2.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2cd43d82f27d68911e6ee11ee791fb248f138f5d69424dc02e098d4f152b0b05"
263 | "checksum cc 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)" = "39f75544d7bbaf57560d2168f28fd649ff9c76153874db88bdbdfd839b1a7e7d"
264 | "checksum cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "b486ce3ccf7ffd79fdeb678eac06a9e6c09fc88d33836340becb8fffe87c5e33"
265 | "checksum failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "795bd83d3abeb9220f257e597aa0080a508b27533824adf336529648f6abf7e2"
266 | "checksum failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "ea1063915fd7ef4309e222a5a07cf9c319fb9c7836b1f89b85458672dbb127e1"
267 | "checksum heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205"
268 | "checksum js-sys 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)" = "eac16f41aa9b9388230b1d6617d7ed897a1af5416b8fe1c8734dcef79c7aae10"
269 | "checksum lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bc5729f27f159ddd61f4df6228e827e86643d4d3e7c32183cb30a1c08f604a14"
270 | "checksum libc 0.2.59 (registry+https://github.com/rust-lang/crates.io-index)" = "3262021842bf00fe07dbd6cf34ff25c99d7a7ebef8deea84db72be3ea3bb0aff"
271 | "checksum log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c84ec4b527950aa83a329754b01dbe3f58361d1c5efacd1f6d68c494d08a17c6"
272 | "checksum memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "88579771288728879b57485cc7d6b07d648c9f0141eb955f8ab7f9d45394468e"
273 | "checksum nom 4.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2ad2a91a8e869eeb30b9cb3119ae87773a8f4ae617f41b1eb9c154b2905f7bd6"
274 | "checksum proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)" = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759"
275 | "checksum quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)" = "faf4799c5d274f3868a4aae320a0a182cbd2baee377b378f080e16a23e9d80db"
276 | "checksum rustc-demangle 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)" = "a7f4dccf6f4891ebcc0c39f9b6eb1a83b9bf5d747cb439ec6fba4f3b977038af"
277 | "checksum sourcefile 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "4bf77cb82ba8453b42b6ae1d692e4cdc92f9a47beaf89a847c8be83f4e328ad3"
278 | "checksum syn 0.15.39 (registry+https://github.com/rust-lang/crates.io-index)" = "b4d960b829a55e56db167e861ddb43602c003c7be0bee1d345021703fac2fb7c"
279 | "checksum synstructure 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "02353edf96d6e4dc81aea2d8490a7e9db177bf8acb0e951c24940bf866cb313f"
280 | "checksum unicode-segmentation 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1967f4cdfc355b37fd76d2a954fb2ed3871034eb4f26d60537d88795cfc332a9"
281 | "checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc"
282 | "checksum version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd"
283 | "checksum wasm-bindgen 0.2.47 (registry+https://github.com/rust-lang/crates.io-index)" = "22029998cc650473cb05f10f19c06a1536b9e1f1572e4f5dacd45ab4d3f85877"
284 | "checksum wasm-bindgen-backend 0.2.47 (registry+https://github.com/rust-lang/crates.io-index)" = "6f858ff3cb4196c702e8c24b75fba1d3ab46958de4f7c253627f0507aae1507c"
285 | "checksum wasm-bindgen-macro 0.2.47 (registry+https://github.com/rust-lang/crates.io-index)" = "15c29f04eb117312931e7b02878453ee63d67a6f291797651890128bf5ee71db"
286 | "checksum wasm-bindgen-macro-support 0.2.47 (registry+https://github.com/rust-lang/crates.io-index)" = "92b1356b623816248dfe0e2c4b7e113618d647808907ff6a3d9838ebee8e82ee"
287 | "checksum wasm-bindgen-shared 0.2.47 (registry+https://github.com/rust-lang/crates.io-index)" = "15de16ddb30cfd424a87598b30021491bae1607d32e52056979865c98b7913b4"
288 | "checksum wasm-bindgen-webidl 0.2.47 (registry+https://github.com/rust-lang/crates.io-index)" = "21724123084234fff2f986018b790afc5d6f45c9a3903025e6c55d0068cb7d15"
289 | "checksum web-sys 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)" = "22306ce642c58266cb5c5938150194911322bc179aa895146076217410ddbc82"
290 | "checksum weedle 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bcc44aa200daee8b1f3a004beaf16554369746f1b4486f0cf93b0caf8a3c2d1e"
291 |
--------------------------------------------------------------------------------
/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "wasm-bindgen-minimal-example"
3 | version = "0.1.0"
4 | authors = ["github.com/anderejd"]
5 | edition = "2018"
6 |
7 | [lib]
8 | crate-type = ["cdylib"]
9 |
10 | [dependencies]
11 | wasm-bindgen = "0.2.47"
12 |
13 | [dependencies.web-sys]
14 | version = "0.3.24"
15 | features = [
16 | 'Document',
17 | 'Element',
18 | 'HtmlElement',
19 | 'Node',
20 | 'Window',
21 | ]
22 |
--------------------------------------------------------------------------------
/LICENSE-APACHE:
--------------------------------------------------------------------------------
1 | Apache License
2 | Version 2.0, January 2004
3 | http://www.apache.org/licenses/
4 |
5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6 |
7 | 1. Definitions.
8 |
9 | "License" shall mean the terms and conditions for use, reproduction,
10 | and distribution as defined by Sections 1 through 9 of this document.
11 |
12 | "Licensor" shall mean the copyright owner or entity authorized by
13 | the copyright owner that is granting the License.
14 |
15 | "Legal Entity" shall mean the union of the acting entity and all
16 | other entities that control, are controlled by, or are under common
17 | control with that entity. For the purposes of this definition,
18 | "control" means (i) the power, direct or indirect, to cause the
19 | direction or management of such entity, whether by contract or
20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
21 | outstanding shares, or (iii) beneficial ownership of such entity.
22 |
23 | "You" (or "Your") shall mean an individual or Legal Entity
24 | exercising permissions granted by this License.
25 |
26 | "Source" form shall mean the preferred form for making modifications,
27 | including but not limited to software source code, documentation
28 | source, and configuration files.
29 |
30 | "Object" form shall mean any form resulting from mechanical
31 | transformation or translation of a Source form, including but
32 | not limited to compiled object code, generated documentation,
33 | and conversions to other media types.
34 |
35 | "Work" shall mean the work of authorship, whether in Source or
36 | Object form, made available under the License, as indicated by a
37 | copyright notice that is included in or attached to the work
38 | (an example is provided in the Appendix below).
39 |
40 | "Derivative Works" shall mean any work, whether in Source or Object
41 | form, that is based on (or derived from) the Work and for which the
42 | editorial revisions, annotations, elaborations, or other modifications
43 | represent, as a whole, an original work of authorship. For the purposes
44 | of this License, Derivative Works shall not include works that remain
45 | separable from, or merely link (or bind by name) to the interfaces of,
46 | the Work and Derivative Works thereof.
47 |
48 | "Contribution" shall mean any work of authorship, including
49 | the original version of the Work and any modifications or additions
50 | to that Work or Derivative Works thereof, that is intentionally
51 | submitted to Licensor for inclusion in the Work by the copyright owner
52 | or by an individual or Legal Entity authorized to submit on behalf of
53 | the copyright owner. For the purposes of this definition, "submitted"
54 | means any form of electronic, verbal, or written communication sent
55 | to the Licensor or its representatives, including but not limited to
56 | communication on electronic mailing lists, source code control systems,
57 | and issue tracking systems that are managed by, or on behalf of, the
58 | Licensor for the purpose of discussing and improving the Work, but
59 | excluding communication that is conspicuously marked or otherwise
60 | designated in writing by the copyright owner as "Not a Contribution."
61 |
62 | "Contributor" shall mean Licensor and any individual or Legal Entity
63 | on behalf of whom a Contribution has been received by Licensor and
64 | subsequently incorporated within the Work.
65 |
66 | 2. Grant of Copyright License. Subject to the terms and conditions of
67 | this License, each Contributor hereby grants to You a perpetual,
68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69 | copyright license to reproduce, prepare Derivative Works of,
70 | publicly display, publicly perform, sublicense, and distribute the
71 | Work and such Derivative Works in Source or Object form.
72 |
73 | 3. Grant of Patent License. Subject to the terms and conditions of
74 | this License, each Contributor hereby grants to You a perpetual,
75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76 | (except as stated in this section) patent license to make, have made,
77 | use, offer to sell, sell, import, and otherwise transfer the Work,
78 | where such license applies only to those patent claims licensable
79 | by such Contributor that are necessarily infringed by their
80 | Contribution(s) alone or by combination of their Contribution(s)
81 | with the Work to which such Contribution(s) was submitted. If You
82 | institute patent litigation against any entity (including a
83 | cross-claim or counterclaim in a lawsuit) alleging that the Work
84 | or a Contribution incorporated within the Work constitutes direct
85 | or contributory patent infringement, then any patent licenses
86 | granted to You under this License for that Work shall terminate
87 | as of the date such litigation is filed.
88 |
89 | 4. Redistribution. You may reproduce and distribute copies of the
90 | Work or Derivative Works thereof in any medium, with or without
91 | modifications, and in Source or Object form, provided that You
92 | meet the following conditions:
93 |
94 | (a) You must give any other recipients of the Work or
95 | Derivative Works a copy of this License; and
96 |
97 | (b) You must cause any modified files to carry prominent notices
98 | stating that You changed the files; and
99 |
100 | (c) You must retain, in the Source form of any Derivative Works
101 | that You distribute, all copyright, patent, trademark, and
102 | attribution notices from the Source form of the Work,
103 | excluding those notices that do not pertain to any part of
104 | the Derivative Works; and
105 |
106 | (d) If the Work includes a "NOTICE" text file as part of its
107 | distribution, then any Derivative Works that You distribute must
108 | include a readable copy of the attribution notices contained
109 | within such NOTICE file, excluding those notices that do not
110 | pertain to any part of the Derivative Works, in at least one
111 | of the following places: within a NOTICE text file distributed
112 | as part of the Derivative Works; within the Source form or
113 | documentation, if provided along with the Derivative Works; or,
114 | within a display generated by the Derivative Works, if and
115 | wherever such third-party notices normally appear. The contents
116 | of the NOTICE file are for informational purposes only and
117 | do not modify the License. You may add Your own attribution
118 | notices within Derivative Works that You distribute, alongside
119 | or as an addendum to the NOTICE text from the Work, provided
120 | that such additional attribution notices cannot be construed
121 | as modifying the License.
122 |
123 | You may add Your own copyright statement to Your modifications and
124 | may provide additional or different license terms and conditions
125 | for use, reproduction, or distribution of Your modifications, or
126 | for any such Derivative Works as a whole, provided Your use,
127 | reproduction, and distribution of the Work otherwise complies with
128 | the conditions stated in this License.
129 |
130 | 5. Submission of Contributions. Unless You explicitly state otherwise,
131 | any Contribution intentionally submitted for inclusion in the Work
132 | by You to the Licensor shall be under the terms and conditions of
133 | this License, without any additional terms or conditions.
134 | Notwithstanding the above, nothing herein shall supersede or modify
135 | the terms of any separate license agreement you may have executed
136 | with Licensor regarding such Contributions.
137 |
138 | 6. Trademarks. This License does not grant permission to use the trade
139 | names, trademarks, service marks, or product names of the Licensor,
140 | except as required for reasonable and customary use in describing the
141 | origin of the Work and reproducing the content of the NOTICE file.
142 |
143 | 7. Disclaimer of Warranty. Unless required by applicable law or
144 | agreed to in writing, Licensor provides the Work (and each
145 | Contributor provides its Contributions) on an "AS IS" BASIS,
146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147 | implied, including, without limitation, any warranties or conditions
148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149 | PARTICULAR PURPOSE. You are solely responsible for determining the
150 | appropriateness of using or redistributing the Work and assume any
151 | risks associated with Your exercise of permissions under this License.
152 |
153 | 8. Limitation of Liability. In no event and under no legal theory,
154 | whether in tort (including negligence), contract, or otherwise,
155 | unless required by applicable law (such as deliberate and grossly
156 | negligent acts) or agreed to in writing, shall any Contributor be
157 | liable to You for damages, including any direct, indirect, special,
158 | incidental, or consequential damages of any character arising as a
159 | result of this License or out of the use or inability to use the
160 | Work (including but not limited to damages for loss of goodwill,
161 | work stoppage, computer failure or malfunction, or any and all
162 | other commercial damages or losses), even if such Contributor
163 | has been advised of the possibility of such damages.
164 |
165 | 9. Accepting Warranty or Additional Liability. While redistributing
166 | the Work or Derivative Works thereof, You may choose to offer,
167 | and charge a fee for, acceptance of support, warranty, indemnity,
168 | or other liability obligations and/or rights consistent with this
169 | License. However, in accepting such obligations, You may act only
170 | on Your own behalf and on Your sole responsibility, not on behalf
171 | of any other Contributor, and only if You agree to indemnify,
172 | defend, and hold each Contributor harmless for any liability
173 | incurred by, or claims asserted against, such Contributor by reason
174 | of your accepting any such warranty or additional liability.
175 |
176 | END OF TERMS AND CONDITIONS
177 |
178 | APPENDIX: How to apply the Apache License to your work.
179 |
180 | To apply the Apache License to your work, attach the following
181 | boilerplate notice, with the fields enclosed by brackets "[]"
182 | replaced with your own identifying information. (Don't include
183 | the brackets!) The text should be enclosed in the appropriate
184 | comment syntax for the file format. We also recommend that a
185 | file or class name and description of purpose be included on the
186 | same "printed page" as the copyright notice for easier
187 | identification within third-party archives.
188 |
189 | Copyright [yyyy] [name of copyright owner]
190 |
191 | Licensed under the Apache License, Version 2.0 (the "License");
192 | you may not use this file except in compliance with the License.
193 | You may obtain a copy of the License at
194 |
195 | http://www.apache.org/licenses/LICENSE-2.0
196 |
197 | Unless required by applicable law or agreed to in writing, software
198 | distributed under the License is distributed on an "AS IS" BASIS,
199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200 | See the License for the specific language governing permissions and
201 | limitations under the License.
202 |
--------------------------------------------------------------------------------
/LICENSE-MIT:
--------------------------------------------------------------------------------
1 | Copyright (c) 2019 github.com/anderejd
2 |
3 | Permission is hereby granted, free of charge, to any
4 | person obtaining a copy of this software and associated
5 | documentation files (the "Software"), to deal in the
6 | Software without restriction, including without
7 | limitation the rights to use, copy, modify, merge,
8 | publish, distribute, sublicense, and/or sell copies of
9 | the Software, and to permit persons to whom the Software
10 | is furnished to do so, subject to the following
11 | conditions:
12 |
13 | The above copyright notice and this permission notice
14 | shall be included in all copies or substantial portions
15 | of the Software.
16 |
17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
18 | ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
19 | TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
20 | PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
21 | SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
22 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
23 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
24 | IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
25 | DEALINGS IN THE SOFTWARE.
26 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | electron-wasm-rust-example
2 | ==========================
3 |
4 | A minimal Electron + WebAssembly (WASM) + Rust example.
5 |
6 |
7 |
8 | This example application is based on:
9 |
10 | - https://gist.github.com/jarek-foksa/0f6e82bdaf8fb1962c9e14035a8725e4
11 | - https://github.com/rustwasm/wasm-bindgen/tree/master/examples/without-a-bundler
12 | - https://github.com/anderejd/wasm-bindgen-minimal-example
13 |
14 | Rust setup
15 | ----------
16 |
17 | 1. Install Rust
18 | 1. Add the WASM target, `rustup target add wasm32-unknown-unknown`
19 | 1. Install wasm-bindgen, the __same version__ as in this [Cargo.toml](Cargo.toml), `cargo install -f --version 0.2.47 wasm-bindgen-cli`
20 |
21 | NPM setup
22 | ---------
23 |
24 | 1. Install Node.js & NPM
25 | 1. Clone this repository `git clone git@github.com:anderejd/electron-wasm-rust-example.git`
26 | 1. Enter the new directory `cd electron-wasm-rust-example`
27 | 1. Download/install npm dependencies (Electron) for this example, `npm install`
28 |
29 | Build the Rust code into WASM
30 | -----------------------------
31 |
32 | Use the `build.sh` or `build.ps1` script to build the WebAssembly module.
33 |
34 | Run the app during development
35 | ------------------------------
36 |
37 | `npm start`
38 |
39 | Packaging the application for end-users
40 | ---------------------------------------
41 |
42 | TODO: Depend on and add scripts(?) for , see issue [#7].
43 |
44 | [#7]: https://github.com/anderejd/electron-wasm-rust-example/issues/7
45 |
--------------------------------------------------------------------------------
/build.ps1:
--------------------------------------------------------------------------------
1 |
2 | cargo build --target wasm32-unknown-unknown --release
3 | mkdir -ErrorAction Ignore wasm > $null
4 | wasm-bindgen `
5 | target/wasm32-unknown-unknown/release/wasm_bindgen_minimal_example.wasm `
6 | --out-dir wasm `
7 | --target web
--------------------------------------------------------------------------------
/build.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | set -ex
4 |
5 | cargo build --target wasm32-unknown-unknown --release
6 | mkdir -p wasm
7 | wasm-bindgen \
8 | target/wasm32-unknown-unknown/release/wasm_bindgen_minimal_example.wasm \
9 | --out-dir wasm \
10 | --target web
11 |
12 |
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/main.js:
--------------------------------------------------------------------------------
1 | let {
2 | app,
3 | protocol,
4 | BrowserWindow
5 | } = require("electron");
6 | let {
7 | readFile
8 | } = require("fs");
9 | let {
10 | extname
11 | } = require("path");
12 | let {
13 | URL
14 | } = require("url");
15 |
16 | let createProtocol = (scheme, normalize = true) => {
17 | protocol.registerBufferProtocol(scheme,
18 | (request, respond) => {
19 | let pathName = new URL(request.url).pathname;
20 |
21 | // Needed in case URL contains spaces
22 | pathName = decodeURI(pathName);
23 |
24 | readFile(__dirname + "/" + pathName, (error, data) => {
25 | let extension = extname(pathName).toLowerCase();
26 | let mimeType = "";
27 | if (extension === ".js") {
28 | mimeType = "text/javascript";
29 | } else if (extension === ".html") {
30 | mimeType = "text/html";
31 | } else if (extension === ".css") {
32 | mimeType = "text/css";
33 | } else if (extension === ".svg" || extension ===
34 | ".svgz") {
35 | mimeType = "image/svg+xml";
36 | } else if (extension === ".json") {
37 | mimeType = "application/json";
38 | }
39 | respond({
40 | mimeType,
41 | data
42 | });
43 | });
44 | },
45 | (error) => {
46 | if (error) {
47 | console.error(`Failed to register ${scheme} protocol`,
48 | error);
49 | }
50 | }
51 | );
52 | }
53 |
54 | // Standard scheme must be registered before the app is ready
55 | // https://gist.github.com/dbkr/e898624be6d53590ebf494521d868fec
56 | protocol.registerSchemesAsPrivileged([{
57 | scheme: 'app',
58 | privileges: { standard: true, secure: true, supportFetchAPI: true },
59 | }]);
60 |
61 |
62 | app.on("ready", () => {
63 | createProtocol("app");
64 | let browserWindow = new BrowserWindow({
65 | webPreferences: {
66 | preload: `${__dirname}/preload.js`,
67 | nodeIntegration: false,
68 | contextIsolation: true
69 | }
70 | });
71 | //browserWindow.webContents.openDevTools();
72 | browserWindow.loadFile("index.html");
73 | });
74 |
--------------------------------------------------------------------------------
/main_module.js:
--------------------------------------------------------------------------------
1 | // Use ES module import syntax to import functionality from the module
2 | // that we have compiled.
3 | //
4 | // Note that the `default` import is an initialization function which
5 | // will "boot" the module and make it ready to use. Currently browsers
6 | // don't support natively imported WebAssembly as an ES module, but
7 | // eventually the manual initialization won't be required!
8 | import {
9 | add,
10 | default as init
11 | } from './wasm/wasm_bindgen_minimal_example.js';
12 | async function run() {
13 | // First up we need to actually load the wasm file, so we use the
14 | // default export to inform it where the wasm file is located on the
15 | // server, and then we wait on the returned promise to wait for the
16 | // wasm to be loaded.
17 | //
18 | // Note that instead of a string here you can also pass in an instance
19 | // of `WebAssembly.Module` which allows you to compile your own module.
20 | // Also note that the promise, when resolved, yields the wasm module's
21 | // exports which is the same as importing the `*_bg` module in other
22 | // modes
23 | await init('./wasm/wasm_bindgen_minimal_example_bg.wasm');
24 | // And afterwards we can use all the functionality defined in wasm.
25 | const result = add(1, 2);
26 | console.log(`1 + 2 = ${result}`);
27 | if (result !== 3) {
28 | throw new Error("wasm addition doesn't work!");
29 | }
30 | }
31 | run();
--------------------------------------------------------------------------------
/package-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "electron-wasm-rust-example",
3 | "version": "1.0.0",
4 | "lockfileVersion": 1,
5 | "requires": true,
6 | "dependencies": {
7 | "@types/node": {
8 | "version": "10.14.12",
9 | "resolved": "https://registry.npmjs.org/@types/node/-/node-10.14.12.tgz",
10 | "integrity": "sha512-QcAKpaO6nhHLlxWBvpc4WeLrTvPqlHOvaj0s5GriKkA1zq+bsFBPpfYCvQhLqLgYlIko8A9YrPdaMHCo5mBcpg==",
11 | "dev": true
12 | },
13 | "ajv": {
14 | "version": "6.10.1",
15 | "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.1.tgz",
16 | "integrity": "sha512-w1YQaVGNC6t2UCPjEawK/vo/dG8OOrVtUmhBT1uJJYxbl5kU2Tj3v6LGqBcsysN1yhuCStJCCA3GqdvKY8sqXQ==",
17 | "dev": true,
18 | "requires": {
19 | "fast-deep-equal": "^2.0.1",
20 | "fast-json-stable-stringify": "^2.0.0",
21 | "json-schema-traverse": "^0.4.1",
22 | "uri-js": "^4.2.2"
23 | }
24 | },
25 | "ansi-regex": {
26 | "version": "2.1.1",
27 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
28 | "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
29 | "dev": true
30 | },
31 | "array-find-index": {
32 | "version": "1.0.2",
33 | "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz",
34 | "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=",
35 | "dev": true
36 | },
37 | "asn1": {
38 | "version": "0.2.4",
39 | "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz",
40 | "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==",
41 | "dev": true,
42 | "requires": {
43 | "safer-buffer": "~2.1.0"
44 | }
45 | },
46 | "assert-plus": {
47 | "version": "1.0.0",
48 | "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
49 | "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=",
50 | "dev": true
51 | },
52 | "asynckit": {
53 | "version": "0.4.0",
54 | "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
55 | "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=",
56 | "dev": true
57 | },
58 | "aws-sign2": {
59 | "version": "0.7.0",
60 | "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz",
61 | "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=",
62 | "dev": true
63 | },
64 | "aws4": {
65 | "version": "1.8.0",
66 | "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz",
67 | "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==",
68 | "dev": true
69 | },
70 | "bcrypt-pbkdf": {
71 | "version": "1.0.2",
72 | "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz",
73 | "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=",
74 | "dev": true,
75 | "requires": {
76 | "tweetnacl": "^0.14.3"
77 | }
78 | },
79 | "buffer-from": {
80 | "version": "1.1.1",
81 | "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz",
82 | "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==",
83 | "dev": true
84 | },
85 | "camelcase": {
86 | "version": "2.1.1",
87 | "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz",
88 | "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=",
89 | "dev": true
90 | },
91 | "camelcase-keys": {
92 | "version": "2.1.0",
93 | "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz",
94 | "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=",
95 | "dev": true,
96 | "requires": {
97 | "camelcase": "^2.0.0",
98 | "map-obj": "^1.0.0"
99 | }
100 | },
101 | "caseless": {
102 | "version": "0.12.0",
103 | "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz",
104 | "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=",
105 | "dev": true
106 | },
107 | "code-point-at": {
108 | "version": "1.1.0",
109 | "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz",
110 | "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=",
111 | "dev": true
112 | },
113 | "combined-stream": {
114 | "version": "1.0.8",
115 | "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
116 | "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
117 | "dev": true,
118 | "requires": {
119 | "delayed-stream": "~1.0.0"
120 | }
121 | },
122 | "concat-stream": {
123 | "version": "1.6.2",
124 | "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz",
125 | "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==",
126 | "dev": true,
127 | "requires": {
128 | "buffer-from": "^1.0.0",
129 | "inherits": "^2.0.3",
130 | "readable-stream": "^2.2.2",
131 | "typedarray": "^0.0.6"
132 | },
133 | "dependencies": {
134 | "isarray": {
135 | "version": "1.0.0",
136 | "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
137 | "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
138 | "dev": true
139 | },
140 | "readable-stream": {
141 | "version": "2.3.6",
142 | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
143 | "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
144 | "dev": true,
145 | "requires": {
146 | "core-util-is": "~1.0.0",
147 | "inherits": "~2.0.3",
148 | "isarray": "~1.0.0",
149 | "process-nextick-args": "~2.0.0",
150 | "safe-buffer": "~5.1.1",
151 | "string_decoder": "~1.1.1",
152 | "util-deprecate": "~1.0.1"
153 | }
154 | },
155 | "safe-buffer": {
156 | "version": "5.1.2",
157 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
158 | "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
159 | "dev": true
160 | },
161 | "string_decoder": {
162 | "version": "1.1.1",
163 | "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
164 | "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
165 | "dev": true,
166 | "requires": {
167 | "safe-buffer": "~5.1.0"
168 | }
169 | }
170 | }
171 | },
172 | "core-util-is": {
173 | "version": "1.0.2",
174 | "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
175 | "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=",
176 | "dev": true
177 | },
178 | "currently-unhandled": {
179 | "version": "0.4.1",
180 | "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz",
181 | "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=",
182 | "dev": true,
183 | "requires": {
184 | "array-find-index": "^1.0.1"
185 | }
186 | },
187 | "dashdash": {
188 | "version": "1.14.1",
189 | "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz",
190 | "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=",
191 | "dev": true,
192 | "requires": {
193 | "assert-plus": "^1.0.0"
194 | }
195 | },
196 | "debug": {
197 | "version": "3.2.6",
198 | "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz",
199 | "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==",
200 | "dev": true,
201 | "requires": {
202 | "ms": "^2.1.1"
203 | }
204 | },
205 | "decamelize": {
206 | "version": "1.2.0",
207 | "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz",
208 | "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=",
209 | "dev": true
210 | },
211 | "deep-extend": {
212 | "version": "0.6.0",
213 | "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz",
214 | "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==",
215 | "dev": true
216 | },
217 | "delayed-stream": {
218 | "version": "1.0.0",
219 | "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
220 | "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=",
221 | "dev": true
222 | },
223 | "ecc-jsbn": {
224 | "version": "0.1.2",
225 | "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz",
226 | "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=",
227 | "dev": true,
228 | "requires": {
229 | "jsbn": "~0.1.0",
230 | "safer-buffer": "^2.1.0"
231 | }
232 | },
233 | "electron": {
234 | "version": "5.0.6",
235 | "resolved": "https://registry.npmjs.org/electron/-/electron-5.0.6.tgz",
236 | "integrity": "sha512-0L53lv26eDhaaNxL6DqXGQrQOEAYbrQg40stRSb2pzrY06kwPbABzXEiaCvEsBuKUQ+9OQBbVyyvXRbLJlun/A==",
237 | "dev": true,
238 | "requires": {
239 | "@types/node": "^10.12.18",
240 | "electron-download": "^4.1.0",
241 | "extract-zip": "^1.0.3"
242 | }
243 | },
244 | "electron-download": {
245 | "version": "4.1.1",
246 | "resolved": "https://registry.npmjs.org/electron-download/-/electron-download-4.1.1.tgz",
247 | "integrity": "sha512-FjEWG9Jb/ppK/2zToP+U5dds114fM1ZOJqMAR4aXXL5CvyPE9fiqBK/9YcwC9poIFQTEJk/EM/zyRwziziRZrg==",
248 | "dev": true,
249 | "requires": {
250 | "debug": "^3.0.0",
251 | "env-paths": "^1.0.0",
252 | "fs-extra": "^4.0.1",
253 | "minimist": "^1.2.0",
254 | "nugget": "^2.0.1",
255 | "path-exists": "^3.0.0",
256 | "rc": "^1.2.1",
257 | "semver": "^5.4.1",
258 | "sumchecker": "^2.0.2"
259 | }
260 | },
261 | "env-paths": {
262 | "version": "1.0.0",
263 | "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-1.0.0.tgz",
264 | "integrity": "sha1-QWgTO0K7BcOKNbGuQ5fIKYqzaeA=",
265 | "dev": true
266 | },
267 | "error-ex": {
268 | "version": "1.3.2",
269 | "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz",
270 | "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==",
271 | "dev": true,
272 | "requires": {
273 | "is-arrayish": "^0.2.1"
274 | }
275 | },
276 | "extend": {
277 | "version": "3.0.2",
278 | "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz",
279 | "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==",
280 | "dev": true
281 | },
282 | "extract-zip": {
283 | "version": "1.6.7",
284 | "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-1.6.7.tgz",
285 | "integrity": "sha1-qEC0uK9kAyZMjbV/Txp0Mz74H+k=",
286 | "dev": true,
287 | "requires": {
288 | "concat-stream": "1.6.2",
289 | "debug": "2.6.9",
290 | "mkdirp": "0.5.1",
291 | "yauzl": "2.4.1"
292 | },
293 | "dependencies": {
294 | "debug": {
295 | "version": "2.6.9",
296 | "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
297 | "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
298 | "dev": true,
299 | "requires": {
300 | "ms": "2.0.0"
301 | }
302 | },
303 | "ms": {
304 | "version": "2.0.0",
305 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
306 | "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
307 | "dev": true
308 | }
309 | }
310 | },
311 | "extsprintf": {
312 | "version": "1.3.0",
313 | "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz",
314 | "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=",
315 | "dev": true
316 | },
317 | "fast-deep-equal": {
318 | "version": "2.0.1",
319 | "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz",
320 | "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=",
321 | "dev": true
322 | },
323 | "fast-json-stable-stringify": {
324 | "version": "2.0.0",
325 | "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz",
326 | "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=",
327 | "dev": true
328 | },
329 | "fd-slicer": {
330 | "version": "1.0.1",
331 | "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.0.1.tgz",
332 | "integrity": "sha1-i1vL2ewyfFBBv5qwI/1nUPEXfmU=",
333 | "dev": true,
334 | "requires": {
335 | "pend": "~1.2.0"
336 | }
337 | },
338 | "find-up": {
339 | "version": "1.1.2",
340 | "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz",
341 | "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=",
342 | "dev": true,
343 | "requires": {
344 | "path-exists": "^2.0.0",
345 | "pinkie-promise": "^2.0.0"
346 | },
347 | "dependencies": {
348 | "path-exists": {
349 | "version": "2.1.0",
350 | "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz",
351 | "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=",
352 | "dev": true,
353 | "requires": {
354 | "pinkie-promise": "^2.0.0"
355 | }
356 | }
357 | }
358 | },
359 | "forever-agent": {
360 | "version": "0.6.1",
361 | "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz",
362 | "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=",
363 | "dev": true
364 | },
365 | "form-data": {
366 | "version": "2.3.3",
367 | "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz",
368 | "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==",
369 | "dev": true,
370 | "requires": {
371 | "asynckit": "^0.4.0",
372 | "combined-stream": "^1.0.6",
373 | "mime-types": "^2.1.12"
374 | }
375 | },
376 | "fs-extra": {
377 | "version": "4.0.3",
378 | "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.3.tgz",
379 | "integrity": "sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg==",
380 | "dev": true,
381 | "requires": {
382 | "graceful-fs": "^4.1.2",
383 | "jsonfile": "^4.0.0",
384 | "universalify": "^0.1.0"
385 | }
386 | },
387 | "get-stdin": {
388 | "version": "4.0.1",
389 | "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz",
390 | "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=",
391 | "dev": true
392 | },
393 | "getpass": {
394 | "version": "0.1.7",
395 | "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz",
396 | "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=",
397 | "dev": true,
398 | "requires": {
399 | "assert-plus": "^1.0.0"
400 | }
401 | },
402 | "graceful-fs": {
403 | "version": "4.2.0",
404 | "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.0.tgz",
405 | "integrity": "sha512-jpSvDPV4Cq/bgtpndIWbI5hmYxhQGHPC4d4cqBPb4DLniCfhJokdXhwhaDuLBGLQdvvRum/UiX6ECVIPvDXqdg==",
406 | "dev": true
407 | },
408 | "har-schema": {
409 | "version": "2.0.0",
410 | "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz",
411 | "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=",
412 | "dev": true
413 | },
414 | "har-validator": {
415 | "version": "5.1.3",
416 | "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz",
417 | "integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==",
418 | "dev": true,
419 | "requires": {
420 | "ajv": "^6.5.5",
421 | "har-schema": "^2.0.0"
422 | }
423 | },
424 | "hosted-git-info": {
425 | "version": "2.7.1",
426 | "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz",
427 | "integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==",
428 | "dev": true
429 | },
430 | "http-signature": {
431 | "version": "1.2.0",
432 | "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz",
433 | "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=",
434 | "dev": true,
435 | "requires": {
436 | "assert-plus": "^1.0.0",
437 | "jsprim": "^1.2.2",
438 | "sshpk": "^1.7.0"
439 | }
440 | },
441 | "indent-string": {
442 | "version": "2.1.0",
443 | "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz",
444 | "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=",
445 | "dev": true,
446 | "requires": {
447 | "repeating": "^2.0.0"
448 | }
449 | },
450 | "inherits": {
451 | "version": "2.0.4",
452 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
453 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
454 | "dev": true
455 | },
456 | "ini": {
457 | "version": "1.3.5",
458 | "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz",
459 | "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==",
460 | "dev": true
461 | },
462 | "is-arrayish": {
463 | "version": "0.2.1",
464 | "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz",
465 | "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=",
466 | "dev": true
467 | },
468 | "is-finite": {
469 | "version": "1.0.2",
470 | "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz",
471 | "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=",
472 | "dev": true,
473 | "requires": {
474 | "number-is-nan": "^1.0.0"
475 | }
476 | },
477 | "is-fullwidth-code-point": {
478 | "version": "1.0.0",
479 | "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz",
480 | "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
481 | "dev": true,
482 | "requires": {
483 | "number-is-nan": "^1.0.0"
484 | }
485 | },
486 | "is-typedarray": {
487 | "version": "1.0.0",
488 | "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
489 | "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=",
490 | "dev": true
491 | },
492 | "is-utf8": {
493 | "version": "0.2.1",
494 | "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz",
495 | "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=",
496 | "dev": true
497 | },
498 | "isarray": {
499 | "version": "0.0.1",
500 | "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
501 | "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=",
502 | "dev": true
503 | },
504 | "isstream": {
505 | "version": "0.1.2",
506 | "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz",
507 | "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=",
508 | "dev": true
509 | },
510 | "jsbn": {
511 | "version": "0.1.1",
512 | "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz",
513 | "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=",
514 | "dev": true
515 | },
516 | "json-schema": {
517 | "version": "0.2.3",
518 | "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz",
519 | "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=",
520 | "dev": true
521 | },
522 | "json-schema-traverse": {
523 | "version": "0.4.1",
524 | "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
525 | "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",
526 | "dev": true
527 | },
528 | "json-stringify-safe": {
529 | "version": "5.0.1",
530 | "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz",
531 | "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=",
532 | "dev": true
533 | },
534 | "jsonfile": {
535 | "version": "4.0.0",
536 | "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz",
537 | "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=",
538 | "dev": true,
539 | "requires": {
540 | "graceful-fs": "^4.1.6"
541 | }
542 | },
543 | "jsprim": {
544 | "version": "1.4.1",
545 | "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz",
546 | "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=",
547 | "dev": true,
548 | "requires": {
549 | "assert-plus": "1.0.0",
550 | "extsprintf": "1.3.0",
551 | "json-schema": "0.2.3",
552 | "verror": "1.10.0"
553 | }
554 | },
555 | "load-json-file": {
556 | "version": "1.1.0",
557 | "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz",
558 | "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=",
559 | "dev": true,
560 | "requires": {
561 | "graceful-fs": "^4.1.2",
562 | "parse-json": "^2.2.0",
563 | "pify": "^2.0.0",
564 | "pinkie-promise": "^2.0.0",
565 | "strip-bom": "^2.0.0"
566 | }
567 | },
568 | "loud-rejection": {
569 | "version": "1.6.0",
570 | "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz",
571 | "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=",
572 | "dev": true,
573 | "requires": {
574 | "currently-unhandled": "^0.4.1",
575 | "signal-exit": "^3.0.0"
576 | }
577 | },
578 | "map-obj": {
579 | "version": "1.0.1",
580 | "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz",
581 | "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=",
582 | "dev": true
583 | },
584 | "meow": {
585 | "version": "3.7.0",
586 | "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz",
587 | "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=",
588 | "dev": true,
589 | "requires": {
590 | "camelcase-keys": "^2.0.0",
591 | "decamelize": "^1.1.2",
592 | "loud-rejection": "^1.0.0",
593 | "map-obj": "^1.0.1",
594 | "minimist": "^1.1.3",
595 | "normalize-package-data": "^2.3.4",
596 | "object-assign": "^4.0.1",
597 | "read-pkg-up": "^1.0.1",
598 | "redent": "^1.0.0",
599 | "trim-newlines": "^1.0.0"
600 | }
601 | },
602 | "mime-db": {
603 | "version": "1.40.0",
604 | "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.40.0.tgz",
605 | "integrity": "sha512-jYdeOMPy9vnxEqFRRo6ZvTZ8d9oPb+k18PKoYNYUe2stVEBPPwsln/qWzdbmaIvnhZ9v2P+CuecK+fpUfsV2mA==",
606 | "dev": true
607 | },
608 | "mime-types": {
609 | "version": "2.1.24",
610 | "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.24.tgz",
611 | "integrity": "sha512-WaFHS3MCl5fapm3oLxU4eYDw77IQM2ACcxQ9RIxfaC3ooc6PFuBMGZZsYpvoXS5D5QTWPieo1jjLdAm3TBP3cQ==",
612 | "dev": true,
613 | "requires": {
614 | "mime-db": "1.40.0"
615 | }
616 | },
617 | "minimist": {
618 | "version": "1.2.0",
619 | "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
620 | "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
621 | "dev": true
622 | },
623 | "mkdirp": {
624 | "version": "0.5.1",
625 | "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
626 | "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
627 | "dev": true,
628 | "requires": {
629 | "minimist": "0.0.8"
630 | },
631 | "dependencies": {
632 | "minimist": {
633 | "version": "0.0.8",
634 | "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
635 | "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=",
636 | "dev": true
637 | }
638 | }
639 | },
640 | "ms": {
641 | "version": "2.1.2",
642 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
643 | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
644 | "dev": true
645 | },
646 | "normalize-package-data": {
647 | "version": "2.5.0",
648 | "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz",
649 | "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==",
650 | "dev": true,
651 | "requires": {
652 | "hosted-git-info": "^2.1.4",
653 | "resolve": "^1.10.0",
654 | "semver": "2 || 3 || 4 || 5",
655 | "validate-npm-package-license": "^3.0.1"
656 | }
657 | },
658 | "nugget": {
659 | "version": "2.0.1",
660 | "resolved": "https://registry.npmjs.org/nugget/-/nugget-2.0.1.tgz",
661 | "integrity": "sha1-IBCVpIfhrTYIGzQy+jytpPjQcbA=",
662 | "dev": true,
663 | "requires": {
664 | "debug": "^2.1.3",
665 | "minimist": "^1.1.0",
666 | "pretty-bytes": "^1.0.2",
667 | "progress-stream": "^1.1.0",
668 | "request": "^2.45.0",
669 | "single-line-log": "^1.1.2",
670 | "throttleit": "0.0.2"
671 | },
672 | "dependencies": {
673 | "debug": {
674 | "version": "2.6.9",
675 | "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
676 | "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
677 | "dev": true,
678 | "requires": {
679 | "ms": "2.0.0"
680 | }
681 | },
682 | "ms": {
683 | "version": "2.0.0",
684 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
685 | "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
686 | "dev": true
687 | }
688 | }
689 | },
690 | "number-is-nan": {
691 | "version": "1.0.1",
692 | "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz",
693 | "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=",
694 | "dev": true
695 | },
696 | "oauth-sign": {
697 | "version": "0.9.0",
698 | "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz",
699 | "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==",
700 | "dev": true
701 | },
702 | "object-assign": {
703 | "version": "4.1.1",
704 | "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
705 | "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=",
706 | "dev": true
707 | },
708 | "object-keys": {
709 | "version": "0.4.0",
710 | "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-0.4.0.tgz",
711 | "integrity": "sha1-KKaq50KN0sOpLz2V8hM13SBOAzY=",
712 | "dev": true
713 | },
714 | "parse-json": {
715 | "version": "2.2.0",
716 | "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz",
717 | "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=",
718 | "dev": true,
719 | "requires": {
720 | "error-ex": "^1.2.0"
721 | }
722 | },
723 | "path-exists": {
724 | "version": "3.0.0",
725 | "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz",
726 | "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=",
727 | "dev": true
728 | },
729 | "path-parse": {
730 | "version": "1.0.6",
731 | "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz",
732 | "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==",
733 | "dev": true
734 | },
735 | "path-type": {
736 | "version": "1.1.0",
737 | "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz",
738 | "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=",
739 | "dev": true,
740 | "requires": {
741 | "graceful-fs": "^4.1.2",
742 | "pify": "^2.0.0",
743 | "pinkie-promise": "^2.0.0"
744 | }
745 | },
746 | "pend": {
747 | "version": "1.2.0",
748 | "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz",
749 | "integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA=",
750 | "dev": true
751 | },
752 | "performance-now": {
753 | "version": "2.1.0",
754 | "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz",
755 | "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=",
756 | "dev": true
757 | },
758 | "pify": {
759 | "version": "2.3.0",
760 | "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
761 | "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=",
762 | "dev": true
763 | },
764 | "pinkie": {
765 | "version": "2.0.4",
766 | "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz",
767 | "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=",
768 | "dev": true
769 | },
770 | "pinkie-promise": {
771 | "version": "2.0.1",
772 | "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz",
773 | "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=",
774 | "dev": true,
775 | "requires": {
776 | "pinkie": "^2.0.0"
777 | }
778 | },
779 | "pretty-bytes": {
780 | "version": "1.0.4",
781 | "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-1.0.4.tgz",
782 | "integrity": "sha1-CiLoIQYJrTVUL4yNXSFZr/B1HIQ=",
783 | "dev": true,
784 | "requires": {
785 | "get-stdin": "^4.0.1",
786 | "meow": "^3.1.0"
787 | }
788 | },
789 | "process-nextick-args": {
790 | "version": "2.0.1",
791 | "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
792 | "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==",
793 | "dev": true
794 | },
795 | "progress-stream": {
796 | "version": "1.2.0",
797 | "resolved": "https://registry.npmjs.org/progress-stream/-/progress-stream-1.2.0.tgz",
798 | "integrity": "sha1-LNPP6jO6OonJwSHsM0er6asSX3c=",
799 | "dev": true,
800 | "requires": {
801 | "speedometer": "~0.1.2",
802 | "through2": "~0.2.3"
803 | }
804 | },
805 | "psl": {
806 | "version": "1.2.0",
807 | "resolved": "https://registry.npmjs.org/psl/-/psl-1.2.0.tgz",
808 | "integrity": "sha512-GEn74ZffufCmkDDLNcl3uuyF/aSD6exEyh1v/ZSdAomB82t6G9hzJVRx0jBmLDW+VfZqks3aScmMw9DszwUalA==",
809 | "dev": true
810 | },
811 | "punycode": {
812 | "version": "2.1.1",
813 | "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz",
814 | "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==",
815 | "dev": true
816 | },
817 | "qs": {
818 | "version": "6.5.2",
819 | "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz",
820 | "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==",
821 | "dev": true
822 | },
823 | "rc": {
824 | "version": "1.2.8",
825 | "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz",
826 | "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==",
827 | "dev": true,
828 | "requires": {
829 | "deep-extend": "^0.6.0",
830 | "ini": "~1.3.0",
831 | "minimist": "^1.2.0",
832 | "strip-json-comments": "~2.0.1"
833 | }
834 | },
835 | "read-pkg": {
836 | "version": "1.1.0",
837 | "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz",
838 | "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=",
839 | "dev": true,
840 | "requires": {
841 | "load-json-file": "^1.0.0",
842 | "normalize-package-data": "^2.3.2",
843 | "path-type": "^1.0.0"
844 | }
845 | },
846 | "read-pkg-up": {
847 | "version": "1.0.1",
848 | "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz",
849 | "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=",
850 | "dev": true,
851 | "requires": {
852 | "find-up": "^1.0.0",
853 | "read-pkg": "^1.0.0"
854 | }
855 | },
856 | "readable-stream": {
857 | "version": "1.1.14",
858 | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz",
859 | "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=",
860 | "dev": true,
861 | "requires": {
862 | "core-util-is": "~1.0.0",
863 | "inherits": "~2.0.1",
864 | "isarray": "0.0.1",
865 | "string_decoder": "~0.10.x"
866 | }
867 | },
868 | "redent": {
869 | "version": "1.0.0",
870 | "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz",
871 | "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=",
872 | "dev": true,
873 | "requires": {
874 | "indent-string": "^2.1.0",
875 | "strip-indent": "^1.0.1"
876 | }
877 | },
878 | "repeating": {
879 | "version": "2.0.1",
880 | "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz",
881 | "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=",
882 | "dev": true,
883 | "requires": {
884 | "is-finite": "^1.0.0"
885 | }
886 | },
887 | "request": {
888 | "version": "2.88.0",
889 | "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz",
890 | "integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==",
891 | "dev": true,
892 | "requires": {
893 | "aws-sign2": "~0.7.0",
894 | "aws4": "^1.8.0",
895 | "caseless": "~0.12.0",
896 | "combined-stream": "~1.0.6",
897 | "extend": "~3.0.2",
898 | "forever-agent": "~0.6.1",
899 | "form-data": "~2.3.2",
900 | "har-validator": "~5.1.0",
901 | "http-signature": "~1.2.0",
902 | "is-typedarray": "~1.0.0",
903 | "isstream": "~0.1.2",
904 | "json-stringify-safe": "~5.0.1",
905 | "mime-types": "~2.1.19",
906 | "oauth-sign": "~0.9.0",
907 | "performance-now": "^2.1.0",
908 | "qs": "~6.5.2",
909 | "safe-buffer": "^5.1.2",
910 | "tough-cookie": "~2.4.3",
911 | "tunnel-agent": "^0.6.0",
912 | "uuid": "^3.3.2"
913 | }
914 | },
915 | "resolve": {
916 | "version": "1.11.1",
917 | "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.11.1.tgz",
918 | "integrity": "sha512-vIpgF6wfuJOZI7KKKSP+HmiKggadPQAdsp5HiC1mvqnfp0gF1vdwgBWZIdrVft9pgqoMFQN+R7BSWZiBxx+BBw==",
919 | "dev": true,
920 | "requires": {
921 | "path-parse": "^1.0.6"
922 | }
923 | },
924 | "safe-buffer": {
925 | "version": "5.2.0",
926 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.0.tgz",
927 | "integrity": "sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg==",
928 | "dev": true
929 | },
930 | "safer-buffer": {
931 | "version": "2.1.2",
932 | "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
933 | "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
934 | "dev": true
935 | },
936 | "semver": {
937 | "version": "5.7.0",
938 | "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz",
939 | "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==",
940 | "dev": true
941 | },
942 | "signal-exit": {
943 | "version": "3.0.2",
944 | "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz",
945 | "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=",
946 | "dev": true
947 | },
948 | "single-line-log": {
949 | "version": "1.1.2",
950 | "resolved": "https://registry.npmjs.org/single-line-log/-/single-line-log-1.1.2.tgz",
951 | "integrity": "sha1-wvg/Jzo+GhbtsJlWYdoO1e8DM2Q=",
952 | "dev": true,
953 | "requires": {
954 | "string-width": "^1.0.1"
955 | }
956 | },
957 | "spdx-correct": {
958 | "version": "3.1.0",
959 | "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.0.tgz",
960 | "integrity": "sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q==",
961 | "dev": true,
962 | "requires": {
963 | "spdx-expression-parse": "^3.0.0",
964 | "spdx-license-ids": "^3.0.0"
965 | }
966 | },
967 | "spdx-exceptions": {
968 | "version": "2.2.0",
969 | "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz",
970 | "integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==",
971 | "dev": true
972 | },
973 | "spdx-expression-parse": {
974 | "version": "3.0.0",
975 | "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz",
976 | "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==",
977 | "dev": true,
978 | "requires": {
979 | "spdx-exceptions": "^2.1.0",
980 | "spdx-license-ids": "^3.0.0"
981 | }
982 | },
983 | "spdx-license-ids": {
984 | "version": "3.0.4",
985 | "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.4.tgz",
986 | "integrity": "sha512-7j8LYJLeY/Yb6ACbQ7F76qy5jHkp0U6jgBfJsk97bwWlVUnUWsAgpyaCvo17h0/RQGnQ036tVDomiwoI4pDkQA==",
987 | "dev": true
988 | },
989 | "speedometer": {
990 | "version": "0.1.4",
991 | "resolved": "https://registry.npmjs.org/speedometer/-/speedometer-0.1.4.tgz",
992 | "integrity": "sha1-mHbb0qFp0xFUAtSObqYynIgWpQ0=",
993 | "dev": true
994 | },
995 | "sshpk": {
996 | "version": "1.16.1",
997 | "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz",
998 | "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==",
999 | "dev": true,
1000 | "requires": {
1001 | "asn1": "~0.2.3",
1002 | "assert-plus": "^1.0.0",
1003 | "bcrypt-pbkdf": "^1.0.0",
1004 | "dashdash": "^1.12.0",
1005 | "ecc-jsbn": "~0.1.1",
1006 | "getpass": "^0.1.1",
1007 | "jsbn": "~0.1.0",
1008 | "safer-buffer": "^2.0.2",
1009 | "tweetnacl": "~0.14.0"
1010 | }
1011 | },
1012 | "string-width": {
1013 | "version": "1.0.2",
1014 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
1015 | "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
1016 | "dev": true,
1017 | "requires": {
1018 | "code-point-at": "^1.0.0",
1019 | "is-fullwidth-code-point": "^1.0.0",
1020 | "strip-ansi": "^3.0.0"
1021 | }
1022 | },
1023 | "string_decoder": {
1024 | "version": "0.10.31",
1025 | "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
1026 | "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=",
1027 | "dev": true
1028 | },
1029 | "strip-ansi": {
1030 | "version": "3.0.1",
1031 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
1032 | "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
1033 | "dev": true,
1034 | "requires": {
1035 | "ansi-regex": "^2.0.0"
1036 | }
1037 | },
1038 | "strip-bom": {
1039 | "version": "2.0.0",
1040 | "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz",
1041 | "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=",
1042 | "dev": true,
1043 | "requires": {
1044 | "is-utf8": "^0.2.0"
1045 | }
1046 | },
1047 | "strip-indent": {
1048 | "version": "1.0.1",
1049 | "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz",
1050 | "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=",
1051 | "dev": true,
1052 | "requires": {
1053 | "get-stdin": "^4.0.1"
1054 | }
1055 | },
1056 | "strip-json-comments": {
1057 | "version": "2.0.1",
1058 | "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz",
1059 | "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=",
1060 | "dev": true
1061 | },
1062 | "sumchecker": {
1063 | "version": "2.0.2",
1064 | "resolved": "https://registry.npmjs.org/sumchecker/-/sumchecker-2.0.2.tgz",
1065 | "integrity": "sha1-D0LBDl0F2l1C7qPlbDOZo31sWz4=",
1066 | "dev": true,
1067 | "requires": {
1068 | "debug": "^2.2.0"
1069 | },
1070 | "dependencies": {
1071 | "debug": {
1072 | "version": "2.6.9",
1073 | "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
1074 | "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
1075 | "dev": true,
1076 | "requires": {
1077 | "ms": "2.0.0"
1078 | }
1079 | },
1080 | "ms": {
1081 | "version": "2.0.0",
1082 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
1083 | "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
1084 | "dev": true
1085 | }
1086 | }
1087 | },
1088 | "throttleit": {
1089 | "version": "0.0.2",
1090 | "resolved": "https://registry.npmjs.org/throttleit/-/throttleit-0.0.2.tgz",
1091 | "integrity": "sha1-z+34jmDADdlpe2H90qg0OptoDq8=",
1092 | "dev": true
1093 | },
1094 | "through2": {
1095 | "version": "0.2.3",
1096 | "resolved": "https://registry.npmjs.org/through2/-/through2-0.2.3.tgz",
1097 | "integrity": "sha1-6zKE2k6jEbbMis42U3SKUqvyWj8=",
1098 | "dev": true,
1099 | "requires": {
1100 | "readable-stream": "~1.1.9",
1101 | "xtend": "~2.1.1"
1102 | }
1103 | },
1104 | "tough-cookie": {
1105 | "version": "2.4.3",
1106 | "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz",
1107 | "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==",
1108 | "dev": true,
1109 | "requires": {
1110 | "psl": "^1.1.24",
1111 | "punycode": "^1.4.1"
1112 | },
1113 | "dependencies": {
1114 | "punycode": {
1115 | "version": "1.4.1",
1116 | "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz",
1117 | "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=",
1118 | "dev": true
1119 | }
1120 | }
1121 | },
1122 | "trim-newlines": {
1123 | "version": "1.0.0",
1124 | "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz",
1125 | "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=",
1126 | "dev": true
1127 | },
1128 | "tunnel-agent": {
1129 | "version": "0.6.0",
1130 | "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
1131 | "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=",
1132 | "dev": true,
1133 | "requires": {
1134 | "safe-buffer": "^5.0.1"
1135 | }
1136 | },
1137 | "tweetnacl": {
1138 | "version": "0.14.5",
1139 | "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz",
1140 | "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=",
1141 | "dev": true
1142 | },
1143 | "typedarray": {
1144 | "version": "0.0.6",
1145 | "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz",
1146 | "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=",
1147 | "dev": true
1148 | },
1149 | "universalify": {
1150 | "version": "0.1.2",
1151 | "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz",
1152 | "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==",
1153 | "dev": true
1154 | },
1155 | "uri-js": {
1156 | "version": "4.2.2",
1157 | "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz",
1158 | "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==",
1159 | "dev": true,
1160 | "requires": {
1161 | "punycode": "^2.1.0"
1162 | }
1163 | },
1164 | "util-deprecate": {
1165 | "version": "1.0.2",
1166 | "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
1167 | "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=",
1168 | "dev": true
1169 | },
1170 | "uuid": {
1171 | "version": "3.3.2",
1172 | "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz",
1173 | "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==",
1174 | "dev": true
1175 | },
1176 | "validate-npm-package-license": {
1177 | "version": "3.0.4",
1178 | "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz",
1179 | "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==",
1180 | "dev": true,
1181 | "requires": {
1182 | "spdx-correct": "^3.0.0",
1183 | "spdx-expression-parse": "^3.0.0"
1184 | }
1185 | },
1186 | "verror": {
1187 | "version": "1.10.0",
1188 | "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz",
1189 | "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=",
1190 | "dev": true,
1191 | "requires": {
1192 | "assert-plus": "^1.0.0",
1193 | "core-util-is": "1.0.2",
1194 | "extsprintf": "^1.2.0"
1195 | }
1196 | },
1197 | "xtend": {
1198 | "version": "2.1.2",
1199 | "resolved": "https://registry.npmjs.org/xtend/-/xtend-2.1.2.tgz",
1200 | "integrity": "sha1-bv7MKk2tjmlixJAbM3znuoe10os=",
1201 | "dev": true,
1202 | "requires": {
1203 | "object-keys": "~0.4.0"
1204 | }
1205 | },
1206 | "yauzl": {
1207 | "version": "2.4.1",
1208 | "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.4.1.tgz",
1209 | "integrity": "sha1-lSj0QtqxsihOWLQ3m7GU4i4MQAU=",
1210 | "dev": true,
1211 | "requires": {
1212 | "fd-slicer": "~1.0.1"
1213 | }
1214 | }
1215 | }
1216 | }
1217 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "electron-wasm-rust-example",
3 | "version": "1.0.0",
4 | "description": "A minimal Electron + WebAssembly (WASM) + Rust example.",
5 | "main": "main.js",
6 | "scripts": {
7 | "start": "electron .",
8 | "test": "echo \"Error: no test specified\" && exit 1"
9 | },
10 | "author": "github.com/anderejd",
11 | "license": "(MIT OR Apache-2.0)",
12 | "devDependencies": {
13 | "electron": "^5.0.6"
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/preload.js:
--------------------------------------------------------------------------------
1 | let {
2 | webFrame
3 | } = require("electron");
4 |
5 | process.once("loaded", () => {
6 | // Allow window.fetch() to access app files
7 | webFrame.registerURLSchemeAsPrivileged("app", {
8 | secure: true,
9 | bypassCSP: false,
10 | allowServiceWorkers: true,
11 | supportFetchAPI: true,
12 | corsEnabled: false
13 | });
14 | });
15 |
--------------------------------------------------------------------------------
/src/lib.rs:
--------------------------------------------------------------------------------
1 | use wasm_bindgen::prelude::*;
2 |
3 | // Called when the wasm module is instantiated
4 | #[wasm_bindgen(start)]
5 | pub fn main() -> Result<(), JsValue> {
6 | // Use `web_sys`'s global `window` function to get a handle on the global
7 | // window object.
8 | let window = web_sys::window().expect("no global `window` exists");
9 | let document = window.document().expect("should have a document on window");
10 | let body = document.body().expect("document should have a body");
11 |
12 | // Manufacture the element we're gonna append
13 | let val = document.create_element("p")?;
14 | val.set_inner_html("Hello from Rust!");
15 |
16 | body.append_child(&val)?;
17 |
18 | Ok(())
19 | }
20 |
21 | #[wasm_bindgen]
22 | pub fn add(a: u32, b: u32) -> u32 {
23 | a + b
24 | }
25 |
--------------------------------------------------------------------------------
/style.css:
--------------------------------------------------------------------------------
1 | body {
2 | background: #f3f3f3;
3 | }
4 |
--------------------------------------------------------------------------------