mirror of
https://github.com/LukeHagar/vercel.git
synced 2025-12-11 21:07:47 +00:00
Compare commits
668 Commits
@now/pytho
...
@now/pytho
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8043e25d6d | ||
|
|
73b4e7aea4 | ||
|
|
de7e063c9b | ||
|
|
e7c30deee8 | ||
|
|
7464fac792 | ||
|
|
252363cce4 | ||
|
|
d7dceeb2a1 | ||
|
|
6b5b9e8b2f | ||
|
|
addd036149 | ||
|
|
7ca672a470 | ||
|
|
3af0e99689 | ||
|
|
b14068de8a | ||
|
|
c9437e714a | ||
|
|
c0aff5cf4a | ||
|
|
9110b14bb4 | ||
|
|
40e4b69267 | ||
|
|
6c4934dcc4 | ||
|
|
d64e54d61a | ||
|
|
0b75bf07f7 | ||
|
|
a861a8f3f7 | ||
|
|
6407b17b7f | ||
|
|
558463a988 | ||
|
|
1a133995b8 | ||
|
|
a83eecf674 | ||
|
|
a932ed65fa | ||
|
|
e2ae497762 | ||
|
|
89989719c2 | ||
|
|
8166b8e1e7 | ||
|
|
1ceeac498c | ||
|
|
1c47d1360d | ||
|
|
ddcd0918e9 | ||
|
|
573b6b8110 | ||
|
|
40039d7f9b | ||
|
|
dcb37e92f5 | ||
|
|
fe7f875549 | ||
|
|
a516ed6fb8 | ||
|
|
ca2c5f85ef | ||
|
|
adb5a01cc0 | ||
|
|
6b4d39ab4d | ||
|
|
07ce3d2e34 | ||
|
|
93ffcf487b | ||
|
|
3631f0f4cf | ||
|
|
b67b5be8a9 | ||
|
|
bf67b1a29e | ||
|
|
ed86473f74 | ||
|
|
399a3cd114 | ||
|
|
d0fd09810a | ||
|
|
f298f2e894 | ||
|
|
569200ae0e | ||
|
|
c91495338d | ||
|
|
7eed5574e0 | ||
|
|
91e6b85cec | ||
|
|
3ae83172ec | ||
|
|
7c51446e5e | ||
|
|
400a5c73e8 | ||
|
|
ec917ace69 | ||
|
|
f5e0afdd7e | ||
|
|
c1b4c62714 | ||
|
|
5e4bdfbe11 | ||
|
|
bd4a0cbd32 | ||
|
|
7ff9adc90e | ||
|
|
b279f1ffae | ||
|
|
344cc103ee | ||
|
|
83249b3685 | ||
|
|
79e7a9f477 | ||
|
|
b3dce70271 | ||
|
|
cff8d8b8a0 | ||
|
|
da892100d9 | ||
|
|
72e87ee6e4 | ||
|
|
3f9afad167 | ||
|
|
1527447914 | ||
|
|
9ca35df5fb | ||
|
|
05b2e2216c | ||
|
|
167fd5750a | ||
|
|
4a3cd7ec72 | ||
|
|
9aef718917 | ||
|
|
3cdc261802 | ||
|
|
5c71f672b3 | ||
|
|
dbc5f73984 | ||
|
|
1d269fffc8 | ||
|
|
cc146ba0f5 | ||
|
|
f8a2519838 | ||
|
|
1781376d47 | ||
|
|
d9fda14969 | ||
|
|
a4de9272e7 | ||
|
|
9b9037de91 | ||
|
|
8d18c65e3e | ||
|
|
e7d7de61b6 | ||
|
|
11927883c3 | ||
|
|
57d25b184b | ||
|
|
95f716fb3f | ||
|
|
8dd52605be | ||
|
|
4b9c6a2a2a | ||
|
|
17f92a5ad3 | ||
|
|
0aab7cc509 | ||
|
|
b39622b271 | ||
|
|
1e9aeee8e9 | ||
|
|
49fac0dfad | ||
|
|
a668df829f | ||
|
|
3d4ef1f825 | ||
|
|
f986daa1cc | ||
|
|
549c8777ba | ||
|
|
51d7242fda | ||
|
|
36db0e5bab | ||
|
|
99368b4248 | ||
|
|
95daf0e292 | ||
|
|
8bfa9c1a42 | ||
|
|
4208dc0466 | ||
|
|
00ae011b95 | ||
|
|
a770991a81 | ||
|
|
f80a6d6392 | ||
|
|
30777384ec | ||
|
|
0c719b7f6a | ||
|
|
ff18788b20 | ||
|
|
752ab39787 | ||
|
|
c1df8c8bd1 | ||
|
|
25fd1df35d | ||
|
|
d32ab1e0d9 | ||
|
|
a69c460760 | ||
|
|
b985853f15 | ||
|
|
94e607a93a | ||
|
|
f97a81fa14 | ||
|
|
6e28438eb4 | ||
|
|
8fcdf3f458 | ||
|
|
dbf0cc3562 | ||
|
|
27ccfa7e7a | ||
|
|
f37edbc670 | ||
|
|
b7943e83d2 | ||
|
|
300ed5b952 | ||
|
|
9e6ebfb3ec | ||
|
|
f49620790c | ||
|
|
84065688b5 | ||
|
|
5a1012fb0f | ||
|
|
4b6143c293 | ||
|
|
b6601b0d9a | ||
|
|
2870a1dd49 | ||
|
|
6249f7e293 | ||
|
|
6f9545e097 | ||
|
|
8095ba5cf9 | ||
|
|
e02128e5a3 | ||
|
|
2567b8c8b8 | ||
|
|
5bfcdec471 | ||
|
|
6609686a2b | ||
|
|
709aaf2285 | ||
|
|
6b3908d4dc | ||
|
|
9d19d02a0a | ||
|
|
533b059947 | ||
|
|
2a7c1dc4e4 | ||
|
|
07a920ed18 | ||
|
|
db36c874a0 | ||
|
|
cc58af74d6 | ||
|
|
1bcb95a9f0 | ||
|
|
e6a0216faf | ||
|
|
283ef46ac5 | ||
|
|
b4b1857562 | ||
|
|
c46c56bbf9 | ||
|
|
62ce2f6cac | ||
|
|
631c7befad | ||
|
|
bc18c34d60 | ||
|
|
6b6a1891c1 | ||
|
|
8879b115ef | ||
|
|
99c4c32d6d | ||
|
|
857da7774b | ||
|
|
3407e6bd1a | ||
|
|
553ad240f0 | ||
|
|
964ce1bb5a | ||
|
|
995aa6eddf | ||
|
|
095805e3ad | ||
|
|
b461ed238c | ||
|
|
01e7124189 | ||
|
|
acd3ac2f98 | ||
|
|
b50e4209e1 | ||
|
|
147b4e870c | ||
|
|
df8327d14c | ||
|
|
fb4d4b5953 | ||
|
|
de3701c045 | ||
|
|
9f9b7934cb | ||
|
|
bcded1dd17 | ||
|
|
8503af75ba | ||
|
|
158a50f1aa | ||
|
|
61da552dd6 | ||
|
|
fa838eecac | ||
|
|
71b6a58783 | ||
|
|
22dd78e286 | ||
|
|
e63fcf2630 | ||
|
|
98e1553c2e | ||
|
|
4dc506f17a | ||
|
|
3b396f29e9 | ||
|
|
1f128e69e6 | ||
|
|
f1487c92cb | ||
|
|
45066cdf44 | ||
|
|
7dde9c8207 | ||
|
|
fd964f825d | ||
|
|
1656c9874e | ||
|
|
d999a3b2ad | ||
|
|
cfb7c9e632 | ||
|
|
06e8472cf7 | ||
|
|
92404135d8 | ||
|
|
8b5cc23d7c | ||
|
|
e10b42bfdc | ||
|
|
36f7ec4836 | ||
|
|
f89d1c463e | ||
|
|
5dc652eba9 | ||
|
|
821b2bd50b | ||
|
|
8d5f6f1fa3 | ||
|
|
617f610c07 | ||
|
|
3229ba0106 | ||
|
|
d16a6e4716 | ||
|
|
4e5156fb0b | ||
|
|
3c013cc36b | ||
|
|
1ed83135be | ||
|
|
0e71ff2df1 | ||
|
|
d8e98ee476 | ||
|
|
1bc1e8a9b1 | ||
|
|
274fdeb49a | ||
|
|
d15c90b42f | ||
|
|
5be2917c47 | ||
|
|
5f08b24546 | ||
|
|
cc3026ffcb | ||
|
|
8cb6e56679 | ||
|
|
7da5ff4b1d | ||
|
|
5d1069d464 | ||
|
|
6e1a72f557 | ||
|
|
6f97a2cc7a | ||
|
|
6e402bffc3 | ||
|
|
e41d0f8e68 | ||
|
|
1a046744f2 | ||
|
|
a9bf011f2c | ||
|
|
60c76b3290 | ||
|
|
c7ff1e7044 | ||
|
|
e2deaef54a | ||
|
|
b2c7386c83 | ||
|
|
3dce84c3cf | ||
|
|
443b1ac158 | ||
|
|
be3dca3d94 | ||
|
|
cb135e4329 | ||
|
|
55c73b68bb | ||
|
|
eb793ba139 | ||
|
|
00908e8ebe | ||
|
|
5ce7ff86a4 | ||
|
|
4b34ee2993 | ||
|
|
646bd288ba | ||
|
|
8aba6f1ff8 | ||
|
|
35e5e328aa | ||
|
|
bdd4953d62 | ||
|
|
e938b298e2 | ||
|
|
b67f324e10 | ||
|
|
1dfa286af5 | ||
|
|
d4391bd4cc | ||
|
|
53eb71f26d | ||
|
|
92ffd654b5 | ||
|
|
36b83f1606 | ||
|
|
7a79f620c0 | ||
|
|
f3b286ecf3 | ||
|
|
adf31c3fcc | ||
|
|
deacdfc47c | ||
|
|
ac9badbe9e | ||
|
|
62beb0f78d | ||
|
|
5f9777f4af | ||
|
|
e00db4437a | ||
|
|
b0e4f2590d | ||
|
|
f0d58eac8c | ||
|
|
dae830d2b6 | ||
|
|
e3071e4e29 | ||
|
|
073d7ece23 | ||
|
|
071258ba33 | ||
|
|
c0e00dc69a | ||
|
|
6e5c136337 | ||
|
|
60428cd4cf | ||
|
|
c6b9d80eec | ||
|
|
953bdc10e5 | ||
|
|
becdbd2136 | ||
|
|
da9bb31259 | ||
|
|
8cbf036921 | ||
|
|
8f66e4a308 | ||
|
|
9627b612f2 | ||
|
|
8a9ded6d61 | ||
|
|
d89c772bd5 | ||
|
|
32137586b9 | ||
|
|
9a3e435175 | ||
|
|
01d5a10ebd | ||
|
|
040658fbfa | ||
|
|
51c00286a4 | ||
|
|
c3e274fc2f | ||
|
|
fe633c528a | ||
|
|
5e306d49f8 | ||
|
|
274259b7dd | ||
|
|
230e96c687 | ||
|
|
8c0c6e546d | ||
|
|
5e8541b936 | ||
|
|
300558f24e | ||
|
|
829f7d8aeb | ||
|
|
340f7db68a | ||
|
|
2fe987b5da | ||
|
|
5b3aa48cd6 | ||
|
|
080d96bfa1 | ||
|
|
7d9bf682b4 | ||
|
|
a913a4f59f | ||
|
|
2042c96d98 | ||
|
|
4ca0ff8426 | ||
|
|
554cc42d83 | ||
|
|
3f9e30d031 | ||
|
|
5a9ca8644c | ||
|
|
3f362d4b50 | ||
|
|
7360886c9a | ||
|
|
5b8a1b47b0 | ||
|
|
0506b262d2 | ||
|
|
17c4569f41 | ||
|
|
888ff83309 | ||
|
|
7191421470 | ||
|
|
e9c9aa5ce1 | ||
|
|
d98f3d8140 | ||
|
|
fbf659e4e1 | ||
|
|
6f7069aadd | ||
|
|
cef2c889f6 | ||
|
|
e42d6c422a | ||
|
|
2e9241b454 | ||
|
|
257a3b07fc | ||
|
|
df9322b392 | ||
|
|
28b5476bf3 | ||
|
|
70a61f045f | ||
|
|
238a8a8593 | ||
|
|
6f2d5c0045 | ||
|
|
fc798da398 | ||
|
|
0804483316 | ||
|
|
4a087f842e | ||
|
|
01c7bf0059 | ||
|
|
6c439516db | ||
|
|
0db4ee69ef | ||
|
|
aec8a7ac9a | ||
|
|
882bc8cb99 | ||
|
|
9aad701dfd | ||
|
|
f224f574be | ||
|
|
e201eaa315 | ||
|
|
b0ed1f2be0 | ||
|
|
4ac33e1c03 | ||
|
|
27ca517666 | ||
|
|
734e9c072d | ||
|
|
8db54f3093 | ||
|
|
886c0718d6 | ||
|
|
e160a2f21f | ||
|
|
e09a418423 | ||
|
|
52d4464368 | ||
|
|
4dc635e5f2 | ||
|
|
510fb7ee7e | ||
|
|
243451e94b | ||
|
|
11bbda977d | ||
|
|
62c050f394 | ||
|
|
bd5a013312 | ||
|
|
1823cf452e | ||
|
|
c426d72ccf | ||
|
|
ddf59c052d | ||
|
|
1dcf6e7fb1 | ||
|
|
d4f4792988 | ||
|
|
7e1f2bd10e | ||
|
|
a80a1d0c1d | ||
|
|
8ff747b4d7 | ||
|
|
aa63b5a581 | ||
|
|
2094ec3c99 | ||
|
|
bf30d10211 | ||
|
|
ccc03c9c6e | ||
|
|
4b7367e2dc | ||
|
|
00aa56a095 | ||
|
|
56ae93a2a5 | ||
|
|
adb32a09d3 | ||
|
|
3358d8e44c | ||
|
|
c3bd2698e8 | ||
|
|
a7baa4761d | ||
|
|
5dd2daa970 | ||
|
|
dd36a489ed | ||
|
|
2e742209e3 | ||
|
|
8d13464cba | ||
|
|
20fdcfa0af | ||
|
|
fac004f83c | ||
|
|
5fee4bbad1 | ||
|
|
18e4b18839 | ||
|
|
b8627fd384 | ||
|
|
4e2db6f8a5 | ||
|
|
b685a3afdd | ||
|
|
aea3f58970 | ||
|
|
b0bb90dc11 | ||
|
|
2132c2463f | ||
|
|
60bf6e2420 | ||
|
|
9badc9048c | ||
|
|
a74c1921f8 | ||
|
|
e6044f2e8d | ||
|
|
78d1afa25e | ||
|
|
4792adf524 | ||
|
|
4d8a99141b | ||
|
|
7954ddc1d0 | ||
|
|
216a1fd9d2 | ||
|
|
e5add6750c | ||
|
|
b7533650e1 | ||
|
|
6272f5ce5c | ||
|
|
bde0538efe | ||
|
|
5e6775fca0 | ||
|
|
e05e0dc40e | ||
|
|
96dbc6d348 | ||
|
|
0a63bd47e8 | ||
|
|
35dd50eb61 | ||
|
|
f70ed94c8c | ||
|
|
fb0c8600a2 | ||
|
|
5023bdd25d | ||
|
|
bf4917ccf2 | ||
|
|
64aff3aef4 | ||
|
|
62b87d1ed1 | ||
|
|
5872114c87 | ||
|
|
ce04246051 | ||
|
|
02b03d4533 | ||
|
|
ea396a2c20 | ||
|
|
8c083acf78 | ||
|
|
4edc1ff2ca | ||
|
|
ce76dc980d | ||
|
|
fc4cb9a044 | ||
|
|
a83eb5e729 | ||
|
|
1ab6af86c8 | ||
|
|
b95d2bdcdc | ||
|
|
29222fda9d | ||
|
|
13b22b38fd | ||
|
|
9f9d5546ef | ||
|
|
22d93baf20 | ||
|
|
a63ea8c884 | ||
|
|
41023c488e | ||
|
|
ebffc8af43 | ||
|
|
e7cb9fc5e2 | ||
|
|
bf92ffc1a7 | ||
|
|
4f88089cfe | ||
|
|
c0416189eb | ||
|
|
e2105cec87 | ||
|
|
6cb89c3cab | ||
|
|
9a1877de56 | ||
|
|
ea36b9e11c | ||
|
|
478104cf99 | ||
|
|
c1dd0cfaba | ||
|
|
15ce92b9e7 | ||
|
|
dd1b5f3421 | ||
|
|
b8a11be1a5 | ||
|
|
1e308dc6ce | ||
|
|
117ce28ddc | ||
|
|
85296de51d | ||
|
|
0b659326d9 | ||
|
|
f35f244deb | ||
|
|
9ee86df69d | ||
|
|
daa5cbdd4b | ||
|
|
17b7a7bea9 | ||
|
|
bcbe0d8060 | ||
|
|
3fdea52ff9 | ||
|
|
3cd5a87e20 | ||
|
|
4625f66ebd | ||
|
|
0c6c6677a7 | ||
|
|
2db627b79d | ||
|
|
7064f4ee40 | ||
|
|
bf06e9c63c | ||
|
|
c65336e63b | ||
|
|
ac72e944a7 | ||
|
|
fdb74b7971 | ||
|
|
b7eca1d069 | ||
|
|
4930028674 | ||
|
|
14a82717f1 | ||
|
|
9a31d49bc9 | ||
|
|
f8ddda9a4a | ||
|
|
9d0b0c6e41 | ||
|
|
7e584be2cd | ||
|
|
4dd640636c | ||
|
|
0a3ed02a33 | ||
|
|
97792dbad0 | ||
|
|
25ab63c969 | ||
|
|
6e06b13bf3 | ||
|
|
6cf5892e27 | ||
|
|
f65b7ec546 | ||
|
|
a36c2eabb3 | ||
|
|
be93c55c0b | ||
|
|
eeefbeaed4 | ||
|
|
027bc6ab5a | ||
|
|
890de6a625 | ||
|
|
537d508a1e | ||
|
|
3b98cdac4b | ||
|
|
aaf7d6b1cd | ||
|
|
d4b6814d40 | ||
|
|
a85f11aaef | ||
|
|
090c3ef9fc | ||
|
|
46c8cb1a68 | ||
|
|
faeb053ea6 | ||
|
|
708a09b86a | ||
|
|
89403e93e4 | ||
|
|
ecb0c08fe2 | ||
|
|
0b88c158b9 | ||
|
|
ec3a38107a | ||
|
|
0c0f1c6eb5 | ||
|
|
ed296ef733 | ||
|
|
246f47ec95 | ||
|
|
9d95b99b72 | ||
|
|
3de8ae9d7e | ||
|
|
44f6e1904e | ||
|
|
d9c84fc4ce | ||
|
|
b5142d935b | ||
|
|
718a451110 | ||
|
|
9755847855 | ||
|
|
abc417b6b3 | ||
|
|
d6f71c8d7b | ||
|
|
d90892dc9c | ||
|
|
60d2f8b96c | ||
|
|
2488adf80d | ||
|
|
9deb5b31d2 | ||
|
|
ae55823c3c | ||
|
|
d3395553fe | ||
|
|
e742dd3a48 | ||
|
|
4f0f44e746 | ||
|
|
0da98a7f5d | ||
|
|
685989ae57 | ||
|
|
6bc121e7b1 | ||
|
|
56d3fed954 | ||
|
|
40bbff9bee | ||
|
|
66ab011f4a | ||
|
|
f4237d3db0 | ||
|
|
6f9a083dba | ||
|
|
688fcc6a5b | ||
|
|
847102cf62 | ||
|
|
25d5b9c9cf | ||
|
|
271bab786e | ||
|
|
028e023aba | ||
|
|
39719eed20 | ||
|
|
438339258d | ||
|
|
be445c987c | ||
|
|
93fef7885b | ||
|
|
899c9962ad | ||
|
|
2b601d2424 | ||
|
|
3e36b05434 | ||
|
|
59c9665c3f | ||
|
|
901137c7f6 | ||
|
|
e594e7bbbb | ||
|
|
a477b1c22e | ||
|
|
22ac20d838 | ||
|
|
3794234d7a | ||
|
|
92a40db048 | ||
|
|
502aad7c2b | ||
|
|
b49afb61a6 | ||
|
|
d380902ad3 | ||
|
|
ffaed62094 | ||
|
|
b0adeb68fe | ||
|
|
2372832654 | ||
|
|
e6a9586b7e | ||
|
|
9687415eed | ||
|
|
49b375ed6a | ||
|
|
906dea096e | ||
|
|
3225a83084 | ||
|
|
87794cfcc5 | ||
|
|
79ad0ce0c4 | ||
|
|
fda5987465 | ||
|
|
5cfdd5a6b2 | ||
|
|
bd6e0f9f93 | ||
|
|
aa8d002309 | ||
|
|
42ce9aca86 | ||
|
|
156f596189 | ||
|
|
8acfd5bf71 | ||
|
|
76c99ebb28 | ||
|
|
5fb119b99c | ||
|
|
99b766d9cb | ||
|
|
c207cf9b40 | ||
|
|
dd00ac4621 | ||
|
|
3d18a067a0 | ||
|
|
c48571a799 | ||
|
|
6eeb6983d9 | ||
|
|
aee33f040d | ||
|
|
b100677b3b | ||
|
|
9241b3ae2f | ||
|
|
1088da6871 | ||
|
|
f7b4dd4458 | ||
|
|
fb85b6b27a | ||
|
|
2e5e9b9a6f | ||
|
|
d3cc306e5b | ||
|
|
d6c6a2a271 | ||
|
|
6171a58ae3 | ||
|
|
5a6d1a135f | ||
|
|
68deab9007 | ||
|
|
d6114e2bef | ||
|
|
5fdc55f3fb | ||
|
|
751b166536 | ||
|
|
6ffc8d97f4 | ||
|
|
67a80d6b83 | ||
|
|
934cf772bc | ||
|
|
b01a24afdb | ||
|
|
0ad75b52bf | ||
|
|
050772e78a | ||
|
|
7c05dc1420 | ||
|
|
bdd25ac727 | ||
|
|
3a27328828 | ||
|
|
c076a5620f | ||
|
|
2bd8ef9eed | ||
|
|
500014f2fc | ||
|
|
17687e9bcd | ||
|
|
90354e9fe7 | ||
|
|
6236631beb | ||
|
|
75aefdddd6 | ||
|
|
566d82e873 | ||
|
|
44ae0b654e | ||
|
|
d8cfaae596 | ||
|
|
a40e0f21ee | ||
|
|
ac1f506c98 | ||
|
|
68d5bdcf3d | ||
|
|
beb51f8c67 | ||
|
|
b881cb7111 | ||
|
|
d83bc59257 | ||
|
|
5be9f297de | ||
|
|
51d440431e | ||
|
|
7cf061122c | ||
|
|
1254368505 | ||
|
|
9d4b830c5f | ||
|
|
37401b4363 | ||
|
|
10fe08e14f | ||
|
|
0ecdb35d50 | ||
|
|
caee8fe9ef | ||
|
|
7d92c27b2d | ||
|
|
701eabbaba | ||
|
|
e74a1b2d1a | ||
|
|
e087b02333 | ||
|
|
eea7f902b5 | ||
|
|
db7583201b | ||
|
|
023001a8b1 | ||
|
|
4ff8ab2435 | ||
|
|
d2cccbfce6 | ||
|
|
970e6c400c | ||
|
|
b4cb7345a1 | ||
|
|
7e75d8c1a3 | ||
|
|
a4ea551160 | ||
|
|
f56ad447a0 | ||
|
|
7656422057 | ||
|
|
afa2231add | ||
|
|
21fe0a2006 | ||
|
|
23acd3cec6 | ||
|
|
7892f88a42 | ||
|
|
aae0e3bec7 | ||
|
|
0f8bf39421 | ||
|
|
36fd96cc6c | ||
|
|
3de08e9f3b | ||
|
|
3e739724b3 | ||
|
|
847e538c69 | ||
|
|
64684dd486 | ||
|
|
a229747249 | ||
|
|
d1b59c3543 | ||
|
|
b241441e37 | ||
|
|
40bfa25b1b | ||
|
|
c5a4386c1d | ||
|
|
b3aa3be4b8 | ||
|
|
528aefcc1e | ||
|
|
620ee2b7e4 | ||
|
|
d55acc246a | ||
|
|
2a59db3029 | ||
|
|
990dec0fec | ||
|
|
162b17b249 | ||
|
|
e0aea30618 | ||
|
|
49cba94178 | ||
|
|
7dd87815f3 | ||
|
|
f6fdde816f | ||
|
|
4c8c6ff236 | ||
|
|
46b615a963 | ||
|
|
8e293dd633 | ||
|
|
e040753b27 | ||
|
|
463aaf094d | ||
|
|
bf867b028d | ||
|
|
6dfefc2fe4 | ||
|
|
9ba8a8454c | ||
|
|
9c72839bfa | ||
|
|
2e24c92799 | ||
|
|
fa98c8aeeb | ||
|
|
f92e3496b1 | ||
|
|
0ceea76aa4 | ||
|
|
897d11a1e1 |
@@ -1,506 +0,0 @@
|
||||
version: 2
|
||||
jobs:
|
||||
install:
|
||||
docker:
|
||||
- image: circleci/node:10
|
||||
working_directory: ~/repo
|
||||
environment:
|
||||
GOPATH: $HOME/go
|
||||
steps:
|
||||
- checkout
|
||||
- restore_cache:
|
||||
keys:
|
||||
- v1-dependencies-{{ checksum "yarn.lock" }}
|
||||
# fallback to using the latest cache if no exact match is found
|
||||
- v1-dependencies-
|
||||
- run:
|
||||
name: Updating apt packages
|
||||
command: sudo apt-get update
|
||||
- run:
|
||||
name: Installing the latest version of Go
|
||||
command: sudo apt-get install golang-go
|
||||
- run:
|
||||
name: Installing Dependencies
|
||||
command: yarn install --check-files --frozen-lockfile
|
||||
- save_cache:
|
||||
paths:
|
||||
- node_modules
|
||||
- packages/gatsby-plugin-now/node_modules
|
||||
- packages/now-build-utils/node_modules
|
||||
- packages/now-cgi/node_modules
|
||||
- packages/now-cli/node_modules
|
||||
- packages/now-client/node_modules
|
||||
- packages/now-go/node_modules
|
||||
- packages/now-next/node_modules
|
||||
- packages/now-node/node_modules
|
||||
- packages/now-node-bridge/node_modules
|
||||
- packages/now-python/node_modules
|
||||
- packages/now-routing-utils/node_modules
|
||||
- packages/now-ruby/node_modules
|
||||
- packages/now-static-build/node_modules
|
||||
key: v1-dependencies-{{ checksum "yarn.lock" }}
|
||||
- persist_to_workspace:
|
||||
root: .
|
||||
paths:
|
||||
- node_modules
|
||||
- packages/gatsby-plugin-now/node_modules
|
||||
- packages/now-build-utils/node_modules
|
||||
- packages/now-cgi/node_modules
|
||||
- packages/now-cli/node_modules
|
||||
- packages/now-client/node_modules
|
||||
- packages/now-go/node_modules
|
||||
- packages/now-next/node_modules
|
||||
- packages/now-node/node_modules
|
||||
- packages/now-node-bridge/node_modules
|
||||
- packages/now-python/node_modules
|
||||
- packages/now-routing-utils/node_modules
|
||||
- packages/now-ruby/node_modules
|
||||
- packages/now-static-build/node_modules
|
||||
|
||||
build:
|
||||
docker:
|
||||
- image: circleci/node:10
|
||||
working_directory: ~/repo
|
||||
steps:
|
||||
- checkout
|
||||
- run:
|
||||
name: Installing apt dependencies
|
||||
command: sudo apt install -y rsync
|
||||
- attach_workspace:
|
||||
at: .
|
||||
- run:
|
||||
name: Linking dependencies
|
||||
command: yarn bootstrap
|
||||
- run:
|
||||
name: Building
|
||||
command: yarn build
|
||||
- store_artifacts:
|
||||
path: packages/now-cli/dist
|
||||
- persist_to_workspace:
|
||||
root: .
|
||||
paths:
|
||||
- packages/gatsby-plugin-now/test/fixtures
|
||||
- packages/now-build-utils/dist
|
||||
- packages/now-cgi/dist
|
||||
- packages/now-cli/dist
|
||||
- packages/now-cli/assets
|
||||
- packages/now-client/dist
|
||||
- packages/now-go/dist
|
||||
- packages/now-next/dist
|
||||
- packages/now-node/dist
|
||||
- packages/now-node/test/fixtures/15-helpers/ts/types.d.ts
|
||||
- packages/now-node/test/fixtures/11-symlinks/symlink
|
||||
- packages/now-node-bridge/index.js
|
||||
- packages/now-node-bridge/bridge.js
|
||||
- packages/now-python/dist
|
||||
- packages/now-routing-utils/dist
|
||||
- packages/now-ruby/dist
|
||||
- packages/now-static-build/dist
|
||||
- packages/now-static-build/test/fixtures/10a-gatsby-redirects/plugins
|
||||
|
||||
test-lint:
|
||||
docker:
|
||||
- image: circleci/node:10
|
||||
working_directory: ~/repo
|
||||
steps:
|
||||
- checkout
|
||||
- attach_workspace:
|
||||
at: .
|
||||
- run:
|
||||
name: Compiling `now dev` HTML error templates
|
||||
command: node packages/now-cli/scripts/compile-templates.js
|
||||
- run:
|
||||
name: Linting Code
|
||||
command: yarn test-lint
|
||||
|
||||
test-integration-macos-node-8:
|
||||
macos:
|
||||
xcode: '9.0.1'
|
||||
working_directory: ~/repo
|
||||
steps:
|
||||
- checkout
|
||||
- attach_workspace:
|
||||
at: .
|
||||
- run:
|
||||
name: Output version
|
||||
command: node --version
|
||||
- run:
|
||||
name: Running Integration Tests
|
||||
command: yarn test-integration --clean false
|
||||
|
||||
test-integration-macos-node-10:
|
||||
macos:
|
||||
xcode: '10.0.0'
|
||||
working_directory: ~/repo
|
||||
steps:
|
||||
- checkout
|
||||
- attach_workspace:
|
||||
at: .
|
||||
- run:
|
||||
name: Output version
|
||||
command: node --version
|
||||
- run:
|
||||
name: Running Integration Tests
|
||||
command: yarn test-integration --clean false
|
||||
|
||||
test-integration-macos-node-12:
|
||||
macos:
|
||||
xcode: '10.3.0'
|
||||
working_directory: ~/repo
|
||||
steps:
|
||||
- checkout
|
||||
- attach_workspace:
|
||||
at: .
|
||||
- run:
|
||||
name: Output version
|
||||
command: node --version
|
||||
- run:
|
||||
name: Running Integration Tests
|
||||
command: yarn test-integration --clean false
|
||||
|
||||
test-integration-linux-node-8:
|
||||
docker:
|
||||
- image: circleci/node:8
|
||||
working_directory: ~/repo
|
||||
steps:
|
||||
- checkout
|
||||
- attach_workspace:
|
||||
at: .
|
||||
- run:
|
||||
name: Output version
|
||||
command: node --version
|
||||
- run:
|
||||
name: Running Integration Tests
|
||||
command: yarn test-integration --clean false
|
||||
|
||||
test-integration-linux-node-10:
|
||||
docker:
|
||||
- image: circleci/node:10
|
||||
working_directory: ~/repo
|
||||
steps:
|
||||
- checkout
|
||||
- attach_workspace:
|
||||
at: .
|
||||
- run:
|
||||
name: Output version
|
||||
command: node --version
|
||||
- run:
|
||||
name: Running Integration Tests
|
||||
command: yarn test-integration --clean false
|
||||
|
||||
test-integration-linux-node-12:
|
||||
docker:
|
||||
- image: circleci/node:12
|
||||
working_directory: ~/repo
|
||||
steps:
|
||||
- checkout
|
||||
- attach_workspace:
|
||||
at: .
|
||||
- run:
|
||||
name: Output version
|
||||
command: node --version
|
||||
- run:
|
||||
name: Running Integration Tests
|
||||
command: yarn test-integration --clean false
|
||||
|
||||
test-integration-macos-now-dev-node-8:
|
||||
macos:
|
||||
xcode: '9.0.1'
|
||||
working_directory: ~/repo
|
||||
steps:
|
||||
- checkout
|
||||
- attach_workspace:
|
||||
at: .
|
||||
- run:
|
||||
name: Output version
|
||||
command: node --version
|
||||
- run:
|
||||
name: Downloading Hugo
|
||||
command: curl -L -O https://github.com/gohugoio/hugo/releases/download/v0.56.0/hugo_0.56.0_macOS-64bit.tar.gz && tar -xzf hugo_0.56.0_macOS-64bit.tar.gz && mv ./hugo packages/now-cli/test/dev/fixtures/08-hugo/
|
||||
- run:
|
||||
name: Running Integration Tests for `now dev`
|
||||
command: yarn test-integration-now-dev --clean false
|
||||
|
||||
test-integration-macos-now-dev-node-10:
|
||||
macos:
|
||||
xcode: '10.0.0'
|
||||
working_directory: ~/repo
|
||||
steps:
|
||||
- checkout
|
||||
- attach_workspace:
|
||||
at: .
|
||||
- run:
|
||||
name: Output version
|
||||
command: node --version
|
||||
- run:
|
||||
name: Downloading Hugo
|
||||
command: curl -L -O https://github.com/gohugoio/hugo/releases/download/v0.56.0/hugo_0.56.0_macOS-64bit.tar.gz && tar -xzf hugo_0.56.0_macOS-64bit.tar.gz && mv ./hugo packages/now-cli/test/dev/fixtures/08-hugo/
|
||||
- run:
|
||||
name: Running Integration Tests for `now dev`
|
||||
command: yarn test-integration-now-dev --clean false
|
||||
|
||||
test-integration-macos-now-dev-node-12:
|
||||
macos:
|
||||
xcode: '10.3.0'
|
||||
working_directory: ~/repo
|
||||
steps:
|
||||
- checkout
|
||||
- attach_workspace:
|
||||
at: .
|
||||
- run:
|
||||
name: Output version
|
||||
command: node --version
|
||||
- run:
|
||||
name: Downloading Hugo
|
||||
command: curl -L -O https://github.com/gohugoio/hugo/releases/download/v0.56.0/hugo_0.56.0_macOS-64bit.tar.gz && tar -xzf hugo_0.56.0_macOS-64bit.tar.gz && mv ./hugo packages/now-cli/test/dev/fixtures/08-hugo/
|
||||
- run:
|
||||
name: Running Integration Tests for `now dev`
|
||||
command: yarn test-integration-now-dev --clean false
|
||||
|
||||
test-integration-linux-now-dev-node-8:
|
||||
docker:
|
||||
- image: circleci/node:8
|
||||
working_directory: ~/repo
|
||||
steps:
|
||||
- checkout
|
||||
- attach_workspace:
|
||||
at: .
|
||||
- run:
|
||||
name: Output version
|
||||
command: node --version
|
||||
- run:
|
||||
name: Downloading Hugo
|
||||
command: curl -L -O https://github.com/gohugoio/hugo/releases/download/v0.55.6/hugo_0.55.6_Linux-64bit.tar.gz && tar -xzf hugo_0.55.6_Linux-64bit.tar.gz && mv ./hugo packages/now-cli/test/dev/fixtures/08-hugo/
|
||||
- run:
|
||||
name: Running Integration Tests for `now dev`
|
||||
command: yarn test-integration-now-dev --clean false
|
||||
|
||||
test-integration-linux-now-dev-node-10:
|
||||
docker:
|
||||
- image: circleci/node:10
|
||||
working_directory: ~/repo
|
||||
steps:
|
||||
- checkout
|
||||
- attach_workspace:
|
||||
at: .
|
||||
- run:
|
||||
name: Output version
|
||||
command: node --version
|
||||
- run:
|
||||
name: Downloading Hugo
|
||||
command: curl -L -O https://github.com/gohugoio/hugo/releases/download/v0.55.6/hugo_0.55.6_Linux-64bit.tar.gz && tar -xzf hugo_0.55.6_Linux-64bit.tar.gz && mv ./hugo packages/now-cli/test/dev/fixtures/08-hugo/
|
||||
- run:
|
||||
name: Running Integration Tests for `now dev`
|
||||
command: yarn test-integration-now-dev --clean false
|
||||
|
||||
test-integration-linux-now-dev-node-12:
|
||||
docker:
|
||||
- image: circleci/node:12
|
||||
working_directory: ~/repo
|
||||
steps:
|
||||
- checkout
|
||||
- attach_workspace:
|
||||
at: .
|
||||
- run:
|
||||
name: Output version
|
||||
command: node --version
|
||||
- run:
|
||||
name: Downloading Hugo
|
||||
command: curl -L -O https://github.com/gohugoio/hugo/releases/download/v0.55.6/hugo_0.55.6_Linux-64bit.tar.gz && tar -xzf hugo_0.55.6_Linux-64bit.tar.gz && mv ./hugo packages/now-cli/test/dev/fixtures/08-hugo/
|
||||
- run:
|
||||
name: Running Integration Tests for `now dev`
|
||||
command: yarn test-integration-now-dev --clean false
|
||||
|
||||
test-integration-once:
|
||||
docker:
|
||||
- image: circleci/node:10
|
||||
working_directory: ~/repo
|
||||
steps:
|
||||
- checkout
|
||||
- attach_workspace:
|
||||
at: .
|
||||
- run:
|
||||
name: Output version
|
||||
command: node --version
|
||||
- run:
|
||||
name: Running Integration Tests Once
|
||||
command: yarn test-integration-once --clean false
|
||||
|
||||
test-unit:
|
||||
docker:
|
||||
- image: circleci/node:10
|
||||
working_directory: ~/repo
|
||||
steps:
|
||||
- checkout
|
||||
- attach_workspace:
|
||||
at: .
|
||||
- run:
|
||||
name: Compiling `now dev` HTML error templates
|
||||
command: node packages/now-cli/scripts/compile-templates.js
|
||||
- run:
|
||||
name: Output version
|
||||
command: node --version
|
||||
- run:
|
||||
name: Running Unit Tests
|
||||
command: yarn test-unit --clean false
|
||||
|
||||
coverage:
|
||||
docker:
|
||||
- image: circleci/node:10
|
||||
working_directory: ~/repo
|
||||
steps:
|
||||
- checkout
|
||||
- attach_workspace:
|
||||
at: .
|
||||
- run:
|
||||
name: Compiling `now dev` HTML error templates
|
||||
command: node packages/now-cli/scripts/compile-templates.js
|
||||
- run:
|
||||
name: Run unit tests
|
||||
command: yarn workspace now run test-unit
|
||||
- run:
|
||||
name: Run coverage report
|
||||
command: yarn workspace now run coverage
|
||||
|
||||
source-maps:
|
||||
docker:
|
||||
- image: circleci/node:10
|
||||
working_directory: ~/repo
|
||||
steps:
|
||||
- checkout
|
||||
- attach_workspace:
|
||||
at: .
|
||||
- run:
|
||||
name: Installing Sentry CLI
|
||||
command: npm install -g @sentry/cli
|
||||
- run:
|
||||
name: Creating a New Sentry Release
|
||||
command: sentry-cli releases new now-cli@`git describe --tags`
|
||||
- run:
|
||||
name: Upload Sourcemap Files
|
||||
command: sentry-cli releases files now-cli@`git describe --tags` upload-sourcemaps ./dist
|
||||
- run:
|
||||
name: Finalize Sentry Release
|
||||
command: sentry-cli releases finalize now-cli@`git describe --tags`
|
||||
|
||||
workflows:
|
||||
version: 2
|
||||
unscheduled:
|
||||
jobs:
|
||||
- install:
|
||||
filters:
|
||||
tags:
|
||||
only: /.*/
|
||||
- build:
|
||||
requires:
|
||||
- install
|
||||
filters:
|
||||
tags:
|
||||
only: /.*/
|
||||
- test-lint:
|
||||
requires:
|
||||
- build
|
||||
filters:
|
||||
tags:
|
||||
only: /.*/
|
||||
- test-integration-macos-node-8:
|
||||
requires:
|
||||
- build
|
||||
filters:
|
||||
tags:
|
||||
only: /.*/
|
||||
- test-integration-macos-node-10:
|
||||
requires:
|
||||
- build
|
||||
filters:
|
||||
tags:
|
||||
only: /.*/
|
||||
- test-integration-macos-node-12:
|
||||
requires:
|
||||
- build
|
||||
filters:
|
||||
tags:
|
||||
only: /.*/
|
||||
- test-integration-linux-node-8:
|
||||
requires:
|
||||
- build
|
||||
filters:
|
||||
tags:
|
||||
only: /.*/
|
||||
- test-integration-linux-node-10:
|
||||
requires:
|
||||
- build
|
||||
filters:
|
||||
tags:
|
||||
only: /.*/
|
||||
- test-integration-linux-node-12:
|
||||
requires:
|
||||
- build
|
||||
filters:
|
||||
tags:
|
||||
only: /.*/
|
||||
- test-integration-macos-now-dev-node-8:
|
||||
requires:
|
||||
- build
|
||||
filters:
|
||||
tags:
|
||||
only: /.*/
|
||||
- test-integration-macos-now-dev-node-10:
|
||||
requires:
|
||||
- build
|
||||
filters:
|
||||
tags:
|
||||
only: /.*/
|
||||
- test-integration-macos-now-dev-node-12:
|
||||
requires:
|
||||
- build
|
||||
filters:
|
||||
tags:
|
||||
only: /.*/
|
||||
- test-integration-linux-now-dev-node-8:
|
||||
requires:
|
||||
- build
|
||||
filters:
|
||||
tags:
|
||||
only: /.*/
|
||||
- test-integration-linux-now-dev-node-10:
|
||||
requires:
|
||||
- build
|
||||
filters:
|
||||
tags:
|
||||
only: /.*/
|
||||
- test-integration-linux-now-dev-node-12:
|
||||
requires:
|
||||
- build
|
||||
filters:
|
||||
tags:
|
||||
only: /.*/
|
||||
- test-integration-once:
|
||||
requires:
|
||||
- build
|
||||
- test-unit:
|
||||
requires:
|
||||
- build
|
||||
filters:
|
||||
tags:
|
||||
only: /.*/
|
||||
- coverage:
|
||||
requires:
|
||||
- test-integration-macos-node-8
|
||||
- test-integration-macos-node-10
|
||||
- test-integration-macos-node-12
|
||||
- test-integration-linux-node-8
|
||||
- test-integration-linux-node-10
|
||||
- test-integration-linux-node-12
|
||||
- test-integration-macos-now-dev-node-8
|
||||
- test-integration-macos-now-dev-node-10
|
||||
- test-integration-macos-now-dev-node-12
|
||||
- test-integration-linux-now-dev-node-8
|
||||
- test-integration-linux-now-dev-node-10
|
||||
- test-integration-linux-now-dev-node-12
|
||||
- test-integration-once
|
||||
- test-unit
|
||||
- test-lint
|
||||
filters:
|
||||
tags:
|
||||
only: /.*/
|
||||
@@ -1,9 +1,13 @@
|
||||
node_modules
|
||||
dist
|
||||
examples
|
||||
|
||||
# gatsby-plugin-now
|
||||
packages/gatsby-plugin-now/test/fixtures
|
||||
|
||||
# now-build-utils
|
||||
packages/now-build-utils/test/fixtures
|
||||
|
||||
# now-cli
|
||||
packages/now-cli/@types
|
||||
packages/now-cli/download
|
||||
|
||||
@@ -1,64 +0,0 @@
|
||||
{
|
||||
"root": true,
|
||||
"parser": "@typescript-eslint/parser",
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 2018,
|
||||
"sourceType": "module",
|
||||
"modules": true
|
||||
},
|
||||
"extends": [
|
||||
"eslint:recommended",
|
||||
"plugin:@typescript-eslint/eslint-recommended",
|
||||
"plugin:@typescript-eslint/recommended",
|
||||
"prettier",
|
||||
"prettier/@typescript-eslint"
|
||||
],
|
||||
"env": {
|
||||
"node": true,
|
||||
"jest": true,
|
||||
"es6": true
|
||||
},
|
||||
"rules": {
|
||||
"require-atomic-updates": 0,
|
||||
"@typescript-eslint/ban-ts-ignore": 0,
|
||||
"@typescript-eslint/camelcase": 0,
|
||||
"@typescript-eslint/explicit-function-return-type": 0,
|
||||
"@typescript-eslint/no-empty-function": 0,
|
||||
"@typescript-eslint/no-use-before-define": 0
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
"files": ["**/*.js"],
|
||||
"rules": {
|
||||
"@typescript-eslint/no-var-requires": "off"
|
||||
}
|
||||
},
|
||||
{
|
||||
"files": ["packages/now-cli/**/*"],
|
||||
"rules": {
|
||||
"lines-between-class-members": 0,
|
||||
"no-async-promise-executor": 0,
|
||||
"no-control-regex": 0,
|
||||
"no-empty": 0,
|
||||
"prefer-const": 0,
|
||||
"prefer-destructuring": 0,
|
||||
"@typescript-eslint/ban-types": 0,
|
||||
"@typescript-eslint/consistent-type-assertions": 0,
|
||||
"@typescript-eslint/member-delimiter-style": 0,
|
||||
"@typescript-eslint/no-empty-function": 0,
|
||||
"@typescript-eslint/no-explicit-any": 0,
|
||||
"@typescript-eslint/no-inferrable-types": 0,
|
||||
"@typescript-eslint/no-var-requires": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"files": ["packages/now-client/**/*"],
|
||||
"rules": {
|
||||
"prefer-const": 0,
|
||||
"require-atomic-updates": 0,
|
||||
"@typescript-eslint/ban-ts-ignore": 0,
|
||||
"@typescript-eslint/no-explicit-any": 0
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
4
.gitattributes
vendored
4
.gitattributes
vendored
@@ -1,3 +1,7 @@
|
||||
# Ignore test fixtures in GitHub Languages
|
||||
# See https://github.com/github/linguist#vendored-code
|
||||
packages/*/test/* linguist-vendored
|
||||
|
||||
# Go build fails with Windows line endings.
|
||||
*.go text eol=lf
|
||||
go.mod text eol=lf
|
||||
|
||||
14
.github/CODEOWNERS
vendored
14
.github/CODEOWNERS
vendored
@@ -2,17 +2,27 @@
|
||||
# https://help.github.com/en/articles/about-code-owners
|
||||
|
||||
* @tootallnate @leo
|
||||
/.github/workflows @AndyBitz @styfle
|
||||
/packages/frameworks @AndyBitz
|
||||
/packages/now-cli/src/commands/dev/ @tootallnate @leo @styfle @AndyBitz
|
||||
/packages/now-cli/src/util/dev/ @tootallnate @leo @styfle @AndyBitz
|
||||
/packages/now-cli/src/commands/domains/ @javivelasco @mglagola @anatrajkovska
|
||||
/packages/now-cli/src/commands/certs/ @javivelasco @mglagola @anatrajkovska
|
||||
/packages/now-cli/src/commands/env @styfle @lucleray
|
||||
/packages/now-client @leo @rdev
|
||||
/packages/now-build-utils @styfle @AndyBitz
|
||||
/packages/now-node @styfle @tootallnate @lucleray
|
||||
/packages/now-node-bridge @styfle @tootallnate @lucleray
|
||||
/packages/now-next @Timer
|
||||
/packages/now-next @Timer @ijjk
|
||||
/packages/now-go @styfle @sophearak
|
||||
/packages/now-python @styfle @sophearak
|
||||
/packages/now-ruby @styfle @coetry @nathancahill
|
||||
/packages/now-static-build @styfle @AndyBitz
|
||||
/packages/now-routing-utils @dav-is
|
||||
/packages/now-routing-utils @styfle @dav-is @ijjk
|
||||
|
||||
/examples @msweeneydev @timothyis
|
||||
/examples/create-react-app @Timer
|
||||
/examples/nextjs @timneutkens
|
||||
/examples/hugo @msweeneydev @timothyis @styfle
|
||||
/examples/jekyll @msweeneydev @timothyis @sarupbanskota
|
||||
/examples/zola @msweeneydev @timothyis @styfle
|
||||
|
||||
36
CODE_OF_CONDUCT.md → .github/CODE_OF_CONDUCT.md
vendored
36
CODE_OF_CONDUCT.md → .github/CODE_OF_CONDUCT.md
vendored
@@ -1,28 +1,28 @@
|
||||
## Code of Conduct
|
||||
|
||||
### Our Pledge
|
||||
### Our Pledge
|
||||
|
||||
In the interest of fostering an open and welcoming environment, we as
|
||||
In the interest of fostering an open and welcoming environment, we as
|
||||
contributors and maintainers pledge to making participation in our project and
|
||||
our community a harassment-free experience for everyone, regardless of age, body
|
||||
size, disability, ethnicity, gender identity and expression, level of experience,
|
||||
nationality, personal appearance, race, religion, or sexual identity and
|
||||
orientation.
|
||||
|
||||
### Our Standards
|
||||
### Our Standards
|
||||
|
||||
Examples of behavior that contributes to creating a positive environment
|
||||
Examples of behavior that contributes to creating a positive environment
|
||||
include:
|
||||
|
||||
- Using welcoming and inclusive language
|
||||
- Using welcoming and inclusive language
|
||||
- Being respectful of differing viewpoints and experiences
|
||||
- Gracefully accepting constructive criticism
|
||||
- Focusing on what is best for the community
|
||||
- Showing empathy towards other community members
|
||||
|
||||
Examples of unacceptable behavior by participants include:
|
||||
Examples of unacceptable behavior by participants include:
|
||||
|
||||
- The use of sexualized language or imagery and unwelcome sexual attention or
|
||||
- The use of sexualized language or imagery and unwelcome sexual attention or
|
||||
advances
|
||||
- Trolling, insulting/derogatory comments, and personal or political attacks
|
||||
- Public or private harassment
|
||||
@@ -31,44 +31,44 @@ include:
|
||||
- Other conduct which could reasonably be considered inappropriate in a
|
||||
professional setting
|
||||
|
||||
### Our Responsibilities
|
||||
### Our Responsibilities
|
||||
|
||||
Project maintainers are responsible for clarifying the standards of acceptable
|
||||
Project maintainers are responsible for clarifying the standards of acceptable
|
||||
behavior and are expected to take appropriate and fair corrective action in
|
||||
response to any instances of unacceptable behavior.
|
||||
|
||||
Project maintainers have the right and responsibility to remove, edit, or
|
||||
Project maintainers have the right and responsibility to remove, edit, or
|
||||
reject comments, commits, code, wiki edits, issues, and other contributions
|
||||
that are not aligned to this Code of Conduct, or to ban temporarily or
|
||||
permanently any contributor for other behaviors that they deem inappropriate,
|
||||
threatening, offensive, or harmful.
|
||||
|
||||
### Scope
|
||||
### Scope
|
||||
|
||||
This Code of Conduct applies both within project spaces and in public spaces
|
||||
This Code of Conduct applies both within project spaces and in public spaces
|
||||
when an individual is representing the project or its community. Examples of
|
||||
representing a project or community include using an official project e-mail
|
||||
address, posting via an official social media account, or acting as an appointed
|
||||
representative at an online or offline event. Representation of a project may be
|
||||
further defined and clarified by project maintainers.
|
||||
|
||||
### Enforcement
|
||||
### Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||
reported by contacting the project team at [abuse@zeit.co](mailto:abuse@zeit.co). All
|
||||
complaints will be reviewed and investigated and will result in a response that
|
||||
is deemed necessary and appropriate to the circumstances. The project team is
|
||||
obligated to maintain confidentiality with regard to the reporter of an incident.
|
||||
Further details of specific enforcement policies may be posted separately.
|
||||
|
||||
Project maintainers who do not follow or enforce the Code of Conduct in good
|
||||
Project maintainers who do not follow or enforce the Code of Conduct in good
|
||||
faith may face temporary or permanent repercussions as determined by other
|
||||
members of the project's leadership.
|
||||
|
||||
### Attribution
|
||||
### Attribution
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
||||
available at [http://contributor-covenant.org/version/1/4][version]
|
||||
|
||||
[homepage]: http://contributor-covenant.org
|
||||
[homepage]: http://contributor-covenant.org
|
||||
[version]: http://contributor-covenant.org/version/1/4/
|
||||
11
CONTRIBUTING.md → .github/CONTRIBUTING.md
vendored
11
CONTRIBUTING.md → .github/CONTRIBUTING.md
vendored
@@ -1,6 +1,6 @@
|
||||
# Contributing
|
||||
|
||||
When contributing to this repository, please first discuss the change you wish to make via [GitHub Issue](https://github.com/zeit/now/issues/new) or [Spectrum](https://spectrum.chat/zeit) with the owners of this repository before submitting a Pull Request.
|
||||
When contributing to this repository, please first discuss the change you wish to make via [GitHub Discussions](https://github.com/zeit/now/discussions/new) with the owners of this repository before submitting a Pull Request.
|
||||
|
||||
Please read our [code of conduct](CODE_OF_CONDUCT.md) and follow it in all your interactions with the project.
|
||||
|
||||
@@ -94,3 +94,12 @@ Sometimes you want to test changes to a Builder against an existing project, may
|
||||
4. Run `now *.tgz` to upload the tarball file and get a URL
|
||||
5. Edit any existing `now.json` project and replace `use` with the URL
|
||||
6. Run `now` or `now dev` to deploy with the experimental Builder
|
||||
|
||||
## Add a New Framework
|
||||
|
||||
You can add support for a new Framework by creating a Pull Request for this repository and following the steps below:
|
||||
|
||||
1. Add the Framework to the `@now/frameworks` package: The file is located in `packages/frameworks/frameworks.json`. You can copy the structure of an existing one and adjust the required fields. Note that the `settings` property either contains a `value` or a `placeholder`. The `value` property is used when something is not configurable, the `placeholder` is used when something is configurable and can be changed with configuration. An example would be the Output Directory for Hugo, it's `public` by default but can be changed through its config file, so we use `placeholder` with an explanation of what can be used.
|
||||
2. Add an example to the `examples/` directory: The name of the directory should equal the slug of the framework used in `@now/frameworks`. The `.github/EXAMPLE_README_TEMPLATE.md` file can be used to create a `README.md` file for the example.
|
||||
3. Update the `@now/static-build` package: The file `packages/now-static-build/src/frameworks.ts` has to be extended. You can add default routes that will always be applied to projects that use this Framework or specify some paths that will be cached to speed up the build process.
|
||||
4. After your Pull Request has been merged and released, other users can select the example on the ZEIT Now dashboard and deploy it.
|
||||
25
.github/EXAMPLE_README_TEMPLATE.md
vendored
Normal file
25
.github/EXAMPLE_README_TEMPLATE.md
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
# [Name] Example
|
||||
|
||||
This directory is a brief example of a [Name](site-link) site that can be deployed with ZEIT Now and zero configuration.
|
||||
|
||||
## Deploy Your Own
|
||||
|
||||
Deploy your own [Name] project with ZEIT Now.
|
||||
|
||||
[](https://zeit.co/import/project?template=https://github.com/zeit/now-examples/tree/master/example-directory)
|
||||
|
||||
### How We Created This Example
|
||||
|
||||
To get started with [Name] on Now, you can use the [CLI Tool Used](CLI-link) to initialize the project:
|
||||
|
||||
```shell
|
||||
$ now init charge
|
||||
```
|
||||
|
||||
### Deploying From Your Terminal
|
||||
|
||||
Once initialized, you can deploy the [Name] example with just a single command:
|
||||
|
||||
```shell
|
||||
$ now
|
||||
```
|
||||
11
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
11
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: Bug Report
|
||||
url: https://zeit.co/support/request
|
||||
about: Report a bug using the ZEIT Now support form
|
||||
- name: Feature Request
|
||||
url: https://github.com/zeit/now/discussions/new
|
||||
about: Request a feature to be added to the platform
|
||||
- name: Ask a Question
|
||||
url: https://github.com/zeit/now/discussions/new
|
||||
about: Ask questions and discuss with other community members
|
||||
18
.github/workflows/cancel.yml
vendored
Normal file
18
.github/workflows/cancel.yml
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
name: Cancel
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- '*'
|
||||
- '!master'
|
||||
|
||||
jobs:
|
||||
cancel:
|
||||
name: 'Cancel Previous Runs'
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 3
|
||||
steps:
|
||||
- uses: styfle/cancel-workflow-action@0.3.1
|
||||
with:
|
||||
workflow_id: 849295, 849296, 849297, 849298
|
||||
access_token: ${{ secrets.GITHUB_WORKFLOW_TOKEN }}
|
||||
|
||||
20
.github/workflows/publish.yml
vendored
20
.github/workflows/publish.yml
vendored
@@ -4,30 +4,28 @@ on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- canary
|
||||
tags:
|
||||
- '!*'
|
||||
|
||||
jobs:
|
||||
Publish:
|
||||
|
||||
publish:
|
||||
name: Publish
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [10.x]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Checkout
|
||||
uses: actions/setup-node@v1
|
||||
- uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
node-version: 10
|
||||
- name: Install
|
||||
run: yarn install --check-files --frozen-lockfile
|
||||
- name: Build
|
||||
run: yarn build
|
||||
env:
|
||||
GA_TRACKING_ID: ${{ secrets.GA_TRACKING_ID }}
|
||||
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
|
||||
- name: Publish
|
||||
run: yarn publish-from-github
|
||||
env:
|
||||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
GA_TRACKING_ID: ${{ secrets.GA_TRACKING_ID }}
|
||||
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
|
||||
|
||||
36
.github/workflows/test-integration-cli.yml
vendored
Normal file
36
.github/workflows/test-integration-cli.yml
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
name: CLI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
tags:
|
||||
- '!*'
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: CLI
|
||||
timeout-minutes: 30
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest]
|
||||
node: [10, 12]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- run: git fetch origin master --depth=10
|
||||
- run: git fetch origin ${{ github.ref }} --depth=10
|
||||
- name: Install Hugo
|
||||
if: matrix.os == 'macos-latest'
|
||||
run: curl -L -O https://github.com/gohugoio/hugo/releases/download/v0.56.0/hugo_0.56.0_macOS-64bit.tar.gz && tar -xzf hugo_0.56.0_macOS-64bit.tar.gz && mv ./hugo packages/now-cli/test/dev/fixtures/08-hugo/
|
||||
- run: yarn install
|
||||
- run: yarn run build
|
||||
- uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node }}
|
||||
- run: yarn test-integration-cli --clean false
|
||||
env:
|
||||
ZEIT_TEAM_TOKEN: ${{ secrets.ZEIT_TEAM_TOKEN }}
|
||||
ZEIT_REGISTRATION_URL: ${{ secrets.ZEIT_REGISTRATION_URL }}
|
||||
33
.github/workflows/test-integration-dev.yml
vendored
Normal file
33
.github/workflows/test-integration-dev.yml
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
name: Dev
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
tags:
|
||||
- '!*'
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: Dev
|
||||
timeout-minutes: 30
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest]
|
||||
node: [10, 12]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- run: git fetch origin master --depth=10
|
||||
- run: git fetch origin ${{ github.ref }} --depth=10
|
||||
- name: Install Hugo
|
||||
if: matrix.os == 'macos-latest'
|
||||
run: curl -L -O https://github.com/gohugoio/hugo/releases/download/v0.56.0/hugo_0.56.0_macOS-64bit.tar.gz && tar -xzf hugo_0.56.0_macOS-64bit.tar.gz && mv ./hugo packages/now-cli/test/dev/fixtures/08-hugo/
|
||||
- run: yarn install
|
||||
- run: yarn run build
|
||||
- uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node }}
|
||||
- run: yarn test-integration-dev --clean false
|
||||
25
.github/workflows/test-integration-once.yml
vendored
Normal file
25
.github/workflows/test-integration-once.yml
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
name: E2E
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
tags:
|
||||
- '!*'
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: E2E
|
||||
timeout-minutes: 120
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- run: git fetch origin master --depth=10
|
||||
- run: git fetch origin ${{ github.ref }} --depth=10
|
||||
- run: yarn install
|
||||
- run: yarn run build
|
||||
- run: yarn test-integration-once --clean false
|
||||
env:
|
||||
ZEIT_TEAM_TOKEN: ${{ secrets.ZEIT_TEAM_TOKEN }}
|
||||
ZEIT_REGISTRATION_URL: ${{ secrets.ZEIT_REGISTRATION_URL }}
|
||||
33
.github/workflows/test-unit.yml
vendored
Normal file
33
.github/workflows/test-unit.yml
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
name: Unit
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
tags:
|
||||
- '!*'
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: Unit
|
||||
timeout-minutes: 15
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||
node: [10, 12]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- run: git fetch origin master --depth=10
|
||||
- run: git fetch origin ${{ github.ref }} --depth=10
|
||||
- uses: actions/setup-node@v1
|
||||
- run: yarn install
|
||||
- run: yarn run build
|
||||
- run: yarn run test-lint
|
||||
- run: yarn run test-unit --clean false
|
||||
- run: yarn workspace now run coverage
|
||||
if: matrix.os == 'ubuntu-latest' && matrix.node == 12 # only run once
|
||||
env:
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||
7
.gitignore
vendored
7
.gitignore
vendored
@@ -1,6 +1,7 @@
|
||||
node_modules
|
||||
package-lock.json
|
||||
dist
|
||||
.vscode
|
||||
npm-debug.log
|
||||
yarn-error.log
|
||||
.nyc_output
|
||||
@@ -11,6 +12,7 @@ coverage
|
||||
packages/now-cli/.builders
|
||||
packages/now-cli/assets
|
||||
packages/now-cli/src/util/dev/templates/*.ts
|
||||
packages/now-cli/src/util/constants.ts
|
||||
packages/now-cli/test/**/yarn.lock
|
||||
!packages/now-cli/test/dev/**/yarn.lock
|
||||
packages/now-cli/test/**/node_modules
|
||||
@@ -18,3 +20,8 @@ packages/now-cli/test/dev/fixtures/08-hugo/hugo
|
||||
packages/now-cli/test/dev/fixtures/**/dist
|
||||
packages/now-cli/test/dev/fixtures/**/public
|
||||
packages/now-cli/test/fixtures/integration
|
||||
test/lib/deployment/failed-page.txt
|
||||
.DS_Store
|
||||
.next
|
||||
.env
|
||||
public
|
||||
|
||||
17
.nowignore
Normal file
17
.nowignore
Normal file
@@ -0,0 +1,17 @@
|
||||
*
|
||||
|
||||
# general
|
||||
!utils/
|
||||
!utils/run.js
|
||||
!.yarnrc
|
||||
!yarn.lock
|
||||
!package.json
|
||||
|
||||
# api
|
||||
!api/
|
||||
!api/**
|
||||
|
||||
# packages
|
||||
!packages/
|
||||
!packages/frameworks
|
||||
!packages/frameworks/**
|
||||
@@ -1,4 +0,0 @@
|
||||
{
|
||||
"singleQuote": true,
|
||||
"trailingComma": "es5"
|
||||
}
|
||||
@@ -6,7 +6,7 @@ A Runtime is an npm module that exposes a `build` function and optionally an `an
|
||||
Official Runtimes are published to [npmjs.com](https://npmjs.com) as a package and referenced in the `use` property of the `now.json` configuration file.
|
||||
However, the `use` property will work with any [npm install argument](https://docs.npmjs.com/cli/install) such as a git repo url which is useful for testing your Runtime.
|
||||
|
||||
See the [Runtimes Documentation](https://zeit.co/docs/v2/advanced/runtimes) to view example usage.
|
||||
See the [Runtimes Documentation](https://zeit.co/docs/runtimes) to view example usage.
|
||||
|
||||
## Runtime Exports
|
||||
|
||||
@@ -283,15 +283,15 @@ This is a [JavaScript class](https://developer.mozilla.org/en-US/docs/Web/JavaSc
|
||||
|
||||
This is an abstract enumeration type that is implemented by one of the following possible `String` values:
|
||||
|
||||
- `nodejs12.x`
|
||||
- `nodejs10.x`
|
||||
- `nodejs8.10`
|
||||
- `go1.x`
|
||||
- `java-1.8.0-openjdk`
|
||||
- `java11`
|
||||
- `python3.8`
|
||||
- `python3.6`
|
||||
- `python2.7`
|
||||
- `dotnetcore2.1`
|
||||
- `dotnetcore2.0`
|
||||
- `dotnetcore1.0`
|
||||
- `ruby2.5`
|
||||
- `provided`
|
||||
|
||||
## JavaScript API
|
||||
|
||||
|
||||
25
README.md
25
README.md
@@ -1,35 +1,22 @@
|
||||

|
||||

|
||||
|
||||
[](https://circleci.com/gh/zeit/workflows/now/tree/master)
|
||||
[](https://spectrum.chat/zeit)
|
||||
[](https://github.com/zeit/now/actions?workflow=CI)
|
||||
[](https://github.com/zeit/now/discussions)
|
||||
|
||||
## Usage
|
||||
|
||||
To install the latest version of Now CLI, visit [zeit.co/download](https://zeit.co/download) or run this command:
|
||||
|
||||
```
|
||||
npm i -g now
|
||||
```
|
||||
|
||||
To quickly start a new project, run the following commands:
|
||||
|
||||
```
|
||||
now init # Pick an example project to clone
|
||||
cd <PROJECT> # Change directory to the newly created project
|
||||
now dev # Run locally during development
|
||||
now # Deploy to the cloud
|
||||
```
|
||||
Get started by [Importing a Git Project](https://zeit.co/import) and use `git push` to deploy. Alternatively, you can [install Now CLI](https://zeit.co/download).
|
||||
|
||||
## Documentation
|
||||
|
||||
For details on how to use Now CLI, check out our [documentation](https://zeit.co/docs).
|
||||
For details on how to use ZEIT Now, check out our [documentation](https://zeit.co/docs).
|
||||
|
||||
## Caught a Bug?
|
||||
|
||||
1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device
|
||||
2. Install dependencies with `yarn install`
|
||||
3. Compile the code: `yarn build`
|
||||
4. Link the package to the global module directory: `yarn link`
|
||||
4. Link the package to the global module directory: `cd ./packages/now-cli && yarn link`
|
||||
5. You can now start using `now` anywhere inside the command line
|
||||
|
||||
As always, you should use `yarn test-unit` to run the tests and see if your changes have broken anything.
|
||||
|
||||
25
api/_lib/examples/example-list.ts
Normal file
25
api/_lib/examples/example-list.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import Frameworks, { Framework } from '../../../packages/frameworks';
|
||||
|
||||
interface Example {
|
||||
example: string;
|
||||
path: string;
|
||||
demo: string;
|
||||
description: string;
|
||||
tagline: string;
|
||||
framework: string;
|
||||
}
|
||||
|
||||
export async function getExampleList(): Promise<Example[]> {
|
||||
return (Frameworks as Framework[])
|
||||
.filter(f => f.demo)
|
||||
.map(framework => {
|
||||
return {
|
||||
example: framework.name,
|
||||
path: `/${framework.slug}`,
|
||||
demo: framework.demo,
|
||||
description: framework.description,
|
||||
tagline: framework.tagline,
|
||||
framework: framework.slug,
|
||||
};
|
||||
});
|
||||
}
|
||||
18
api/_lib/examples/extract.ts
Normal file
18
api/_lib/examples/extract.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
/**
|
||||
* Download zip and extract to target directory
|
||||
*/
|
||||
|
||||
import got from 'got';
|
||||
import unzip from 'unzip-stream';
|
||||
|
||||
export async function extract(sourceUrl: string, targetPath: string) {
|
||||
return new Promise((resolve, reject) => {
|
||||
got
|
||||
.stream(sourceUrl)
|
||||
.pipe(unzip.Extract({ path: targetPath }))
|
||||
.on('close', resolve)
|
||||
.on('error', err => {
|
||||
reject(new Error('Failed extracting from github.'));
|
||||
});
|
||||
});
|
||||
}
|
||||
72
api/_lib/examples/github-repo-info.ts
Normal file
72
api/_lib/examples/github-repo-info.ts
Normal file
@@ -0,0 +1,72 @@
|
||||
import fetch from 'node-fetch';
|
||||
import { Repo } from '../types';
|
||||
import { getExampleList } from './example-list';
|
||||
|
||||
/**
|
||||
* Fetch the meta info of a public github repo
|
||||
* @param {object} repo parsed by the `parse-github-url` package
|
||||
*/
|
||||
export async function getGitHubRepoInfo(repo: Repo) {
|
||||
const response = await fetch(`https://api.github.com/repos/${repo.repo}`, {
|
||||
headers: {
|
||||
Accept: 'application/vnd.github.machine-man-preview+json',
|
||||
// If we don't use a personal access token,
|
||||
// it will get rate limited very easily.
|
||||
Authorization: `Bearer ${process.env.GITHUB_ACCESS_TOKEN}`,
|
||||
},
|
||||
});
|
||||
|
||||
if (response.status !== 200) {
|
||||
console.log(`Non-200 response code from GitHub: ${response.status}`);
|
||||
console.log(await response.text());
|
||||
return null;
|
||||
}
|
||||
|
||||
const parsed = await response.json();
|
||||
|
||||
if (parsed.full_name !== repo.repo) {
|
||||
console.log(`Invalid response from GitHub`);
|
||||
console.log(`Received:`, parsed);
|
||||
return null;
|
||||
}
|
||||
|
||||
const data: { [key: string]: any } = {
|
||||
id: parsed.full_name,
|
||||
name: parsed.name,
|
||||
url: parsed.html_url,
|
||||
owner: parsed.owner.login,
|
||||
description: parsed.description,
|
||||
homepage: parsed.homepage,
|
||||
size: parsed.size,
|
||||
createdAt: parsed.created_at,
|
||||
updatedAt: parsed.updated_at,
|
||||
stars: parsed.stargazers_count,
|
||||
branch: repo.branch,
|
||||
};
|
||||
|
||||
const subdirPath = repo.repo + '/tree/' + repo.branch + '/';
|
||||
|
||||
if (repo.path.startsWith(subdirPath)) {
|
||||
// subdir
|
||||
data.subdir = repo.path.slice(subdirPath.length).split('/');
|
||||
}
|
||||
|
||||
if (data.id === 'zeit/now' && data.subdir && data.subdir[0] === 'examples') {
|
||||
// from our examples, add `homepage` and `description` fields
|
||||
const example = data.subdir[1];
|
||||
const exampleList = await getExampleList();
|
||||
|
||||
for (const item of exampleList) {
|
||||
if (item.path === `/${example}`) {
|
||||
data.homepage = item.demo;
|
||||
data.description = item.description;
|
||||
data.exampleName = item.example;
|
||||
data.tagline = item.tagline;
|
||||
data.framework = item.framework;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return data;
|
||||
}
|
||||
45
api/_lib/examples/gitlab-repo-info.ts
Normal file
45
api/_lib/examples/gitlab-repo-info.ts
Normal file
@@ -0,0 +1,45 @@
|
||||
import fetch from 'node-fetch';
|
||||
|
||||
interface Repo {
|
||||
repo: string;
|
||||
owner: {
|
||||
username: string;
|
||||
};
|
||||
username: string;
|
||||
branch: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetch the meta info of a public gitlab repo
|
||||
* @param {object} repo parsed by the `parse-github-url` package
|
||||
*/
|
||||
export async function getGitLabRepoInfo(repo: Repo) {
|
||||
const response = await fetch(
|
||||
`https://gitlab.com/api/v4/projects/${encodeURIComponent(repo.repo)}`
|
||||
);
|
||||
|
||||
if (response.status !== 200) {
|
||||
console.log(`Non-200 response code from GitLab: ${response.status}`);
|
||||
return null;
|
||||
}
|
||||
|
||||
const parsed = await response.json();
|
||||
if (parsed.path_with_namespace !== repo.repo) {
|
||||
console.log(`Invalid response from GitLab`);
|
||||
return null;
|
||||
}
|
||||
|
||||
return {
|
||||
id: parsed.path_with_namespace,
|
||||
name: parsed.path,
|
||||
url: parsed.web_url,
|
||||
owner: parsed.owner ? parsed.owner.username : repo.owner,
|
||||
description: parsed.description,
|
||||
homepage: null,
|
||||
size: 0,
|
||||
createdAt: parsed.created_at,
|
||||
updatedAt: parsed.last_activity_at,
|
||||
stars: parsed.star_count,
|
||||
branch: repo.branch,
|
||||
};
|
||||
}
|
||||
28
api/_lib/examples/map-old-to-new.ts
Normal file
28
api/_lib/examples/map-old-to-new.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
export const mapOldToNew: { [key: string]: string[] } = {
|
||||
'go-image-to-ascii': ['vanilla-functions'],
|
||||
markdown: ['hexo', 'docusaurus', 'docz', 'jekyll'],
|
||||
'mdx-deck': ['docz'],
|
||||
'mdx-deck-advanced': ['docz'],
|
||||
'nextjs-mysql': ['nextjs'],
|
||||
'nextjs-news': ['nextjs'],
|
||||
'nextjs-nodejs-mongodb': ['nextjs'],
|
||||
'nextjs-static': ['nextjs'],
|
||||
'node-server': ['svelte-functions'],
|
||||
nodejs: ['svelte-functions'],
|
||||
'nodejs-canvas-partyparrot': ['svelte-functions'],
|
||||
'nodejs-coffee': ['svelte-functions'],
|
||||
'nodejs-hapi': ['svelte-functions'],
|
||||
'nodejs-koa': ['svelte-functions'],
|
||||
'nodejs-koa-ts': ['gatsby-functions'],
|
||||
'nodejs-micro': ['svelte-functions'],
|
||||
'nodejs-ms-graph-security-api': ['svelte-functions'],
|
||||
'nodejs-pdfkit': ['svelte-functions'],
|
||||
'nodejs-ts': ['gatsby-functions'],
|
||||
'nuxt-static': ['nuxtjs'],
|
||||
static: ['vanilla'],
|
||||
typescript: ['gatsby-functions'],
|
||||
umi: ['umijs'],
|
||||
'vanilla-go': ['vanilla-functions'],
|
||||
'vanilla-json-api': ['svelte-functions'],
|
||||
'vue-ssr': ['vue'],
|
||||
};
|
||||
20
api/_lib/examples/summary.ts
Normal file
20
api/_lib/examples/summary.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
* Get example list from extracted folder
|
||||
*/
|
||||
|
||||
import { join } from 'path';
|
||||
import { lstatSync, existsSync, readdirSync } from 'fs';
|
||||
|
||||
const exists = (path: string) => existsSync(path);
|
||||
const isDotFile = (name: string) => name.startsWith('.');
|
||||
const isDirectory = (path: string) => lstatSync(path).isDirectory();
|
||||
|
||||
export function summary(source: string) {
|
||||
if (!exists(source) || !isDirectory(source)) {
|
||||
return [];
|
||||
}
|
||||
|
||||
return readdirSync(source)
|
||||
.filter(name => !isDotFile(name))
|
||||
.filter(name => isDirectory(join(source, name)));
|
||||
}
|
||||
9
api/_lib/types.ts
Normal file
9
api/_lib/types.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
export interface Repo {
|
||||
repo: string;
|
||||
owner: {
|
||||
username: string;
|
||||
};
|
||||
username: string;
|
||||
branch: string;
|
||||
path: string;
|
||||
}
|
||||
9
api/_lib/util/assert-env.ts
Normal file
9
api/_lib/util/assert-env.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
export function assertEnv(name: string) {
|
||||
const value = process.env[name];
|
||||
|
||||
if (!value) {
|
||||
throw new Error(`Missing env "${name}"`);
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
43
api/_lib/util/error-handler.ts
Normal file
43
api/_lib/util/error-handler.ts
Normal file
@@ -0,0 +1,43 @@
|
||||
import { init, captureException, withScope } from '@sentry/node';
|
||||
import { assertEnv } from './assert-env';
|
||||
|
||||
const serviceName = 'api-frameworks';
|
||||
|
||||
let sentryInitDone = false;
|
||||
|
||||
function initSentry() {
|
||||
if (sentryInitDone) {
|
||||
return;
|
||||
}
|
||||
|
||||
sentryInitDone = true;
|
||||
|
||||
init({
|
||||
dsn: assertEnv('SENTRY_DSN'),
|
||||
environment: process.env.NODE_ENV || 'production',
|
||||
release: `${serviceName}`,
|
||||
});
|
||||
}
|
||||
|
||||
export function errorHandler(error: Error, extras?: { [key: string]: any }) {
|
||||
if (!process.env.SENTRY_DSN) {
|
||||
return;
|
||||
}
|
||||
|
||||
initSentry();
|
||||
|
||||
try {
|
||||
withScope(scope => {
|
||||
scope.setTag('service', serviceName);
|
||||
scope.setTag('function_name', assertEnv('AWS_LAMBDA_FUNCTION_NAME'));
|
||||
|
||||
for (const [k, v] of Object.entries(extras)) {
|
||||
scope.setExtra(k, v);
|
||||
}
|
||||
|
||||
captureException(error);
|
||||
});
|
||||
} catch (e) {
|
||||
console.error(`Failed to report error to Sentry: ${e}`);
|
||||
}
|
||||
}
|
||||
44
api/_lib/util/with-api-handler.ts
Normal file
44
api/_lib/util/with-api-handler.ts
Normal file
@@ -0,0 +1,44 @@
|
||||
import { NowRequest, NowResponse } from '@now/node';
|
||||
import { errorHandler } from './error-handler';
|
||||
|
||||
type Handler = (req: NowRequest, res: NowResponse) => Promise<any>;
|
||||
|
||||
export function withApiHandler(handler: Handler): Handler {
|
||||
return async (req: NowRequest, res: NowResponse) => {
|
||||
res.setHeader('Access-Control-Allow-Origin', '*');
|
||||
res.setHeader('Access-Control-Allow-Methods', 'GET');
|
||||
res.setHeader(
|
||||
'Access-Control-Allow-Headers',
|
||||
'Authorization, Accept, Content-Type'
|
||||
);
|
||||
|
||||
if (req.method === 'OPTIONS') {
|
||||
return res.status(200).json({});
|
||||
}
|
||||
|
||||
if (req.method !== 'GET') {
|
||||
return res.status(404).json({
|
||||
error: {
|
||||
code: 'not_found',
|
||||
message: 'Only GET requests are supported for this endpoint.',
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
try {
|
||||
const result = await handler(req, res);
|
||||
return result;
|
||||
} catch (error) {
|
||||
errorHandler(error, {
|
||||
url: req.url,
|
||||
});
|
||||
|
||||
return res.status(500).json({
|
||||
error: {
|
||||
code: 'unexpected_error',
|
||||
message: 'An unexpected error occurred.',
|
||||
},
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
57
api/examples/download/[segment].ts
Normal file
57
api/examples/download/[segment].ts
Normal file
@@ -0,0 +1,57 @@
|
||||
import fs from 'fs';
|
||||
// @ts-ignore
|
||||
import tar from 'tar-fs';
|
||||
import { extract } from '../../_lib/examples/extract';
|
||||
import { NowRequest, NowResponse } from '@now/node';
|
||||
import { withApiHandler } from '../../_lib/util/with-api-handler';
|
||||
|
||||
const TMP_DIR = '/tmp';
|
||||
|
||||
function isDirectory(path: string) {
|
||||
return fs.existsSync(path) && fs.lstatSync(path).isDirectory();
|
||||
}
|
||||
|
||||
function notFound(res: NowResponse, message: string) {
|
||||
return res.status(404).send({
|
||||
error: {
|
||||
code: 'not_found',
|
||||
message
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function streamToBuffer(stream: any) {
|
||||
return new Promise((resolve, reject) => {
|
||||
const buffers: any[] = [];
|
||||
stream.on('error', (err: any) => {
|
||||
reject(err);
|
||||
});
|
||||
stream.on('data', (b: any) => {
|
||||
buffers.push(b);
|
||||
});
|
||||
stream.on('end', () => {
|
||||
resolve(Buffer.concat(buffers));
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
export default withApiHandler(async function(req: NowRequest, res: NowResponse) {
|
||||
const ext = '.tar.gz';
|
||||
const { segment = '' } = req.query;
|
||||
|
||||
if (Array.isArray(segment) || !segment.endsWith(ext)) {
|
||||
return notFound(res, `Missing ${ext} suffix.`);
|
||||
}
|
||||
|
||||
const example = segment.slice(0, -ext.length);
|
||||
|
||||
await extract('https://github.com/zeit/now/archive/master.zip', TMP_DIR);
|
||||
const directory = `${TMP_DIR}/now-master/examples/${example}`;
|
||||
|
||||
if (!isDirectory(directory)) {
|
||||
return notFound(res, `Example '${example}' was not found.`);
|
||||
}
|
||||
|
||||
const stream = tar.pack(directory);
|
||||
return res.send(await streamToBuffer(stream));
|
||||
});
|
||||
44
api/examples/info.ts
Normal file
44
api/examples/info.ts
Normal file
@@ -0,0 +1,44 @@
|
||||
// A proxy to get the basic info of an existing github/gitlab repo:
|
||||
// GET /info?repo=zeit/micro
|
||||
|
||||
// @ts-ignore
|
||||
import parseGitUrl from 'parse-github-url';
|
||||
import { NowRequest, NowResponse } from '@now/node';
|
||||
import { withApiHandler } from '../_lib/util/with-api-handler';
|
||||
import { getGitHubRepoInfo } from '../_lib/examples/github-repo-info';
|
||||
import { getGitLabRepoInfo } from '../_lib/examples/gitlab-repo-info';
|
||||
|
||||
export default withApiHandler(async function(
|
||||
req: NowRequest,
|
||||
res: NowResponse
|
||||
) {
|
||||
const repoPath = decodeURIComponent((req.query.repo as string) || '');
|
||||
|
||||
if (!repoPath) {
|
||||
return res.status(404).json({
|
||||
error: {
|
||||
code: 'not_found',
|
||||
message: 'Please provide the `repo` parameter.',
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
const repo = parseGitUrl(repoPath);
|
||||
|
||||
if (!repo.repo) {
|
||||
return res.status(400).json({
|
||||
error: {
|
||||
code: 'invalid_repo_url',
|
||||
message: 'Repository URL is invalid.',
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
if (repo.host === 'github.com') {
|
||||
// URL is 'https://github.com/user/repo' or 'user/repo'
|
||||
return res.json((await getGitHubRepoInfo(repo)) || {});
|
||||
}
|
||||
|
||||
// gitlab
|
||||
res.json((await getGitLabRepoInfo(repo)) || {});
|
||||
});
|
||||
10
api/examples/list-all.ts
Normal file
10
api/examples/list-all.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import { NowRequest, NowResponse } from '@now/node';
|
||||
import { getExampleList } from '../_lib/examples/example-list';
|
||||
import { withApiHandler } from '../_lib/util/with-api-handler';
|
||||
|
||||
export default withApiHandler(async function(
|
||||
req: NowRequest,
|
||||
res: NowResponse
|
||||
) {
|
||||
res.status(200).json(await getExampleList());
|
||||
});
|
||||
27
api/examples/list.ts
Normal file
27
api/examples/list.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
import { extract } from '../_lib/examples/extract';
|
||||
import { summary } from '../_lib/examples/summary';
|
||||
import { NowRequest, NowResponse } from '@now/node';
|
||||
import { mapOldToNew } from '../_lib/examples/map-old-to-new';
|
||||
import { withApiHandler } from '../_lib/util/with-api-handler';
|
||||
|
||||
export default withApiHandler(async function(
|
||||
req: NowRequest,
|
||||
res: NowResponse
|
||||
) {
|
||||
await extract('https://github.com/zeit/now/archive/master.zip', '/tmp');
|
||||
const exampleList = summary('/tmp/now-master/examples');
|
||||
|
||||
const existingExamples = Array.from(exampleList).map(key => ({
|
||||
name: key,
|
||||
visible: true,
|
||||
suggestions: [],
|
||||
}));
|
||||
|
||||
const oldExamples = Object.keys(mapOldToNew).map(key => ({
|
||||
name: key,
|
||||
visible: false,
|
||||
suggestions: mapOldToNew[key],
|
||||
}));
|
||||
|
||||
res.status(200).json([...existingExamples, ...oldExamples]);
|
||||
});
|
||||
23
api/frameworks.ts
Normal file
23
api/frameworks.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import { NowRequest, NowResponse } from '@now/node';
|
||||
import { withApiHandler } from './_lib/util/with-api-handler';
|
||||
import frameworkList, { Framework } from '../packages/frameworks';
|
||||
|
||||
const frameworks = (frameworkList as Framework[]).map(frameworkItem => {
|
||||
const framework = {
|
||||
...frameworkItem,
|
||||
detectors: undefined,
|
||||
};
|
||||
|
||||
if (framework.logo) {
|
||||
framework.logo = `https://res.cloudinary.com/zeit-inc/image/fetch/${framework.logo}`;
|
||||
}
|
||||
|
||||
return framework;
|
||||
});
|
||||
|
||||
export default withApiHandler(async function(
|
||||
req: NowRequest,
|
||||
res: NowResponse
|
||||
) {
|
||||
return res.status(200).json(frameworks);
|
||||
});
|
||||
24
api/package.json
Normal file
24
api/package.json
Normal file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"name": "api",
|
||||
"private": true,
|
||||
"version": "0.0.0",
|
||||
"description": "API for the zeit/now repo",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"build": "yarn --cwd .. && node ../utils/run.js build all"
|
||||
},
|
||||
"dependencies": {
|
||||
"@sentry/node": "5.11.1",
|
||||
"got": "10.2.1",
|
||||
"node-fetch": "2.6.0",
|
||||
"parse-github-url": "1.0.2",
|
||||
"tar-fs": "2.0.0",
|
||||
"typescript": "3.7.4",
|
||||
"unzip-stream": "0.3.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@now/node": "1.3.3",
|
||||
"@types/node": "13.1.4",
|
||||
"@types/node-fetch": "2.5.4"
|
||||
}
|
||||
}
|
||||
15
api/tsconfig.json
Normal file
15
api/tsconfig.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "esnext",
|
||||
"skipLibCheck": true,
|
||||
"strict": false,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"noEmit": true,
|
||||
"esModuleInterop": true,
|
||||
"module": "commonjs",
|
||||
"moduleResolution": "node",
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true
|
||||
},
|
||||
"include": ["examples", "frameworks.ts"]
|
||||
}
|
||||
468
api/yarn.lock
Normal file
468
api/yarn.lock
Normal file
@@ -0,0 +1,468 @@
|
||||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
||||
# yarn lockfile v1
|
||||
|
||||
|
||||
"@now/node@1.3.3":
|
||||
version "1.3.3"
|
||||
resolved "https://registry.yarnpkg.com/@now/node/-/node-1.3.3.tgz#5407cb6a730d4dd9b6b6b0bc4a316f29086c9feb"
|
||||
integrity sha512-s1qajtQttWhhSs1k6FX0/6eTFYFUplzultrQeKfOPMoYzzz6OxDq5qrQ3elpsGlZlDVmO+x+JOJ7yad+3yBgpg==
|
||||
dependencies:
|
||||
"@types/node" "*"
|
||||
|
||||
"@sentry/apm@5.11.1":
|
||||
version "5.11.1"
|
||||
resolved "https://registry.yarnpkg.com/@sentry/apm/-/apm-5.11.1.tgz#cc89fa4150056fbf009f92eca94fccc3980db34e"
|
||||
integrity sha512-4iZH11p/7w9IMLT9hqNY1+EqLESltiIoF6/YsbpK93sXWGEs8VQ83IuvGuKWxajvHgDmj4ND0TxIliTsYqTqFw==
|
||||
dependencies:
|
||||
"@sentry/browser" "5.11.1"
|
||||
"@sentry/hub" "5.11.1"
|
||||
"@sentry/minimal" "5.11.1"
|
||||
"@sentry/types" "5.11.0"
|
||||
"@sentry/utils" "5.11.1"
|
||||
tslib "^1.9.3"
|
||||
|
||||
"@sentry/browser@5.11.1":
|
||||
version "5.11.1"
|
||||
resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-5.11.1.tgz#337ffcb52711b23064c847a07629e966f54a5ebb"
|
||||
integrity sha512-oqOX/otmuP92DEGRyZeBuQokXdeT9HQRxH73oqIURXXNLMP3PWJALSb4HtT4AftEt/2ROGobZLuA4TaID6My/Q==
|
||||
dependencies:
|
||||
"@sentry/core" "5.11.1"
|
||||
"@sentry/types" "5.11.0"
|
||||
"@sentry/utils" "5.11.1"
|
||||
tslib "^1.9.3"
|
||||
|
||||
"@sentry/core@5.11.1":
|
||||
version "5.11.1"
|
||||
resolved "https://registry.yarnpkg.com/@sentry/core/-/core-5.11.1.tgz#9e2da485e196ae32971545c1c49ee6fe719930e2"
|
||||
integrity sha512-BpvPosVNT20Xso4gAV54Lu3KqDmD20vO63HYwbNdST5LUi8oYV4JhvOkoBraPEM2cbBwQvwVcFdeEYKk4tin9A==
|
||||
dependencies:
|
||||
"@sentry/hub" "5.11.1"
|
||||
"@sentry/minimal" "5.11.1"
|
||||
"@sentry/types" "5.11.0"
|
||||
"@sentry/utils" "5.11.1"
|
||||
tslib "^1.9.3"
|
||||
|
||||
"@sentry/hub@5.11.1":
|
||||
version "5.11.1"
|
||||
resolved "https://registry.yarnpkg.com/@sentry/hub/-/hub-5.11.1.tgz#ddcb865563fae53852d405885c46b4c6de68a91b"
|
||||
integrity sha512-ucKprYCbGGLLjVz4hWUqHN9KH0WKUkGf5ZYfD8LUhksuobRkYVyig0ZGbshECZxW5jcDTzip4Q9Qimq/PkkXBg==
|
||||
dependencies:
|
||||
"@sentry/types" "5.11.0"
|
||||
"@sentry/utils" "5.11.1"
|
||||
tslib "^1.9.3"
|
||||
|
||||
"@sentry/minimal@5.11.1":
|
||||
version "5.11.1"
|
||||
resolved "https://registry.yarnpkg.com/@sentry/minimal/-/minimal-5.11.1.tgz#0e705d01a567282d8fbbda2aed848b4974cc3cec"
|
||||
integrity sha512-HK8zs7Pgdq7DsbZQTThrhQPrJsVWzz7MaluAbQA0rTIAJ3TvHKQpsVRu17xDpjZXypqWcKCRsthDrC4LxDM1Bg==
|
||||
dependencies:
|
||||
"@sentry/hub" "5.11.1"
|
||||
"@sentry/types" "5.11.0"
|
||||
tslib "^1.9.3"
|
||||
|
||||
"@sentry/node@5.11.1":
|
||||
version "5.11.1"
|
||||
resolved "https://registry.yarnpkg.com/@sentry/node/-/node-5.11.1.tgz#2a9c18cd1209cfdf7a69b9d91303413149d2c910"
|
||||
integrity sha512-FbJs0blJ36gEzE0rc2yBfA/KE+kXOLl8MUfFTcyJCBdCGF8XMETDCmgINnJ4TyBUJviwKoPw2TCk9TL2pa/A1w==
|
||||
dependencies:
|
||||
"@sentry/apm" "5.11.1"
|
||||
"@sentry/core" "5.11.1"
|
||||
"@sentry/hub" "5.11.1"
|
||||
"@sentry/types" "5.11.0"
|
||||
"@sentry/utils" "5.11.1"
|
||||
cookie "^0.3.1"
|
||||
https-proxy-agent "^4.0.0"
|
||||
lru_map "^0.3.3"
|
||||
tslib "^1.9.3"
|
||||
|
||||
"@sentry/types@5.11.0":
|
||||
version "5.11.0"
|
||||
resolved "https://registry.yarnpkg.com/@sentry/types/-/types-5.11.0.tgz#40f0f3174362928e033ddd9725d55e7c5cb7c5b6"
|
||||
integrity sha512-1Uhycpmeo1ZK2GLvrtwZhTwIodJHcyIS6bn+t4IMkN9MFoo6ktbAfhvexBDW/IDtdLlCGJbfm8nIZerxy0QUpg==
|
||||
|
||||
"@sentry/utils@5.11.1":
|
||||
version "5.11.1"
|
||||
resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-5.11.1.tgz#aa19fcc234cf632257b2281261651d2fac967607"
|
||||
integrity sha512-O0Zl4R2JJh8cTkQ8ZL2cDqGCmQdpA5VeXpuBbEl1v78LQPkBDISi35wH4mKmLwMsLBtTVpx2UeUHBj0KO5aLlA==
|
||||
dependencies:
|
||||
"@sentry/types" "5.11.0"
|
||||
tslib "^1.9.3"
|
||||
|
||||
"@sindresorhus/is@^1.0.0":
|
||||
version "1.2.0"
|
||||
resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-1.2.0.tgz#63ce3638cb85231f3704164c90a18ef816da3fb7"
|
||||
integrity sha512-mwhXGkRV5dlvQc4EgPDxDxO6WuMBVymGFd1CA+2Y+z5dG9MNspoQ+AWjl/Ld1MnpCL8AKbosZlDVohqcIwuWsw==
|
||||
|
||||
"@szmarczak/http-timer@^4.0.0":
|
||||
version "4.0.0"
|
||||
resolved "https://registry.yarnpkg.com/@szmarczak/http-timer/-/http-timer-4.0.0.tgz#309789ccb7842ff1e41848cf43da587f78068836"
|
||||
integrity sha512-3yoXv8OtGr/r3R5gaWWNQ3VUoQ5G3Gmo8DXX95V14ZVvE2b7Pj6Ide9uIDON8ym4D/ItyfL9ejohYUPqOyvRXw==
|
||||
dependencies:
|
||||
defer-to-connect "^1.1.1"
|
||||
|
||||
"@types/cacheable-request@^6.0.1":
|
||||
version "6.0.1"
|
||||
resolved "https://registry.yarnpkg.com/@types/cacheable-request/-/cacheable-request-6.0.1.tgz#5d22f3dded1fd3a84c0bbeb5039a7419c2c91976"
|
||||
integrity sha512-ykFq2zmBGOCbpIXtoVbz4SKY5QriWPh3AjyU4G74RYbtt5yOc5OfaY75ftjg7mikMOla1CTGpX3lLbuJh8DTrQ==
|
||||
dependencies:
|
||||
"@types/http-cache-semantics" "*"
|
||||
"@types/keyv" "*"
|
||||
"@types/node" "*"
|
||||
"@types/responselike" "*"
|
||||
|
||||
"@types/http-cache-semantics@*":
|
||||
version "4.0.0"
|
||||
resolved "https://registry.yarnpkg.com/@types/http-cache-semantics/-/http-cache-semantics-4.0.0.tgz#9140779736aa2655635ee756e2467d787cfe8a2a"
|
||||
integrity sha512-c3Xy026kOF7QOTn00hbIllV1dLR9hG9NkSrLQgCVs8NF6sBU+VGWjD3wLPhmh1TYAc7ugCFsvHYMN4VcBN1U1A==
|
||||
|
||||
"@types/keyv@*":
|
||||
version "3.1.1"
|
||||
resolved "https://registry.yarnpkg.com/@types/keyv/-/keyv-3.1.1.tgz#e45a45324fca9dab716ab1230ee249c9fb52cfa7"
|
||||
integrity sha512-MPtoySlAZQ37VoLaPcTHCu1RWJ4llDkULYZIzOYxlhxBqYPB0RsRlmMU0R6tahtFe27mIdkHV+551ZWV4PLmVw==
|
||||
dependencies:
|
||||
"@types/node" "*"
|
||||
|
||||
"@types/node-fetch@2.5.4":
|
||||
version "2.5.4"
|
||||
resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.5.4.tgz#5245b6d8841fc3a6208b82291119bc11c4e0ce44"
|
||||
integrity sha512-Oz6id++2qAOFuOlE1j0ouk1dzl3mmI1+qINPNBhi9nt/gVOz0G+13Ao6qjhdF0Ys+eOkhu6JnFmt38bR3H0POQ==
|
||||
dependencies:
|
||||
"@types/node" "*"
|
||||
|
||||
"@types/node@*", "@types/node@13.1.4":
|
||||
version "13.1.4"
|
||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-13.1.4.tgz#4cfd90175a200ee9b02bd6b1cd19bc349741607e"
|
||||
integrity sha512-Lue/mlp2egZJoHXZr4LndxDAd7i/7SQYhV0EjWfb/a4/OZ6tuVwMCVPiwkU5nsEipxEf7hmkSU7Em5VQ8P5NGA==
|
||||
|
||||
"@types/responselike@*":
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/@types/responselike/-/responselike-1.0.0.tgz#251f4fe7d154d2bad125abe1b429b23afd262e29"
|
||||
integrity sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA==
|
||||
dependencies:
|
||||
"@types/node" "*"
|
||||
|
||||
agent-base@5:
|
||||
version "5.1.1"
|
||||
resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-5.1.1.tgz#e8fb3f242959db44d63be665db7a8e739537a32c"
|
||||
integrity sha512-TMeqbNl2fMW0nMjTEPOwe3J/PRFP4vqeoNuQMG0HlMrtm5QxKqdvAkZ1pRBQ/ulIyDD5Yq0nJ7YbdD8ey0TO3g==
|
||||
|
||||
binary@^0.3.0:
|
||||
version "0.3.0"
|
||||
resolved "https://registry.yarnpkg.com/binary/-/binary-0.3.0.tgz#9f60553bc5ce8c3386f3b553cff47462adecaa79"
|
||||
integrity sha1-n2BVO8XOjDOG87VTz/R0Yq3sqnk=
|
||||
dependencies:
|
||||
buffers "~0.1.1"
|
||||
chainsaw "~0.1.0"
|
||||
|
||||
bl@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/bl/-/bl-3.0.0.tgz#3611ec00579fd18561754360b21e9f784500ff88"
|
||||
integrity sha512-EUAyP5UHU5hxF8BPT0LKW8gjYLhq1DQIcneOX/pL/m2Alo+OYDQAJlHq+yseMP50Os2nHXOSic6Ss3vSQeyf4A==
|
||||
dependencies:
|
||||
readable-stream "^3.0.1"
|
||||
|
||||
buffers@~0.1.1:
|
||||
version "0.1.1"
|
||||
resolved "https://registry.yarnpkg.com/buffers/-/buffers-0.1.1.tgz#b24579c3bed4d6d396aeee6d9a8ae7f5482ab7bb"
|
||||
integrity sha1-skV5w77U1tOWru5tmorn9Ugqt7s=
|
||||
|
||||
cacheable-lookup@^0.2.1:
|
||||
version "0.2.1"
|
||||
resolved "https://registry.yarnpkg.com/cacheable-lookup/-/cacheable-lookup-0.2.1.tgz#f474ae2c686667d7ea08c43409ad31b2b31b26c2"
|
||||
integrity sha512-BQ8MRjxJASEq2q+w0SusPU3B054gS278K8sj58QCLMZIso5qG05+MdCdmXxuyVlfvI8h4bPsNOavVUauVCGxrg==
|
||||
dependencies:
|
||||
keyv "^3.1.0"
|
||||
|
||||
cacheable-request@^7.0.0:
|
||||
version "7.0.0"
|
||||
resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-7.0.0.tgz#12421aa084e943ec81eac8c93e56af90c624788a"
|
||||
integrity sha512-UVG4gMn3WjnAeFBBx7RFoprgOANIAkMwN5Dta6ONmfSwrCxfm0Ip7g0mIBxIRJZX9aDsoID0Ry3dU5Pr0csKKA==
|
||||
dependencies:
|
||||
clone-response "^1.0.2"
|
||||
get-stream "^5.1.0"
|
||||
http-cache-semantics "^4.0.0"
|
||||
keyv "^3.0.0"
|
||||
lowercase-keys "^2.0.0"
|
||||
normalize-url "^4.1.0"
|
||||
responselike "^2.0.0"
|
||||
|
||||
chainsaw@~0.1.0:
|
||||
version "0.1.0"
|
||||
resolved "https://registry.yarnpkg.com/chainsaw/-/chainsaw-0.1.0.tgz#5eab50b28afe58074d0d58291388828b5e5fbc98"
|
||||
integrity sha1-XqtQsor+WAdNDVgpE4iCi15fvJg=
|
||||
dependencies:
|
||||
traverse ">=0.3.0 <0.4"
|
||||
|
||||
chownr@^1.1.1:
|
||||
version "1.1.3"
|
||||
resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.3.tgz#42d837d5239688d55f303003a508230fa6727142"
|
||||
integrity sha512-i70fVHhmV3DtTl6nqvZOnIjbY0Pe4kAUjwHj8z0zAdgBtYrJyYwLKCCuRBQ5ppkyL0AkN7HKRnETdmdp1zqNXw==
|
||||
|
||||
clone-response@^1.0.2:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/clone-response/-/clone-response-1.0.2.tgz#d1dc973920314df67fbeb94223b4ee350239e96b"
|
||||
integrity sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=
|
||||
dependencies:
|
||||
mimic-response "^1.0.0"
|
||||
|
||||
cookie@^0.3.1:
|
||||
version "0.3.1"
|
||||
resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.3.1.tgz#e7e0a1f9ef43b4c8ba925c5c5a96e806d16873bb"
|
||||
integrity sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s=
|
||||
|
||||
debug@4:
|
||||
version "4.1.1"
|
||||
resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791"
|
||||
integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==
|
||||
dependencies:
|
||||
ms "^2.1.1"
|
||||
|
||||
decompress-response@^5.0.0:
|
||||
version "5.0.0"
|
||||
resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-5.0.0.tgz#7849396e80e3d1eba8cb2f75ef4930f76461cb0f"
|
||||
integrity sha512-TLZWWybuxWgoW7Lykv+gq9xvzOsUjQ9tF09Tj6NSTYGMTCHNXzrPnD6Hi+TgZq19PyTAGH4Ll/NIM/eTGglnMw==
|
||||
dependencies:
|
||||
mimic-response "^2.0.0"
|
||||
|
||||
defer-to-connect@^1.1.1:
|
||||
version "1.1.1"
|
||||
resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-1.1.1.tgz#88ae694b93f67b81815a2c8c769aef6574ac8f2f"
|
||||
integrity sha512-J7thop4u3mRTkYRQ+Vpfwy2G5Ehoy82I14+14W4YMDLKdWloI9gSzRbV30s/NckQGVJtPkWNcW4oMAUigTdqiQ==
|
||||
|
||||
duplexer3@^0.1.4:
|
||||
version "0.1.4"
|
||||
resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2"
|
||||
integrity sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=
|
||||
|
||||
end-of-stream@^1.1.0, end-of-stream@^1.4.1:
|
||||
version "1.4.4"
|
||||
resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0"
|
||||
integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==
|
||||
dependencies:
|
||||
once "^1.4.0"
|
||||
|
||||
fs-constants@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad"
|
||||
integrity sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==
|
||||
|
||||
get-stream@^5.0.0, get-stream@^5.1.0:
|
||||
version "5.1.0"
|
||||
resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-5.1.0.tgz#01203cdc92597f9b909067c3e656cc1f4d3c4dc9"
|
||||
integrity sha512-EXr1FOzrzTfGeL0gQdeFEvOMm2mzMOglyiOXSTpPC+iAjAKftbr3jpCMWynogwYnM+eSj9sHGc6wjIcDvYiygw==
|
||||
dependencies:
|
||||
pump "^3.0.0"
|
||||
|
||||
got@10.2.1:
|
||||
version "10.2.1"
|
||||
resolved "https://registry.yarnpkg.com/got/-/got-10.2.1.tgz#7087485482fb31aa6e6399fd493dd04639da117b"
|
||||
integrity sha512-IQX//hGm5oLjUj743GJG30U2RzjS58ZlhQQjwQXjsyR50TTD+etVMHlMEbNxYJGWVFa0ASgDVhRkAvQPe6M9iQ==
|
||||
dependencies:
|
||||
"@sindresorhus/is" "^1.0.0"
|
||||
"@szmarczak/http-timer" "^4.0.0"
|
||||
"@types/cacheable-request" "^6.0.1"
|
||||
cacheable-lookup "^0.2.1"
|
||||
cacheable-request "^7.0.0"
|
||||
decompress-response "^5.0.0"
|
||||
duplexer3 "^0.1.4"
|
||||
get-stream "^5.0.0"
|
||||
lowercase-keys "^2.0.0"
|
||||
mimic-response "^2.0.0"
|
||||
p-cancelable "^2.0.0"
|
||||
responselike "^2.0.0"
|
||||
to-readable-stream "^2.0.0"
|
||||
type-fest "^0.8.0"
|
||||
|
||||
http-cache-semantics@^4.0.0:
|
||||
version "4.0.3"
|
||||
resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.0.3.tgz#495704773277eeef6e43f9ab2c2c7d259dda25c5"
|
||||
integrity sha512-TcIMG3qeVLgDr1TEd2XvHaTnMPwYQUQMIBLy+5pLSDKYFc7UIqj39w8EGzZkaxoLv/l2K8HaI0t5AVA+YYgUew==
|
||||
|
||||
https-proxy-agent@^4.0.0:
|
||||
version "4.0.0"
|
||||
resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-4.0.0.tgz#702b71fb5520a132a66de1f67541d9e62154d82b"
|
||||
integrity sha512-zoDhWrkR3of1l9QAL8/scJZyLu8j/gBkcwcaQOZh7Gyh/+uJQzGVETdgT30akuwkpL8HTRfssqI3BZuV18teDg==
|
||||
dependencies:
|
||||
agent-base "5"
|
||||
debug "4"
|
||||
|
||||
inherits@^2.0.3:
|
||||
version "2.0.4"
|
||||
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c"
|
||||
integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==
|
||||
|
||||
json-buffer@3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.0.tgz#5b1f397afc75d677bde8bcfc0e47e1f9a3d9a898"
|
||||
integrity sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=
|
||||
|
||||
keyv@^3.0.0, keyv@^3.1.0:
|
||||
version "3.1.0"
|
||||
resolved "https://registry.yarnpkg.com/keyv/-/keyv-3.1.0.tgz#ecc228486f69991e49e9476485a5be1e8fc5c4d9"
|
||||
integrity sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA==
|
||||
dependencies:
|
||||
json-buffer "3.0.0"
|
||||
|
||||
lowercase-keys@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-2.0.0.tgz#2603e78b7b4b0006cbca2fbcc8a3202558ac9479"
|
||||
integrity sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==
|
||||
|
||||
lru_map@^0.3.3:
|
||||
version "0.3.3"
|
||||
resolved "https://registry.yarnpkg.com/lru_map/-/lru_map-0.3.3.tgz#b5c8351b9464cbd750335a79650a0ec0e56118dd"
|
||||
integrity sha1-tcg1G5Rky9dQM1p5ZQoOwOVhGN0=
|
||||
|
||||
mimic-response@^1.0.0:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-1.0.1.tgz#4923538878eef42063cb8a3e3b0798781487ab1b"
|
||||
integrity sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==
|
||||
|
||||
mimic-response@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-2.0.0.tgz#996a51c60adf12cb8a87d7fb8ef24c2f3d5ebb46"
|
||||
integrity sha512-8ilDoEapqA4uQ3TwS0jakGONKXVJqpy+RpM+3b7pLdOjghCrEiGp9SRkFbUHAmZW9vdnrENWHjaweIoTIJExSQ==
|
||||
|
||||
minimist@0.0.8:
|
||||
version "0.0.8"
|
||||
resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d"
|
||||
integrity sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=
|
||||
|
||||
mkdirp@^0.5.1:
|
||||
version "0.5.1"
|
||||
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903"
|
||||
integrity sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=
|
||||
dependencies:
|
||||
minimist "0.0.8"
|
||||
|
||||
ms@^2.1.1:
|
||||
version "2.1.2"
|
||||
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009"
|
||||
integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==
|
||||
|
||||
node-fetch@2.6.0:
|
||||
version "2.6.0"
|
||||
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.0.tgz#e633456386d4aa55863f676a7ab0daa8fdecb0fd"
|
||||
integrity sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA==
|
||||
|
||||
normalize-url@^4.1.0:
|
||||
version "4.5.0"
|
||||
resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-4.5.0.tgz#453354087e6ca96957bd8f5baf753f5982142129"
|
||||
integrity sha512-2s47yzUxdexf1OhyRi4Em83iQk0aPvwTddtFz4hnSSw9dCEsLEGf6SwIO8ss/19S9iBb5sJaOuTvTGDeZI00BQ==
|
||||
|
||||
once@^1.3.1, once@^1.4.0:
|
||||
version "1.4.0"
|
||||
resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
|
||||
integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E=
|
||||
dependencies:
|
||||
wrappy "1"
|
||||
|
||||
p-cancelable@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-2.0.0.tgz#4a3740f5bdaf5ed5d7c3e34882c6fb5d6b266a6e"
|
||||
integrity sha512-wvPXDmbMmu2ksjkB4Z3nZWTSkJEb9lqVdMaCKpZUGJG9TMiNp9XcbG3fn9fPKjem04fJMJnXoyFPk2FmgiaiNg==
|
||||
|
||||
parse-github-url@1.0.2:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/parse-github-url/-/parse-github-url-1.0.2.tgz#242d3b65cbcdda14bb50439e3242acf6971db395"
|
||||
integrity sha512-kgBf6avCbO3Cn6+RnzRGLkUsv4ZVqv/VfAYkRsyBcgkshNvVBkRn1FEZcW0Jb+npXQWm2vHPnnOqFteZxRRGNw==
|
||||
|
||||
pump@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64"
|
||||
integrity sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==
|
||||
dependencies:
|
||||
end-of-stream "^1.1.0"
|
||||
once "^1.3.1"
|
||||
|
||||
readable-stream@^3.0.1, readable-stream@^3.1.1:
|
||||
version "3.4.0"
|
||||
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.4.0.tgz#a51c26754658e0a3c21dbf59163bd45ba6f447fc"
|
||||
integrity sha512-jItXPLmrSR8jmTRmRWJXCnGJsfy85mB3Wd/uINMXA65yrnFo0cPClFIUWzo2najVNSl+mx7/4W8ttlLWJe99pQ==
|
||||
dependencies:
|
||||
inherits "^2.0.3"
|
||||
string_decoder "^1.1.1"
|
||||
util-deprecate "^1.0.1"
|
||||
|
||||
responselike@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/responselike/-/responselike-2.0.0.tgz#26391bcc3174f750f9a79eacc40a12a5c42d7723"
|
||||
integrity sha512-xH48u3FTB9VsZw7R+vvgaKeLKzT6jOogbQhEe/jewwnZgzPcnyWui2Av6JpoYZF/91uueC+lqhWqeURw5/qhCw==
|
||||
dependencies:
|
||||
lowercase-keys "^2.0.0"
|
||||
|
||||
safe-buffer@~5.2.0:
|
||||
version "5.2.0"
|
||||
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.0.tgz#b74daec49b1148f88c64b68d49b1e815c1f2f519"
|
||||
integrity sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg==
|
||||
|
||||
string_decoder@^1.1.1:
|
||||
version "1.3.0"
|
||||
resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e"
|
||||
integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==
|
||||
dependencies:
|
||||
safe-buffer "~5.2.0"
|
||||
|
||||
tar-fs@2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-2.0.0.tgz#677700fc0c8b337a78bee3623fdc235f21d7afad"
|
||||
integrity sha512-vaY0obB6Om/fso8a8vakQBzwholQ7v5+uy+tF3Ozvxv1KNezmVQAiWtcNmMHFSFPqL3dJA8ha6gdtFbfX9mcxA==
|
||||
dependencies:
|
||||
chownr "^1.1.1"
|
||||
mkdirp "^0.5.1"
|
||||
pump "^3.0.0"
|
||||
tar-stream "^2.0.0"
|
||||
|
||||
tar-stream@^2.0.0:
|
||||
version "2.1.0"
|
||||
resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-2.1.0.tgz#d1aaa3661f05b38b5acc9b7020efdca5179a2cc3"
|
||||
integrity sha512-+DAn4Nb4+gz6WZigRzKEZl1QuJVOLtAwwF+WUxy1fJ6X63CaGaUAxJRD2KEn1OMfcbCjySTYpNC6WmfQoIEOdw==
|
||||
dependencies:
|
||||
bl "^3.0.0"
|
||||
end-of-stream "^1.4.1"
|
||||
fs-constants "^1.0.0"
|
||||
inherits "^2.0.3"
|
||||
readable-stream "^3.1.1"
|
||||
|
||||
to-readable-stream@^2.0.0:
|
||||
version "2.1.0"
|
||||
resolved "https://registry.yarnpkg.com/to-readable-stream/-/to-readable-stream-2.1.0.tgz#82880316121bea662cdc226adb30addb50cb06e8"
|
||||
integrity sha512-o3Qa6DGg1CEXshSdvWNX2sN4QHqg03SPq7U6jPXRahlQdl5dK8oXjkU/2/sGrnOZKeGV1zLSO8qPwyKklPPE7w==
|
||||
|
||||
"traverse@>=0.3.0 <0.4":
|
||||
version "0.3.9"
|
||||
resolved "https://registry.yarnpkg.com/traverse/-/traverse-0.3.9.tgz#717b8f220cc0bb7b44e40514c22b2e8bbc70d8b9"
|
||||
integrity sha1-cXuPIgzAu3tE5AUUwisui7xw2Lk=
|
||||
|
||||
tslib@^1.9.3:
|
||||
version "1.10.0"
|
||||
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.10.0.tgz#c3c19f95973fb0a62973fb09d90d961ee43e5c8a"
|
||||
integrity sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==
|
||||
|
||||
type-fest@^0.8.0:
|
||||
version "0.8.1"
|
||||
resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d"
|
||||
integrity sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==
|
||||
|
||||
typescript@3.7.4:
|
||||
version "3.7.4"
|
||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.7.4.tgz#1743a5ec5fef6a1fa9f3e4708e33c81c73876c19"
|
||||
integrity sha512-A25xv5XCtarLwXpcDNZzCGvW2D1S3/bACratYBx2sax8PefsFhlYmkQicKHvpYflFS8if4zne5zT5kpJ7pzuvw==
|
||||
|
||||
unzip-stream@0.3.0:
|
||||
version "0.3.0"
|
||||
resolved "https://registry.yarnpkg.com/unzip-stream/-/unzip-stream-0.3.0.tgz#c30c054cd6b0d64b13a23cd3ece911eb0b2b52d8"
|
||||
integrity sha512-NG1h/MdGIX3HzyqMjyj1laBCmlPYhcO4xEy7gEqqzGiSLw7XqDQCnY4nYSn5XSaH8mQ6TFkaujrO8d/PIZN85A==
|
||||
dependencies:
|
||||
binary "^0.3.0"
|
||||
mkdirp "^0.5.1"
|
||||
|
||||
util-deprecate@^1.0.1:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf"
|
||||
integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=
|
||||
|
||||
wrappy@1:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
|
||||
integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=
|
||||
18
changelog.js
18
changelog.js
@@ -1,18 +0,0 @@
|
||||
const { execSync } = require('child_process');
|
||||
|
||||
const commit = execSync('git log --pretty=format:"%s %H"')
|
||||
.toString()
|
||||
.trim()
|
||||
.split('\n')
|
||||
.find(line => line.startsWith('Publish Stable '))
|
||||
.split(' ')
|
||||
.pop();
|
||||
|
||||
if (!commit) {
|
||||
throw new Error('Unable to find last publish commit');
|
||||
}
|
||||
|
||||
const log = execSync(`git log --pretty=format:"- %s [%an]" ${commit}...HEAD`).toString().trim();
|
||||
|
||||
console.log(`Changes since the last publish commit ${commit}:`);
|
||||
console.log(`\n${log}\n`);
|
||||
8
codecov.yml
Normal file
8
codecov.yml
Normal file
@@ -0,0 +1,8 @@
|
||||
codecov:
|
||||
require_ci_to_pass: yes
|
||||
|
||||
coverage:
|
||||
status:
|
||||
project: off
|
||||
patch: off
|
||||
|
||||
33
errors/invalid-route-source.md
Normal file
33
errors/invalid-route-source.md
Normal file
@@ -0,0 +1,33 @@
|
||||
# Invalid Custom Route `source`
|
||||
|
||||
#### Why This Error Occurred
|
||||
|
||||
When defining custom routes a route was added that causes an error during parsing. This can be due to trying to use normal `RegExp` syntax like negative lookaheads (`?!exclude`) without following `path-to-regexp`'s syntax for it.
|
||||
|
||||
#### Possible Ways to Fix It
|
||||
|
||||
Wrap the `RegExp` part of your `source` as an un-named parameter.
|
||||
|
||||
**Before**
|
||||
|
||||
```js
|
||||
{
|
||||
source: '/feedback/(?!general)',
|
||||
destination: '/feedback/general'
|
||||
}
|
||||
```
|
||||
|
||||
**After**
|
||||
|
||||
```js
|
||||
{
|
||||
source: '/feedback/((?!general).*)',
|
||||
destination: '/feedback/general'
|
||||
}
|
||||
```
|
||||
|
||||
### Useful Links
|
||||
|
||||
- [path-to-regexp](https://github.com/pillarjs/path-to-regexp/tree/v6.1.0)
|
||||
- [named parameters](https://github.com/pillarjs/path-to-regexp/blob/v6.1.0/Readme.md#named-parameters)
|
||||
- [un-named paramters](https://github.com/pillarjs/path-to-regexp/blob/v6.1.0/Readme.md#unnamed-parameters)
|
||||
11
errors/invalid-token-value.md
Normal file
11
errors/invalid-token-value.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# Invalid Token Value
|
||||
|
||||
#### Why This Error Occurred
|
||||
|
||||
The `--token` flag was specified, but its contents are invalid.
|
||||
|
||||
#### Possible Ways to Fix It
|
||||
|
||||
The `--token` flag must only contain numbers (0-9) and letters from the alphabet (a-z and A-Z). This needs to be the token of the user account as which you'd like to act.
|
||||
|
||||
You can either get the token from the `./now/auth.json` file located in your user directory or [from the dashboard](https://zeit.co/account/tokens).
|
||||
85
examples/README.md
Normal file
85
examples/README.md
Normal file
@@ -0,0 +1,85 @@
|
||||
# ZEIT Now Examples
|
||||
|
||||
This is the public list of examples for **ZEIT Now**.
|
||||
|
||||
All of these ready to deploy examples feature a frontend framework or static site, created with zero configuration using the CLI tools they provide.
|
||||
|
||||
The `+functions` examples feature an `/api` directory as well, highlighting how to use serverless functions on top of a framework, again with zero configuration required.
|
||||
|
||||
## What is ZEIT Now?
|
||||
|
||||
ZEIT Now is a cloud platform for static frontends and serverless functions. It enables developers to host websites and web applications that deploy instantly, scale automatically, and require no supervision.
|
||||
|
||||
## What Does this Repository Contain?
|
||||
|
||||
This repository consists of multiple examples, created for use with the [ZEIT Now](https://zeit.co/now) platform. In addition to this, it also contains:
|
||||
|
||||
- [Code of Conduct](https://github.com/zeit/now/blob/master/.github/CODE_OF_CONDUCT.md) - our Code of Conduct, adapted from the [Contributor Covenant](http://contributor-covenant.org)
|
||||
- [Contributing Guidelines](https://github.com/zeit/now/blob/master/.github/CONTRIBUTING.md) - a guide on how to contribute to the Now Examples repository
|
||||
- [License](https://github.com/zeit/now/blob/master/LICENSE) - the standard MIT license under which these examples are published
|
||||
|
||||
We recommend familiarizing yourself with the above sections, particularly if you are looking to make a contribution.
|
||||
|
||||
## Deploying Examples
|
||||
|
||||
To get started using any of these examples as your own project, [install Now](https://zeit.co/download) and use either of the following commands in your terminal:
|
||||
|
||||
```sh
|
||||
now init # Pick an example in the CLI
|
||||
now init <example> # Create a new project from a specific <example>
|
||||
now init <example> <name> # Create a new project from a specific <example> with a different folder <name>
|
||||
```
|
||||
|
||||
Deploying your project takes seconds and can be done with **just a single command**:
|
||||
|
||||
```sh
|
||||
now # Deploys the project with Now
|
||||
```
|
||||
|
||||
With the `now` command, your project will be built and served by Now, providing you with a URL that can be shared immediately.
|
||||
|
||||
## New Examples
|
||||
|
||||
We are continuously improving our examples based on best practices and feedback from the community. As a result, it is possible that example names will change and on occasion deprecated in favor of an improved implementation.
|
||||
|
||||
For example, the previous `nodejs` example showed a static frontend with a Node.js API. This is illustrated now in the `svelte` example. Below is a table that lists some of the most popular previous examples and the equivalent replacement:
|
||||
|
||||
| Previous Example | New Example |
|
||||
| ----------------- | ------------------------------------------------------------------------------------- |
|
||||
| **monorepo** | [gatsby-functions](https://github.com/zeit/now/tree/master/examples/gatsby) |
|
||||
| **nodejs** | [svelte-functions](https://github.com/zeit/now/tree/master/examples/svelte) |
|
||||
| **nextjs-static** | [nextjs](https://github.com/zeit/now/tree/master/examples/nextjs) |
|
||||
| **vanilla-go** | [create-react-app](https://github.com/zeit/now/tree/master/examples/create-react-app) |
|
||||
| **typescript** | [gatsby-functions](https://github.com/zeit/now/tree/master/examples/gatsby) |
|
||||
|
||||
## Migrating and Upgrading
|
||||
|
||||
If you have an existing project you would like to deploy with ZEIT Now, we recommend reading our guide on [migrating to Now and zero configuration](https://zeit.co/guides/migrate-to-zeit-now/). By combining the guide with this repository, you will quickly be able to understand how to deploy your application.
|
||||
|
||||
If you would like to upgrade a project to take advantage of zero configuration, you may find the [upgrade guide](https://zeit.co/guides/upgrade-to-zero-configuration/) useful. The upgrade guide covers how to remove configuration from existing projects along with how to use the `/api` directory.
|
||||
|
||||
## How to Contribute
|
||||
|
||||
Contributing to Now Examples should be an enjoyable experience, as such we have created a set of [contributing guidelines](https://github.com/zeit/docs/blob/master/CONTRIBUTING.md) to help you do so.
|
||||
|
||||
The guidelines cover important information such as the requirements for new examples and where to get help if you have any questions.
|
||||
|
||||
We have tried to make contributing to Now Examples as easy as possible, especially for those new to Open Source. If anything is unclear or you have any questions then please reach out to us on [GitHub Discussions](https://github.com/zeit/now/discussions) where we will do our best to help you.
|
||||
|
||||
## Reporting Issues
|
||||
|
||||
We actively encourage our community to raise issues and provide feedback on areas of Now Examples that could be improved.
|
||||
|
||||
An issue can be raised by clicking the 'Issues' tab at the top of the repository, followed by the Green 'New issue' button.
|
||||
|
||||
When submitting an issue, please thoroughly and concisely describe the problem you are experiencing so that we may easily understand and resolve the issue in a timely manner.
|
||||
|
||||
## License
|
||||
|
||||
Now Examples is an open source project released under the [MIT License](https://github.com/zeit/docs/blob/master/LICENSE.md).
|
||||
|
||||
## Get In Touch
|
||||
|
||||
If you have any questions that are not covered by raising an issue then please get in touch with us on [GitHub Discussions](https://github.com/zeit/now/discussions). There you will find both members of the community and staff who are happy to help answer questions on anything ZEIT related.
|
||||
|
||||
[](https://github.com/zeit/now/discussions)
|
||||
1
examples/amp/.gitignore
vendored
Normal file
1
examples/amp/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.env
|
||||
27
examples/amp/README.md
Normal file
27
examples/amp/README.md
Normal file
@@ -0,0 +1,27 @@
|
||||
# AMP Example
|
||||
|
||||
This directory is a brief example of an [AMP](https://amp.dev/) site that can be deployed with ZEIT Now and zero configuration.
|
||||
|
||||
## Deploy Your Own
|
||||
|
||||
Deploy your own AMP project with ZEIT Now.
|
||||
|
||||
[](https://zeit.co/import/project?template=https://github.com/zeit/now/tree/master/examples/amp)
|
||||
|
||||
_Live Example: https://amp.now-examples.now.sh_
|
||||
|
||||
### How We Created This Example
|
||||
|
||||
To get started deploying AMP with ZEIT Now, you can use the [Now CLI](https://zeit.co/download) to initialize the project:
|
||||
|
||||
```shell
|
||||
$ now init amp
|
||||
```
|
||||
|
||||
### Deploying From Your Terminal
|
||||
|
||||
You can deploy your new AMP project with a single command from your terminal using Now CLI:
|
||||
|
||||
```shell
|
||||
$ now
|
||||
```
|
||||
BIN
examples/amp/favicon.png
Normal file
BIN
examples/amp/favicon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.0 KiB |
72
examples/amp/index.html
Normal file
72
examples/amp/index.html
Normal file
@@ -0,0 +1,72 @@
|
||||
<!DOCTYPE html>
|
||||
<html ⚡>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width,minimum-scale=1" />
|
||||
<link rel="shortcut icon" href="favicon.png">
|
||||
<style amp-boilerplate>body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}</style><noscript><style amp-boilerplate>body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}</style></noscript>
|
||||
<link rel="canonical" href="index.html" />
|
||||
<title>AMP Website</title>
|
||||
<script async src="https://cdn.ampproject.org/v0.js"></script>
|
||||
<style amp-custom>
|
||||
body > * {
|
||||
margin: 3rem 1rem;
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
|
||||
color: #525252;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: 2rem;
|
||||
}
|
||||
|
||||
h4 {
|
||||
margin-top: 2rem;
|
||||
}
|
||||
|
||||
p {
|
||||
font-size: 1.2rem;
|
||||
line-height: 2rem;
|
||||
}
|
||||
|
||||
.links {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
margin-bottom: 3rem;
|
||||
}
|
||||
|
||||
.links a {
|
||||
margin: 0 10px;
|
||||
font-size: 1rem;
|
||||
color: #005af0;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<center>
|
||||
<amp-img width=150 height=150 layout="fixed" class="logo" src="logo.png"></amp-img>
|
||||
<h3>Welcome to your AMP page</h3>
|
||||
<p>AMP is a web component framework to <br> easily create user-first websites, stories, ads and emails.</p>
|
||||
|
||||
<h4>Links</h4>
|
||||
<div class="links">
|
||||
<a href="https://amp.dev/">Homepage</a>
|
||||
<a href="https://amp.dev/documentation/guides-and-tutorials/?format=websites">Tutorials</a>
|
||||
<a href="https://amp.dev/documentation/examples/">Examples</a>
|
||||
<a href="https://blog.amp.dev">Blog</a>
|
||||
</div>
|
||||
|
||||
<h4>Ready to get started?</h4>
|
||||
<div class="links">
|
||||
<a href="https://amp.dev/documentation/guides-and-tutorials/start/create/?format=websites">Create your first AMP page</a>
|
||||
</div>
|
||||
|
||||
<h4>Get involved</h4>
|
||||
<div class="links">
|
||||
<a href="https://twitter.com/amphtml">Twitter</a>
|
||||
<a href="https://amphtml.slack.com">Slack</a>
|
||||
<a href="https://amp.dev/events/amp-conf-2019">AMP Conf</a>
|
||||
<a href="https://amp.dev/events/amp-roadshow">AMP Roadshow</a>
|
||||
</div>
|
||||
</center>
|
||||
</body>
|
||||
</html>
|
||||
BIN
examples/amp/logo.png
Normal file
BIN
examples/amp/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 43 KiB |
13
examples/angular/.editorconfig
Normal file
13
examples/angular/.editorconfig
Normal file
@@ -0,0 +1,13 @@
|
||||
# Editor configuration, see https://editorconfig.org
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[*.md]
|
||||
max_line_length = off
|
||||
trim_trailing_whitespace = false
|
||||
50
examples/angular/.gitignore
vendored
Normal file
50
examples/angular/.gitignore
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
# See http://help.github.com/ignore-files/ for more about ignoring files.
|
||||
|
||||
# compiled output
|
||||
/dist
|
||||
/tmp
|
||||
/out-tsc
|
||||
# Only exists if Bazel was run
|
||||
/bazel-out
|
||||
|
||||
# dependencies
|
||||
/node_modules
|
||||
|
||||
# profiling files
|
||||
chrome-profiler-events.json
|
||||
speed-measure-plugin.json
|
||||
|
||||
# IDEs and editors
|
||||
/.idea
|
||||
.project
|
||||
.classpath
|
||||
.c9/
|
||||
*.launch
|
||||
.settings/
|
||||
*.sublime-workspace
|
||||
|
||||
# IDE - VSCode
|
||||
.vscode/*
|
||||
!.vscode/settings.json
|
||||
!.vscode/tasks.json
|
||||
!.vscode/launch.json
|
||||
!.vscode/extensions.json
|
||||
.history/*
|
||||
|
||||
# misc
|
||||
/.sass-cache
|
||||
/connect.lock
|
||||
/coverage
|
||||
/libpeerconnection.log
|
||||
npm-debug.log
|
||||
yarn-error.log
|
||||
testem.log
|
||||
/typings
|
||||
|
||||
# System Files
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
|
||||
# Environment Variables
|
||||
.env
|
||||
.env.build
|
||||
29
examples/angular/README.md
Normal file
29
examples/angular/README.md
Normal file
@@ -0,0 +1,29 @@
|
||||

|
||||
|
||||
# Angular Example
|
||||
|
||||
This directory is a brief example of an [Angular](https://angular.io/) app that can be deployed with ZEIT Now and zero configuration.
|
||||
|
||||
## Deploy Your Own
|
||||
|
||||
Deploy your own Angular project with ZEIT Now.
|
||||
|
||||
[](https://zeit.co/import/project?template=https://github.com/zeit/now/tree/master/examples/angular)
|
||||
|
||||
_Live Example: https://angular.now-examples.now.sh_
|
||||
|
||||
### How We Created This Example
|
||||
|
||||
To get started with Angular, you can use the [Angular CLI](https://cli.angular.io/) to initialize the project:
|
||||
|
||||
```shell
|
||||
$ ng new
|
||||
```
|
||||
|
||||
### Deploying From Your Terminal
|
||||
|
||||
You can deploy your new Angular project with a single command from your terminal using [Now CLI](https://zeit.co/download):
|
||||
|
||||
```shell
|
||||
$ now
|
||||
```
|
||||
109
examples/angular/angular.json
Normal file
109
examples/angular/angular.json
Normal file
@@ -0,0 +1,109 @@
|
||||
{
|
||||
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
|
||||
"version": 1,
|
||||
"newProjectRoot": "projects",
|
||||
"projects": {
|
||||
"angular": {
|
||||
"projectType": "application",
|
||||
"schematics": {},
|
||||
"root": "",
|
||||
"sourceRoot": "src",
|
||||
"prefix": "app",
|
||||
"architect": {
|
||||
"build": {
|
||||
"builder": "@angular-devkit/build-angular:browser",
|
||||
"options": {
|
||||
"outputPath": "dist/angular",
|
||||
"index": "src/index.html",
|
||||
"main": "src/main.ts",
|
||||
"polyfills": "src/polyfills.ts",
|
||||
"tsConfig": "tsconfig.app.json",
|
||||
"aot": false,
|
||||
"assets": ["src/favicon.ico", "src/assets"],
|
||||
"styles": ["src/styles.css"],
|
||||
"scripts": []
|
||||
},
|
||||
"configurations": {
|
||||
"production": {
|
||||
"fileReplacements": [
|
||||
{
|
||||
"replace": "src/environments/environment.ts",
|
||||
"with": "src/environments/environment.prod.ts"
|
||||
}
|
||||
],
|
||||
"optimization": true,
|
||||
"outputHashing": "all",
|
||||
"sourceMap": false,
|
||||
"extractCss": true,
|
||||
"namedChunks": false,
|
||||
"aot": true,
|
||||
"extractLicenses": true,
|
||||
"vendorChunk": false,
|
||||
"buildOptimizer": true,
|
||||
"budgets": [
|
||||
{
|
||||
"type": "initial",
|
||||
"maximumWarning": "2mb",
|
||||
"maximumError": "5mb"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"serve": {
|
||||
"builder": "@angular-devkit/build-angular:dev-server",
|
||||
"options": {
|
||||
"browserTarget": "angular:build"
|
||||
},
|
||||
"configurations": {
|
||||
"production": {
|
||||
"browserTarget": "angular:build:production"
|
||||
}
|
||||
}
|
||||
},
|
||||
"extract-i18n": {
|
||||
"builder": "@angular-devkit/build-angular:extract-i18n",
|
||||
"options": {
|
||||
"browserTarget": "angular:build"
|
||||
}
|
||||
},
|
||||
"test": {
|
||||
"builder": "@angular-devkit/build-angular:karma",
|
||||
"options": {
|
||||
"main": "src/test.ts",
|
||||
"polyfills": "src/polyfills.ts",
|
||||
"tsConfig": "tsconfig.spec.json",
|
||||
"karmaConfig": "karma.conf.js",
|
||||
"assets": ["src/favicon.ico", "src/assets"],
|
||||
"styles": ["src/styles.css"],
|
||||
"scripts": []
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"builder": "@angular-devkit/build-angular:tslint",
|
||||
"options": {
|
||||
"tsConfig": [
|
||||
"tsconfig.app.json",
|
||||
"tsconfig.spec.json",
|
||||
"e2e/tsconfig.json"
|
||||
],
|
||||
"exclude": ["**/node_modules/**"]
|
||||
}
|
||||
},
|
||||
"e2e": {
|
||||
"builder": "@angular-devkit/build-angular:protractor",
|
||||
"options": {
|
||||
"protractorConfig": "e2e/protractor.conf.js",
|
||||
"devServerTarget": "angular:serve"
|
||||
},
|
||||
"configurations": {
|
||||
"production": {
|
||||
"devServerTarget": "angular:serve:production"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"defaultProject": "angular"
|
||||
}
|
||||
12
examples/angular/browserslist
Normal file
12
examples/angular/browserslist
Normal file
@@ -0,0 +1,12 @@
|
||||
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
|
||||
# For additional information regarding the format and rule options, please see:
|
||||
# https://github.com/browserslist/browserslist#queries
|
||||
|
||||
# You can see what browsers were selected by your queries by running:
|
||||
# npx browserslist
|
||||
|
||||
> 0.5%
|
||||
last 2 versions
|
||||
Firefox ESR
|
||||
not dead
|
||||
not IE 9-11 # For IE 9-11 support, remove 'not'.
|
||||
32
examples/angular/e2e/protractor.conf.js
Normal file
32
examples/angular/e2e/protractor.conf.js
Normal file
@@ -0,0 +1,32 @@
|
||||
// @ts-check
|
||||
// Protractor configuration file, see link for more information
|
||||
// https://github.com/angular/protractor/blob/master/lib/config.ts
|
||||
|
||||
const { SpecReporter } = require('jasmine-spec-reporter');
|
||||
|
||||
/**
|
||||
* @type { import("protractor").Config }
|
||||
*/
|
||||
exports.config = {
|
||||
allScriptsTimeout: 11000,
|
||||
specs: ['./src/**/*.e2e-spec.ts'],
|
||||
capabilities: {
|
||||
browserName: 'chrome',
|
||||
},
|
||||
directConnect: true,
|
||||
baseUrl: 'http://localhost:4200/',
|
||||
framework: 'jasmine',
|
||||
jasmineNodeOpts: {
|
||||
showColors: true,
|
||||
defaultTimeoutInterval: 30000,
|
||||
print: function() {},
|
||||
},
|
||||
onPrepare() {
|
||||
require('ts-node').register({
|
||||
project: require('path').join(__dirname, './tsconfig.json'),
|
||||
});
|
||||
jasmine
|
||||
.getEnv()
|
||||
.addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
|
||||
},
|
||||
};
|
||||
28
examples/angular/e2e/src/app.e2e-spec.ts
Normal file
28
examples/angular/e2e/src/app.e2e-spec.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
import { AppPage } from './app.po';
|
||||
import { browser, logging } from 'protractor';
|
||||
|
||||
describe('workspace-project App', () => {
|
||||
let page: AppPage;
|
||||
|
||||
beforeEach(() => {
|
||||
page = new AppPage();
|
||||
});
|
||||
|
||||
it('should display welcome message', () => {
|
||||
page.navigateTo();
|
||||
expect(page.getTitleText()).toEqual('Welcome to angular!');
|
||||
});
|
||||
|
||||
afterEach(async () => {
|
||||
// Assert that there are no errors emitted from the browser
|
||||
const logs = await browser
|
||||
.manage()
|
||||
.logs()
|
||||
.get(logging.Type.BROWSER);
|
||||
expect(logs).not.toContain(
|
||||
jasmine.objectContaining({
|
||||
level: logging.Level.SEVERE,
|
||||
} as logging.Entry)
|
||||
);
|
||||
});
|
||||
});
|
||||
11
examples/angular/e2e/src/app.po.ts
Normal file
11
examples/angular/e2e/src/app.po.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import { browser, by, element } from 'protractor';
|
||||
|
||||
export class AppPage {
|
||||
navigateTo() {
|
||||
return browser.get(browser.baseUrl) as Promise<any>;
|
||||
}
|
||||
|
||||
getTitleText() {
|
||||
return element(by.css('app-root h1')).getText() as Promise<string>;
|
||||
}
|
||||
}
|
||||
9
examples/angular/e2e/tsconfig.json
Normal file
9
examples/angular/e2e/tsconfig.json
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"extends": "../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../out-tsc/e2e",
|
||||
"module": "commonjs",
|
||||
"target": "es5",
|
||||
"types": ["jasmine", "jasminewd2", "node"]
|
||||
}
|
||||
}
|
||||
32
examples/angular/karma.conf.js
Normal file
32
examples/angular/karma.conf.js
Normal file
@@ -0,0 +1,32 @@
|
||||
// Karma configuration file, see link for more information
|
||||
// https://karma-runner.github.io/1.0/config/configuration-file.html
|
||||
|
||||
module.exports = function(config) {
|
||||
config.set({
|
||||
basePath: '',
|
||||
frameworks: ['jasmine', '@angular-devkit/build-angular'],
|
||||
plugins: [
|
||||
require('karma-jasmine'),
|
||||
require('karma-chrome-launcher'),
|
||||
require('karma-jasmine-html-reporter'),
|
||||
require('karma-coverage-istanbul-reporter'),
|
||||
require('@angular-devkit/build-angular/plugins/karma'),
|
||||
],
|
||||
client: {
|
||||
clearContext: false, // leave Jasmine Spec Runner output visible in browser
|
||||
},
|
||||
coverageIstanbulReporter: {
|
||||
dir: require('path').join(__dirname, './coverage/angular'),
|
||||
reports: ['html', 'lcovonly', 'text-summary'],
|
||||
fixWebpackSourcePaths: true,
|
||||
},
|
||||
reporters: ['progress', 'kjhtml'],
|
||||
port: 9876,
|
||||
colors: true,
|
||||
logLevel: config.LOG_INFO,
|
||||
autoWatch: true,
|
||||
browsers: ['Chrome'],
|
||||
singleRun: false,
|
||||
restartOnFileChange: true,
|
||||
});
|
||||
};
|
||||
48
examples/angular/package.json
Normal file
48
examples/angular/package.json
Normal file
@@ -0,0 +1,48 @@
|
||||
{
|
||||
"name": "angular",
|
||||
"version": "0.0.0",
|
||||
"scripts": {
|
||||
"ng": "ng",
|
||||
"start": "ng serve",
|
||||
"dev": "ng serve --port $PORT",
|
||||
"build": "ng build",
|
||||
"test": "ng test",
|
||||
"lint": "ng lint",
|
||||
"e2e": "ng e2e"
|
||||
},
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@angular/animations": "~8.1.0",
|
||||
"@angular/common": "~8.1.0",
|
||||
"@angular/compiler": "~8.1.0",
|
||||
"@angular/core": "~8.1.0",
|
||||
"@angular/forms": "~8.1.0",
|
||||
"@angular/platform-browser": "~8.1.0",
|
||||
"@angular/platform-browser-dynamic": "~8.1.0",
|
||||
"@angular/router": "~8.1.0",
|
||||
"rxjs": "~6.4.0",
|
||||
"tslib": "^1.9.0",
|
||||
"zone.js": "~0.9.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular-devkit/build-angular": "~0.801.0",
|
||||
"@angular/cli": "~8.1.0",
|
||||
"@angular/compiler-cli": "~8.1.0",
|
||||
"@angular/language-service": "~8.1.0",
|
||||
"@types/node": "~8.9.4",
|
||||
"@types/jasmine": "~3.3.8",
|
||||
"@types/jasminewd2": "~2.0.3",
|
||||
"codelyzer": "^5.0.0",
|
||||
"jasmine-core": "~3.4.0",
|
||||
"jasmine-spec-reporter": "~4.2.1",
|
||||
"karma": "~4.1.0",
|
||||
"karma-chrome-launcher": "~2.2.0",
|
||||
"karma-coverage-istanbul-reporter": "~2.0.1",
|
||||
"karma-jasmine": "~2.0.1",
|
||||
"karma-jasmine-html-reporter": "^1.4.0",
|
||||
"protractor": "~5.4.0",
|
||||
"ts-node": "~7.0.0",
|
||||
"tslint": "~5.15.0",
|
||||
"typescript": "~3.4.3"
|
||||
}
|
||||
}
|
||||
0
examples/angular/src/app/app.component.css
Normal file
0
examples/angular/src/app/app.component.css
Normal file
20
examples/angular/src/app/app.component.html
Normal file
20
examples/angular/src/app/app.component.html
Normal file
@@ -0,0 +1,20 @@
|
||||
<!--The content below is only a placeholder and can be replaced.-->
|
||||
<div style="text-align:center">
|
||||
<h1>
|
||||
Welcome to {{ title }}!
|
||||
</h1>
|
||||
<img width="300" alt="Angular Logo" src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNTAgMjUwIj4KICAgIDxwYXRoIGZpbGw9IiNERDAwMzEiIGQ9Ik0xMjUgMzBMMzEuOSA2My4ybDE0LjIgMTIzLjFMMTI1IDIzMGw3OC45LTQzLjcgMTQuMi0xMjMuMXoiIC8+CiAgICA8cGF0aCBmaWxsPSIjQzMwMDJGIiBkPSJNMTI1IDMwdjIyLjItLjFWMjMwbDc4LjktNDMuNyAxNC4yLTEyMy4xTDEyNSAzMHoiIC8+CiAgICA8cGF0aCAgZmlsbD0iI0ZGRkZGRiIgZD0iTTEyNSA1Mi4xTDY2LjggMTgyLjZoMjEuN2wxMS43LTI5LjJoNDkuNGwxMS43IDI5LjJIMTgzTDEyNSA1Mi4xem0xNyA4My4zaC0zNGwxNy00MC45IDE3IDQwLjl6IiAvPgogIDwvc3ZnPg==">
|
||||
</div>
|
||||
<h2>Here are some links to help you start: </h2>
|
||||
<ul>
|
||||
<li>
|
||||
<h2><a target="_blank" rel="noopener" href="https://angular.io/tutorial">Tour of Heroes</a></h2>
|
||||
</li>
|
||||
<li>
|
||||
<h2><a target="_blank" rel="noopener" href="https://angular.io/cli">CLI Documentation</a></h2>
|
||||
</li>
|
||||
<li>
|
||||
<h2><a target="_blank" rel="noopener" href="https://blog.angular.io/">Angular blog</a></h2>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
31
examples/angular/src/app/app.component.spec.ts
Normal file
31
examples/angular/src/app/app.component.spec.ts
Normal file
@@ -0,0 +1,31 @@
|
||||
import { TestBed, async } from '@angular/core/testing';
|
||||
import { AppComponent } from './app.component';
|
||||
|
||||
describe('AppComponent', () => {
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [AppComponent],
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
it('should create the app', () => {
|
||||
const fixture = TestBed.createComponent(AppComponent);
|
||||
const app = fixture.debugElement.componentInstance;
|
||||
expect(app).toBeTruthy();
|
||||
});
|
||||
|
||||
it(`should have as title 'angular'`, () => {
|
||||
const fixture = TestBed.createComponent(AppComponent);
|
||||
const app = fixture.debugElement.componentInstance;
|
||||
expect(app.title).toEqual('angular');
|
||||
});
|
||||
|
||||
it('should render title in a h1 tag', () => {
|
||||
const fixture = TestBed.createComponent(AppComponent);
|
||||
fixture.detectChanges();
|
||||
const compiled = fixture.debugElement.nativeElement;
|
||||
expect(compiled.querySelector('h1').textContent).toContain(
|
||||
'Welcome to angular!'
|
||||
);
|
||||
});
|
||||
});
|
||||
10
examples/angular/src/app/app.component.ts
Normal file
10
examples/angular/src/app/app.component.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import { Component } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-root',
|
||||
templateUrl: './app.component.html',
|
||||
styleUrls: ['./app.component.css'],
|
||||
})
|
||||
export class AppComponent {
|
||||
title = 'angular';
|
||||
}
|
||||
12
examples/angular/src/app/app.module.ts
Normal file
12
examples/angular/src/app/app.module.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
import { NgModule } from '@angular/core';
|
||||
|
||||
import { AppComponent } from './app.component';
|
||||
|
||||
@NgModule({
|
||||
declarations: [AppComponent],
|
||||
imports: [BrowserModule],
|
||||
providers: [],
|
||||
bootstrap: [AppComponent],
|
||||
})
|
||||
export class AppModule {}
|
||||
0
examples/angular/src/assets/.gitkeep
Normal file
0
examples/angular/src/assets/.gitkeep
Normal file
3
examples/angular/src/environments/environment.prod.ts
Normal file
3
examples/angular/src/environments/environment.prod.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
export const environment = {
|
||||
production: true,
|
||||
};
|
||||
16
examples/angular/src/environments/environment.ts
Normal file
16
examples/angular/src/environments/environment.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
// This file can be replaced during build by using the `fileReplacements` array.
|
||||
// `ng build --prod` replaces `environment.ts` with `environment.prod.ts`.
|
||||
// The list of file replacements can be found in `angular.json`.
|
||||
|
||||
export const environment = {
|
||||
production: false,
|
||||
};
|
||||
|
||||
/*
|
||||
* For easier debugging in development mode, you can import the following file
|
||||
* to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`.
|
||||
*
|
||||
* This import should be commented out in production mode because it will have a negative impact
|
||||
* on performance if an error is thrown.
|
||||
*/
|
||||
// import 'zone.js/dist/zone-error'; // Included with Angular CLI.
|
||||
BIN
examples/angular/src/favicon.ico
Normal file
BIN
examples/angular/src/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.3 KiB |
14
examples/angular/src/index.html
Normal file
14
examples/angular/src/index.html
Normal file
@@ -0,0 +1,14 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Angular</title>
|
||||
<base href="/">
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="icon" type="image/x-icon" href="favicon.ico">
|
||||
</head>
|
||||
<body>
|
||||
<app-root></app-root>
|
||||
</body>
|
||||
</html>
|
||||
13
examples/angular/src/main.ts
Normal file
13
examples/angular/src/main.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import { enableProdMode } from '@angular/core';
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
|
||||
import { AppModule } from './app/app.module';
|
||||
import { environment } from './environments/environment';
|
||||
|
||||
if (environment.production) {
|
||||
enableProdMode();
|
||||
}
|
||||
|
||||
platformBrowserDynamic()
|
||||
.bootstrapModule(AppModule)
|
||||
.catch(err => console.error(err));
|
||||
62
examples/angular/src/polyfills.ts
Normal file
62
examples/angular/src/polyfills.ts
Normal file
@@ -0,0 +1,62 @@
|
||||
/**
|
||||
* This file includes polyfills needed by Angular and is loaded before the app.
|
||||
* You can add your own extra polyfills to this file.
|
||||
*
|
||||
* This file is divided into 2 sections:
|
||||
* 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.
|
||||
* 2. Application imports. Files imported after ZoneJS that should be loaded before your main
|
||||
* file.
|
||||
*
|
||||
* The current setup is for so-called "evergreen" browsers; the last versions of browsers that
|
||||
* automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),
|
||||
* Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.
|
||||
*
|
||||
* Learn more in https://angular.io/guide/browser-support
|
||||
*/
|
||||
|
||||
/***************************************************************************************************
|
||||
* BROWSER POLYFILLS
|
||||
*/
|
||||
|
||||
/** IE10 and IE11 requires the following for NgClass support on SVG elements */
|
||||
// import 'classlist.js'; // Run `npm install --save classlist.js`.
|
||||
|
||||
/**
|
||||
* Web Animations `@angular/platform-browser/animations`
|
||||
* Only required if AnimationBuilder is used within the application and using IE/Edge or Safari.
|
||||
* Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0).
|
||||
*/
|
||||
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.
|
||||
|
||||
/**
|
||||
* By default, zone.js will patch all possible macroTask and DomEvents
|
||||
* user can disable parts of macroTask/DomEvents patch by setting following flags
|
||||
* because those flags need to be set before `zone.js` being loaded, and webpack
|
||||
* will put import in the top of bundle, so user need to create a separate file
|
||||
* in this directory (for example: zone-flags.ts), and put the following flags
|
||||
* into that file, and then add the following code before importing zone.js.
|
||||
* import './zone-flags.ts';
|
||||
*
|
||||
* The flags allowed in zone-flags.ts are listed here.
|
||||
*
|
||||
* The following flags will work for all browsers.
|
||||
*
|
||||
* (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
|
||||
* (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
|
||||
* (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames
|
||||
*
|
||||
* in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
|
||||
* with the following flag, it will bypass `zone.js` patch for IE/Edge
|
||||
*
|
||||
* (window as any).__Zone_enable_cross_context_check = true;
|
||||
*
|
||||
*/
|
||||
|
||||
/***************************************************************************************************
|
||||
* Zone JS is required by default for Angular itself.
|
||||
*/
|
||||
import 'zone.js/dist/zone'; // Included with Angular CLI.
|
||||
|
||||
/***************************************************************************************************
|
||||
* APPLICATION IMPORTS
|
||||
*/
|
||||
1
examples/angular/src/styles.css
Normal file
1
examples/angular/src/styles.css
Normal file
@@ -0,0 +1 @@
|
||||
/* You can add global styles to this file, and also import other style files */
|
||||
20
examples/angular/src/test.ts
Normal file
20
examples/angular/src/test.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
|
||||
|
||||
import 'zone.js/dist/zone-testing';
|
||||
import { getTestBed } from '@angular/core/testing';
|
||||
import {
|
||||
BrowserDynamicTestingModule,
|
||||
platformBrowserDynamicTesting,
|
||||
} from '@angular/platform-browser-dynamic/testing';
|
||||
|
||||
declare const require: any;
|
||||
|
||||
// First, initialize the Angular testing environment.
|
||||
getTestBed().initTestEnvironment(
|
||||
BrowserDynamicTestingModule,
|
||||
platformBrowserDynamicTesting()
|
||||
);
|
||||
// Then we find all the tests.
|
||||
const context = require.context('./', true, /\.spec\.ts$/);
|
||||
// And load the modules.
|
||||
context.keys().map(context);
|
||||
9
examples/angular/tsconfig.app.json
Normal file
9
examples/angular/tsconfig.app.json
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "./out-tsc/app",
|
||||
"types": []
|
||||
},
|
||||
"include": ["src/**/*.ts"],
|
||||
"exclude": ["src/test.ts", "src/**/*.spec.ts"]
|
||||
}
|
||||
21
examples/angular/tsconfig.json
Normal file
21
examples/angular/tsconfig.json
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"compileOnSave": false,
|
||||
"compilerOptions": {
|
||||
"baseUrl": "./",
|
||||
"outDir": "./dist/out-tsc",
|
||||
"sourceMap": true,
|
||||
"declaration": false,
|
||||
"downlevelIteration": true,
|
||||
"experimentalDecorators": true,
|
||||
"module": "esnext",
|
||||
"moduleResolution": "node",
|
||||
"importHelpers": true,
|
||||
"target": "es2015",
|
||||
"typeRoots": ["node_modules/@types"],
|
||||
"lib": ["es2018", "dom"]
|
||||
},
|
||||
"angularCompilerOptions": {
|
||||
"fullTemplateTypeCheck": true,
|
||||
"strictInjectionParameters": true
|
||||
}
|
||||
}
|
||||
9
examples/angular/tsconfig.spec.json
Normal file
9
examples/angular/tsconfig.spec.json
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "./out-tsc/spec",
|
||||
"types": ["jasmine", "node"]
|
||||
},
|
||||
"files": ["src/test.ts", "src/polyfills.ts"],
|
||||
"include": ["src/**/*.spec.ts", "src/**/*.d.ts"]
|
||||
}
|
||||
58
examples/angular/tslint.json
Normal file
58
examples/angular/tslint.json
Normal file
@@ -0,0 +1,58 @@
|
||||
{
|
||||
"extends": "tslint:recommended",
|
||||
"rules": {
|
||||
"array-type": false,
|
||||
"arrow-parens": false,
|
||||
"deprecation": {
|
||||
"severity": "warning"
|
||||
},
|
||||
"component-class-suffix": true,
|
||||
"contextual-lifecycle": true,
|
||||
"directive-class-suffix": true,
|
||||
"directive-selector": [true, "attribute", "app", "camelCase"],
|
||||
"component-selector": [true, "element", "app", "kebab-case"],
|
||||
"import-blacklist": [true, "rxjs/Rx"],
|
||||
"interface-name": false,
|
||||
"max-classes-per-file": false,
|
||||
"max-line-length": [true, 140],
|
||||
"member-access": false,
|
||||
"member-ordering": [
|
||||
true,
|
||||
{
|
||||
"order": [
|
||||
"static-field",
|
||||
"instance-field",
|
||||
"static-method",
|
||||
"instance-method"
|
||||
]
|
||||
}
|
||||
],
|
||||
"no-consecutive-blank-lines": false,
|
||||
"no-console": [true, "debug", "info", "time", "timeEnd", "trace"],
|
||||
"no-empty": false,
|
||||
"no-inferrable-types": [true, "ignore-params"],
|
||||
"no-non-null-assertion": true,
|
||||
"no-redundant-jsdoc": true,
|
||||
"no-switch-case-fall-through": true,
|
||||
"no-use-before-declare": true,
|
||||
"no-var-requires": false,
|
||||
"object-literal-key-quotes": [true, "as-needed"],
|
||||
"object-literal-sort-keys": false,
|
||||
"ordered-imports": false,
|
||||
"quotemark": [true, "single"],
|
||||
"trailing-comma": false,
|
||||
"no-conflicting-lifecycle": true,
|
||||
"no-host-metadata-property": true,
|
||||
"no-input-rename": true,
|
||||
"no-inputs-metadata-property": true,
|
||||
"no-output-native": true,
|
||||
"no-output-on-prefix": true,
|
||||
"no-output-rename": true,
|
||||
"no-outputs-metadata-property": true,
|
||||
"template-banana-in-box": true,
|
||||
"template-no-negated-async": true,
|
||||
"use-lifecycle-interface": true,
|
||||
"use-pipe-transform-interface": true
|
||||
},
|
||||
"rulesDirectory": ["codelyzer"]
|
||||
}
|
||||
30
examples/brunch/.gitignore
vendored
Normal file
30
examples/brunch/.gitignore
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
# Numerous always-ignore extensions
|
||||
*.diff
|
||||
*.err
|
||||
*.orig
|
||||
*.log
|
||||
*.rej
|
||||
*.swo
|
||||
*.swp
|
||||
*.vi
|
||||
*~
|
||||
*.sass-cache
|
||||
|
||||
# OS or Editor folders
|
||||
.DS_Store
|
||||
.cache
|
||||
.project
|
||||
.settings
|
||||
.tmproj
|
||||
nbproject
|
||||
Thumbs.db
|
||||
|
||||
# NPM packages folder.
|
||||
node_modules/
|
||||
|
||||
# Brunch output folder.
|
||||
public/
|
||||
|
||||
# Environment Variables
|
||||
.env
|
||||
.env.build
|
||||
2
examples/brunch/.nowignore
Normal file
2
examples/brunch/.nowignore
Normal file
@@ -0,0 +1,2 @@
|
||||
README.md
|
||||
yarn.lock
|
||||
27
examples/brunch/README.md
Normal file
27
examples/brunch/README.md
Normal file
@@ -0,0 +1,27 @@
|
||||
# Brunch Example
|
||||
|
||||
This directory is a brief example of a [Brunch](https://brunch.io/) site that can be deployed with ZEIT Now and zero configuration.
|
||||
|
||||
## Deploy Your Own
|
||||
|
||||
Deploy your own Brunch project with ZEIT Now.
|
||||
|
||||
[](https://zeit.co/import/project?template=https://github.com/zeit/now/tree/master/examples/brunch)
|
||||
|
||||
_Live Example: https://brunch.now-examples.now.sh_
|
||||
|
||||
### How We Created This Example
|
||||
|
||||
To get started deploying Brunch with ZEIT Now, you can use the [Brunch CLI](https://brunch.io/docs/commands) to initialize the project:
|
||||
|
||||
```shell
|
||||
$ brunch new project-name -s es6
|
||||
```
|
||||
|
||||
### Deploying From Your Terminal
|
||||
|
||||
You can deploy your new Brunch project with a single command from your terminal using [Now CLI](https://zeit.co/download):
|
||||
|
||||
```shell
|
||||
$ now
|
||||
```
|
||||
115
examples/brunch/app/assets/brunch-napkin.svg
Normal file
115
examples/brunch/app/assets/brunch-napkin.svg
Normal file
@@ -0,0 +1,115 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 17.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
width="256px" height="256px" viewBox="0 0 256 256" enable-background="new 0 0 256 256" xml:space="preserve">
|
||||
<rect x="65" y="68" fill="#7C7C7C" width="127" height="124"/>
|
||||
<rect x="83.392" y="22.163" transform="matrix(-0.7071 0.7071 -0.7071 -0.7071 266.9294 23.9747)" fill="#86AD8A" width="90.215" height="90.215"/>
|
||||
<path fill="#FFFFFF" d="M117.601,167.637c3.788-11.191,5.795-45.647,4.728-62.795c-0.128-2.057-0.333-4.445-0.692-6.351
|
||||
c-0.112-0.607-0.244-1.168-0.391-1.651c0-6.672,0-62.892,0-67.02c0-5.717,5.242-8.419,10.166,4.128
|
||||
c4.925,12.547,3.495,57.175,3.495,60.348c0,0.673-0.611,1.469-1.57,2.25c-0.383,0.247-0.73,0.499-1.051,0.754
|
||||
c-2.949,2.366-3.379,5.095-3.533,7.542c-1.067,17.148-1.554,51.604,2.234,62.795c4.438,13.112-4.004,14.759-6.691,14.759
|
||||
C121.605,182.395,113.163,180.748,117.601,167.637z"/>
|
||||
<path fill="#FFFFFF" d="M103.019,47.413c-0.472,0.049-1.062,9.387-1.257,16.131c-0.238,8.194-0.607,15.482-2.908,15.482
|
||||
c-1.728,0-2.8-2.853-2.517-10.094c0.407-10.427,0.395-21.519-0.219-21.519c-0.774,0-4.358,22.999-4.358,31.09
|
||||
c0,5.803,2.487,11.269,5.603,14.115c0.01,0.008,0.019,0.019,0.033,0.027c0.093,0.081,0.191,0.166,0.278,0.247
|
||||
c0.005,0.004,0.01,0.004,0.01,0.008c2.252,2.053,2.819,4.283,2.971,6.32c1.286,17.143-1.128,59.614-5.678,70.804
|
||||
c-5.33,13.108,4.811,14.759,8.042,14.759c3.227,0,13.368-1.651,8.037-14.759c-4.55-11.191-6.96-53.661-5.678-70.804
|
||||
c0.153-2.037,0.719-4.267,2.971-6.32c0-0.004,0.005-0.004,0.01-0.008c0.088-0.081,0.185-0.166,0.278-0.247
|
||||
c0.014-0.008,0.023-0.019,0.033-0.027c3.116-2.845,5.764-8.314,5.604-14.115c-0.635-23.017-3.263-31.09-4.037-31.09
|
||||
c-0.614,0-0.613,12.286-0.438,21.024c0.143,7.158-0.471,10.383-2.49,10.383c-1.923,0-2.504-6.972-2.748-15.368
|
||||
c-0.196-6.762-0.804-16.039-1.54-16.039"/>
|
||||
<path fill="#FFFFFF" d="M154.075,179.591c-2.546,0-10.532-1.562-6.332-13.967c3.585-10.59,5.483-50.779,4.474-67.007
|
||||
c-0.051-0.826-0.256-1.664-0.413-2.55c-0.443-2.504-3.543-4.555-5.338-6.356c-3.486-3.498-5.725-9.38-5.725-16.013
|
||||
c0-10.77,5.97-24.4,13.334-24.4c7.364,0,13.334,13.63,13.334,24.4c0,6.633-2.24,12.515-5.725,16.013
|
||||
c-1.795,1.801-4.895,3.852-5.338,6.356c-0.157,0.886-0.361,1.724-0.413,2.55c-1.01,16.227,0.889,56.416,4.474,67.007
|
||||
C164.607,178.03,156.621,179.591,154.075,179.591z"/>
|
||||
<polyline fill="#CECCAE" points="65,68 65,192 192,192 "/>
|
||||
<polygon fill="#3F894A" points="65,191.835 65,253 192,253 192,191.835 192,66.938 "/>
|
||||
<g>
|
||||
<g>
|
||||
|
||||
<line fill="none" stroke="#FFFFFF" stroke-width="0.5" stroke-miterlimit="10" x1="191.658" y1="82.55" x2="190.946" y2="83.253"/>
|
||||
|
||||
<line fill="none" stroke="#FFFFFF" stroke-width="0.5" stroke-miterlimit="10" stroke-dasharray="2.02,2.02" x1="189.509" y1="84.672" x2="66.629" y2="206.035"/>
|
||||
|
||||
<line fill="none" stroke="#FFFFFF" stroke-width="0.5" stroke-miterlimit="10" x1="65.91" y1="206.745" x2="65.199" y2="207.448"/>
|
||||
</g>
|
||||
</g>
|
||||
<g>
|
||||
<path fill="#FFFFFF" d="M85.353,211.117h6.328c0.827,0,1.665,0.067,2.513,0.201c0.848,0.135,1.608,0.414,2.28,0.838
|
||||
c0.672,0.424,1.22,1.014,1.644,1.768c0.424,0.756,0.636,1.753,0.636,2.994c0,1.116-0.331,2.089-0.993,2.916
|
||||
c-0.662,0.827-1.644,1.376-2.947,1.645v0.062c0.724,0.062,1.385,0.232,1.985,0.512c0.6,0.279,1.117,0.651,1.551,1.117
|
||||
c0.434,0.465,0.77,1.019,1.008,1.659c0.238,0.642,0.357,1.345,0.357,2.109c0,1.262-0.243,2.291-0.729,3.087
|
||||
c-0.486,0.797-1.097,1.422-1.83,1.877c-0.734,0.455-1.531,0.766-2.389,0.931c-0.858,0.166-1.66,0.248-2.404,0.248h-7.011V211.117z
|
||||
M87.4,220.609h4.25c1.055,0,1.913-0.129,2.575-0.388c0.662-0.259,1.179-0.574,1.551-0.946c0.373-0.372,0.621-0.771,0.745-1.194
|
||||
s0.186-0.812,0.186-1.163c0-0.765-0.129-1.401-0.388-1.908c-0.259-0.506-0.605-0.909-1.039-1.21
|
||||
c-0.435-0.299-0.941-0.512-1.52-0.636c-0.579-0.124-1.189-0.186-1.831-0.186H87.4V220.609z M87.4,231.219h4.684
|
||||
c1.199,0,2.166-0.145,2.9-0.435c0.734-0.289,1.298-0.651,1.691-1.085c0.393-0.435,0.656-0.895,0.791-1.381
|
||||
c0.134-0.485,0.202-0.926,0.202-1.318c0-0.807-0.155-1.499-0.465-2.078s-0.713-1.05-1.21-1.412c-0.496-0.361-1.06-0.625-1.69-0.791
|
||||
c-0.631-0.165-1.267-0.248-1.908-0.248H87.4V231.219z"/>
|
||||
<path fill="#FFFFFF" d="M103.73,222.781c0-0.269-0.011-0.595-0.031-0.978c-0.021-0.383-0.036-0.771-0.046-1.163
|
||||
c-0.011-0.393-0.026-0.76-0.047-1.102c-0.021-0.341-0.031-0.604-0.031-0.791h1.861c0.021,0.538,0.036,1.055,0.046,1.551
|
||||
c0.01,0.497,0.036,0.817,0.078,0.962c0.476-0.848,1.086-1.54,1.83-2.078c0.745-0.538,1.654-0.807,2.73-0.807
|
||||
c0.186,0,0.367,0.016,0.543,0.047c0.175,0.03,0.357,0.067,0.543,0.108l-0.217,1.83c-0.248-0.082-0.486-0.124-0.713-0.124
|
||||
c-0.807,0-1.504,0.129-2.094,0.388c-0.589,0.259-1.075,0.615-1.458,1.07s-0.667,0.987-0.853,1.598s-0.279,1.267-0.279,1.97v7.817
|
||||
h-1.861V222.781z"/>
|
||||
<path fill="#FFFFFF" d="M126,229.047c0,0.27,0.01,0.595,0.031,0.978c0.021,0.383,0.036,0.771,0.046,1.163
|
||||
c0.01,0.394,0.026,0.761,0.047,1.102c0.02,0.341,0.031,0.604,0.031,0.791h-1.861c-0.021-0.537-0.036-1.055-0.046-1.551
|
||||
c-0.011-0.497-0.036-0.817-0.078-0.962h-0.093c-0.373,0.786-0.993,1.463-1.861,2.032c-0.869,0.568-1.882,0.853-3.04,0.853
|
||||
c-1.117,0-2.032-0.176-2.746-0.527s-1.272-0.812-1.675-1.38c-0.403-0.569-0.678-1.226-0.822-1.971
|
||||
c-0.145-0.744-0.217-1.509-0.217-2.295v-8.531h1.861v8.438c0,0.58,0.051,1.144,0.155,1.691s0.284,1.039,0.543,1.474
|
||||
c0.258,0.434,0.621,0.78,1.086,1.039s1.07,0.388,1.815,0.388c0.682,0,1.329-0.119,1.938-0.356c0.61-0.238,1.137-0.6,1.582-1.086
|
||||
s0.796-1.097,1.055-1.83c0.258-0.734,0.388-1.598,0.388-2.591v-7.166H126V229.047z"/>
|
||||
<path fill="#FFFFFF" d="M130.584,222.781c0-0.269-0.01-0.595-0.029-0.978c-0.021-0.383-0.037-0.771-0.047-1.163
|
||||
c-0.012-0.393-0.027-0.76-0.047-1.102c-0.021-0.341-0.031-0.604-0.031-0.791h1.861c0.02,0.538,0.035,1.055,0.047,1.551
|
||||
c0.01,0.497,0.035,0.817,0.076,0.962h0.094c0.373-0.785,0.992-1.463,1.861-2.032c0.869-0.568,1.883-0.853,3.041-0.853
|
||||
c1.115,0,2.025,0.176,2.729,0.527s1.258,0.812,1.66,1.381c0.404,0.568,0.684,1.225,0.838,1.97c0.154,0.744,0.232,1.51,0.232,2.295
|
||||
v8.531h-1.861v-8.438c0-0.579-0.051-1.143-0.154-1.691c-0.104-0.547-0.285-1.039-0.543-1.473c-0.26-0.435-0.621-0.781-1.086-1.04
|
||||
c-0.465-0.258-1.07-0.388-1.814-0.388c-0.684,0-1.33,0.119-1.939,0.357c-0.609,0.237-1.137,0.6-1.582,1.085
|
||||
c-0.445,0.486-0.797,1.097-1.055,1.831c-0.26,0.734-0.389,1.598-0.389,2.59v7.166h-1.861V222.781z"/>
|
||||
<path fill="#FFFFFF" d="M159.28,230.971c-0.703,0.849-1.5,1.474-2.389,1.877c-0.89,0.403-1.852,0.604-2.885,0.604
|
||||
c-1.097,0-2.11-0.186-3.041-0.559c-0.931-0.372-1.727-0.894-2.389-1.566c-0.662-0.672-1.179-1.468-1.551-2.389
|
||||
c-0.372-0.92-0.559-1.928-0.559-3.024c0-1.096,0.187-2.104,0.559-3.024s0.889-1.717,1.551-2.389s1.458-1.194,2.389-1.566
|
||||
c0.931-0.373,1.944-0.559,3.041-0.559c1.055,0,2.031,0.217,2.931,0.651c0.9,0.435,1.701,1.045,2.404,1.83l-1.489,1.117
|
||||
c-0.537-0.6-1.127-1.07-1.768-1.412c-0.642-0.341-1.334-0.512-2.078-0.512c-0.869,0-1.655,0.155-2.358,0.466
|
||||
c-0.703,0.31-1.303,0.729-1.799,1.256s-0.874,1.148-1.133,1.861c-0.259,0.714-0.388,1.474-0.388,2.28s0.129,1.566,0.388,2.28
|
||||
c0.259,0.713,0.637,1.334,1.133,1.861s1.096,0.946,1.799,1.256c0.703,0.311,1.489,0.466,2.358,0.466
|
||||
c0.785,0,1.504-0.181,2.155-0.543c0.651-0.361,1.215-0.843,1.69-1.442L159.28,230.971z"/>
|
||||
<path fill="#FFFFFF" d="M161.925,209.628h1.861v11.633h0.062c0.372-0.785,0.992-1.463,1.861-2.032
|
||||
c0.868-0.568,1.882-0.853,3.04-0.853c1.116,0,2.026,0.176,2.729,0.527s1.257,0.812,1.66,1.381c0.403,0.568,0.683,1.225,0.837,1.97
|
||||
c0.155,0.744,0.233,1.51,0.233,2.295v8.531h-1.861v-8.438c0-0.579-0.052-1.143-0.155-1.691c-0.104-0.547-0.285-1.039-0.543-1.473
|
||||
c-0.259-0.435-0.62-0.781-1.086-1.04c-0.465-0.258-1.07-0.388-1.814-0.388c-0.683,0-1.329,0.119-1.939,0.357
|
||||
c-0.609,0.237-1.137,0.6-1.582,1.085c-0.444,0.486-0.796,1.097-1.055,1.831s-0.388,1.598-0.388,2.59v7.166h-1.861V209.628z"/>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 8.1 KiB |
17
examples/brunch/app/assets/index.html
Normal file
17
examples/brunch/app/assets/index.html
Normal file
@@ -0,0 +1,17 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width">
|
||||
<title>Brunch</title>
|
||||
<link rel="stylesheet" href="/app.css">
|
||||
<script src="/vendor.js"></script>
|
||||
<script src="/app.js"></script>
|
||||
<script>require('initialize');</script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="brunch">
|
||||
<img src="/brunch-napkin.svg" alt="Brunch">
|
||||
<h4>Bon Appétit.</h4>
|
||||
<h6>A <a href="http://brunch.io" target="_blank">Brunch</a> website deployed on <a href="https://zeit.co" target="_blank">ZEIT Now</a></h6>
|
||||
</div>
|
||||
</body>
|
||||
4
examples/brunch/app/initialize.js
Normal file
4
examples/brunch/app/initialize.js
Normal file
@@ -0,0 +1,4 @@
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
// do your setup here
|
||||
console.log('Initialized app');
|
||||
});
|
||||
21
examples/brunch/app/styles.css
Normal file
21
examples/brunch/app/styles.css
Normal file
@@ -0,0 +1,21 @@
|
||||
html, body {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
display: flex;
|
||||
margin: 0;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.brunch {
|
||||
font-family: -apple-system, Sans-Serif;
|
||||
text-align: center;
|
||||
font-size: 24pt;
|
||||
color: #3f894a;
|
||||
}
|
||||
|
||||
a {
|
||||
color: inherit;
|
||||
}
|
||||
14
examples/brunch/brunch-config.js
Normal file
14
examples/brunch/brunch-config.js
Normal file
@@ -0,0 +1,14 @@
|
||||
// See http://brunch.io for documentation.
|
||||
exports.files = {
|
||||
javascripts: {
|
||||
joinTo: {
|
||||
'vendor.js': /^(?!app)/, // Files that are not in `app` dir.
|
||||
'app.js': /^app/,
|
||||
},
|
||||
},
|
||||
stylesheets: { joinTo: 'app.css' },
|
||||
};
|
||||
|
||||
exports.plugins = {
|
||||
babel: { presets: ['latest'] },
|
||||
};
|
||||
22
examples/brunch/package.json
Normal file
22
examples/brunch/package.json
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"name": "brunch-app",
|
||||
"description": "Brunch.io application",
|
||||
"private": true,
|
||||
"author": "Brunch",
|
||||
"version": "0.0.1",
|
||||
"repository": "",
|
||||
"scripts": {
|
||||
"start": "brunch watch --server",
|
||||
"dev": "brunch watch --server --port $PORT",
|
||||
"build": "brunch build --production"
|
||||
},
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"auto-reload-brunch": "^2",
|
||||
"babel-brunch": "~6.0",
|
||||
"babel-preset-latest": "^6",
|
||||
"brunch": "^2",
|
||||
"clean-css-brunch": "^2",
|
||||
"uglify-js-brunch": "^2"
|
||||
}
|
||||
}
|
||||
28
examples/create-react-app/.gitignore
vendored
Normal file
28
examples/create-react-app/.gitignore
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
||||
|
||||
# dependencies
|
||||
/node_modules
|
||||
/.pnp
|
||||
.pnp.js
|
||||
|
||||
# testing
|
||||
/coverage
|
||||
|
||||
# production
|
||||
/build
|
||||
/dist
|
||||
|
||||
# misc
|
||||
.DS_Store
|
||||
.env.local
|
||||
.env.development.local
|
||||
.env.test.local
|
||||
.env.production.local
|
||||
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
# Environment Variables
|
||||
.env
|
||||
.env.build
|
||||
2
examples/create-react-app/.nowignore
Normal file
2
examples/create-react-app/.nowignore
Normal file
@@ -0,0 +1,2 @@
|
||||
README.md
|
||||
yarn.lock
|
||||
29
examples/create-react-app/README.md
Normal file
29
examples/create-react-app/README.md
Normal file
@@ -0,0 +1,29 @@
|
||||

|
||||
|
||||
# React Example
|
||||
|
||||
This directory is a brief example of a [React](https://reactjs.org/) app with [Serverless Functions](https://zeit.co/docs/v2/serverless-functions/introduction) that can be deployed with ZEIT Now and zero configuration.
|
||||
|
||||
## Deploy Your Own
|
||||
|
||||
Deploy your own React project, along with Serverless Functions, with ZEIT Now.
|
||||
|
||||
[](https://zeit.co/import/project?template=https://github.com/zeit/now/tree/master/examples/create-react-app-functions)
|
||||
|
||||
_Live Example: https://create-react-app.now-examples.now.sh/_
|
||||
|
||||
### How We Created This Example
|
||||
|
||||
To get started with React, along with [Serverless Functions](https://zeit.co/docs/v2/serverless-functions/introduction), with ZEIT Now, you can use the [Create-React-App CLI](https://reactjs.org/docs/create-a-new-react-app.html#create-react-app) to initialize the project:
|
||||
|
||||
```shell
|
||||
$ npx create-react-app my-app
|
||||
```
|
||||
|
||||
### Deploying From Your Terminal
|
||||
|
||||
You can deploy your new React project, along with [Serverless Functions](https://zeit.co/docs/v2/serverless-functions/introduction), with a single command from your terminal using [Now CLI](https://zeit.co/download):
|
||||
|
||||
```shell
|
||||
$ now
|
||||
```
|
||||
12
examples/create-react-app/api/date.go
Normal file
12
examples/create-react-app/api/date.go
Normal file
@@ -0,0 +1,12 @@
|
||||
package handler
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
"time"
|
||||
)
|
||||
|
||||
func Handler(w http.ResponseWriter, r *http.Request) {
|
||||
currentTime := time.Now().Format(time.RFC850)
|
||||
fmt.Fprintf(w, currentTime)
|
||||
}
|
||||
3
examples/create-react-app/api/go.mod
Normal file
3
examples/create-react-app/api/go.mod
Normal file
@@ -0,0 +1,3 @@
|
||||
module example-date
|
||||
|
||||
go 1.12
|
||||
22
examples/create-react-app/package.json
Normal file
22
examples/create-react-app/package.json
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"name": "create-react-app",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"react": "^16.6.1",
|
||||
"react-dom": "^16.6.1",
|
||||
"react-scripts": "2.1.1"
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "BROWSER=none react-scripts start",
|
||||
"build": "react-scripts build",
|
||||
"test": "react-scripts test",
|
||||
"eject": "react-scripts eject"
|
||||
},
|
||||
"browserslist": [
|
||||
">0.2%",
|
||||
"not dead",
|
||||
"not ie <= 11",
|
||||
"not op_mini all"
|
||||
]
|
||||
}
|
||||
BIN
examples/create-react-app/public/favicon.ico
Normal file
BIN
examples/create-react-app/public/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.8 KiB |
43
examples/create-react-app/public/index.html
Normal file
43
examples/create-react-app/public/index.html
Normal file
@@ -0,0 +1,43 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico" />
|
||||
<meta
|
||||
name="viewport"
|
||||
content="width=device-width, initial-scale=1, shrink-to-fit=no"
|
||||
/>
|
||||
<meta name="theme-color" content="#000000" />
|
||||
<!--
|
||||
manifest.json provides metadata used when your web app is added to the
|
||||
homescreen on Android. See https://developers.google.com/web/fundamentals/web-app-manifest/
|
||||
-->
|
||||
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
|
||||
<!--
|
||||
Notice the use of %PUBLIC_URL% in the tags above.
|
||||
It will be replaced with the URL of the `public` folder during the build.
|
||||
Only files inside the `public` folder can be referenced from the HTML.
|
||||
|
||||
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
|
||||
work correctly both with client-side routing and a non-root public URL.
|
||||
Learn how to configure a non-root public URL by running `npm run build`.
|
||||
-->
|
||||
<title>Create React App + Go API</title>
|
||||
</head>
|
||||
<body>
|
||||
<noscript>
|
||||
You need to enable JavaScript to run this app.
|
||||
</noscript>
|
||||
<div id="root"></div>
|
||||
<!--
|
||||
This HTML file is a template.
|
||||
If you open it directly in the browser, you will see an empty page.
|
||||
|
||||
You can add webfonts, meta tags, or analytics to this file.
|
||||
The build step will place the bundled scripts into the <body> tag.
|
||||
|
||||
To begin the development, run `npm start` or `yarn start`.
|
||||
To create a production bundle, use `npm run build` or `yarn build`.
|
||||
-->
|
||||
</body>
|
||||
</html>
|
||||
15
examples/create-react-app/public/manifest.json
Normal file
15
examples/create-react-app/public/manifest.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"short_name": "React App",
|
||||
"name": "Create React App Sample",
|
||||
"icons": [
|
||||
{
|
||||
"src": "favicon.ico",
|
||||
"sizes": "64x64 32x32 24x24 16x16",
|
||||
"type": "image/x-icon"
|
||||
}
|
||||
],
|
||||
"start_url": ".",
|
||||
"display": "standalone",
|
||||
"theme_color": "#000000",
|
||||
"background_color": "#ffffff"
|
||||
}
|
||||
44
examples/create-react-app/src/App.css
Normal file
44
examples/create-react-app/src/App.css
Normal file
@@ -0,0 +1,44 @@
|
||||
main {
|
||||
align-content: center;
|
||||
box-sizing: border-box;
|
||||
display: grid;
|
||||
font-family: 'SF Pro Text', 'SF Pro Icons', 'Helvetica Neue', 'Helvetica',
|
||||
'Arial', sans-serif;
|
||||
hyphens: auto;
|
||||
line-height: 1.65;
|
||||
margin: 0 auto;
|
||||
max-width: 680px;
|
||||
min-height: 100vh;
|
||||
padding: 72px 0;
|
||||
text-align: center;
|
||||
}
|
||||
h1 {
|
||||
font-size: 45px;
|
||||
}
|
||||
h2 {
|
||||
margin-top: 1.5em;
|
||||
}
|
||||
p {
|
||||
font-size: 16px;
|
||||
}
|
||||
a {
|
||||
border-bottom: 1px solid white;
|
||||
color: #0076ff;
|
||||
cursor: pointer;
|
||||
text-decoration: none;
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
a:hover {
|
||||
border-bottom: 1px solid #0076ff;
|
||||
}
|
||||
code,
|
||||
pre {
|
||||
color: #d400ff;
|
||||
font-family: Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono,
|
||||
Bitstream Vera Sans Mono, Courier New, monospace, serif;
|
||||
font-size: 0.92em;
|
||||
}
|
||||
code:before,
|
||||
code:after {
|
||||
content: '\`';
|
||||
}
|
||||
57
examples/create-react-app/src/App.js
Normal file
57
examples/create-react-app/src/App.js
Normal file
@@ -0,0 +1,57 @@
|
||||
import React from 'react';
|
||||
import { useEffect, useState } from 'react';
|
||||
import './App.css';
|
||||
|
||||
function App() {
|
||||
const [date, setDate] = useState(null);
|
||||
useEffect(() => {
|
||||
async function getDate() {
|
||||
const res = await fetch('/api/date');
|
||||
const newDate = await res.text();
|
||||
setDate(newDate);
|
||||
}
|
||||
getDate();
|
||||
}, []);
|
||||
return (
|
||||
<main>
|
||||
<h1>Create React App + Go API</h1>
|
||||
<h2>
|
||||
Deployed with{' '}
|
||||
<a
|
||||
href="https://zeit.co/docs"
|
||||
target="_blank"
|
||||
rel="noreferrer noopener"
|
||||
>
|
||||
ZEIT Now
|
||||
</a>
|
||||
!
|
||||
</h2>
|
||||
<p>
|
||||
<a
|
||||
href="https://github.com/zeit/now/tree/master/examples/create-react-app"
|
||||
target="_blank"
|
||||
rel="noreferrer noopener"
|
||||
>
|
||||
This project
|
||||
</a>{' '}
|
||||
was bootstrapped with{' '}
|
||||
<a href="https://facebook.github.io/create-react-app/">
|
||||
Create React App
|
||||
</a>{' '}
|
||||
and contains three directories, <code>/public</code> for static assets,{' '}
|
||||
<code>/src</code> for components and content, and <code>/api</code>{' '}
|
||||
which contains a serverless <a href="https://golang.org/">Go</a>{' '}
|
||||
function. See{' '}
|
||||
<a href="/api/date">
|
||||
<code>api/date</code> for the Date API with Go
|
||||
</a>
|
||||
.
|
||||
</p>
|
||||
<br />
|
||||
<h2>The date according to Go is:</h2>
|
||||
<p>{date ? date : 'Loading date...'}</p>
|
||||
</main>
|
||||
);
|
||||
}
|
||||
|
||||
export default App;
|
||||
9
examples/create-react-app/src/App.test.js
Normal file
9
examples/create-react-app/src/App.test.js
Normal file
@@ -0,0 +1,9 @@
|
||||
import React from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
import App from './App';
|
||||
|
||||
it('renders without crashing', () => {
|
||||
const div = document.createElement('div');
|
||||
ReactDOM.render(<App />, div);
|
||||
ReactDOM.unmountComponentAtNode(div);
|
||||
});
|
||||
14
examples/create-react-app/src/index.css
Normal file
14
examples/create-react-app/src/index.css
Normal file
@@ -0,0 +1,14 @@
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen",
|
||||
"Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue",
|
||||
sans-serif;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
code {
|
||||
font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New",
|
||||
monospace;
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user