deploy.sh 0.2.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (147) hide show
  1. package/.eslintignore +1 -0
  2. package/.eslintrc +7 -9
  3. package/.github/workflows/ci.yml +48 -0
  4. package/.husky/pre-commit +5 -0
  5. package/{test/fixtures/unknown/.gitkeep → .prettierrc} +0 -0
  6. package/.release-it.json +5 -0
  7. package/CHANGELOG.md +26 -0
  8. package/README.md +5 -6
  9. package/__tests__/fixtures/unknown/.gitkeep +0 -0
  10. package/__tests__/lib/classifier.test.js +49 -0
  11. package/__tests__/lib/helpers/util.test.js +57 -0
  12. package/bin/deploy-delete.js +14 -0
  13. package/bin/deploy-deploy.js +34 -59
  14. package/bin/deploy-list.js +25 -52
  15. package/bin/deploy-login.js +36 -52
  16. package/bin/deploy-logout.js +9 -40
  17. package/bin/deploy-logs.js +22 -48
  18. package/bin/deploy-open.js +14 -37
  19. package/bin/deploy-register.js +37 -50
  20. package/bin/deploy-server.js +8 -5
  21. package/bin/deploy-whoami.js +8 -37
  22. package/bin/deploy.js +145 -19
  23. package/{test/fixtures → examples}/docker/Dockerfile +0 -0
  24. package/examples/docker/index.js +12 -0
  25. package/examples/node/index.js +8 -0
  26. package/{test/fixtures → examples}/node/package.json +0 -0
  27. package/examples/static/index.html +22 -0
  28. package/{test/fixtures → examples}/static/main.css +4 -2
  29. package/examples/static/out.gifcd +0 -0
  30. package/generate-docs.js +55 -0
  31. package/index.js +54 -55
  32. package/jsdoc.json +6 -3
  33. package/lib/classifier.js +24 -17
  34. package/lib/deploy.js +56 -64
  35. package/lib/helpers/cli.js +178 -207
  36. package/lib/helpers/util.js +94 -21
  37. package/lib/models/deployment.js +415 -474
  38. package/lib/models/request.js +77 -66
  39. package/lib/models/user.js +119 -144
  40. package/lib/server.js +187 -97
  41. package/lib/static/not-found.html +30 -0
  42. package/lib/static/page-could-not-load.html +30 -0
  43. package/lib/static/static-server.js +70 -0
  44. package/package.json +47 -34
  45. package/website/README.md +41 -0
  46. package/website/babel.config.js +3 -0
  47. package/website/docs/api/_category_.yml +1 -0
  48. package/website/docs/api/lib/classifier.js.md +11 -0
  49. package/website/docs/api/lib/deploy.js.md +13 -0
  50. package/website/docs/api/lib/helpers/cli.js.md +193 -0
  51. package/website/docs/api/lib/helpers/util.js.md +65 -0
  52. package/website/docs/api/lib/models/deployment.js.md +171 -0
  53. package/website/docs/api/lib/models/request.js.md +67 -0
  54. package/website/docs/api/lib/models/user.js.md +92 -0
  55. package/website/docs/api/lib/server.js.md +0 -0
  56. package/website/docs/api/lib/static/static-server.js.md +0 -0
  57. package/website/docs/intro.md +57 -0
  58. package/website/docusaurus.config.js +82 -0
  59. package/website/package-lock.json +25218 -0
  60. package/website/package.json +39 -0
  61. package/website/sidebars.js +31 -0
  62. package/website/src/components/HomepageFeatures/index.js +79 -0
  63. package/website/src/components/HomepageFeatures/styles.module.css +11 -0
  64. package/website/src/css/custom.css +39 -0
  65. package/website/src/pages/index.js +57 -0
  66. package/website/src/pages/index.module.css +23 -0
  67. package/website/static/.nojekyll +0 -0
  68. package/website/static/example.gif +0 -0
  69. package/website/static/example.mov +0 -0
  70. package/website/static/img/favicon.ico +0 -0
  71. package/website/static/img/intro/deploy.png +0 -0
  72. package/website/static/img/intro/logs.png +0 -0
  73. package/{docs → website/static/img}/logo.png +0 -0
  74. package/{docs → website/static/img}/logo.pxm +0 -0
  75. package/{docs → website/static/img}/logo@2x.png +0 -0
  76. package/.npmignore +0 -9
  77. package/.travis.yml +0 -9
  78. package/TODO.md +0 -12
  79. package/docs/code/classifier.js.html +0 -116
  80. package/docs/code/deploy.js.html +0 -138
  81. package/docs/code/fonts/OpenSans-Bold-webfont.eot +0 -0
  82. package/docs/code/fonts/OpenSans-Bold-webfont.svg +0 -1830
  83. package/docs/code/fonts/OpenSans-Bold-webfont.woff +0 -0
  84. package/docs/code/fonts/OpenSans-BoldItalic-webfont.eot +0 -0
  85. package/docs/code/fonts/OpenSans-BoldItalic-webfont.svg +0 -1830
  86. package/docs/code/fonts/OpenSans-BoldItalic-webfont.woff +0 -0
  87. package/docs/code/fonts/OpenSans-Italic-webfont.eot +0 -0
  88. package/docs/code/fonts/OpenSans-Italic-webfont.svg +0 -1830
  89. package/docs/code/fonts/OpenSans-Italic-webfont.woff +0 -0
  90. package/docs/code/fonts/OpenSans-Light-webfont.eot +0 -0
  91. package/docs/code/fonts/OpenSans-Light-webfont.svg +0 -1831
  92. package/docs/code/fonts/OpenSans-Light-webfont.woff +0 -0
  93. package/docs/code/fonts/OpenSans-LightItalic-webfont.eot +0 -0
  94. package/docs/code/fonts/OpenSans-LightItalic-webfont.svg +0 -1835
  95. package/docs/code/fonts/OpenSans-LightItalic-webfont.woff +0 -0
  96. package/docs/code/fonts/OpenSans-Regular-webfont.eot +0 -0
  97. package/docs/code/fonts/OpenSans-Regular-webfont.svg +0 -1831
  98. package/docs/code/fonts/OpenSans-Regular-webfont.woff +0 -0
  99. package/docs/code/fonts/OpenSans-Semibold-webfont.eot +0 -0
  100. package/docs/code/fonts/OpenSans-Semibold-webfont.svg +0 -1830
  101. package/docs/code/fonts/OpenSans-Semibold-webfont.ttf +0 -0
  102. package/docs/code/fonts/OpenSans-Semibold-webfont.woff +0 -0
  103. package/docs/code/fonts/OpenSans-SemiboldItalic-webfont.eot +0 -0
  104. package/docs/code/fonts/OpenSans-SemiboldItalic-webfont.svg +0 -1830
  105. package/docs/code/fonts/OpenSans-SemiboldItalic-webfont.ttf +0 -0
  106. package/docs/code/fonts/OpenSans-SemiboldItalic-webfont.woff +0 -0
  107. package/docs/code/global.html +0 -325
  108. package/docs/code/helpers_cli.js.html +0 -351
  109. package/docs/code/helpers_util.js.html +0 -127
  110. package/docs/code/index.html +0 -81
  111. package/docs/code/models_deployment.js.html +0 -593
  112. package/docs/code/models_request.js.html +0 -150
  113. package/docs/code/models_user.js.html +0 -232
  114. package/docs/code/module-lib_classifier.html +0 -246
  115. package/docs/code/module-lib_deploy.html +0 -350
  116. package/docs/code/module-lib_helpers_cli.html +0 -2067
  117. package/docs/code/module-lib_helpers_util.html +0 -608
  118. package/docs/code/module-models_deployment-Deployment.html +0 -359
  119. package/docs/code/module-models_deployment-DeploymentSchema.html +0 -359
  120. package/docs/code/module-models_deployment.Deployment.html +0 -359
  121. package/docs/code/module-models_deployment.html +0 -1851
  122. package/docs/code/module-models_request-Request.html +0 -409
  123. package/docs/code/module-models_request-RequestSchema.html +0 -359
  124. package/docs/code/module-models_request.html +0 -446
  125. package/docs/code/module-models_user-User.html +0 -306
  126. package/docs/code/module-models_user-UserSchema.html +0 -306
  127. package/docs/code/module-models_user.User.html +0 -306
  128. package/docs/code/module-models_user.html +0 -1200
  129. package/docs/code/scripts/linenumber.js +0 -25
  130. package/docs/code/scripts/prettify/Apache-License-2.0.txt +0 -202
  131. package/docs/code/scripts/prettify/lang-css.js +0 -2
  132. package/docs/code/scripts/prettify/prettify.js +0 -28
  133. package/docs/code/styles/jsdoc-default.css +0 -692
  134. package/docs/code/styles/prettify-jsdoc.css +0 -111
  135. package/docs/code/styles/prettify-tomorrow.css +0 -132
  136. package/docs/example-docker.gif +0 -0
  137. package/docs/example-node.gif +0 -0
  138. package/docs/example-static.gif +0 -0
  139. package/docs/index.html +0 -50
  140. package/docs/main.css +0 -12
  141. package/docs/psychic-min.css +0 -1
  142. package/lib/helpers/static-server.js +0 -69
  143. package/test/fixtures/docker/index.js +0 -12
  144. package/test/fixtures/node/index.js +0 -8
  145. package/test/fixtures/static/index.html +0 -14
  146. package/test/lib/classifier.js +0 -51
  147. package/test/lib/helpers/util.js +0 -30
@@ -1,409 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="utf-8">
5
- <meta name="viewport" content="width=device-width,initial-scale=1">
6
- <title>Request - Documentation</title>
7
-
8
- <script src="scripts/prettify/prettify.js"></script>
9
- <script src="scripts/prettify/lang-css.js"></script>
10
- <!--[if lt IE 9]>
11
- <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
12
- <![endif]-->
13
- <link type="text/css" rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">
14
- <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
15
- <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
16
- </head>
17
- <body>
18
-
19
- <input type="checkbox" id="nav-trigger" class="nav-trigger" />
20
- <label for="nav-trigger" class="navicon-button x">
21
- <div class="navicon"></div>
22
- </label>
23
-
24
- <label for="nav-trigger" class="overlay"></label>
25
-
26
- <nav>
27
- <li class="nav-link nav-home-link"><a href="index.html">Home</a></li><li class="nav-heading">Classes</li><li class="nav-heading"><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="module-models_deployment.Deployment.html">Deployment</a></span></li><li class="nav-heading"><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="module-models_request-Request.html">Request</a></span></li><li class="nav-heading"><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="module-models_user.User.html">User</a></span></li><li class="nav-heading">Modules</li><li class="nav-heading"><span class="nav-item-type type-module">M</span><span class="nav-item-name"><a href="module-lib_classifier.html">lib/classifier</a></span></li><li class="nav-heading"><span class="nav-item-type type-module">M</span><span class="nav-item-name"><a href="module-lib_deploy.html">lib/deploy</a></span></li><li class="nav-heading"><span class="nav-item-type type-module">M</span><span class="nav-item-name"><a href="module-lib_helpers_cli.html">lib/helpers/cli</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="module-lib_helpers_cli.html#~cacheCredentials">cacheCredentials</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="module-lib_helpers_cli.html#~createBundle">createBundle</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="module-lib_helpers_cli.html#~getCredentials">getCredentials</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="module-lib_helpers_cli.html#~getDeployments">getDeployments</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="module-lib_helpers_cli.html#~getLogs">getLogs</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="module-lib_helpers_cli.html#~login">login</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="module-lib_helpers_cli.html#~logout">logout</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="module-lib_helpers_cli.html#~register">register</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="module-lib_helpers_cli.html#~uploadBundle">uploadBundle</a></span></li><li class="nav-heading"><span class="nav-item-type type-module">M</span><span class="nav-item-name"><a href="module-lib_helpers_util.html">lib/helpers/util</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="module-lib_helpers_util.html#~contains">contains</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="module-lib_helpers_util.html#~getPort">getPort</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="module-lib_helpers_util.html#~hash">hash</a></span></li><li class="nav-heading"><span class="nav-item-type type-module">M</span><span class="nav-item-name"><a href="module-models_deployment.html">models/deployment</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="module-models_deployment.html#~decorate">decorate</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="module-models_deployment.html#~get">get</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="module-models_deployment.html#~getAll">getAll</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="module-models_deployment.html#~proxy">proxy</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="module-models_deployment.html#~remove">remove</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="module-models_deployment.html#~start">start</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="module-models_deployment.html#~stop">stop</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="module-models_deployment.html#~update">update</a></span></li><li class="nav-heading"><span class="nav-item-type type-module">M</span><span class="nav-item-name"><a href="module-models_request.html">models/request</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="module-models_request.html#~count">count</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="module-models_request.html#~log">log</a></span></li><li class="nav-heading"><span class="nav-item-type type-module">M</span><span class="nav-item-name"><a href="module-models_user.html">models/user</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="module-models_user.html#~authenticate">authenticate</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="module-models_user.html#~authenticateMiddleware">authenticateMiddleware</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="module-models_user.html#~get">get</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="module-models_user.html#~login">login</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="module-models_user.html#~logout">logout</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="module-models_user.html#~register">register</a></span></li>
28
- </nav>
29
-
30
- <div id="main">
31
-
32
- <h1 class="page-title">Request</h1>
33
-
34
-
35
-
36
-
37
-
38
-
39
-
40
- <section>
41
-
42
- <header>
43
-
44
- <h2>
45
- <span class="ancestors"><a href="module-models_request.html">models/request</a>~</span>
46
-
47
- Request
48
- </h2>
49
-
50
- <div class="class-description"><p>{Object} Request</p></div>
51
-
52
-
53
- </header>
54
-
55
- <article>
56
- <div class="container-overview">
57
-
58
-
59
- <div class="section-method">
60
-
61
-
62
- <h2>Constructor</h2>
63
-
64
-
65
- <h4 class="name" id="Request"><span class="type-signature"></span>new Request<span class="signature">()</span><span class="type-signature"></span></h4>
66
-
67
-
68
-
69
-
70
-
71
- <div class="description">
72
- <p>Request definition</p>
73
- </div>
74
-
75
-
76
-
77
-
78
-
79
- <h5 class="subsection-title">Properties:</h5>
80
-
81
-
82
-
83
- <table class="props">
84
- <thead>
85
- <tr>
86
-
87
- <th>Name</th>
88
-
89
-
90
- <th>Type</th>
91
-
92
-
93
-
94
-
95
-
96
- <th class="last">Description</th>
97
- </tr>
98
- </thead>
99
-
100
- <tbody>
101
-
102
-
103
- <tr>
104
-
105
- <td class="name"><code>subdomain</code></td>
106
-
107
-
108
- <td class="type">
109
-
110
-
111
- <span class="param-type"><code>String</code></span>
112
-
113
-
114
-
115
- </td>
116
-
117
-
118
-
119
-
120
-
121
- <td class="description last"><p>the subdomain of the request</p></td>
122
- </tr>
123
-
124
-
125
-
126
-
127
-
128
- <tr>
129
-
130
- <td class="name"><code>url</code></td>
131
-
132
-
133
- <td class="type">
134
-
135
-
136
- <span class="param-type"><code>String</code></span>
137
-
138
-
139
-
140
- </td>
141
-
142
-
143
-
144
-
145
-
146
- <td class="description last"><p>the url that was being accessed</p></td>
147
- </tr>
148
-
149
-
150
-
151
-
152
-
153
- <tr>
154
-
155
- <td class="name"><code>time</code></td>
156
-
157
-
158
- <td class="type">
159
-
160
-
161
- <span class="param-type"><code>Number</code></span>
162
-
163
-
164
-
165
- </td>
166
-
167
-
168
-
169
-
170
-
171
- <td class="description last"><p>the time it took to access the resource</p></td>
172
- </tr>
173
-
174
-
175
-
176
-
177
-
178
- <tr>
179
-
180
- <td class="name"><code>method</code></td>
181
-
182
-
183
- <td class="type">
184
-
185
-
186
- <span class="param-type"><code>String</code></span>
187
-
188
-
189
-
190
- </td>
191
-
192
-
193
-
194
-
195
-
196
- <td class="description last"><p>the http verb that describes the request</p></td>
197
- </tr>
198
-
199
-
200
-
201
-
202
-
203
- <tr>
204
-
205
- <td class="name"><code>statusCode</code></td>
206
-
207
-
208
- <td class="type">
209
-
210
-
211
- <span class="param-type"><code>String</code></span>
212
-
213
-
214
-
215
- </td>
216
-
217
-
218
-
219
-
220
-
221
- <td class="description last"><p>the statusCode associated with the request</p></td>
222
- </tr>
223
-
224
-
225
-
226
-
227
-
228
- <tr>
229
-
230
- <td class="name"><code>userAgent</code></td>
231
-
232
-
233
- <td class="type">
234
-
235
-
236
- <span class="param-type"><code>String</code></span>
237
-
238
-
239
-
240
- </td>
241
-
242
-
243
-
244
-
245
-
246
- <td class="description last"><p>the userAgent that access the resource</p></td>
247
- </tr>
248
-
249
-
250
-
251
-
252
-
253
- <tr>
254
-
255
- <td class="name"><code>referer</code></td>
256
-
257
-
258
- <td class="type">
259
-
260
-
261
- <span class="param-type"><code>String</code></span>
262
-
263
-
264
-
265
- </td>
266
-
267
-
268
-
269
-
270
-
271
- <td class="description last"><p>the referer that the user was at before accessing the address</p></td>
272
- </tr>
273
-
274
-
275
-
276
-
277
-
278
- <tr>
279
-
280
- <td class="name"><code>acceptLanguage</code></td>
281
-
282
-
283
- <td class="type">
284
-
285
-
286
- <span class="param-type"><code>String</code></span>
287
-
288
-
289
-
290
- </td>
291
-
292
-
293
-
294
-
295
-
296
- <td class="description last"><p>browser based language preferences</p></td>
297
- </tr>
298
-
299
-
300
-
301
-
302
- </tbody>
303
- </table>
304
-
305
-
306
-
307
-
308
- <dl class="details">
309
-
310
-
311
-
312
-
313
-
314
-
315
-
316
-
317
-
318
-
319
-
320
-
321
-
322
-
323
-
324
-
325
-
326
-
327
-
328
-
329
-
330
-
331
-
332
-
333
-
334
-
335
- <dt class="tag-source">Source:</dt>
336
- <dd class="tag-source"><ul class="dummy"><li>
337
- <a href="models_request.js.html">models/request.js</a>, <a href="models_request.js.html#line38">line 38</a>
338
- </li></ul></dd>
339
-
340
-
341
-
342
-
343
-
344
-
345
-
346
- </dl>
347
-
348
-
349
-
350
-
351
-
352
-
353
-
354
-
355
-
356
-
357
-
358
-
359
-
360
-
361
-
362
-
363
-
364
-
365
-
366
-
367
-
368
-
369
-
370
- </div>
371
-
372
- </div>
373
-
374
-
375
-
376
-
377
-
378
-
379
-
380
-
381
-
382
-
383
-
384
-
385
-
386
-
387
-
388
-
389
-
390
-
391
- </article>
392
-
393
- </section>
394
-
395
-
396
-
397
-
398
- </div>
399
-
400
- <br class="clear">
401
-
402
- <footer>
403
- Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.4</a> on Mon Aug 14 2017 00:16:03 GMT-0700 (PDT) using the Minami theme.
404
- </footer>
405
-
406
- <script>prettyPrint();</script>
407
- <script src="scripts/linenumber.js"></script>
408
- </body>
409
- </html>