Compare commits
1151 Commits
v1.0.190
...
api_pagina
Author | SHA1 | Date | |
---|---|---|---|
|
f7bfd5dbe7 | ||
|
9a4b8685d2 | ||
|
f3376c779e | ||
|
76739eeff0 | ||
|
6d2bad01e6 | ||
|
3847831d80 | ||
|
44462f4d71 | ||
|
4d20589773 | ||
|
52140ec1a9 | ||
|
08c2a7ad64 | ||
|
d19796f14c | ||
|
e4f53a48d2 | ||
|
154163bd6c | ||
|
4502414934 | ||
|
86c471afcd | ||
|
279998db2b | ||
|
e2698aaead | ||
|
8cfe4b0f82 | ||
|
fd90a490c0 | ||
|
16c5ffadc7 | ||
|
4a184721e4 | ||
|
1e3bd937ed | ||
|
0f6932f1e8 | ||
|
cab98776db | ||
|
fbc1e3ed3b | ||
|
805d16abda | ||
|
f133229287 | ||
|
8f4031572a | ||
|
d25fa796c0 | ||
|
089d6a5c9e | ||
|
3f83355d9f | ||
|
40380e3066 | ||
|
a6748bafb3 | ||
|
b52f6eb77c | ||
|
98c933fdb7 | ||
|
ece7ffadd6 | ||
|
591bceb8ef | ||
|
04cfd07176 | ||
|
db2282a351 | ||
|
0ec3d6ca9d | ||
|
18608f4c3a | ||
|
5059089479 | ||
|
442b7ce0d3 | ||
|
6284c386fb | ||
|
3a63df6515 | ||
|
c08d225ae1 | ||
|
594720530e | ||
|
e7d6675f47 | ||
|
0d93f0c3c0 | ||
|
37b308d440 | ||
|
1f8f3f24ed | ||
|
3713c5ab2c | ||
|
6a068a90b2 | ||
|
9a6f6c8b39 | ||
|
52d5c32950 | ||
|
3a94d2c49b | ||
|
de47cff86d | ||
|
a459174f98 | ||
|
75d5aa3a77 | ||
|
c254ca524f | ||
|
51934b8d8d | ||
|
a5dd686bb2 | ||
|
4cbfd04522 | ||
|
6d5d9323bd | ||
|
76063a6284 | ||
|
4119924e57 | ||
|
537336754c | ||
|
06f73919bd | ||
|
3f3e46081c | ||
|
68e4b4eaad | ||
|
9dcb4b51e5 | ||
|
8543849ea1 | ||
|
6ce5240e12 | ||
|
5bc25aefce | ||
|
b737ca7471 | ||
|
a5d7366f94 | ||
|
98f822d89c | ||
|
c33a8250ee | ||
|
adad406696 | ||
|
d82eec0fa4 | ||
|
c93f474547 | ||
|
0afd4a6234 | ||
|
f42786a840 | ||
|
1c1f044966 | ||
|
ad7a80e260 | ||
|
5e040c062c | ||
|
0cede5f90a | ||
|
8dc0deb2a4 | ||
|
1ca44b8f44 | ||
|
4ba9e60194 | ||
|
9d0bb4257f | ||
|
1a273b9bca | ||
|
d9e93cd6c4 | ||
|
5d39860707 | ||
|
60a6f714bc | ||
|
6eebeca259 | ||
|
995034c53f | ||
|
45a0981d05 | ||
|
3d8577a689 | ||
|
5292fc1402 | ||
|
03063f1137 | ||
|
b125a768b8 | ||
|
a721f170e4 | ||
|
76cd69ea16 | ||
|
45d4f277e2 | ||
|
fc2a52aa1a | ||
|
b3e5a1e48d | ||
|
45eb902030 | ||
|
456f7ac00c | ||
|
a93bda71fe | ||
|
0f9d92dd3d | ||
|
5543e9ef64 | ||
|
22dd613660 | ||
|
f7502fe34b | ||
|
8254206f44 | ||
|
3a57cfea02 | ||
|
71bf0437c1 | ||
|
eca4e24362 | ||
|
9a6efb7b37 | ||
|
4b666cbbd2 | ||
|
f8f46db910 | ||
|
f529adac99 | ||
|
3a52b9764b | ||
|
7e78d7716b | ||
|
0488c5c4cb | ||
|
921cc3b6c6 | ||
|
2a7aa28d4c | ||
|
7b3440ac4c | ||
|
958e5a80b7 | ||
|
3179117c62 | ||
|
d895463167 | ||
|
7e0e513051 | ||
|
4309c4f8e2 | ||
|
20b1c90574 | ||
|
7ff6ceb585 | ||
|
3dc3f334ec | ||
|
3476211f8b | ||
|
48e299916f | ||
|
35aebc9f52 | ||
|
cb3e1cf1e9 | ||
|
db509955f6 | ||
|
fb39899f8e | ||
|
f5d4bedc07 | ||
|
e710709c15 | ||
|
d74d6d9539 | ||
|
435e8dfc3b | ||
|
6c68459b34 | ||
|
2e75a63b26 | ||
|
c328996568 | ||
|
c648f19693 | ||
|
2caaf8e8c1 | ||
|
ceb7a7303d | ||
|
c01f533342 | ||
|
ff50361e19 | ||
|
3539a452a3 | ||
|
ea878fb614 | ||
|
5fd0408365 | ||
|
2d099b2bed | ||
|
3c0b9ee522 | ||
|
9dfe084a02 | ||
|
987890ba98 | ||
|
3358c46122 | ||
|
66204401c9 | ||
|
0644e2897d | ||
|
5761451def | ||
|
d819e6ee0c | ||
|
b66be79351 | ||
|
433fa21069 | ||
|
12db3d20ee | ||
|
80a70a6649 | ||
|
02ed297529 | ||
|
30543104be | ||
|
b6a004086c | ||
|
4265b3afb0 | ||
|
ccd7ba28d7 | ||
|
871f8b3a72 | ||
|
f276d2b2d4 | ||
|
2bb5acdfb1 | ||
|
dda0d8ca08 | ||
|
15f22c0507 | ||
|
fa7bd2cfab | ||
|
dc51781976 | ||
|
c874aee774 | ||
|
6c84fdc51d | ||
|
8ff0f7c529 | ||
|
b326ffc41c | ||
|
a0de8582e6 | ||
|
5eb0417b1a | ||
|
c42d9cf069 | ||
|
d965a7b6db | ||
|
c1919c2908 | ||
|
3fd7470104 | ||
|
0bf74142ac | ||
|
b3bf7144ac | ||
|
5738a4f92b | ||
|
784851b217 | ||
|
0e0803e050 | ||
|
3d3abfe259 | ||
|
3f38b518fe | ||
|
e673ee97de | ||
|
7cb55ffdc4 | ||
|
b706217d41 | ||
|
6f680081f4 | ||
|
fe41d37f8f | ||
|
833fb1264f | ||
|
f007735936 | ||
|
73a39d36ea | ||
|
a43ab26a46 | ||
|
f5f117cb72 | ||
|
fc6da04081 | ||
|
12ff654986 | ||
|
e852ad846f | ||
|
28e00fdf2e | ||
|
3bd0656eab | ||
|
e9af71dd76 | ||
|
73b33e8e32 | ||
|
c2c7efee91 | ||
|
c9c44d5643 | ||
|
0836fca822 | ||
|
566df5039c | ||
|
559655bf33 | ||
|
0eab23fbcf | ||
|
f334f4f487 | ||
|
49bfa49489 | ||
|
5f81944a3e | ||
|
00057da17d | ||
|
0a05464013 | ||
|
26f5a606e0 | ||
|
9ebb574059 | ||
|
d29c3c2466 | ||
|
a71f1c19ec | ||
|
485921d879 | ||
|
15de7572c0 | ||
|
09f41dd50e | ||
|
7b8ee467a0 | ||
|
99a496d684 | ||
|
9d6975a9e2 | ||
|
f43ee123d8 | ||
|
f42fb1b871 | ||
|
cf2442c5b2 | ||
|
e0e4735b03 | ||
|
138faa2aae | ||
|
8bd58c9608 | ||
|
215a725ded | ||
|
12c0a05af0 | ||
|
a7fa119041 | ||
|
7fb52b8b0e | ||
|
3e86ae4a82 | ||
|
ca46590ff3 | ||
|
947d81d96d | ||
|
6ca640d2ed | ||
|
6aca233b21 | ||
|
2200be697e | ||
|
25ab3c323b | ||
|
5bf30a9586 | ||
|
b6779a8074 | ||
|
59599d318c | ||
|
538600fd6c | ||
|
63264ba471 | ||
|
95e7f3df7d | ||
|
366fd2a333 | ||
|
5be99a4a16 | ||
|
d86f6a1fbd | ||
|
7d68208cb4 | ||
|
e9de9d9128 | ||
|
1af16d9f0b | ||
|
8e11eababa | ||
|
4ec9faadd5 | ||
|
5cf462c885 | ||
|
f7ef0a2b1e | ||
|
870f55a6c5 | ||
|
7f7e38b434 | ||
|
460a07b1a3 | ||
|
48c9b86d2b | ||
|
7202066c1f | ||
|
5226f0019b | ||
|
26ac745419 | ||
|
b3f2bbee5b | ||
|
56c6cfc785 | ||
|
1db4932573 | ||
|
a2873ebbc5 | ||
|
f652011d59 | ||
|
27c572b2f5 | ||
|
7a4c97618d | ||
|
3ac4fbeee5 | ||
|
9e05fa553c | ||
|
d4f0d2423d | ||
|
abdd7e3256 | ||
|
f3ea476f27 | ||
|
aa22af443c | ||
|
ce3bd2a47d | ||
|
a9b26246e6 | ||
|
cc1e941dd9 | ||
|
9610b7e6bd | ||
|
ad85a12535 | ||
|
b825346829 | ||
|
bd4cbaf93d | ||
|
9af2a19bdf | ||
|
d3fa906a9a | ||
|
22679641ee | ||
|
0ca7457000 | ||
|
c84e49c71c | ||
|
07ab0e986d | ||
|
17957f5da4 | ||
|
a7b5d43e69 | ||
|
38eda3f151 | ||
|
056285deda | ||
|
bdedf69439 | ||
|
c9451d8675 | ||
|
c38834b04c | ||
|
851eee1500 | ||
|
40e24102ce | ||
|
7614a795e9 | ||
|
1273a1dc5f | ||
|
10909fe4fc | ||
|
9b3d3026bf | ||
|
96076c84f4 | ||
|
2c553db45a | ||
|
7d7005596f | ||
|
998dd52adc | ||
|
2a1c6d6475 | ||
|
1ba0644142 | ||
|
88ac57d7f3 | ||
|
314686bede | ||
|
af8845f209 | ||
|
c95d7f9d37 | ||
|
2510c659e6 | ||
|
b7523e1b21 | ||
|
e4e9e801a2 | ||
|
524ec12d8a | ||
|
1108e8c28a | ||
|
0f1156ab9c | ||
|
2a08cc332a | ||
|
5d2baa872e | ||
|
4b377589aa | ||
|
cf78204c85 | ||
|
c513cdd4eb | ||
|
5f410e80e6 | ||
|
2aa7eaa192 | ||
|
b24d060281 | ||
|
a014b9347e | ||
|
582ab4ac13 | ||
|
c9adccad4a | ||
|
f41ba67e15 | ||
|
1f70a76c7e | ||
|
5fe3732a38 | ||
|
445533cfcc | ||
|
a8e29249d6 | ||
|
e4a3cbd2ff | ||
|
96b7ce9d50 | ||
|
2bbc1e7ecd | ||
|
83619b279d | ||
|
8b5a99d494 | ||
|
67d4123608 | ||
|
a424e3c899 | ||
|
08d4b5a714 | ||
|
68aefd5e4c | ||
|
57d750bc9a | ||
|
fbe966903b | ||
|
652748f969 | ||
|
e108fdb1d8 | ||
|
a8296e2e37 | ||
|
0998fc0ad7 | ||
|
d5f3e860b9 | ||
|
4e624f7db5 | ||
|
5b697b7e16 | ||
|
30e0d69a74 | ||
|
652816fd26 | ||
|
3a33e5f416 | ||
|
277dac5512 | ||
|
81d97d9f9d | ||
|
a4873cd40d | ||
|
20cb2daf43 | ||
|
e5b5250a91 | ||
|
db7d617e2b | ||
|
a627884876 | ||
|
ed30d09e07 | ||
|
179e3f9aee | ||
|
a67aedba35 | ||
|
199c411a7d | ||
|
5cd7bb5bdb | ||
|
30b8f5e2aa | ||
|
44f2842820 | ||
|
569355a318 | ||
|
8464e16d5d | ||
|
874c1e3e82 | ||
|
2530ecfc86 | ||
|
6b49f1dfcc | ||
|
b1af25ea18 | ||
|
3086007a9c | ||
|
bdfb6b97f5 | ||
|
c01219e6be | ||
|
743c11c279 | ||
|
11646d1c21 | ||
|
797f4a9669 | ||
|
815775ad8f | ||
|
085109288f | ||
|
c6cf0f3ba5 | ||
|
f9bdce7e24 | ||
|
f8cf4db5db | ||
|
14e6ae373f | ||
|
39bffd2790 | ||
|
f3cb903901 | ||
|
abad1883bc | ||
|
bb8770a967 | ||
|
c903947704 | ||
|
82e96840e9 | ||
|
e190d90832 | ||
|
0ae8d454ad | ||
|
77c7f966cf | ||
|
619fa1d607 | ||
|
157736ff7e | ||
|
0b57d906f8 | ||
|
86bfdb5c79 | ||
|
fc7d34f79c | ||
|
9d962f0328 | ||
|
79e1a33b28 | ||
|
0eedae1f62 | ||
|
e1144c098e | ||
|
5c5cb0f781 | ||
|
656615b571 | ||
|
799a9e810d | ||
|
aa147bbcdc | ||
|
8c7a24282c | ||
|
f99f3f8a6d | ||
|
29fbafdfff | ||
|
3253146dae | ||
|
7e4ac0fd73 | ||
|
60d77cb5ea | ||
|
8299164964 | ||
|
488393e75d | ||
|
c19f8c8035 | ||
|
b0b55718cc | ||
|
5ade9ff2f6 | ||
|
e4cfb518ba | ||
|
89864de1ff | ||
|
ee2a474611 | ||
|
223caca0f5 | ||
|
ee358f70dd | ||
|
0718828d60 | ||
|
d13f54c2ce | ||
|
90f7f99cd1 | ||
|
a273bbaeee | ||
|
619b426689 | ||
|
97c752a39e | ||
|
7565f1cada | ||
|
0c147236a3 | ||
|
88f22fabf7 | ||
|
5f46d60c5e | ||
|
cc8c200826 | ||
|
4485947b0f | ||
|
9f1a877f96 | ||
|
13280ce1b3 | ||
|
7f73931530 | ||
|
bbfed9bca8 | ||
|
bab29cd582 | ||
|
baea44cbd6 | ||
|
ab0538df43 | ||
|
58d4a69053 | ||
|
9147b3061a | ||
|
1b0102f62c | ||
|
471631933b | ||
|
cd761932c1 | ||
|
e63eee89ef | ||
|
4393ebbcc6 | ||
|
ed82390a8d | ||
|
79e708779f | ||
|
98905f6892 | ||
|
44e57c3959 | ||
|
35d48394ce | ||
|
eb42a5f34b | ||
|
729c8c6fac | ||
|
7a1707d864 | ||
|
64d7603eed | ||
|
89e6b680a6 | ||
|
da071a804c | ||
|
7833ca5ae6 | ||
|
44d49b57b9 | ||
|
9db150f8ff | ||
|
e2d3630783 | ||
|
cb1b5cae9f | ||
|
3af5b31c1c | ||
|
b6dafd6da6 | ||
|
d08b922632 | ||
|
9d4e250f6b | ||
|
c19cc1b39a | ||
|
73bd6f9776 | ||
|
6fef55398f | ||
|
d209d5036b | ||
|
4be02bc33c | ||
|
d6daa34e0a | ||
|
9cebbbe7cf | ||
|
71e5304298 | ||
|
8f8d11c9b3 | ||
|
1cd86fd3ea | ||
|
7f1f5a8c3d | ||
|
9dfb0642da | ||
|
0fa8dfa063 | ||
|
1d79dedf6d | ||
|
a274a56e65 | ||
|
44d3a4213f | ||
|
e68eb196b7 | ||
|
4bef79cd71 | ||
|
f3dc3602c8 | ||
|
17e140ba56 | ||
|
89d0575ccd | ||
|
ca0197a319 | ||
|
62bc296abe | ||
|
e58dc809ec | ||
|
abd57ad384 | ||
|
bada9286d0 | ||
|
3807317e66 | ||
|
10ff43f4f0 | ||
|
282f6de1a9 | ||
|
9a55afec01 | ||
|
c8c4bb3245 | ||
|
e1f831af62 | ||
|
657cebfda9 | ||
|
7f1c25793a | ||
|
b770ffda4d | ||
|
d0b3e15999 | ||
|
20433b0282 | ||
|
452b41de0f | ||
|
b69008225f | ||
|
b3a778e983 | ||
|
a57c6e9155 | ||
|
3fbfba2c03 | ||
|
8a5e6875f0 | ||
|
e11e57f1d8 | ||
|
073bd80f89 | ||
|
e3aaee738a | ||
|
f1b2b7b86b | ||
|
e0a87d6253 | ||
|
a7eae2e033 | ||
|
51235f191d | ||
|
003ead2511 | ||
|
8dc8527fdc | ||
|
985dcc2605 | ||
|
4063cdba11 | ||
|
c96c591fa9 | ||
|
4913fdb800 | ||
|
24bc7f153a | ||
|
8732c97dcd | ||
|
e092eaef6f | ||
|
4ade1bf65f | ||
|
77a03599de | ||
|
9c057071b5 | ||
|
ee3f4beeaf | ||
|
7035b1f9f6 | ||
|
3aea55ee63 | ||
|
28acb4eca6 | ||
|
c63c6370b5 | ||
|
6046f40e45 | ||
|
262159cf73 | ||
|
8eb94bc8ab | ||
|
a9390affaa | ||
|
66392b4e8a | ||
|
3283f34c79 | ||
|
fd4e5d7d30 | ||
|
5bbf9d87c2 | ||
|
acf1ff6d1d | ||
|
05acc51054 | ||
|
eb8841379c | ||
|
d601575549 | ||
|
0d2f253218 | ||
|
349d020da2 | ||
|
87ccb86f54 | ||
|
20482b2f14 | ||
|
47a05fb4ba | ||
|
ac0a89625a | ||
|
a07638239b | ||
|
5143870d3b | ||
|
f61c4c1374 | ||
|
254735fcae | ||
|
44024371ff | ||
|
be232fa34b | ||
|
1a90165255 | ||
|
13417d15b7 | ||
|
9fe1f6acfc | ||
|
1899d86641 | ||
|
6ca63ca56b | ||
|
e796968ec0 | ||
|
7b64c8dbe3 | ||
|
2377f7bc07 | ||
|
47fdcef182 | ||
|
d27b658392 | ||
|
07720ed6f8 | ||
|
a9cdecf599 | ||
|
c6b5a5c328 | ||
|
e7f3aa3764 | ||
|
89ca8e08d6 | ||
|
6350506ce7 | ||
|
d5ed611920 | ||
|
acc10ccac4 | ||
|
45160a2e73 | ||
|
e38794171a | ||
|
c2d6da83c0 | ||
|
fd568b5300 | ||
|
77005fc495 | ||
|
0273e58783 | ||
|
3e88a24753 | ||
|
1205908233 | ||
|
3a7a068196 | ||
|
845ecfe742 | ||
|
53355aaad3 | ||
|
7cd0e25538 | ||
|
2f15178ff6 | ||
|
a4b13be0d1 | ||
|
23ae4fb790 | ||
|
cff036d08b | ||
|
7826cc0b03 | ||
|
2bfa28a311 | ||
|
780c5c80ae | ||
|
fcd00b3212 | ||
|
6a41d6e85a | ||
|
3733858145 | ||
|
95d8ee65a5 | ||
|
8e57697b71 | ||
|
c9c371b297 | ||
|
d4f794920e | ||
|
13b5ef36d7 | ||
|
83e0bac52a | ||
|
9943ae0fa5 | ||
|
4c95872826 | ||
|
4aef72572d | ||
|
126918be54 | ||
|
1dc4516efc | ||
|
9a9cfbd130 | ||
|
341c9ba64b | ||
|
f432734338 | ||
|
b7f5f848f2 | ||
|
d80cf6bf37 | ||
|
31bce2e644 | ||
|
faabd17fc6 | ||
|
4c4ed60cfb | ||
|
be1895a080 | ||
|
b81b6135f6 | ||
|
583ac7960b | ||
|
b749bb60fc | ||
|
2c6a298758 | ||
|
42544cc63b | ||
|
d2b81d221b | ||
|
618d8723d1 | ||
|
8058d3f728 | ||
|
0bc10acf02 | ||
|
e5866e8aa6 | ||
|
b4e907ae77 | ||
|
ff23248017 | ||
|
ac0d01b724 | ||
|
40adbc5e9e | ||
|
f36e0c2513 | ||
|
5be8c2cdcf | ||
|
e915549f6d | ||
|
30b3f3190b | ||
|
3f7390d104 | ||
|
005bfe799c | ||
|
c9f1715899 | ||
|
faf5eac806 | ||
|
9c5ab41b05 | ||
|
a8c8539e7a | ||
|
a3153f1c9f | ||
|
f23ab37a11 | ||
|
334da21a3b | ||
|
4a7c1f54d2 | ||
|
643b06ffa7 | ||
|
0f4a781df0 | ||
|
d6cc84aabd | ||
|
33ad0dce15 | ||
|
949c92f6d6 | ||
|
48098b5c06 | ||
|
afcfb0e341 | ||
|
a1364a621a | ||
|
4113252f18 | ||
|
386d11f51a | ||
|
39a506ad52 | ||
|
d9c266e3f1 | ||
|
f4092c0824 | ||
|
4fd20b1c5a | ||
|
0d5586b379 | ||
|
da77de0a08 | ||
|
dd34b155b4 | ||
|
26ce102113 | ||
|
5082181c49 | ||
|
0ee370303c | ||
|
720494d870 | ||
|
cfe1911723 | ||
|
b2318b1f9f | ||
|
560db37025 | ||
|
dd557f66a5 | ||
|
0603f179cc | ||
|
21fcaf621d | ||
|
794c8dd051 | ||
|
f020b571da | ||
|
071ea5854f | ||
|
bfec890632 | ||
|
3bb9d2efd6 | ||
|
e117b6f732 | ||
|
710026c8ac | ||
|
79c45af0d5 | ||
|
a75db94da5 | ||
|
468261906a | ||
|
3f1c9c989b | ||
|
3b40de1962 | ||
|
2dda1c82c5 | ||
|
4bc4d41728 | ||
|
c8c160d912 | ||
|
99354f7dbe | ||
|
279310f9a5 | ||
|
d0de79bffa | ||
|
fbd42726c0 | ||
|
dfe02fbe96 | ||
|
a8cffb9ac8 | ||
|
bdbf2fe583 | ||
|
36776cd615 | ||
|
1852d9291d | ||
|
0e5a0fdbe5 | ||
|
7e59c40091 | ||
|
53eba3f062 | ||
|
334347abcf | ||
|
e43e3c198a | ||
|
a8b8da4732 | ||
|
ea57f5655c | ||
|
68496bd1a1 | ||
|
097d4d5735 | ||
|
89224c8f88 | ||
|
22c0a219aa | ||
|
9eed42cea0 | ||
|
be24cbed2d | ||
|
aef3e0aead | ||
|
7a06a41502 | ||
|
03948d185d | ||
|
40d39d6268 | ||
|
66f1506429 | ||
|
f19f148297 | ||
|
79c6eb5503 | ||
|
1204bed80a | ||
|
dc91b1f7d6 | ||
|
66dc2b33de | ||
|
c97c337c79 | ||
|
0f7deeeac1 | ||
|
8c338675d2 | ||
|
b126c761cd | ||
|
d02513bb70 | ||
|
68e8d69d04 | ||
|
4eb680d675 | ||
|
068dbfffd8 | ||
|
d9ec2efa4b | ||
|
1c90e9dd7d | ||
|
811942d45e | ||
|
dbde239a25 | ||
|
ab3ba3e2ca | ||
|
79e77b5a10 | ||
|
c3395133c9 | ||
|
b1d073cdeb | ||
|
2c115cd074 | ||
|
c99bd27e4d | ||
|
25d723b373 | ||
|
0cfceab151 | ||
|
65a0e056c7 | ||
|
b27a215c7f | ||
|
e9783d050b | ||
|
e1be1ead86 | ||
|
b129bed69f | ||
|
265ad50ce4 | ||
|
3e2570601f | ||
|
05513e67d2 | ||
|
34e4164e2f | ||
|
e4123b4ad9 | ||
|
ee6325e3c2 | ||
|
a2fce031a2 | ||
|
2de30f8b82 | ||
|
f1dbc1d41c | ||
|
a96734f5be | ||
|
b83eee751f | ||
|
49451dba20 | ||
|
3830f36c0b | ||
|
9f7eeb0510 | ||
|
58396ea5ce | ||
|
b1bb470b0a | ||
|
0b6f5581f0 | ||
|
c34f762507 | ||
|
9eac63c021 | ||
|
1fec7d5558 | ||
|
5eb084fd3b | ||
|
a99db36578 | ||
|
bec8a2e7d1 | ||
|
38ced8cb09 | ||
|
8eff3f5616 | ||
|
6f8332bad1 | ||
|
01e0c0c21f | ||
|
7a1eecc815 | ||
|
bec91863e2 | ||
|
341b763088 | ||
|
e0721493e9 | ||
|
2d467f7fa5 | ||
|
23ecbfcb3a | ||
|
f8ad782991 | ||
|
c2684a8149 | ||
|
4e7c6b0aea | ||
|
c568f5b33c | ||
|
e85d4fca5d | ||
|
d9601f3136 | ||
|
3ee5deb9f3 | ||
|
8bc92e88df | ||
|
ebe06c9c38 | ||
|
b3f32ffc59 | ||
|
ecc50790ed | ||
|
a09c7b72c7 | ||
|
7d767cf0c9 | ||
|
b5fc8e7fc1 | ||
|
91ec0dce37 | ||
|
1aa2786ba0 | ||
|
3265fafd76 | ||
|
17fd8ee504 | ||
|
05adb06aeb | ||
|
dacf6377ae | ||
|
fa76c5db8d | ||
|
17f6d6e8c1 | ||
|
347d84526b | ||
|
172327613f | ||
|
3e1ee7f330 | ||
|
22b5888671 | ||
|
41edae9719 | ||
|
6446a3c4de | ||
|
9c4939e051 | ||
|
9f9f760ede | ||
|
488cb99d4c | ||
|
4167ecafd2 | ||
|
6ca41ddf80 | ||
|
734f83470c | ||
|
0f8f7aeb14 | ||
|
3b653a95a0 | ||
|
06eb389b21 | ||
|
17d2d6f959 | ||
|
20e065a371 | ||
|
57cf826e2c | ||
|
dbe8d3a68e | ||
|
5a174b2236 | ||
|
b8158f3b53 | ||
|
e768b8cfea | ||
|
c593546575 | ||
|
578f93fb90 | ||
|
24a90036b7 | ||
|
488c0f1828 | ||
|
f4717d0a3d | ||
|
913c78f45d | ||
|
4e90c05472 | ||
|
d31d9f2638 | ||
|
0cf56d5a9a | ||
|
80112e7b35 | ||
|
b2f1fac133 | ||
|
cd57877175 | ||
|
30f515d473 | ||
|
199113341f | ||
|
64aef69d74 | ||
|
2073755498 | ||
|
f72b5c1028 | ||
|
561b24f6fd | ||
|
d41221bd90 | ||
|
132c6543b2 | ||
|
7152344fe1 | ||
|
a04092c99c | ||
|
c273fd4d63 | ||
|
e06dd9c69f | ||
|
463b20013d | ||
|
204fbec648 | ||
|
d65706aa9c | ||
|
f2a1597ecc | ||
|
9a2f0bee29 | ||
|
3f8833eaf1 | ||
|
c3a1e7c6e9 | ||
|
f5aec137bd | ||
|
20960dbd47 | ||
|
e45fd6b4d3 | ||
|
8eacba972e | ||
|
51732a5adb | ||
|
f51873d877 | ||
|
d738fa54ad | ||
|
ec8ccc94aa | ||
|
cb8dca747b | ||
|
b16ebbbf7a | ||
|
90ccb34916 | ||
|
724af8f757 | ||
|
125fa8647a | ||
|
bf47237d8f | ||
|
294b9fc941 | ||
|
699c1ab58c | ||
|
150ee14de6 | ||
|
b207f7a53f | ||
|
096698912e | ||
|
a5ec1be7d1 | ||
|
f9f884a7f3 | ||
|
31d59c1e21 | ||
|
7663044e9f | ||
|
7ceb68d835 | ||
|
ac2635a363 | ||
|
2496e6e738 | ||
|
b4b36c6f22 | ||
|
0171ea837f | ||
|
79a343c2d9 | ||
|
dd5ed48c7e | ||
|
e7169cc70d | ||
|
c65ee4a424 | ||
|
feee162578 | ||
|
d1cab4b7f5 | ||
|
d2acf314f5 | ||
|
b803984773 | ||
|
d2582f4fdf | ||
|
dfd18ebe24 | ||
|
94082bc6a5 | ||
|
5c3c72c37e | ||
|
d730e068b0 | ||
|
b2f8c38842 | ||
|
71b2e36429 | ||
|
e598c64241 | ||
|
2b2ec2c655 | ||
|
381d757525 | ||
|
d54c59cf74 | ||
|
1f481fba4e | ||
|
69cd88e4a5 | ||
|
b140a9d7de | ||
|
b1b530edf2 | ||
|
ab63316f83 | ||
|
35df8e5d9e | ||
|
ea3c82733c | ||
|
60f75fe2db | ||
|
9214095a64 | ||
|
676c43ebab | ||
|
e65af8c1e4 | ||
|
2321455723 | ||
|
9260235224 | ||
|
56801c0a08 | ||
|
aa738cc086 | ||
|
900b0f3eb2 | ||
|
b5a64e2c3e | ||
|
4163d9e474 | ||
|
d769dc2b94 | ||
|
c9fc52ec74 | ||
|
fe72568d3b | ||
|
c5c379f38a | ||
|
2050889590 | ||
|
6164e2d8eb | ||
|
30c175ef29 | ||
|
f6fed72b64 | ||
|
7596ff2eda | ||
|
142976f012 | ||
|
ab5c97f75a | ||
|
aea3de982a | ||
|
83aff6f478 | ||
|
6cb7154bf4 | ||
|
3aa38d35d7 | ||
|
870a76c570 | ||
|
206a64eff6 | ||
|
6b97839617 | ||
|
456d979aa6 | ||
|
ea5e0d337c | ||
|
9651317695 | ||
|
a4cc2076d7 | ||
|
db820d500d | ||
|
722192127c | ||
|
36e23d6432 | ||
|
8cfb014f60 | ||
|
b4a572c8ae | ||
|
531e92e2da | ||
|
53a857b706 | ||
|
4f5473f8a2 | ||
|
1b617a4adc | ||
|
7741a43d42 | ||
|
776411f882 | ||
|
ae4cecc621 | ||
|
5be98a46e3 | ||
|
1907ef0c99 | ||
|
bd99b25848 | ||
|
616401ebba | ||
|
d0fb6acccd | ||
|
12a7b3c73c | ||
|
75b28c46af | ||
|
93dccf62df | ||
|
ec499eecd5 | ||
|
7ccd19e21d | ||
|
a6459d3641 | ||
|
9b26378fdd | ||
|
6b8e84332d | ||
|
6d56bb8afd | ||
|
be9e873277 | ||
|
10feeeeb6b | ||
|
518af9dc0a | ||
|
093fc811eb | ||
|
2a8b27033f | ||
|
62bddd7c69 | ||
|
113f91b3c5 | ||
|
d40ad2de89 | ||
|
3b7733018c | ||
|
e319864669 | ||
|
7251813634 | ||
|
e024015d5e | ||
|
3f5e6d72d6 | ||
|
9fd43a30f9 | ||
|
0707a0e05f | ||
|
f550d847c4 | ||
|
1e9a0036e7 | ||
|
16cf0a3058 | ||
|
0fa19a281c | ||
|
9c53f485e6 | ||
|
dc131f77d4 | ||
|
712601b8c0 | ||
|
ff7775b344 | ||
|
0512fa6208 | ||
|
27ab2b8e30 | ||
|
9fa7c9c20a | ||
|
6bd0250ef8 | ||
|
0d736bcb58 | ||
|
c1129604ba | ||
|
693f6cbfe7 | ||
|
7f397a4da8 | ||
|
52ba5c5bb7 | ||
|
ce24942a03 | ||
|
719afba05a | ||
|
c99dd2ba87 | ||
|
a59cc94afc | ||
|
336cadbc12 | ||
|
a946dc69c1 | ||
|
e2e95df057 | ||
|
e095369e1a | ||
|
1c938a5998 | ||
|
a45128807e | ||
|
d54e52b1a8 | ||
|
5743729d11 | ||
|
11d8466db1 | ||
|
c3360d6c48 | ||
|
37158fdb89 | ||
|
ae73051797 | ||
|
62db3d09ea | ||
|
f82aa0adde | ||
|
5e5b6cdc42 | ||
|
351306eb03 | ||
|
e4fffa52d4 | ||
|
d622ff4a78 | ||
|
b6d4fd16c9 | ||
|
a548d695f2 | ||
|
499f318192 | ||
|
42ecf98344 | ||
|
6f08e1e4ff | ||
|
9524eb7e37 | ||
|
84e478f8fe | ||
|
0cc77f99ac | ||
|
622049dfad | ||
|
65bcc58261 | ||
|
9749a2b9b7 | ||
|
7b365194ba | ||
|
6e5c2730f1 | ||
|
8d045f0c96 | ||
|
c370358bd1 | ||
|
03e8d921d3 | ||
|
6cf624c18d | ||
|
41acdce165 | ||
|
c607444c23 | ||
|
940198b9a0 | ||
|
9c3cf705c6 | ||
|
6027725fae | ||
|
054aa52bc8 | ||
|
f4a562bc3c | ||
|
de8bf33ad9 | ||
|
159eaf7899 | ||
|
1bc045eb18 | ||
|
0f934e48bc | ||
|
3ecd29d0b5 | ||
|
42498842b5 | ||
|
ed4fbf093d | ||
|
96b19027ec | ||
|
cdb8a1e98c | ||
|
8cd26c9380 | ||
|
0863f0d564 | ||
|
63a2f7b7a5 | ||
|
9b562276f3 | ||
|
a17e01793e | ||
|
7fb061ea76 | ||
|
91d864bded | ||
|
339d7d16c7 | ||
|
8e5762c3a3 | ||
|
50a811720f | ||
|
c2e1c4c1e1 | ||
|
e7b11a2d82 | ||
|
61d3582357 | ||
|
9e66219690 | ||
|
d049b8846c | ||
|
bdd760f343 | ||
|
1ee88618e8 | ||
|
e399474b4e | ||
|
e2e55b6e08 | ||
|
d0d2bad7f4 | ||
|
92bee549a1 | ||
|
02121f66de | ||
|
115eb6f511 | ||
|
d208da577f | ||
|
62665899c6 | ||
|
7640839f92 | ||
|
cda837247a | ||
|
8e2ba0d963 | ||
|
f4958de885 | ||
|
3917e3469d | ||
|
5ce79b1761 | ||
|
7a621e0cd7 | ||
|
34a1c965be | ||
|
17b42ae051 | ||
|
55ae00af27 | ||
|
7e200b1ec7 | ||
|
f65a3be231 | ||
|
20bec7e26c | ||
|
b367955e56 | ||
|
84c3ef144d | ||
|
ab2c8e3826 | ||
|
f2c6ff7904 | ||
|
06ee4d08d6 | ||
|
e96679c820 | ||
|
105e4652c6 | ||
|
e5b8f149bf | ||
|
334cb23691 | ||
|
52d9807648 | ||
|
b44a2075a8 | ||
|
b60952d684 | ||
|
5db362e812 | ||
|
0b74168343 | ||
|
58e2d7be61 | ||
|
728c167660 | ||
|
982f274425 | ||
|
557c7a2877 | ||
|
dbba7af4b5 | ||
|
82eefca110 | ||
|
778b30b1cf | ||
|
2d4616da01 | ||
|
37a12326dc | ||
|
5516b3284c | ||
|
ed0fae36ad | ||
|
35d27f03bd | ||
|
1600d27db4 | ||
|
0feca7ee7f | ||
|
6e0bb6cf8b | ||
|
e6d66eba7d | ||
|
bd6e77bf32 | ||
|
9027f3fb10 | ||
|
95eb302a62 | ||
|
0be982c798 | ||
|
67e5451c7c | ||
|
b31721b836 | ||
|
03146ed85f | ||
|
3007918647 | ||
|
c6c4e950db | ||
|
40eba9e95e | ||
|
51ce7c939d | ||
|
972e5aed8a |
339
.eslintignore
@@ -21,44 +21,365 @@ Clipper/content_scripts/Readability.js
|
|||||||
Clipper/dist
|
Clipper/dist
|
||||||
Clipper/icons
|
Clipper/icons
|
||||||
Clipper/popup/build
|
Clipper/popup/build
|
||||||
|
Clipper/popup/config/webpack.config.js
|
||||||
|
Clipper/popup/config/webpack_config_at_eject_time.js
|
||||||
Clipper/popup/node_modules
|
Clipper/popup/node_modules
|
||||||
|
Clipper/popup/scripts/build.js
|
||||||
docs/
|
docs/
|
||||||
ElectronClient/dist
|
ElectronClient/dist
|
||||||
ElectronClient/lib
|
ElectronClient/lib
|
||||||
|
ElectronClient/gui/NoteEditor/NoteBody/TinyMCE/plugins/lists.js
|
||||||
ElectronClient/lib/vendor/sjcl-rn.js
|
ElectronClient/lib/vendor/sjcl-rn.js
|
||||||
ElectronClient/lib/vendor/sjcl.js
|
ElectronClient/lib/vendor/sjcl.js
|
||||||
ElectronClient/locales
|
ElectronClient/locales
|
||||||
ElectronClient/node_modules
|
ElectronClient/node_modules
|
||||||
|
ElectronClient/packageInfo.js
|
||||||
|
ElectronClient/gui/NoteEditor/NoteBody/TinyMCE/supportedLocales.js
|
||||||
highlight.pack.js
|
highlight.pack.js
|
||||||
|
Modules/TinyMCE/JoplinLists/
|
||||||
node_modules/
|
node_modules/
|
||||||
ReactNativeClient/android
|
ReactNativeClient/android
|
||||||
ReactNativeClient/ios
|
ReactNativeClient/ios
|
||||||
|
ReactNativeClient/lib/joplin-renderer/assets/
|
||||||
|
ReactNativeClient/lib/joplin-renderer/vendor/fountain.min.js
|
||||||
|
ReactNativeClient/lib/rnInjectedJs/
|
||||||
ReactNativeClient/lib/vendor/
|
ReactNativeClient/lib/vendor/
|
||||||
ReactNativeClient/lib/welcomeAssets.js
|
ReactNativeClient/lib/welcomeAssets.js
|
||||||
ReactNativeClient/locales
|
ReactNativeClient/locales
|
||||||
ReactNativeClient/node_modules
|
ReactNativeClient/node_modules
|
||||||
|
ReactNativeClient/pluginAssets/
|
||||||
readme/
|
readme/
|
||||||
Tools/node_modules
|
|
||||||
Tools/PortableAppsLauncher
|
|
||||||
Server/.git/
|
Server/.git/
|
||||||
Server/.github/
|
Server/.github/
|
||||||
Server/docs/
|
|
||||||
Server/dist/
|
|
||||||
Server/bin/
|
Server/bin/
|
||||||
|
Server/dist/
|
||||||
|
Server/docs/
|
||||||
Server/node_modules/
|
Server/node_modules/
|
||||||
ElectronClient/packageInfo.js
|
Tools/node_modules
|
||||||
ReactNativeClient/pluginAssets/
|
Tools/PortableAppsLauncher
|
||||||
ReactNativeClient/lib/joplin-renderer/vendor/fountain.min.js
|
Modules/TinyMCE/IconPack/postinstall.js
|
||||||
ReactNativeClient/lib/joplin-renderer/assets/
|
Modules/TinyMCE/langs/
|
||||||
ReactNativeClient/lib/rnInjectedJs/
|
CliClient/build/
|
||||||
|
plugin_types/
|
||||||
|
|
||||||
# AUTO-GENERATED - EXCLUDED TYPESCRIPT BUILD
|
# AUTO-GENERATED - EXCLUDED TYPESCRIPT BUILD
|
||||||
|
CliClient/app/LinkSelector.js
|
||||||
|
CliClient/app/services/plugins/PluginRunner.js
|
||||||
|
CliClient/tests/fsDriver.js
|
||||||
|
CliClient/tests/InMemoryCache.js
|
||||||
|
CliClient/tests/MdToHtml.js
|
||||||
|
CliClient/tests/models_Setting.js
|
||||||
|
CliClient/tests/services_CommandService.js
|
||||||
|
CliClient/tests/services_InteropService.js
|
||||||
|
CliClient/tests/services_keychainService.js
|
||||||
|
CliClient/tests/services_PluginService.js
|
||||||
|
CliClient/tests/services_rest_Api.js
|
||||||
|
CliClient/tests/services/plugins/api/JoplinSetting.js
|
||||||
|
CliClient/tests/services/plugins/sandboxProxy.js
|
||||||
|
CliClient/tests/synchronizer_LockHandler.js
|
||||||
|
CliClient/tests/synchronizer_MigrationHandler.js
|
||||||
|
ElectronClient/app.js
|
||||||
|
ElectronClient/bridge.js
|
||||||
|
ElectronClient/commands/copyDevCommand.js
|
||||||
|
ElectronClient/commands/focusElement.js
|
||||||
|
ElectronClient/commands/openProfileDirectory.js
|
||||||
|
ElectronClient/commands/startExternalEditing.js
|
||||||
|
ElectronClient/commands/stopExternalEditing.js
|
||||||
|
ElectronClient/commands/toggleExternalEditing.js
|
||||||
|
ElectronClient/ElectronAppWrapper.js
|
||||||
|
ElectronClient/global.d.js
|
||||||
|
ElectronClient/gui/Button/Button.js
|
||||||
|
ElectronClient/gui/ConfigScreen/ButtonBar.js
|
||||||
|
ElectronClient/gui/ConfigScreen/ConfigScreen.js
|
||||||
|
ElectronClient/gui/ConfigScreen/SideBar.js
|
||||||
|
ElectronClient/gui/DropboxLoginScreen.js
|
||||||
|
ElectronClient/gui/ErrorBoundary.js
|
||||||
|
ElectronClient/gui/KeymapConfig/KeymapConfigScreen.js
|
||||||
|
ElectronClient/gui/KeymapConfig/ShortcutRecorder.js
|
||||||
|
ElectronClient/gui/KeymapConfig/styles/index.js
|
||||||
|
ElectronClient/gui/KeymapConfig/utils/getLabel.js
|
||||||
|
ElectronClient/gui/KeymapConfig/utils/useCommandStatus.js
|
||||||
|
ElectronClient/gui/KeymapConfig/utils/useKeymap.js
|
||||||
|
ElectronClient/gui/MainScreen/commands/editAlarm.js
|
||||||
|
ElectronClient/gui/MainScreen/commands/exportPdf.js
|
||||||
|
ElectronClient/gui/MainScreen/commands/hideModalMessage.js
|
||||||
|
ElectronClient/gui/MainScreen/commands/moveToFolder.js
|
||||||
|
ElectronClient/gui/MainScreen/commands/newFolder.js
|
||||||
|
ElectronClient/gui/MainScreen/commands/newNote.js
|
||||||
|
ElectronClient/gui/MainScreen/commands/newSubFolder.js
|
||||||
|
ElectronClient/gui/MainScreen/commands/newTodo.js
|
||||||
|
ElectronClient/gui/MainScreen/commands/openFolder.js
|
||||||
|
ElectronClient/gui/MainScreen/commands/openNote.js
|
||||||
|
ElectronClient/gui/MainScreen/commands/openTag.js
|
||||||
|
ElectronClient/gui/MainScreen/commands/print.js
|
||||||
|
ElectronClient/gui/MainScreen/commands/renameFolder.js
|
||||||
|
ElectronClient/gui/MainScreen/commands/renameTag.js
|
||||||
|
ElectronClient/gui/MainScreen/commands/search.js
|
||||||
|
ElectronClient/gui/MainScreen/commands/selectTemplate.js
|
||||||
|
ElectronClient/gui/MainScreen/commands/setTags.js
|
||||||
|
ElectronClient/gui/MainScreen/commands/showModalMessage.js
|
||||||
|
ElectronClient/gui/MainScreen/commands/showNoteContentProperties.js
|
||||||
|
ElectronClient/gui/MainScreen/commands/showNoteProperties.js
|
||||||
|
ElectronClient/gui/MainScreen/commands/showShareNoteDialog.js
|
||||||
|
ElectronClient/gui/MainScreen/commands/toggleEditors.js
|
||||||
|
ElectronClient/gui/MainScreen/commands/toggleNoteList.js
|
||||||
|
ElectronClient/gui/MainScreen/commands/toggleSideBar.js
|
||||||
|
ElectronClient/gui/MainScreen/commands/toggleVisiblePanes.js
|
||||||
|
ElectronClient/gui/MainScreen/MainScreen.js
|
||||||
|
ElectronClient/gui/MenuBar.js
|
||||||
|
ElectronClient/gui/menuCommandNames.js
|
||||||
|
ElectronClient/gui/MultiNoteActions.js
|
||||||
ElectronClient/gui/NoteContentPropertiesDialog.js
|
ElectronClient/gui/NoteContentPropertiesDialog.js
|
||||||
|
ElectronClient/gui/NoteEditor/commands/editorCommandDeclarations.js
|
||||||
|
ElectronClient/gui/NoteEditor/commands/focusElementNoteBody.js
|
||||||
|
ElectronClient/gui/NoteEditor/commands/focusElementNoteTitle.js
|
||||||
|
ElectronClient/gui/NoteEditor/commands/showLocalSearch.js
|
||||||
|
ElectronClient/gui/NoteEditor/commands/showRevisions.js
|
||||||
|
ElectronClient/gui/NoteEditor/NoteBody/CodeMirror/CodeMirror.js
|
||||||
|
ElectronClient/gui/NoteEditor/NoteBody/CodeMirror/Editor.js
|
||||||
|
ElectronClient/gui/NoteEditor/NoteBody/CodeMirror/styles/index.js
|
||||||
|
ElectronClient/gui/NoteEditor/NoteBody/CodeMirror/Toolbar.js
|
||||||
|
ElectronClient/gui/NoteEditor/NoteBody/CodeMirror/utils/index.js
|
||||||
|
ElectronClient/gui/NoteEditor/NoteBody/CodeMirror/utils/types.js
|
||||||
|
ElectronClient/gui/NoteEditor/NoteBody/CodeMirror/utils/useCursorUtils.js
|
||||||
|
ElectronClient/gui/NoteEditor/NoteBody/CodeMirror/utils/useEditorSearch.js
|
||||||
|
ElectronClient/gui/NoteEditor/NoteBody/CodeMirror/utils/useJoplinMode.js
|
||||||
|
ElectronClient/gui/NoteEditor/NoteBody/CodeMirror/utils/useKeymap.js
|
||||||
|
ElectronClient/gui/NoteEditor/NoteBody/CodeMirror/utils/useLineSorting.js
|
||||||
|
ElectronClient/gui/NoteEditor/NoteBody/CodeMirror/utils/useListIdent.js
|
||||||
|
ElectronClient/gui/NoteEditor/NoteBody/CodeMirror/utils/useScrollUtils.js
|
||||||
|
ElectronClient/gui/NoteEditor/NoteBody/TinyMCE/styles/index.js
|
||||||
|
ElectronClient/gui/NoteEditor/NoteBody/TinyMCE/TinyMCE.js
|
||||||
|
ElectronClient/gui/NoteEditor/NoteBody/TinyMCE/utils/setupContextMenu.js
|
||||||
|
ElectronClient/gui/NoteEditor/NoteBody/TinyMCE/utils/useScroll.js
|
||||||
|
ElectronClient/gui/NoteEditor/NoteEditor.js
|
||||||
|
ElectronClient/gui/NoteEditor/NoteTitle/NoteTitleBar.js
|
||||||
|
ElectronClient/gui/NoteEditor/styles/index.js
|
||||||
|
ElectronClient/gui/NoteEditor/utils/contextMenu.js
|
||||||
|
ElectronClient/gui/NoteEditor/utils/index.js
|
||||||
|
ElectronClient/gui/NoteEditor/utils/resourceHandling.js
|
||||||
|
ElectronClient/gui/NoteEditor/utils/types.js
|
||||||
|
ElectronClient/gui/NoteEditor/utils/useDropHandler.js
|
||||||
|
ElectronClient/gui/NoteEditor/utils/useFolder.js
|
||||||
|
ElectronClient/gui/NoteEditor/utils/useFormNote.js
|
||||||
|
ElectronClient/gui/NoteEditor/utils/useMarkupToHtml.js
|
||||||
|
ElectronClient/gui/NoteEditor/utils/useMessageHandler.js
|
||||||
|
ElectronClient/gui/NoteEditor/utils/useNoteSearchBar.js
|
||||||
|
ElectronClient/gui/NoteEditor/utils/usePluginServiceRegistration.js
|
||||||
|
ElectronClient/gui/NoteEditor/utils/useSearchMarkers.js
|
||||||
|
ElectronClient/gui/NoteEditor/utils/useWindowCommandHandler.js
|
||||||
|
ElectronClient/gui/NoteList/commands/focusElementNoteList.js
|
||||||
|
ElectronClient/gui/NoteList/NoteList.js
|
||||||
|
ElectronClient/gui/NoteListControls/commands/focusSearch.js
|
||||||
|
ElectronClient/gui/NoteListControls/NoteListControls.js
|
||||||
|
ElectronClient/gui/NoteListItem.js
|
||||||
|
ElectronClient/gui/NoteTextViewer.js
|
||||||
|
ElectronClient/gui/NoteToolbar/NoteToolbar.js
|
||||||
|
ElectronClient/gui/OneDriveLoginScreen.js
|
||||||
|
ElectronClient/gui/ResizableLayout/hooks/useLayoutItemSizes.js
|
||||||
|
ElectronClient/gui/ResizableLayout/hooks/useWindowResizeEvent.js
|
||||||
|
ElectronClient/gui/ResizableLayout/ResizableLayout.js
|
||||||
ElectronClient/gui/ResourceScreen.js
|
ElectronClient/gui/ResourceScreen.js
|
||||||
|
ElectronClient/gui/Root_UpgradeSyncTarget.js
|
||||||
|
ElectronClient/gui/Root.js
|
||||||
|
ElectronClient/gui/SearchBar/hooks/useSearch.js
|
||||||
|
ElectronClient/gui/SearchBar/SearchBar.js
|
||||||
|
ElectronClient/gui/SearchBar/styles/index.js
|
||||||
ElectronClient/gui/ShareNoteDialog.js
|
ElectronClient/gui/ShareNoteDialog.js
|
||||||
|
ElectronClient/gui/SideBar/commands/focusElementSideBar.js
|
||||||
|
ElectronClient/gui/SideBar/SideBar.js
|
||||||
|
ElectronClient/gui/SideBar/styles/index.js
|
||||||
|
ElectronClient/gui/StatusScreen/StatusScreen.js
|
||||||
|
ElectronClient/gui/style/StyledInput.js
|
||||||
|
ElectronClient/gui/style/StyledTextInput.js
|
||||||
|
ElectronClient/gui/TagList.js
|
||||||
|
ElectronClient/gui/ToggleEditorsButton/styles/index.js
|
||||||
|
ElectronClient/gui/ToggleEditorsButton/ToggleEditorsButton.js
|
||||||
|
ElectronClient/gui/ToolbarBase.js
|
||||||
|
ElectronClient/gui/ToolbarButton/styles/index.js
|
||||||
|
ElectronClient/gui/ToolbarButton/ToolbarButton.js
|
||||||
|
ElectronClient/gui/utils/NoteListUtils.js
|
||||||
|
ElectronClient/InteropServiceHelper.js
|
||||||
|
ElectronClient/plugins/GotoAnything.js
|
||||||
|
ElectronClient/services/bridge.js
|
||||||
|
ElectronClient/services/commands/types.js
|
||||||
|
ElectronClient/services/plugins/hooks/useThemeCss.js
|
||||||
|
ElectronClient/services/plugins/hooks/useViewIsReady.js
|
||||||
|
ElectronClient/services/plugins/PlatformImplementation.js
|
||||||
|
ElectronClient/services/plugins/PluginRunner.js
|
||||||
|
ElectronClient/services/plugins/UserWebview.js
|
||||||
|
ElectronClient/services/plugins/UserWebviewDialog.js
|
||||||
|
ElectronClient/services/plugins/UserWebviewDialogButtonBar.js
|
||||||
|
ElectronClient/services/spellChecker/SpellCheckerServiceDriverNative.js
|
||||||
|
ReactNativeClient/lib/AsyncActionQueue.js
|
||||||
|
ReactNativeClient/lib/BaseApplication.js
|
||||||
|
ReactNativeClient/lib/BaseModel.js
|
||||||
|
ReactNativeClient/lib/checkPermissions.js
|
||||||
|
ReactNativeClient/lib/commands/historyBackward.js
|
||||||
|
ReactNativeClient/lib/commands/historyForward.js
|
||||||
|
ReactNativeClient/lib/commands/synchronize.js
|
||||||
|
ReactNativeClient/lib/components/BackButtonDialogBox.js
|
||||||
|
ReactNativeClient/lib/components/CameraView.js
|
||||||
|
ReactNativeClient/lib/components/NoteBodyViewer/hooks/useOnMessage.js
|
||||||
|
ReactNativeClient/lib/components/NoteBodyViewer/hooks/useOnResourceLongPress.js
|
||||||
|
ReactNativeClient/lib/components/NoteBodyViewer/hooks/useSource.js
|
||||||
|
ReactNativeClient/lib/components/NoteBodyViewer/NoteBodyViewer.js
|
||||||
|
ReactNativeClient/lib/components/screens/Note.js
|
||||||
|
ReactNativeClient/lib/components/screens/UpgradeSyncTargetScreen.js
|
||||||
|
ReactNativeClient/lib/components/SelectDateTimeDialog.js
|
||||||
|
ReactNativeClient/lib/errorUtils.js
|
||||||
|
ReactNativeClient/lib/eventManager.js
|
||||||
|
ReactNativeClient/lib/fs-driver-node.js
|
||||||
|
ReactNativeClient/lib/hooks/useEffectDebugger.js
|
||||||
|
ReactNativeClient/lib/hooks/useImperativeHandlerDebugger.js
|
||||||
|
ReactNativeClient/lib/hooks/usePrevious.js
|
||||||
|
ReactNativeClient/lib/hooks/usePropsDebugger.js
|
||||||
|
ReactNativeClient/lib/InMemoryCache.js
|
||||||
|
ReactNativeClient/lib/joplin-renderer/MarkupToHtml.js
|
||||||
|
ReactNativeClient/lib/joplin-renderer/MdToHtml.js
|
||||||
|
ReactNativeClient/lib/joplin-renderer/MdToHtml/rules/checkbox.js
|
||||||
|
ReactNativeClient/lib/joplin-renderer/MdToHtml/rules/code_inline.js
|
||||||
|
ReactNativeClient/lib/joplin-renderer/MdToHtml/rules/fence.js
|
||||||
|
ReactNativeClient/lib/joplin-renderer/MdToHtml/rules/fountain.js
|
||||||
|
ReactNativeClient/lib/joplin-renderer/MdToHtml/rules/highlight_keywords.js
|
||||||
|
ReactNativeClient/lib/joplin-renderer/MdToHtml/rules/html_image.js
|
||||||
|
ReactNativeClient/lib/joplin-renderer/MdToHtml/rules/image.js
|
||||||
|
ReactNativeClient/lib/joplin-renderer/MdToHtml/rules/katex.js
|
||||||
|
ReactNativeClient/lib/joplin-renderer/MdToHtml/rules/link_open.js
|
||||||
ReactNativeClient/lib/joplin-renderer/MdToHtml/rules/mermaid.js
|
ReactNativeClient/lib/joplin-renderer/MdToHtml/rules/mermaid.js
|
||||||
ReactNativeClient/lib/joplin-renderer/MdToHtml/rules/sanitize_html.js
|
ReactNativeClient/lib/joplin-renderer/MdToHtml/rules/sanitize_html.js
|
||||||
|
ReactNativeClient/lib/joplin-renderer/noteStyle.js
|
||||||
|
ReactNativeClient/lib/joplin-renderer/pathUtils.js
|
||||||
ReactNativeClient/lib/JoplinServerApi.js
|
ReactNativeClient/lib/JoplinServerApi.js
|
||||||
|
ReactNativeClient/lib/locale.js
|
||||||
|
ReactNativeClient/lib/Logger.js
|
||||||
|
ReactNativeClient/lib/markdownUtils.js
|
||||||
|
ReactNativeClient/lib/markupLanguageUtils.js
|
||||||
|
ReactNativeClient/lib/models/Alarm.js
|
||||||
|
ReactNativeClient/lib/models/Setting.js
|
||||||
|
ReactNativeClient/lib/models/utils/modelFeed.js
|
||||||
|
ReactNativeClient/lib/models/utils/paginationToSql.js
|
||||||
|
ReactNativeClient/lib/models/utils/types.js
|
||||||
|
ReactNativeClient/lib/ntpDate.js
|
||||||
|
ReactNativeClient/lib/path-utils.js
|
||||||
|
ReactNativeClient/lib/PoorManIntervals.js
|
||||||
|
ReactNativeClient/lib/reducer.js
|
||||||
|
ReactNativeClient/lib/services/AlarmService.js
|
||||||
|
ReactNativeClient/lib/services/AlarmServiceDriver.android.js
|
||||||
|
ReactNativeClient/lib/services/AlarmServiceDriver.ios.js
|
||||||
|
ReactNativeClient/lib/services/AlarmServiceDriverNode.js
|
||||||
|
ReactNativeClient/lib/services/BaseService.js
|
||||||
|
ReactNativeClient/lib/services/commands/commandsToMarkdownTable.js
|
||||||
|
ReactNativeClient/lib/services/commands/MenuUtils.js
|
||||||
|
ReactNativeClient/lib/services/commands/propsHaveChanged.js
|
||||||
|
ReactNativeClient/lib/services/commands/stateToWhenClauseContext.js
|
||||||
|
ReactNativeClient/lib/services/commands/ToolbarButtonUtils.js
|
||||||
|
ReactNativeClient/lib/services/CommandService.js
|
||||||
|
ReactNativeClient/lib/services/contextkey/contextkey.js
|
||||||
|
ReactNativeClient/lib/services/debug/populateDatabase.js
|
||||||
|
ReactNativeClient/lib/services/interop/InteropService_Exporter_Base.js
|
||||||
|
ReactNativeClient/lib/services/interop/InteropService_Exporter_Custom.js
|
||||||
|
ReactNativeClient/lib/services/interop/InteropService_Exporter_Html.js
|
||||||
|
ReactNativeClient/lib/services/interop/InteropService_Exporter_Jex.js
|
||||||
|
ReactNativeClient/lib/services/interop/InteropService_Exporter_Md.js
|
||||||
|
ReactNativeClient/lib/services/interop/InteropService_Exporter_Raw.js
|
||||||
|
ReactNativeClient/lib/services/interop/InteropService_Importer_Base.js
|
||||||
|
ReactNativeClient/lib/services/interop/InteropService_Importer_Custom.js
|
||||||
|
ReactNativeClient/lib/services/interop/InteropService_Importer_EnexToHtml.js
|
||||||
|
ReactNativeClient/lib/services/interop/InteropService_Importer_EnexToMd.js
|
||||||
|
ReactNativeClient/lib/services/interop/InteropService_Importer_Jex.js
|
||||||
|
ReactNativeClient/lib/services/interop/InteropService_Importer_Md.js
|
||||||
|
ReactNativeClient/lib/services/interop/InteropService_Importer_Raw.js
|
||||||
|
ReactNativeClient/lib/services/interop/InteropService.js
|
||||||
|
ReactNativeClient/lib/services/interop/types.js
|
||||||
|
ReactNativeClient/lib/services/keychain/KeychainService.js
|
||||||
|
ReactNativeClient/lib/services/keychain/KeychainServiceDriver.dummy.js
|
||||||
|
ReactNativeClient/lib/services/keychain/KeychainServiceDriver.mobile.js
|
||||||
|
ReactNativeClient/lib/services/keychain/KeychainServiceDriver.node.js
|
||||||
|
ReactNativeClient/lib/services/keychain/KeychainServiceDriverBase.js
|
||||||
|
ReactNativeClient/lib/services/KeymapService.js
|
||||||
|
ReactNativeClient/lib/services/plugins/api/Global.js
|
||||||
|
ReactNativeClient/lib/services/plugins/api/Joplin.js
|
||||||
|
ReactNativeClient/lib/services/plugins/api/JoplinCommands.js
|
||||||
|
ReactNativeClient/lib/services/plugins/api/JoplinData.js
|
||||||
|
ReactNativeClient/lib/services/plugins/api/JoplinFilters.js
|
||||||
|
ReactNativeClient/lib/services/plugins/api/JoplinInterop.js
|
||||||
|
ReactNativeClient/lib/services/plugins/api/JoplinPlugins.js
|
||||||
|
ReactNativeClient/lib/services/plugins/api/JoplinSettings.js
|
||||||
|
ReactNativeClient/lib/services/plugins/api/JoplinViews.js
|
||||||
|
ReactNativeClient/lib/services/plugins/api/JoplinViewsDialogs.js
|
||||||
|
ReactNativeClient/lib/services/plugins/api/JoplinViewsMenuItems.js
|
||||||
|
ReactNativeClient/lib/services/plugins/api/JoplinViewsMenus.js
|
||||||
|
ReactNativeClient/lib/services/plugins/api/JoplinViewsPanels.js
|
||||||
|
ReactNativeClient/lib/services/plugins/api/JoplinViewsToolbarButtons.js
|
||||||
|
ReactNativeClient/lib/services/plugins/api/JoplinWorkspace.js
|
||||||
|
ReactNativeClient/lib/services/plugins/api/types.js
|
||||||
|
ReactNativeClient/lib/services/plugins/BasePluginRunner.js
|
||||||
|
ReactNativeClient/lib/services/plugins/MenuController.js
|
||||||
|
ReactNativeClient/lib/services/plugins/MenuItemController.js
|
||||||
|
ReactNativeClient/lib/services/plugins/Plugin.js
|
||||||
|
ReactNativeClient/lib/services/plugins/PluginService.js
|
||||||
|
ReactNativeClient/lib/services/plugins/reducer.js
|
||||||
|
ReactNativeClient/lib/services/plugins/sandboxProxy.js
|
||||||
|
ReactNativeClient/lib/services/plugins/ToolbarButtonController.js
|
||||||
|
ReactNativeClient/lib/services/plugins/utils/contentScriptsToRendererRules.js
|
||||||
|
ReactNativeClient/lib/services/plugins/utils/createViewHandle.js
|
||||||
|
ReactNativeClient/lib/services/plugins/utils/executeSandboxCall.js
|
||||||
|
ReactNativeClient/lib/services/plugins/utils/manifestFromObject.js
|
||||||
|
ReactNativeClient/lib/services/plugins/utils/mapEventHandlersToIds.js
|
||||||
|
ReactNativeClient/lib/services/plugins/utils/types.js
|
||||||
|
ReactNativeClient/lib/services/plugins/ViewController.js
|
||||||
|
ReactNativeClient/lib/services/plugins/WebviewController.js
|
||||||
|
ReactNativeClient/lib/services/ResourceEditWatcher/index.js
|
||||||
|
ReactNativeClient/lib/services/ResourceEditWatcher/reducer.js
|
||||||
|
ReactNativeClient/lib/services/rest/actionApi.desktop.js
|
||||||
|
ReactNativeClient/lib/services/rest/Api.js
|
||||||
|
ReactNativeClient/lib/services/rest/ApiResponse.js
|
||||||
|
ReactNativeClient/lib/services/rest/routes/folders.js
|
||||||
|
ReactNativeClient/lib/services/rest/routes/master_keys.js
|
||||||
|
ReactNativeClient/lib/services/rest/routes/notes.js
|
||||||
|
ReactNativeClient/lib/services/rest/routes/ping.js
|
||||||
|
ReactNativeClient/lib/services/rest/routes/resources.js
|
||||||
|
ReactNativeClient/lib/services/rest/routes/search.js
|
||||||
|
ReactNativeClient/lib/services/rest/routes/tags.js
|
||||||
|
ReactNativeClient/lib/services/rest/utils/defaultAction.js
|
||||||
|
ReactNativeClient/lib/services/rest/utils/defaultLoadOptions.js
|
||||||
|
ReactNativeClient/lib/services/rest/utils/defaultSaveOptions.js
|
||||||
|
ReactNativeClient/lib/services/rest/utils/errors.js
|
||||||
|
ReactNativeClient/lib/services/rest/utils/paginatedResults.js
|
||||||
|
ReactNativeClient/lib/services/rest/utils/readonlyProperties.js
|
||||||
|
ReactNativeClient/lib/services/rest/utils/requestFields.js
|
||||||
|
ReactNativeClient/lib/services/rest/utils/requestPaginationOptions.js
|
||||||
|
ReactNativeClient/lib/services/searchengine/filterParser.js
|
||||||
|
ReactNativeClient/lib/services/searchengine/queryBuilder.js
|
||||||
|
ReactNativeClient/lib/services/SettingUtils.js
|
||||||
|
ReactNativeClient/lib/services/spellChecker/SpellCheckerService.js
|
||||||
|
ReactNativeClient/lib/services/spellChecker/SpellCheckerServiceDriverBase.js
|
||||||
|
ReactNativeClient/lib/services/synchronizer/gui/useSyncTargetUpgrade.js
|
||||||
|
ReactNativeClient/lib/services/synchronizer/LockHandler.js
|
||||||
|
ReactNativeClient/lib/services/synchronizer/MigrationHandler.js
|
||||||
|
ReactNativeClient/lib/services/synchronizer/migrations/1.js
|
||||||
|
ReactNativeClient/lib/services/synchronizer/migrations/2.js
|
||||||
|
ReactNativeClient/lib/services/synchronizer/utils/types.js
|
||||||
|
ReactNativeClient/lib/services/UndoRedoService.js
|
||||||
|
ReactNativeClient/lib/services/WhenClause.js
|
||||||
|
ReactNativeClient/lib/ShareExtension.js
|
||||||
|
ReactNativeClient/lib/shareHandler.js
|
||||||
|
ReactNativeClient/lib/shim.js
|
||||||
|
ReactNativeClient/lib/Synchronizer.js
|
||||||
|
ReactNativeClient/lib/theme.js
|
||||||
|
ReactNativeClient/lib/themes/aritimDark.js
|
||||||
|
ReactNativeClient/lib/themes/dark.js
|
||||||
|
ReactNativeClient/lib/themes/dracula.js
|
||||||
|
ReactNativeClient/lib/themes/light.js
|
||||||
|
ReactNativeClient/lib/themes/nord.js
|
||||||
|
ReactNativeClient/lib/themes/oledDark.js
|
||||||
|
ReactNativeClient/lib/themes/solarizedDark.js
|
||||||
|
ReactNativeClient/lib/themes/solarizedLight.js
|
||||||
|
ReactNativeClient/lib/themes/type.js
|
||||||
|
ReactNativeClient/lib/time.js
|
||||||
|
ReactNativeClient/lib/uuid.js
|
||||||
|
ReactNativeClient/lib/versionInfo.js
|
||||||
ReactNativeClient/PluginAssetsLoader.js
|
ReactNativeClient/PluginAssetsLoader.js
|
||||||
ReactNativeClient/setUpQuickActions.js
|
ReactNativeClient/setUpQuickActions.js
|
||||||
# AUTO-GENERATED - EXCLUDED TYPESCRIPT BUILD
|
# AUTO-GENERATED - EXCLUDED TYPESCRIPT BUILD
|
||||||
|
128
.eslintrc.js
@@ -4,9 +4,9 @@ module.exports = {
|
|||||||
'es6': true,
|
'es6': true,
|
||||||
'node': true,
|
'node': true,
|
||||||
},
|
},
|
||||||
"parser": "@typescript-eslint/parser",
|
'parser': '@typescript-eslint/parser',
|
||||||
'extends': ['eslint:recommended'],
|
'extends': ['eslint:recommended'],
|
||||||
"settings": {
|
'settings': {
|
||||||
'react': {
|
'react': {
|
||||||
'version': '16.12',
|
'version': '16.12',
|
||||||
},
|
},
|
||||||
@@ -32,69 +32,105 @@ module.exports = {
|
|||||||
'browserSupportsPromises_': true,
|
'browserSupportsPromises_': true,
|
||||||
'chrome': 'readonly',
|
'chrome': 'readonly',
|
||||||
'browser': 'readonly',
|
'browser': 'readonly',
|
||||||
|
|
||||||
|
'tinymce': 'readonly',
|
||||||
},
|
},
|
||||||
'parserOptions': {
|
'parserOptions': {
|
||||||
'ecmaVersion': 2018,
|
'ecmaVersion': 2018,
|
||||||
"ecmaFeatures": {
|
'ecmaFeatures': {
|
||||||
"jsx": true,
|
'jsx': true,
|
||||||
},
|
},
|
||||||
"sourceType": "module",
|
'sourceType': 'module',
|
||||||
},
|
},
|
||||||
'rules': {
|
'rules': {
|
||||||
// -------------------------------
|
// -------------------------------
|
||||||
// Code correctness
|
// Code correctness
|
||||||
// -------------------------------
|
// -------------------------------
|
||||||
"react/jsx-uses-react": "error",
|
'react/jsx-uses-react': 'error',
|
||||||
"react/jsx-uses-vars": "error",
|
'react/jsx-uses-vars': 'error',
|
||||||
"no-unused-vars": "error",
|
'no-unused-vars': ['error', { 'argsIgnorePattern': '^_' }],
|
||||||
"no-constant-condition": 0,
|
'@typescript-eslint/no-unused-vars': ['error', { 'argsIgnorePattern': '^_' }],
|
||||||
"no-prototype-builtins": 0,
|
'@typescript-eslint/explicit-member-accessibility': 'off',
|
||||||
|
'no-constant-condition': 0,
|
||||||
|
'no-prototype-builtins': 0,
|
||||||
// This error is always a false positive so far since it detects
|
// This error is always a false positive so far since it detects
|
||||||
// possible race conditions in contexts where we know it cannot happen.
|
// possible race conditions in contexts where we know it cannot happen.
|
||||||
"require-atomic-updates": 0,
|
'require-atomic-updates': 0,
|
||||||
|
'prefer-const': ['error'],
|
||||||
|
'no-var': ['error'],
|
||||||
|
'no-new-func': ['error'],
|
||||||
|
'import/prefer-default-export': ['error'],
|
||||||
|
'import/first': ['error'],
|
||||||
|
'no-array-constructor': ['error'],
|
||||||
|
'radix': ['error'],
|
||||||
|
|
||||||
|
// Warn only for now because fixing everything would take too much
|
||||||
|
// refactoring, but new code should try to stick to it.
|
||||||
|
'complexity': ['warn', { max: 10 }],
|
||||||
|
|
||||||
// Checks rules of Hooks
|
// Checks rules of Hooks
|
||||||
"react-hooks/rules-of-hooks": "error",
|
'react-hooks/rules-of-hooks': 'error',
|
||||||
// Checks effect dependencies
|
// Checks effect dependencies
|
||||||
"react-hooks/exhaustive-deps": "error",
|
// Disable because of this: https://github.com/facebook/react/issues/16265
|
||||||
|
// "react-hooks/exhaustive-deps": "warn",
|
||||||
|
|
||||||
// -------------------------------
|
// -------------------------------
|
||||||
// Formatting
|
// Formatting
|
||||||
// -------------------------------
|
// -------------------------------
|
||||||
"space-in-parens": ["error", "never"],
|
'space-in-parens': ['error', 'never'],
|
||||||
"semi": ["error", "always"],
|
'space-infix-ops': ['error'],
|
||||||
"eol-last": ["error", "always"],
|
'curly': ['error', 'multi-line', 'consistent'],
|
||||||
"quotes": ["error", "single"],
|
'semi': ['error', 'always'],
|
||||||
"indent": ["error", "tab"],
|
'eol-last': ['error', 'always'],
|
||||||
"comma-dangle": ["error", "always-multiline"],
|
'quotes': ['error', 'single'],
|
||||||
"no-trailing-spaces": "error",
|
'indent': ['error', 'tab'],
|
||||||
"linebreak-style": ["error", "unix"],
|
'comma-dangle': ['error', {
|
||||||
"prefer-template": ["error"],
|
'arrays': 'always-multiline',
|
||||||
"template-curly-spacing": ["error", "never"],
|
'objects': 'always-multiline',
|
||||||
"object-curly-spacing": ["error", "always"],
|
'imports': 'always-multiline',
|
||||||
"array-bracket-spacing": ["error", "never"],
|
'exports': 'always-multiline',
|
||||||
"key-spacing": ["error", {
|
'functions': 'never',
|
||||||
"beforeColon": false,
|
|
||||||
"afterColon": true,
|
|
||||||
"mode": "strict"
|
|
||||||
}],
|
}],
|
||||||
"block-spacing": ["error"],
|
'no-trailing-spaces': 'error',
|
||||||
"brace-style": ["error", "1tbs", { "allowSingleLine": true }],
|
'linebreak-style': ['error', 'unix'],
|
||||||
"no-spaced-func": ["error"],
|
'prefer-template': ['error'],
|
||||||
"func-call-spacing": ["error"],
|
'template-curly-spacing': ['error', 'never'],
|
||||||
"space-before-function-paren": ["error", {
|
'object-curly-spacing': ['error', 'always'],
|
||||||
"anonymous": "never",
|
'array-bracket-spacing': ['error', 'never'],
|
||||||
"named": "never",
|
'key-spacing': ['error', {
|
||||||
"asyncArrow": "always"
|
'beforeColon': false,
|
||||||
|
'afterColon': true,
|
||||||
|
'mode': 'strict',
|
||||||
}],
|
}],
|
||||||
"multiline-comment-style": ["error", "separate-lines"],
|
'block-spacing': ['error'],
|
||||||
"space-before-blocks": "error",
|
'brace-style': ['error', '1tbs', { 'allowSingleLine': true }],
|
||||||
"spaced-comment": ["error", "always"],
|
'no-spaced-func': ['error'],
|
||||||
"keyword-spacing": ["error", { "before": true, "after": true }]
|
'func-call-spacing': ['error'],
|
||||||
|
'space-before-function-paren': ['error', {
|
||||||
|
'anonymous': 'never',
|
||||||
|
'named': 'never',
|
||||||
|
'asyncArrow': 'always',
|
||||||
|
}],
|
||||||
|
'multiline-comment-style': ['error', 'separate-lines'],
|
||||||
|
'space-before-blocks': 'error',
|
||||||
|
'spaced-comment': ['error', 'always'],
|
||||||
|
'keyword-spacing': ['error', { 'before': true, 'after': true }],
|
||||||
},
|
},
|
||||||
"plugins": [
|
'plugins': [
|
||||||
"react",
|
'react',
|
||||||
"@typescript-eslint",
|
'@typescript-eslint',
|
||||||
"react-hooks"
|
'react-hooks',
|
||||||
|
'import',
|
||||||
|
],
|
||||||
|
'overrides': [
|
||||||
|
{
|
||||||
|
// enable the rule specifically for TypeScript files
|
||||||
|
'files': ['*.ts', '*.tsx'],
|
||||||
|
'rules': {
|
||||||
|
// Warn only because it would make it difficult to convert JS classes to TypeScript, unless we
|
||||||
|
// make everything public which is not great. New code however should specify member accessibility.
|
||||||
|
'@typescript-eslint/explicit-member-accessibility': ['warn'],
|
||||||
|
},
|
||||||
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
15
.github/ISSUE_TEMPLATE/---feature-requests-and-support.md
vendored
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
---
|
||||||
|
name: "\U0001F914 Feature requests and support"
|
||||||
|
about: 'For non-bug issues we recommend using the forum, where you''ll be more likely
|
||||||
|
to get an answer: https://discourse.joplinapp.org/'
|
||||||
|
title: ''
|
||||||
|
labels: ''
|
||||||
|
assignees: ''
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
If this is a feature request or a support query, please note that you'll not get an answer here.
|
||||||
|
|
||||||
|
Instead we recommend using the forum where you'll are a lot more likely to get an answer: https://discourse.joplinapp.org/
|
||||||
|
|
||||||
|
The forum is also the right place to submit a feature request so that it can be discussed by other users.
|
5
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@@ -1,8 +1,9 @@
|
|||||||
---
|
---
|
||||||
name: "🐛 Bug Report"
|
name: "\U0001F41B Bug Report"
|
||||||
about: Report a reproducible bug or regression in Joplin.
|
about: Report a reproducible bug or regression in Joplin.
|
||||||
title: ''
|
title: ''
|
||||||
labels: 'bug'
|
labels: bug
|
||||||
|
assignees: ''
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
29
.github/ISSUE_TEMPLATE/question.md
vendored
@@ -1,29 +0,0 @@
|
|||||||
---
|
|
||||||
name: "🤔 Questions and Help"
|
|
||||||
about: The issue tracker is not for questions. Please ask questions on https://discourse.joplinapp.org/.
|
|
||||||
title: ''
|
|
||||||
labels: 'invalid'
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
⚠🚨⛔ The issue tracker is not for questions. ⛔🚨⚠
|
|
||||||
|
|
||||||
As it happens, support requests that are created as issues are likely to be closed. We want to make sure you are able to find the help you seek.
|
|
||||||
|
|
||||||
## Questions and Help
|
|
||||||
|
|
||||||
Please read the [documentation](https://joplinapp.org/) and [FAQ](https://joplinapp.org/faq/) first.
|
|
||||||
|
|
||||||
### https://discourse.joplinapp.org/
|
|
||||||
|
|
||||||
If you have still questions related to Joplin, please open a topic in the [forum](https://discourse.joplinapp.org/).
|
|
||||||
You can use your GitHub credentials to login to the forum.
|
|
||||||
|
|
||||||
## Links
|
|
||||||
|
|
||||||
- Documentation: https://joplinapp.org
|
|
||||||
- FAQ: https://joplinapp.org/faq/
|
|
||||||
- Forum: https://discourse.joplinapp.org
|
|
||||||
- How to enable end-to-end encryption: https://joplinapp.org/e2ee/
|
|
||||||
- API documentation: https://joplinapp.org/api/
|
|
||||||
- How to enable debug mode: https://joplinapp.org/debugging/
|
|
14
.github/PULL_REQUEST_TEMPLATE
vendored
@@ -2,14 +2,24 @@
|
|||||||
|
|
||||||
Please prefix the title with the platform you are targetting:
|
Please prefix the title with the platform you are targetting:
|
||||||
|
|
||||||
|
Here are some examples of good titles:
|
||||||
|
|
||||||
|
- Desktop: Resolves #123: Added new setting to change font
|
||||||
|
- Mobile, Desktop: Fixes #456: Fixed config screen error
|
||||||
|
- All: Resolves #777: Made synchronisation faster
|
||||||
|
|
||||||
|
And here's an explanation of the title format:
|
||||||
|
|
||||||
- "Desktop" for the Windows/macOS/Linux app (Electron app)
|
- "Desktop" for the Windows/macOS/Linux app (Electron app)
|
||||||
- "Mobile" for the mobile app (or "Android" / "iOS" if the pull request only applies to one of the mobile platforms)
|
- "Mobile" for the mobile app (or "Android" / "iOS" if the pull request only applies to one of the mobile platforms)
|
||||||
- "CLI" for the CLI app
|
- "CLI" for the CLI app
|
||||||
|
|
||||||
|
If it's two platforms, separate them with commas - "Desktop, Mobile" or if it's for all platforms, prefix with "All".
|
||||||
|
|
||||||
If it's not related to any platform (such as a translation, change to the documentation, etc.), simply don't add a platform.
|
If it's not related to any platform (such as a translation, change to the documentation, etc.), simply don't add a platform.
|
||||||
|
|
||||||
For example: "Desktop: Added new setting to change font", or "Mobile: Fixed config screen error"
|
Then please append the issue that you've addressed or fixed. Use "Resolves #123" for new features or improvements and "Fixes #123" for bug fixes.
|
||||||
|
|
||||||
PLEASE READ THE GUIDE FIRST: https://github.com/laurent22/joplin/blob/master/CONTRIBUTING.md
|
AND PLEASE READ THE GUIDE: https://github.com/laurent22/joplin/blob/dev/CONTRIBUTING.md
|
||||||
|
|
||||||
-->
|
-->
|
||||||
|
7
.github/stale.yml
vendored
@@ -1,18 +1,15 @@
|
|||||||
# Configuration for probot-stale - https://github.com/probot/stale
|
# Configuration for probot-stale - https://github.com/probot/stale
|
||||||
# Number of days of inactivity before an issue becomes stale
|
# Number of days of inactivity before an issue becomes stale
|
||||||
daysUntilStale: 90
|
daysUntilStale: 30
|
||||||
# Number of days of inactivity before a stale issue is closed
|
# Number of days of inactivity before a stale issue is closed
|
||||||
daysUntilClose: 7
|
daysUntilClose: 7
|
||||||
# Issues with these labels will never be considered stale
|
# Issues with these labels will never be considered stale
|
||||||
exemptLabels:
|
exemptLabels:
|
||||||
- "good first issue"
|
- "good first issue"
|
||||||
- "essential"
|
|
||||||
- "essential-reviewed"
|
|
||||||
- "help wanted"
|
|
||||||
- "nice to have"
|
|
||||||
- "upstream"
|
- "upstream"
|
||||||
- "backlog"
|
- "backlog"
|
||||||
- "high"
|
- "high"
|
||||||
|
- "spec"
|
||||||
# Label to use when marking an issue as stale
|
# Label to use when marking an issue as stale
|
||||||
staleLabel: stale
|
staleLabel: stale
|
||||||
# Comment to post when marking an issue as stale. Set to `false` to disable
|
# Comment to post when marking an issue as stale. Set to `false` to disable
|
||||||
|
317
.gitignore
vendored
@@ -37,25 +37,342 @@ _mydocs
|
|||||||
Assets/DownloadBadges*.psd
|
Assets/DownloadBadges*.psd
|
||||||
node_modules
|
node_modules
|
||||||
Tools/github_oauth_token.txt
|
Tools/github_oauth_token.txt
|
||||||
|
CliClient/tests/support/amazon-s3-auth.json
|
||||||
_releases
|
_releases
|
||||||
ReactNativeClient/lib/csstojs/
|
ReactNativeClient/lib/csstojs/
|
||||||
ReactNativeClient/lib/rnInjectedJs/
|
ReactNativeClient/lib/rnInjectedJs/
|
||||||
ElectronClient/gui/note-viewer/fonts/
|
ElectronClient/gui/note-viewer/fonts/
|
||||||
ElectronClient/gui/note-viewer/lib.js
|
ElectronClient/gui/note-viewer/lib.js
|
||||||
|
ElectronClient/gui/NoteEditor/NoteBody/TinyMCE/supportedLocales.js
|
||||||
Clipper-source/
|
Clipper-source/
|
||||||
Clipper/joplin-webclipper-source.zip
|
Clipper/joplin-webclipper-source.zip
|
||||||
joplin-webclipper-source.zip
|
joplin-webclipper-source.zip
|
||||||
Tools/commit_hook.txt
|
Tools/commit_hook.txt
|
||||||
.vscode/*
|
.vscode/*
|
||||||
*.map
|
*.map
|
||||||
|
ReactNativeClient/lib/sql-extensions/spellfix.so
|
||||||
|
ReactNativeClient/lib/sql-extensions/spellfix.dylib
|
||||||
|
CliClient/build/
|
||||||
|
plugin_types/
|
||||||
|
|
||||||
# AUTO-GENERATED - EXCLUDED TYPESCRIPT BUILD
|
# AUTO-GENERATED - EXCLUDED TYPESCRIPT BUILD
|
||||||
|
CliClient/app/LinkSelector.js
|
||||||
|
CliClient/app/services/plugins/PluginRunner.js
|
||||||
|
CliClient/tests/fsDriver.js
|
||||||
|
CliClient/tests/InMemoryCache.js
|
||||||
|
CliClient/tests/MdToHtml.js
|
||||||
|
CliClient/tests/models_Setting.js
|
||||||
|
CliClient/tests/services_CommandService.js
|
||||||
|
CliClient/tests/services_InteropService.js
|
||||||
|
CliClient/tests/services_keychainService.js
|
||||||
|
CliClient/tests/services_PluginService.js
|
||||||
|
CliClient/tests/services_rest_Api.js
|
||||||
|
CliClient/tests/services/plugins/api/JoplinSetting.js
|
||||||
|
CliClient/tests/services/plugins/sandboxProxy.js
|
||||||
|
CliClient/tests/synchronizer_LockHandler.js
|
||||||
|
CliClient/tests/synchronizer_MigrationHandler.js
|
||||||
|
ElectronClient/app.js
|
||||||
|
ElectronClient/bridge.js
|
||||||
|
ElectronClient/commands/copyDevCommand.js
|
||||||
|
ElectronClient/commands/focusElement.js
|
||||||
|
ElectronClient/commands/openProfileDirectory.js
|
||||||
|
ElectronClient/commands/startExternalEditing.js
|
||||||
|
ElectronClient/commands/stopExternalEditing.js
|
||||||
|
ElectronClient/commands/toggleExternalEditing.js
|
||||||
|
ElectronClient/ElectronAppWrapper.js
|
||||||
|
ElectronClient/global.d.js
|
||||||
|
ElectronClient/gui/Button/Button.js
|
||||||
|
ElectronClient/gui/ConfigScreen/ButtonBar.js
|
||||||
|
ElectronClient/gui/ConfigScreen/ConfigScreen.js
|
||||||
|
ElectronClient/gui/ConfigScreen/SideBar.js
|
||||||
|
ElectronClient/gui/DropboxLoginScreen.js
|
||||||
|
ElectronClient/gui/ErrorBoundary.js
|
||||||
|
ElectronClient/gui/KeymapConfig/KeymapConfigScreen.js
|
||||||
|
ElectronClient/gui/KeymapConfig/ShortcutRecorder.js
|
||||||
|
ElectronClient/gui/KeymapConfig/styles/index.js
|
||||||
|
ElectronClient/gui/KeymapConfig/utils/getLabel.js
|
||||||
|
ElectronClient/gui/KeymapConfig/utils/useCommandStatus.js
|
||||||
|
ElectronClient/gui/KeymapConfig/utils/useKeymap.js
|
||||||
|
ElectronClient/gui/MainScreen/commands/editAlarm.js
|
||||||
|
ElectronClient/gui/MainScreen/commands/exportPdf.js
|
||||||
|
ElectronClient/gui/MainScreen/commands/hideModalMessage.js
|
||||||
|
ElectronClient/gui/MainScreen/commands/moveToFolder.js
|
||||||
|
ElectronClient/gui/MainScreen/commands/newFolder.js
|
||||||
|
ElectronClient/gui/MainScreen/commands/newNote.js
|
||||||
|
ElectronClient/gui/MainScreen/commands/newSubFolder.js
|
||||||
|
ElectronClient/gui/MainScreen/commands/newTodo.js
|
||||||
|
ElectronClient/gui/MainScreen/commands/openFolder.js
|
||||||
|
ElectronClient/gui/MainScreen/commands/openNote.js
|
||||||
|
ElectronClient/gui/MainScreen/commands/openTag.js
|
||||||
|
ElectronClient/gui/MainScreen/commands/print.js
|
||||||
|
ElectronClient/gui/MainScreen/commands/renameFolder.js
|
||||||
|
ElectronClient/gui/MainScreen/commands/renameTag.js
|
||||||
|
ElectronClient/gui/MainScreen/commands/search.js
|
||||||
|
ElectronClient/gui/MainScreen/commands/selectTemplate.js
|
||||||
|
ElectronClient/gui/MainScreen/commands/setTags.js
|
||||||
|
ElectronClient/gui/MainScreen/commands/showModalMessage.js
|
||||||
|
ElectronClient/gui/MainScreen/commands/showNoteContentProperties.js
|
||||||
|
ElectronClient/gui/MainScreen/commands/showNoteProperties.js
|
||||||
|
ElectronClient/gui/MainScreen/commands/showShareNoteDialog.js
|
||||||
|
ElectronClient/gui/MainScreen/commands/toggleEditors.js
|
||||||
|
ElectronClient/gui/MainScreen/commands/toggleNoteList.js
|
||||||
|
ElectronClient/gui/MainScreen/commands/toggleSideBar.js
|
||||||
|
ElectronClient/gui/MainScreen/commands/toggleVisiblePanes.js
|
||||||
|
ElectronClient/gui/MainScreen/MainScreen.js
|
||||||
|
ElectronClient/gui/MenuBar.js
|
||||||
|
ElectronClient/gui/menuCommandNames.js
|
||||||
|
ElectronClient/gui/MultiNoteActions.js
|
||||||
ElectronClient/gui/NoteContentPropertiesDialog.js
|
ElectronClient/gui/NoteContentPropertiesDialog.js
|
||||||
|
ElectronClient/gui/NoteEditor/commands/editorCommandDeclarations.js
|
||||||
|
ElectronClient/gui/NoteEditor/commands/focusElementNoteBody.js
|
||||||
|
ElectronClient/gui/NoteEditor/commands/focusElementNoteTitle.js
|
||||||
|
ElectronClient/gui/NoteEditor/commands/showLocalSearch.js
|
||||||
|
ElectronClient/gui/NoteEditor/commands/showRevisions.js
|
||||||
|
ElectronClient/gui/NoteEditor/NoteBody/CodeMirror/CodeMirror.js
|
||||||
|
ElectronClient/gui/NoteEditor/NoteBody/CodeMirror/Editor.js
|
||||||
|
ElectronClient/gui/NoteEditor/NoteBody/CodeMirror/styles/index.js
|
||||||
|
ElectronClient/gui/NoteEditor/NoteBody/CodeMirror/Toolbar.js
|
||||||
|
ElectronClient/gui/NoteEditor/NoteBody/CodeMirror/utils/index.js
|
||||||
|
ElectronClient/gui/NoteEditor/NoteBody/CodeMirror/utils/types.js
|
||||||
|
ElectronClient/gui/NoteEditor/NoteBody/CodeMirror/utils/useCursorUtils.js
|
||||||
|
ElectronClient/gui/NoteEditor/NoteBody/CodeMirror/utils/useEditorSearch.js
|
||||||
|
ElectronClient/gui/NoteEditor/NoteBody/CodeMirror/utils/useJoplinMode.js
|
||||||
|
ElectronClient/gui/NoteEditor/NoteBody/CodeMirror/utils/useKeymap.js
|
||||||
|
ElectronClient/gui/NoteEditor/NoteBody/CodeMirror/utils/useLineSorting.js
|
||||||
|
ElectronClient/gui/NoteEditor/NoteBody/CodeMirror/utils/useListIdent.js
|
||||||
|
ElectronClient/gui/NoteEditor/NoteBody/CodeMirror/utils/useScrollUtils.js
|
||||||
|
ElectronClient/gui/NoteEditor/NoteBody/TinyMCE/styles/index.js
|
||||||
|
ElectronClient/gui/NoteEditor/NoteBody/TinyMCE/TinyMCE.js
|
||||||
|
ElectronClient/gui/NoteEditor/NoteBody/TinyMCE/utils/setupContextMenu.js
|
||||||
|
ElectronClient/gui/NoteEditor/NoteBody/TinyMCE/utils/useScroll.js
|
||||||
|
ElectronClient/gui/NoteEditor/NoteEditor.js
|
||||||
|
ElectronClient/gui/NoteEditor/NoteTitle/NoteTitleBar.js
|
||||||
|
ElectronClient/gui/NoteEditor/styles/index.js
|
||||||
|
ElectronClient/gui/NoteEditor/utils/contextMenu.js
|
||||||
|
ElectronClient/gui/NoteEditor/utils/index.js
|
||||||
|
ElectronClient/gui/NoteEditor/utils/resourceHandling.js
|
||||||
|
ElectronClient/gui/NoteEditor/utils/types.js
|
||||||
|
ElectronClient/gui/NoteEditor/utils/useDropHandler.js
|
||||||
|
ElectronClient/gui/NoteEditor/utils/useFolder.js
|
||||||
|
ElectronClient/gui/NoteEditor/utils/useFormNote.js
|
||||||
|
ElectronClient/gui/NoteEditor/utils/useMarkupToHtml.js
|
||||||
|
ElectronClient/gui/NoteEditor/utils/useMessageHandler.js
|
||||||
|
ElectronClient/gui/NoteEditor/utils/useNoteSearchBar.js
|
||||||
|
ElectronClient/gui/NoteEditor/utils/usePluginServiceRegistration.js
|
||||||
|
ElectronClient/gui/NoteEditor/utils/useSearchMarkers.js
|
||||||
|
ElectronClient/gui/NoteEditor/utils/useWindowCommandHandler.js
|
||||||
|
ElectronClient/gui/NoteList/commands/focusElementNoteList.js
|
||||||
|
ElectronClient/gui/NoteList/NoteList.js
|
||||||
|
ElectronClient/gui/NoteListControls/commands/focusSearch.js
|
||||||
|
ElectronClient/gui/NoteListControls/NoteListControls.js
|
||||||
|
ElectronClient/gui/NoteListItem.js
|
||||||
|
ElectronClient/gui/NoteTextViewer.js
|
||||||
|
ElectronClient/gui/NoteToolbar/NoteToolbar.js
|
||||||
|
ElectronClient/gui/OneDriveLoginScreen.js
|
||||||
|
ElectronClient/gui/ResizableLayout/hooks/useLayoutItemSizes.js
|
||||||
|
ElectronClient/gui/ResizableLayout/hooks/useWindowResizeEvent.js
|
||||||
|
ElectronClient/gui/ResizableLayout/ResizableLayout.js
|
||||||
ElectronClient/gui/ResourceScreen.js
|
ElectronClient/gui/ResourceScreen.js
|
||||||
|
ElectronClient/gui/Root_UpgradeSyncTarget.js
|
||||||
|
ElectronClient/gui/Root.js
|
||||||
|
ElectronClient/gui/SearchBar/hooks/useSearch.js
|
||||||
|
ElectronClient/gui/SearchBar/SearchBar.js
|
||||||
|
ElectronClient/gui/SearchBar/styles/index.js
|
||||||
ElectronClient/gui/ShareNoteDialog.js
|
ElectronClient/gui/ShareNoteDialog.js
|
||||||
|
ElectronClient/gui/SideBar/commands/focusElementSideBar.js
|
||||||
|
ElectronClient/gui/SideBar/SideBar.js
|
||||||
|
ElectronClient/gui/SideBar/styles/index.js
|
||||||
|
ElectronClient/gui/StatusScreen/StatusScreen.js
|
||||||
|
ElectronClient/gui/style/StyledInput.js
|
||||||
|
ElectronClient/gui/style/StyledTextInput.js
|
||||||
|
ElectronClient/gui/TagList.js
|
||||||
|
ElectronClient/gui/ToggleEditorsButton/styles/index.js
|
||||||
|
ElectronClient/gui/ToggleEditorsButton/ToggleEditorsButton.js
|
||||||
|
ElectronClient/gui/ToolbarBase.js
|
||||||
|
ElectronClient/gui/ToolbarButton/styles/index.js
|
||||||
|
ElectronClient/gui/ToolbarButton/ToolbarButton.js
|
||||||
|
ElectronClient/gui/utils/NoteListUtils.js
|
||||||
|
ElectronClient/InteropServiceHelper.js
|
||||||
|
ElectronClient/plugins/GotoAnything.js
|
||||||
|
ElectronClient/services/bridge.js
|
||||||
|
ElectronClient/services/commands/types.js
|
||||||
|
ElectronClient/services/plugins/hooks/useThemeCss.js
|
||||||
|
ElectronClient/services/plugins/hooks/useViewIsReady.js
|
||||||
|
ElectronClient/services/plugins/PlatformImplementation.js
|
||||||
|
ElectronClient/services/plugins/PluginRunner.js
|
||||||
|
ElectronClient/services/plugins/UserWebview.js
|
||||||
|
ElectronClient/services/plugins/UserWebviewDialog.js
|
||||||
|
ElectronClient/services/plugins/UserWebviewDialogButtonBar.js
|
||||||
|
ElectronClient/services/spellChecker/SpellCheckerServiceDriverNative.js
|
||||||
|
ReactNativeClient/lib/AsyncActionQueue.js
|
||||||
|
ReactNativeClient/lib/BaseApplication.js
|
||||||
|
ReactNativeClient/lib/BaseModel.js
|
||||||
|
ReactNativeClient/lib/checkPermissions.js
|
||||||
|
ReactNativeClient/lib/commands/historyBackward.js
|
||||||
|
ReactNativeClient/lib/commands/historyForward.js
|
||||||
|
ReactNativeClient/lib/commands/synchronize.js
|
||||||
|
ReactNativeClient/lib/components/BackButtonDialogBox.js
|
||||||
|
ReactNativeClient/lib/components/CameraView.js
|
||||||
|
ReactNativeClient/lib/components/NoteBodyViewer/hooks/useOnMessage.js
|
||||||
|
ReactNativeClient/lib/components/NoteBodyViewer/hooks/useOnResourceLongPress.js
|
||||||
|
ReactNativeClient/lib/components/NoteBodyViewer/hooks/useSource.js
|
||||||
|
ReactNativeClient/lib/components/NoteBodyViewer/NoteBodyViewer.js
|
||||||
|
ReactNativeClient/lib/components/screens/Note.js
|
||||||
|
ReactNativeClient/lib/components/screens/UpgradeSyncTargetScreen.js
|
||||||
|
ReactNativeClient/lib/components/SelectDateTimeDialog.js
|
||||||
|
ReactNativeClient/lib/errorUtils.js
|
||||||
|
ReactNativeClient/lib/eventManager.js
|
||||||
|
ReactNativeClient/lib/fs-driver-node.js
|
||||||
|
ReactNativeClient/lib/hooks/useEffectDebugger.js
|
||||||
|
ReactNativeClient/lib/hooks/useImperativeHandlerDebugger.js
|
||||||
|
ReactNativeClient/lib/hooks/usePrevious.js
|
||||||
|
ReactNativeClient/lib/hooks/usePropsDebugger.js
|
||||||
|
ReactNativeClient/lib/InMemoryCache.js
|
||||||
|
ReactNativeClient/lib/joplin-renderer/MarkupToHtml.js
|
||||||
|
ReactNativeClient/lib/joplin-renderer/MdToHtml.js
|
||||||
|
ReactNativeClient/lib/joplin-renderer/MdToHtml/rules/checkbox.js
|
||||||
|
ReactNativeClient/lib/joplin-renderer/MdToHtml/rules/code_inline.js
|
||||||
|
ReactNativeClient/lib/joplin-renderer/MdToHtml/rules/fence.js
|
||||||
|
ReactNativeClient/lib/joplin-renderer/MdToHtml/rules/fountain.js
|
||||||
|
ReactNativeClient/lib/joplin-renderer/MdToHtml/rules/highlight_keywords.js
|
||||||
|
ReactNativeClient/lib/joplin-renderer/MdToHtml/rules/html_image.js
|
||||||
|
ReactNativeClient/lib/joplin-renderer/MdToHtml/rules/image.js
|
||||||
|
ReactNativeClient/lib/joplin-renderer/MdToHtml/rules/katex.js
|
||||||
|
ReactNativeClient/lib/joplin-renderer/MdToHtml/rules/link_open.js
|
||||||
ReactNativeClient/lib/joplin-renderer/MdToHtml/rules/mermaid.js
|
ReactNativeClient/lib/joplin-renderer/MdToHtml/rules/mermaid.js
|
||||||
ReactNativeClient/lib/joplin-renderer/MdToHtml/rules/sanitize_html.js
|
ReactNativeClient/lib/joplin-renderer/MdToHtml/rules/sanitize_html.js
|
||||||
|
ReactNativeClient/lib/joplin-renderer/noteStyle.js
|
||||||
|
ReactNativeClient/lib/joplin-renderer/pathUtils.js
|
||||||
ReactNativeClient/lib/JoplinServerApi.js
|
ReactNativeClient/lib/JoplinServerApi.js
|
||||||
|
ReactNativeClient/lib/locale.js
|
||||||
|
ReactNativeClient/lib/Logger.js
|
||||||
|
ReactNativeClient/lib/markdownUtils.js
|
||||||
|
ReactNativeClient/lib/markupLanguageUtils.js
|
||||||
|
ReactNativeClient/lib/models/Alarm.js
|
||||||
|
ReactNativeClient/lib/models/Setting.js
|
||||||
|
ReactNativeClient/lib/models/utils/modelFeed.js
|
||||||
|
ReactNativeClient/lib/models/utils/paginationToSql.js
|
||||||
|
ReactNativeClient/lib/models/utils/types.js
|
||||||
|
ReactNativeClient/lib/ntpDate.js
|
||||||
|
ReactNativeClient/lib/path-utils.js
|
||||||
|
ReactNativeClient/lib/PoorManIntervals.js
|
||||||
|
ReactNativeClient/lib/reducer.js
|
||||||
|
ReactNativeClient/lib/services/AlarmService.js
|
||||||
|
ReactNativeClient/lib/services/AlarmServiceDriver.android.js
|
||||||
|
ReactNativeClient/lib/services/AlarmServiceDriver.ios.js
|
||||||
|
ReactNativeClient/lib/services/AlarmServiceDriverNode.js
|
||||||
|
ReactNativeClient/lib/services/BaseService.js
|
||||||
|
ReactNativeClient/lib/services/commands/commandsToMarkdownTable.js
|
||||||
|
ReactNativeClient/lib/services/commands/MenuUtils.js
|
||||||
|
ReactNativeClient/lib/services/commands/propsHaveChanged.js
|
||||||
|
ReactNativeClient/lib/services/commands/stateToWhenClauseContext.js
|
||||||
|
ReactNativeClient/lib/services/commands/ToolbarButtonUtils.js
|
||||||
|
ReactNativeClient/lib/services/CommandService.js
|
||||||
|
ReactNativeClient/lib/services/contextkey/contextkey.js
|
||||||
|
ReactNativeClient/lib/services/debug/populateDatabase.js
|
||||||
|
ReactNativeClient/lib/services/interop/InteropService_Exporter_Base.js
|
||||||
|
ReactNativeClient/lib/services/interop/InteropService_Exporter_Custom.js
|
||||||
|
ReactNativeClient/lib/services/interop/InteropService_Exporter_Html.js
|
||||||
|
ReactNativeClient/lib/services/interop/InteropService_Exporter_Jex.js
|
||||||
|
ReactNativeClient/lib/services/interop/InteropService_Exporter_Md.js
|
||||||
|
ReactNativeClient/lib/services/interop/InteropService_Exporter_Raw.js
|
||||||
|
ReactNativeClient/lib/services/interop/InteropService_Importer_Base.js
|
||||||
|
ReactNativeClient/lib/services/interop/InteropService_Importer_Custom.js
|
||||||
|
ReactNativeClient/lib/services/interop/InteropService_Importer_EnexToHtml.js
|
||||||
|
ReactNativeClient/lib/services/interop/InteropService_Importer_EnexToMd.js
|
||||||
|
ReactNativeClient/lib/services/interop/InteropService_Importer_Jex.js
|
||||||
|
ReactNativeClient/lib/services/interop/InteropService_Importer_Md.js
|
||||||
|
ReactNativeClient/lib/services/interop/InteropService_Importer_Raw.js
|
||||||
|
ReactNativeClient/lib/services/interop/InteropService.js
|
||||||
|
ReactNativeClient/lib/services/interop/types.js
|
||||||
|
ReactNativeClient/lib/services/keychain/KeychainService.js
|
||||||
|
ReactNativeClient/lib/services/keychain/KeychainServiceDriver.dummy.js
|
||||||
|
ReactNativeClient/lib/services/keychain/KeychainServiceDriver.mobile.js
|
||||||
|
ReactNativeClient/lib/services/keychain/KeychainServiceDriver.node.js
|
||||||
|
ReactNativeClient/lib/services/keychain/KeychainServiceDriverBase.js
|
||||||
|
ReactNativeClient/lib/services/KeymapService.js
|
||||||
|
ReactNativeClient/lib/services/plugins/api/Global.js
|
||||||
|
ReactNativeClient/lib/services/plugins/api/Joplin.js
|
||||||
|
ReactNativeClient/lib/services/plugins/api/JoplinCommands.js
|
||||||
|
ReactNativeClient/lib/services/plugins/api/JoplinData.js
|
||||||
|
ReactNativeClient/lib/services/plugins/api/JoplinFilters.js
|
||||||
|
ReactNativeClient/lib/services/plugins/api/JoplinInterop.js
|
||||||
|
ReactNativeClient/lib/services/plugins/api/JoplinPlugins.js
|
||||||
|
ReactNativeClient/lib/services/plugins/api/JoplinSettings.js
|
||||||
|
ReactNativeClient/lib/services/plugins/api/JoplinViews.js
|
||||||
|
ReactNativeClient/lib/services/plugins/api/JoplinViewsDialogs.js
|
||||||
|
ReactNativeClient/lib/services/plugins/api/JoplinViewsMenuItems.js
|
||||||
|
ReactNativeClient/lib/services/plugins/api/JoplinViewsMenus.js
|
||||||
|
ReactNativeClient/lib/services/plugins/api/JoplinViewsPanels.js
|
||||||
|
ReactNativeClient/lib/services/plugins/api/JoplinViewsToolbarButtons.js
|
||||||
|
ReactNativeClient/lib/services/plugins/api/JoplinWorkspace.js
|
||||||
|
ReactNativeClient/lib/services/plugins/api/types.js
|
||||||
|
ReactNativeClient/lib/services/plugins/BasePluginRunner.js
|
||||||
|
ReactNativeClient/lib/services/plugins/MenuController.js
|
||||||
|
ReactNativeClient/lib/services/plugins/MenuItemController.js
|
||||||
|
ReactNativeClient/lib/services/plugins/Plugin.js
|
||||||
|
ReactNativeClient/lib/services/plugins/PluginService.js
|
||||||
|
ReactNativeClient/lib/services/plugins/reducer.js
|
||||||
|
ReactNativeClient/lib/services/plugins/sandboxProxy.js
|
||||||
|
ReactNativeClient/lib/services/plugins/ToolbarButtonController.js
|
||||||
|
ReactNativeClient/lib/services/plugins/utils/contentScriptsToRendererRules.js
|
||||||
|
ReactNativeClient/lib/services/plugins/utils/createViewHandle.js
|
||||||
|
ReactNativeClient/lib/services/plugins/utils/executeSandboxCall.js
|
||||||
|
ReactNativeClient/lib/services/plugins/utils/manifestFromObject.js
|
||||||
|
ReactNativeClient/lib/services/plugins/utils/mapEventHandlersToIds.js
|
||||||
|
ReactNativeClient/lib/services/plugins/utils/types.js
|
||||||
|
ReactNativeClient/lib/services/plugins/ViewController.js
|
||||||
|
ReactNativeClient/lib/services/plugins/WebviewController.js
|
||||||
|
ReactNativeClient/lib/services/ResourceEditWatcher/index.js
|
||||||
|
ReactNativeClient/lib/services/ResourceEditWatcher/reducer.js
|
||||||
|
ReactNativeClient/lib/services/rest/actionApi.desktop.js
|
||||||
|
ReactNativeClient/lib/services/rest/Api.js
|
||||||
|
ReactNativeClient/lib/services/rest/ApiResponse.js
|
||||||
|
ReactNativeClient/lib/services/rest/routes/folders.js
|
||||||
|
ReactNativeClient/lib/services/rest/routes/master_keys.js
|
||||||
|
ReactNativeClient/lib/services/rest/routes/notes.js
|
||||||
|
ReactNativeClient/lib/services/rest/routes/ping.js
|
||||||
|
ReactNativeClient/lib/services/rest/routes/resources.js
|
||||||
|
ReactNativeClient/lib/services/rest/routes/search.js
|
||||||
|
ReactNativeClient/lib/services/rest/routes/tags.js
|
||||||
|
ReactNativeClient/lib/services/rest/utils/defaultAction.js
|
||||||
|
ReactNativeClient/lib/services/rest/utils/defaultLoadOptions.js
|
||||||
|
ReactNativeClient/lib/services/rest/utils/defaultSaveOptions.js
|
||||||
|
ReactNativeClient/lib/services/rest/utils/errors.js
|
||||||
|
ReactNativeClient/lib/services/rest/utils/paginatedResults.js
|
||||||
|
ReactNativeClient/lib/services/rest/utils/readonlyProperties.js
|
||||||
|
ReactNativeClient/lib/services/rest/utils/requestFields.js
|
||||||
|
ReactNativeClient/lib/services/rest/utils/requestPaginationOptions.js
|
||||||
|
ReactNativeClient/lib/services/searchengine/filterParser.js
|
||||||
|
ReactNativeClient/lib/services/searchengine/queryBuilder.js
|
||||||
|
ReactNativeClient/lib/services/SettingUtils.js
|
||||||
|
ReactNativeClient/lib/services/spellChecker/SpellCheckerService.js
|
||||||
|
ReactNativeClient/lib/services/spellChecker/SpellCheckerServiceDriverBase.js
|
||||||
|
ReactNativeClient/lib/services/synchronizer/gui/useSyncTargetUpgrade.js
|
||||||
|
ReactNativeClient/lib/services/synchronizer/LockHandler.js
|
||||||
|
ReactNativeClient/lib/services/synchronizer/MigrationHandler.js
|
||||||
|
ReactNativeClient/lib/services/synchronizer/migrations/1.js
|
||||||
|
ReactNativeClient/lib/services/synchronizer/migrations/2.js
|
||||||
|
ReactNativeClient/lib/services/synchronizer/utils/types.js
|
||||||
|
ReactNativeClient/lib/services/UndoRedoService.js
|
||||||
|
ReactNativeClient/lib/services/WhenClause.js
|
||||||
|
ReactNativeClient/lib/ShareExtension.js
|
||||||
|
ReactNativeClient/lib/shareHandler.js
|
||||||
|
ReactNativeClient/lib/shim.js
|
||||||
|
ReactNativeClient/lib/Synchronizer.js
|
||||||
|
ReactNativeClient/lib/theme.js
|
||||||
|
ReactNativeClient/lib/themes/aritimDark.js
|
||||||
|
ReactNativeClient/lib/themes/dark.js
|
||||||
|
ReactNativeClient/lib/themes/dracula.js
|
||||||
|
ReactNativeClient/lib/themes/light.js
|
||||||
|
ReactNativeClient/lib/themes/nord.js
|
||||||
|
ReactNativeClient/lib/themes/oledDark.js
|
||||||
|
ReactNativeClient/lib/themes/solarizedDark.js
|
||||||
|
ReactNativeClient/lib/themes/solarizedLight.js
|
||||||
|
ReactNativeClient/lib/themes/type.js
|
||||||
|
ReactNativeClient/lib/time.js
|
||||||
|
ReactNativeClient/lib/uuid.js
|
||||||
|
ReactNativeClient/lib/versionInfo.js
|
||||||
ReactNativeClient/PluginAssetsLoader.js
|
ReactNativeClient/PluginAssetsLoader.js
|
||||||
ReactNativeClient/setUpQuickActions.js
|
ReactNativeClient/setUpQuickActions.js
|
||||||
# AUTO-GENERATED - EXCLUDED TYPESCRIPT BUILD
|
# AUTO-GENERATED - EXCLUDED TYPESCRIPT BUILD
|
||||||
|
327
.ignore
Normal file
@@ -0,0 +1,327 @@
|
|||||||
|
# This is used by VSCode to ignore patterns during search.
|
||||||
|
# Before they were in joplin.code-workspace, under the `files.exclude` key
|
||||||
|
# but it eventually reached the limit with ENAMETOOLONG error.
|
||||||
|
#
|
||||||
|
# https://github.com/microsoft/vscode/issues/94718
|
||||||
|
|
||||||
|
# AUTO-GENERATED - EXCLUDED TYPESCRIPT BUILD
|
||||||
|
CliClient/app/LinkSelector.js
|
||||||
|
CliClient/app/services/plugins/PluginRunner.js
|
||||||
|
CliClient/tests/fsDriver.js
|
||||||
|
CliClient/tests/InMemoryCache.js
|
||||||
|
CliClient/tests/MdToHtml.js
|
||||||
|
CliClient/tests/models_Setting.js
|
||||||
|
CliClient/tests/services_CommandService.js
|
||||||
|
CliClient/tests/services_InteropService.js
|
||||||
|
CliClient/tests/services_keychainService.js
|
||||||
|
CliClient/tests/services_PluginService.js
|
||||||
|
CliClient/tests/services_rest_Api.js
|
||||||
|
CliClient/tests/services/plugins/api/JoplinSetting.js
|
||||||
|
CliClient/tests/services/plugins/sandboxProxy.js
|
||||||
|
CliClient/tests/synchronizer_LockHandler.js
|
||||||
|
CliClient/tests/synchronizer_MigrationHandler.js
|
||||||
|
ElectronClient/app.js
|
||||||
|
ElectronClient/bridge.js
|
||||||
|
ElectronClient/commands/copyDevCommand.js
|
||||||
|
ElectronClient/commands/focusElement.js
|
||||||
|
ElectronClient/commands/openProfileDirectory.js
|
||||||
|
ElectronClient/commands/startExternalEditing.js
|
||||||
|
ElectronClient/commands/stopExternalEditing.js
|
||||||
|
ElectronClient/commands/toggleExternalEditing.js
|
||||||
|
ElectronClient/ElectronAppWrapper.js
|
||||||
|
ElectronClient/global.d.js
|
||||||
|
ElectronClient/gui/Button/Button.js
|
||||||
|
ElectronClient/gui/ConfigScreen/ButtonBar.js
|
||||||
|
ElectronClient/gui/ConfigScreen/ConfigScreen.js
|
||||||
|
ElectronClient/gui/ConfigScreen/SideBar.js
|
||||||
|
ElectronClient/gui/DropboxLoginScreen.js
|
||||||
|
ElectronClient/gui/ErrorBoundary.js
|
||||||
|
ElectronClient/gui/KeymapConfig/KeymapConfigScreen.js
|
||||||
|
ElectronClient/gui/KeymapConfig/ShortcutRecorder.js
|
||||||
|
ElectronClient/gui/KeymapConfig/styles/index.js
|
||||||
|
ElectronClient/gui/KeymapConfig/utils/getLabel.js
|
||||||
|
ElectronClient/gui/KeymapConfig/utils/useCommandStatus.js
|
||||||
|
ElectronClient/gui/KeymapConfig/utils/useKeymap.js
|
||||||
|
ElectronClient/gui/MainScreen/commands/editAlarm.js
|
||||||
|
ElectronClient/gui/MainScreen/commands/exportPdf.js
|
||||||
|
ElectronClient/gui/MainScreen/commands/hideModalMessage.js
|
||||||
|
ElectronClient/gui/MainScreen/commands/moveToFolder.js
|
||||||
|
ElectronClient/gui/MainScreen/commands/newFolder.js
|
||||||
|
ElectronClient/gui/MainScreen/commands/newNote.js
|
||||||
|
ElectronClient/gui/MainScreen/commands/newSubFolder.js
|
||||||
|
ElectronClient/gui/MainScreen/commands/newTodo.js
|
||||||
|
ElectronClient/gui/MainScreen/commands/openFolder.js
|
||||||
|
ElectronClient/gui/MainScreen/commands/openNote.js
|
||||||
|
ElectronClient/gui/MainScreen/commands/openTag.js
|
||||||
|
ElectronClient/gui/MainScreen/commands/print.js
|
||||||
|
ElectronClient/gui/MainScreen/commands/renameFolder.js
|
||||||
|
ElectronClient/gui/MainScreen/commands/renameTag.js
|
||||||
|
ElectronClient/gui/MainScreen/commands/search.js
|
||||||
|
ElectronClient/gui/MainScreen/commands/selectTemplate.js
|
||||||
|
ElectronClient/gui/MainScreen/commands/setTags.js
|
||||||
|
ElectronClient/gui/MainScreen/commands/showModalMessage.js
|
||||||
|
ElectronClient/gui/MainScreen/commands/showNoteContentProperties.js
|
||||||
|
ElectronClient/gui/MainScreen/commands/showNoteProperties.js
|
||||||
|
ElectronClient/gui/MainScreen/commands/showShareNoteDialog.js
|
||||||
|
ElectronClient/gui/MainScreen/commands/toggleEditors.js
|
||||||
|
ElectronClient/gui/MainScreen/commands/toggleNoteList.js
|
||||||
|
ElectronClient/gui/MainScreen/commands/toggleSideBar.js
|
||||||
|
ElectronClient/gui/MainScreen/commands/toggleVisiblePanes.js
|
||||||
|
ElectronClient/gui/MainScreen/MainScreen.js
|
||||||
|
ElectronClient/gui/MenuBar.js
|
||||||
|
ElectronClient/gui/menuCommandNames.js
|
||||||
|
ElectronClient/gui/MultiNoteActions.js
|
||||||
|
ElectronClient/gui/NoteContentPropertiesDialog.js
|
||||||
|
ElectronClient/gui/NoteEditor/commands/editorCommandDeclarations.js
|
||||||
|
ElectronClient/gui/NoteEditor/commands/focusElementNoteBody.js
|
||||||
|
ElectronClient/gui/NoteEditor/commands/focusElementNoteTitle.js
|
||||||
|
ElectronClient/gui/NoteEditor/commands/showLocalSearch.js
|
||||||
|
ElectronClient/gui/NoteEditor/commands/showRevisions.js
|
||||||
|
ElectronClient/gui/NoteEditor/NoteBody/CodeMirror/CodeMirror.js
|
||||||
|
ElectronClient/gui/NoteEditor/NoteBody/CodeMirror/Editor.js
|
||||||
|
ElectronClient/gui/NoteEditor/NoteBody/CodeMirror/styles/index.js
|
||||||
|
ElectronClient/gui/NoteEditor/NoteBody/CodeMirror/Toolbar.js
|
||||||
|
ElectronClient/gui/NoteEditor/NoteBody/CodeMirror/utils/index.js
|
||||||
|
ElectronClient/gui/NoteEditor/NoteBody/CodeMirror/utils/types.js
|
||||||
|
ElectronClient/gui/NoteEditor/NoteBody/CodeMirror/utils/useCursorUtils.js
|
||||||
|
ElectronClient/gui/NoteEditor/NoteBody/CodeMirror/utils/useEditorSearch.js
|
||||||
|
ElectronClient/gui/NoteEditor/NoteBody/CodeMirror/utils/useJoplinMode.js
|
||||||
|
ElectronClient/gui/NoteEditor/NoteBody/CodeMirror/utils/useKeymap.js
|
||||||
|
ElectronClient/gui/NoteEditor/NoteBody/CodeMirror/utils/useLineSorting.js
|
||||||
|
ElectronClient/gui/NoteEditor/NoteBody/CodeMirror/utils/useListIdent.js
|
||||||
|
ElectronClient/gui/NoteEditor/NoteBody/CodeMirror/utils/useScrollUtils.js
|
||||||
|
ElectronClient/gui/NoteEditor/NoteBody/TinyMCE/styles/index.js
|
||||||
|
ElectronClient/gui/NoteEditor/NoteBody/TinyMCE/TinyMCE.js
|
||||||
|
ElectronClient/gui/NoteEditor/NoteBody/TinyMCE/utils/setupContextMenu.js
|
||||||
|
ElectronClient/gui/NoteEditor/NoteBody/TinyMCE/utils/useScroll.js
|
||||||
|
ElectronClient/gui/NoteEditor/NoteEditor.js
|
||||||
|
ElectronClient/gui/NoteEditor/NoteTitle/NoteTitleBar.js
|
||||||
|
ElectronClient/gui/NoteEditor/styles/index.js
|
||||||
|
ElectronClient/gui/NoteEditor/utils/contextMenu.js
|
||||||
|
ElectronClient/gui/NoteEditor/utils/index.js
|
||||||
|
ElectronClient/gui/NoteEditor/utils/resourceHandling.js
|
||||||
|
ElectronClient/gui/NoteEditor/utils/types.js
|
||||||
|
ElectronClient/gui/NoteEditor/utils/useDropHandler.js
|
||||||
|
ElectronClient/gui/NoteEditor/utils/useFolder.js
|
||||||
|
ElectronClient/gui/NoteEditor/utils/useFormNote.js
|
||||||
|
ElectronClient/gui/NoteEditor/utils/useMarkupToHtml.js
|
||||||
|
ElectronClient/gui/NoteEditor/utils/useMessageHandler.js
|
||||||
|
ElectronClient/gui/NoteEditor/utils/useNoteSearchBar.js
|
||||||
|
ElectronClient/gui/NoteEditor/utils/usePluginServiceRegistration.js
|
||||||
|
ElectronClient/gui/NoteEditor/utils/useSearchMarkers.js
|
||||||
|
ElectronClient/gui/NoteEditor/utils/useWindowCommandHandler.js
|
||||||
|
ElectronClient/gui/NoteList/commands/focusElementNoteList.js
|
||||||
|
ElectronClient/gui/NoteList/NoteList.js
|
||||||
|
ElectronClient/gui/NoteListControls/commands/focusSearch.js
|
||||||
|
ElectronClient/gui/NoteListControls/NoteListControls.js
|
||||||
|
ElectronClient/gui/NoteListItem.js
|
||||||
|
ElectronClient/gui/NoteTextViewer.js
|
||||||
|
ElectronClient/gui/NoteToolbar/NoteToolbar.js
|
||||||
|
ElectronClient/gui/OneDriveLoginScreen.js
|
||||||
|
ElectronClient/gui/ResizableLayout/hooks/useLayoutItemSizes.js
|
||||||
|
ElectronClient/gui/ResizableLayout/hooks/useWindowResizeEvent.js
|
||||||
|
ElectronClient/gui/ResizableLayout/ResizableLayout.js
|
||||||
|
ElectronClient/gui/ResourceScreen.js
|
||||||
|
ElectronClient/gui/Root_UpgradeSyncTarget.js
|
||||||
|
ElectronClient/gui/Root.js
|
||||||
|
ElectronClient/gui/SearchBar/hooks/useSearch.js
|
||||||
|
ElectronClient/gui/SearchBar/SearchBar.js
|
||||||
|
ElectronClient/gui/SearchBar/styles/index.js
|
||||||
|
ElectronClient/gui/ShareNoteDialog.js
|
||||||
|
ElectronClient/gui/SideBar/commands/focusElementSideBar.js
|
||||||
|
ElectronClient/gui/SideBar/SideBar.js
|
||||||
|
ElectronClient/gui/SideBar/styles/index.js
|
||||||
|
ElectronClient/gui/StatusScreen/StatusScreen.js
|
||||||
|
ElectronClient/gui/style/StyledInput.js
|
||||||
|
ElectronClient/gui/style/StyledTextInput.js
|
||||||
|
ElectronClient/gui/TagList.js
|
||||||
|
ElectronClient/gui/ToggleEditorsButton/styles/index.js
|
||||||
|
ElectronClient/gui/ToggleEditorsButton/ToggleEditorsButton.js
|
||||||
|
ElectronClient/gui/ToolbarBase.js
|
||||||
|
ElectronClient/gui/ToolbarButton/styles/index.js
|
||||||
|
ElectronClient/gui/ToolbarButton/ToolbarButton.js
|
||||||
|
ElectronClient/gui/utils/NoteListUtils.js
|
||||||
|
ElectronClient/InteropServiceHelper.js
|
||||||
|
ElectronClient/plugins/GotoAnything.js
|
||||||
|
ElectronClient/services/bridge.js
|
||||||
|
ElectronClient/services/commands/types.js
|
||||||
|
ElectronClient/services/plugins/hooks/useThemeCss.js
|
||||||
|
ElectronClient/services/plugins/hooks/useViewIsReady.js
|
||||||
|
ElectronClient/services/plugins/PlatformImplementation.js
|
||||||
|
ElectronClient/services/plugins/PluginRunner.js
|
||||||
|
ElectronClient/services/plugins/UserWebview.js
|
||||||
|
ElectronClient/services/plugins/UserWebviewDialog.js
|
||||||
|
ElectronClient/services/plugins/UserWebviewDialogButtonBar.js
|
||||||
|
ElectronClient/services/spellChecker/SpellCheckerServiceDriverNative.js
|
||||||
|
ReactNativeClient/lib/AsyncActionQueue.js
|
||||||
|
ReactNativeClient/lib/BaseApplication.js
|
||||||
|
ReactNativeClient/lib/BaseModel.js
|
||||||
|
ReactNativeClient/lib/checkPermissions.js
|
||||||
|
ReactNativeClient/lib/commands/historyBackward.js
|
||||||
|
ReactNativeClient/lib/commands/historyForward.js
|
||||||
|
ReactNativeClient/lib/commands/synchronize.js
|
||||||
|
ReactNativeClient/lib/components/BackButtonDialogBox.js
|
||||||
|
ReactNativeClient/lib/components/CameraView.js
|
||||||
|
ReactNativeClient/lib/components/NoteBodyViewer/hooks/useOnMessage.js
|
||||||
|
ReactNativeClient/lib/components/NoteBodyViewer/hooks/useOnResourceLongPress.js
|
||||||
|
ReactNativeClient/lib/components/NoteBodyViewer/hooks/useSource.js
|
||||||
|
ReactNativeClient/lib/components/NoteBodyViewer/NoteBodyViewer.js
|
||||||
|
ReactNativeClient/lib/components/screens/Note.js
|
||||||
|
ReactNativeClient/lib/components/screens/UpgradeSyncTargetScreen.js
|
||||||
|
ReactNativeClient/lib/components/SelectDateTimeDialog.js
|
||||||
|
ReactNativeClient/lib/errorUtils.js
|
||||||
|
ReactNativeClient/lib/eventManager.js
|
||||||
|
ReactNativeClient/lib/fs-driver-node.js
|
||||||
|
ReactNativeClient/lib/hooks/useEffectDebugger.js
|
||||||
|
ReactNativeClient/lib/hooks/useImperativeHandlerDebugger.js
|
||||||
|
ReactNativeClient/lib/hooks/usePrevious.js
|
||||||
|
ReactNativeClient/lib/hooks/usePropsDebugger.js
|
||||||
|
ReactNativeClient/lib/InMemoryCache.js
|
||||||
|
ReactNativeClient/lib/joplin-renderer/MarkupToHtml.js
|
||||||
|
ReactNativeClient/lib/joplin-renderer/MdToHtml.js
|
||||||
|
ReactNativeClient/lib/joplin-renderer/MdToHtml/rules/checkbox.js
|
||||||
|
ReactNativeClient/lib/joplin-renderer/MdToHtml/rules/code_inline.js
|
||||||
|
ReactNativeClient/lib/joplin-renderer/MdToHtml/rules/fence.js
|
||||||
|
ReactNativeClient/lib/joplin-renderer/MdToHtml/rules/fountain.js
|
||||||
|
ReactNativeClient/lib/joplin-renderer/MdToHtml/rules/highlight_keywords.js
|
||||||
|
ReactNativeClient/lib/joplin-renderer/MdToHtml/rules/html_image.js
|
||||||
|
ReactNativeClient/lib/joplin-renderer/MdToHtml/rules/image.js
|
||||||
|
ReactNativeClient/lib/joplin-renderer/MdToHtml/rules/katex.js
|
||||||
|
ReactNativeClient/lib/joplin-renderer/MdToHtml/rules/link_open.js
|
||||||
|
ReactNativeClient/lib/joplin-renderer/MdToHtml/rules/mermaid.js
|
||||||
|
ReactNativeClient/lib/joplin-renderer/MdToHtml/rules/sanitize_html.js
|
||||||
|
ReactNativeClient/lib/joplin-renderer/noteStyle.js
|
||||||
|
ReactNativeClient/lib/joplin-renderer/pathUtils.js
|
||||||
|
ReactNativeClient/lib/JoplinServerApi.js
|
||||||
|
ReactNativeClient/lib/locale.js
|
||||||
|
ReactNativeClient/lib/Logger.js
|
||||||
|
ReactNativeClient/lib/markdownUtils.js
|
||||||
|
ReactNativeClient/lib/markupLanguageUtils.js
|
||||||
|
ReactNativeClient/lib/models/Alarm.js
|
||||||
|
ReactNativeClient/lib/models/Setting.js
|
||||||
|
ReactNativeClient/lib/models/utils/modelFeed.js
|
||||||
|
ReactNativeClient/lib/models/utils/paginationToSql.js
|
||||||
|
ReactNativeClient/lib/models/utils/types.js
|
||||||
|
ReactNativeClient/lib/ntpDate.js
|
||||||
|
ReactNativeClient/lib/path-utils.js
|
||||||
|
ReactNativeClient/lib/PoorManIntervals.js
|
||||||
|
ReactNativeClient/lib/reducer.js
|
||||||
|
ReactNativeClient/lib/services/AlarmService.js
|
||||||
|
ReactNativeClient/lib/services/AlarmServiceDriver.android.js
|
||||||
|
ReactNativeClient/lib/services/AlarmServiceDriver.ios.js
|
||||||
|
ReactNativeClient/lib/services/AlarmServiceDriverNode.js
|
||||||
|
ReactNativeClient/lib/services/BaseService.js
|
||||||
|
ReactNativeClient/lib/services/commands/commandsToMarkdownTable.js
|
||||||
|
ReactNativeClient/lib/services/commands/MenuUtils.js
|
||||||
|
ReactNativeClient/lib/services/commands/propsHaveChanged.js
|
||||||
|
ReactNativeClient/lib/services/commands/stateToWhenClauseContext.js
|
||||||
|
ReactNativeClient/lib/services/commands/ToolbarButtonUtils.js
|
||||||
|
ReactNativeClient/lib/services/CommandService.js
|
||||||
|
ReactNativeClient/lib/services/contextkey/contextkey.js
|
||||||
|
ReactNativeClient/lib/services/debug/populateDatabase.js
|
||||||
|
ReactNativeClient/lib/services/interop/InteropService_Exporter_Base.js
|
||||||
|
ReactNativeClient/lib/services/interop/InteropService_Exporter_Custom.js
|
||||||
|
ReactNativeClient/lib/services/interop/InteropService_Exporter_Html.js
|
||||||
|
ReactNativeClient/lib/services/interop/InteropService_Exporter_Jex.js
|
||||||
|
ReactNativeClient/lib/services/interop/InteropService_Exporter_Md.js
|
||||||
|
ReactNativeClient/lib/services/interop/InteropService_Exporter_Raw.js
|
||||||
|
ReactNativeClient/lib/services/interop/InteropService_Importer_Base.js
|
||||||
|
ReactNativeClient/lib/services/interop/InteropService_Importer_Custom.js
|
||||||
|
ReactNativeClient/lib/services/interop/InteropService_Importer_EnexToHtml.js
|
||||||
|
ReactNativeClient/lib/services/interop/InteropService_Importer_EnexToMd.js
|
||||||
|
ReactNativeClient/lib/services/interop/InteropService_Importer_Jex.js
|
||||||
|
ReactNativeClient/lib/services/interop/InteropService_Importer_Md.js
|
||||||
|
ReactNativeClient/lib/services/interop/InteropService_Importer_Raw.js
|
||||||
|
ReactNativeClient/lib/services/interop/InteropService.js
|
||||||
|
ReactNativeClient/lib/services/interop/types.js
|
||||||
|
ReactNativeClient/lib/services/keychain/KeychainService.js
|
||||||
|
ReactNativeClient/lib/services/keychain/KeychainServiceDriver.dummy.js
|
||||||
|
ReactNativeClient/lib/services/keychain/KeychainServiceDriver.mobile.js
|
||||||
|
ReactNativeClient/lib/services/keychain/KeychainServiceDriver.node.js
|
||||||
|
ReactNativeClient/lib/services/keychain/KeychainServiceDriverBase.js
|
||||||
|
ReactNativeClient/lib/services/KeymapService.js
|
||||||
|
ReactNativeClient/lib/services/plugins/api/Global.js
|
||||||
|
ReactNativeClient/lib/services/plugins/api/Joplin.js
|
||||||
|
ReactNativeClient/lib/services/plugins/api/JoplinCommands.js
|
||||||
|
ReactNativeClient/lib/services/plugins/api/JoplinData.js
|
||||||
|
ReactNativeClient/lib/services/plugins/api/JoplinFilters.js
|
||||||
|
ReactNativeClient/lib/services/plugins/api/JoplinInterop.js
|
||||||
|
ReactNativeClient/lib/services/plugins/api/JoplinPlugins.js
|
||||||
|
ReactNativeClient/lib/services/plugins/api/JoplinSettings.js
|
||||||
|
ReactNativeClient/lib/services/plugins/api/JoplinViews.js
|
||||||
|
ReactNativeClient/lib/services/plugins/api/JoplinViewsDialogs.js
|
||||||
|
ReactNativeClient/lib/services/plugins/api/JoplinViewsMenuItems.js
|
||||||
|
ReactNativeClient/lib/services/plugins/api/JoplinViewsMenus.js
|
||||||
|
ReactNativeClient/lib/services/plugins/api/JoplinViewsPanels.js
|
||||||
|
ReactNativeClient/lib/services/plugins/api/JoplinViewsToolbarButtons.js
|
||||||
|
ReactNativeClient/lib/services/plugins/api/JoplinWorkspace.js
|
||||||
|
ReactNativeClient/lib/services/plugins/api/types.js
|
||||||
|
ReactNativeClient/lib/services/plugins/BasePluginRunner.js
|
||||||
|
ReactNativeClient/lib/services/plugins/MenuController.js
|
||||||
|
ReactNativeClient/lib/services/plugins/MenuItemController.js
|
||||||
|
ReactNativeClient/lib/services/plugins/Plugin.js
|
||||||
|
ReactNativeClient/lib/services/plugins/PluginService.js
|
||||||
|
ReactNativeClient/lib/services/plugins/reducer.js
|
||||||
|
ReactNativeClient/lib/services/plugins/sandboxProxy.js
|
||||||
|
ReactNativeClient/lib/services/plugins/ToolbarButtonController.js
|
||||||
|
ReactNativeClient/lib/services/plugins/utils/contentScriptsToRendererRules.js
|
||||||
|
ReactNativeClient/lib/services/plugins/utils/createViewHandle.js
|
||||||
|
ReactNativeClient/lib/services/plugins/utils/executeSandboxCall.js
|
||||||
|
ReactNativeClient/lib/services/plugins/utils/manifestFromObject.js
|
||||||
|
ReactNativeClient/lib/services/plugins/utils/mapEventHandlersToIds.js
|
||||||
|
ReactNativeClient/lib/services/plugins/utils/types.js
|
||||||
|
ReactNativeClient/lib/services/plugins/ViewController.js
|
||||||
|
ReactNativeClient/lib/services/plugins/WebviewController.js
|
||||||
|
ReactNativeClient/lib/services/ResourceEditWatcher/index.js
|
||||||
|
ReactNativeClient/lib/services/ResourceEditWatcher/reducer.js
|
||||||
|
ReactNativeClient/lib/services/rest/actionApi.desktop.js
|
||||||
|
ReactNativeClient/lib/services/rest/Api.js
|
||||||
|
ReactNativeClient/lib/services/rest/ApiResponse.js
|
||||||
|
ReactNativeClient/lib/services/rest/routes/folders.js
|
||||||
|
ReactNativeClient/lib/services/rest/routes/master_keys.js
|
||||||
|
ReactNativeClient/lib/services/rest/routes/notes.js
|
||||||
|
ReactNativeClient/lib/services/rest/routes/ping.js
|
||||||
|
ReactNativeClient/lib/services/rest/routes/resources.js
|
||||||
|
ReactNativeClient/lib/services/rest/routes/search.js
|
||||||
|
ReactNativeClient/lib/services/rest/routes/tags.js
|
||||||
|
ReactNativeClient/lib/services/rest/utils/defaultAction.js
|
||||||
|
ReactNativeClient/lib/services/rest/utils/defaultLoadOptions.js
|
||||||
|
ReactNativeClient/lib/services/rest/utils/defaultSaveOptions.js
|
||||||
|
ReactNativeClient/lib/services/rest/utils/errors.js
|
||||||
|
ReactNativeClient/lib/services/rest/utils/paginatedResults.js
|
||||||
|
ReactNativeClient/lib/services/rest/utils/readonlyProperties.js
|
||||||
|
ReactNativeClient/lib/services/rest/utils/requestFields.js
|
||||||
|
ReactNativeClient/lib/services/rest/utils/requestPaginationOptions.js
|
||||||
|
ReactNativeClient/lib/services/searchengine/filterParser.js
|
||||||
|
ReactNativeClient/lib/services/searchengine/queryBuilder.js
|
||||||
|
ReactNativeClient/lib/services/SettingUtils.js
|
||||||
|
ReactNativeClient/lib/services/spellChecker/SpellCheckerService.js
|
||||||
|
ReactNativeClient/lib/services/spellChecker/SpellCheckerServiceDriverBase.js
|
||||||
|
ReactNativeClient/lib/services/synchronizer/gui/useSyncTargetUpgrade.js
|
||||||
|
ReactNativeClient/lib/services/synchronizer/LockHandler.js
|
||||||
|
ReactNativeClient/lib/services/synchronizer/MigrationHandler.js
|
||||||
|
ReactNativeClient/lib/services/synchronizer/migrations/1.js
|
||||||
|
ReactNativeClient/lib/services/synchronizer/migrations/2.js
|
||||||
|
ReactNativeClient/lib/services/synchronizer/utils/types.js
|
||||||
|
ReactNativeClient/lib/services/UndoRedoService.js
|
||||||
|
ReactNativeClient/lib/services/WhenClause.js
|
||||||
|
ReactNativeClient/lib/ShareExtension.js
|
||||||
|
ReactNativeClient/lib/shareHandler.js
|
||||||
|
ReactNativeClient/lib/shim.js
|
||||||
|
ReactNativeClient/lib/Synchronizer.js
|
||||||
|
ReactNativeClient/lib/theme.js
|
||||||
|
ReactNativeClient/lib/themes/aritimDark.js
|
||||||
|
ReactNativeClient/lib/themes/dark.js
|
||||||
|
ReactNativeClient/lib/themes/dracula.js
|
||||||
|
ReactNativeClient/lib/themes/light.js
|
||||||
|
ReactNativeClient/lib/themes/nord.js
|
||||||
|
ReactNativeClient/lib/themes/oledDark.js
|
||||||
|
ReactNativeClient/lib/themes/solarizedDark.js
|
||||||
|
ReactNativeClient/lib/themes/solarizedLight.js
|
||||||
|
ReactNativeClient/lib/themes/type.js
|
||||||
|
ReactNativeClient/lib/time.js
|
||||||
|
ReactNativeClient/lib/uuid.js
|
||||||
|
ReactNativeClient/lib/versionInfo.js
|
||||||
|
ReactNativeClient/PluginAssetsLoader.js
|
||||||
|
ReactNativeClient/setUpQuickActions.js
|
||||||
|
# AUTO-GENERATED - EXCLUDED TYPESCRIPT BUILD
|
12
.travis.yml
@@ -9,6 +9,7 @@ rvm: 2.3.3
|
|||||||
branches:
|
branches:
|
||||||
only:
|
only:
|
||||||
- master
|
- master
|
||||||
|
- dev
|
||||||
- /^v\d+\.\d+(\.\d+)?(-\S*)?$/
|
- /^v\d+\.\d+(\.\d+)?(-\S*)?$/
|
||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
@@ -16,7 +17,7 @@ matrix:
|
|||||||
- os: osx
|
- os: osx
|
||||||
osx_image: xcode9.0
|
osx_image: xcode9.0
|
||||||
language: node_js
|
language: node_js
|
||||||
node_js: "8"
|
node_js: "10"
|
||||||
env:
|
env:
|
||||||
- ELECTRON_CACHE=$HOME/.cache/electron
|
- ELECTRON_CACHE=$HOME/.cache/electron
|
||||||
- ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder
|
- ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder
|
||||||
@@ -25,7 +26,7 @@ matrix:
|
|||||||
sudo: required
|
sudo: required
|
||||||
dist: trusty
|
dist: trusty
|
||||||
language: node_js
|
language: node_js
|
||||||
node_js: "8"
|
node_js: "10"
|
||||||
env:
|
env:
|
||||||
- ELECTRON_CACHE=$HOME/.cache/electron
|
- ELECTRON_CACHE=$HOME/.cache/electron
|
||||||
- ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder
|
- ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder
|
||||||
@@ -42,6 +43,8 @@ before_install:
|
|||||||
|
|
||||||
# Silence apt-get update errors (for example when a module doesn't exist) since
|
# Silence apt-get update errors (for example when a module doesn't exist) since
|
||||||
# otherwise it will make the whole build fails, even though all we need is yarn.
|
# otherwise it will make the whole build fails, even though all we need is yarn.
|
||||||
|
|
||||||
|
# libsecret-1-dev is required for keytar - https://github.com/atom/node-keytar
|
||||||
- |
|
- |
|
||||||
if [ "$TRAVIS_OS_NAME" == "osx" ]; then
|
if [ "$TRAVIS_OS_NAME" == "osx" ]; then
|
||||||
HOMEBREW_NO_AUTO_UPDATE=1 brew install yarn
|
HOMEBREW_NO_AUTO_UPDATE=1 brew install yarn
|
||||||
@@ -51,6 +54,7 @@ before_install:
|
|||||||
sudo apt-get update || true
|
sudo apt-get update || true
|
||||||
sudo apt-get install -y yarn
|
sudo apt-get install -y yarn
|
||||||
sudo apt-get install -y gettext
|
sudo apt-get install -y gettext
|
||||||
|
sudo apt-get install -y libsecret-1-dev
|
||||||
fi
|
fi
|
||||||
|
|
||||||
script:
|
script:
|
||||||
@@ -66,7 +70,7 @@ script:
|
|||||||
# and that would break the desktop release.
|
# and that would break the desktop release.
|
||||||
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
|
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
|
||||||
cd CliClient
|
cd CliClient
|
||||||
npm run test
|
npm run test-ci
|
||||||
testResult=$?
|
testResult=$?
|
||||||
if [ $testResult -ne 0 ]; then
|
if [ $testResult -ne 0 ]; then
|
||||||
exit $testResult
|
exit $testResult
|
||||||
@@ -109,4 +113,4 @@ script:
|
|||||||
|
|
||||||
# Prepare the Electron app and build it
|
# Prepare the Electron app and build it
|
||||||
cd ElectronClient
|
cd ElectronClient
|
||||||
USE_HARD_LINKS=false yarn dist
|
USE_HARD_LINKS=false npm run dist
|
||||||
|
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 36 KiB |
BIN
Assets/ImageSources/RoundedCornersMac_1024x1024.png
Normal file
After Width: | Height: | Size: 59 KiB |
BIN
Assets/ImageSources/RoundedCorners_1024x1024.png
Normal file
After Width: | Height: | Size: 70 KiB |
BIN
Assets/ImageSources/RoundedCorners_16x16.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
Assets/ImageSources/RoundedCorners_64x64.png
Normal file
After Width: | Height: | Size: 4.2 KiB |
BIN
Assets/ImageSources/Square_1024x1024.png
Normal file
After Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 300 KiB After Width: | Height: | Size: 48 KiB |
109
Assets/SmallTile.svg
Normal file
@@ -0,0 +1,109 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
|
xmlns:cc="http://creativecommons.org/ns#"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
sodipodi:docname="disegno.svg"
|
||||||
|
inkscape:version="1.0rc1 (09960d6, 2020-04-09)"
|
||||||
|
id="svg8"
|
||||||
|
version="1.1"
|
||||||
|
viewBox="0 0 70 70"
|
||||||
|
height="70"
|
||||||
|
width="70">
|
||||||
|
<defs
|
||||||
|
id="defs2" />
|
||||||
|
<sodipodi:namedview
|
||||||
|
inkscape:window-maximized="0"
|
||||||
|
inkscape:window-y="25"
|
||||||
|
inkscape:window-x="0"
|
||||||
|
inkscape:window-height="775"
|
||||||
|
inkscape:window-width="1280"
|
||||||
|
inkscape:guide-bbox="true"
|
||||||
|
showguides="true"
|
||||||
|
inkscape:pagecheckerboard="true"
|
||||||
|
inkscape:showpageshadow="false"
|
||||||
|
showborder="true"
|
||||||
|
showgrid="false"
|
||||||
|
inkscape:document-rotation="0"
|
||||||
|
inkscape:current-layer="layer1"
|
||||||
|
inkscape:document-units="px"
|
||||||
|
inkscape:cy="39.253064"
|
||||||
|
inkscape:cx="25.246811"
|
||||||
|
inkscape:zoom="5.8562241"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
borderopacity="1.0"
|
||||||
|
bordercolor="#666666"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
id="base"
|
||||||
|
units="px">
|
||||||
|
<sodipodi:guide
|
||||||
|
inkscape:color="rgb(0,0,255)"
|
||||||
|
inkscape:locked="false"
|
||||||
|
inkscape:label=""
|
||||||
|
id="guide1932"
|
||||||
|
orientation="-1,0"
|
||||||
|
position="12,70" />
|
||||||
|
<sodipodi:guide
|
||||||
|
inkscape:color="rgb(0,0,255)"
|
||||||
|
inkscape:locked="false"
|
||||||
|
inkscape:label=""
|
||||||
|
id="guide1934"
|
||||||
|
orientation="-1,0"
|
||||||
|
position="58,70" />
|
||||||
|
<sodipodi:guide
|
||||||
|
inkscape:color="rgb(0,0,255)"
|
||||||
|
inkscape:locked="false"
|
||||||
|
inkscape:label=""
|
||||||
|
id="guide1936"
|
||||||
|
orientation="0,1"
|
||||||
|
position="0,58" />
|
||||||
|
<sodipodi:guide
|
||||||
|
inkscape:color="rgb(0,0,255)"
|
||||||
|
inkscape:locked="false"
|
||||||
|
inkscape:label=""
|
||||||
|
id="guide1938"
|
||||||
|
orientation="0,1"
|
||||||
|
position="0,12" />
|
||||||
|
<sodipodi:guide
|
||||||
|
inkscape:color="rgb(0,0,255)"
|
||||||
|
inkscape:locked="false"
|
||||||
|
inkscape:label=""
|
||||||
|
id="guide2021"
|
||||||
|
orientation="-1,0"
|
||||||
|
position="35,70" />
|
||||||
|
</sodipodi:namedview>
|
||||||
|
<metadata
|
||||||
|
id="metadata5">
|
||||||
|
<rdf:RDF>
|
||||||
|
<cc:Work
|
||||||
|
rdf:about="">
|
||||||
|
<dc:format>image/svg+xml</dc:format>
|
||||||
|
<dc:type
|
||||||
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||||
|
<dc:title></dc:title>
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<g
|
||||||
|
id="layer1"
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
inkscape:label="Livello 1">
|
||||||
|
<path
|
||||||
|
inkscape:transform-center-y="23.027731"
|
||||||
|
inkscape:transform-center-x="-17.510929"
|
||||||
|
id="path30"
|
||||||
|
style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.133334;stop-opacity:1"
|
||||||
|
d="M 52.1731,12 H 35.107236 c -0.161294,0 -0.291666,0.130494 -0.291666,0.291543 v 5.419239 c 0,0.182381 0.147678,0.330176 0.330178,0.330176 h 2.339824 c 0.94638,0 1.713811,0.727936 1.795988,1.652976 v 3.715485 2.069989 19.715998 0.139708 h -6.44e-4 c 0.0058,0.206545 -0.0023,0.409658 -0.02244,0.609702 -0.0023,0.02918 -0.0062,0.05801 -0.0097,0.08697 -0.01349,0.116897 -0.02846,0.233161 -0.05114,0.346981 -0.01243,0.06489 -0.02993,0.128044 -0.0455,0.191949 -0.02097,0.08499 -0.0379,0.171342 -0.06401,0.254505 -0.1543,0.493916 -0.39825,0.95202 -0.735666,1.355297 -0.01243,0.01438 -0.02771,0.02761 -0.03998,0.04182 -0.102908,0.119222 -0.210962,0.235367 -0.330548,0.34416 -0.120695,0.109778 -0.248492,0.211819 -0.382795,0.306628 -0.954719,0.676302 -2.23974,0.973854 -3.6755,0.836485 -1.830697,-0.172088 -3.646921,-1.002309 -5.114939,-2.337984 -1.467772,-1.335554 -2.380422,-2.988039 -2.569305,-4.653525 -0.169868,-1.489971 0.276578,-2.801116 1.256197,-3.692426 0.0027,-0.0019 0.005,-0.0037 0.0069,-0.0058 0.0379,-0.03398 0.0796,-0.06379 0.1186,-0.09654 0.701076,-0.58738 1.614951,-0.943313 2.657858,-1.041435 0.01172,-0.0011 0.02306,-0.003 0.03423,-0.0039 0.109777,-0.0097 0.221631,-0.01402 0.334471,-0.01827 0.05899,-0.0019 0.117251,-0.0062 0.177111,-0.0065 0.01986,-2.76e-4 0.03875,-0.0023 0.05864,-0.0023 0.03557,0 0.07248,0.0046 0.108055,0.0051 0.164347,0.0027 0.329933,0.0094 0.498825,0.02379 0.02134,0.0017 0.0417,9.78e-4 0.06365,0.003 0.01562,0.0016 0.03103,0.005 0.04662,0.0065 0.956682,0.09592 1.90392,0.381568 2.802834,0.814406 0.01876,8.39e-4 0.04047,0.0065 0.06759,0.02159 0.274004,0.151353 0.326498,-0.01101 0.334593,-0.118351 v -4.688237 -3.46883 c 0,-0.233653 -0.162519,-0.440321 -0.3904,-0.490484 -4.841795,-1.065597 -9.592336,0.04355 -12.944402,3.09499 -2.928307,2.663747 -4.344811,6.507647 -3.885849,10.545461 0.409535,3.596512 2.255685,7.05173 5.198956,9.730318 2.868698,2.609903 6.521262,4.242028 10.288996,4.596993 0.519184,0.04805 1.040822,0.07283 1.549826,0.07283 3.598351,0 6.937296,-1.233851 9.401735,-3.475688 2.33455,-2.125552 3.732902,-5.044294 3.938097,-8.219619 l 0.01901,-20.825138 h 0.0021 V 19.91155 h 7.7e-4 v -0.09714 c 0.02109,-0.982682 0.822378,-1.773296 1.81046,-1.773296 h 2.339824 c 0.182259,0 0.330177,-0.147802 0.330177,-0.330177 v -5.419299 c -2.1e-5,-0.161046 -0.130406,-0.291543 -0.291686,-0.291543"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
</g>
|
||||||
|
<inkscape:templateinfo>
|
||||||
|
<inkscape:name>SmallTile</inkscape:name>
|
||||||
|
<inkscape:shortdesc>Small tile</inkscape:shortdesc>
|
||||||
|
<inkscape:date>2020-04-15</inkscape:date>
|
||||||
|
</inkscape:templateinfo>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 5.4 KiB |
109
Assets/Square150x150Logo.svg
Normal file
@@ -0,0 +1,109 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
|
xmlns:cc="http://creativecommons.org/ns#"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
sodipodi:docname="disegno-1.svg"
|
||||||
|
inkscape:version="1.0rc1 (09960d6, 2020-04-09)"
|
||||||
|
id="svg8"
|
||||||
|
version="1.1"
|
||||||
|
viewBox="0 0 150 150"
|
||||||
|
height="150"
|
||||||
|
width="150">
|
||||||
|
<defs
|
||||||
|
id="defs2" />
|
||||||
|
<sodipodi:namedview
|
||||||
|
inkscape:window-maximized="0"
|
||||||
|
inkscape:window-y="25"
|
||||||
|
inkscape:window-x="0"
|
||||||
|
inkscape:window-height="775"
|
||||||
|
inkscape:window-width="1280"
|
||||||
|
inkscape:guide-bbox="true"
|
||||||
|
showguides="true"
|
||||||
|
inkscape:pagecheckerboard="true"
|
||||||
|
inkscape:showpageshadow="false"
|
||||||
|
showborder="true"
|
||||||
|
showgrid="false"
|
||||||
|
inkscape:document-rotation="0"
|
||||||
|
inkscape:current-layer="layer1"
|
||||||
|
inkscape:document-units="px"
|
||||||
|
inkscape:cy="79.075594"
|
||||||
|
inkscape:cx="91.835957"
|
||||||
|
inkscape:zoom="3.1892627"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
borderopacity="1.0"
|
||||||
|
bordercolor="#666666"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
id="base"
|
||||||
|
units="px">
|
||||||
|
<sodipodi:guide
|
||||||
|
inkscape:color="rgb(0,0,255)"
|
||||||
|
inkscape:locked="false"
|
||||||
|
inkscape:label=""
|
||||||
|
id="guide1919"
|
||||||
|
orientation="0,1"
|
||||||
|
position="0,115" />
|
||||||
|
<sodipodi:guide
|
||||||
|
inkscape:color="rgb(0,0,255)"
|
||||||
|
inkscape:locked="false"
|
||||||
|
inkscape:label=""
|
||||||
|
id="guide1921"
|
||||||
|
orientation="-1,0"
|
||||||
|
position="25,150" />
|
||||||
|
<sodipodi:guide
|
||||||
|
inkscape:color="rgb(0,0,255)"
|
||||||
|
inkscape:locked="false"
|
||||||
|
inkscape:label=""
|
||||||
|
id="guide1923"
|
||||||
|
orientation="-1,0"
|
||||||
|
position="125,150" />
|
||||||
|
<sodipodi:guide
|
||||||
|
inkscape:color="rgb(0,0,255)"
|
||||||
|
inkscape:locked="false"
|
||||||
|
inkscape:label=""
|
||||||
|
id="guide1925"
|
||||||
|
orientation="0,1"
|
||||||
|
position="0,35" />
|
||||||
|
<sodipodi:guide
|
||||||
|
inkscape:color="rgb(0,0,255)"
|
||||||
|
inkscape:locked="false"
|
||||||
|
inkscape:label=""
|
||||||
|
id="guide2879"
|
||||||
|
orientation="-1,0"
|
||||||
|
position="75,150" />
|
||||||
|
</sodipodi:namedview>
|
||||||
|
<metadata
|
||||||
|
id="metadata5">
|
||||||
|
<rdf:RDF>
|
||||||
|
<cc:Work
|
||||||
|
rdf:about="">
|
||||||
|
<dc:format>image/svg+xml</dc:format>
|
||||||
|
<dc:type
|
||||||
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||||
|
<dc:title></dc:title>
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<g
|
||||||
|
id="layer1"
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
inkscape:label="Livello 1">
|
||||||
|
<path
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
d="M 105.30102,35.000001 H 75.621261 c -0.280511,0 -0.507245,0.226946 -0.507245,0.507031 v 9.424762 c 0,0.317185 0.256831,0.574219 0.574223,0.574219 h 4.069258 c 1.645878,0 2.980541,1.265976 3.123457,2.874741 v 6.461712 3.599981 34.288687 0.24297 h -0.0011 c 0.01009,0.359209 -0.004,0.712449 -0.03903,1.060352 -0.004,0.05075 -0.01078,0.100887 -0.01687,0.151252 -0.02346,0.203299 -0.0495,0.405497 -0.08894,0.603445 -0.02162,0.112852 -0.05205,0.222685 -0.07913,0.333824 -0.03647,0.147809 -0.06591,0.297986 -0.111322,0.442618 -0.268348,0.858984 -0.692608,1.655686 -1.279419,2.357038 -0.02162,0.02501 -0.04819,0.04802 -0.06953,0.07273 -0.178971,0.207343 -0.366891,0.409334 -0.574866,0.598539 -0.209904,0.190918 -0.43216,0.368381 -0.66573,0.533266 -1.660381,1.176182 -3.8952,1.693662 -6.392174,1.454752 -3.18382,-0.29928 -6.34247,-1.743142 -8.895544,-4.066054 -2.552647,-2.322703 -4.139864,-5.196589 -4.468356,-8.093086 -0.295423,-2.591254 0.481005,-4.871506 2.18469,-6.42161 0.0047,-0.0033 0.0087,-0.0064 0.012,-0.01009 0.06591,-0.05909 0.138435,-0.110939 0.206261,-0.167895 1.219262,-1.021531 2.80861,-1.640544 4.622361,-1.811191 0.02038,-0.0019 0.0401,-0.0052 0.05953,-0.0068 0.190917,-0.01687 0.385445,-0.02438 0.581689,-0.03177 0.102591,-0.0033 0.203915,-0.01078 0.308019,-0.0113 0.03454,-4.8e-4 0.06739,-0.004 0.101982,-0.004 0.06186,0 0.126053,0.008 0.187922,0.0089 0.285821,0.0047 0.573797,0.01635 0.867522,0.04137 0.03711,0.003 0.07252,0.0017 0.110695,0.0052 0.02717,0.0028 0.05397,0.0087 0.08108,0.0113 1.663794,0.166817 3.311164,0.663596 4.874493,1.416358 0.03263,0.0015 0.07038,0.0113 0.117548,0.03755 0.476528,0.263222 0.567822,-0.01915 0.581901,-0.205828 V 73.11952 67.086773 c 0,-0.406353 -0.282642,-0.765776 -0.678957,-0.853016 -8.420512,-1.853212 -16.682323,0.07574 -22.512002,5.382591 -5.092707,4.632602 -7.556192,11.317645 -6.757997,18.339929 0.712234,6.254803 3.92293,12.263883 9.041661,16.922293 4.989039,4.53896 11.341325,7.37744 17.893905,7.99477 0.902929,0.0836 1.810125,0.12666 2.69535,0.12666 6.258001,0 12.064861,-2.14583 16.350841,-6.04467 4.060086,-3.69661 6.492006,-8.77269 6.848866,-14.294994 l 0.0331,-36.217627 h 0.004 v -9.683497 h 10e-4 v -0.16894 c 0.0367,-1.709012 1.43023,-3.083992 3.148627,-3.083992 h 4.06926 c 0.31697,0 0.57422,-0.257047 0.57422,-0.574221 v -9.424867 c -4e-5,-0.28008 -0.22679,-0.507031 -0.50728,-0.507031"
|
||||||
|
style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.133334;stop-opacity:1"
|
||||||
|
id="path30"
|
||||||
|
inkscape:transform-center-x="-30.453831"
|
||||||
|
inkscape:transform-center-y="40.048222" />
|
||||||
|
</g>
|
||||||
|
<inkscape:templateinfo>
|
||||||
|
<inkscape:name>Square150x150Logo</inkscape:name>
|
||||||
|
<inkscape:shortdesc>Medium tile</inkscape:shortdesc>
|
||||||
|
<inkscape:date>2020-04-15</inkscape:date>
|
||||||
|
</inkscape:templateinfo>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 5.4 KiB |
Before Width: | Height: | Size: 9.0 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 820 B |
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 71 KiB After Width: | Height: | Size: 41 KiB |
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 71 KiB After Width: | Height: | Size: 41 KiB |
Before Width: | Height: | Size: 71 KiB After Width: | Height: | Size: 71 KiB |
BIN
Assets/macOsIcon.psd
Normal file
65
BUILD.md
@@ -7,7 +7,11 @@ Note that all the applications share the same library, which, for historical rea
|
|||||||
## Required dependencies
|
## Required dependencies
|
||||||
|
|
||||||
- Install yarn - https://yarnpkg.com/lang/en/docs/install/
|
- Install yarn - https://yarnpkg.com/lang/en/docs/install/
|
||||||
- Install node - https://nodejs.org/en/
|
- Install node 10+ - https://nodejs.org/en/
|
||||||
|
- macOS, Linux: Install rsync - https://nodejs.org/en/
|
||||||
|
- macOS: Install Cocoapods - `brew install cocoapods`
|
||||||
|
- Windows: Install Windows Build Tools - `npm install -g windows-build-tools`
|
||||||
|
- Linux: Install dependencies - `sudo apt install libnss3 libsecret-1-dev`
|
||||||
|
|
||||||
## Building
|
## Building
|
||||||
|
|
||||||
@@ -22,18 +26,7 @@ Then you can test the various applications:
|
|||||||
cd ElectronClient
|
cd ElectronClient
|
||||||
npm start
|
npm start
|
||||||
|
|
||||||
If you'd like to auto-reload the app on changes rather than having to quit and restart it manually each time, you can use [watchman-make](https://facebook.github.io/watchman/docs/watchman-make.html):
|
You can also run it under WSL 2. To do so, [follow these instructions](https://www.beekeeperstudio.io/blog/building-electron-windows-ubuntu-wsl2) to setup your environment.
|
||||||
|
|
||||||
```sh
|
|
||||||
cd ElectronClient
|
|
||||||
watchman-make -p '**/*.js' '**/*.jsx' --run "npm start"
|
|
||||||
```
|
|
||||||
|
|
||||||
It still requires you to quit the application each time you want it to rebuild, but at least you don't have to re-run `"npm start"` each time. Here's what the workflow loop looks like in practice:
|
|
||||||
|
|
||||||
1. Edit and save files in your text editor.
|
|
||||||
2. Switch to the Electron app and <kbd>cmd</kbd>+<kbd>Q</kbd> to quit it.
|
|
||||||
3. `watchman` immediately restarts the app for you (whereas usually you'd have to switch back to the terminal, type `"npm start"`, and hit enter).
|
|
||||||
|
|
||||||
## Testing the Terminal application
|
## Testing the Terminal application
|
||||||
|
|
||||||
@@ -47,12 +40,12 @@ First you need to setup React Native to build projects with native code. For thi
|
|||||||
Then:
|
Then:
|
||||||
|
|
||||||
cd ReactNativeClient
|
cd ReactNativeClient
|
||||||
npm start-android
|
npm run start-android
|
||||||
# Or: npm start-ios
|
# Or: npm run start-ios
|
||||||
|
|
||||||
To run the iOS application, it might be easier to open the file `ios/Joplin.xcworkspace` on XCode and run the app from there.
|
To run the iOS application, it might be easier to open the file `ios/Joplin.xcworkspace` on XCode and run the app from there.
|
||||||
|
|
||||||
Normally the bundler should start automatically with the application. If it doesn't run `npm start`.
|
Normally the bundler should start automatically with the application. If it doesn't, run `npm start`.
|
||||||
|
|
||||||
## Building the clipper
|
## Building the clipper
|
||||||
|
|
||||||
@@ -80,37 +73,27 @@ You can specify additional parameters when running the desktop or CLI applicatio
|
|||||||
|
|
||||||
Most of the application is written in JavaScript, however new classes and files should generally be written in [TypeScript](https://www.typescriptlang.org/). All TypeScript files are generated next to the .ts or .tsx file. So for example, if there's a file "lib/MyClass.ts", there will be a generated "lib/MyClass.js" next to it. It is implemented that way as it requires minimal changes to integrate TypeScript in the existing JavaScript code base.
|
Most of the application is written in JavaScript, however new classes and files should generally be written in [TypeScript](https://www.typescriptlang.org/). All TypeScript files are generated next to the .ts or .tsx file. So for example, if there's a file "lib/MyClass.ts", there will be a generated "lib/MyClass.js" next to it. It is implemented that way as it requires minimal changes to integrate TypeScript in the existing JavaScript code base.
|
||||||
|
|
||||||
# Troubleshooting desktop application
|
In the current setup, `tsc` is executed from the root of the project, and will compile everything in CliClient, ElectronClient, etc. This is more convenient to have just one place to compile everything, and it also means there's only one watch command to run. However, one drawback is that TypeScript doesn't find types defined in node_modules folders in sub-directories. For example, if you install `immer` in ElectronClient, then try to use the package, TypeScript will report that it cannot find this module. In theory using `typeRoots`, it should be possible to make it find the right modules but it doesn't seem to work in this case. Currently the workaround is to install any such package at the root of the project. By doing so, TypeScript will find the type definitions and compilation will work. It's not ideal since the module is installed at the root even though it's not used, but for now that will work.
|
||||||
|
|
||||||
## On Linux and macOS
|
## Hot reload
|
||||||
|
|
||||||
If there's an error `while loading shared libraries: libgconf-2.so.4: cannot open shared object file: No such file or directory`, run `sudo apt-get install libgconf-2-4`
|
If you'd like to auto-reload the desktop app on changes rather than having to quit and restart it manually each time, you can use [watchman-make](https://facebook.github.io/watchman/docs/watchman-make.html):
|
||||||
|
|
||||||
If you get a node-gyp related error, you might need to manually install it: `npm install -g node-gyp`.
|
```sh
|
||||||
|
cd ElectronClient
|
||||||
|
watchman-make -p '**/*.js' '**/*.jsx' --run "npm start"
|
||||||
|
```
|
||||||
|
|
||||||
If you get the error `libtool: unrecognized option '-static'`, follow the instructions [in this post](https://stackoverflow.com/a/38552393/561309) to use the correct libtool version.
|
It still requires you to quit the application each time you want it to rebuild, but at least you don't have to re-run `"npm start"` each time. Here's what the workflow loop looks like in practice:
|
||||||
|
|
||||||
## On Windows
|
1. Edit and save files in your text editor.
|
||||||
|
2. Switch to the Electron app and <kbd>cmd</kbd>+<kbd>Q</kbd> to quit it.
|
||||||
|
3. `watchman` immediately restarts the app for you (whereas usually you'd have to switch back to the terminal, type `"npm start"`, and hit enter).
|
||||||
|
|
||||||
If node-gyp does not work (MSBUILD: error MSB3428: Could not load the Visual C++ component "VCBuild.exe"), you might need to install `windows-build-tools` using `npm install --global windows-build-tools`.
|
# Updating Markdown renderer packages
|
||||||
|
|
||||||
If `yarn dist` fails, it may need administrative rights.
|
The Markdown renderer is located under ReactNativeClient/lib/joplin-renderer. Whenever updating one of its dependencies, such as Mermaid or Katex, please run `npm run buildAssets` to make sure all assets such as fonts or CSS files are deployed correctly.
|
||||||
|
|
||||||
If you get an `error MSB8020: The build tools for v140 cannot be found.` try to run with a different toolset version, eg `npm install --toolset=v141` (See [here](https://github.com/mapbox/node-sqlite3/issues/1124) for more info).
|
# Troubleshooting
|
||||||
|
|
||||||
## Other issues
|
Please read for the [Build Troubleshooting Document](https://github.com/laurent22/joplin/blob/dev/readme/build_troubleshooting.md) for various tips on how to get the build working.
|
||||||
|
|
||||||
> The application window doesn't open or is white
|
|
||||||
|
|
||||||
This is an indication that there's an early initialisation error. Try this:
|
|
||||||
|
|
||||||
- In ElectronAppWrapper, set `debugEarlyBugs` to `true`. This will force the window to show up and should open the console next to it, which should display any error.
|
|
||||||
- In more rare cases, an already open instance of Joplin can create strange low-level bugs that will display no error but will result in this white window. A non-dev instance of Joplin, or a dev instance that wasn't properly closed might cause this. So make sure you close everything and try again. Perhaps even other Electron apps running (Skype, Slack, etc.) could cause this?
|
|
||||||
- Also try to delete node_modules and rebuild.
|
|
||||||
- If all else fails, switch your computer off and on again, to make sure you start clean.
|
|
||||||
|
|
||||||
> How to work on the app from Windows?
|
|
||||||
|
|
||||||
**You should not use WSL at all** because this is a GUI app that lives outside of WSL, and the WSL layer can cause all kind of very hard to debug issues. It can also lock files in node_modules that cannot be unlocked when the app crashes. (You need to restart your computer.) Likewise, don't run the TypeScript watch command from WSL.
|
|
||||||
|
|
||||||
So everything should be done from a Windows Command prompt or Windows PowerShell running as Administrator. All build and start commands are designed to work cross-platform, including on Windows.
|
|
@@ -21,15 +21,13 @@ Please check that your request has not already been posted on the forum or the [
|
|||||||
|
|
||||||
Avoid listing multiple requests in one topic. One topic per request makes it easier to track and discuss it.
|
Avoid listing multiple requests in one topic. One topic per request makes it easier to track and discuss it.
|
||||||
|
|
||||||
Finally, when submitting a pull request, don't forget to [test your code](#unit-tests).
|
Finally, when submitting a pull request, don't forget to [test your code](#automated-tests).
|
||||||
|
|
||||||
# Contribute to the project
|
# Contributing to Joplin's translation
|
||||||
|
|
||||||
## Contributing to Joplin's translation
|
|
||||||
|
|
||||||
Joplin is available in multiple languages thanks to the help of its users. You can help translate Joplin to your language or keep it up to date. Please read the documentation about [Localisation](https://joplinapp.org/#localisation).
|
Joplin is available in multiple languages thanks to the help of its users. You can help translate Joplin to your language or keep it up to date. Please read the documentation about [Localisation](https://joplinapp.org/#localisation).
|
||||||
|
|
||||||
## Contributing to Joplin's code
|
# Contributing to Joplin's code
|
||||||
|
|
||||||
If you want to start contributing to the project's code, please follow these guidelines before creating a pull request:
|
If you want to start contributing to the project's code, please follow these guidelines before creating a pull request:
|
||||||
|
|
||||||
@@ -38,10 +36,11 @@ If you want to start contributing to the project's code, please follow these gui
|
|||||||
- Before adding a new feature, ask about it in the [Github Issue Tracker](https://github.com/laurent22/joplin/issues?utf8=%E2%9C%93&q=is%3Aissue) or the [Joplin Forum](https://discourse.joplinapp.org/), or check if existing discussions exist to make sure the new functionality is desired.
|
- Before adding a new feature, ask about it in the [Github Issue Tracker](https://github.com/laurent22/joplin/issues?utf8=%E2%9C%93&q=is%3Aissue) or the [Joplin Forum](https://discourse.joplinapp.org/), or check if existing discussions exist to make sure the new functionality is desired.
|
||||||
- **Changes that will consist in more than 50 lines of code should be discussed the [Joplin Forum](https://discourse.joplinapp.org/)**, so that you don't spend too much time implementing something that might not be accepted.
|
- **Changes that will consist in more than 50 lines of code should be discussed the [Joplin Forum](https://discourse.joplinapp.org/)**, so that you don't spend too much time implementing something that might not be accepted.
|
||||||
- All the applications share the same backend (database, synchronisation, settings, models, business logic, etc.) so if you change something in the backend in one app, makes sure it still work in the other apps. Usually it does, but keep this in mind.
|
- All the applications share the same backend (database, synchronisation, settings, models, business logic, etc.) so if you change something in the backend in one app, makes sure it still work in the other apps. Usually it does, but keep this in mind.
|
||||||
|
- Pull requests that make many changes using an automated tool, like for spell fixing, styling, etc. will not be accepted. An exception would be if the changes have been discussed in the forum and someone has agreed to review **and test** the pull request.
|
||||||
|
|
||||||
Building the apps is relatively easy - please [see the build instructions](https://github.com/laurent22/joplin/blob/master/BUILD.md) for more details.
|
Building the apps is relatively easy - please [see the build instructions](https://github.com/laurent22/joplin/blob/dev/BUILD.md) for more details.
|
||||||
|
|
||||||
### Coding style
|
## Coding style
|
||||||
|
|
||||||
Coding style is enforced by a pre-commit hook that runs eslint. This hook is installed whenever running `npm install` on any of the application directory. If for some reason the pre-commit hook didn't get installed, you can manually install it by running `npm install` at the root of the repository.
|
Coding style is enforced by a pre-commit hook that runs eslint. This hook is installed whenever running `npm install` on any of the application directory. If for some reason the pre-commit hook didn't get installed, you can manually install it by running `npm install` at the root of the repository.
|
||||||
|
|
||||||
@@ -49,44 +48,45 @@ For new React components, please use [React Hooks](https://reactjs.org/docs/hook
|
|||||||
|
|
||||||
For changes made to the Desktop client that affect the user interface, refer to `ElectronClient/app/theme.js` for all styling information. The goal is to create a consistent user interface to allow for easy navigation of Joplin's various features and improve the overall user experience.
|
For changes made to the Desktop client that affect the user interface, refer to `ElectronClient/app/theme.js` for all styling information. The goal is to create a consistent user interface to allow for easy navigation of Joplin's various features and improve the overall user experience.
|
||||||
|
|
||||||
### Unit tests
|
## Automated tests
|
||||||
|
|
||||||
When submitting a pull request for a new feature or bug fix, please add unit tests for your code. Unit testing GUI changes is not always possible so it is not required, but any change in a file under /lib for example should be unit tested.
|
When submitting a pull request for a new feature or a bug fix, please add automated tests for your code whenever possible. Tests in Joplin are divided into **unit tests** and **feature tests**.
|
||||||
|
|
||||||
|
* **Unit tests** are used to test models, services or utility classes - they are relatively low level. Unit tests should be prefixed with the type of class that is being tested - for example "models_Folder" or "services_SearchEngine".
|
||||||
|
|
||||||
|
* **Feature tests** on the other hand are to test higher level functionalities such as interactions with the GUI and how they affect the underlying model. Often these tests would dispatch Redux actions, and inspect how the application state has been changed. The feature tests should be prefixed with "feature_", for example "feature_TagList". There's a good explanation on what qualifies as a feature test in [this post](https://github.com/laurent22/joplin/pull/2819#issuecomment-603502230).
|
||||||
|
|
||||||
The tests are under CliClient/tests. To get them running, you first need to build the CLI app:
|
The tests are under CliClient/tests. To get them running, you first need to build the CLI app:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
npm run tsc # Build the .ts and .tsx files
|
|
||||||
cd CliClient
|
|
||||||
npm install
|
npm install
|
||||||
|
cd CliClient
|
||||||
```
|
```
|
||||||
|
|
||||||
To run all the test units:
|
To run all the test units:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
npm run test
|
npm test
|
||||||
```
|
```
|
||||||
|
|
||||||
To run just one particular file:
|
To run just one particular file:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
npm run test -- --filter=markdownUtils # Don't add the .js extension
|
npm test -- --filter=markdownUtils # Don't add the .js extension
|
||||||
```
|
```
|
||||||
|
|
||||||
To filter tests. For example, to run all the test units that contain "should handle conflict" in their description:
|
To filter tests. For example, to run all the test units that contain "should handle conflict" in their description:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
npm run test -- --filter="should handle conflict"
|
npm test -- --filter="should handle conflict"
|
||||||
```
|
```
|
||||||
|
|
||||||
If you get the error `Cannot find module '/joplin/CliClient/node_modules/sqlite3/lib/binding/node-v79-darwin-x64/node_sqlite3.node'`, you may need to run `npm rebuild`.
|
|
||||||
|
|
||||||
## About abandoned pull requests
|
## About abandoned pull requests
|
||||||
|
|
||||||
It happens that a pull request is started but not finished and despite our attempts to contact the contributor, we don’t hear from them again.
|
It happens that a pull request is started but not finished and despite our attempts to contact the contributor, we don't hear from them again.
|
||||||
|
|
||||||
In that case we will not merge the pull request, even if only small changes are missing. Our policy is simply to close the pull request. Why? Because an unfinished pull request essentially means giving us work and moving on. We would rather not encourage this behaviour.
|
In that case we will not merge the pull request, even if only small changes are missing. Our policy is simply to close the pull request. Why? Because an unfinished pull request essentially means giving us work and moving on. We would rather not encourage this behaviour.
|
||||||
|
|
||||||
Also, please note that since we have spent time reviewing the pull request and proposing solutions, we reserve the right to re-use that knowledge to create a new pull request, potentially based on your changes.
|
Also, please note that since we have spent time reviewing the pull request and proposing solutions, we reserve the right to re-use that knowledge to create a new pull request, potentially based on your changes.
|
||||||
|
|
||||||
We’d much prefer that you complete the pull request though, so we’ll be sure to ping you a few times before that!
|
We'd much prefer that you complete the pull request though, so we'll be sure to ping you a few times before that!
|
||||||
|
@@ -1,13 +1,13 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
"overrides": [
|
'overrides': [
|
||||||
{
|
{
|
||||||
"files": ["tests/**/*.js"],
|
'files': ['tests/**/*.js'],
|
||||||
'rules': {
|
'rules': {
|
||||||
// Ignore all unused function arguments, because in some
|
// Ignore all unused function arguments, because in some
|
||||||
// case they are kept to indicate the function signature.
|
// case they are kept to indicate the function signature.
|
||||||
"no-unused-vars": ["error", { "argsIgnorePattern": ".*" }],
|
'no-unused-vars': ['error', { 'argsIgnorePattern': '.*' }],
|
||||||
"@typescript-eslint/no-unused-vars": 0,
|
'@typescript-eslint/no-unused-vars': 0,
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
5
CliClient/.gitignore
vendored
@@ -20,4 +20,7 @@ out.txt
|
|||||||
linkToLocal.sh
|
linkToLocal.sh
|
||||||
yarn-error.log
|
yarn-error.log
|
||||||
tests/support/dropbox-auth.txt
|
tests/support/dropbox-auth.txt
|
||||||
build/
|
tests/support/nextcloud-auth.json
|
||||||
|
tests/support/onedrive-auth.txt
|
||||||
|
build/
|
||||||
|
patches/
|
134
CliClient/app/LinkSelector.ts
Normal file
@@ -0,0 +1,134 @@
|
|||||||
|
const open = require('open');
|
||||||
|
interface LinkStoreEntry {
|
||||||
|
link: string;
|
||||||
|
noteX: number;
|
||||||
|
noteY: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
class LinkSelector {
|
||||||
|
noteId_: string;
|
||||||
|
scrollTop_: number;
|
||||||
|
renderedText_: string;
|
||||||
|
currentLinkIndex_: number;
|
||||||
|
linkStore_: LinkStoreEntry[];
|
||||||
|
linkRegex_: RegExp;
|
||||||
|
|
||||||
|
constructor() {
|
||||||
|
this.noteId_ = null;
|
||||||
|
this.scrollTop_ = null; // used so 'o' won't open unhighlighted link after scrolling
|
||||||
|
this.renderedText_ = null;
|
||||||
|
this.currentLinkIndex_ = null;
|
||||||
|
this.linkStore_ = null;
|
||||||
|
this.linkRegex_ = /http:\/\/[0-9.]+:[0-9]+\/[0-9]+/g;
|
||||||
|
}
|
||||||
|
|
||||||
|
get link(): string | null {
|
||||||
|
if (this.currentLinkIndex_ === null) return null;
|
||||||
|
return this.linkStore_[this.currentLinkIndex_].link;
|
||||||
|
}
|
||||||
|
|
||||||
|
get noteX(): number | null {
|
||||||
|
if (this.currentLinkIndex_ === null) return null;
|
||||||
|
return this.linkStore_[this.currentLinkIndex_].noteX;
|
||||||
|
}
|
||||||
|
|
||||||
|
get noteY(): number | null {
|
||||||
|
if (this.currentLinkIndex_ === null) return null;
|
||||||
|
return this.linkStore_[this.currentLinkIndex_].noteY;
|
||||||
|
}
|
||||||
|
|
||||||
|
findLinks(renderedText: string): LinkStoreEntry[] {
|
||||||
|
const newLinkStore: LinkStoreEntry[] = [];
|
||||||
|
const lines: string[] = renderedText.split('\n');
|
||||||
|
for (let i = 0; i < lines.length; i++) {
|
||||||
|
const matches = [...lines[i].matchAll(this.linkRegex_)];
|
||||||
|
matches.forEach((_e, n) => {
|
||||||
|
newLinkStore.push(
|
||||||
|
{
|
||||||
|
link: matches[n][0],
|
||||||
|
noteX: matches[n].index,
|
||||||
|
noteY: i,
|
||||||
|
}
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return newLinkStore;
|
||||||
|
}
|
||||||
|
|
||||||
|
updateText(renderedText: string): void {
|
||||||
|
this.currentLinkIndex_ = null;
|
||||||
|
this.renderedText_ = renderedText;
|
||||||
|
this.linkStore_ = this.findLinks(this.renderedText_);
|
||||||
|
}
|
||||||
|
|
||||||
|
updateNote(textWidget: any): void {
|
||||||
|
this.noteId_ = textWidget.noteId;
|
||||||
|
this.scrollTop_ = textWidget.scrollTop_;
|
||||||
|
this.updateText(textWidget.renderedText_);
|
||||||
|
}
|
||||||
|
|
||||||
|
scrollWidget(textWidget: any): void {
|
||||||
|
if (this.currentLinkIndex_ === null) return;
|
||||||
|
|
||||||
|
const noteY = this.linkStore_[this.currentLinkIndex_].noteY;
|
||||||
|
|
||||||
|
let viewBoxMin = textWidget.scrollTop_ + 1;
|
||||||
|
let viewBoxMax = viewBoxMin + textWidget.innerHeight - 2;
|
||||||
|
|
||||||
|
if (noteY < viewBoxMin) {
|
||||||
|
for (; noteY < viewBoxMin; textWidget.pageUp()) {
|
||||||
|
viewBoxMin = textWidget.scrollTop_;
|
||||||
|
viewBoxMax = viewBoxMin + textWidget.innerHeight;
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
|
||||||
|
} else if (noteY > viewBoxMax) {
|
||||||
|
for (; noteY > viewBoxMax; textWidget.pageDown()) {
|
||||||
|
viewBoxMin = textWidget.scrollTop_;
|
||||||
|
viewBoxMax = viewBoxMin + textWidget.innerHeight;
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
changeLink(textWidget: any, offset: number): void | null {
|
||||||
|
if (textWidget.noteId !== this.noteId_) {
|
||||||
|
this.updateNote(textWidget);
|
||||||
|
this.changeLink(textWidget, offset);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (textWidget.renderedText_ !== this.renderedText_) {
|
||||||
|
this.updateText(textWidget.renderedText_);
|
||||||
|
this.changeLink(textWidget, offset);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (textWidget.scrollTop_ !== this.scrollTop_) this.scrollTop_ = textWidget.scrollTop_;
|
||||||
|
|
||||||
|
if (!this.linkStore_.length) return null;
|
||||||
|
|
||||||
|
let offsetMod = (offset + this.currentLinkIndex_) % this.linkStore_.length;
|
||||||
|
|
||||||
|
if (this.currentLinkIndex_ === null) {
|
||||||
|
if (offsetMod < 0) this.currentLinkIndex_ = this.linkStore_.length + offsetMod;
|
||||||
|
else if (!offsetMod) this.currentLinkIndex_ = 0;
|
||||||
|
else this.currentLinkIndex_ = offsetMod - 1;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (offsetMod < 0) offsetMod = this.linkStore_.length + offsetMod;
|
||||||
|
|
||||||
|
this.currentLinkIndex_ = offsetMod;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
openLink(textWidget: any): void {
|
||||||
|
if (textWidget.noteId !== this.noteId_) return;
|
||||||
|
if (textWidget.renderedText_ !== this.renderedText_) return;
|
||||||
|
if (textWidget.scrollTop_ !== this.scrollTop_) return;
|
||||||
|
open(this.linkStore_[this.currentLinkIndex_].link);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default LinkSelector;
|
||||||
|
|
@@ -1,4 +1,4 @@
|
|||||||
const { Logger } = require('lib/logger.js');
|
const Logger = require('lib/Logger').default;
|
||||||
const { netUtils } = require('lib/net-utils.js');
|
const { netUtils } = require('lib/net-utils.js');
|
||||||
|
|
||||||
const http = require('http');
|
const http = require('http');
|
||||||
|
@@ -1,14 +1,17 @@
|
|||||||
const { Logger } = require('lib/logger.js');
|
const Logger = require('lib/Logger').default;
|
||||||
const Folder = require('lib/models/Folder.js');
|
const Folder = require('lib/models/Folder.js');
|
||||||
const BaseItem = require('lib/models/BaseItem.js');
|
const BaseItem = require('lib/models/BaseItem.js');
|
||||||
const Tag = require('lib/models/Tag.js');
|
const Tag = require('lib/models/Tag.js');
|
||||||
const BaseModel = require('lib/BaseModel.js');
|
const BaseModel = require('lib/BaseModel').default;
|
||||||
const Note = require('lib/models/Note.js');
|
const Note = require('lib/models/Note.js');
|
||||||
const Resource = require('lib/models/Resource.js');
|
const Resource = require('lib/models/Resource.js');
|
||||||
const { reducer, defaultState } = require('lib/reducer.js');
|
const Setting = require('lib/models/Setting').default;
|
||||||
|
const reducer = require('lib/reducer').default;
|
||||||
|
const { defaultState } = require('lib/reducer');
|
||||||
const { splitCommandString } = require('lib/string-utils.js');
|
const { splitCommandString } = require('lib/string-utils.js');
|
||||||
const { reg } = require('lib/registry.js');
|
const { reg } = require('lib/registry.js');
|
||||||
const { _ } = require('lib/locale.js');
|
const { _ } = require('lib/locale');
|
||||||
|
const shim = require('lib/shim').default;
|
||||||
const Entities = require('html-entities').AllHtmlEntities;
|
const Entities = require('html-entities').AllHtmlEntities;
|
||||||
const htmlentities = new Entities().encode;
|
const htmlentities = new Entities().encode;
|
||||||
|
|
||||||
@@ -32,6 +35,8 @@ const FolderListWidget = require('./gui/FolderListWidget.js');
|
|||||||
const NoteListWidget = require('./gui/NoteListWidget.js');
|
const NoteListWidget = require('./gui/NoteListWidget.js');
|
||||||
const StatusBarWidget = require('./gui/StatusBarWidget.js');
|
const StatusBarWidget = require('./gui/StatusBarWidget.js');
|
||||||
const ConsoleWidget = require('./gui/ConsoleWidget.js');
|
const ConsoleWidget = require('./gui/ConsoleWidget.js');
|
||||||
|
const LinkSelector = require('./LinkSelector.js').default;
|
||||||
|
|
||||||
|
|
||||||
class AppGui {
|
class AppGui {
|
||||||
constructor(app, store, keymap) {
|
constructor(app, store, keymap) {
|
||||||
@@ -73,6 +78,8 @@ class AppGui {
|
|||||||
this.currentShortcutKeys_ = [];
|
this.currentShortcutKeys_ = [];
|
||||||
this.lastShortcutKeyTime_ = 0;
|
this.lastShortcutKeyTime_ = 0;
|
||||||
|
|
||||||
|
this.linkSelector_ = new LinkSelector();
|
||||||
|
|
||||||
// Recurrent sync is setup only when the GUI is started. In
|
// Recurrent sync is setup only when the GUI is started. In
|
||||||
// a regular command it's not necessary since the process
|
// a regular command it's not necessary since the process
|
||||||
// exits right away.
|
// exits right away.
|
||||||
@@ -134,7 +141,7 @@ class AppGui {
|
|||||||
const item = folderList.currentItem;
|
const item = folderList.currentItem;
|
||||||
|
|
||||||
if (item === '-') {
|
if (item === '-') {
|
||||||
let newIndex = event.currentIndex + (event.previousIndex < event.currentIndex ? +1 : -1);
|
const newIndex = event.currentIndex + (event.previousIndex < event.currentIndex ? +1 : -1);
|
||||||
let nextItem = folderList.itemAt(newIndex);
|
let nextItem = folderList.itemAt(newIndex);
|
||||||
if (!nextItem) nextItem = folderList.itemAt(event.previousIndex);
|
if (!nextItem) nextItem = folderList.itemAt(event.previousIndex);
|
||||||
|
|
||||||
@@ -186,7 +193,7 @@ class AppGui {
|
|||||||
borderRightWidth: 1,
|
borderRightWidth: 1,
|
||||||
};
|
};
|
||||||
noteList.on('currentItemChange', async () => {
|
noteList.on('currentItemChange', async () => {
|
||||||
let note = noteList.currentItem;
|
const note = noteList.currentItem;
|
||||||
this.store_.dispatch({
|
this.store_.dispatch({
|
||||||
type: 'NOTE_SELECT',
|
type: 'NOTE_SELECT',
|
||||||
id: note ? note.id : null,
|
id: note ? note.id : null,
|
||||||
@@ -243,9 +250,9 @@ class AppGui {
|
|||||||
|
|
||||||
const hLayout = new HLayoutWidget();
|
const hLayout = new HLayoutWidget();
|
||||||
hLayout.name = 'hLayout';
|
hLayout.name = 'hLayout';
|
||||||
hLayout.addChild(folderList, { type: 'stretch', factor: 1 });
|
hLayout.addChild(folderList, { type: 'stretch', factor: Setting.value('layout.folderList.factor') });
|
||||||
hLayout.addChild(noteList, { type: 'stretch', factor: 1 });
|
hLayout.addChild(noteList, { type: 'stretch', factor: Setting.value('layout.noteList.factor') });
|
||||||
hLayout.addChild(noteLayout, { type: 'stretch', factor: 2 });
|
hLayout.addChild(noteLayout, { type: 'stretch', factor: Setting.value('layout.note.factor') });
|
||||||
|
|
||||||
const vLayout = new VLayoutWidget();
|
const vLayout = new VLayoutWidget();
|
||||||
vLayout.name = 'vLayout';
|
vLayout.name = 'vLayout';
|
||||||
@@ -338,7 +345,7 @@ class AppGui {
|
|||||||
|
|
||||||
if (consoleWidget.isMaximized__ === doMaximize) return;
|
if (consoleWidget.isMaximized__ === doMaximize) return;
|
||||||
|
|
||||||
let constraints = {
|
const constraints = {
|
||||||
type: 'stretch',
|
type: 'stretch',
|
||||||
factor: !doMaximize ? 1 : 4,
|
factor: !doMaximize ? 1 : 4,
|
||||||
};
|
};
|
||||||
@@ -415,10 +422,10 @@ class AppGui {
|
|||||||
async handleModelAction(action) {
|
async handleModelAction(action) {
|
||||||
this.logger().info('Action:', action);
|
this.logger().info('Action:', action);
|
||||||
|
|
||||||
let state = Object.assign({}, defaultState);
|
const state = Object.assign({}, defaultState);
|
||||||
state.notes = this.widget('noteList').items;
|
state.notes = this.widget('noteList').items;
|
||||||
|
|
||||||
let newState = reducer(state, action);
|
const newState = reducer(state, action);
|
||||||
|
|
||||||
if (newState !== state) {
|
if (newState !== state) {
|
||||||
this.widget('noteList').items = newState.notes;
|
this.widget('noteList').items = newState.notes;
|
||||||
@@ -454,6 +461,30 @@ class AppGui {
|
|||||||
} else {
|
} else {
|
||||||
this.stdout(_('Please select the note or notebook to be deleted first.'));
|
this.stdout(_('Please select the note or notebook to be deleted first.'));
|
||||||
}
|
}
|
||||||
|
} else if (cmd === 'next_link' || cmd === 'previous_link') {
|
||||||
|
const noteText = this.widget('noteText');
|
||||||
|
|
||||||
|
noteText.render();
|
||||||
|
|
||||||
|
if (cmd === 'next_link') this.linkSelector_.changeLink(noteText, 1);
|
||||||
|
else this.linkSelector_.changeLink(noteText, -1);
|
||||||
|
|
||||||
|
this.linkSelector_.scrollWidget(noteText);
|
||||||
|
|
||||||
|
const cursorOffsetX = this.widget('mainWindow').width - noteText.innerWidth - 8;
|
||||||
|
const cursorOffsetY = 1 - noteText.scrollTop_;
|
||||||
|
|
||||||
|
if (this.linkSelector_.link) {
|
||||||
|
this.term_.moveTo(
|
||||||
|
this.linkSelector_.noteX + cursorOffsetX,
|
||||||
|
this.linkSelector_.noteY + cursorOffsetY
|
||||||
|
);
|
||||||
|
shim.setTimeout(() => this.term_.term().inverse(this.linkSelector_.link), 50);
|
||||||
|
}
|
||||||
|
} else if (cmd === 'open_link') {
|
||||||
|
if (this.widget('noteText').hasFocus) {
|
||||||
|
this.linkSelector_.openLink(this.widget('noteText'));
|
||||||
|
}
|
||||||
} else if (cmd === 'toggle_console') {
|
} else if (cmd === 'toggle_console') {
|
||||||
if (!this.consoleIsShown()) {
|
if (!this.consoleIsShown()) {
|
||||||
this.showConsole();
|
this.showConsole();
|
||||||
@@ -485,9 +516,9 @@ class AppGui {
|
|||||||
// this.logger().debug('Got command: ' + cmd);
|
// this.logger().debug('Got command: ' + cmd);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
let note = this.widget('noteList').currentItem;
|
const note = this.widget('noteList').currentItem;
|
||||||
let folder = this.widget('folderList').currentItem;
|
const folder = this.widget('folderList').currentItem;
|
||||||
let args = splitCommandString(cmd);
|
const args = splitCommandString(cmd);
|
||||||
|
|
||||||
for (let i = 0; i < args.length; i++) {
|
for (let i = 0; i < args.length; i++) {
|
||||||
if (args[i] == '$n') {
|
if (args[i] == '$n') {
|
||||||
@@ -548,7 +579,7 @@ class AppGui {
|
|||||||
stdout(text) {
|
stdout(text) {
|
||||||
if (text === null || text === undefined) return;
|
if (text === null || text === undefined) return;
|
||||||
|
|
||||||
let lines = text.split('\n');
|
const lines = text.split('\n');
|
||||||
for (let i = 0; i < lines.length; i++) {
|
for (let i = 0; i < lines.length; i++) {
|
||||||
const v = typeof lines[i] === 'object' ? JSON.stringify(lines[i]) : lines[i];
|
const v = typeof lines[i] === 'object' ? JSON.stringify(lines[i]) : lines[i];
|
||||||
this.widget('console').addLine(v);
|
this.widget('console').addLine(v);
|
||||||
@@ -626,7 +657,7 @@ class AppGui {
|
|||||||
|
|
||||||
if (link.type === 'item') {
|
if (link.type === 'item') {
|
||||||
const itemId = link.id;
|
const itemId = link.id;
|
||||||
let item = await BaseItem.loadItemById(itemId);
|
const item = await BaseItem.loadItemById(itemId);
|
||||||
if (!item) throw new Error(`No item with ID ${itemId}`); // Should be nearly impossible
|
if (!item) throw new Error(`No item with ID ${itemId}`); // Should be nearly impossible
|
||||||
|
|
||||||
if (item.type_ === BaseModel.TYPE_RESOURCE) {
|
if (item.type_ === BaseModel.TYPE_RESOURCE) {
|
||||||
@@ -750,7 +781,7 @@ class AppGui {
|
|||||||
// -------------------------------------------------------------------------
|
// -------------------------------------------------------------------------
|
||||||
|
|
||||||
const shortcutKey = this.currentShortcutKeys_.join('');
|
const shortcutKey = this.currentShortcutKeys_.join('');
|
||||||
let keymapItem = this.keymapItemByKey(shortcutKey);
|
const keymapItem = this.keymapItemByKey(shortcutKey);
|
||||||
|
|
||||||
// If this command is an alias to another command, resolve to the actual command
|
// If this command is an alias to another command, resolve to the actual command
|
||||||
|
|
||||||
@@ -766,7 +797,7 @@ class AppGui {
|
|||||||
if (keymapItem.type === 'function') {
|
if (keymapItem.type === 'function') {
|
||||||
this.processFunctionCommand(keymapItem.command);
|
this.processFunctionCommand(keymapItem.command);
|
||||||
} else if (keymapItem.type === 'prompt') {
|
} else if (keymapItem.type === 'prompt') {
|
||||||
let promptOptions = {};
|
const promptOptions = {};
|
||||||
if ('cursorPosition' in keymapItem) promptOptions.cursorPosition = keymapItem.cursorPosition;
|
if ('cursorPosition' in keymapItem) promptOptions.cursorPosition = keymapItem.cursorPosition;
|
||||||
const commandString = await statusBar.prompt(keymapItem.command ? keymapItem.command : '', null, promptOptions);
|
const commandString = await statusBar.prompt(keymapItem.command ? keymapItem.command : '', null, promptOptions);
|
||||||
this.addCommandToConsole(commandString);
|
this.addCommandToConsole(commandString);
|
||||||
|
@@ -1,19 +1,20 @@
|
|||||||
const { BaseApplication } = require('lib/BaseApplication');
|
const BaseApplication = require('lib/BaseApplication').default;
|
||||||
const { FoldersScreenUtils } = require('lib/folders-screen-utils.js');
|
const { FoldersScreenUtils } = require('lib/folders-screen-utils.js');
|
||||||
const ResourceService = require('lib/services/ResourceService');
|
const ResourceService = require('lib/services/ResourceService');
|
||||||
const BaseModel = require('lib/BaseModel.js');
|
const BaseModel = require('lib/BaseModel').default;
|
||||||
const Folder = require('lib/models/Folder.js');
|
const Folder = require('lib/models/Folder.js');
|
||||||
const BaseItem = require('lib/models/BaseItem.js');
|
const BaseItem = require('lib/models/BaseItem.js');
|
||||||
const Note = require('lib/models/Note.js');
|
const Note = require('lib/models/Note.js');
|
||||||
const Tag = require('lib/models/Tag.js');
|
const Tag = require('lib/models/Tag.js');
|
||||||
const Setting = require('lib/models/Setting.js');
|
const Setting = require('lib/models/Setting').default;
|
||||||
const { reg } = require('lib/registry.js');
|
const { reg } = require('lib/registry.js');
|
||||||
const { fileExtension } = require('lib/path-utils.js');
|
const { fileExtension } = require('lib/path-utils');
|
||||||
const { _ } = require('lib/locale.js');
|
const { _ } = require('lib/locale');
|
||||||
const fs = require('fs-extra');
|
const fs = require('fs-extra');
|
||||||
const { cliUtils } = require('./cli-utils.js');
|
const { cliUtils } = require('./cli-utils.js');
|
||||||
const Cache = require('lib/Cache');
|
const Cache = require('lib/Cache');
|
||||||
const RevisionService = require('lib/services/RevisionService');
|
const RevisionService = require('lib/services/RevisionService');
|
||||||
|
const shim = require('lib/shim').default;
|
||||||
|
|
||||||
class Application extends BaseApplication {
|
class Application extends BaseApplication {
|
||||||
constructor() {
|
constructor() {
|
||||||
@@ -47,7 +48,7 @@ class Application extends BaseApplication {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async loadItem(type, pattern, options = null) {
|
async loadItem(type, pattern, options = null) {
|
||||||
let output = await this.loadItems(type, pattern, options);
|
const output = await this.loadItems(type, pattern, options);
|
||||||
|
|
||||||
if (output.length > 1) {
|
if (output.length > 1) {
|
||||||
// output.sort((a, b) => { return a.user_updated_time < b.user_updated_time ? +1 : -1; });
|
// output.sort((a, b) => { return a.user_updated_time < b.user_updated_time ? +1 : -1; });
|
||||||
@@ -144,7 +145,7 @@ class Application extends BaseApplication {
|
|||||||
if (options.type === 'boolean') {
|
if (options.type === 'boolean') {
|
||||||
if (answer === null) return false; // Pressed ESCAPE
|
if (answer === null) return false; // Pressed ESCAPE
|
||||||
if (!answer) answer = options.answers[0];
|
if (!answer) answer = options.answers[0];
|
||||||
let positiveIndex = options.booleanAnswerDefault == 'y' ? 0 : 1;
|
const positiveIndex = options.booleanAnswerDefault == 'y' ? 0 : 1;
|
||||||
return answer.toLowerCase() === options.answers[positiveIndex].toLowerCase();
|
return answer.toLowerCase() === options.answers[positiveIndex].toLowerCase();
|
||||||
} else {
|
} else {
|
||||||
return answer;
|
return answer;
|
||||||
@@ -161,7 +162,7 @@ class Application extends BaseApplication {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Give it a few seconds to cancel otherwise exit anyway
|
// Give it a few seconds to cancel otherwise exit anyway
|
||||||
setTimeout(async () => {
|
shim.setTimeout(async () => {
|
||||||
await doExit();
|
await doExit();
|
||||||
}, 5000);
|
}, 5000);
|
||||||
|
|
||||||
@@ -181,7 +182,7 @@ class Application extends BaseApplication {
|
|||||||
const ext = fileExtension(path);
|
const ext = fileExtension(path);
|
||||||
if (ext != 'js') return;
|
if (ext != 'js') return;
|
||||||
|
|
||||||
let CommandClass = require(`./${path}`);
|
const CommandClass = require(`./${path}`);
|
||||||
let cmd = new CommandClass();
|
let cmd = new CommandClass();
|
||||||
if (!cmd.enabled()) return;
|
if (!cmd.enabled()) return;
|
||||||
cmd = this.setupCommand(cmd);
|
cmd = this.setupCommand(cmd);
|
||||||
@@ -192,8 +193,8 @@ class Application extends BaseApplication {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (uiType !== null) {
|
if (uiType !== null) {
|
||||||
let temp = [];
|
const temp = [];
|
||||||
for (let n in this.commands_) {
|
for (const n in this.commands_) {
|
||||||
if (!this.commands_.hasOwnProperty(n)) continue;
|
if (!this.commands_.hasOwnProperty(n)) continue;
|
||||||
const c = this.commands_[n];
|
const c = this.commands_[n];
|
||||||
if (!c.supportsUi(uiType)) continue;
|
if (!c.supportsUi(uiType)) continue;
|
||||||
@@ -207,8 +208,8 @@ class Application extends BaseApplication {
|
|||||||
|
|
||||||
async commandNames() {
|
async commandNames() {
|
||||||
const metadata = await this.commandMetadata();
|
const metadata = await this.commandMetadata();
|
||||||
let output = [];
|
const output = [];
|
||||||
for (let n in metadata) {
|
for (const n in metadata) {
|
||||||
if (!metadata.hasOwnProperty(n)) continue;
|
if (!metadata.hasOwnProperty(n)) continue;
|
||||||
output.push(n);
|
output.push(n);
|
||||||
}
|
}
|
||||||
@@ -227,7 +228,7 @@ class Application extends BaseApplication {
|
|||||||
const commands = this.commands();
|
const commands = this.commands();
|
||||||
|
|
||||||
output = {};
|
output = {};
|
||||||
for (let n in commands) {
|
for (const n in commands) {
|
||||||
if (!commands.hasOwnProperty(n)) continue;
|
if (!commands.hasOwnProperty(n)) continue;
|
||||||
const cmd = commands[n];
|
const cmd = commands[n];
|
||||||
output[n] = cmd.metadata();
|
output[n] = cmd.metadata();
|
||||||
@@ -251,7 +252,7 @@ class Application extends BaseApplication {
|
|||||||
CommandClass = require(`${__dirname}/command-${name}.js`);
|
CommandClass = require(`${__dirname}/command-${name}.js`);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (error.message && error.message.indexOf('Cannot find module') >= 0) {
|
if (error.message && error.message.indexOf('Cannot find module') >= 0) {
|
||||||
let e = new Error(_('No such command: %s', name));
|
const e = new Error(_('No such command: %s', name));
|
||||||
e.type = 'notFound';
|
e.type = 'notFound';
|
||||||
throw e;
|
throw e;
|
||||||
} else {
|
} else {
|
||||||
@@ -324,6 +325,9 @@ class Application extends BaseApplication {
|
|||||||
{ keys: ['PAGE_DOWN'], type: 'function', command: 'page_down' },
|
{ keys: ['PAGE_DOWN'], type: 'function', command: 'page_down' },
|
||||||
{ keys: ['ENTER'], type: 'function', command: 'activate' },
|
{ keys: ['ENTER'], type: 'function', command: 'activate' },
|
||||||
{ keys: ['DELETE', 'BACKSPACE'], type: 'function', command: 'delete' },
|
{ keys: ['DELETE', 'BACKSPACE'], type: 'function', command: 'delete' },
|
||||||
|
{ keys: ['n'], type: 'function', command: 'next_link' },
|
||||||
|
{ keys: ['b'], type: 'function', command: 'previous_link' },
|
||||||
|
{ keys: ['o'], type: 'function', command: 'open_link' },
|
||||||
{ keys: [' '], command: 'todo toggle $n' },
|
{ keys: [' '], command: 'todo toggle $n' },
|
||||||
{ keys: ['tc'], type: 'function', command: 'toggle_console' },
|
{ keys: ['tc'], type: 'function', command: 'toggle_console' },
|
||||||
{ keys: ['tm'], type: 'function', command: 'toggle_metadata' },
|
{ keys: ['tm'], type: 'function', command: 'toggle_metadata' },
|
||||||
@@ -362,7 +366,7 @@ class Application extends BaseApplication {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const output = [];
|
const output = [];
|
||||||
for (let n in itemsByCommand) {
|
for (const n in itemsByCommand) {
|
||||||
if (!itemsByCommand.hasOwnProperty(n)) continue;
|
if (!itemsByCommand.hasOwnProperty(n)) continue;
|
||||||
output.push(itemsByCommand[n]);
|
output.push(itemsByCommand[n]);
|
||||||
}
|
}
|
||||||
|
@@ -1,20 +1,20 @@
|
|||||||
var { app } = require('./app.js');
|
const { app } = require('./app.js');
|
||||||
var Note = require('lib/models/Note.js');
|
const Note = require('lib/models/Note.js');
|
||||||
var Folder = require('lib/models/Folder.js');
|
const Folder = require('lib/models/Folder.js');
|
||||||
var Tag = require('lib/models/Tag.js');
|
const Tag = require('lib/models/Tag.js');
|
||||||
var { cliUtils } = require('./cli-utils.js');
|
const { cliUtils } = require('./cli-utils.js');
|
||||||
var yargParser = require('yargs-parser');
|
const yargParser = require('yargs-parser');
|
||||||
var fs = require('fs-extra');
|
const fs = require('fs-extra');
|
||||||
|
|
||||||
async function handleAutocompletionPromise(line) {
|
async function handleAutocompletionPromise(line) {
|
||||||
// Auto-complete the command name
|
// Auto-complete the command name
|
||||||
const names = await app().commandNames();
|
const names = await app().commandNames();
|
||||||
let words = getArguments(line);
|
const words = getArguments(line);
|
||||||
// If there is only one word and it is not already a command name then you
|
// If there is only one word and it is not already a command name then you
|
||||||
// should look for commands it could be
|
// should look for commands it could be
|
||||||
if (words.length == 1) {
|
if (words.length == 1) {
|
||||||
if (names.indexOf(words[0]) === -1) {
|
if (names.indexOf(words[0]) === -1) {
|
||||||
let x = names.filter(n => n.indexOf(words[0]) === 0);
|
const x = names.filter(n => n.indexOf(words[0]) === 0);
|
||||||
if (x.length === 1) {
|
if (x.length === 1) {
|
||||||
return `${x[0]} `;
|
return `${x[0]} `;
|
||||||
}
|
}
|
||||||
@@ -36,8 +36,8 @@ async function handleAutocompletionPromise(line) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// complete an option
|
// complete an option
|
||||||
let next = words.length > 1 ? words[words.length - 1] : '';
|
const next = words.length > 1 ? words[words.length - 1] : '';
|
||||||
let l = [];
|
const l = [];
|
||||||
if (next[0] === '-') {
|
if (next[0] === '-') {
|
||||||
for (let i = 0; i < metadata.options.length; i++) {
|
for (let i = 0; i < metadata.options.length; i++) {
|
||||||
const options = metadata.options[i][0].split(' ');
|
const options = metadata.options[i][0].split(' ');
|
||||||
@@ -60,7 +60,7 @@ async function handleAutocompletionPromise(line) {
|
|||||||
if (l.length === 0) {
|
if (l.length === 0) {
|
||||||
return line;
|
return line;
|
||||||
}
|
}
|
||||||
let ret = l.map(a => toCommandLine(a));
|
const ret = l.map(a => toCommandLine(a));
|
||||||
ret.prefix = `${toCommandLine(words.slice(0, -1))} `;
|
ret.prefix = `${toCommandLine(words.slice(0, -1))} `;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@@ -69,7 +69,7 @@ async function handleAutocompletionPromise(line) {
|
|||||||
// words that don't start with a - less one for the command name
|
// words that don't start with a - less one for the command name
|
||||||
const positionalArgs = words.filter(a => a.indexOf('-') !== 0).length - 1;
|
const positionalArgs = words.filter(a => a.indexOf('-') !== 0).length - 1;
|
||||||
|
|
||||||
let cmdUsage = yargParser(metadata.usage)['_'];
|
const cmdUsage = yargParser(metadata.usage)['_'];
|
||||||
cmdUsage.splice(0, 1);
|
cmdUsage.splice(0, 1);
|
||||||
|
|
||||||
if (cmdUsage.length >= positionalArgs) {
|
if (cmdUsage.length >= positionalArgs) {
|
||||||
@@ -95,29 +95,29 @@ async function handleAutocompletionPromise(line) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (argName == 'tag') {
|
if (argName == 'tag') {
|
||||||
let tags = await Tag.search({ titlePattern: `${next}*` });
|
const tags = await Tag.search({ titlePattern: `${next}*` });
|
||||||
l.push(...tags.map(n => n.title));
|
l.push(...tags.map(n => n.title));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (argName == 'file') {
|
if (argName == 'file') {
|
||||||
let files = await fs.readdir('.');
|
const files = await fs.readdir('.');
|
||||||
l.push(...files);
|
l.push(...files);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (argName == 'tag-command') {
|
if (argName == 'tag-command') {
|
||||||
let c = filterList(['add', 'remove', 'list', 'notetags'], next);
|
const c = filterList(['add', 'remove', 'list', 'notetags'], next);
|
||||||
l.push(...c);
|
l.push(...c);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (argName == 'todo-command') {
|
if (argName == 'todo-command') {
|
||||||
let c = filterList(['toggle', 'clear'], next);
|
const c = filterList(['toggle', 'clear'], next);
|
||||||
l.push(...c);
|
l.push(...c);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (l.length === 1) {
|
if (l.length === 1) {
|
||||||
return toCommandLine([...words.slice(0, -1), l[0]]);
|
return toCommandLine([...words.slice(0, -1), l[0]]);
|
||||||
} else if (l.length > 1) {
|
} else if (l.length > 1) {
|
||||||
let ret = l.map(a => toCommandLine(a));
|
const ret = l.map(a => toCommandLine(a));
|
||||||
ret.prefix = `${toCommandLine(words.slice(0, -1))} `;
|
ret.prefix = `${toCommandLine(words.slice(0, -1))} `;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@@ -155,7 +155,7 @@ function getArguments(line) {
|
|||||||
let inSingleQuotes = false;
|
let inSingleQuotes = false;
|
||||||
let inDoubleQuotes = false;
|
let inDoubleQuotes = false;
|
||||||
let currentWord = '';
|
let currentWord = '';
|
||||||
let parsed = [];
|
const parsed = [];
|
||||||
for (let i = 0; i < line.length; i++) {
|
for (let i = 0; i < line.length; i++) {
|
||||||
if (line[i] === '"') {
|
if (line[i] === '"') {
|
||||||
if (inDoubleQuotes) {
|
if (inDoubleQuotes) {
|
||||||
@@ -192,7 +192,7 @@ function getArguments(line) {
|
|||||||
return parsed;
|
return parsed;
|
||||||
}
|
}
|
||||||
function filterList(list, next) {
|
function filterList(list, next) {
|
||||||
let output = [];
|
const output = [];
|
||||||
for (let i = 0; i < list.length; i++) {
|
for (let i = 0; i < list.length; i++) {
|
||||||
if (list[i].indexOf(next) !== 0) continue;
|
if (list[i].indexOf(next) !== 0) continue;
|
||||||
output.push(list[i]);
|
output.push(list[i]);
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
const { _ } = require('lib/locale.js');
|
const { _ } = require('lib/locale');
|
||||||
const { reg } = require('lib/registry.js');
|
const { reg } = require('lib/registry.js');
|
||||||
|
|
||||||
class BaseCommand {
|
class BaseCommand {
|
||||||
@@ -50,7 +50,7 @@ class BaseCommand {
|
|||||||
async cancel() {}
|
async cancel() {}
|
||||||
|
|
||||||
name() {
|
name() {
|
||||||
let r = this.usage().split(' ');
|
const r = this.usage().split(' ');
|
||||||
return r[0];
|
return r[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
const fs = require('fs-extra');
|
const fs = require('fs-extra');
|
||||||
const { fileExtension, dirname } = require('lib/path-utils.js');
|
const { fileExtension, dirname } = require('lib/path-utils');
|
||||||
const wrap_ = require('word-wrap');
|
const wrap_ = require('word-wrap');
|
||||||
const { languageCode } = require('lib/locale.js');
|
const { languageCode } = require('lib/locale');
|
||||||
|
|
||||||
const rootDir = dirname(dirname(__dirname));
|
const rootDir = dirname(dirname(__dirname));
|
||||||
const MAX_WIDTH = 78;
|
const MAX_WIDTH = 78;
|
||||||
@@ -15,11 +15,11 @@ function wrap(text, indent) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function renderOptions(options) {
|
function renderOptions(options) {
|
||||||
let output = [];
|
const output = [];
|
||||||
const optionColWidth = getOptionColWidth(options);
|
const optionColWidth = getOptionColWidth(options);
|
||||||
|
|
||||||
for (let i = 0; i < options.length; i++) {
|
for (let i = 0; i < options.length; i++) {
|
||||||
let option = options[i];
|
const option = options[i];
|
||||||
const flag = option[0];
|
const flag = option[0];
|
||||||
const indent = INDENT + INDENT + ' '.repeat(optionColWidth + 2);
|
const indent = INDENT + INDENT + ' '.repeat(optionColWidth + 2);
|
||||||
|
|
||||||
@@ -33,7 +33,7 @@ function renderOptions(options) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function renderCommand(cmd) {
|
function renderCommand(cmd) {
|
||||||
let output = [];
|
const output = [];
|
||||||
output.push(INDENT + cmd.usage());
|
output.push(INDENT + cmd.usage());
|
||||||
output.push('');
|
output.push('');
|
||||||
output.push(wrap(cmd.description(), INDENT + INDENT));
|
output.push(wrap(cmd.description(), INDENT + INDENT));
|
||||||
@@ -48,14 +48,14 @@ function renderCommand(cmd) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function getCommands() {
|
function getCommands() {
|
||||||
let output = [];
|
const output = [];
|
||||||
fs.readdirSync(__dirname).forEach(path => {
|
fs.readdirSync(__dirname).forEach(path => {
|
||||||
if (path.indexOf('command-') !== 0) return;
|
if (path.indexOf('command-') !== 0) return;
|
||||||
const ext = fileExtension(path);
|
const ext = fileExtension(path);
|
||||||
if (ext != 'js') return;
|
if (ext != 'js') return;
|
||||||
|
|
||||||
let CommandClass = require(`./${path}`);
|
const CommandClass = require(`./${path}`);
|
||||||
let cmd = new CommandClass();
|
const cmd = new CommandClass();
|
||||||
if (!cmd.enabled()) return;
|
if (!cmd.enabled()) return;
|
||||||
if (cmd.hidden()) return;
|
if (cmd.hidden()) return;
|
||||||
output.push(cmd);
|
output.push(cmd);
|
||||||
@@ -73,7 +73,7 @@ function getOptionColWidth(options) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function getHeader() {
|
function getHeader() {
|
||||||
let output = [];
|
const output = [];
|
||||||
|
|
||||||
output.push('NAME');
|
output.push('NAME');
|
||||||
output.push('');
|
output.push('');
|
||||||
@@ -84,7 +84,7 @@ function getHeader() {
|
|||||||
output.push('DESCRIPTION');
|
output.push('DESCRIPTION');
|
||||||
output.push('');
|
output.push('');
|
||||||
|
|
||||||
let description = [];
|
const description = [];
|
||||||
description.push('Joplin is a note taking and to-do application, which can handle a large number of notes organised into notebooks.');
|
description.push('Joplin is a note taking and to-do application, which can handle a large number of notes organised into notebooks.');
|
||||||
description.push('The notes are searchable, can be copied, tagged and modified with your own text editor.');
|
description.push('The notes are searchable, can be copied, tagged and modified with your own text editor.');
|
||||||
description.push('\n\n');
|
description.push('\n\n');
|
||||||
@@ -98,7 +98,7 @@ function getHeader() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function getFooter() {
|
function getFooter() {
|
||||||
let output = [];
|
const output = [];
|
||||||
|
|
||||||
output.push('WEBSITE');
|
output.push('WEBSITE');
|
||||||
output.push('');
|
output.push('');
|
||||||
@@ -120,10 +120,10 @@ async function main() {
|
|||||||
// setLocale('fr_FR');
|
// setLocale('fr_FR');
|
||||||
|
|
||||||
const commands = getCommands();
|
const commands = getCommands();
|
||||||
let commandBlocks = [];
|
const commandBlocks = [];
|
||||||
|
|
||||||
for (let i = 0; i < commands.length; i++) {
|
for (let i = 0; i < commands.length; i++) {
|
||||||
let cmd = commands[i];
|
const cmd = commands[i];
|
||||||
commandBlocks.push(renderCommand(cmd));
|
commandBlocks.push(renderCommand(cmd));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,14 +1,14 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
const fs = require('fs-extra');
|
const fs = require('fs-extra');
|
||||||
const { Logger } = require('lib/logger.js');
|
const Logger = require('lib/Logger').default;
|
||||||
const { dirname } = require('lib/path-utils.js');
|
const { dirname } = require('lib/path-utils');
|
||||||
const { DatabaseDriverNode } = require('lib/database-driver-node.js');
|
const { DatabaseDriverNode } = require('lib/database-driver-node.js');
|
||||||
const { JoplinDatabase } = require('lib/joplin-database.js');
|
const { JoplinDatabase } = require('lib/joplin-database.js');
|
||||||
const BaseModel = require('lib/BaseModel.js');
|
const BaseModel = require('lib/BaseModel').default;
|
||||||
const Folder = require('lib/models/Folder.js');
|
const Folder = require('lib/models/Folder.js');
|
||||||
const Note = require('lib/models/Note.js');
|
const Note = require('lib/models/Note.js');
|
||||||
const Setting = require('lib/models/Setting.js');
|
const Setting = require('lib/models/Setting').default;
|
||||||
const { sprintf } = require('sprintf-js');
|
const { sprintf } = require('sprintf-js');
|
||||||
const exec = require('child_process').exec;
|
const exec = require('child_process').exec;
|
||||||
|
|
||||||
@@ -40,8 +40,8 @@ function createClient(id) {
|
|||||||
const client = createClient(1);
|
const client = createClient(1);
|
||||||
|
|
||||||
function execCommand(client, command) {
|
function execCommand(client, command) {
|
||||||
let exePath = `node ${joplinAppPath}`;
|
const exePath = `node ${joplinAppPath}`;
|
||||||
let cmd = `${exePath} --update-geolocation-disabled --env dev --profile ${client.profileDir} ${command}`;
|
const cmd = `${exePath} --update-geolocation-disabled --env dev --profile ${client.profileDir} ${command}`;
|
||||||
logger.info(`${client.id}: ${command}`);
|
logger.info(`${client.id}: ${command}`);
|
||||||
|
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
@@ -129,8 +129,8 @@ testUnits.testCat = async () => {
|
|||||||
await execCommand(client, 'mkbook nb1');
|
await execCommand(client, 'mkbook nb1');
|
||||||
await execCommand(client, 'mknote mynote');
|
await execCommand(client, 'mknote mynote');
|
||||||
|
|
||||||
let folder = await Folder.loadByTitle('nb1');
|
const folder = await Folder.loadByTitle('nb1');
|
||||||
let note = await Note.loadFolderNoteByField(folder.id, 'title', 'mynote');
|
const note = await Note.loadFolderNoteByField(folder.id, 'title', 'mynote');
|
||||||
|
|
||||||
let r = await execCommand(client, 'cat mynote');
|
let r = await execCommand(client, 'cat mynote');
|
||||||
assertTrue(r.indexOf('mynote') >= 0);
|
assertTrue(r.indexOf('mynote') >= 0);
|
||||||
@@ -149,7 +149,7 @@ testUnits.testConfig = async () => {
|
|||||||
await Setting.load();
|
await Setting.load();
|
||||||
assertEquals('subl', Setting.value('editor'));
|
assertEquals('subl', Setting.value('editor'));
|
||||||
|
|
||||||
let r = await execCommand(client, 'config');
|
const r = await execCommand(client, 'config');
|
||||||
assertTrue(r.indexOf('editor') >= 0);
|
assertTrue(r.indexOf('editor') >= 0);
|
||||||
assertTrue(r.indexOf('subl') >= 0);
|
assertTrue(r.indexOf('subl') >= 0);
|
||||||
};
|
};
|
||||||
@@ -161,14 +161,14 @@ testUnits.testCp = async () => {
|
|||||||
|
|
||||||
await execCommand(client, 'cp n1');
|
await execCommand(client, 'cp n1');
|
||||||
|
|
||||||
let f1 = await Folder.loadByTitle('nb1');
|
const f1 = await Folder.loadByTitle('nb1');
|
||||||
let f2 = await Folder.loadByTitle('nb2');
|
const f2 = await Folder.loadByTitle('nb2');
|
||||||
let notes = await Note.previews(f1.id);
|
let notes = await Note.previews(f1.id);
|
||||||
|
|
||||||
assertEquals(2, notes.length);
|
assertEquals(2, notes.length);
|
||||||
|
|
||||||
await execCommand(client, 'cp n1 nb2');
|
await execCommand(client, 'cp n1 nb2');
|
||||||
let notesF1 = await Note.previews(f1.id);
|
const notesF1 = await Note.previews(f1.id);
|
||||||
assertEquals(2, notesF1.length);
|
assertEquals(2, notesF1.length);
|
||||||
notes = await Note.previews(f2.id);
|
notes = await Note.previews(f2.id);
|
||||||
assertEquals(1, notes.length);
|
assertEquals(1, notes.length);
|
||||||
@@ -179,7 +179,7 @@ testUnits.testLs = async () => {
|
|||||||
await execCommand(client, 'mkbook nb1');
|
await execCommand(client, 'mkbook nb1');
|
||||||
await execCommand(client, 'mknote note1');
|
await execCommand(client, 'mknote note1');
|
||||||
await execCommand(client, 'mknote note2');
|
await execCommand(client, 'mknote note2');
|
||||||
let r = await execCommand(client, 'ls');
|
const r = await execCommand(client, 'ls');
|
||||||
|
|
||||||
assertTrue(r.indexOf('note1') >= 0);
|
assertTrue(r.indexOf('note1') >= 0);
|
||||||
assertTrue(r.indexOf('note2') >= 0);
|
assertTrue(r.indexOf('note2') >= 0);
|
||||||
@@ -191,8 +191,8 @@ testUnits.testMv = async () => {
|
|||||||
await execCommand(client, 'mknote n1');
|
await execCommand(client, 'mknote n1');
|
||||||
await execCommand(client, 'mv n1 nb2');
|
await execCommand(client, 'mv n1 nb2');
|
||||||
|
|
||||||
let f1 = await Folder.loadByTitle('nb1');
|
const f1 = await Folder.loadByTitle('nb1');
|
||||||
let f2 = await Folder.loadByTitle('nb2');
|
const f2 = await Folder.loadByTitle('nb2');
|
||||||
let notes1 = await Note.previews(f1.id);
|
let notes1 = await Note.previews(f1.id);
|
||||||
let notes2 = await Note.previews(f2.id);
|
let notes2 = await Note.previews(f2.id);
|
||||||
|
|
||||||
@@ -218,18 +218,18 @@ async function main() {
|
|||||||
logger.info(await execCommand(client, 'version'));
|
logger.info(await execCommand(client, 'version'));
|
||||||
|
|
||||||
await db.open({ name: `${client.profileDir}/database.sqlite` });
|
await db.open({ name: `${client.profileDir}/database.sqlite` });
|
||||||
BaseModel.db_ = db;
|
BaseModel.setDb(db);
|
||||||
await Setting.load();
|
await Setting.load();
|
||||||
|
|
||||||
let onlyThisTest = 'testMv';
|
let onlyThisTest = 'testMv';
|
||||||
onlyThisTest = '';
|
onlyThisTest = '';
|
||||||
|
|
||||||
for (let n in testUnits) {
|
for (const n in testUnits) {
|
||||||
if (!testUnits.hasOwnProperty(n)) continue;
|
if (!testUnits.hasOwnProperty(n)) continue;
|
||||||
if (onlyThisTest && n != onlyThisTest) continue;
|
if (onlyThisTest && n != onlyThisTest) continue;
|
||||||
|
|
||||||
await clearDatabase();
|
await clearDatabase();
|
||||||
let testName = n.substr(4).toLowerCase();
|
const testName = n.substr(4).toLowerCase();
|
||||||
process.stdout.write(`${testName}: `);
|
process.stdout.write(`${testName}: `);
|
||||||
await testUnits[n]();
|
await testUnits[n]();
|
||||||
console.info('');
|
console.info('');
|
||||||
|
@@ -1,7 +1,8 @@
|
|||||||
const yargParser = require('yargs-parser');
|
const yargParser = require('yargs-parser');
|
||||||
const { _ } = require('lib/locale.js');
|
const { _ } = require('lib/locale');
|
||||||
const { time } = require('lib/time-utils.js');
|
const time = require('lib/time').default;
|
||||||
const stringPadding = require('string-padding');
|
const stringPadding = require('string-padding');
|
||||||
|
const Logger = require('lib/Logger').default;
|
||||||
|
|
||||||
const cliUtils = {};
|
const cliUtils = {};
|
||||||
|
|
||||||
@@ -11,27 +12,27 @@ cliUtils.printArray = function(logFunction, rows) {
|
|||||||
const ALIGN_LEFT = 0;
|
const ALIGN_LEFT = 0;
|
||||||
const ALIGN_RIGHT = 1;
|
const ALIGN_RIGHT = 1;
|
||||||
|
|
||||||
let colWidths = [];
|
const colWidths = [];
|
||||||
let colAligns = [];
|
const colAligns = [];
|
||||||
|
|
||||||
for (let i = 0; i < rows.length; i++) {
|
for (let i = 0; i < rows.length; i++) {
|
||||||
let row = rows[i];
|
const row = rows[i];
|
||||||
|
|
||||||
for (let j = 0; j < row.length; j++) {
|
for (let j = 0; j < row.length; j++) {
|
||||||
let item = row[j];
|
const item = row[j];
|
||||||
let width = item ? item.toString().length : 0;
|
const width = item ? item.toString().length : 0;
|
||||||
let align = typeof item == 'number' ? ALIGN_RIGHT : ALIGN_LEFT;
|
const align = typeof item == 'number' ? ALIGN_RIGHT : ALIGN_LEFT;
|
||||||
if (!colWidths[j] || colWidths[j] < width) colWidths[j] = width;
|
if (!colWidths[j] || colWidths[j] < width) colWidths[j] = width;
|
||||||
if (colAligns.length <= j) colAligns[j] = align;
|
if (colAligns.length <= j) colAligns[j] = align;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (let row = 0; row < rows.length; row++) {
|
for (let row = 0; row < rows.length; row++) {
|
||||||
let line = [];
|
const line = [];
|
||||||
for (let col = 0; col < colWidths.length; col++) {
|
for (let col = 0; col < colWidths.length; col++) {
|
||||||
let item = rows[row][col];
|
const item = rows[row][col];
|
||||||
let width = colWidths[col];
|
const width = colWidths[col];
|
||||||
let dir = colAligns[col] == ALIGN_LEFT ? stringPadding.RIGHT : stringPadding.LEFT;
|
const dir = colAligns[col] == ALIGN_LEFT ? stringPadding.RIGHT : stringPadding.LEFT;
|
||||||
line.push(stringPadding(item, width, ' ', dir));
|
line.push(stringPadding(item, width, ' ', dir));
|
||||||
}
|
}
|
||||||
logFunction(line.join(' '));
|
logFunction(line.join(' '));
|
||||||
@@ -39,7 +40,7 @@ cliUtils.printArray = function(logFunction, rows) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
cliUtils.parseFlags = function(flags) {
|
cliUtils.parseFlags = function(flags) {
|
||||||
let output = {};
|
const output = {};
|
||||||
flags = flags.split(',');
|
flags = flags.split(',');
|
||||||
for (let i = 0; i < flags.length; i++) {
|
for (let i = 0; i < flags.length; i++) {
|
||||||
let f = flags[i].trim();
|
let f = flags[i].trim();
|
||||||
@@ -76,11 +77,11 @@ cliUtils.parseCommandArg = function(arg) {
|
|||||||
cliUtils.makeCommandArgs = function(cmd, argv) {
|
cliUtils.makeCommandArgs = function(cmd, argv) {
|
||||||
let cmdUsage = cmd.usage();
|
let cmdUsage = cmd.usage();
|
||||||
cmdUsage = yargParser(cmdUsage);
|
cmdUsage = yargParser(cmdUsage);
|
||||||
let output = {};
|
const output = {};
|
||||||
|
|
||||||
let options = cmd.options();
|
const options = cmd.options();
|
||||||
let booleanFlags = [];
|
const booleanFlags = [];
|
||||||
let aliases = {};
|
const aliases = {};
|
||||||
for (let i = 0; i < options.length; i++) {
|
for (let i = 0; i < options.length; i++) {
|
||||||
if (options[i].length != 2) throw new Error(`Invalid options: ${options[i]}`);
|
if (options[i].length != 2) throw new Error(`Invalid options: ${options[i]}`);
|
||||||
let flags = options[i][0];
|
let flags = options[i][0];
|
||||||
@@ -97,7 +98,7 @@ cliUtils.makeCommandArgs = function(cmd, argv) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let args = yargParser(argv, {
|
const args = yargParser(argv, {
|
||||||
boolean: booleanFlags,
|
boolean: booleanFlags,
|
||||||
alias: aliases,
|
alias: aliases,
|
||||||
string: ['_'],
|
string: ['_'],
|
||||||
@@ -113,8 +114,8 @@ cliUtils.makeCommandArgs = function(cmd, argv) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let argOptions = {};
|
const argOptions = {};
|
||||||
for (let key in args) {
|
for (const key in args) {
|
||||||
if (!args.hasOwnProperty(key)) continue;
|
if (!args.hasOwnProperty(key)) continue;
|
||||||
if (key == '_') continue;
|
if (key == '_') continue;
|
||||||
argOptions[key] = args[key];
|
argOptions[key] = args[key];
|
||||||
@@ -134,7 +135,7 @@ cliUtils.promptMcq = function(message, answers) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
message += '\n\n';
|
message += '\n\n';
|
||||||
for (let n in answers) {
|
for (const n in answers) {
|
||||||
if (!answers.hasOwnProperty(n)) continue;
|
if (!answers.hasOwnProperty(n)) continue;
|
||||||
message += `${_('%s: %s', n, answers[n])}\n`;
|
message += `${_('%s: %s', n, answers[n])}\n`;
|
||||||
}
|
}
|
||||||
@@ -245,4 +246,17 @@ cliUtils.redrawDone = function() {
|
|||||||
redrawStarted_ = false;
|
redrawStarted_ = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
cliUtils.stdoutLogger = function(stdout) {
|
||||||
|
const stdoutFn = (...s) => stdout(s.join(' '));
|
||||||
|
|
||||||
|
const logger = new Logger();
|
||||||
|
logger.addTarget('console', { console: {
|
||||||
|
info: stdoutFn,
|
||||||
|
warn: stdoutFn,
|
||||||
|
error: stdoutFn,
|
||||||
|
} });
|
||||||
|
|
||||||
|
return logger;
|
||||||
|
};
|
||||||
|
|
||||||
module.exports = { cliUtils };
|
module.exports = { cliUtils };
|
||||||
|
@@ -1,20 +1,25 @@
|
|||||||
const { BaseCommand } = require('./base-command.js');
|
const { BaseCommand } = require('./base-command.js');
|
||||||
const BaseItem = require('lib/models/BaseItem');
|
const BaseItem = require('lib/models/BaseItem');
|
||||||
const BaseModel = require('lib/BaseModel');
|
const BaseModel = require('lib/BaseModel').default;
|
||||||
const { toTitleCase } = require('lib/string-utils.js');
|
const { toTitleCase } = require('lib/string-utils.js');
|
||||||
const { reg } = require('lib/registry.js');
|
const { reg } = require('lib/registry.js');
|
||||||
const markdownUtils = require('lib/markdownUtils');
|
const markdownUtils = require('lib/markdownUtils').default;
|
||||||
const { Database } = require('lib/database.js');
|
const { Database } = require('lib/database.js');
|
||||||
|
const shim = require('lib/shim').default;
|
||||||
|
|
||||||
class Command extends BaseCommand {
|
class Command extends BaseCommand {
|
||||||
usage() {
|
usage() {
|
||||||
return 'apidoc';
|
return 'apidoc <file>';
|
||||||
}
|
}
|
||||||
|
|
||||||
description() {
|
description() {
|
||||||
return 'Build the API doc';
|
return 'Build the API doc';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
enabled() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
createPropertiesTable(tableFields) {
|
createPropertiesTable(tableFields) {
|
||||||
const headers = [
|
const headers = [
|
||||||
{ name: 'name', label: 'Name' },
|
{ name: 'name', label: 'Name' },
|
||||||
@@ -31,7 +36,7 @@ class Command extends BaseCommand {
|
|||||||
return markdownUtils.createMarkdownTable(headers, tableFields);
|
return markdownUtils.createMarkdownTable(headers, tableFields);
|
||||||
}
|
}
|
||||||
|
|
||||||
async action() {
|
async action(args) {
|
||||||
const models = [
|
const models = [
|
||||||
{
|
{
|
||||||
type: BaseModel.TYPE_NOTE,
|
type: BaseModel.TYPE_NOTE,
|
||||||
@@ -49,10 +54,9 @@ class Command extends BaseCommand {
|
|||||||
|
|
||||||
const lines = [];
|
const lines = [];
|
||||||
|
|
||||||
lines.push('# Joplin API');
|
lines.push('# Joplin Data API');
|
||||||
lines.push('');
|
lines.push('');
|
||||||
|
lines.push('This API is available when the clipper server is running. It provides access to the notes, notebooks, tags and other Joplin object via a REST API. Plugins can also access this API even when the clipper server is not running.');
|
||||||
lines.push('When the Web Clipper service is enabled, Joplin exposes a [REST API](https://en.wikipedia.org/wiki/Representational_state_transfer) which allows third-party applications to access Joplin\'s data and to create, modify or delete notes, notebooks, resources or tags.');
|
|
||||||
lines.push('');
|
lines.push('');
|
||||||
lines.push('In order to use it, you\'ll first need to find on which port the service is running. To do so, open the Web Clipper Options in Joplin and if the service is running it should tell you on which port. Normally it runs on port **41184**. If you want to find it programmatically, you may follow this kind of algorithm:');
|
lines.push('In order to use it, you\'ll first need to find on which port the service is running. To do so, open the Web Clipper Options in Joplin and if the service is running it should tell you on which port. Normally it runs on port **41184**. If you want to find it programmatically, you may follow this kind of algorithm:');
|
||||||
lines.push('');
|
lines.push('');
|
||||||
@@ -109,6 +113,51 @@ class Command extends BaseCommand {
|
|||||||
lines.push('');
|
lines.push('');
|
||||||
lines.push('\tcurl http://localhost:41184/tags?fields=id');
|
lines.push('\tcurl http://localhost:41184/tags?fields=id');
|
||||||
lines.push('');
|
lines.push('');
|
||||||
|
lines.push('By default API results will contain the following fields: **id**, **parent_id**, **title**');
|
||||||
|
|
||||||
|
lines.push('# Pagination');
|
||||||
|
lines.push('');
|
||||||
|
lines.push('All API calls that return multiple results will be paginated. The actual results will be under the `items` key, and if there are more results, there will also be a `cursor` key, which allows you to fetch the next results. If the `cursor` key is not present, it means you have reached the end of the data set.');
|
||||||
|
lines.push('');
|
||||||
|
lines.push('You can specify how the results should be sorted using the `order_by` and `order_dir` query parameters, and you can specify the number of items to be returned using the `limit` parameter (the maximum being 100 items).');
|
||||||
|
lines.push('');
|
||||||
|
lines.push('The following call for example will initiate a request to fetch all the notes, 10 at a time, and sorted by "updated_time" ascending:');
|
||||||
|
lines.push('');
|
||||||
|
lines.push('\tcurl http://localhost:41184/notes?order_by=updated_time&order_dir=ASC&limit=10');
|
||||||
|
lines.push('');
|
||||||
|
lines.push('This will return a result like this');
|
||||||
|
lines.push('');
|
||||||
|
lines.push('\t{ "items": [ /* 10 notes */ ], "cursor": "somecursor" }');
|
||||||
|
lines.push('');
|
||||||
|
lines.push('Then you will resume fetching the results using this query:');
|
||||||
|
lines.push('');
|
||||||
|
lines.push('\tcurl http://localhost:41184/notes?cursor=somecursor');
|
||||||
|
lines.push('');
|
||||||
|
lines.push('Note that you only need to pass the cursor to the next request, as it will continue the fetching process using the same parameters you initially provided.');
|
||||||
|
lines.push('');
|
||||||
|
lines.push('Eventually you will get some results that do not contain a "cursor" paramater, at which point you will have retrieved all the results');
|
||||||
|
lines.push('');
|
||||||
|
lines.push('As an example the pseudo-code below could be used to fetch all the notes:');
|
||||||
|
lines.push('');
|
||||||
|
lines.push('```javascript');
|
||||||
|
lines.push(`
|
||||||
|
async function fetchJson(url) {
|
||||||
|
return (await fetch(url)).json();
|
||||||
|
}
|
||||||
|
|
||||||
|
async function fetchAllNotes() {
|
||||||
|
let query = '';
|
||||||
|
const url = 'http://localhost:41184/notes';
|
||||||
|
|
||||||
|
do {
|
||||||
|
const response = await fetchJson(url + query);
|
||||||
|
console.info('Printing notes:');
|
||||||
|
console.info(response.items);
|
||||||
|
query = '?cursor' + response.cursor;
|
||||||
|
} while (response.cursor)
|
||||||
|
}`);
|
||||||
|
lines.push('```');
|
||||||
|
lines.push('');
|
||||||
|
|
||||||
lines.push('# Error handling');
|
lines.push('# Error handling');
|
||||||
lines.push('');
|
lines.push('');
|
||||||
@@ -287,7 +336,7 @@ class Command extends BaseCommand {
|
|||||||
lines.push('');
|
lines.push('');
|
||||||
lines.push('### Creating a note with a specific ID');
|
lines.push('### Creating a note with a specific ID');
|
||||||
lines.push('');
|
lines.push('');
|
||||||
lines.push('When a new note is created, it is automatically assigned a new unique ID so **normally you do not need to set the ID**. However, if for some reason you want to set it, you can supply it as the `id` property. It needs to be a 32 characters long hexadecimal string. **Make sure it is unique**, for example by generating it using whatever GUID function is available in your programming language.');
|
lines.push('When a new note is created, it is automatically assigned a new unique ID so **normally you do not need to set the ID**. However, if for some reason you want to set it, you can supply it as the `id` property. It needs to be a **32 characters long string** in hexadecimal. **Make sure it is unique**, for example by generating it using whatever GUID function is available in your programming language.');
|
||||||
lines.push('');
|
lines.push('');
|
||||||
lines.push(' curl --data \'{ "id": "00a87474082744c1a8515da6aa5792d2", "title": "My note with custom ID"}\' http://127.0.0.1:41184/notes');
|
lines.push(' curl --data \'{ "id": "00a87474082744c1a8515da6aa5792d2", "title": "My note with custom ID"}\' http://127.0.0.1:41184/notes');
|
||||||
lines.push('');
|
lines.push('');
|
||||||
@@ -311,7 +360,9 @@ class Command extends BaseCommand {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.stdout(lines.join('\n'));
|
const outFilePath = args['file'];
|
||||||
|
|
||||||
|
await shim.fsDriver().writeFile(outFilePath, lines.join('\n'), 'utf8');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
const { BaseCommand } = require('./base-command.js');
|
const { BaseCommand } = require('./base-command.js');
|
||||||
const { app } = require('./app.js');
|
const { app } = require('./app.js');
|
||||||
const { _ } = require('lib/locale.js');
|
const { _ } = require('lib/locale');
|
||||||
const BaseModel = require('lib/BaseModel.js');
|
const BaseModel = require('lib/BaseModel').default;
|
||||||
const { shim } = require('lib/shim.js');
|
const shim = require('lib/shim').default;
|
||||||
|
|
||||||
class Command extends BaseCommand {
|
class Command extends BaseCommand {
|
||||||
usage() {
|
usage() {
|
||||||
@@ -14,9 +14,9 @@ class Command extends BaseCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async action(args) {
|
async action(args) {
|
||||||
let title = args['note'];
|
const title = args['note'];
|
||||||
|
|
||||||
let note = await app().loadItem(BaseModel.TYPE_NOTE, title, { parent: app().currentFolder() });
|
const note = await app().loadItem(BaseModel.TYPE_NOTE, title, { parent: app().currentFolder() });
|
||||||
this.encryptionCheck(note);
|
this.encryptionCheck(note);
|
||||||
if (!note) throw new Error(_('Cannot find "%s".', title));
|
if (!note) throw new Error(_('Cannot find "%s".', title));
|
||||||
|
|
||||||
|
@@ -1,7 +1,8 @@
|
|||||||
const { BaseCommand } = require('./base-command.js');
|
const { BaseCommand } = require('./base-command.js');
|
||||||
const { app } = require('./app.js');
|
const { app } = require('./app.js');
|
||||||
const { _ } = require('lib/locale.js');
|
const { _ } = require('lib/locale');
|
||||||
const BaseModel = require('lib/BaseModel.js');
|
const BaseModel = require('lib/BaseModel').default;
|
||||||
|
const BaseItem = require('lib/models/BaseItem.js');
|
||||||
const Note = require('lib/models/Note.js');
|
const Note = require('lib/models/Note.js');
|
||||||
|
|
||||||
class Command extends BaseCommand {
|
class Command extends BaseCommand {
|
||||||
@@ -18,20 +19,22 @@ class Command extends BaseCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async action(args) {
|
async action(args) {
|
||||||
let title = args['note'];
|
const title = args['note'];
|
||||||
|
|
||||||
let item = await app().loadItem(BaseModel.TYPE_NOTE, title, { parent: app().currentFolder() });
|
const item = await app().loadItem(BaseModel.TYPE_NOTE, title, { parent: app().currentFolder() });
|
||||||
if (!item) throw new Error(_('Cannot find "%s".', title));
|
if (!item) throw new Error(_('Cannot find "%s".', title));
|
||||||
|
|
||||||
const content = args.options.verbose ? await Note.serialize(item) : await Note.serializeForEdit(item);
|
let content = '';
|
||||||
this.stdout(content);
|
|
||||||
|
|
||||||
app()
|
if (item.encryption_applied) {
|
||||||
.gui()
|
content = BaseItem.displayTitle(item);
|
||||||
.showConsole();
|
} else {
|
||||||
app()
|
content = args.options.verbose ? await Note.serialize(item) : await Note.serializeForEdit(item);
|
||||||
.gui()
|
}
|
||||||
.maximizeConsole();
|
|
||||||
|
this.stdout(content);
|
||||||
|
app().gui().showConsole();
|
||||||
|
app().gui().maximizeConsole();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
const { BaseCommand } = require('./base-command.js');
|
const { BaseCommand } = require('./base-command.js');
|
||||||
const { _, setLocale } = require('lib/locale.js');
|
const { _, setLocale } = require('lib/locale');
|
||||||
const { app } = require('./app.js');
|
const { app } = require('./app.js');
|
||||||
const fs = require('fs-extra');
|
const fs = require('fs-extra');
|
||||||
const Setting = require('lib/models/Setting.js');
|
const Setting = require('lib/models/Setting').default;
|
||||||
|
|
||||||
class Command extends BaseCommand {
|
class Command extends BaseCommand {
|
||||||
usage() {
|
usage() {
|
||||||
@@ -35,7 +35,7 @@ class Command extends BaseCommand {
|
|||||||
});
|
});
|
||||||
|
|
||||||
inputStream.on('end', () => {
|
inputStream.on('end', () => {
|
||||||
let json = chunks.join('');
|
const json = chunks.join('');
|
||||||
let settingsObj;
|
let settingsObj;
|
||||||
try {
|
try {
|
||||||
settingsObj = JSON.parse(json);
|
settingsObj = JSON.parse(json);
|
||||||
@@ -83,7 +83,7 @@ class Command extends BaseCommand {
|
|||||||
};
|
};
|
||||||
|
|
||||||
if (isExport || (!isImport && !args.value)) {
|
if (isExport || (!isImport && !args.value)) {
|
||||||
let keys = Setting.keys(!verbose, 'cli');
|
const keys = Setting.keys(!verbose, 'cli');
|
||||||
keys.sort();
|
keys.sort();
|
||||||
|
|
||||||
if (isExport) {
|
if (isExport) {
|
||||||
@@ -124,7 +124,6 @@ class Command extends BaseCommand {
|
|||||||
|
|
||||||
if (args.name == 'locale') {
|
if (args.name == 'locale') {
|
||||||
setLocale(Setting.value('locale'));
|
setLocale(Setting.value('locale'));
|
||||||
app().onLocaleChanged();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
await Setting.saveAll();
|
await Setting.saveAll();
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
const { BaseCommand } = require('./base-command.js');
|
const { BaseCommand } = require('./base-command.js');
|
||||||
const { app } = require('./app.js');
|
const { app } = require('./app.js');
|
||||||
const { _ } = require('lib/locale.js');
|
const { _ } = require('lib/locale');
|
||||||
const BaseModel = require('lib/BaseModel.js');
|
const BaseModel = require('lib/BaseModel').default;
|
||||||
const Note = require('lib/models/Note.js');
|
const Note = require('lib/models/Note.js');
|
||||||
|
|
||||||
class Command extends BaseCommand {
|
class Command extends BaseCommand {
|
||||||
|
@@ -1,9 +1,9 @@
|
|||||||
const { BaseCommand } = require('./base-command.js');
|
const { BaseCommand } = require('./base-command.js');
|
||||||
const { app } = require('./app.js');
|
const { app } = require('./app.js');
|
||||||
const { _ } = require('lib/locale.js');
|
const { _ } = require('lib/locale');
|
||||||
const BaseModel = require('lib/BaseModel.js');
|
const BaseModel = require('lib/BaseModel').default;
|
||||||
const Note = require('lib/models/Note.js');
|
const Note = require('lib/models/Note.js');
|
||||||
const { time } = require('lib/time-utils.js');
|
const time = require('lib/time').default;
|
||||||
|
|
||||||
class Command extends BaseCommand {
|
class Command extends BaseCommand {
|
||||||
usage() {
|
usage() {
|
||||||
|
@@ -18,15 +18,15 @@ class Command extends BaseCommand {
|
|||||||
|
|
||||||
async action() {
|
async action() {
|
||||||
let items = [];
|
let items = [];
|
||||||
let folders = await Folder.all();
|
const folders = await Folder.all();
|
||||||
for (let i = 0; i < folders.length; i++) {
|
for (let i = 0; i < folders.length; i++) {
|
||||||
let folder = folders[i];
|
const folder = folders[i];
|
||||||
let notes = await Note.previews(folder.id);
|
const notes = await Note.previews(folder.id);
|
||||||
items.push(folder);
|
items.push(folder);
|
||||||
items = items.concat(notes);
|
items = items.concat(notes);
|
||||||
}
|
}
|
||||||
|
|
||||||
let tags = await Tag.all();
|
const tags = await Tag.all();
|
||||||
for (let i = 0; i < tags.length; i++) {
|
for (let i = 0; i < tags.length; i++) {
|
||||||
tags[i].notes_ = await Tag.noteIds(tags[i].id);
|
tags[i].notes_ = await Tag.noteIds(tags[i].id);
|
||||||
}
|
}
|
||||||
|
@@ -1,11 +1,11 @@
|
|||||||
const { BaseCommand } = require('./base-command.js');
|
const { BaseCommand } = require('./base-command.js');
|
||||||
const { _ } = require('lib/locale.js');
|
const { _ } = require('lib/locale');
|
||||||
const EncryptionService = require('lib/services/EncryptionService');
|
const EncryptionService = require('lib/services/EncryptionService');
|
||||||
const DecryptionWorker = require('lib/services/DecryptionWorker');
|
const DecryptionWorker = require('lib/services/DecryptionWorker');
|
||||||
const BaseItem = require('lib/models/BaseItem');
|
const BaseItem = require('lib/models/BaseItem');
|
||||||
const Setting = require('lib/models/Setting.js');
|
const Setting = require('lib/models/Setting').default;
|
||||||
const { shim } = require('lib/shim');
|
const shim = require('lib/shim').default;
|
||||||
const pathUtils = require('lib/path-utils.js');
|
const pathUtils = require('lib/path-utils');
|
||||||
const imageType = require('image-type');
|
const imageType = require('image-type');
|
||||||
const readChunk = require('read-chunk');
|
const readChunk = require('read-chunk');
|
||||||
|
|
||||||
@@ -24,12 +24,11 @@ class Command extends BaseCommand {
|
|||||||
['-p, --password <password>', 'Use this password as master password (For security reasons, it is not recommended to use this option).'],
|
['-p, --password <password>', 'Use this password as master password (For security reasons, it is not recommended to use this option).'],
|
||||||
['-v, --verbose', 'More verbose output for the `target-status` command'],
|
['-v, --verbose', 'More verbose output for the `target-status` command'],
|
||||||
['-o, --output <directory>', 'Output directory'],
|
['-o, --output <directory>', 'Output directory'],
|
||||||
|
['--retry-failed-items', 'Applies to `decrypt` command - retries decrypting items that previously could not be decrypted.'],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
async action(args) {
|
async action(args) {
|
||||||
// change-password
|
|
||||||
|
|
||||||
const options = args.options;
|
const options = args.options;
|
||||||
|
|
||||||
const askForMasterKey = async error => {
|
const askForMasterKey = async error => {
|
||||||
@@ -39,11 +38,38 @@ class Command extends BaseCommand {
|
|||||||
this.stdout(_('Operation cancelled'));
|
this.stdout(_('Operation cancelled'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
Setting.setObjectKey('encryption.passwordCache', masterKeyId, password);
|
Setting.setObjectValue('encryption.passwordCache', masterKeyId, password);
|
||||||
await EncryptionService.instance().loadMasterKeysFromSettings();
|
await EncryptionService.instance().loadMasterKeysFromSettings();
|
||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const startDecryption = async () => {
|
||||||
|
this.stdout(_('Starting decryption... Please wait as it may take several minutes depending on how much there is to decrypt.'));
|
||||||
|
while (true) {
|
||||||
|
try {
|
||||||
|
const result = await DecryptionWorker.instance().start();
|
||||||
|
|
||||||
|
if (result.error) throw result.error;
|
||||||
|
|
||||||
|
const line = [];
|
||||||
|
line.push(_('Decrypted items: %d', result.decryptedItemCount));
|
||||||
|
if (result.skippedItemCount) line.push(_('Skipped items: %d (use --retry-failed-items to retry decrypting them)', result.skippedItemCount));
|
||||||
|
this.stdout(line.join('\n'));
|
||||||
|
break;
|
||||||
|
} catch (error) {
|
||||||
|
if (error.code === 'masterKeyNotLoaded') {
|
||||||
|
const ok = await askForMasterKey(error);
|
||||||
|
if (!ok) return;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
throw error;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
this.stdout(_('Completed decryption.'));
|
||||||
|
};
|
||||||
|
|
||||||
if (args.command === 'enable') {
|
if (args.command === 'enable') {
|
||||||
const password = options.password ? options.password.toString() : await this.prompt(_('Enter master password:'), { type: 'string', secure: true });
|
const password = options.password ? options.password.toString() : await this.prompt(_('Enter master password:'), { type: 'string', secure: true });
|
||||||
if (!password) {
|
if (!password) {
|
||||||
@@ -73,24 +99,8 @@ class Command extends BaseCommand {
|
|||||||
const plainText = await EncryptionService.instance().decryptString(args.path);
|
const plainText = await EncryptionService.instance().decryptString(args.path);
|
||||||
this.stdout(plainText);
|
this.stdout(plainText);
|
||||||
} else {
|
} else {
|
||||||
this.stdout(_('Starting decryption... Please wait as it may take several minutes depending on how much there is to decrypt.'));
|
if (args.options['retry-failed-items']) await DecryptionWorker.instance().clearDisabledItems();
|
||||||
|
await startDecryption();
|
||||||
while (true) {
|
|
||||||
try {
|
|
||||||
await DecryptionWorker.instance().start();
|
|
||||||
break;
|
|
||||||
} catch (error) {
|
|
||||||
if (error.code === 'masterKeyNotLoaded') {
|
|
||||||
const ok = await askForMasterKey(error);
|
|
||||||
if (!ok) return;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
throw error;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
this.stdout(_('Completed decryption.'));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
@@ -138,7 +148,7 @@ class Command extends BaseCommand {
|
|||||||
if (!targetPath) throw new Error('Please specify the sync target path.');
|
if (!targetPath) throw new Error('Please specify the sync target path.');
|
||||||
|
|
||||||
const dirPaths = function(targetPath) {
|
const dirPaths = function(targetPath) {
|
||||||
let paths = [];
|
const paths = [];
|
||||||
fs.readdirSync(targetPath).forEach(path => {
|
fs.readdirSync(targetPath).forEach(path => {
|
||||||
paths.push(path);
|
paths.push(path);
|
||||||
});
|
});
|
||||||
@@ -151,10 +161,10 @@ class Command extends BaseCommand {
|
|||||||
let encryptedResourceCount = 0;
|
let encryptedResourceCount = 0;
|
||||||
let otherItemCount = 0;
|
let otherItemCount = 0;
|
||||||
|
|
||||||
let encryptedPaths = [];
|
const encryptedPaths = [];
|
||||||
let decryptedPaths = [];
|
const decryptedPaths = [];
|
||||||
|
|
||||||
let paths = dirPaths(targetPath);
|
const paths = dirPaths(targetPath);
|
||||||
|
|
||||||
for (let i = 0; i < paths.length; i++) {
|
for (let i = 0; i < paths.length; i++) {
|
||||||
const path = paths[i];
|
const path = paths[i];
|
||||||
@@ -164,7 +174,7 @@ class Command extends BaseCommand {
|
|||||||
// this.stdout(fullPath);
|
// this.stdout(fullPath);
|
||||||
|
|
||||||
if (path === '.resource') {
|
if (path === '.resource') {
|
||||||
let resourcePaths = dirPaths(fullPath);
|
const resourcePaths = dirPaths(fullPath);
|
||||||
for (let j = 0; j < resourcePaths.length; j++) {
|
for (let j = 0; j < resourcePaths.length; j++) {
|
||||||
const resourcePath = resourcePaths[j];
|
const resourcePath = resourcePaths[j];
|
||||||
resourceCount++;
|
resourceCount++;
|
||||||
|
@@ -1,12 +1,12 @@
|
|||||||
const fs = require('fs-extra');
|
const fs = require('fs-extra');
|
||||||
const { BaseCommand } = require('./base-command.js');
|
const { BaseCommand } = require('./base-command.js');
|
||||||
const { splitCommandString } = require('lib/string-utils.js');
|
const { splitCommandString } = require('lib/string-utils.js');
|
||||||
const { uuid } = require('lib/uuid.js');
|
const uuid = require('lib/uuid').default;
|
||||||
const { app } = require('./app.js');
|
const { app } = require('./app.js');
|
||||||
const { _ } = require('lib/locale.js');
|
const { _ } = require('lib/locale');
|
||||||
const Note = require('lib/models/Note.js');
|
const Note = require('lib/models/Note.js');
|
||||||
const Setting = require('lib/models/Setting.js');
|
const Setting = require('lib/models/Setting').default;
|
||||||
const BaseModel = require('lib/BaseModel.js');
|
const BaseModel = require('lib/BaseModel').default;
|
||||||
|
|
||||||
class Command extends BaseCommand {
|
class Command extends BaseCommand {
|
||||||
usage() {
|
usage() {
|
||||||
@@ -35,7 +35,7 @@ class Command extends BaseCommand {
|
|||||||
// Load note or create it if it doesn't exist
|
// Load note or create it if it doesn't exist
|
||||||
// -------------------------------------------------------------------------
|
// -------------------------------------------------------------------------
|
||||||
|
|
||||||
let title = args['note'];
|
const title = args['note'];
|
||||||
|
|
||||||
if (!app().currentFolder()) throw new Error(_('No active notebook.'));
|
if (!app().currentFolder()) throw new Error(_('No active notebook.'));
|
||||||
let note = await app().loadItem(BaseModel.TYPE_NOTE, title);
|
let note = await app().loadItem(BaseModel.TYPE_NOTE, title);
|
||||||
@@ -91,7 +91,7 @@ class Command extends BaseCommand {
|
|||||||
|
|
||||||
const updatedContent = await fs.readFile(tempFilePath, 'utf8');
|
const updatedContent = await fs.readFile(tempFilePath, 'utf8');
|
||||||
if (updatedContent !== originalContent) {
|
if (updatedContent !== originalContent) {
|
||||||
let updatedNote = await Note.unserializeForEdit(updatedContent);
|
const updatedNote = await Note.unserializeForEdit(updatedContent);
|
||||||
updatedNote.id = note.id;
|
updatedNote.id = note.id;
|
||||||
await Note.save(updatedNote);
|
await Note.save(updatedNote);
|
||||||
this.stdout(_('Note has been saved.'));
|
this.stdout(_('Note has been saved.'));
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
const { BaseCommand } = require('./base-command.js');
|
const { BaseCommand } = require('./base-command.js');
|
||||||
const { app } = require('./app.js');
|
const { app } = require('./app.js');
|
||||||
const { _ } = require('lib/locale.js');
|
const { _ } = require('lib/locale');
|
||||||
|
|
||||||
class Command extends BaseCommand {
|
class Command extends BaseCommand {
|
||||||
usage() {
|
usage() {
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
const { BaseCommand } = require('./base-command.js');
|
const { BaseCommand } = require('./base-command.js');
|
||||||
const { app } = require('./app.js');
|
const { app } = require('./app.js');
|
||||||
const Setting = require('lib/models/Setting.js');
|
const Setting = require('lib/models/Setting').default;
|
||||||
const { ReportService } = require('lib/services/report.js');
|
const { ReportService } = require('lib/services/report.js');
|
||||||
const fs = require('fs-extra');
|
const fs = require('fs-extra');
|
||||||
|
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
const { BaseCommand } = require('./base-command.js');
|
const { BaseCommand } = require('./base-command.js');
|
||||||
const InteropService = require('lib/services/InteropService.js');
|
const InteropService = require('lib/services/interop/InteropService').default;
|
||||||
const BaseModel = require('lib/BaseModel.js');
|
const BaseModel = require('lib/BaseModel').default;
|
||||||
const { app } = require('./app.js');
|
const { app } = require('./app.js');
|
||||||
const { _ } = require('lib/locale.js');
|
const { _ } = require('lib/locale');
|
||||||
|
|
||||||
class Command extends BaseCommand {
|
class Command extends BaseCommand {
|
||||||
usage() {
|
usage() {
|
||||||
@@ -14,21 +14,23 @@ class Command extends BaseCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
options() {
|
options() {
|
||||||
const service = new InteropService();
|
const service = InteropService.instance();
|
||||||
const formats = service
|
const formats = service
|
||||||
.modules()
|
.modules()
|
||||||
.filter(m => m.type === 'exporter')
|
.filter(m => m.type === 'exporter' && m.format !== 'html')
|
||||||
.map(m => m.format + (m.description ? ` (${m.description})` : ''));
|
.map(m => m.format + (m.description ? ` (${m.description})` : ''));
|
||||||
|
|
||||||
return [['--format <format>', _('Destination format: %s', formats.join(', '))], ['--note <note>', _('Exports only the given note.')], ['--notebook <notebook>', _('Exports only the given notebook.')]];
|
return [['--format <format>', _('Destination format: %s', formats.join(', '))], ['--note <note>', _('Exports only the given note.')], ['--notebook <notebook>', _('Exports only the given notebook.')]];
|
||||||
}
|
}
|
||||||
|
|
||||||
async action(args) {
|
async action(args) {
|
||||||
let exportOptions = {};
|
const exportOptions = {};
|
||||||
exportOptions.path = args.path;
|
exportOptions.path = args.path;
|
||||||
|
|
||||||
exportOptions.format = args.options.format ? args.options.format : 'jex';
|
exportOptions.format = args.options.format ? args.options.format : 'jex';
|
||||||
|
|
||||||
|
if (exportOptions.format === 'html') throw new Error('HTML export is not supported. Please use the desktop application.');
|
||||||
|
|
||||||
if (args.options.note) {
|
if (args.options.note) {
|
||||||
const notes = await app().loadItems(BaseModel.TYPE_NOTE, args.options.note, { parent: app().currentFolder() });
|
const notes = await app().loadItems(BaseModel.TYPE_NOTE, args.options.note, { parent: app().currentFolder() });
|
||||||
if (!notes.length) throw new Error(_('Cannot find "%s".', args.options.note));
|
if (!notes.length) throw new Error(_('Cannot find "%s".', args.options.note));
|
||||||
@@ -39,7 +41,7 @@ class Command extends BaseCommand {
|
|||||||
exportOptions.sourceFolderIds = folders.map(n => n.id);
|
exportOptions.sourceFolderIds = folders.map(n => n.id);
|
||||||
}
|
}
|
||||||
|
|
||||||
const service = new InteropService();
|
const service = InteropService.instance();
|
||||||
const result = await service.export(exportOptions);
|
const result = await service.export(exportOptions);
|
||||||
|
|
||||||
result.warnings.map(w => this.stdout(w));
|
result.warnings.map(w => this.stdout(w));
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
const { BaseCommand } = require('./base-command.js');
|
const { BaseCommand } = require('./base-command.js');
|
||||||
const { app } = require('./app.js');
|
const { app } = require('./app.js');
|
||||||
const { _ } = require('lib/locale.js');
|
const { _ } = require('lib/locale');
|
||||||
const BaseModel = require('lib/BaseModel.js');
|
const BaseModel = require('lib/BaseModel').default;
|
||||||
const Note = require('lib/models/Note.js');
|
const Note = require('lib/models/Note.js');
|
||||||
|
|
||||||
class Command extends BaseCommand {
|
class Command extends BaseCommand {
|
||||||
@@ -14,9 +14,9 @@ class Command extends BaseCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async action(args) {
|
async action(args) {
|
||||||
let title = args['note'];
|
const title = args['note'];
|
||||||
|
|
||||||
let item = await app().loadItem(BaseModel.TYPE_NOTE, title, { parent: app().currentFolder() });
|
const item = await app().loadItem(BaseModel.TYPE_NOTE, title, { parent: app().currentFolder() });
|
||||||
if (!item) throw new Error(_('Cannot find "%s".', title));
|
if (!item) throw new Error(_('Cannot find "%s".', title));
|
||||||
const url = Note.geolocationUrl(item);
|
const url = Note.geolocationUrl(item);
|
||||||
this.stdout(url);
|
this.stdout(url);
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
const { BaseCommand } = require('./base-command.js');
|
const { BaseCommand } = require('./base-command.js');
|
||||||
const { app } = require('./app.js');
|
const { app } = require('./app.js');
|
||||||
const { renderCommandHelp } = require('./help-utils.js');
|
const { renderCommandHelp } = require('./help-utils.js');
|
||||||
const { _ } = require('lib/locale.js');
|
const { _ } = require('lib/locale');
|
||||||
const { cliUtils } = require('./cli-utils.js');
|
const { cliUtils } = require('./cli-utils.js');
|
||||||
|
|
||||||
class Command extends BaseCommand {
|
class Command extends BaseCommand {
|
||||||
@@ -15,8 +15,8 @@ class Command extends BaseCommand {
|
|||||||
|
|
||||||
allCommands() {
|
allCommands() {
|
||||||
const commands = app().commands(app().uiType());
|
const commands = app().commands(app().uiType());
|
||||||
let output = [];
|
const output = [];
|
||||||
for (let n in commands) {
|
for (const n in commands) {
|
||||||
if (!commands.hasOwnProperty(n)) continue;
|
if (!commands.hasOwnProperty(n)) continue;
|
||||||
const command = commands[n];
|
const command = commands[n];
|
||||||
if (command.hidden()) continue;
|
if (command.hidden()) continue;
|
||||||
@@ -48,7 +48,7 @@ class Command extends BaseCommand {
|
|||||||
.gui()
|
.gui()
|
||||||
.keymap();
|
.keymap();
|
||||||
|
|
||||||
let rows = [];
|
const rows = [];
|
||||||
|
|
||||||
for (let i = 0; i < keymap.length; i++) {
|
for (let i = 0; i < keymap.length; i++) {
|
||||||
const item = keymap[i];
|
const item = keymap[i];
|
||||||
|
@@ -1,9 +1,9 @@
|
|||||||
const { BaseCommand } = require('./base-command.js');
|
const { BaseCommand } = require('./base-command.js');
|
||||||
const InteropService = require('lib/services/InteropService.js');
|
const InteropService = require('lib/services/interop/InteropService').default;
|
||||||
const BaseModel = require('lib/BaseModel.js');
|
const BaseModel = require('lib/BaseModel').default;
|
||||||
const { cliUtils } = require('./cli-utils.js');
|
const { cliUtils } = require('./cli-utils.js');
|
||||||
const { app } = require('./app.js');
|
const { app } = require('./app.js');
|
||||||
const { _ } = require('lib/locale.js');
|
const { _ } = require('lib/locale');
|
||||||
|
|
||||||
class Command extends BaseCommand {
|
class Command extends BaseCommand {
|
||||||
usage() {
|
usage() {
|
||||||
@@ -15,17 +15,21 @@ class Command extends BaseCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
options() {
|
options() {
|
||||||
const service = new InteropService();
|
const service = InteropService.instance();
|
||||||
const formats = service
|
const formats = service
|
||||||
.modules()
|
.modules()
|
||||||
.filter(m => m.type === 'importer')
|
.filter(m => m.type === 'importer')
|
||||||
.map(m => m.format);
|
.map(m => m.format);
|
||||||
|
|
||||||
return [['--format <format>', _('Source format: %s', ['auto'].concat(formats).join(', '))], ['-f, --force', _('Do not ask for confirmation.')]];
|
return [
|
||||||
|
['--format <format>', _('Source format: %s', ['auto'].concat(formats).join(', '))],
|
||||||
|
['-f, --force', _('Do not ask for confirmation.')],
|
||||||
|
['--output-format <output-format>', _('Output format: %s', 'md, html')],
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
async action(args) {
|
async action(args) {
|
||||||
let folder = await app().loadItem(BaseModel.TYPE_FOLDER, args.notebook);
|
const folder = await app().loadItem(BaseModel.TYPE_FOLDER, args.notebook);
|
||||||
|
|
||||||
if (args.notebook && !folder) throw new Error(_('Cannot find "%s".', args.notebook));
|
if (args.notebook && !folder) throw new Error(_('Cannot find "%s".', args.notebook));
|
||||||
|
|
||||||
@@ -39,7 +43,7 @@ class Command extends BaseCommand {
|
|||||||
// onProgress/onError supported by Enex import only
|
// onProgress/onError supported by Enex import only
|
||||||
|
|
||||||
importOptions.onProgress = progressState => {
|
importOptions.onProgress = progressState => {
|
||||||
let line = [];
|
const line = [];
|
||||||
line.push(_('Found: %d.', progressState.loaded));
|
line.push(_('Found: %d.', progressState.loaded));
|
||||||
line.push(_('Created: %d.', progressState.created));
|
line.push(_('Created: %d.', progressState.created));
|
||||||
if (progressState.updated) line.push(_('Updated: %d.', progressState.updated));
|
if (progressState.updated) line.push(_('Updated: %d.', progressState.updated));
|
||||||
@@ -51,15 +55,15 @@ class Command extends BaseCommand {
|
|||||||
};
|
};
|
||||||
|
|
||||||
importOptions.onError = error => {
|
importOptions.onError = error => {
|
||||||
let s = error.trace ? error.trace : error.toString();
|
const s = error.trace ? error.trace : error.toString();
|
||||||
this.stdout(s);
|
this.stdout(s);
|
||||||
};
|
};
|
||||||
|
|
||||||
app()
|
if (args.options.outputFormat) importOptions.outputFormat = args.options.outputFormat;
|
||||||
.gui()
|
|
||||||
.showConsole();
|
app().gui().showConsole();
|
||||||
this.stdout(_('Importing notes...'));
|
this.stdout(_('Importing notes...'));
|
||||||
const service = new InteropService();
|
const service = InteropService.instance();
|
||||||
const result = await service.import(importOptions);
|
const result = await service.import(importOptions);
|
||||||
result.warnings.map(w => this.stdout(w));
|
result.warnings.map(w => this.stdout(w));
|
||||||
cliUtils.redrawDone();
|
cliUtils.redrawDone();
|
||||||
|
@@ -1,12 +1,12 @@
|
|||||||
const { BaseCommand } = require('./base-command.js');
|
const { BaseCommand } = require('./base-command.js');
|
||||||
const { app } = require('./app.js');
|
const { app } = require('./app.js');
|
||||||
const { _ } = require('lib/locale.js');
|
const { _ } = require('lib/locale');
|
||||||
const BaseModel = require('lib/BaseModel.js');
|
const BaseModel = require('lib/BaseModel').default;
|
||||||
const Folder = require('lib/models/Folder.js');
|
const Folder = require('lib/models/Folder.js');
|
||||||
const Setting = require('lib/models/Setting.js');
|
const Setting = require('lib/models/Setting').default;
|
||||||
const Note = require('lib/models/Note.js');
|
const Note = require('lib/models/Note.js');
|
||||||
const { sprintf } = require('sprintf-js');
|
const { sprintf } = require('sprintf-js');
|
||||||
const { time } = require('lib/time-utils.js');
|
const time = require('lib/time').default;
|
||||||
const { cliUtils } = require('./cli-utils.js');
|
const { cliUtils } = require('./cli-utils.js');
|
||||||
|
|
||||||
class Command extends BaseCommand {
|
class Command extends BaseCommand {
|
||||||
@@ -19,19 +19,26 @@ class Command extends BaseCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
enabled() {
|
enabled() {
|
||||||
return false;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
options() {
|
options() {
|
||||||
return [['-n, --limit <num>', _('Displays only the first top <num> notes.')], ['-s, --sort <field>', _('Sorts the item by <field> (eg. title, updated_time, created_time).')], ['-r, --reverse', _('Reverses the sorting order.')], ['-t, --type <type>', _('Displays only the items of the specific type(s). Can be `n` for notes, `t` for to-dos, or `nt` for notes and to-dos (eg. `-tt` would display only the to-dos, while `-ttd` would display notes and to-dos.')], ['-f, --format <format>', _('Either "text" or "json"')], ['-l, --long', _('Use long list format. Format is ID, NOTE_COUNT (for notebook), DATE, TODO_CHECKED (for to-dos), TITLE')]];
|
return [
|
||||||
|
['-n, --limit <num>', _('Displays only the first top <num> notes.')],
|
||||||
|
['-s, --sort <field>', _('Sorts the item by <field> (eg. title, updated_time, created_time).')],
|
||||||
|
['-r, --reverse', _('Reverses the sorting order.')],
|
||||||
|
['-t, --type <type>', _('Displays only the items of the specific type(s). Can be `n` for notes, `t` for to-dos, or `nt` for notes and to-dos (eg. `-tt` would display only the to-dos, while `-ttd` would display notes and to-dos.')],
|
||||||
|
['-f, --format <format>', _('Either "text" or "json"')],
|
||||||
|
['-l, --long', _('Use long list format. Format is ID, NOTE_COUNT (for notebook), DATE, TODO_CHECKED (for to-dos), TITLE')],
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
async action(args) {
|
async action(args) {
|
||||||
let pattern = args['note-pattern'];
|
const pattern = args['note-pattern'];
|
||||||
let items = [];
|
let items = [];
|
||||||
let options = args.options;
|
const options = args.options;
|
||||||
|
|
||||||
let queryOptions = {};
|
const queryOptions = {};
|
||||||
if (options.limit) queryOptions.limit = options.limit;
|
if (options.limit) queryOptions.limit = options.limit;
|
||||||
if (options.sort) {
|
if (options.sort) {
|
||||||
queryOptions.orderBy = options.sort;
|
queryOptions.orderBy = options.sort;
|
||||||
@@ -63,19 +70,19 @@ class Command extends BaseCommand {
|
|||||||
} else {
|
} else {
|
||||||
let hasTodos = false;
|
let hasTodos = false;
|
||||||
for (let i = 0; i < items.length; i++) {
|
for (let i = 0; i < items.length; i++) {
|
||||||
let item = items[i];
|
const item = items[i];
|
||||||
if (item.is_todo) {
|
if (item.is_todo) {
|
||||||
hasTodos = true;
|
hasTodos = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let seenTitles = [];
|
const seenTitles = [];
|
||||||
let rows = [];
|
const rows = [];
|
||||||
let shortIdShown = false;
|
let shortIdShown = false;
|
||||||
for (let i = 0; i < items.length; i++) {
|
for (let i = 0; i < items.length; i++) {
|
||||||
let item = items[i];
|
const item = items[i];
|
||||||
let row = [];
|
const row = [];
|
||||||
|
|
||||||
if (options.long) {
|
if (options.long) {
|
||||||
row.push(BaseModel.shortId(item.id));
|
row.push(BaseModel.shortId(item.id));
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
const { BaseCommand } = require('./base-command.js');
|
const { BaseCommand } = require('./base-command.js');
|
||||||
const { app } = require('./app.js');
|
const { app } = require('./app.js');
|
||||||
const { _ } = require('lib/locale.js');
|
const { _ } = require('lib/locale');
|
||||||
const Folder = require('lib/models/Folder.js');
|
const Folder = require('lib/models/Folder.js');
|
||||||
|
|
||||||
class Command extends BaseCommand {
|
class Command extends BaseCommand {
|
||||||
@@ -13,7 +13,7 @@ class Command extends BaseCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async action(args) {
|
async action(args) {
|
||||||
let folder = await Folder.save({ title: args['new-notebook'] }, { userSideValidation: true });
|
const folder = await Folder.save({ title: args['new-notebook'] }, { userSideValidation: true });
|
||||||
app().switchCurrentFolder(folder);
|
app().switchCurrentFolder(folder);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
const { BaseCommand } = require('./base-command.js');
|
const { BaseCommand } = require('./base-command.js');
|
||||||
const { app } = require('./app.js');
|
const { app } = require('./app.js');
|
||||||
const { _ } = require('lib/locale.js');
|
const { _ } = require('lib/locale');
|
||||||
const Note = require('lib/models/Note.js');
|
const Note = require('lib/models/Note.js');
|
||||||
|
|
||||||
class Command extends BaseCommand {
|
class Command extends BaseCommand {
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
const { BaseCommand } = require('./base-command.js');
|
const { BaseCommand } = require('./base-command.js');
|
||||||
const { app } = require('./app.js');
|
const { app } = require('./app.js');
|
||||||
const { _ } = require('lib/locale.js');
|
const { _ } = require('lib/locale');
|
||||||
const Note = require('lib/models/Note.js');
|
const Note = require('lib/models/Note.js');
|
||||||
|
|
||||||
class Command extends BaseCommand {
|
class Command extends BaseCommand {
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
const { BaseCommand } = require('./base-command.js');
|
const { BaseCommand } = require('./base-command.js');
|
||||||
const { app } = require('./app.js');
|
const { app } = require('./app.js');
|
||||||
const { _ } = require('lib/locale.js');
|
const { _ } = require('lib/locale');
|
||||||
const BaseModel = require('lib/BaseModel.js');
|
const BaseModel = require('lib/BaseModel').default;
|
||||||
const Folder = require('lib/models/Folder.js');
|
const Folder = require('lib/models/Folder.js');
|
||||||
const Note = require('lib/models/Note.js');
|
const Note = require('lib/models/Note.js');
|
||||||
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
const { BaseCommand } = require('./base-command.js');
|
const { BaseCommand } = require('./base-command.js');
|
||||||
const { app } = require('./app.js');
|
const { app } = require('./app.js');
|
||||||
const { _ } = require('lib/locale.js');
|
const { _ } = require('lib/locale');
|
||||||
const BaseModel = require('lib/BaseModel.js');
|
const BaseModel = require('lib/BaseModel').default;
|
||||||
const Folder = require('lib/models/Folder.js');
|
const Folder = require('lib/models/Folder.js');
|
||||||
const Note = require('lib/models/Note.js');
|
const Note = require('lib/models/Note.js');
|
||||||
|
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
const { BaseCommand } = require('./base-command.js');
|
const { BaseCommand } = require('./base-command.js');
|
||||||
const { app } = require('./app.js');
|
const { app } = require('./app.js');
|
||||||
const { _ } = require('lib/locale.js');
|
const { _ } = require('lib/locale');
|
||||||
const Folder = require('lib/models/Folder.js');
|
const Folder = require('lib/models/Folder.js');
|
||||||
const BaseModel = require('lib/BaseModel.js');
|
const BaseModel = require('lib/BaseModel').default;
|
||||||
|
|
||||||
class Command extends BaseCommand {
|
class Command extends BaseCommand {
|
||||||
usage() {
|
usage() {
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
const { BaseCommand } = require('./base-command.js');
|
const { BaseCommand } = require('./base-command.js');
|
||||||
const { app } = require('./app.js');
|
const { app } = require('./app.js');
|
||||||
const { _ } = require('lib/locale.js');
|
const { _ } = require('lib/locale');
|
||||||
const Note = require('lib/models/Note.js');
|
const Note = require('lib/models/Note.js');
|
||||||
const BaseModel = require('lib/BaseModel.js');
|
const BaseModel = require('lib/BaseModel').default;
|
||||||
|
|
||||||
class Command extends BaseCommand {
|
class Command extends BaseCommand {
|
||||||
usage() {
|
usage() {
|
||||||
@@ -26,7 +26,7 @@ class Command extends BaseCommand {
|
|||||||
|
|
||||||
const ok = force ? true : await this.prompt(notes.length > 1 ? _('%d notes match this pattern. Delete them?', notes.length) : _('Delete note?'), { booleanAnswerDefault: 'n' });
|
const ok = force ? true : await this.prompt(notes.length > 1 ? _('%d notes match this pattern. Delete them?', notes.length) : _('Delete note?'), { booleanAnswerDefault: 'n' });
|
||||||
if (!ok) return;
|
if (!ok) return;
|
||||||
let ids = notes.map(n => n.id);
|
const ids = notes.map(n => n.id);
|
||||||
await Note.batchDelete(ids);
|
await Note.batchDelete(ids);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
const { BaseCommand } = require('./base-command.js');
|
const { BaseCommand } = require('./base-command.js');
|
||||||
const { _ } = require('lib/locale.js');
|
const { _ } = require('lib/locale');
|
||||||
const BaseModel = require('lib/BaseModel.js');
|
const BaseModel = require('lib/BaseModel').default;
|
||||||
const Folder = require('lib/models/Folder.js');
|
const Folder = require('lib/models/Folder.js');
|
||||||
const { uuid } = require('lib/uuid.js');
|
const uuid = require('lib/uuid').default;
|
||||||
|
|
||||||
class Command extends BaseCommand {
|
class Command extends BaseCommand {
|
||||||
usage() {
|
usage() {
|
||||||
@@ -18,8 +18,8 @@ class Command extends BaseCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async action(args) {
|
async action(args) {
|
||||||
let pattern = args['pattern'];
|
const pattern = args['pattern'];
|
||||||
let folderTitle = args['notebook'];
|
const folderTitle = args['notebook'];
|
||||||
|
|
||||||
let folder = null;
|
let folder = null;
|
||||||
if (folderTitle) {
|
if (folderTitle) {
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
const { BaseCommand } = require('./base-command.js');
|
const { BaseCommand } = require('./base-command.js');
|
||||||
const { _ } = require('lib/locale.js');
|
const { _ } = require('lib/locale');
|
||||||
const Setting = require('lib/models/Setting.js');
|
const Setting = require('lib/models/Setting').default;
|
||||||
const { Logger } = require('lib/logger.js');
|
const Logger = require('lib/Logger').default;
|
||||||
const { shim } = require('lib/shim');
|
const shim = require('lib/shim').default;
|
||||||
|
|
||||||
class Command extends BaseCommand {
|
class Command extends BaseCommand {
|
||||||
|
|
||||||
@@ -18,7 +18,8 @@ class Command extends BaseCommand {
|
|||||||
const command = args.command;
|
const command = args.command;
|
||||||
|
|
||||||
const ClipperServer = require('lib/ClipperServer');
|
const ClipperServer = require('lib/ClipperServer');
|
||||||
const stdoutFn = (s) => this.stdout(s);
|
ClipperServer.instance().initialize();
|
||||||
|
const stdoutFn = (...s) => this.stdout(s.join(' '));
|
||||||
const clipperLogger = new Logger();
|
const clipperLogger = new Logger();
|
||||||
clipperLogger.addTarget('file', { path: `${Setting.value('profileDir')}/log-clipper.txt` });
|
clipperLogger.addTarget('file', { path: `${Setting.value('profileDir')}/log-clipper.txt` });
|
||||||
clipperLogger.addTarget('console', { console: {
|
clipperLogger.addTarget('console', { console: {
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
const { BaseCommand } = require('./base-command.js');
|
const { BaseCommand } = require('./base-command.js');
|
||||||
const { app } = require('./app.js');
|
const { app } = require('./app.js');
|
||||||
const { _ } = require('lib/locale.js');
|
const { _ } = require('lib/locale');
|
||||||
const BaseModel = require('lib/BaseModel.js');
|
const BaseModel = require('lib/BaseModel').default;
|
||||||
const { Database } = require('lib/database.js');
|
const { Database } = require('lib/database.js');
|
||||||
const Note = require('lib/models/Note.js');
|
const Note = require('lib/models/Note.js');
|
||||||
|
|
||||||
@@ -23,18 +23,18 @@ class Command extends BaseCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async action(args) {
|
async action(args) {
|
||||||
let title = args['note'];
|
const title = args['note'];
|
||||||
let propName = args['name'];
|
const propName = args['name'];
|
||||||
let propValue = args['value'];
|
let propValue = args['value'];
|
||||||
if (!propValue) propValue = '';
|
if (!propValue) propValue = '';
|
||||||
|
|
||||||
let notes = await app().loadItems(BaseModel.TYPE_NOTE, title);
|
const notes = await app().loadItems(BaseModel.TYPE_NOTE, title);
|
||||||
if (!notes.length) throw new Error(_('Cannot find "%s".', title));
|
if (!notes.length) throw new Error(_('Cannot find "%s".', title));
|
||||||
|
|
||||||
for (let i = 0; i < notes.length; i++) {
|
for (let i = 0; i < notes.length; i++) {
|
||||||
this.encryptionCheck(notes[i]);
|
this.encryptionCheck(notes[i]);
|
||||||
|
|
||||||
let newNote = {
|
const newNote = {
|
||||||
id: notes[i].id,
|
id: notes[i].id,
|
||||||
type_: notes[i].type_,
|
type_: notes[i].type_,
|
||||||
};
|
};
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
const { BaseCommand } = require('./base-command.js');
|
const { BaseCommand } = require('./base-command.js');
|
||||||
const { app } = require('./app.js');
|
const { app } = require('./app.js');
|
||||||
const Setting = require('lib/models/Setting.js');
|
const Setting = require('lib/models/Setting').default;
|
||||||
const { _ } = require('lib/locale.js');
|
const { _ } = require('lib/locale');
|
||||||
const { ReportService } = require('lib/services/report.js');
|
const { ReportService } = require('lib/services/report.js');
|
||||||
|
|
||||||
class Command extends BaseCommand {
|
class Command extends BaseCommand {
|
||||||
@@ -14,30 +14,39 @@ class Command extends BaseCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async action() {
|
async action() {
|
||||||
let service = new ReportService();
|
const service = new ReportService();
|
||||||
let report = await service.status(Setting.value('sync.target'));
|
const report = await service.status(Setting.value('sync.target'));
|
||||||
|
|
||||||
for (let i = 0; i < report.length; i++) {
|
for (let i = 0; i < report.length; i++) {
|
||||||
let section = report[i];
|
const section = report[i];
|
||||||
|
|
||||||
if (i > 0) this.stdout('');
|
if (i > 0) this.stdout('');
|
||||||
|
|
||||||
this.stdout(`# ${section.title}`);
|
this.stdout(`# ${section.title}`);
|
||||||
this.stdout('');
|
this.stdout('');
|
||||||
|
|
||||||
for (let n in section.body) {
|
let canRetryType = '';
|
||||||
|
|
||||||
|
for (const n in section.body) {
|
||||||
if (!section.body.hasOwnProperty(n)) continue;
|
if (!section.body.hasOwnProperty(n)) continue;
|
||||||
let line = section.body[n];
|
const item = section.body[n];
|
||||||
this.stdout(line);
|
|
||||||
|
if (typeof item === 'object') {
|
||||||
|
canRetryType = item.canRetryType;
|
||||||
|
this.stdout(item.text);
|
||||||
|
} else {
|
||||||
|
this.stdout(item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (canRetryType === 'e2ee') {
|
||||||
|
this.stdout('');
|
||||||
|
this.stdout(_('To retry decryption of these items. Run `e2ee decrypt --retry-failed-items`'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
app()
|
app().gui().showConsole();
|
||||||
.gui()
|
app().gui().maximizeConsole();
|
||||||
.showConsole();
|
|
||||||
app()
|
|
||||||
.gui()
|
|
||||||
.maximizeConsole();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,16 +1,17 @@
|
|||||||
const { BaseCommand } = require('./base-command.js');
|
const { BaseCommand } = require('./base-command.js');
|
||||||
const { app } = require('./app.js');
|
const { app } = require('./app.js');
|
||||||
const { _ } = require('lib/locale.js');
|
const { _ } = require('lib/locale');
|
||||||
const { OneDriveApiNodeUtils } = require('lib/onedrive-api-node-utils.js');
|
const { OneDriveApiNodeUtils } = require('lib/onedrive-api-node-utils.js');
|
||||||
const Setting = require('lib/models/Setting.js');
|
const Setting = require('lib/models/Setting').default;
|
||||||
const ResourceFetcher = require('lib/services/ResourceFetcher');
|
const ResourceFetcher = require('lib/services/ResourceFetcher');
|
||||||
const { Synchronizer } = require('lib/synchronizer.js');
|
const Synchronizer = require('lib/Synchronizer').default;
|
||||||
const { reg } = require('lib/registry.js');
|
const { reg } = require('lib/registry.js');
|
||||||
const { cliUtils } = require('./cli-utils.js');
|
const { cliUtils } = require('./cli-utils.js');
|
||||||
const md5 = require('md5');
|
const md5 = require('md5');
|
||||||
const locker = require('proper-lockfile');
|
const locker = require('proper-lockfile');
|
||||||
const fs = require('fs-extra');
|
const fs = require('fs-extra');
|
||||||
const SyncTargetRegistry = require('lib/SyncTargetRegistry');
|
const SyncTargetRegistry = require('lib/SyncTargetRegistry');
|
||||||
|
const MigrationHandler = require('lib/services/synchronizer/MigrationHandler').default;
|
||||||
|
|
||||||
class Command extends BaseCommand {
|
class Command extends BaseCommand {
|
||||||
constructor() {
|
constructor() {
|
||||||
@@ -29,7 +30,10 @@ class Command extends BaseCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
options() {
|
options() {
|
||||||
return [['--target <target>', _('Sync to provided target (defaults to sync.target config value)')]];
|
return [
|
||||||
|
['--target <target>', _('Sync to provided target (defaults to sync.target config value)')],
|
||||||
|
['--upgrade', _('Upgrade the sync target to the latest version.')],
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
static lockFile(filePath) {
|
static lockFile(filePath) {
|
||||||
@@ -148,12 +152,8 @@ class Command extends BaseCommand {
|
|||||||
const syncTarget = reg.syncTarget(this.syncTargetId_);
|
const syncTarget = reg.syncTarget(this.syncTargetId_);
|
||||||
|
|
||||||
if (!(await syncTarget.isAuthenticated())) {
|
if (!(await syncTarget.isAuthenticated())) {
|
||||||
app()
|
app().gui().showConsole();
|
||||||
.gui()
|
app().gui().maximizeConsole();
|
||||||
.showConsole();
|
|
||||||
app()
|
|
||||||
.gui()
|
|
||||||
.maximizeConsole();
|
|
||||||
|
|
||||||
const authDone = await this.doAuth();
|
const authDone = await this.doAuth();
|
||||||
if (!authDone) return cleanUp();
|
if (!authDone) return cleanUp();
|
||||||
@@ -161,9 +161,9 @@ class Command extends BaseCommand {
|
|||||||
|
|
||||||
const sync = await syncTarget.synchronizer();
|
const sync = await syncTarget.synchronizer();
|
||||||
|
|
||||||
let options = {
|
const options = {
|
||||||
onProgress: report => {
|
onProgress: report => {
|
||||||
let lines = Synchronizer.reportToLines(report);
|
const lines = Synchronizer.reportToLines(report);
|
||||||
if (lines.length) cliUtils.redraw(lines.join(' '));
|
if (lines.length) cliUtils.redraw(lines.join(' '));
|
||||||
},
|
},
|
||||||
onMessage: msg => {
|
onMessage: msg => {
|
||||||
@@ -174,7 +174,35 @@ class Command extends BaseCommand {
|
|||||||
|
|
||||||
this.stdout(_('Synchronisation target: %s (%s)', Setting.enumOptionLabel('sync.target', this.syncTargetId_), this.syncTargetId_));
|
this.stdout(_('Synchronisation target: %s (%s)', Setting.enumOptionLabel('sync.target', this.syncTargetId_), this.syncTargetId_));
|
||||||
|
|
||||||
if (!sync) throw new Error(_('Cannot initialize synchroniser.'));
|
if (!sync) throw new Error(_('Cannot initialise synchroniser.'));
|
||||||
|
|
||||||
|
if (args.options.upgrade) {
|
||||||
|
let migrationError = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
const migrationHandler = new MigrationHandler(
|
||||||
|
sync.api(),
|
||||||
|
sync.lockHandler(),
|
||||||
|
Setting.value('appType'),
|
||||||
|
Setting.value('clientId')
|
||||||
|
);
|
||||||
|
|
||||||
|
migrationHandler.setLogger(cliUtils.stdoutLogger(this.stdout.bind(this)));
|
||||||
|
|
||||||
|
await migrationHandler.upgrade();
|
||||||
|
} catch (error) {
|
||||||
|
migrationError = error;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!migrationError) {
|
||||||
|
Setting.setValue('sync.upgradeState', Setting.SYNC_UPGRADE_STATE_IDLE);
|
||||||
|
await Setting.saveAll();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (migrationError) throw migrationError;
|
||||||
|
|
||||||
|
return cleanUp();
|
||||||
|
}
|
||||||
|
|
||||||
this.stdout(_('Starting synchronisation...'));
|
this.stdout(_('Starting synchronisation...'));
|
||||||
|
|
||||||
@@ -185,7 +213,7 @@ class Command extends BaseCommand {
|
|||||||
options.context = context;
|
options.context = context;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
let newContext = await sync.start(options);
|
const newContext = await sync.start(options);
|
||||||
Setting.setValue(contextKey, JSON.stringify(newContext));
|
Setting.setValue(contextKey, JSON.stringify(newContext));
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (error.code == 'alreadyStarted') {
|
if (error.code == 'alreadyStarted') {
|
||||||
@@ -210,6 +238,12 @@ class Command extends BaseCommand {
|
|||||||
throw error;
|
throw error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Setting.value('sync.upgradeState') > Setting.SYNC_UPGRADE_STATE_IDLE) {
|
||||||
|
this.stdout(`/!\\ ${_('Sync target must be upgraded! Run `%s` to proceed.', 'sync --upgrade')}`);
|
||||||
|
app().gui().showConsole();
|
||||||
|
app().gui().maximizeConsole();
|
||||||
|
}
|
||||||
|
|
||||||
cleanUp();
|
cleanUp();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,9 +1,9 @@
|
|||||||
const { BaseCommand } = require('./base-command.js');
|
const { BaseCommand } = require('./base-command.js');
|
||||||
const { app } = require('./app.js');
|
const { app } = require('./app.js');
|
||||||
const { _ } = require('lib/locale.js');
|
const { _ } = require('lib/locale');
|
||||||
const Tag = require('lib/models/Tag.js');
|
const Tag = require('lib/models/Tag.js');
|
||||||
const BaseModel = require('lib/BaseModel.js');
|
const BaseModel = require('lib/BaseModel').default;
|
||||||
const { time } = require('lib/time-utils.js');
|
const time = require('lib/time').default;
|
||||||
|
|
||||||
class Command extends BaseCommand {
|
class Command extends BaseCommand {
|
||||||
usage() {
|
usage() {
|
||||||
@@ -20,7 +20,7 @@ class Command extends BaseCommand {
|
|||||||
|
|
||||||
async action(args) {
|
async action(args) {
|
||||||
let tag = null;
|
let tag = null;
|
||||||
let options = args.options;
|
const options = args.options;
|
||||||
|
|
||||||
if (args.tag) tag = await app().loadItem(BaseModel.TYPE_TAG, args.tag);
|
if (args.tag) tag = await app().loadItem(BaseModel.TYPE_TAG, args.tag);
|
||||||
let notes = [];
|
let notes = [];
|
||||||
@@ -46,7 +46,7 @@ class Command extends BaseCommand {
|
|||||||
}
|
}
|
||||||
} else if (command == 'list') {
|
} else if (command == 'list') {
|
||||||
if (tag) {
|
if (tag) {
|
||||||
let notes = await Tag.notes(tag.id);
|
const notes = await Tag.notes(tag.id);
|
||||||
notes.map(note => {
|
notes.map(note => {
|
||||||
let line = '';
|
let line = '';
|
||||||
if (options.long) {
|
if (options.long) {
|
||||||
@@ -70,7 +70,7 @@ class Command extends BaseCommand {
|
|||||||
this.stdout(line);
|
this.stdout(line);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
let tags = await Tag.all();
|
const tags = await Tag.all();
|
||||||
tags.map(tag => {
|
tags.map(tag => {
|
||||||
this.stdout(tag.title);
|
this.stdout(tag.title);
|
||||||
});
|
});
|
||||||
|
@@ -1,9 +1,9 @@
|
|||||||
const { BaseCommand } = require('./base-command.js');
|
const { BaseCommand } = require('./base-command.js');
|
||||||
const { app } = require('./app.js');
|
const { app } = require('./app.js');
|
||||||
const { _ } = require('lib/locale.js');
|
const { _ } = require('lib/locale');
|
||||||
const BaseModel = require('lib/BaseModel.js');
|
const BaseModel = require('lib/BaseModel').default;
|
||||||
const Note = require('lib/models/Note.js');
|
const Note = require('lib/models/Note.js');
|
||||||
const { time } = require('lib/time-utils.js');
|
const time = require('lib/time').default;
|
||||||
|
|
||||||
class Command extends BaseCommand {
|
class Command extends BaseCommand {
|
||||||
usage() {
|
usage() {
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
const { BaseCommand } = require('./base-command.js');
|
const { BaseCommand } = require('./base-command.js');
|
||||||
const { _ } = require('lib/locale.js');
|
const { _ } = require('lib/locale');
|
||||||
|
|
||||||
const CommandDone = require('./command-done.js');
|
const CommandDone = require('./command-done.js');
|
||||||
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
const { BaseCommand } = require('./base-command.js');
|
const { BaseCommand } = require('./base-command.js');
|
||||||
const { app } = require('./app.js');
|
const { app } = require('./app.js');
|
||||||
const { _ } = require('lib/locale.js');
|
const { _ } = require('lib/locale');
|
||||||
const BaseModel = require('lib/BaseModel.js');
|
const BaseModel = require('lib/BaseModel').default;
|
||||||
|
|
||||||
class Command extends BaseCommand {
|
class Command extends BaseCommand {
|
||||||
usage() {
|
usage() {
|
||||||
@@ -17,7 +17,7 @@ class Command extends BaseCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async action(args) {
|
async action(args) {
|
||||||
let folder = await app().loadItem(BaseModel.TYPE_FOLDER, args['notebook']);
|
const folder = await app().loadItem(BaseModel.TYPE_FOLDER, args['notebook']);
|
||||||
if (!folder) throw new Error(_('Cannot find "%s".', args['notebook']));
|
if (!folder) throw new Error(_('Cannot find "%s".', args['notebook']));
|
||||||
app().switchCurrentFolder(folder);
|
app().switchCurrentFolder(folder);
|
||||||
}
|
}
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
const { BaseCommand } = require('./base-command.js');
|
const { BaseCommand } = require('./base-command.js');
|
||||||
const Setting = require('lib/models/Setting.js');
|
const Setting = require('lib/models/Setting').default;
|
||||||
const { _ } = require('lib/locale.js');
|
const { _ } = require('lib/locale');
|
||||||
|
|
||||||
class Command extends BaseCommand {
|
class Command extends BaseCommand {
|
||||||
usage() {
|
usage() {
|
||||||
|
@@ -1,10 +1,10 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
const { time } = require('lib/time-utils.js');
|
const time = require('lib/time').default;
|
||||||
const { Logger } = require('lib/logger.js');
|
const Logger = require('lib/Logger').default;
|
||||||
const Resource = require('lib/models/Resource.js');
|
const Resource = require('lib/models/Resource.js');
|
||||||
const { dirname } = require('lib/path-utils.js');
|
const { dirname } = require('lib/path-utils');
|
||||||
const { FsDriverNode } = require('./fs-driver-node.js');
|
const FsDriverNode = require('lib/fs-driver-node').default;
|
||||||
const lodash = require('lodash');
|
const lodash = require('lodash');
|
||||||
const exec = require('child_process').exec;
|
const exec = require('child_process').exec;
|
||||||
const fs = require('fs-extra');
|
const fs = require('fs-extra');
|
||||||
@@ -12,7 +12,7 @@ const fs = require('fs-extra');
|
|||||||
const baseDir = `${dirname(__dirname)}/tests/fuzzing`;
|
const baseDir = `${dirname(__dirname)}/tests/fuzzing`;
|
||||||
const syncDir = `${baseDir}/sync`;
|
const syncDir = `${baseDir}/sync`;
|
||||||
const joplinAppPath = `${__dirname}/main.js`;
|
const joplinAppPath = `${__dirname}/main.js`;
|
||||||
let syncDurations = [];
|
const syncDurations = [];
|
||||||
|
|
||||||
const fsDriver = new FsDriverNode();
|
const fsDriver = new FsDriverNode();
|
||||||
Logger.fsDriver_ = fsDriver;
|
Logger.fsDriver_ = fsDriver;
|
||||||
@@ -34,10 +34,10 @@ function createClient(id) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function createClients() {
|
async function createClients() {
|
||||||
let output = [];
|
const output = [];
|
||||||
let promises = [];
|
const promises = [];
|
||||||
for (let clientId = 0; clientId < 2; clientId++) {
|
for (let clientId = 0; clientId < 2; clientId++) {
|
||||||
let client = createClient(clientId);
|
const client = createClient(clientId);
|
||||||
promises.push(fs.remove(client.profileDir));
|
promises.push(fs.remove(client.profileDir));
|
||||||
promises.push(
|
promises.push(
|
||||||
execCommand(client, 'config sync.target 2').then(() => {
|
execCommand(client, 'config sync.target 2').then(() => {
|
||||||
@@ -2064,8 +2064,8 @@ function randomWord() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function execCommand(client, command, options = {}) {
|
function execCommand(client, command, options = {}) {
|
||||||
let exePath = `node ${joplinAppPath}`;
|
const exePath = `node ${joplinAppPath}`;
|
||||||
let cmd = `${exePath} --update-geolocation-disabled --env dev --log-level debug --profile ${client.profileDir} ${command}`;
|
const cmd = `${exePath} --update-geolocation-disabled --env dev --log-level debug --profile ${client.profileDir} ${command}`;
|
||||||
logger.info(`${client.id}: ${command}`);
|
logger.info(`${client.id}: ${command}`);
|
||||||
|
|
||||||
if (options.killAfter) {
|
if (options.killAfter) {
|
||||||
@@ -2073,7 +2073,7 @@ function execCommand(client, command, options = {}) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
let childProcess = exec(cmd, (error, stdout, stderr) => {
|
const childProcess = exec(cmd, (error, stdout, stderr) => {
|
||||||
if (error) {
|
if (error) {
|
||||||
if (error.signal == 'SIGTERM') {
|
if (error.signal == 'SIGTERM') {
|
||||||
resolve('Process was killed');
|
resolve('Process was killed');
|
||||||
@@ -2096,7 +2096,7 @@ function execCommand(client, command, options = {}) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function clientItems(client) {
|
async function clientItems(client) {
|
||||||
let itemsJson = await execCommand(client, 'dump');
|
const itemsJson = await execCommand(client, 'dump');
|
||||||
try {
|
try {
|
||||||
return JSON.parse(itemsJson);
|
return JSON.parse(itemsJson);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@@ -2105,7 +2105,7 @@ async function clientItems(client) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function randomTag(items) {
|
function randomTag(items) {
|
||||||
let tags = [];
|
const tags = [];
|
||||||
for (let i = 0; i < items.length; i++) {
|
for (let i = 0; i < items.length; i++) {
|
||||||
if (items[i].type_ != 5) continue;
|
if (items[i].type_ != 5) continue;
|
||||||
tags.push(items[i]);
|
tags.push(items[i]);
|
||||||
@@ -2115,7 +2115,7 @@ function randomTag(items) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function randomNote(items) {
|
function randomNote(items) {
|
||||||
let notes = [];
|
const notes = [];
|
||||||
for (let i = 0; i < items.length; i++) {
|
for (let i = 0; i < items.length; i++) {
|
||||||
if (items[i].type_ != 1) continue;
|
if (items[i].type_ != 1) continue;
|
||||||
notes.push(items[i]);
|
notes.push(items[i]);
|
||||||
@@ -2125,14 +2125,14 @@ function randomNote(items) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function execRandomCommand(client) {
|
async function execRandomCommand(client) {
|
||||||
let possibleCommands = [
|
const possibleCommands = [
|
||||||
['mkbook {word}', 40], // CREATE FOLDER
|
['mkbook {word}', 40], // CREATE FOLDER
|
||||||
['mknote {word}', 70], // CREATE NOTE
|
['mknote {word}', 70], // CREATE NOTE
|
||||||
[
|
[
|
||||||
async () => {
|
async () => {
|
||||||
// DELETE RANDOM ITEM
|
// DELETE RANDOM ITEM
|
||||||
let items = await clientItems(client);
|
const items = await clientItems(client);
|
||||||
let item = randomElement(items);
|
const item = randomElement(items);
|
||||||
if (!item) return;
|
if (!item) return;
|
||||||
|
|
||||||
if (item.type_ == 1) {
|
if (item.type_ == 1) {
|
||||||
@@ -2150,8 +2150,8 @@ async function execRandomCommand(client) {
|
|||||||
[
|
[
|
||||||
async () => {
|
async () => {
|
||||||
// SYNC
|
// SYNC
|
||||||
let avgSyncDuration = averageSyncDuration();
|
const avgSyncDuration = averageSyncDuration();
|
||||||
let options = {};
|
const options = {};
|
||||||
if (!isNaN(avgSyncDuration)) {
|
if (!isNaN(avgSyncDuration)) {
|
||||||
if (Math.random() >= 0.5) {
|
if (Math.random() >= 0.5) {
|
||||||
options.killAfter = avgSyncDuration * Math.random();
|
options.killAfter = avgSyncDuration * Math.random();
|
||||||
@@ -2164,8 +2164,8 @@ async function execRandomCommand(client) {
|
|||||||
[
|
[
|
||||||
async () => {
|
async () => {
|
||||||
// UPDATE RANDOM ITEM
|
// UPDATE RANDOM ITEM
|
||||||
let items = await clientItems(client);
|
const items = await clientItems(client);
|
||||||
let item = randomNote(items);
|
const item = randomNote(items);
|
||||||
if (!item) return;
|
if (!item) return;
|
||||||
|
|
||||||
return execCommand(client, `set ${item.id} title "${randomWord()}"`);
|
return execCommand(client, `set ${item.id} title "${randomWord()}"`);
|
||||||
@@ -2175,12 +2175,12 @@ async function execRandomCommand(client) {
|
|||||||
[
|
[
|
||||||
async () => {
|
async () => {
|
||||||
// ADD TAG
|
// ADD TAG
|
||||||
let items = await clientItems(client);
|
const items = await clientItems(client);
|
||||||
let note = randomNote(items);
|
const note = randomNote(items);
|
||||||
if (!note) return;
|
if (!note) return;
|
||||||
|
|
||||||
let tag = randomTag(items);
|
const tag = randomTag(items);
|
||||||
let tagTitle = !tag || Math.random() >= 0.9 ? `tag-${randomWord()}` : tag.title;
|
const tagTitle = !tag || Math.random() >= 0.9 ? `tag-${randomWord()}` : tag.title;
|
||||||
|
|
||||||
return execCommand(client, `tag add ${tagTitle} ${note.id}`);
|
return execCommand(client, `tag add ${tagTitle} ${note.id}`);
|
||||||
},
|
},
|
||||||
@@ -2191,7 +2191,7 @@ async function execRandomCommand(client) {
|
|||||||
let cmd = null;
|
let cmd = null;
|
||||||
while (true) {
|
while (true) {
|
||||||
cmd = randomElement(possibleCommands);
|
cmd = randomElement(possibleCommands);
|
||||||
let r = 1 + Math.floor(Math.random() * 100);
|
const r = 1 + Math.floor(Math.random() * 100);
|
||||||
if (r <= cmd[1]) break;
|
if (r <= cmd[1]) break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2210,7 +2210,7 @@ function averageSyncDuration() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function randomNextCheckTime() {
|
function randomNextCheckTime() {
|
||||||
let output = time.unixMs() + 1000 + Math.random() * 1000 * 120;
|
const output = time.unixMs() + 1000 + Math.random() * 1000 * 120;
|
||||||
logger.info(`Next sync check: ${time.unixMsToIso(output)} (${Math.round((output - time.unixMs()) / 1000)} sec.)`);
|
logger.info(`Next sync check: ${time.unixMsToIso(output)} (${Math.round((output - time.unixMs()) / 1000)} sec.)`);
|
||||||
return output;
|
return output;
|
||||||
}
|
}
|
||||||
@@ -2223,11 +2223,11 @@ function findItem(items, itemId) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function compareItems(item1, item2) {
|
function compareItems(item1, item2) {
|
||||||
let output = [];
|
const output = [];
|
||||||
for (let n in item1) {
|
for (const n in item1) {
|
||||||
if (!item1.hasOwnProperty(n)) continue;
|
if (!item1.hasOwnProperty(n)) continue;
|
||||||
let p1 = item1[n];
|
const p1 = item1[n];
|
||||||
let p2 = item2[n];
|
const p2 = item2[n];
|
||||||
|
|
||||||
if (n == 'notes_') {
|
if (n == 'notes_') {
|
||||||
p1.sort();
|
p1.sort();
|
||||||
@@ -2243,13 +2243,13 @@ function compareItems(item1, item2) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function findMissingItems_(items1, items2) {
|
function findMissingItems_(items1, items2) {
|
||||||
let output = [];
|
const output = [];
|
||||||
|
|
||||||
for (let i = 0; i < items1.length; i++) {
|
for (let i = 0; i < items1.length; i++) {
|
||||||
let item1 = items1[i];
|
const item1 = items1[i];
|
||||||
let found = false;
|
let found = false;
|
||||||
for (let j = 0; j < items2.length; j++) {
|
for (let j = 0; j < items2.length; j++) {
|
||||||
let item2 = items2[j];
|
const item2 = items2[j];
|
||||||
if (item1.id == item2.id) {
|
if (item1.id == item2.id) {
|
||||||
found = true;
|
found = true;
|
||||||
break;
|
break;
|
||||||
@@ -2269,33 +2269,33 @@ function findMissingItems(items1, items2) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function compareClientItems(clientItems) {
|
async function compareClientItems(clientItems) {
|
||||||
let itemCounts = [];
|
const itemCounts = [];
|
||||||
for (let i = 0; i < clientItems.length; i++) {
|
for (let i = 0; i < clientItems.length; i++) {
|
||||||
let items = clientItems[i];
|
const items = clientItems[i];
|
||||||
itemCounts.push(items.length);
|
itemCounts.push(items.length);
|
||||||
}
|
}
|
||||||
logger.info(`Item count: ${itemCounts.join(', ')}`);
|
logger.info(`Item count: ${itemCounts.join(', ')}`);
|
||||||
|
|
||||||
let missingItems = findMissingItems(clientItems[0], clientItems[1]);
|
const missingItems = findMissingItems(clientItems[0], clientItems[1]);
|
||||||
if (missingItems[0].length || missingItems[1].length) {
|
if (missingItems[0].length || missingItems[1].length) {
|
||||||
logger.error('Items are different');
|
logger.error('Items are different');
|
||||||
logger.error(missingItems);
|
logger.error(missingItems);
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
let differences = [];
|
const differences = [];
|
||||||
let items = clientItems[0];
|
const items = clientItems[0];
|
||||||
for (let i = 0; i < items.length; i++) {
|
for (let i = 0; i < items.length; i++) {
|
||||||
let item1 = items[i];
|
const item1 = items[i];
|
||||||
for (let clientId = 1; clientId < clientItems.length; clientId++) {
|
for (let clientId = 1; clientId < clientItems.length; clientId++) {
|
||||||
let item2 = findItem(clientItems[clientId], item1.id);
|
const item2 = findItem(clientItems[clientId], item1.id);
|
||||||
if (!item2) {
|
if (!item2) {
|
||||||
logger.error(`Item not found on client ${clientId}:`);
|
logger.error(`Item not found on client ${clientId}:`);
|
||||||
logger.error(item1);
|
logger.error(item1);
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
let diff = compareItems(item1, item2);
|
const diff = compareItems(item1, item2);
|
||||||
if (diff.length) {
|
if (diff.length) {
|
||||||
differences.push({
|
differences.push({
|
||||||
item1: JSON.stringify(item1),
|
item1: JSON.stringify(item1),
|
||||||
@@ -2315,7 +2315,7 @@ async function compareClientItems(clientItems) {
|
|||||||
async function main() {
|
async function main() {
|
||||||
await fs.remove(syncDir);
|
await fs.remove(syncDir);
|
||||||
|
|
||||||
let clients = await createClients();
|
const clients = await createClients();
|
||||||
let clientId = 0;
|
let clientId = 0;
|
||||||
|
|
||||||
for (let i = 0; i < clients.length; i++) {
|
for (let i = 0; i < clients.length; i++) {
|
||||||
@@ -2348,7 +2348,7 @@ async function main() {
|
|||||||
|
|
||||||
if (state == 'syncCheck') {
|
if (state == 'syncCheck') {
|
||||||
state = 'waitForSyncCheck';
|
state = 'waitForSyncCheck';
|
||||||
let clientItems = [];
|
const clientItems = [];
|
||||||
// Up to 3 sync operations must be performed by each clients in order for them
|
// Up to 3 sync operations must be performed by each clients in order for them
|
||||||
// to be perfectly in sync - in order for each items to send their changes
|
// to be perfectly in sync - in order for each items to send their changes
|
||||||
// and get those from the other clients, and to also get changes that are
|
// and get those from the other clients, and to also get changes that are
|
||||||
@@ -2356,12 +2356,12 @@ async function main() {
|
|||||||
// with another one).
|
// with another one).
|
||||||
for (let loopCount = 0; loopCount < 3; loopCount++) {
|
for (let loopCount = 0; loopCount < 3; loopCount++) {
|
||||||
for (let i = 0; i < clients.length; i++) {
|
for (let i = 0; i < clients.length; i++) {
|
||||||
let beforeTime = time.unixMs();
|
const beforeTime = time.unixMs();
|
||||||
await execCommand(clients[i], 'sync');
|
await execCommand(clients[i], 'sync');
|
||||||
syncDurations.push(time.unixMs() - beforeTime);
|
syncDurations.push(time.unixMs() - beforeTime);
|
||||||
if (syncDurations.length > 20) syncDurations.splice(0, 1);
|
if (syncDurations.length > 20) syncDurations.splice(0, 1);
|
||||||
if (loopCount === 2) {
|
if (loopCount === 2) {
|
||||||
let dump = await execCommand(clients[i], 'dump');
|
const dump = await execCommand(clients[i], 'dump');
|
||||||
clientItems[i] = JSON.parse(dump);
|
clientItems[i] = JSON.parse(dump);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
const Folder = require('lib/models/Folder.js');
|
const Folder = require('lib/models/Folder.js');
|
||||||
const Tag = require('lib/models/Tag.js');
|
const Tag = require('lib/models/Tag.js');
|
||||||
const BaseModel = require('lib/BaseModel.js');
|
const BaseModel = require('lib/BaseModel').default;
|
||||||
const ListWidget = require('tkwidgets/ListWidget.js');
|
const ListWidget = require('tkwidgets/ListWidget.js');
|
||||||
const _ = require('lib/locale.js')._;
|
const _ = require('lib/locale')._;
|
||||||
|
|
||||||
class FolderListWidget extends ListWidget {
|
class FolderListWidget extends ListWidget {
|
||||||
constructor() {
|
constructor() {
|
||||||
@@ -20,7 +20,7 @@ class FolderListWidget extends ListWidget {
|
|||||||
this.trimItemTitle = false;
|
this.trimItemTitle = false;
|
||||||
|
|
||||||
this.itemRenderer = item => {
|
this.itemRenderer = item => {
|
||||||
let output = [];
|
const output = [];
|
||||||
if (item === '-') {
|
if (item === '-') {
|
||||||
output.push('-'.repeat(this.innerWidth));
|
output.push('-'.repeat(this.innerWidth));
|
||||||
} else if (item.type_ === Folder.modelType()) {
|
} else if (item.type_ === Folder.modelType()) {
|
||||||
@@ -121,7 +121,7 @@ class FolderListWidget extends ListWidget {
|
|||||||
|
|
||||||
folderHasChildren_(folders, folderId) {
|
folderHasChildren_(folders, folderId) {
|
||||||
for (let i = 0; i < folders.length; i++) {
|
for (let i = 0; i < folders.length; i++) {
|
||||||
let folder = folders[i];
|
const folder = folders[i];
|
||||||
if (folder.parent_id === folderId) return true;
|
if (folder.parent_id === folderId) return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
const Note = require('lib/models/Note.js');
|
const Note = require('lib/models/Note.js');
|
||||||
const TextWidget = require('tkwidgets/TextWidget.js');
|
const TextWidget = require('tkwidgets/TextWidget.js');
|
||||||
const { _ } = require('lib/locale.js');
|
const { _ } = require('lib/locale');
|
||||||
|
|
||||||
class NoteWidget extends TextWidget {
|
class NoteWidget extends TextWidget {
|
||||||
constructor() {
|
constructor() {
|
||||||
@@ -46,6 +46,8 @@ class NoteWidget extends TextWidget {
|
|||||||
|
|
||||||
if (this.note_ && this.note_.encryption_applied) {
|
if (this.note_ && this.note_.encryption_applied) {
|
||||||
this.text = _('One or more items are currently encrypted and you may need to supply a master password. To do so please type `e2ee decrypt`. If you have already supplied the password, the encrypted items are being decrypted in the background and will be available soon.');
|
this.text = _('One or more items are currently encrypted and you may need to supply a master password. To do so please type `e2ee decrypt`. If you have already supplied the password, the encrypted items are being decrypted in the background and will be available soon.');
|
||||||
|
this.text += '\n\n';
|
||||||
|
this.text += _('You may also type `status` for more information.');
|
||||||
} else {
|
} else {
|
||||||
this.text = this.note_ ? `${this.note_.title}\n\n${this.note_.body}` : '';
|
this.text = this.note_ ? `${this.note_.title}\n\n${this.note_.body}` : '';
|
||||||
}
|
}
|
||||||
|
@@ -106,7 +106,7 @@ class StatusBarWidget extends BaseWidget {
|
|||||||
|
|
||||||
const isSecurePrompt = !!this.promptState_.secure;
|
const isSecurePrompt = !!this.promptState_.secure;
|
||||||
|
|
||||||
let options = {
|
const options = {
|
||||||
cancelable: true,
|
cancelable: true,
|
||||||
history: this.history,
|
history: this.history,
|
||||||
default: this.promptState_.initialText,
|
default: this.promptState_.initialText,
|
||||||
|
@@ -1,16 +1,16 @@
|
|||||||
const { wrap } = require('lib/string-utils.js');
|
const { wrap } = require('lib/string-utils.js');
|
||||||
const Setting = require('lib/models/Setting.js');
|
const Setting = require('lib/models/Setting').default;
|
||||||
const { _ } = require('lib/locale.js');
|
const { _ } = require('lib/locale');
|
||||||
|
|
||||||
const MAX_WIDTH = 78;
|
const MAX_WIDTH = 78;
|
||||||
const INDENT = ' ';
|
const INDENT = ' ';
|
||||||
|
|
||||||
function renderTwoColumnData(options, baseIndent, width) {
|
function renderTwoColumnData(options, baseIndent, width) {
|
||||||
let output = [];
|
const output = [];
|
||||||
const optionColWidth = getOptionColWidth(options);
|
const optionColWidth = getOptionColWidth(options);
|
||||||
|
|
||||||
for (let i = 0; i < options.length; i++) {
|
for (let i = 0; i < options.length; i++) {
|
||||||
let option = options[i];
|
const option = options[i];
|
||||||
const flag = option[0];
|
const flag = option[0];
|
||||||
const indent = baseIndent + INDENT + ' '.repeat(optionColWidth + 2);
|
const indent = baseIndent + INDENT + ' '.repeat(optionColWidth + 2);
|
||||||
|
|
||||||
@@ -28,7 +28,7 @@ function renderCommandHelp(cmd, width = null) {
|
|||||||
|
|
||||||
const baseIndent = '';
|
const baseIndent = '';
|
||||||
|
|
||||||
let output = [];
|
const output = [];
|
||||||
output.push(baseIndent + cmd.usage());
|
output.push(baseIndent + cmd.usage());
|
||||||
output.push('');
|
output.push('');
|
||||||
output.push(wrap(cmd.description(), baseIndent + INDENT, width));
|
output.push(wrap(cmd.description(), baseIndent + INDENT, width));
|
||||||
@@ -42,7 +42,7 @@ function renderCommandHelp(cmd, width = null) {
|
|||||||
|
|
||||||
if (cmd.name() === 'config') {
|
if (cmd.name() === 'config') {
|
||||||
const renderMetadata = md => {
|
const renderMetadata = md => {
|
||||||
let desc = [];
|
const desc = [];
|
||||||
|
|
||||||
if (md.label) {
|
if (md.label) {
|
||||||
let label = md.label();
|
let label = md.label();
|
||||||
@@ -77,7 +77,7 @@ function renderCommandHelp(cmd, width = null) {
|
|||||||
output.push(_('Possible keys/values:'));
|
output.push(_('Possible keys/values:'));
|
||||||
output.push('');
|
output.push('');
|
||||||
|
|
||||||
let keysValues = [];
|
const keysValues = [];
|
||||||
const keys = Setting.keys(true, 'cli');
|
const keys = Setting.keys(true, 'cli');
|
||||||
for (let i = 0; i < keys.length; i++) {
|
for (let i = 0; i < keys.length; i++) {
|
||||||
if (keysValues.length) keysValues.push(['', '']);
|
if (keysValues.length) keysValues.push(['', '']);
|
||||||
|
@@ -21,14 +21,17 @@ const Note = require('lib/models/Note.js');
|
|||||||
const Tag = require('lib/models/Tag.js');
|
const Tag = require('lib/models/Tag.js');
|
||||||
const NoteTag = require('lib/models/NoteTag.js');
|
const NoteTag = require('lib/models/NoteTag.js');
|
||||||
const MasterKey = require('lib/models/MasterKey');
|
const MasterKey = require('lib/models/MasterKey');
|
||||||
const Setting = require('lib/models/Setting.js');
|
const Setting = require('lib/models/Setting').default;
|
||||||
const Revision = require('lib/models/Revision.js');
|
const Revision = require('lib/models/Revision.js');
|
||||||
const { Logger } = require('lib/logger.js');
|
const Logger = require('lib/Logger').default;
|
||||||
const { FsDriverNode } = require('lib/fs-driver-node.js');
|
const FsDriverNode = require('lib/fs-driver-node').default;
|
||||||
const { shimInit } = require('lib/shim-init-node.js');
|
const { shimInit } = require('lib/shim-init-node.js');
|
||||||
const { _ } = require('lib/locale.js');
|
const { _ } = require('lib/locale');
|
||||||
const { FileApiDriverLocal } = require('lib/file-api-driver-local.js');
|
const { FileApiDriverLocal } = require('lib/file-api-driver-local.js');
|
||||||
const EncryptionService = require('lib/services/EncryptionService');
|
const EncryptionService = require('lib/services/EncryptionService');
|
||||||
|
const envFromArgs = require('lib/envFromArgs');
|
||||||
|
|
||||||
|
const env = envFromArgs(process.argv);
|
||||||
|
|
||||||
const fsDriver = new FsDriverNode();
|
const fsDriver = new FsDriverNode();
|
||||||
Logger.fsDriver_ = fsDriver;
|
Logger.fsDriver_ = fsDriver;
|
||||||
@@ -46,7 +49,7 @@ BaseItem.loadClass('NoteTag', NoteTag);
|
|||||||
BaseItem.loadClass('MasterKey', MasterKey);
|
BaseItem.loadClass('MasterKey', MasterKey);
|
||||||
BaseItem.loadClass('Revision', Revision);
|
BaseItem.loadClass('Revision', Revision);
|
||||||
|
|
||||||
Setting.setConstant('appId', 'net.cozic.joplin-cli');
|
Setting.setConstant('appId', `net.cozic.joplin${env === 'dev' ? 'dev' : ''}-cli`);
|
||||||
Setting.setConstant('appType', 'cli');
|
Setting.setConstant('appType', 'cli');
|
||||||
|
|
||||||
shimInit();
|
shimInit();
|
||||||
@@ -54,7 +57,7 @@ shimInit();
|
|||||||
const application = app();
|
const application = app();
|
||||||
|
|
||||||
if (process.platform === 'win32') {
|
if (process.platform === 'win32') {
|
||||||
var rl = require('readline').createInterface({
|
const rl = require('readline').createInterface({
|
||||||
input: process.stdin,
|
input: process.stdin,
|
||||||
output: process.stdout,
|
output: process.stdout,
|
||||||
});
|
});
|
||||||
|
78
CliClient/app/services/plugins/PluginRunner.ts
Normal file
@@ -0,0 +1,78 @@
|
|||||||
|
import * as vm from 'vm';
|
||||||
|
import Plugin from 'lib/services/plugins/Plugin';
|
||||||
|
import sandboxProxy from 'lib/services/plugins/sandboxProxy';
|
||||||
|
import BasePluginRunner from 'lib/services/plugins/BasePluginRunner';
|
||||||
|
import executeSandboxCall from 'lib/services/plugins/utils/executeSandboxCall';
|
||||||
|
import Global from 'lib/services/plugins/api/Global';
|
||||||
|
import mapEventHandlersToIds, { EventHandlers } from 'lib/services/plugins/utils/mapEventHandlersToIds';
|
||||||
|
|
||||||
|
function createConsoleWrapper(pluginId:string) {
|
||||||
|
const wrapper:any = {};
|
||||||
|
|
||||||
|
for (const n in console) {
|
||||||
|
if (!console.hasOwnProperty(n)) continue;
|
||||||
|
wrapper[n] = (...args:any[]) => {
|
||||||
|
const newArgs = args.slice();
|
||||||
|
newArgs.splice(0, 0, `Plugin "${pluginId}":`);
|
||||||
|
return (console as any)[n](...newArgs);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
return wrapper;
|
||||||
|
}
|
||||||
|
|
||||||
|
// The CLI plugin runner is more complex than it needs to be because it more or less emulates
|
||||||
|
// how it would work in a multi-process architecture, as in the desktop app (and probably how
|
||||||
|
// it would work in the mobile app too). This is mainly to allow doing integration testing.
|
||||||
|
//
|
||||||
|
// For example, all plugin calls go through a proxy, however they could made directly since
|
||||||
|
// the plugin script is running within the same process as the main app.
|
||||||
|
|
||||||
|
export default class PluginRunner extends BasePluginRunner {
|
||||||
|
|
||||||
|
private eventHandlers_:EventHandlers = {};
|
||||||
|
|
||||||
|
constructor() {
|
||||||
|
super();
|
||||||
|
|
||||||
|
this.eventHandler = this.eventHandler.bind(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
private async eventHandler(eventHandlerId:string, args:any[]) {
|
||||||
|
const cb = this.eventHandlers_[eventHandlerId];
|
||||||
|
return cb(...args);
|
||||||
|
}
|
||||||
|
|
||||||
|
private newSandboxProxy(pluginId:string, sandbox:Global) {
|
||||||
|
const target = async (path:string, args:any[]) => {
|
||||||
|
return executeSandboxCall(pluginId, sandbox, `joplin.${path}`, mapEventHandlersToIds(args, this.eventHandlers_), this.eventHandler);
|
||||||
|
};
|
||||||
|
|
||||||
|
return {
|
||||||
|
joplin: sandboxProxy(target),
|
||||||
|
console: createConsoleWrapper(pluginId),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
async run(plugin:Plugin, sandbox:Global):Promise<void> {
|
||||||
|
return new Promise((resolve:Function, reject:Function) => {
|
||||||
|
const onStarted = () => {
|
||||||
|
plugin.off('started', onStarted);
|
||||||
|
resolve();
|
||||||
|
};
|
||||||
|
|
||||||
|
plugin.on('started', onStarted);
|
||||||
|
|
||||||
|
const vmSandbox = vm.createContext(this.newSandboxProxy(plugin.id, sandbox));
|
||||||
|
|
||||||
|
try {
|
||||||
|
vm.runInContext(plugin.scriptText, vmSandbox);
|
||||||
|
} catch (error) {
|
||||||
|
reject(error);
|
||||||
|
// this.logger().error(`In plugin ${plugin.id}:`, error);
|
||||||
|
// return;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@@ -2,10 +2,15 @@ const gulp = require('gulp');
|
|||||||
const fs = require('fs-extra');
|
const fs = require('fs-extra');
|
||||||
const utils = require('../Tools/gulp/utils');
|
const utils = require('../Tools/gulp/utils');
|
||||||
const tasks = {
|
const tasks = {
|
||||||
|
compileExtensions: {
|
||||||
|
fn: require('../Tools/gulp/tasks/compileExtensions.js'),
|
||||||
|
},
|
||||||
copyLib: require('../Tools/gulp/tasks/copyLib'),
|
copyLib: require('../Tools/gulp/tasks/copyLib'),
|
||||||
|
tsc: require('../Tools/gulp/tasks/tsc'),
|
||||||
|
updateIgnoredTypeScriptBuild: require('../Tools/gulp/tasks/updateIgnoredTypeScriptBuild'),
|
||||||
};
|
};
|
||||||
|
|
||||||
tasks.build = {
|
tasks.prepareBuild = {
|
||||||
fn: async () => {
|
fn: async () => {
|
||||||
const buildDir = `${__dirname}/build`;
|
const buildDir = `${__dirname}/build`;
|
||||||
await utils.copyDir(`${__dirname}/app`, buildDir, {
|
await utils.copyDir(`${__dirname}/app`, buildDir, {
|
||||||
@@ -14,11 +19,31 @@ tasks.build = {
|
|||||||
await utils.copyDir(`${__dirname}/locales-build`, `${buildDir}/locales`);
|
await utils.copyDir(`${__dirname}/locales-build`, `${buildDir}/locales`);
|
||||||
await tasks.copyLib.fn();
|
await tasks.copyLib.fn();
|
||||||
await utils.copyFile(`${__dirname}/package.json`, `${buildDir}/package.json`);
|
await utils.copyFile(`${__dirname}/package.json`, `${buildDir}/package.json`);
|
||||||
|
await utils.copyFile(`${__dirname}/package-lock.json`, `${buildDir}/package-lock.json`);
|
||||||
|
await utils.copyFile(`${__dirname}/gulpfile.js`, `${buildDir}/gulpfile.js`);
|
||||||
|
|
||||||
|
// Import all the patches inside the CliClient directory
|
||||||
|
// and build file. Needs to be in CliClient dir for when running
|
||||||
|
// in dev mode, and in build dir for production.
|
||||||
|
const localPatchDir = `${buildDir}/patches`;
|
||||||
|
await fs.remove(localPatchDir);
|
||||||
|
await fs.mkdirp(localPatchDir);
|
||||||
|
await utils.copyDir(`${__dirname}/../patches/shared`, `${localPatchDir}`, { delete: false });
|
||||||
|
await utils.copyDir(`${__dirname}/../patches/node`, `${localPatchDir}`, { delete: false });
|
||||||
|
|
||||||
|
await fs.remove(`${__dirname}/patches`);
|
||||||
|
await utils.copyDir(`${localPatchDir}`, `${__dirname}/patches`);
|
||||||
|
|
||||||
|
const packageRaw = await fs.readFile(`${buildDir}/package.json`);
|
||||||
|
const package = JSON.parse(packageRaw.toString());
|
||||||
|
package.scripts.postinstall = 'patch-package';
|
||||||
|
await fs.writeFile(`${buildDir}/package.json`, JSON.stringify(package, null, 2), 'utf8');
|
||||||
|
|
||||||
fs.chmodSync(`${buildDir}/main.js`, 0o755);
|
fs.chmodSync(`${buildDir}/main.js`, 0o755);
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
tasks.buildTests = {
|
tasks.prepareTestBuild = {
|
||||||
fn: async () => {
|
fn: async () => {
|
||||||
const testBuildDir = `${__dirname}/tests-build`;
|
const testBuildDir = `${__dirname}/tests-build`;
|
||||||
|
|
||||||
@@ -27,14 +52,33 @@ tasks.buildTests = {
|
|||||||
'lib/',
|
'lib/',
|
||||||
'locales/',
|
'locales/',
|
||||||
'node_modules/',
|
'node_modules/',
|
||||||
|
'*.ts',
|
||||||
|
'*.tsx',
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
|
||||||
await utils.copyDir(`${__dirname}/../ReactNativeClient/lib`, `${testBuildDir}/lib`);
|
const rootDir = utils.rootDir();
|
||||||
await utils.copyDir(`${__dirname}/../ReactNativeClient/locales`, `${testBuildDir}/locales`);
|
|
||||||
|
await utils.copyDir(`${rootDir}/ReactNativeClient/lib`, `${testBuildDir}/lib`, {
|
||||||
|
excluded: [
|
||||||
|
`${rootDir}/ReactNativeClient/lib/joplin-renderer/node_modules`,
|
||||||
|
],
|
||||||
|
});
|
||||||
|
await utils.copyDir(`${rootDir}/ReactNativeClient/locales`, `${testBuildDir}/locales`);
|
||||||
await fs.mkdirp(`${testBuildDir}/data`);
|
await fs.mkdirp(`${testBuildDir}/data`);
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
gulp.task('build', tasks.build.fn);
|
utils.registerGulpTasks(gulp, tasks);
|
||||||
gulp.task('buildTests', tasks.buildTests.fn);
|
|
||||||
|
gulp.task('build', gulp.series([
|
||||||
|
'prepareBuild',
|
||||||
|
'compileExtensions',
|
||||||
|
'copyLib',
|
||||||
|
]));
|
||||||
|
|
||||||
|
gulp.task('buildTests', gulp.series([
|
||||||
|
'prepareTestBuild',
|
||||||
|
'compileExtensions',
|
||||||
|
'copyLib',
|
||||||
|
]));
|
||||||
|