Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
43d5279acf | ||
|
|
e674607fce | ||
|
|
2e6239f637 | ||
|
|
bcb8ddc17b | ||
|
|
cd619582ec | ||
|
|
3b49562f64 | ||
|
|
674ed2cc72 | ||
|
|
5621fd8a06 | ||
|
|
af27e0b111 | ||
|
|
5a78e12f7d | ||
|
|
47b19d1d74 | ||
|
|
070573e68a | ||
|
|
946d7769f1 | ||
|
|
f0426a3ec2 | ||
|
|
b2d67818a8 | ||
|
|
c0b159d824 | ||
|
|
d7e11e20c1 | ||
|
|
d590318153 | ||
|
|
5816ca9c4d | ||
|
|
6627e8c0ec | ||
|
|
379e28e8a4 | ||
|
|
4fb25451a2 | ||
|
|
58a6a97130 | ||
|
|
f59b846643 | ||
|
|
28d7dfeb67 | ||
|
|
6cc39d2107 | ||
|
|
a92a01095b | ||
|
|
3f4cddd2a2 | ||
|
|
aa734ea976 | ||
|
|
30628004fd | ||
|
|
a6e87b52fd | ||
|
|
6d06d825e5 | ||
|
|
0800d5f33a | ||
|
|
337ef44b56 | ||
|
|
70b4effde8 | ||
|
|
9e4c0f5c47 | ||
|
|
535cdc72f7 | ||
|
|
8d258ecab2 | ||
|
|
3079e28f6f | ||
|
|
4970290614 | ||
|
|
6929931cae | ||
|
|
e348310602 | ||
|
|
7abbd2f253 | ||
|
|
c56698492e | ||
|
|
bc4c33fcbb | ||
|
|
05d5ac960c | ||
|
|
80331401b5 | ||
|
|
b4459e1247 | ||
|
|
706c82d3ca | ||
|
|
0e1b086096 | ||
|
|
80359c98f5 | ||
|
|
034e0ec2e3 | ||
|
|
cc6839d13e | ||
|
|
0ce436c2e9 | ||
|
|
966d814281 | ||
|
|
c983bc10ab | ||
|
|
d603398da0 | ||
|
|
1404d2688f | ||
|
|
c72158cf0d | ||
|
|
1e6ed1308f | ||
|
|
fae241373a | ||
|
|
2bf4cd83df | ||
|
|
efd3290ee8 | ||
|
|
aa729d9af8 | ||
|
|
2d6d3658a1 | ||
|
|
0cbdd6281a | ||
|
|
a845a42d0d | ||
|
|
60329e086a | ||
|
|
a3174b96d7 | ||
|
|
29c00066bc | ||
|
|
b90ffc4d3f | ||
|
|
7e030320f5 | ||
|
|
c96bcad32d | ||
|
|
a655cce195 | ||
|
|
aafb0e7964 | ||
|
|
288f7f117f | ||
|
|
125ac2eda8 | ||
|
|
ea80bfae07 | ||
|
|
5e727a3547 | ||
|
|
6672b60d0f | ||
|
|
09fe1a4649 | ||
|
|
e4fa4cc413 | ||
|
|
0be60475cf | ||
|
|
b7e53185b0 | ||
|
|
cd8c76b3eb | ||
|
|
a1d7a1fe48 | ||
|
|
c48153819f | ||
|
|
d2d5590887 | ||
|
|
65b319e127 | ||
|
|
b34c0dd34e | ||
|
|
ddc1a371bf | ||
|
|
a0c0b7b195 | ||
|
|
b07cea9049 | ||
|
|
991388d4cd | ||
|
|
7adc77c823 | ||
|
|
550f93d4ae | ||
|
|
b43187e5b8 | ||
|
|
6230710bb0 | ||
|
|
ff119cbc0a | ||
|
|
2a2ec713af | ||
|
|
41eb560d1a | ||
|
|
f7b9b91144 | ||
|
|
97ab5d066e | ||
|
|
448e19d28c | ||
|
|
391f2c9c00 | ||
|
|
18524ad9eb | ||
|
|
732c35625b | ||
|
|
95857450c2 | ||
|
|
98ea7a542d | ||
|
|
338f6d47d1 | ||
|
|
fdb492c572 | ||
|
|
ce3ff8c3d8 | ||
|
|
1789d9bb67 | ||
|
|
1883b527a4 | ||
|
|
2f4a9d450a | ||
|
|
12fc33a15e | ||
|
|
e4693ecf61 | ||
|
|
c15d709db2 | ||
|
|
e09040b0fb | ||
|
|
4477c3fc2c | ||
|
|
f52a00a156 | ||
|
|
946a063993 | ||
|
|
d3fcbcb6a5 | ||
|
|
f91cfc0f79 | ||
|
|
f0bbc54fd5 | ||
|
|
3ca5f94b9b | ||
|
|
7a35ebec73 | ||
|
|
66d3623f90 | ||
|
|
8c9badd440 | ||
|
|
e0d47a474d | ||
|
|
1a8aff0594 | ||
|
|
cf5e01c213 | ||
|
|
ffae956e21 | ||
|
|
5c4cb7ff6d | ||
|
|
7794c8b89b | ||
|
|
bb78e8e8a7 | ||
|
|
00a2a95adc | ||
|
|
e55dd47f6e | ||
|
|
7b10bda0a4 | ||
|
|
d5b9aefa01 | ||
|
|
cdc3f5e1df | ||
|
|
8fc6f49fb4 | ||
|
|
29e5c14009 | ||
|
|
fe9ff205b9 | ||
|
|
87b59eccee | ||
|
|
42cb5a6c36 | ||
|
|
9826965803 | ||
|
|
47153e41d3 | ||
|
|
677b428e63 | ||
|
|
15936fcef0 | ||
|
|
b2e828e7ef | ||
|
|
ac6e5a3ae8 | ||
|
|
3722477eea | ||
|
|
72d0f76acc | ||
|
|
b7333574aa | ||
|
|
5caccbd1f5 | ||
|
|
698b559935 | ||
|
|
36d5e8f730 | ||
|
|
233721bf51 | ||
|
|
822602a38f | ||
|
|
e69dbf697c | ||
|
|
184d71a1b9 | ||
|
|
ccb9b03287 | ||
|
|
dd4ad6d72b | ||
|
|
195e2cc8f0 | ||
|
|
ef573336d8 | ||
|
|
9377a849f6 | ||
|
|
00ccbf4be2 | ||
|
|
00159d26dc | ||
|
|
b4f93adf05 | ||
|
|
5bbc9003f4 | ||
|
|
c4be926b7c | ||
|
|
147e3911f1 | ||
|
|
c7b814fc01 | ||
|
|
8525571afc | ||
|
|
5c5de91672 | ||
|
|
7dbb0a2e8f | ||
|
|
11b54ffdf9 | ||
|
|
5d76ac33dd | ||
|
|
8e92bf3766 | ||
|
|
56517eec62 | ||
|
|
ed56f0733e | ||
|
|
3fd799ee74 | ||
|
|
4ed8a67eda | ||
|
|
cbb9a8dbd0 | ||
|
|
4280b84459 | ||
|
|
e06e9ac1f8 | ||
|
|
7bea4ad282 | ||
|
|
316c14d845 | ||
|
|
d17be63312 | ||
|
|
2c2253db31 | ||
|
|
a3128e56a3 | ||
|
|
de0cf0ce67 | ||
|
|
e3f33b9d4c | ||
|
|
27143e2663 | ||
|
|
566e2fb35d | ||
|
|
dc5ada1c04 | ||
|
|
603e698f5a | ||
|
|
f893dcb19a | ||
|
|
27b116798e | ||
|
|
ae932e5710 | ||
|
|
bab5a979be | ||
|
|
1b8c9a3e0c | ||
|
|
99d0fa30ed | ||
|
|
5cc146481b | ||
|
|
102da5cba1 | ||
|
|
d374eecb18 | ||
|
|
08d31c0ffe | ||
|
|
c62e40465a | ||
|
|
5367f32d5c | ||
|
|
ad20698a42 | ||
|
|
e865d80a63 | ||
|
|
81a311e7fa | ||
|
|
5397fa8fd3 | ||
|
|
b9e08cd9e3 | ||
|
|
fe86cd6320 | ||
|
|
bba07bb83a | ||
|
|
83a53ee1f0 | ||
|
|
23ba363a0d | ||
|
|
101aee81c0 | ||
|
|
fa60d02129 | ||
|
|
6a9e5fd801 | ||
|
|
12ae7845ec | ||
|
|
045e8ee96f | ||
|
|
993f75b14e | ||
|
|
b48f3746bc | ||
|
|
dcc477acbc | ||
|
|
5f4f007b31 | ||
|
|
9d4788cb7c | ||
|
|
5a1380f9ef | ||
|
|
0d82aa26f3 | ||
|
|
05f2ec19f2 | ||
|
|
25c3c9c565 | ||
|
|
d6e7e3d4a0 | ||
|
|
6148112904 | ||
|
|
ba338e9282 | ||
|
|
2e132690d1 | ||
|
|
8f1b6ca3b7 | ||
|
|
85d0252972 | ||
|
|
077f72a0c5 | ||
|
|
25bec513f3 | ||
|
|
0a6378d84c | ||
|
|
1e6034ce37 | ||
|
|
ef6e5ebcbe | ||
|
|
19a42b7463 | ||
|
|
9d0e608454 | ||
|
|
bd9a98dbfd | ||
|
|
0ffca3dfe4 | ||
|
|
01958559ee | ||
|
|
bb4aef206a | ||
|
|
e74227b0db | ||
|
|
a47aec1cc4 | ||
|
|
cd9d8cde3e | ||
|
|
d4f68d5ec7 | ||
|
|
a910cfcb35 | ||
|
|
962de503fd | ||
|
|
f40e72c882 | ||
|
|
b7993e1d0e | ||
|
|
d6e5e73e82 | ||
|
|
1794f87f99 | ||
|
|
81c7d57f30 | ||
|
|
b4f0149bd8 | ||
|
|
87ec06eef0 | ||
|
|
c764548214 | ||
|
|
c78af7c3ad | ||
|
|
f9cd0d4e29 | ||
|
|
ee03435ca7 | ||
|
|
a9b83256c6 | ||
|
|
7086ddcf58 | ||
|
|
26d226bb17 | ||
|
|
dc4742bf5c | ||
|
|
933df5fae4 | ||
|
|
4b17ac19dc | ||
|
|
43f6a4f499 | ||
|
|
076b99676d | ||
|
|
b3dfa05a4a | ||
|
|
c5946b1a0b | ||
|
|
58a85eabdf | ||
|
|
8a1d9b96dd | ||
|
|
36a3d2f766 | ||
|
|
68010076f9 | ||
|
|
92da783e82 | ||
|
|
7d1e343d25 | ||
|
|
84d17b7255 | ||
|
|
64e06a32ec | ||
|
|
4ee87e197d | ||
|
|
cace667b26 | ||
|
|
67d3e28af7 | ||
|
|
3c5f4e7b84 | ||
|
|
8f913c737c | ||
|
|
8ba147f52f | ||
|
|
9cfbd24b76 | ||
|
|
259abf6d25 | ||
|
|
8c59838a6f | ||
|
|
f7d24c6379 | ||
|
|
0f5466e075 | ||
|
|
7ab0e83f55 | ||
|
|
dc02ede8d7 | ||
|
|
42e484827f | ||
|
|
576c8f97bd | ||
|
|
808b4a687d | ||
|
|
954f2c235b | ||
|
|
51a7bbbfb8 | ||
|
|
9b5f5857bb | ||
|
|
e66f52a8ce | ||
|
|
8023bcea96 | ||
|
|
dfb7491503 | ||
|
|
b43d9c963a | ||
|
|
51c0637134 | ||
|
|
b16c23190b | ||
|
|
fddf2892cd | ||
|
|
53b5715da0 | ||
|
|
3a79fcb366 | ||
|
|
4df034ac55 | ||
|
|
a0bb04fe3a | ||
|
|
a923f28a8d | ||
|
|
78642f1c9b | ||
|
|
f8a85af859 | ||
|
|
bdb5bd0428 | ||
|
|
9e07f55c12 | ||
|
|
6a3e129ed5 | ||
|
|
879ba17760 | ||
|
|
0d2107e72a | ||
|
|
a23a47fded | ||
|
|
7737a29cca | ||
|
|
34278b3bff | ||
|
|
40b0643eaa | ||
|
|
ae7f5fbff2 | ||
|
|
0a776c6a72 | ||
|
|
5caecb1c8f | ||
|
|
0def3f8b2d | ||
|
|
1593acd8e9 | ||
|
|
da5553364a | ||
|
|
b7c03490d8 | ||
|
|
b8dd7b0f71 | ||
|
|
e7a8d5232f | ||
|
|
c638fa38e8 | ||
|
|
f74b054f01 | ||
|
|
b7af33edae | ||
|
|
166211b6f8 | ||
|
|
f8ec47bfdb | ||
|
|
4e84121553 | ||
|
|
ccf4ce8e58 | ||
|
|
6ba3d44fa1 | ||
|
|
c03ed76fec | ||
|
|
31214b10e7 | ||
|
|
5bbc324b2e | ||
|
|
7dcb22950e | ||
|
|
3c06f1f1a3 | ||
|
|
6bcf5161b1 | ||
|
|
ccc6765e2e | ||
|
|
14d40d4e2d | ||
|
|
75d563b320 | ||
|
|
2fdd53b55e | ||
|
|
4ac16a6701 | ||
|
|
e998788d25 | ||
|
|
e23b80b11b | ||
|
|
7eb884dcb9 | ||
|
|
92397adbb3 | ||
|
|
828485789f | ||
|
|
2f84474216 | ||
|
|
762aab397d | ||
|
|
b03cb4590f | ||
|
|
5d40831dd7 | ||
|
|
0d291afb05 | ||
|
|
e107c5c108 | ||
|
|
44905e674d | ||
|
|
5b790e711a | ||
|
|
1a9c54b237 | ||
|
|
0f4434a361 | ||
|
|
7e2823903b | ||
|
|
92937dbb86 | ||
|
|
0868efe095 | ||
|
|
97374f63f9 | ||
|
|
69f7b02ce6 | ||
|
|
b5ee682a41 | ||
|
|
70f82bdfd8 | ||
|
|
e70185560b | ||
|
|
be4be0e7e8 | ||
|
|
b9a5c64113 | ||
|
|
215f398547 | ||
|
|
ace18f9d95 | ||
|
|
c4ec91f61a | ||
|
|
a4881419df | ||
|
|
839359a794 | ||
|
|
d4d9b7c7a7 | ||
|
|
d4526c0c8a | ||
|
|
78f0bc6f02 | ||
|
|
ad3f5afeba | ||
|
|
7c4326939a | ||
|
|
e5428b67b8 | ||
|
|
59616bd8af | ||
|
|
fdc9ac95d2 | ||
|
|
a8f0d1af62 | ||
|
|
f6e377f222 | ||
|
|
c43d7ab92a | ||
|
|
0464e1de5c | ||
|
|
7a7381eac0 | ||
|
|
1379db1e92 | ||
|
|
ee10894f5f | ||
|
|
87d760708d | ||
|
|
ec7155809b | ||
|
|
5af7837468 | ||
|
|
d3f79af2ab | ||
|
|
a6c0fc3984 | ||
|
|
56604de7f1 | ||
|
|
d5e6199775 | ||
|
|
15920abcf7 | ||
|
|
88205d716a | ||
|
|
fa1a16f140 | ||
|
|
4f8075ca6c | ||
|
|
2615d0644d | ||
|
|
d2686937fd | ||
|
|
b60307e28b | ||
|
|
08d49ddc54 | ||
|
|
4cdc80e530 | ||
|
|
acd360efb9 | ||
|
|
87ad89beeb | ||
|
|
c2663ca7d8 | ||
|
|
4e58285cc2 | ||
|
|
ef354fb8af | ||
|
|
79ce535d4a | ||
|
|
50c43c4408 | ||
|
|
8fdec5aadc | ||
|
|
73eccd5308 | ||
|
|
4449677e36 | ||
|
|
8dc3a4b51f | ||
|
|
cd2de3a1db | ||
|
|
1fa0eebc3b | ||
|
|
e13002bab3 | ||
|
|
a750e80ea1 | ||
|
|
66e1b0a089 | ||
|
|
00c0b3f88c | ||
|
|
674311cb4b | ||
|
|
f54b8e00e1 | ||
|
|
c1beac5d0d | ||
|
|
7123345341 | ||
|
|
0e2475e667 | ||
|
|
acf1f1146d | ||
|
|
d136fa4fdf | ||
|
|
61067391b6 | ||
|
|
affebb1ba4 | ||
|
|
cbffa3d4ef | ||
|
|
6ef5ae2517 | ||
|
|
9701496897 | ||
|
|
22d6a3011f | ||
|
|
d22ddd99f6 | ||
|
|
4e8648fca0 | ||
|
|
9f49c357e9 | ||
|
|
d318467039 | ||
|
|
b05c25ac1a | ||
|
|
5dd0d51514 | ||
|
|
c7574a6b83 | ||
|
|
ab64e9343b | ||
|
|
b82cb0e849 | ||
|
|
c44a8fab42 | ||
|
|
9a75eb0a22 | ||
|
|
f994278a8b | ||
|
|
bd882d0e17 | ||
|
|
fddf62409a | ||
|
|
a8967ac764 | ||
|
|
20bc254a42 | ||
|
|
e298d5fbd8 | ||
|
|
ff54c2070d | ||
|
|
e092caa2ef | ||
|
|
feb44be9d0 | ||
|
|
a43a2e8ce2 | ||
|
|
6fcf77829d | ||
|
|
733833e8a4 | ||
|
|
890f998fe0 | ||
|
|
28c708f599 | ||
|
|
f1e536cbcf | ||
|
|
8dc7ad4f01 | ||
|
|
43c8976282 | ||
|
|
8ee63ccc24 | ||
|
|
2900fe07bf | ||
|
|
1d572d1fa9 | ||
|
|
21b8e9ae8f | ||
|
|
cb77b7fc1e | ||
|
|
763141592f | ||
|
|
09fcddfad2 | ||
|
|
b8ce1b5cc1 | ||
|
|
6a34fffcc4 | ||
|
|
75fa636366 | ||
|
|
bee96ebf15 | ||
|
|
9ec23fac5d | ||
|
|
2a7cd3574d | ||
|
|
4f96629e22 | ||
|
|
74bd270423 | ||
|
|
0469f28a54 | ||
|
|
a9c2da3fdb | ||
|
|
2ec37c3ece | ||
|
|
ef812c5697 | ||
|
|
8ab4e7c433 | ||
|
|
23bb30be92 | ||
|
|
a13d44d560 | ||
|
|
42b5b002cc | ||
|
|
f889488915 | ||
|
|
57f3a287c2 | ||
|
|
143b1a73f7 | ||
|
|
54a1860398 | ||
|
|
014b6b2319 | ||
|
|
33763ab865 | ||
|
|
5f5ea892a3 | ||
|
|
a3fc2b2cdd | ||
|
|
2cad70dae0 | ||
|
|
fb56ba2f0d | ||
|
|
7c2b7a09f8 | ||
|
|
abf5531fc5 | ||
|
|
18775e3cea | ||
|
|
9d5e7be105 | ||
|
|
eed647c867 | ||
|
|
072271bbe6 | ||
|
|
a84499d7d4 | ||
|
|
c06db5a2b7 | ||
|
|
fc737b1f51 | ||
|
|
4f068008bd | ||
|
|
953f6dc61f | ||
|
|
01fac1f0ca | ||
|
|
1796ac743d | ||
|
|
60329b3cab | ||
|
|
f489eca5c2 | ||
|
|
1617cae518 | ||
|
|
6c7b99af58 | ||
|
|
ddd242b9df | ||
|
|
c24fe2806c | ||
|
|
8da0a2e239 | ||
|
|
8aff64ce47 | ||
|
|
677f1ce75f | ||
|
|
f99ff95a57 | ||
|
|
7a522acdd9 | ||
|
|
9888a0cf5b | ||
|
|
9b586f7059 | ||
|
|
90666cea99 | ||
|
|
cabf0d388d | ||
|
|
39a33bd77a | ||
|
|
f184915849 | ||
|
|
683b0bc4e6 | ||
|
|
212042556f | ||
|
|
cc4aa6fc1a | ||
|
|
b4b6ef3206 | ||
|
|
ccfd5126bc | ||
|
|
b733b43f8b | ||
|
|
3c0693fdd9 | ||
|
|
938f2be487 | ||
|
|
9f2a09cc97 | ||
|
|
27d5fc4cba | ||
|
|
251b763ea9 | ||
|
|
8a07162e6b | ||
|
|
4097d81b8a | ||
|
|
bf2d72745a | ||
|
|
acc60e6297 | ||
|
|
211b058686 | ||
|
|
95c077a0ba | ||
|
|
0b70017780 | ||
|
|
513e258869 | ||
|
|
7cd046ecc0 | ||
|
|
220a27e030 | ||
|
|
3728fbc367 | ||
|
|
6d41c71542 | ||
|
|
a1b4dde3e3 | ||
|
|
677586e882 | ||
|
|
3177a87690 | ||
|
|
f8fda777db | ||
|
|
e955c3ddc1 | ||
|
|
7e36418276 | ||
|
|
e5616dffa7 | ||
|
|
be3087d2cc | ||
|
|
396721fce6 | ||
|
|
d49af938d9 | ||
|
|
d2ae8522b5 | ||
|
|
a3e27709d0 | ||
|
|
a245553cad | ||
|
|
8bcdc6d109 | ||
|
|
8a1b28a793 | ||
|
|
90b236e6f9 | ||
|
|
804b8cf17b | ||
|
|
ed3eefbbfc | ||
|
|
51564056a1 | ||
|
|
4884caadd4 | ||
|
|
e129e52e01 | ||
|
|
893a0f43c1 | ||
|
|
083cbe9840 | ||
|
|
a7fcbae65f | ||
|
|
7ae80c2e7c | ||
|
|
f1ede2b876 | ||
|
|
8c51adbca1 | ||
|
|
446f293da0 | ||
|
|
bbd7f9c6d6 | ||
|
|
9e5fb90bd6 | ||
|
|
2ed735ad95 | ||
|
|
00be6f0181 | ||
|
|
29a4d367f9 | ||
|
|
df43c61785 | ||
|
|
464c49257a | ||
|
|
bd4a6d0eee | ||
|
|
9410fc6a8c | ||
|
|
bd400c0797 | ||
|
|
54c721c265 | ||
|
|
94cfa4f3d4 | ||
|
|
f21ef7f444 | ||
|
|
66a0cf4782 | ||
|
|
52f27ce743 | ||
|
|
57296ba313 | ||
|
|
47dc1727df | ||
|
|
cd9fe46fdb | ||
|
|
775cdf237c | ||
|
|
63367998bf | ||
|
|
5d3e110a9e | ||
|
|
42267eaef8 | ||
|
|
b716599c90 | ||
|
|
6d80de9216 | ||
|
|
212dc99cec | ||
|
|
6f4f8ec1ea | ||
|
|
24c64daa49 | ||
|
|
bdd9a51d25 | ||
|
|
f27862b036 | ||
|
|
f7e9f725b0 | ||
|
|
4ee430284b | ||
|
|
96458048fc | ||
|
|
a31f9d5a50 | ||
|
|
33d5f0b5bb | ||
|
|
ec43f0a549 | ||
|
|
8e0dc326cb | ||
|
|
9994c87446 | ||
|
|
647ce573b0 | ||
|
|
1ca4ead313 | ||
|
|
1ef5ffab52 | ||
|
|
f4f2ddfb3c | ||
|
|
650b4805be | ||
|
|
22754f32ec | ||
|
|
85a67b533a | ||
|
|
974dbd224a | ||
|
|
b8c7a8b936 | ||
|
|
86844064db | ||
|
|
0c9b9a1b97 | ||
|
|
0a9846b86f | ||
|
|
96ee17b8cc | ||
|
|
4b65792585 | ||
|
|
32b871e338 | ||
|
|
46ddb725db | ||
|
|
d0fdada9f7 | ||
|
|
a343853b38 | ||
|
|
136fbc2f77 | ||
|
|
25bc5643b1 | ||
|
|
a0c03363a7 | ||
|
|
8dd7a97769 | ||
|
|
f70dfaaa28 | ||
|
|
01ceb6dc37 | ||
|
|
d56e50b29d | ||
|
|
0b2c722f61 | ||
|
|
26990f38dd | ||
|
|
b2d87efc99 | ||
|
|
63b7b32e9c | ||
|
|
8925a48822 | ||
|
|
8ad47181a9 | ||
|
|
c1b9ec7a77 | ||
|
|
6daf34e261 | ||
|
|
fc5c865b18 | ||
|
|
083306a1cd | ||
|
|
5ebacbc347 | ||
|
|
08c4adfd46 | ||
|
|
27f87ad09f | ||
|
|
d0b33ca0c1 | ||
|
|
bb44c7cb3e | ||
|
|
66e366d9d0 | ||
|
|
31390eac80 | ||
|
|
543a71f6f2 | ||
|
|
5d29b79dab | ||
|
|
207ff77778 | ||
|
|
b85d25614b | ||
|
|
d1bcdca0d3 | ||
|
|
ffb68b1651 | ||
|
|
49d46cfedc | ||
|
|
9c18e2877b | ||
|
|
a1da5ceabe | ||
|
|
759b92bfd6 | ||
|
|
b4f3d19259 | ||
|
|
35e3271839 | ||
|
|
90da86ebb8 | ||
|
|
ad978d2ed3 | ||
|
|
7140a2d894 | ||
|
|
eb86603b47 | ||
|
|
1e1117c28b | ||
|
|
f3de0d8391 | ||
|
|
4749be20b4 | ||
|
|
3eea00bf6d | ||
|
|
d301287fdc | ||
|
|
07f4090498 | ||
|
|
067d3778d8 | ||
|
|
daa250e8fa | ||
|
|
91f992df39 | ||
|
|
ecaf9a37da | ||
|
|
31cc2fbdd4 | ||
|
|
6e30687919 | ||
|
|
dbf212f0df | ||
|
|
af49645f8d | ||
|
|
59bed7593d | ||
|
|
43ca723c75 | ||
|
|
855370074f | ||
|
|
84f707d6cd | ||
|
|
17be9cf266 | ||
|
|
0e3d01ade6 | ||
|
|
02fe2b1754 | ||
|
|
a0c553b3a9 | ||
|
|
62ea631269 | ||
|
|
b32d842394 | ||
|
|
0c38b5b9f1 | ||
|
|
dd0b20634c | ||
|
|
f8319408f1 | ||
|
|
c451e92a9c | ||
|
|
36cf70202d | ||
|
|
39fe83fdd1 | ||
|
|
cc5a465dc3 | ||
|
|
2018f04bdf | ||
|
|
f0e79eab95 | ||
|
|
fc1b2fbbaa | ||
|
|
a8e89da5e9 | ||
|
|
e369a6b7be | ||
|
|
ae4d4398cd | ||
|
|
5781d20615 | ||
|
|
a6e9521435 | ||
|
|
1e72711bc3 | ||
|
|
1f793e2d00 | ||
|
|
af8d94d102 | ||
|
|
a424c3286a | ||
|
|
5f9b33506a | ||
|
|
819b10e1f6 | ||
|
|
0c170766e5 | ||
|
|
f7a0025b97 | ||
|
|
22776e9088 | ||
|
|
d23d393c39 | ||
|
|
bbf6e796f8 | ||
|
|
1c3c194b3a | ||
|
|
0cc633c5c1 | ||
|
|
9a8f1ad508 | ||
|
|
65f09c6535 | ||
|
|
d7db5d2c77 | ||
|
|
8205b01c65 | ||
|
|
d7ee936b27 | ||
|
|
d9ae6f312f | ||
|
|
aea9a513b4 | ||
|
|
d3b65f6280 | ||
|
|
3bf53aa87f | ||
|
|
5081df4f2f | ||
|
|
b91dbdaa8f | ||
|
|
c313de9f93 | ||
|
|
09b00f3137 | ||
|
|
8342336e8d | ||
|
|
fe245dc95e | ||
|
|
3001afd9db | ||
|
|
48b5c8d4e7 | ||
|
|
21dc4e758f | ||
|
|
5c5fc0271e | ||
|
|
082c6bee93 | ||
|
|
c1d354a6fb | ||
|
|
eab683ec71 | ||
|
|
cd2b87b317 | ||
|
|
4abe63c00f | ||
|
|
7e4e61e005 | ||
|
|
db38e015f8 | ||
|
|
ff20d2a554 | ||
|
|
cb7df205bb | ||
|
|
dfe2c42172 | ||
|
|
4854c0c100 | ||
|
|
33bdf124c2 | ||
|
|
2d752ef144 | ||
|
|
d258bce037 | ||
|
|
21ff37d82e | ||
|
|
312b08ca99 | ||
|
|
a47f0d0ae5 | ||
|
|
c1a6268c2d | ||
|
|
65b6fe2e2e | ||
|
|
0f29e94272 | ||
|
|
dd9b6a1943 | ||
|
|
a45bc13248 | ||
|
|
b7b5caac9d | ||
|
|
0eb5ebab0d | ||
|
|
f34b1011c8 | ||
|
|
33049c21e7 | ||
|
|
6c12822279 | ||
|
|
8a3ff150a6 | ||
|
|
de4bfdf9e0 | ||
|
|
461a45dc51 | ||
|
|
2b24d716a9 | ||
|
|
36b6fd80b8 | ||
|
|
f8cbf51842 | ||
|
|
17fbf9188d | ||
|
|
ec5bacd951 | ||
|
|
56c8649040 | ||
|
|
435eb5779f | ||
|
|
a83e04fe4d | ||
|
|
bdbff334a5 | ||
|
|
f70eb35f69 | ||
|
|
f1a5aba485 | ||
|
|
f8e454dab3 | ||
|
|
9988454af1 | ||
|
|
e0b65bbebf | ||
|
|
09fd37820b | ||
|
|
360194c627 | ||
|
|
21768b1b59 | ||
|
|
325d521f49 | ||
|
|
2deb241ff2 | ||
|
|
a2194435e6 | ||
|
|
448e173f7e | ||
|
|
4b52280549 | ||
|
|
9e09f7b7e7 | ||
|
|
83293d909e | ||
|
|
176553a674 | ||
|
|
a4b22b6c88 | ||
|
|
fb6bcdf5c9 | ||
|
|
776c75d823 | ||
|
|
143f7c6a7a | ||
|
|
b520c58ef4 | ||
|
|
3c47adbf32 | ||
|
|
835acff637 | ||
|
|
a08e3c7d27 | ||
|
|
d9258745d0 | ||
|
|
70bd4f1c4e | ||
|
|
ab3860cdc9 | ||
|
|
9185ef9a55 | ||
|
|
e6826b176e | ||
|
|
f5bb29e61a | ||
|
|
d0d013e046 | ||
|
|
5002c2ce67 | ||
|
|
8e3b218a74 | ||
|
|
51bd80faf4 | ||
|
|
b4fe0af53a | ||
|
|
2ba9a03e2c | ||
|
|
7394754b6f | ||
|
|
b41b291e60 | ||
|
|
0f582e3248 | ||
|
|
b90e84be42 | ||
|
|
ef627c9530 | ||
|
|
b3f021a577 | ||
|
|
96263c11ec | ||
|
|
b2a6e1180c | ||
|
|
817b44b152 | ||
|
|
701bb4caa4 | ||
|
|
a1b8682316 | ||
|
|
8c386dbe57 | ||
|
|
d8e49d993a | ||
|
|
93310eb029 | ||
|
|
f215c26a63 | ||
|
|
b5fddeb627 | ||
|
|
81d4c5c403 | ||
|
|
bf7dec2437 | ||
|
|
efa9b5f9a7 | ||
|
|
1f862a37e9 | ||
|
|
e8a491dba5 | ||
|
|
aa899b8096 | ||
|
|
8de55c450a | ||
|
|
1fafa68793 | ||
|
|
e69219697a | ||
|
|
08a0f6e587 | ||
|
|
7a26d80255 | ||
|
|
4171848655 | ||
|
|
a7193fd783 | ||
|
|
ccce95d4fe | ||
|
|
b9f37c22d9 | ||
|
|
3b3c95e57c | ||
|
|
fadea36232 | ||
|
|
99b687244c | ||
|
|
813b26270f | ||
|
|
b715507dd0 | ||
|
|
0cb502ca67 | ||
|
|
e5073eb65f | ||
|
|
c3b55cd7fa | ||
|
|
e9ef1bd698 | ||
|
|
045fe99158 | ||
|
|
dad95033c0 | ||
|
|
02e4d52db6 | ||
|
|
1f83f34e55 | ||
|
|
1ffb45433c | ||
|
|
b6780dff03 | ||
|
|
5b91dcb272 | ||
|
|
099f1ca9d0 | ||
|
|
c73f81a80a | ||
|
|
177b150c95 | ||
|
|
489eb5598c | ||
|
|
ad571c1e27 | ||
|
|
9827b871fc | ||
|
|
004436e868 | ||
|
|
008b615903 | ||
|
|
451b465e4f | ||
|
|
c91e5de961 | ||
|
|
8251423d95 | ||
|
|
65f66ac60c | ||
|
|
94caa1fca3 | ||
|
|
f7d1708550 | ||
|
|
b888f9da32 | ||
|
|
4d678184f3 | ||
|
|
a2bf157b01 | ||
|
|
1b279119cb | ||
|
|
2075e82381 | ||
|
|
9f60ca8ece | ||
|
|
d6867fb62e | ||
|
|
07e918965b | ||
|
|
24bcc758e7 | ||
|
|
7ae64b0552 | ||
|
|
38e46f6d85 | ||
|
|
530316c25f | ||
|
|
cc750df077 | ||
|
|
3c85694fc2 | ||
|
|
955a1346ff | ||
|
|
8e4566fe5f | ||
|
|
20623e4c42 | ||
|
|
cac31d3350 | ||
|
|
746b56ac57 | ||
|
|
bc140b3fb5 | ||
|
|
5d15411d3d | ||
|
|
c6ce694dfe | ||
|
|
16d303d966 | ||
|
|
f422dbd3db | ||
|
|
5125a44170 | ||
|
|
6e7f2c570f | ||
|
|
db31e65cdf | ||
|
|
3cd9bf6505 | ||
|
|
3b05f6267e | ||
|
|
3e5b0bff4f | ||
|
|
c9cb15d7b7 | ||
|
|
89415c86a4 | ||
|
|
4cd515b19f | ||
|
|
730e2c5ba5 | ||
|
|
3735a6689c | ||
|
|
15c81d8f35 | ||
|
|
154c780281 | ||
|
|
ec9422d22d | ||
|
|
101e8eaa24 | ||
|
|
6a31bba69c | ||
|
|
96ee68dee7 | ||
|
|
5a94c81b11 | ||
|
|
cf8aa6f9a4 | ||
|
|
20e201795e | ||
|
|
e95902d2bb | ||
|
|
79a3b39248 | ||
|
|
c08a0eb8d1 | ||
|
|
a280258d4f | ||
|
|
7985a7a522 | ||
|
|
6ba2e16a91 | ||
|
|
f34ebe2fd3 | ||
|
|
ab3d4a056f | ||
|
|
c88a7c000b | ||
|
|
53b700aa70 | ||
|
|
66c219f6d1 | ||
|
|
06dd153955 | ||
|
|
88a0e63894 | ||
|
|
cac7e53ea8 | ||
|
|
3e390388eb | ||
|
|
2a1b01c0aa | ||
|
|
5a535bb07a | ||
|
|
235ceae228 | ||
|
|
46710aead4 | ||
|
|
277d443d4c | ||
|
|
770c25a273 | ||
|
|
c935de3ec1 | ||
|
|
8350123839 | ||
|
|
02adb81ae0 | ||
|
|
cf26427e68 | ||
|
|
6e357e93ec | ||
|
|
1c8f3932fb | ||
|
|
75671a0a8a | ||
|
|
58296dd896 | ||
|
|
2fff34dc61 | ||
|
|
851ade7e24 | ||
|
|
13585f5317 | ||
|
|
5d0ab36f2c | ||
|
|
be46cf9a25 | ||
|
|
ffdc438091 | ||
|
|
52741cf46a | ||
|
|
9263caed59 | ||
|
|
aa5a9fc6d2 | ||
|
|
316518d63b | ||
|
|
03c44d76c9 | ||
|
|
346d6cb119 | ||
|
|
dae3d57d1e | ||
|
|
aa65cef103 | ||
|
|
e19c923538 | ||
|
|
ec292705b3 | ||
|
|
d36588d148 | ||
|
|
32c171d05b | ||
|
|
f031be4ce2 | ||
|
|
d3ebcabec4 | ||
|
|
f683f14a30 | ||
|
|
0a311e87e4 | ||
|
|
d42ce3e7bb | ||
|
|
4c5d7eb762 | ||
|
|
1d58779d90 | ||
|
|
1434d81d3e | ||
|
|
b44d060fac | ||
|
|
7c89ebc047 | ||
|
|
d140427c94 | ||
|
|
2abdf3693c | ||
|
|
8d1eafe2bc | ||
|
|
510f982579 | ||
|
|
63e6be9867 | ||
|
|
0a2957449f | ||
|
|
ee2ba047ab | ||
|
|
a8590c1b90 | ||
|
|
374f4bc116 | ||
|
|
76fa1f6c9f | ||
|
|
dd68aa342a | ||
|
|
21d614aa97 | ||
|
|
f4e4bbbb8f | ||
|
|
d30c9d9d90 | ||
|
|
e0884a4eec | ||
|
|
446c7f3ab5 | ||
|
|
48a6189fe7 | ||
|
|
e568d06b02 | ||
|
|
243c962667 | ||
|
|
908510ff0b | ||
|
|
d6aab0c470 | ||
|
|
8d2640d99d | ||
|
|
d45748cc32 | ||
|
|
2693dd9366 | ||
|
|
dcfa070176 | ||
|
|
eb577d61d5 | ||
|
|
f79bb90b69 | ||
|
|
4591268063 | ||
|
|
7e849934ff | ||
|
|
92fb322f7b | ||
|
|
abc154738c | ||
|
|
63850f75af | ||
|
|
e0498e5e87 | ||
|
|
232f0b8d69 | ||
|
|
d410dbb17d | ||
|
|
e7c3d0441c | ||
|
|
0119d69641 | ||
|
|
a21fdf50bb | ||
|
|
8fdc5e6d94 | ||
|
|
41e81c2d7a | ||
|
|
10d2f5e641 | ||
|
|
cdfcc6493c | ||
|
|
6b26f6d93f | ||
|
|
a11cf38378 | ||
|
|
7d061c4aaf | ||
|
|
152fcccf60 | ||
|
|
159104a50a | ||
|
|
66b2b77791 | ||
|
|
36ade29e46 | ||
|
|
61c44057cb | ||
|
|
fd9dc1a801 | ||
|
|
57b813196f | ||
|
|
eaf429de3d | ||
|
|
45923d034e | ||
|
|
fbdfacd14d | ||
|
|
a55ddda6cf | ||
|
|
6c66d0791a | ||
|
|
c19d427f3a | ||
|
|
a078081347 | ||
|
|
3a042f25c2 | ||
|
|
6d781a6358 | ||
|
|
349ec59df7 | ||
|
|
833aa3c748 | ||
|
|
eca5b1c7a0 | ||
|
|
0aa925f95d | ||
|
|
2f214b25c7 | ||
|
|
38c3a46395 | ||
|
|
cbb9a29c8d | ||
|
|
dddc4f235e | ||
|
|
c537d0f464 | ||
|
|
8be588afdf | ||
|
|
5b6c707de5 | ||
|
|
8b6dd322a7 | ||
|
|
dfdbd8b092 | ||
|
|
4fad58b1e9 | ||
|
|
6003b21f6a | ||
|
|
963f09057c | ||
|
|
b185c3e102 | ||
|
|
272365dde7 | ||
|
|
da91254cf0 | ||
|
|
70642b464e | ||
|
|
035a4485b7 | ||
|
|
73ac7496e2 | ||
|
|
40d816f86d | ||
|
|
c513fb06e7 | ||
|
|
dec0b4d171 | ||
|
|
03ed25f617 | ||
|
|
487afe799e | ||
|
|
d15366ee24 | ||
|
|
816c7776f7 | ||
|
|
f5eadc5d9e | ||
|
|
8e02c0bd10 | ||
|
|
614f61ce29 | ||
|
|
6c80d50290 | ||
|
|
5492e53ba9 | ||
|
|
e795a317cc | ||
|
|
8eb7366a4e | ||
|
|
b85eab9d10 | ||
|
|
09b0920337 | ||
|
|
502860ac5e | ||
|
|
68d845ff3d | ||
|
|
b2e69b60a6 | ||
|
|
8015da09e8 | ||
|
|
06ed20f59c | ||
|
|
a003d8bfe6 | ||
|
|
468aa28449 | ||
|
|
e0615c751e | ||
|
|
81e4a0eff9 | ||
|
|
b48ece91b2 | ||
|
|
912d2b1e0a | ||
|
|
c97f45e3e5 | ||
|
|
de4230e0d0 | ||
|
|
79ca627e7c | ||
|
|
52045ad2a6 | ||
|
|
a6a9554868 | ||
|
|
d92229095d | ||
|
|
1d1ce0c322 | ||
|
|
cb45eb4b3c | ||
|
|
0b31150a43 | ||
|
|
b626152fda | ||
|
|
3cc2cedaa5 | ||
|
|
e2fb54f88d | ||
|
|
1f334ab3dc | ||
|
|
c39933c051 | ||
|
|
b6719e8972 | ||
|
|
cfaa765858 | ||
|
|
8477df7e5c | ||
|
|
40f3ccc112 | ||
|
|
a40c116617 | ||
|
|
c97219311f | ||
|
|
49d618f066 | ||
|
|
129a77ae7c | ||
|
|
b2d13db01f | ||
|
|
c76cebc469 | ||
|
|
668bb9b5d5 | ||
|
|
ec82af7a68 | ||
|
|
73b7880d73 | ||
|
|
a584eecb70 | ||
|
|
cd0a25f910 | ||
|
|
6cf2bf109c | ||
|
|
f6b7c7bb00 | ||
|
|
e987970969 | ||
|
|
18d8037309 | ||
|
|
4c1dda68b5 | ||
|
|
086f2c73db | ||
|
|
f7eab86166 | ||
|
|
05b2b395ad | ||
|
|
c5298242f6 | ||
|
|
37914d3cb5 | ||
|
|
280ed45199 | ||
|
|
ea20740581 | ||
|
|
3b7d28130b | ||
|
|
72503916a1 | ||
|
|
cb150bdba9 | ||
|
|
7c16a79629 | ||
|
|
1f5cd55272 | ||
|
|
7f4a7f05f5 | ||
|
|
95239fb257 | ||
|
|
f2583bc37f | ||
|
|
00d7ff6604 | ||
|
|
5011c3ba04 | ||
|
|
9baa446675 | ||
|
|
9e7f86e4d6 | ||
|
|
5ac4b42452 | ||
|
|
e9b05fe345 | ||
|
|
13ac013e9f | ||
|
|
d3b635ffd6 | ||
|
|
e09609cc68 | ||
|
|
d2f64630f5 | ||
|
|
0c3d8b77e4 | ||
|
|
905d09899c | ||
|
|
0712c9f24b | ||
|
|
29329f924e | ||
|
|
c6c307c50c | ||
|
|
b96b477f65 | ||
|
|
4f53e39f8d | ||
|
|
5cac16a632 | ||
|
|
a1a02d5098 | ||
|
|
72c77305e4 | ||
|
|
d6980ab0b3 | ||
|
|
4ee0a1edaf | ||
|
|
ef7a4ff583 | ||
|
|
e8979594a1 | ||
|
|
690488abdd | ||
|
|
f7910a1546 | ||
|
|
42b92ec081 | ||
|
|
b32684ab7b | ||
|
|
eedc4374b9 | ||
|
|
76304395bd | ||
|
|
d3dabc35e5 | ||
|
|
039b45e926 | ||
|
|
bf1b162cbc | ||
|
|
be3c7a8314 | ||
|
|
3bfa95a032 | ||
|
|
5f1121a241 | ||
|
|
7ccf38f0df | ||
|
|
61d83319d4 | ||
|
|
1bc8cffbf3 | ||
|
|
a7acfb0291 | ||
|
|
fb34f8890f | ||
|
|
3d3864d535 | ||
|
|
3f9296e38c | ||
|
|
3a17a370f2 | ||
|
|
42833accc0 | ||
|
|
85e9a4c4c6 | ||
|
|
2c0624d5b4 | ||
|
|
347c8fff73 | ||
|
|
fa17aa4a57 | ||
|
|
8021c6bb81 | ||
|
|
c4be2e5d00 | ||
|
|
cbd0c7b228 | ||
|
|
0b13c06a09 | ||
|
|
a5c6180154 | ||
|
|
19e899ba97 | ||
|
|
3d9965c4af | ||
|
|
98c22a4323 | ||
|
|
649516cf32 | ||
|
|
29c0e840d3 | ||
|
|
3a5a7063cd | ||
|
|
f601dbe313 | ||
|
|
0640009752 | ||
|
|
f153d99744 | ||
|
|
85c07dba9c | ||
|
|
7ace45929a | ||
|
|
212a7a7551 | ||
|
|
fd9f579802 | ||
|
|
ee1b451f59 | ||
|
|
a2873fd782 | ||
|
|
fc549fe006 | ||
|
|
b931e5d273 | ||
|
|
25101b5a02 | ||
|
|
9c32293fa8 | ||
|
|
de6255b388 | ||
|
|
6566fbe71c | ||
|
|
556fc31000 | ||
|
|
1072e5778f | ||
|
|
29bad845b1 | ||
|
|
a80061d97f | ||
|
|
bc1d6ce5d8 | ||
|
|
c6c41d5f2d | ||
|
|
4ded2c1848 | ||
|
|
df90fc9c33 | ||
|
|
b1da50133b | ||
|
|
a65d7208c7 | ||
|
|
36a53cc405 | ||
|
|
cccb9ac681 | ||
|
|
0a025d807b | ||
|
|
9b07bbd505 | ||
|
|
f224aea444 | ||
|
|
e21257de0c | ||
|
|
ecf2a65e16 | ||
|
|
1f4f3101f2 | ||
|
|
d66b33fd19 | ||
|
|
5d5913233b | ||
|
|
2b6e8c030d | ||
|
|
b1e0056a3a | ||
|
|
d64eb95388 | ||
|
|
8794b0d37c | ||
|
|
beda8972e8 | ||
|
|
c655defe6d | ||
|
|
6dc459a64f | ||
|
|
90979be600 | ||
|
|
6b1361ad9d | ||
|
|
bede42388f | ||
|
|
604c1bd3d4 | ||
|
|
149c565ee6 | ||
|
|
efca3632cc | ||
|
|
60468b4afa | ||
|
|
50976b2d09 | ||
|
|
0fce37cc73 | ||
|
|
12c7313935 | ||
|
|
5d1162bd32 | ||
|
|
6aa3a71761 | ||
|
|
3e1f1e557e | ||
|
|
0a993fb151 | ||
|
|
e4da7ee601 | ||
|
|
d6ef6ecdd8 | ||
|
|
e1f242d973 | ||
|
|
1f0503907e | ||
|
|
a9da298dd7 | ||
|
|
d3dc13d58a | ||
|
|
c7eb8caf8b | ||
|
|
2ca5f93e8b | ||
|
|
b08ff12760 | ||
|
|
c62193d1fe | ||
|
|
858a9bf93b | ||
|
|
7a22746f67 | ||
|
|
92215e8817 | ||
|
|
b449def7e6 | ||
|
|
b7f020f69c | ||
|
|
be79f67510 | ||
|
|
57af428b9e | ||
|
|
2c9c8b9ab4 | ||
|
|
bc4dbc7de2 | ||
|
|
ce55ca1e0d | ||
|
|
99bcbc288c | ||
|
|
517134c95b | ||
|
|
e866bac25a | ||
|
|
0f5b03ce64 | ||
|
|
4d1cbe7f62 | ||
|
|
69c38cbeca | ||
|
|
936de04b1e | ||
|
|
b8f7a89291 | ||
|
|
11a3995722 | ||
|
|
eb68da635f | ||
|
|
eb2de6f3f2 | ||
|
|
5b118667ef | ||
|
|
f346b73baa | ||
|
|
0fabdac9e0 | ||
|
|
590035cce9 | ||
|
|
f1d5965bb5 | ||
|
|
85027aa504 | ||
|
|
72b7517623 | ||
|
|
29c3e98c05 | ||
|
|
fa15c56f1c | ||
|
|
3eca440e0c | ||
|
|
9679841e22 | ||
|
|
16612bface | ||
|
|
e48f12de4a | ||
|
|
7b4953a049 | ||
|
|
6010bf0ba9 | ||
|
|
320bc0fe06 | ||
|
|
0411fe4cfe | ||
|
|
9513a6eb80 | ||
|
|
dc6afb765a | ||
|
|
b944e36d5c | ||
|
|
458ba2de77 | ||
|
|
77423ad833 | ||
|
|
3c6c929854 | ||
|
|
89a4ef2e4d | ||
|
|
4644dda250 | ||
|
|
8c124f8980 | ||
|
|
769cf19d5c | ||
|
|
42f6c51393 | ||
|
|
2a47afa672 | ||
|
|
5a8927b547 | ||
|
|
cc9e369b6f | ||
|
|
63aee0e876 | ||
|
|
dcce37d99e | ||
|
|
39aaac2d1b | ||
|
|
f1a632fb52 | ||
|
|
37ad3fbf0b | ||
|
|
87cb6f8262 | ||
|
|
60eee04922 | ||
|
|
3250816523 | ||
|
|
7e62173f01 | ||
|
|
6c0124fcf2 | ||
|
|
a361fdac9e | ||
|
|
911772510c | ||
|
|
d2777ba42d | ||
|
|
a4b9d1e98b | ||
|
|
3b8e6d7585 | ||
|
|
7e0565df3b | ||
|
|
e8e2b49993 | ||
|
|
a72aea3190 | ||
|
|
e97572cfab | ||
|
|
3a0ba29e25 | ||
|
|
f699ece732 | ||
|
|
8bfa1fadda | ||
|
|
511fccd084 | ||
|
|
db091b2b39 | ||
|
|
fd51fdddb3 | ||
|
|
bece4a44f1 | ||
|
|
be5dcba4c6 | ||
|
|
ae975cdc2f | ||
|
|
890097885a | ||
|
|
9a8f595514 | ||
|
|
113db1c97d | ||
|
|
11f2355099 | ||
|
|
a275a895cb | ||
|
|
f84a5a2b51 | ||
|
|
3c0444d812 | ||
|
|
1c744d8d6b | ||
|
|
82cad800c2 | ||
|
|
b6be4375bd | ||
|
|
b635281428 | ||
|
|
326b9658fd | ||
|
|
d0cc9b54f4 | ||
|
|
92dec8a7aa | ||
|
|
3e987cc2dc | ||
|
|
20843dd1fb | ||
|
|
29f014abc3 | ||
|
|
49b5b3d41e | ||
|
|
efb0c39d33 | ||
|
|
10460f270d | ||
|
|
0eafc4ac88 | ||
|
|
bfc6d4b3c0 | ||
|
|
9626eb904e | ||
|
|
c9f62c3f3a | ||
|
|
be52cf86b5 | ||
|
|
922c8f2100 | ||
|
|
7dbac45670 | ||
|
|
0dd4fa666a | ||
|
|
94aa1665ab | ||
|
|
009d854622 | ||
|
|
886d452996 | ||
|
|
0afed3f9aa | ||
|
|
e42b28ae9e | ||
|
|
0672180233 | ||
|
|
0cd401c45d | ||
|
|
2913a0421d | ||
|
|
42134b4888 | ||
|
|
8b2df9e1c8 | ||
|
|
adb1fd421a | ||
|
|
f1173c496a | ||
|
|
59aebd3666 | ||
|
|
85b89a2d80 | ||
|
|
17dedb6b8e | ||
|
|
8fb8a9d096 | ||
|
|
26d0cbf2b2 | ||
|
|
bcee01cdd1 | ||
|
|
8060ba6453 | ||
|
|
62f723ff6f | ||
|
|
86b5113c46 | ||
|
|
e9fbd49864 | ||
|
|
9c765ced45 | ||
|
|
4405fdb5fe | ||
|
|
645d904954 | ||
|
|
b8be888f05 | ||
|
|
6aca16c336 | ||
|
|
a01d85411c | ||
|
|
b280c6f723 | ||
|
|
f74e2bcc7f | ||
|
|
ae2d54f454 | ||
|
|
63be5932be | ||
|
|
1565c26823 | ||
|
|
ae72b55a2e | ||
|
|
b83e2519ac | ||
|
|
22f5e61978 | ||
|
|
966097e1ff | ||
|
|
0c2de37cf8 | ||
|
|
328bdd68e2 | ||
|
|
a10ee6c9f2 | ||
|
|
383847d3aa | ||
|
|
2b8dca7748 | ||
|
|
9a19339ec5 | ||
|
|
2f07c87801 | ||
|
|
c14567311b | ||
|
|
bc8aad5062 | ||
|
|
a1a649cd9f | ||
|
|
ba0586d407 | ||
|
|
c2212ac4ad | ||
|
|
4548829595 | ||
|
|
07177222a0 | ||
|
|
723c39de85 | ||
|
|
a20dab859f | ||
|
|
acf3bc945c | ||
|
|
379ea9c208 | ||
|
|
74f282a69d | ||
|
|
ef7ae9ada9 | ||
|
|
64bf07c71e | ||
|
|
8e30d99e94 | ||
|
|
0367966ae6 | ||
|
|
4d7cef70d2 | ||
|
|
2f93e53716 | ||
|
|
ebfdff90c7 | ||
|
|
3a5d6bc2ca | ||
|
|
15518a4ce0 | ||
|
|
c41bd1a4ef | ||
|
|
9b1335720b | ||
|
|
731994c9fe | ||
|
|
3341f3e7f6 | ||
|
|
08d7261488 | ||
|
|
89ccb99395 | ||
|
|
94660d9e71 | ||
|
|
8f4932610c | ||
|
|
b405ca970c | ||
|
|
05b12c2d59 | ||
|
|
268dfee75d | ||
|
|
9c3c9d28fa | ||
|
|
00291da933 | ||
|
|
87eb0468a6 | ||
|
|
f2fe249560 | ||
|
|
42e70c1d05 | ||
|
|
19fa54f9d0 | ||
|
|
ec6a6e08ff | ||
|
|
39e683baf0 | ||
|
|
2fcc6f2ea3 | ||
|
|
7f30350873 | ||
|
|
9859e921d2 | ||
|
|
0dea89c0de | ||
|
|
1aa29237e2 | ||
|
|
727887fb79 | ||
|
|
12079f6ac6 | ||
|
|
f1d9b5c645 | ||
|
|
75b4ed05ab | ||
|
|
a2f938b0a0 | ||
|
|
8869a27ac9 | ||
|
|
927278317e | ||
|
|
ccace95a6c | ||
|
|
813ed6d541 | ||
|
|
e7d13ff254 | ||
|
|
b16dd74492 | ||
|
|
2bcaa1926a | ||
|
|
1a48270a28 | ||
|
|
6606fa8108 | ||
|
|
7730486f30 | ||
|
|
ad0963e412 | ||
|
|
5ae07b721a | ||
|
|
a695b35eca | ||
|
|
2ce1d01535 | ||
|
|
f8f8a7c1d1 | ||
|
|
6277a48419 | ||
|
|
155eb493bf | ||
|
|
de2443eb5a | ||
|
|
c9ac7f2fa3 | ||
|
|
22d1b478f9 | ||
|
|
43b11277ad | ||
|
|
7589a112d0 | ||
|
|
9bbea458c6 | ||
|
|
556c5dd56a | ||
|
|
2688e761ba | ||
|
|
5a10dc1f2f | ||
|
|
9c1de2aca9 | ||
|
|
c83dff46a7 | ||
|
|
3bae948218 | ||
|
|
6551622e07 | ||
|
|
3319478876 | ||
|
|
58b8ed7940 | ||
|
|
bc808889a1 | ||
|
|
5cd19cee56 | ||
|
|
f82791096d | ||
|
|
58726de491 | ||
|
|
60dcfbb071 | ||
|
|
9e7a86a1db | ||
|
|
0028f2293f | ||
|
|
e7d88cce58 | ||
|
|
73635e2784 | ||
|
|
92d4a40228 | ||
|
|
0b8bc1afb0 | ||
|
|
27d86d8185 | ||
|
|
dbc73a73e2 | ||
|
|
f7ef9a7b4a | ||
|
|
b06cb26edc | ||
|
|
56d84e1d18 | ||
|
|
3859beb543 | ||
|
|
1b2f83ea80 | ||
|
|
ba122e786c | ||
|
|
cdedcd9dac | ||
|
|
2214356d27 | ||
|
|
02b7266206 | ||
|
|
e0291b2d52 | ||
|
|
068e49c53c | ||
|
|
0fe67c9e4a | ||
|
|
79dd95facd | ||
|
|
9e5d6403fa | ||
|
|
0a9296c6c4 | ||
|
|
07df05304e | ||
|
|
5d0556debc | ||
|
|
789103a2b8 | ||
|
|
f48713409b | ||
|
|
8ecae7e745 | ||
|
|
1b64dd6d56 | ||
|
|
d4c255e240 | ||
|
|
09894d1c8f | ||
|
|
574fa84f7d | ||
|
|
0953a29b4e | ||
|
|
e82732c8c0 | ||
|
|
e2588e81f8 | ||
|
|
c525d1f9e0 | ||
|
|
b21b9cd24e | ||
|
|
31b0097afb | ||
|
|
e6aef150ee | ||
|
|
aa0d3d329e | ||
|
|
a9ae7ad815 | ||
|
|
65ba766b0f | ||
|
|
bd37cb2c26 | ||
|
|
5703dceb0c | ||
|
|
15b170db5d | ||
|
|
ef71035e0d | ||
|
|
7977bbf6e1 | ||
|
|
a7f769d4f6 | ||
|
|
a634d824d0 | ||
|
|
42f0cc307f | ||
|
|
68e5955d09 | ||
|
|
3df178a026 | ||
|
|
ba57bf9503 | ||
|
|
c216d785aa | ||
|
|
f4359fef92 | ||
|
|
13f90d7a39 | ||
|
|
135c4dc60e | ||
|
|
a78c63b05b | ||
|
|
e3081cba17 | ||
|
|
bfbfaf559a | ||
|
|
6e03932e6d | ||
|
|
c5f2bd4aa3 | ||
|
|
ba56444a6e | ||
|
|
56fbc14893 | ||
|
|
7f20e6cc46 | ||
|
|
6dba3f9bf7 | ||
|
|
47b2c32031 | ||
|
|
7a3281bd23 | ||
|
|
55f4ff8f73 | ||
|
|
c5d8732031 | ||
|
|
2181c9aa91 | ||
|
|
82f841fdf9 | ||
|
|
bebb9a88eb | ||
|
|
8df70602c0 | ||
|
|
ef39b5c79c | ||
|
|
a77dd32d20 | ||
|
|
c4dc65761c | ||
|
|
bc6d3fba55 | ||
|
|
1cf5171526 | ||
|
|
db850ece85 | ||
|
|
be3acbe13a | ||
|
|
670fc425ac | ||
|
|
83bd89fe50 | ||
|
|
c4489d1ea0 | ||
|
|
82a11aaf4f | ||
|
|
04a513556b | ||
|
|
d670deb0cb | ||
|
|
cc089b2bd1 | ||
|
|
e812218919 | ||
|
|
35b531dad0 | ||
|
|
6715c614ac | ||
|
|
1a7975072f | ||
|
|
2dc9959ca4 | ||
|
|
a69a5a5472 | ||
|
|
b689c96870 | ||
|
|
ea00818573 | ||
|
|
cbbf5f833a | ||
|
|
8a258998dd | ||
|
|
80c44c4c03 | ||
|
|
ba122bd9d0 | ||
|
|
58709c33a0 | ||
|
|
087b1937de | ||
|
|
54430cd83d | ||
|
|
a35817c379 | ||
|
|
9375f5c281 | ||
|
|
ba29687865 | ||
|
|
c5c64bee20 | ||
|
|
74e9bb5fc7 | ||
|
|
e6556ca92d | ||
|
|
9737272e19 | ||
|
|
f5b4a2a887 | ||
|
|
d16f335627 | ||
|
|
46adf5dcc1 | ||
|
|
2c38f3c8f2 | ||
|
|
105205661f | ||
|
|
a69cf5cd85 | ||
|
|
7c5b76fda3 | ||
|
|
7e2d531533 | ||
|
|
64c41785f6 | ||
|
|
69a3dd14ba | ||
|
|
2a4ed6f264 | ||
|
|
ba2d9415be | ||
|
|
60dfb3c21f | ||
|
|
9816ab5c80 | ||
|
|
904a1e12d2 | ||
|
|
f8395f7f38 | ||
|
|
0df1ba97d5 | ||
|
|
d581cb13af | ||
|
|
ede597d67e | ||
|
|
fe7078aebf | ||
|
|
2f855d5c8a | ||
|
|
6788b77f32 | ||
|
|
2bb4584235 | ||
|
|
3e3d3571be | ||
|
|
fa4ff0b0c3 | ||
|
|
176c2a6edd | ||
|
|
74a005d0e3 | ||
|
|
02bb56357f | ||
|
|
d9ad69b085 | ||
|
|
824b0d3e3c | ||
|
|
8ab1ec615f | ||
|
|
5fb3228841 | ||
|
|
0e4538650d | ||
|
|
012bc61f4a | ||
|
|
0d126ae0d8 | ||
|
|
2c064989c1 | ||
|
|
51cc550502 | ||
|
|
e2e7176b51 | ||
|
|
de784bd95c | ||
|
|
854e627065 | ||
|
|
84a23e4aea | ||
|
|
68245629e4 | ||
|
|
fd0a8287dc | ||
|
|
ebd0578ea2 | ||
|
|
e1b0409648 | ||
|
|
17a777b7e6 | ||
|
|
336c80e296 | ||
|
|
fcd8a99924 | ||
|
|
a7096b5cdf | ||
|
|
32b4e99c12 | ||
|
|
c2658395c0 | ||
|
|
d3935a49de | ||
|
|
4892e7aa2b | ||
|
|
d96f458a1b | ||
|
|
93b05e448e | ||
|
|
63f68dff04 | ||
|
|
7d0760469a | ||
|
|
065ca2dad4 | ||
|
|
03f566e7cd | ||
|
|
9c8ebde19d | ||
|
|
ebcbe6496a | ||
|
|
a2a5d6d10a | ||
|
|
276afa42da | ||
|
|
2437ae575c | ||
|
|
ce5b0cb303 | ||
|
|
1357c7cb1c | ||
|
|
2c334f4346 | ||
|
|
0a7c0f64d2 | ||
|
|
9427d2191a | ||
|
|
8096353e6e | ||
|
|
3f400a8b2a | ||
|
|
3ddefff1df | ||
|
|
ddd5370f69 | ||
|
|
6f203f0a3e | ||
|
|
c795784417 | ||
|
|
c115ba79c8 | ||
|
|
e6c78c3407 | ||
|
|
20b39b51bf | ||
|
|
47eb538444 | ||
|
|
fa136af90a | ||
|
|
1ab397be0a | ||
|
|
8a47ed864c | ||
|
|
8215d608b7 | ||
|
|
65398b68a4 | ||
|
|
44b4779a9d | ||
|
|
7795006337 | ||
|
|
2820141897 | ||
|
|
62e3068af1 | ||
|
|
4e3b0b73b4 | ||
|
|
f5775c6a02 | ||
|
|
3012d1b4e1 | ||
|
|
35ed03021a | ||
|
|
443a7b4f8d | ||
|
|
172a6cec2a | ||
|
|
6a9640ec29 | ||
|
|
2daa28ec0b | ||
|
|
fb418d3aa0 | ||
|
|
a7d7400309 | ||
|
|
a49eaa2103 | ||
|
|
400a0ab04f | ||
|
|
7126db88c0 | ||
|
|
04fc3ee3d4 | ||
|
|
16bbae35f2 | ||
|
|
cf6fca86f3 | ||
|
|
b434d69fd1 | ||
|
|
7e6892f828 | ||
|
|
7fa8ba6a5a | ||
|
|
2b591b3384 | ||
|
|
36bb2ff175 | ||
|
|
bd75f50a0a | ||
|
|
3841148820 | ||
|
|
1a421a7b34 | ||
|
|
b6bac6d11f | ||
|
|
ef68fe1742 | ||
|
|
197c64ad14 | ||
|
|
f0ff26ebb4 | ||
|
|
e6a8a8c335 | ||
|
|
4ebe99d54e | ||
|
|
9f845c4eb8 | ||
|
|
c6e2e48a98 | ||
|
|
a955fcf12f | ||
|
|
014264d1b6 | ||
|
|
9e640b92f8 | ||
|
|
9312fd105b | ||
|
|
ce527f4af5 | ||
|
|
73e2fa3883 | ||
|
|
40fd5c4a7b | ||
|
|
a2c6f2e366 | ||
|
|
00dcd900e3 | ||
|
|
4f08757c04 | ||
|
|
983a7d8dd9 | ||
|
|
222fc10ed1 | ||
|
|
31986b1d50 | ||
|
|
4ca2eb4c0e | ||
|
|
3d691f5a13 | ||
|
|
f729872d70 | ||
|
|
bcd627663b | ||
|
|
ab0da3f49c | ||
|
|
f0530e2270 | ||
|
|
ddc8359b04 | ||
|
|
1e281644eb | ||
|
|
6cad71e859 | ||
|
|
b2f439ff0b | ||
|
|
2b22a64818 | ||
|
|
243e068fd6 | ||
|
|
b9cedc15b8 | ||
|
|
7d8ddd2408 | ||
|
|
fcc816ffec | ||
|
|
a17723dac9 | ||
|
|
b35465fa8e | ||
|
|
0915e5d6ca | ||
|
|
51a8568d4d | ||
|
|
8cd66607ef | ||
|
|
2f6996c1fb | ||
|
|
e89eac9a32 | ||
|
|
3927d8b1ab | ||
|
|
41a4e7efd4 | ||
|
|
5ebc63833d | ||
|
|
e79e903f25 | ||
|
|
28c9faf48f | ||
|
|
adcc270e51 | ||
|
|
e4ebcfaf99 | ||
|
|
1afc3a414b | ||
|
|
3c105c6091 | ||
|
|
8cc80dbd69 | ||
|
|
44528a40b7 | ||
|
|
f2303f447d | ||
|
|
ddf5b39872 | ||
|
|
6f2cc1c187 | ||
|
|
75eaf88d84 | ||
|
|
7fd72ff687 | ||
|
|
29a250d16f | ||
|
|
903d6dc271 | ||
|
|
591a9456dc | ||
|
|
265b6efc96 | ||
|
|
69e079c319 | ||
|
|
20c651da41 | ||
|
|
da922d2216 | ||
|
|
00fb500287 | ||
|
|
98f1b1087c | ||
|
|
2262aaa181 | ||
|
|
f18d053cbf | ||
|
|
a740c51d82 | ||
|
|
b9ffe62e8b | ||
|
|
d3d1685785 | ||
|
|
adeb58bd6b | ||
|
|
bd33a72ddc | ||
|
|
92cfcf4415 | ||
|
|
dd850197e4 | ||
|
|
59fa9253b3 | ||
|
|
14b953f764 | ||
|
|
572be56d75 | ||
|
|
d9860935c1 | ||
|
|
0c7210b177 | ||
|
|
af26c7d1ee | ||
|
|
5bd7f53fdd | ||
|
|
ee94183e2a | ||
|
|
bd9144628f | ||
|
|
9a364d3294 | ||
|
|
bb76c9a6c3 | ||
|
|
97e89ed8be | ||
|
|
c49d5c0755 | ||
|
|
f89842e753 | ||
|
|
acc3d8f76b | ||
|
|
0e379abcd2 | ||
|
|
090e75b6ed | ||
|
|
f3c4af1cbb | ||
|
|
8b0d741087 | ||
|
|
d9c85d16c8 | ||
|
|
3ff98e06de | ||
|
|
ae8e6e4bc8 | ||
|
|
19545e5cca | ||
|
|
039e6ae8e9 | ||
|
|
845f672650 | ||
|
|
51bc308fa8 | ||
|
|
72b1ea7f5d | ||
|
|
cf3a69d1e2 | ||
|
|
1b896f3218 |
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"presets": [],
|
||||
"plugins": [
|
||||
["@babel/plugin-proposal-class-properties", { "loose": true }],
|
||||
["@babel/plugin-proposal-object-rest-spread", { "loose": true,
|
||||
"useBuiltIns": true
|
||||
}],
|
||||
"@babel/plugin-proposal-optional-catch-binding",
|
||||
"@babel/plugin-proposal-optional-chaining",
|
||||
"@babel/plugin-proposal-nullish-coalescing-operator",
|
||||
"@babel/plugin-proposal-logical-assignment-operators",
|
||||
"@babel/plugin-external-helpers"
|
||||
]
|
||||
}
|
||||
@@ -15,17 +15,5 @@ trim_trailing_whitespace = true
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
||||
|
||||
[*.json]
|
||||
indent_size = 2
|
||||
|
||||
[.eslintrc]
|
||||
indent_size = 4
|
||||
|
||||
[*.scss]
|
||||
indent_size = 2
|
||||
|
||||
[*.css]
|
||||
indent_size = 2
|
||||
|
||||
[*.nsh]
|
||||
[{*.nsh,*.yml,*.yaml,*.json}]
|
||||
indent_size = 2
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"extends": "standard",
|
||||
"plugins": ["prettier", "import", "babel"],
|
||||
"extends": ["standard", "eslint:recommended", "plugin:prettier/recommended"],
|
||||
"rules": {
|
||||
"indent": ["error", 4, { "SwitchCase": 1 }],
|
||||
"semi": ["error", "always"],
|
||||
"one-var": "off",
|
||||
"space-before-function-paren": "off",
|
||||
@@ -15,13 +15,42 @@
|
||||
"no-useless-escape": "off",
|
||||
"no-var": "error",
|
||||
"prefer-const": "error",
|
||||
"no-unused-expressions": "error",
|
||||
"no-unused-expressions": "off",
|
||||
"strict": ["error", "never"],
|
||||
"no-mixed-operators": "off",
|
||||
"prefer-promise-reject-errors": "off",
|
||||
"standard/no-callback-literal": "off",
|
||||
"object-curly-spacing": "off",
|
||||
"quote-props": "off",
|
||||
"no-new-object": "error",
|
||||
"object-shorthand": "error",
|
||||
"no-array-constructor": "error",
|
||||
"array-callback-return": "error",
|
||||
"no-eval": "error",
|
||||
"no-new-func": "error",
|
||||
"prefer-rest-params": "error",
|
||||
"prefer-spread": "error",
|
||||
"no-useless-constructor": "error",
|
||||
"no-dupe-class-members": "error",
|
||||
"no-duplicate-imports": "error",
|
||||
"eqeqeq": "error",
|
||||
"no-unneeded-ternary": "error",
|
||||
"curly": "error",
|
||||
"prettier/prettier": "error",
|
||||
"no-empty": "off",
|
||||
"no-restricted-syntax": [
|
||||
"error",
|
||||
{
|
||||
"selector": "ExportDefaultDeclaration",
|
||||
"message": "Prefer named exports"
|
||||
}
|
||||
],
|
||||
"import/no-webpack-loader-syntax": "off",
|
||||
"object-curly-spacing": "off"
|
||||
"import/no-relative-parent-imports": "error",
|
||||
"import/first": "error",
|
||||
"import/no-default-export": "error",
|
||||
"babel/no-unused-expressions": "error",
|
||||
"node/no-callback-literal": "off"
|
||||
},
|
||||
"parserOptions": {
|
||||
"sourceType": "module",
|
||||
@@ -29,6 +58,7 @@
|
||||
"impliedStrict": true
|
||||
}
|
||||
},
|
||||
"parser": "babel-eslint",
|
||||
"globals": {
|
||||
"_": true,
|
||||
"$": true
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
github: [keeweb, antelle]
|
||||
patreon: # Replace with a single Patreon username
|
||||
open_collective: keeweb
|
||||
ko_fi: # Replace with a single Ko-fi username
|
||||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
||||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||
liberapay: # Replace with a single Liberapay username
|
||||
issuehunt: # Replace with a single IssueHunt username
|
||||
otechie: # Replace with a single Otechie username
|
||||
custom: # for example PayPal links
|
||||
@@ -2,7 +2,7 @@
|
||||
name: Bug report
|
||||
about: Create a report to help us improve KeeWeb
|
||||
title: ''
|
||||
labels: ''
|
||||
labels: 'bug'
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
@@ -24,7 +24,7 @@ A clear and concise description of what you expected to happen.
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
|
||||
**Environment**
|
||||
Your user-agent (from Settings/Help section)
|
||||
Please copy all version information from Settings/Help
|
||||
|
||||
**Kdbx File**
|
||||
Does it happen on Demo or New database?
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
blank_issues_enabled: true
|
||||
@@ -2,7 +2,7 @@
|
||||
name: Feature request
|
||||
about: Suggest an idea for this project
|
||||
title: ''
|
||||
labels: ''
|
||||
labels: 'enhancement'
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
FROM snapcore/snapcraft:stable
|
||||
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
|
||||
RUN apt-get update
|
||||
RUN apt-get install -y build-essential git-core unzip curl pkg-config rpm
|
||||
RUN curl -sL https://deb.nodesource.com/setup_15.x | sudo -E bash -
|
||||
RUN apt-get install -y nodejs
|
||||
RUN npm i -g grunt-cli
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
@@ -0,0 +1,5 @@
|
||||
name: 'Linux Build'
|
||||
description: 'Build KeeWeb on Linux in Docker'
|
||||
runs:
|
||||
using: 'docker'
|
||||
image: 'Dockerfile'
|
||||
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
cd /github/workspace
|
||||
npm ci
|
||||
grunt desktop-linux
|
||||
@@ -0,0 +1,404 @@
|
||||
#!/usr/bin/env python3
|
||||
#
|
||||
# git-restore-mtime - Change mtime of files based on commit date of last change
|
||||
#
|
||||
# Copyright (C) 2012 Rodrigo Silva (MestreLion) <linux@rodrigosilva.com>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. See <http://www.gnu.org/licenses/gpl.html>
|
||||
#
|
||||
"""
|
||||
Change the modification time (mtime) of all files in work tree, based on the
|
||||
date of the most recent commit that modified the file.
|
||||
|
||||
Useful prior to generating release tarballs, so each file is archived with a
|
||||
date that is similar to the date when the file was actually last modified,
|
||||
assuming the actual modification date and its commit date are close.
|
||||
|
||||
By default ignores all ignored and untracked files, and also refuses to work
|
||||
on trees with uncommitted changes.
|
||||
"""
|
||||
|
||||
# TODO:
|
||||
# - Add -z on git whatchanged/ls-files so we don't deal with filename decode/OS normalization
|
||||
# - When Python is bumped to 3.7, use text instead of universal_newlines on subprocess
|
||||
# - Update "Statistics for some large projects" with modern hardware and repositories.
|
||||
# - Create a README.md for git-restore-mtime alone. It deserves extensive documentation
|
||||
# - Move Statistics there
|
||||
|
||||
# FIXME:
|
||||
# - When current dir is outside the worktree, e.g. using --work-tree, `git ls-files`
|
||||
# assume any relative pathspecs are to worktree root, not the current dir. As such,
|
||||
# relative pathspecs may not work.
|
||||
# - Renames and mode changes should not change file mtime:
|
||||
# - Must check on status 'R100' and mode changes with same blobs
|
||||
# - Should require status to be (A, C, M, R<100, T). D will never be processed as
|
||||
# filelist is a subset of lsfileslist.
|
||||
# - Check file (A, D) for directory mtime is not sufficient:
|
||||
# - Renames also change dir mtime, unless rename was on a parent dir
|
||||
# - If most recent change of all files in a dir was a [M]odification,
|
||||
# dir might not be touched at all.
|
||||
# - Dirs containing only subdirectories but no direct files will also
|
||||
# not be touched. They're files' [grand]parent dir, but never their dirname().
|
||||
# - Some solutions:
|
||||
# - After files done, perform some dir processing for missing dirs, finding latest
|
||||
# file (A, D, R)
|
||||
# - Simple approach: dir mtime is most recent child (dir or file) mtime
|
||||
# - Use a virtual concept of "created at most at" to fill missing info, bubble up
|
||||
# to parents and grandparents
|
||||
# - When handling [grand]parent dirs, stay inside <pathspec>
|
||||
# - Better handling of merge commits. `-m` is plain *wrong*. `-c/--cc` is perfect, but
|
||||
# painfully slow. First pass without merge commits is not accurate. Maybe add a new
|
||||
# `--accurate` mode for `--cc`?
|
||||
|
||||
if __name__ != "__main__":
|
||||
raise ImportError("{} should not be used as a module.".format(__name__))
|
||||
|
||||
import subprocess, shlex
|
||||
import sys, os.path
|
||||
import logging
|
||||
import argparse
|
||||
import time
|
||||
|
||||
|
||||
# Update symlinks only if the OS supports not following them
|
||||
UPDATE_SYMLINKS = bool(os.utime in getattr(os, 'supports_follow_symlinks', []))
|
||||
STEPMISSING = 100
|
||||
|
||||
|
||||
# Command-line interface ######################################################
|
||||
|
||||
def parse_args():
|
||||
parser = argparse.ArgumentParser(
|
||||
description="""Restore original modification time of files based on the date of the
|
||||
most recent commit that modified them. Useful when generating release tarballs.""")
|
||||
|
||||
group = parser.add_mutually_exclusive_group()
|
||||
group.add_argument('--quiet', '-q', dest='loglevel',
|
||||
action="store_const", const=logging.WARNING, default=logging.INFO,
|
||||
help="Suppress informative messages and summary statistics.")
|
||||
group.add_argument('--verbose', '-v', action="count",
|
||||
help="Print additional information for each processed file.")
|
||||
|
||||
parser.add_argument('--force', '-f', action="store_true",
|
||||
help="Force execution on trees with uncommitted changes.")
|
||||
|
||||
parser.add_argument('--merge', '-m', action="store_true",
|
||||
help="""Include merge commits. Leads to more recent mtimes and more files per
|
||||
commit, thus with the same mtime (which may or may not be what you want). Including
|
||||
merge commits may lead to less commits being evaluated (all files are found sooner),
|
||||
which improves performance, sometimes substantially. But since merge commits are
|
||||
usually huge, processing them may also take longer, sometimes substantially.
|
||||
By default merge logs are only used for files missing from regular commit logs.""")
|
||||
|
||||
parser.add_argument('--first-parent', action="store_true",
|
||||
help="""Consider only the first parent, the "main branch", when parsing merge
|
||||
commit logs. Only effective when merge commits are included in the log, either
|
||||
by --merge or to find missing files after first log parse. See --skip-missing.""")
|
||||
|
||||
parser.add_argument('--skip-missing', '-s',
|
||||
action="store_false", default=True, dest="missing",
|
||||
help="""Do not try to find missing files. If some files were not found in regular
|
||||
commit logs, by default it re-tries using merge commit logs for these files (if
|
||||
--merge was not already used). This option disables this behavior, which may slightly
|
||||
improve performance, but files found only in merge commits will not be updated.""")
|
||||
|
||||
parser.add_argument('--no-directories', '-D',
|
||||
action="store_false", default=True, dest='dirs',
|
||||
help="""Do not update directory mtime for files created, renamed or deleted in it.
|
||||
Note: just modifying a file will not update its directory mtime.""")
|
||||
|
||||
parser.add_argument('--test', '-t', action="store_true", default=False,
|
||||
help="Test run: do not actually update any file")
|
||||
|
||||
parser.add_argument('--commit-time', '-c',
|
||||
action='store_true', default=False, dest='commit_time',
|
||||
help="Use commit time instead of author time")
|
||||
|
||||
parser.add_argument('pathspec', nargs='*', metavar='PATH',
|
||||
help="""Only modify paths matching PATH, directories or files, relative to current
|
||||
directory. Default is to modify all files handled by git, ignoring untracked files
|
||||
and submodules.""")
|
||||
|
||||
parser.add_argument('--work-tree', dest='workdir',
|
||||
help="Path to the work tree, if not current directory or one of its parents.")
|
||||
|
||||
parser.add_argument('--git-dir', dest='gitdir',
|
||||
help="Path to the git repository, if not the default <work-tree-root>/.git")
|
||||
|
||||
parser.add_argument('--skip-older-than', metavar='SECONDS', type=int,
|
||||
help="""Do not modify files that are older than %(metavar)s.
|
||||
It can significantly improve performance if fewer files are processed.
|
||||
Useful on CI builds, which can eventually switch workspace to different branch,
|
||||
but mostly performs builds on the same one (e.g. master).
|
||||
""")
|
||||
|
||||
return parser.parse_args()
|
||||
|
||||
|
||||
# Helper functions ############################################################
|
||||
|
||||
def setup_logging(args):
|
||||
TRACE = logging.DEBUG // 2
|
||||
logging.Logger.trace = lambda _, m, *a, **k: _.log(TRACE, m, *a, **k)
|
||||
level = (args.verbose and max(TRACE, logging.DEBUG // args.verbose)) or args.loglevel
|
||||
logging.basicConfig(level=level, format='%(message)s')
|
||||
return logging.getLogger()
|
||||
|
||||
|
||||
def normalize(path):
|
||||
"""Normalize paths from git, handling non-ASCII characters.
|
||||
|
||||
Git for Windows, as of v1.7.10, stores paths as UTF-8 normalization form C. If path
|
||||
contains non-ASCII or non-printable chars it outputs the UTF-8 in octal-escaped
|
||||
notation, double-quoting the whole path. Double-quotes and backslashes are also escaped.
|
||||
|
||||
https://git-scm.com/docs/git-config#Documentation/git-config.txt-corequotePath
|
||||
https://github.com/msysgit/msysgit/wiki/Git-for-Windows-Unicode-Support
|
||||
https://github.com/git/git/blob/master/Documentation/i18n.txt
|
||||
|
||||
Example on git output, this function reverts this:
|
||||
r'back\slash_double"quote_açaí' -> r'"back\\slash_double\"quote_a\303\247a\303\255"'
|
||||
"""
|
||||
if path and path[0] == '"':
|
||||
# Python 2: path = path[1:-1].decode("string-escape")
|
||||
# Python 3: https://stackoverflow.com/a/46650050/624066
|
||||
path = (path[1:-1] # Remove enclosing double quotes
|
||||
.encode('latin1') # Convert to bytes, required 'unicode-escape'
|
||||
.decode('unicode-escape') # Perform the actual octal-escaping decode
|
||||
.encode('latin1') # 1:1 mapping to bytes, forming UTF-8 encoding
|
||||
.decode('utf8')) # Decode from UTF-8
|
||||
# Make sure the slash matches the OS; for Windows we need a backslash
|
||||
return os.path.normpath(path)
|
||||
|
||||
|
||||
if UPDATE_SYMLINKS:
|
||||
def touch(path, mtime, test=False):
|
||||
"""The actual mtime update"""
|
||||
if test: return
|
||||
os.utime(path, (mtime, mtime), follow_symlinks=False)
|
||||
else:
|
||||
def touch(path, mtime, test=False):
|
||||
"""The actual mtime update"""
|
||||
if test: return
|
||||
os.utime(path, (mtime, mtime))
|
||||
|
||||
|
||||
def isodate(secs):
|
||||
return time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(secs))
|
||||
|
||||
|
||||
# Git class and parselog(), the heart of the script ###########################
|
||||
|
||||
class Git():
|
||||
def __init__(self, workdir=None, gitdir=None):
|
||||
self.gitcmd = ['git']
|
||||
if workdir: self.gitcmd.extend(('--work-tree', workdir))
|
||||
if gitdir : self.gitcmd.extend(('--git-dir', gitdir))
|
||||
self.workdir, self.gitdir = self._repodirs()
|
||||
|
||||
def ls_files(self, pathlist=None):
|
||||
return (normalize(_) for _ in self._run('ls-files --full-name', pathlist))
|
||||
|
||||
def is_dirty(self):
|
||||
return bool(self._run('diff --no-ext-diff --quiet', output=False))
|
||||
|
||||
def log(self, merge=False, first_parent=False, commit_time=False, pathlist=None):
|
||||
cmd = 'whatchanged --pretty={}'.format('%ct' if commit_time else '%at')
|
||||
if merge: cmd += ' -m'
|
||||
if first_parent: cmd += ' --first-parent'
|
||||
return self._run(cmd, pathlist)
|
||||
|
||||
def _repodirs(self):
|
||||
return (os.path.normpath(_) for _ in
|
||||
self._run('rev-parse --show-toplevel --absolute-git-dir', check=True))
|
||||
|
||||
def _run(self, cmdstr, pathlist=None, output=True, check=False):
|
||||
cmdlist = self.gitcmd + shlex.split(cmdstr)
|
||||
if pathlist:
|
||||
cmdlist.append('--')
|
||||
cmdlist.extend(pathlist)
|
||||
log.trace("Executing: %s", ' '.join(cmdlist))
|
||||
if not output:
|
||||
return subprocess.call(cmdlist)
|
||||
if check:
|
||||
try:
|
||||
stdout = subprocess.check_output(cmdlist, universal_newlines=True)
|
||||
return stdout.splitlines()
|
||||
except subprocess.CalledProcessError as e:
|
||||
raise self.Error(e.returncode, e.cmd, e.output, e.stderr)
|
||||
self.proc = subprocess.Popen(cmdlist, stdout=subprocess.PIPE, universal_newlines=True)
|
||||
return (_.strip() for _ in self.proc.stdout)
|
||||
|
||||
class Error(subprocess.CalledProcessError): pass
|
||||
|
||||
|
||||
def parselog(filelist, dirlist, stats, git, merge=False, filterlist=None):
|
||||
mtime = 0
|
||||
for line in git.log(merge, args.first_parent, args.commit_time, filterlist):
|
||||
stats['loglines'] += 1
|
||||
|
||||
# Blank line between Date and list of files
|
||||
if not line: continue
|
||||
|
||||
# File line
|
||||
if line[0] == ':': # Faster than line.startswith(':')
|
||||
# If line describes a rename, linetok has three tokens, otherwise two
|
||||
linetok = line.split('\t')
|
||||
status = linetok[0]
|
||||
file = linetok[-1]
|
||||
|
||||
# Handles non-ASCII chars and OS path separator
|
||||
file = normalize(file)
|
||||
|
||||
if file in filelist:
|
||||
stats['files'] -= 1
|
||||
log.debug("%d\t%d\t%d\t%s\t%s",
|
||||
stats['loglines'], stats['commits'], stats['files'],
|
||||
isodate(mtime), file)
|
||||
filelist.remove(file)
|
||||
try:
|
||||
touch(os.path.join(git.workdir, file), mtime, args.test)
|
||||
stats['touches'] += 1
|
||||
except Exception as e:
|
||||
log.error("ERROR: %s", e)
|
||||
stats['errors'] += 1
|
||||
|
||||
if args.dirs:
|
||||
dirname = os.path.dirname(file)
|
||||
if status[-1] in ('A', 'D') and dirname in dirlist:
|
||||
log.debug("%d\t%d\t-\t%s\t%s",
|
||||
stats['loglines'], stats['commits'],
|
||||
isodate(mtime), "{}/".format(dirname or '.'))
|
||||
dirlist.remove(dirname)
|
||||
try:
|
||||
touch(os.path.join(git.workdir, dirname), mtime, args.test)
|
||||
stats['dirtouches'] += 1
|
||||
except Exception as e:
|
||||
log.error("ERROR: %s", e)
|
||||
stats['direrrors'] += 1
|
||||
|
||||
# Date line
|
||||
else:
|
||||
stats['commits'] += 1
|
||||
mtime = int(line)
|
||||
|
||||
# All files done?
|
||||
if not stats['files']:
|
||||
git.proc.terminate() # hackish, but does the job. Not needed anyway
|
||||
return
|
||||
|
||||
|
||||
# Main Logic ##################################################################
|
||||
|
||||
def main():
|
||||
start = time.time() # yes, Wall time. CPU time is not realistic for users.
|
||||
stats = {_: 0 for _ in ('loglines', 'commits', 'touches', 'errors', 'dirtouches', 'direrrors')}
|
||||
|
||||
# First things first: Where and Who are we?
|
||||
try:
|
||||
git = Git(args.workdir, args.gitdir)
|
||||
except Git.Error as e:
|
||||
# Not in a git repository, and git already informed user on stderr. So we just...
|
||||
return e.returncode
|
||||
|
||||
# Do not work on dirty repositories, unless --force
|
||||
if not args.force and git.is_dirty():
|
||||
log.critical(
|
||||
"ERROR: There are local changes in the working directory.\n"
|
||||
"This could lead to undesirable results for modified files.\n"
|
||||
"Please, commit your changes (or use --force) and try again.\n"
|
||||
"Aborting")
|
||||
return 1
|
||||
|
||||
# Get the files managed by git and build file and dir list to be processed
|
||||
filelist = set()
|
||||
dirlist = set()
|
||||
if UPDATE_SYMLINKS and not args.skip_older_than:
|
||||
filelist = set(git.ls_files(args.pathspec))
|
||||
dirlist = set(os.path.dirname(_) for _ in filelist)
|
||||
else:
|
||||
for path in git.ls_files(args.pathspec):
|
||||
fullpath = os.path.join(git.workdir, path)
|
||||
|
||||
# Symlink (to file, to dir or broken - git handles the same way)
|
||||
if not UPDATE_SYMLINKS and os.path.islink(fullpath):
|
||||
log.warning("WARNING: Skipping symlink, OS does not support update: %s", path)
|
||||
continue
|
||||
|
||||
# skip files which are older than given threshold
|
||||
if args.skip_older_than and start - os.path.getmtime(fullpath) > args.skip_older_than:
|
||||
continue
|
||||
|
||||
# Always add them relative to worktree root
|
||||
filelist.add(path)
|
||||
dirlist.add(os.path.dirname(path))
|
||||
|
||||
stats['totalfiles'] = stats['files'] = len(filelist)
|
||||
log.info("{0:,} files to be processed in work dir".format(stats['totalfiles']))
|
||||
|
||||
if not filelist:
|
||||
# Nothing to do. Exit silently and without errors, just like git does
|
||||
return
|
||||
|
||||
# Process the log until all files are 'touched'
|
||||
log.debug("Line #\tLog #\tF.Left\tModification Time\tFile Name")
|
||||
parselog(filelist, dirlist, stats, git, args.merge, args.pathspec)
|
||||
|
||||
# Missing files
|
||||
if filelist:
|
||||
# Try to find them in merge logs, if not done already
|
||||
# (usually HUGE, thus MUCH slower!)
|
||||
if args.missing and not args.merge:
|
||||
filterlist = list(filelist)
|
||||
for i in range(0, len(filterlist), STEPMISSING):
|
||||
parselog(filelist, dirlist, stats, git,
|
||||
merge=True, filterlist=filterlist[i:i+STEPMISSING])
|
||||
|
||||
# Still missing some?
|
||||
for file in filelist:
|
||||
log.warning("WARNING: not found in log: %s", file)
|
||||
|
||||
# Final statistics
|
||||
# Suggestion: use git-log --before=mtime to brag about skipped log entries
|
||||
log.info(
|
||||
"Statistics:\n"
|
||||
"{:13,.2f} seconds\n"
|
||||
"{:13,} log lines processed\n"
|
||||
"{:13,} commits evaluated"
|
||||
"".format(time.time()-start, stats['loglines'], stats['commits']))
|
||||
|
||||
if args.dirs:
|
||||
if stats['direrrors']: log.info("{:13,} directory update errors".format(stats['direrrors']))
|
||||
log.info("{:13,} directories updated".format(stats['dirtouches']))
|
||||
|
||||
if stats['touches'] != stats['totalfiles']: log.info("{:13,} files".format(stats['totalfiles']))
|
||||
if stats['files']: log.info("{:13,} files missing".format(stats['files']))
|
||||
if stats['errors']: log.info("{:13,} file update errors".format(stats['errors']))
|
||||
|
||||
log.info("{:13,} files updated".format(stats['touches']))
|
||||
|
||||
if args.test:
|
||||
log.info("TEST RUN - No files modified!")
|
||||
|
||||
|
||||
args = parse_args()
|
||||
log = setup_logging(args)
|
||||
log.trace("Arguments: %s", args)
|
||||
|
||||
# UI done, it's show time!
|
||||
try:
|
||||
sys.exit(main())
|
||||
except KeyboardInterrupt:
|
||||
log.info("Aborting")
|
||||
sys.exit(-1)
|
||||
@@ -0,0 +1,426 @@
|
||||
name: Build
|
||||
on:
|
||||
push:
|
||||
tags: [ '*' ]
|
||||
jobs:
|
||||
|
||||
web:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Get current git tag
|
||||
id: get_tag
|
||||
uses: keeweb/get-git-tag@v3.0.2
|
||||
with:
|
||||
tagRegex: "^v(\\d+\\.\\d+\\.\\d+)$"
|
||||
tagRegexGroup: 1
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: keeweb/keeweb
|
||||
ref: ${{ github.repository == 'keeweb/keeweb' && github.sha || 'develop' }}
|
||||
- name: Upgrade Node.js
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '16'
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
- name: Install npm modules
|
||||
run: npm ci
|
||||
- name: Test
|
||||
run: npm test
|
||||
- name: Grunt
|
||||
run: grunt
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: KeeWeb-${{ steps.get_tag.outputs.tag }}.html
|
||||
path: dist
|
||||
- name: Write secrets
|
||||
env:
|
||||
VIRUS_TOTAL: ${{ secrets.VIRUS_TOTAL }}
|
||||
run: |
|
||||
mkdir keys
|
||||
echo "$VIRUS_TOTAL" > keys/virus-total.json
|
||||
- name: Check on VirusTotal
|
||||
run: grunt virustotal
|
||||
if: ${{ github.repository == 'keeweb/keeweb' }}
|
||||
|
||||
linux:
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- web
|
||||
steps:
|
||||
- name: Get current git tag
|
||||
id: get_tag
|
||||
uses: keeweb/get-git-tag@v3.0.2
|
||||
with:
|
||||
tagRegex: "^v(\\d+\\.\\d+\\.\\d+)$"
|
||||
tagRegexGroup: 1
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: keeweb/keeweb
|
||||
ref: ${{ github.repository == 'keeweb/keeweb' && github.sha || 'develop' }}
|
||||
- name: Download artifact
|
||||
uses: actions/download-artifact@v1
|
||||
with:
|
||||
name: KeeWeb-${{ steps.get_tag.outputs.tag }}.html
|
||||
path: dist
|
||||
- name: Write secrets
|
||||
env:
|
||||
PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }}
|
||||
KEEWEB_SIGN: ${{ secrets.KEEWEB_SIGN }}
|
||||
run: |
|
||||
mkdir keys
|
||||
echo "$PRIVATE_KEY" > keys/private-key.pem
|
||||
echo "$KEEWEB_SIGN" > keys/keeweb-sign.json
|
||||
- name: Build in Docker
|
||||
uses: ./.github/actions/linux-build
|
||||
- name: Upload AppImage artifact
|
||||
uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: KeeWeb-${{ steps.get_tag.outputs.tag }}.linux.AppImage
|
||||
path: dist/desktop/KeeWeb-${{ steps.get_tag.outputs.tag }}.linux.AppImage
|
||||
- name: Upload snap artifact
|
||||
uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: KeeWeb-${{ steps.get_tag.outputs.tag }}.linux.snap
|
||||
path: dist/desktop/KeeWeb-${{ steps.get_tag.outputs.tag }}.linux.snap
|
||||
- name: Upload deb artifact
|
||||
uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: KeeWeb-${{ steps.get_tag.outputs.tag }}.linux.x64.deb
|
||||
path: dist/desktop/KeeWeb-${{ steps.get_tag.outputs.tag }}.linux.x64.deb
|
||||
- name: Upload zip artifact
|
||||
uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: KeeWeb-${{ steps.get_tag.outputs.tag }}.linux.x64.zip
|
||||
path: dist/desktop/KeeWeb-${{ steps.get_tag.outputs.tag }}.linux.x64.zip
|
||||
- name: Upload rpm artifact
|
||||
uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: KeeWeb-${{ steps.get_tag.outputs.tag }}.linux.x86_64.rpm
|
||||
path: dist/desktop/KeeWeb-${{ steps.get_tag.outputs.tag }}.linux.x86_64.rpm
|
||||
|
||||
darwin:
|
||||
runs-on: macos-latest
|
||||
needs:
|
||||
- web
|
||||
steps:
|
||||
- name: Get current git tag
|
||||
id: get_tag
|
||||
uses: keeweb/get-git-tag@v3.0.2
|
||||
with:
|
||||
tagRegex: "^v(\\d+\\.\\d+\\.\\d+)$"
|
||||
tagRegexGroup: 1
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: keeweb/keeweb
|
||||
ref: ${{ github.repository == 'keeweb/keeweb' && github.sha || 'develop' }}
|
||||
- name: Download artifact
|
||||
uses: actions/download-artifact@v1
|
||||
with:
|
||||
name: KeeWeb-${{ steps.get_tag.outputs.tag }}.html
|
||||
path: dist
|
||||
- name: Upgrade Node.js
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '16'
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
- name: Install npm modules
|
||||
run: npm ci
|
||||
- name: Install grunt
|
||||
run: sudo npm i -g grunt-cli
|
||||
- name: Write secrets
|
||||
env:
|
||||
CODESIGN: ${{ secrets.CODESIGN }}
|
||||
APPLE_DEPLOY_PASSWORD: ${{ secrets.APPLE_DEPLOY_PASSWORD }}
|
||||
APPLE_ID_USERNAME: ${{ secrets.APPLE_ID_USERNAME }}
|
||||
APPLE_PROVISIONING_PROFILE: ${{ secrets.APPLE_PROVISIONING_PROFILE }}
|
||||
run: |
|
||||
mkdir keys
|
||||
echo "$CODESIGN" > keys/codesign.json
|
||||
xcrun altool --store-password-in-keychain-item "AC_PASSWORD" -u "$APPLE_ID_USERNAME" -p "$APPLE_DEPLOY_PASSWORD"
|
||||
echo "$APPLE_PROVISIONING_PROFILE" | base64 -d > keys/keeweb.provisionprofile
|
||||
- name: Import certificates
|
||||
uses: keeweb/import-codesign-certs@v1
|
||||
with:
|
||||
p12-file-base64: ${{ secrets.APPLE_CERTIFICATE }}
|
||||
p12-password: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
|
||||
- name: Grunt
|
||||
run: grunt --max-old-space-size=4096 desktop-darwin ${{ github.repository != 'keeweb/keeweb' && '--skip-sign' || '' }}
|
||||
- name: Upload x64 dmg artifact
|
||||
uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: KeeWeb-${{ steps.get_tag.outputs.tag }}.mac.x64.dmg
|
||||
path: dist/desktop/KeeWeb-${{ steps.get_tag.outputs.tag }}.mac.x64.dmg
|
||||
- name: Upload arm64 dmg artifact
|
||||
uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: KeeWeb-${{ steps.get_tag.outputs.tag }}.mac.arm64.dmg
|
||||
path: dist/desktop/KeeWeb-${{ steps.get_tag.outputs.tag }}.mac.arm64.dmg
|
||||
|
||||
win32:
|
||||
runs-on: windows-latest
|
||||
needs:
|
||||
- web
|
||||
steps:
|
||||
- name: Get current git tag
|
||||
id: get_tag
|
||||
uses: keeweb/get-git-tag@v3.0.2
|
||||
with:
|
||||
tagRegex: "^v(\\d+\\.\\d+\\.\\d+)$"
|
||||
tagRegexGroup: 1
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: keeweb/keeweb
|
||||
ref: ${{ github.repository == 'keeweb/keeweb' && github.sha || 'develop' }}
|
||||
- name: Download artifact
|
||||
uses: actions/download-artifact@v1
|
||||
with:
|
||||
name: KeeWeb-${{ steps.get_tag.outputs.tag }}.html
|
||||
path: dist
|
||||
- name: Upgrade Node.js
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '16'
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
- name: Install npm modules
|
||||
run: npm ci
|
||||
- name: Install grunt
|
||||
run: npm i -g grunt-cli
|
||||
- name: Write secrets
|
||||
env:
|
||||
CODESIGN: ${{ secrets.CODESIGN }}
|
||||
MS_CODESIGN_PRIVATE_KEY_CLIENT: ${{ secrets.MS_CODESIGN_PRIVATE_KEY_CLIENT }}
|
||||
MS_CODESIGN_PUBLIC_KEY_CLIENT: ${{ secrets.MS_CODESIGN_PUBLIC_KEY_CLIENT }}
|
||||
MS_CODESIGN_PUBLIC_KEY_SERVER: ${{ secrets.MS_CODESIGN_PUBLIC_KEY_SERVER }}
|
||||
run: |
|
||||
mkdir keys
|
||||
echo $Env:CODESIGN > keys/codesign.json
|
||||
mkdir keys/code-signing
|
||||
echo $Env:MS_CODESIGN_PRIVATE_KEY_CLIENT > keys/code-signing/private-key-client.pem
|
||||
echo $Env:MS_CODESIGN_PUBLIC_KEY_CLIENT > keys/code-signing/public-key-client.pem
|
||||
echo $Env:MS_CODESIGN_PUBLIC_KEY_SERVER > keys/code-signing/public-key-server.pem
|
||||
- name: Grunt
|
||||
run: grunt desktop-win32 ${{ github.repository != 'keeweb/keeweb' && '--skip-sign' || '' }}
|
||||
- name: Upload ia32 exe artifact
|
||||
uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: KeeWeb-${{ steps.get_tag.outputs.tag }}.win.ia32.exe
|
||||
path: dist/desktop/KeeWeb-${{ steps.get_tag.outputs.tag }}.win.ia32.exe
|
||||
- name: Upload ia32 zip artifact
|
||||
uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: KeeWeb-${{ steps.get_tag.outputs.tag }}.win.ia32.zip
|
||||
path: dist/desktop/KeeWeb-${{ steps.get_tag.outputs.tag }}.win.ia32.zip
|
||||
- name: Upload x64 exe artifact
|
||||
uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: KeeWeb-${{ steps.get_tag.outputs.tag }}.win.x64.exe
|
||||
path: dist/desktop/KeeWeb-${{ steps.get_tag.outputs.tag }}.win.x64.exe
|
||||
- name: Upload x64 zip artifact
|
||||
uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: KeeWeb-${{ steps.get_tag.outputs.tag }}.win.x64.zip
|
||||
path: dist/desktop/KeeWeb-${{ steps.get_tag.outputs.tag }}.win.x64.zip
|
||||
- name: Upload arm64 exe artifact
|
||||
uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: KeeWeb-${{ steps.get_tag.outputs.tag }}.win.arm64.exe
|
||||
path: dist/desktop/KeeWeb-${{ steps.get_tag.outputs.tag }}.win.arm64.exe
|
||||
- name: Upload arm64 zip artifact
|
||||
uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: KeeWeb-${{ steps.get_tag.outputs.tag }}.win.arm64.zip
|
||||
path: dist/desktop/KeeWeb-${{ steps.get_tag.outputs.tag }}.win.arm64.zip
|
||||
|
||||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- linux
|
||||
- darwin
|
||||
- win32
|
||||
steps:
|
||||
- name: Get current git tag
|
||||
id: get_tag
|
||||
uses: keeweb/get-git-tag@v3.0.2
|
||||
with:
|
||||
tagRegex: "^v(\\d+\\.\\d+\\.\\d+)$"
|
||||
tagRegexGroup: 1
|
||||
- name: Setup GCloud
|
||||
uses: google-github-actions/setup-gcloud@master
|
||||
with:
|
||||
version: '285.0.0'
|
||||
service_account_key: ${{ secrets.GCP_SA_KEY }}
|
||||
export_default_credentials: true
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: keeweb/keeweb
|
||||
path: keeweb
|
||||
ref: ${{ github.repository == 'keeweb/keeweb' && github.sha || 'develop' }}
|
||||
- name: Upgrade Node.js
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '16'
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
- name: Install npm modules
|
||||
working-directory: keeweb
|
||||
run: npm ci
|
||||
- name: Download html artifact
|
||||
uses: actions/download-artifact@v1
|
||||
with:
|
||||
name: KeeWeb-${{ steps.get_tag.outputs.tag }}.html
|
||||
path: html
|
||||
- name: Download linux.AppImage artifact
|
||||
uses: actions/download-artifact@v1
|
||||
with:
|
||||
name: KeeWeb-${{ steps.get_tag.outputs.tag }}.linux.AppImage
|
||||
path: assets
|
||||
- name: Download linux.snap artifact
|
||||
uses: actions/download-artifact@v1
|
||||
with:
|
||||
name: KeeWeb-${{ steps.get_tag.outputs.tag }}.linux.snap
|
||||
path: assets
|
||||
- name: Download linux.deb artifact
|
||||
uses: actions/download-artifact@v1
|
||||
with:
|
||||
name: KeeWeb-${{ steps.get_tag.outputs.tag }}.linux.x64.deb
|
||||
path: assets
|
||||
- name: Download linux.zip artifact
|
||||
uses: actions/download-artifact@v1
|
||||
with:
|
||||
name: KeeWeb-${{ steps.get_tag.outputs.tag }}.linux.x64.zip
|
||||
path: assets
|
||||
- name: Download linux.rpm artifact
|
||||
uses: actions/download-artifact@v1
|
||||
with:
|
||||
name: KeeWeb-${{ steps.get_tag.outputs.tag }}.linux.x86_64.rpm
|
||||
path: assets
|
||||
- name: Download darwin.x64.dmg artifact
|
||||
uses: actions/download-artifact@v1
|
||||
with:
|
||||
name: KeeWeb-${{ steps.get_tag.outputs.tag }}.mac.x64.dmg
|
||||
path: assets
|
||||
- name: Download darwin.arm64.dmg artifact
|
||||
uses: actions/download-artifact@v1
|
||||
with:
|
||||
name: KeeWeb-${{ steps.get_tag.outputs.tag }}.mac.arm64.dmg
|
||||
path: assets
|
||||
- name: Download win32.ia32.exe artifact
|
||||
uses: actions/download-artifact@v1
|
||||
with:
|
||||
name: KeeWeb-${{ steps.get_tag.outputs.tag }}.win.ia32.exe
|
||||
path: assets
|
||||
- name: Download win32.ia32.zip artifact
|
||||
uses: actions/download-artifact@v1
|
||||
with:
|
||||
name: KeeWeb-${{ steps.get_tag.outputs.tag }}.win.ia32.zip
|
||||
path: assets
|
||||
- name: Download win32.x64.exe artifact
|
||||
uses: actions/download-artifact@v1
|
||||
with:
|
||||
name: KeeWeb-${{ steps.get_tag.outputs.tag }}.win.x64.exe
|
||||
path: assets
|
||||
- name: Download win32.x64.zip artifact
|
||||
uses: actions/download-artifact@v1
|
||||
with:
|
||||
name: KeeWeb-${{ steps.get_tag.outputs.tag }}.win.x64.zip
|
||||
path: assets
|
||||
- name: Download win32.arm64.exe artifact
|
||||
uses: actions/download-artifact@v1
|
||||
with:
|
||||
name: KeeWeb-${{ steps.get_tag.outputs.tag }}.win.arm64.exe
|
||||
path: assets
|
||||
- name: Download win32.arm64.zip artifact
|
||||
uses: actions/download-artifact@v1
|
||||
with:
|
||||
name: KeeWeb-${{ steps.get_tag.outputs.tag }}.win.arm64.zip
|
||||
path: assets
|
||||
- name: Zip html
|
||||
working-directory: html
|
||||
run: zip -vr ../assets/KeeWeb-${{ steps.get_tag.outputs.tag }}.html.zip .
|
||||
- name: Copy assets to dist
|
||||
run: mkdir -p keeweb/dist/desktop && cp assets/* keeweb/dist/desktop
|
||||
- name: Write secrets
|
||||
env:
|
||||
PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }}
|
||||
KEEWEB_SIGN: ${{ secrets.KEEWEB_SIGN }}
|
||||
working-directory: keeweb
|
||||
run: |
|
||||
mkdir keys
|
||||
echo "$PRIVATE_KEY" > keys/private-key.pem
|
||||
echo "$KEEWEB_SIGN" > keys/keeweb-sign.json
|
||||
- name: Grunt
|
||||
working-directory: keeweb
|
||||
run: grunt finish-release
|
||||
- name: Copy signatures to assets
|
||||
run: cp keeweb/dist/desktop/Verify.sign.sha256 assets
|
||||
- name: Copy checksums to assets
|
||||
run: cp keeweb/dist/desktop/Verify.sha256 assets
|
||||
- name: Login to DockerHub Registry
|
||||
env:
|
||||
DOCKERHUB_ACCESS_TOKEN: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }}
|
||||
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
run: echo $DOCKERHUB_ACCESS_TOKEN | docker login -u $DOCKERHUB_USERNAME --password-stdin
|
||||
- name: Copy dist to the Docker context
|
||||
run: cp -r html keeweb/package/docker/dist
|
||||
- name: Build the Docker image
|
||||
working-directory: keeweb
|
||||
run: docker build -t antelle/keeweb:latest -t antelle/keeweb:${{ steps.get_tag.outputs.tag }} package/docker
|
||||
- name: Push the Docker image to dockerhub
|
||||
if: ${{ github.repository == 'keeweb/keeweb' }}
|
||||
run: docker push --all-tags antelle/keeweb
|
||||
- name: Extract release notes
|
||||
run: node util/extract-release-notes.js --version=${{ steps.get_tag.outputs.tag }} --output=tmp/release-body.md
|
||||
working-directory: keeweb
|
||||
- name: Publish GitHub release
|
||||
uses: softprops/action-gh-release@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: v${{ steps.get_tag.outputs.tag }}
|
||||
name: Desktop apps v${{ steps.get_tag.outputs.tag }}
|
||||
files: assets/*
|
||||
body_path: keeweb/tmp/release-body.md
|
||||
- name: Checkout gh-pages
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
ref: gh-pages
|
||||
path: gh-pages
|
||||
fetch-depth: 0
|
||||
- name: Commit dist to gh-pages
|
||||
working-directory: gh-pages
|
||||
run: |
|
||||
git rm -r '*'
|
||||
cp -r ../html/* .
|
||||
mkdir -p .github/workflows
|
||||
echo $GITHUB_SHA > build.txt
|
||||
date >> build.txt
|
||||
git add .
|
||||
git config --local user.email "action@github.com"
|
||||
git config --local user.name "GitHub Action"
|
||||
git commit -am v${{ steps.get_tag.outputs.tag }}
|
||||
- name: Push gh-pages
|
||||
uses: keeweb/github-push-action@master
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
branch: gh-pages
|
||||
directory: gh-pages
|
||||
- name: Restore git mtime
|
||||
working-directory: gh-pages
|
||||
run: python3 ../keeweb/.github/actions/scripts/git-restore-mtime.py
|
||||
- name: Sync the website
|
||||
if: ${{ github.repository == 'keeweb/keeweb' }}
|
||||
run: gsutil -m rsync -r -d -x "^\." gh-pages gs://app.keeweb.info/
|
||||
- name: Purge CloudFlare cache
|
||||
if: ${{ github.repository == 'keeweb/keeweb' }}
|
||||
env:
|
||||
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
||||
run: |
|
||||
curl -sS -X POST "https://api.cloudflare.com/client/v4/zones/dbda8e7e454d23edb08d4bc3b3f6f872/purge_cache" \
|
||||
-H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
|
||||
-H "Content-Type: application/json" \
|
||||
--data '{"purge_everything":true}'
|
||||
@@ -3,9 +3,8 @@ misc.xml
|
||||
.DS_Store
|
||||
node_modules/
|
||||
*.log
|
||||
dist/
|
||||
/dist/
|
||||
tmp/
|
||||
build/
|
||||
coverage/
|
||||
keys
|
||||
*.user
|
||||
@@ -15,3 +14,6 @@ obj/
|
||||
xcuserdata/
|
||||
*.suo
|
||||
.idea/
|
||||
.vscode/
|
||||
*.iml
|
||||
test/dist/
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"tabWidth": 4,
|
||||
"singleQuote": true,
|
||||
"printWidth": 100,
|
||||
"trailingComma": "none",
|
||||
"quoteProps": "preserve",
|
||||
"endOfLine": "auto"
|
||||
}
|
||||
@@ -2,24 +2,41 @@
|
||||
|
||||
Thanks for taking the time to contribute! :gift:
|
||||
|
||||
There are different ways to help the project, you will find a summary here.
|
||||
|
||||
## Code of conduct
|
||||
|
||||
This project and everyone participating in it is governed by the [KeeWeb Code of Conduct](https://github.com/keeweb/keeweb/blob/master/.github/CODE_OF_CONDUCT.md#readme). By participating, you are expected to uphold this code. Please report unacceptable behavior to antelle.net@gmail.com.
|
||||
This project and everyone participating in it is governed by the [KeeWeb Code of Conduct](https://github.com/keeweb/keeweb/blob/master/.github/CODE_OF_CONDUCT.md#readme).
|
||||
By participating, you are expected to uphold this code. Please report unacceptable behavior to antelle.net@gmail.com.
|
||||
|
||||
## Issues
|
||||
|
||||
First, let's check if it's [already there](https://github.com/keeweb/keeweb/issues).
|
||||
Perhaps, someone has already reported it?
|
||||
|
||||
[Click here](https://github.com/keeweb/keeweb/issues/new) to create a new issue.
|
||||
[Click here](https://github.com/keeweb/keeweb/issues/new/choose) to create a new issue.
|
||||
When creating issues, please answer some questions asked on that page.
|
||||
They will help to understand, reproduce and fix your issue.
|
||||
They will help to understand, reproduce, and fix your issue.
|
||||
|
||||
## Vulnerabilities
|
||||
|
||||
We would appreciate [responsible disclosure](https://en.wikipedia.org/wiki/Responsible_disclosure).
|
||||
If you would like to report a vulnerability, the preferred way to do so is [contacting the developer directly](mailto:antelle.net@gmail.com).
|
||||
|
||||
## Questions, great ideas, etc...
|
||||
|
||||
You can [create an issue](https://github.com/keeweb/keeweb/issues/new) to discuss any question.
|
||||
You can [create an issue](https://github.com/keeweb/keeweb/issues/new/choose) to discuss any topic.
|
||||
Indeed, questions on that page are not applicable in this case.
|
||||
|
||||
## Development
|
||||
|
||||
We don't accept (and in foreseeable future, we won't accept) anyone as a project collaborator directly.
|
||||
Instead, the code should be contributed via pull requests. To get started with development, take a look at these pages:
|
||||
- [Architecture](https://github.com/keeweb/keeweb/wiki/Architecture)
|
||||
- [Engineering](https://github.com/keeweb/keeweb/wiki/Engineering)
|
||||
- [Unsupported Features](https://github.com/keeweb/keeweb/wiki/Unsupported%20Features)
|
||||
- [Pull Request Guidelines](https://github.com/keeweb/keeweb/blob/master/.github/PULL_REQUEST_TEMPLATE.md#readme)
|
||||
|
||||
## Pull requests
|
||||
|
||||
Please follow [this guide](https://github.com/keeweb/keeweb/blob/master/.github/PULL_REQUEST_TEMPLATE.md#readme).
|
||||
@@ -27,4 +44,23 @@ Please follow [this guide](https://github.com/keeweb/keeweb/blob/master/.github/
|
||||
## Docs (Wiki pages)
|
||||
|
||||
KeeWeb has [Wiki pages](https://github.com/keeweb/keeweb/wiki), however it's not possible to contribute with pull requests.
|
||||
If you would like to improve it, please [open an issue](https://github.com/keeweb/keeweb/issues/new) and submit your changes in Markdown format.
|
||||
If you would like to improve it, please [open an issue](https://github.com/keeweb/keeweb/issues/new/choose) and submit your changes in Markdown format.
|
||||
|
||||
## Donations
|
||||
|
||||
There are two ways of donating:
|
||||
- join as backer on [OpenCollective](https://opencollective.com/keeweb#support);
|
||||
- sponsor the developer directly on [GitHub](https://github.com/sponsors/antelle).
|
||||
|
||||
Please note: donation does not imply any type of service contract.
|
||||
|
||||
## Translations
|
||||
|
||||
All KeeWeb translations are contributed by the community. To improve a translation or add a missing one,
|
||||
join us on [OneSky](https://keeweb.oneskyapp.com).
|
||||
|
||||
## PR
|
||||
|
||||
We would be happy to support you if you decide to post, blog, or review the project,
|
||||
or provide any other kind of PR. Please [contact the developer](mailto:antelle.net@gmail.com)
|
||||
if you have anything to share. You can also poke us on [Twitter](https://twitter.com/kee_web).
|
||||
|
||||
@@ -1,14 +1,17 @@
|
||||
/* eslint-env node */
|
||||
|
||||
const fs = require('fs');
|
||||
const fs = require('fs-extra');
|
||||
const path = require('path');
|
||||
const { execSync } = require('child_process');
|
||||
const debug = require('debug');
|
||||
|
||||
const sass = require('node-sass');
|
||||
|
||||
const webpackConfig = require('./webpack.config');
|
||||
const postCssReplaceFont = require('./build/util/postcss-replace-font');
|
||||
const webpackConfig = require('./build/webpack.config');
|
||||
const webpackConfigTest = require('./test/test.webpack.config');
|
||||
const pkg = require('./package.json');
|
||||
|
||||
module.exports = function(grunt) {
|
||||
debug.enable('electron-notarize');
|
||||
|
||||
module.exports = function (grunt) {
|
||||
require('time-grunt')(grunt);
|
||||
require('load-grunt-tasks')(grunt);
|
||||
|
||||
@@ -22,26 +25,72 @@ module.exports = function(grunt) {
|
||||
|
||||
const dt = date.toISOString().replace(/T.*/, '');
|
||||
const year = date.getFullYear();
|
||||
const minElectronVersionForUpdate = '4.0.0';
|
||||
const zipCommentPlaceholderPart = 'zip_comment_placeholder_that_will_be_replaced_with_hash';
|
||||
const zipCommentPlaceholder = zipCommentPlaceholderPart + '.'.repeat(512 - zipCommentPlaceholderPart.length);
|
||||
const electronVersion = pkg.dependencies.electron.replace(/^\D/, '');
|
||||
const skipSign = grunt.option('skip-sign');
|
||||
const getCodeSignConfig = () =>
|
||||
skipSign ? { identities: {} } : require('./keys/codesign.json');
|
||||
|
||||
let sha = grunt.option('commit-sha');
|
||||
if (!sha) {
|
||||
try {
|
||||
sha = execSync('git rev-parse --short HEAD').toString('utf8').trim();
|
||||
} catch (e) {
|
||||
grunt.warn(
|
||||
"Cannot get commit sha from git. It's recommended to build KeeWeb from a git repo " +
|
||||
'because commit sha is displayed in the UI, however if you would like to build from a folder, ' +
|
||||
'you can override what will be displayed in the UI with --commit-sha=xxx.'
|
||||
);
|
||||
}
|
||||
}
|
||||
grunt.log.writeln(`Building KeeWeb v${pkg.version} (${sha})`);
|
||||
|
||||
const webpackOptions = {
|
||||
date,
|
||||
beta: !!grunt.option('beta'),
|
||||
sha,
|
||||
appleTeamId: '3LE7JZ657W'
|
||||
};
|
||||
|
||||
const windowsAppVersionString = {
|
||||
CompanyName: 'KeeWeb',
|
||||
FileDescription: pkg.description,
|
||||
OriginalFilename: 'KeeWeb.exe',
|
||||
ProductName: 'KeeWeb',
|
||||
InternalName: 'KeeWeb'
|
||||
};
|
||||
|
||||
const appdmgOptions = (arch) => ({
|
||||
title: 'KeeWeb',
|
||||
icon: 'graphics/icon.icns',
|
||||
background: 'graphics/dmg-background.png',
|
||||
'background-color': '#E0E6F9',
|
||||
'icon-size': 80,
|
||||
window: { size: { width: 658, height: 498 } },
|
||||
contents: [
|
||||
{ x: 438, y: 344, type: 'link', path: '/Applications' },
|
||||
{
|
||||
x: 192,
|
||||
y: 344,
|
||||
type: 'file',
|
||||
path: `tmp/desktop/KeeWeb-darwin-${arch}/KeeWeb.app`
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
const linuxDependencies = [
|
||||
'libappindicator1',
|
||||
'libgconf-2-4',
|
||||
'gnome-keyring',
|
||||
'libxtst6',
|
||||
'libx11-6',
|
||||
'libatspi2.0-0'
|
||||
];
|
||||
|
||||
grunt.initConfig({
|
||||
gitinfo: {
|
||||
branch: {
|
||||
current: {
|
||||
SHA: 'Current HEAD SHA',
|
||||
shortSHA: 'Current HEAD short SHA',
|
||||
name: 'Current branch name',
|
||||
lastCommitTime: 'Last commit time'
|
||||
}
|
||||
}
|
||||
},
|
||||
noop: { noop: {} },
|
||||
clean: {
|
||||
dist: ['dist', 'tmp'],
|
||||
desktop: ['tmp/desktop', 'dist/desktop'],
|
||||
cordova: ['tmp/cordova', 'dist/cordova']
|
||||
desktop: ['tmp/desktop', 'dist/desktop']
|
||||
},
|
||||
copy: {
|
||||
html: {
|
||||
@@ -49,9 +98,11 @@ module.exports = function(grunt) {
|
||||
dest: 'tmp/index.html',
|
||||
nonull: true
|
||||
},
|
||||
favicon: {
|
||||
src: 'app/favicon.png',
|
||||
dest: 'tmp/favicon.png',
|
||||
'content-dist': {
|
||||
cwd: 'app/content/',
|
||||
src: '**',
|
||||
dest: 'dist/',
|
||||
expand: true,
|
||||
nonull: true
|
||||
},
|
||||
icons: {
|
||||
@@ -82,12 +133,10 @@ module.exports = function(grunt) {
|
||||
expand: true,
|
||||
nonull: true
|
||||
},
|
||||
fonts: {
|
||||
src: 'node_modules/font-awesome/fonts/fontawesome-webfont.*',
|
||||
dest: 'tmp/fonts/',
|
||||
nonull: true,
|
||||
expand: true,
|
||||
flatten: true
|
||||
'desktop-html': {
|
||||
src: 'dist/index.html',
|
||||
dest: 'tmp/desktop/app/index.html',
|
||||
nonull: true
|
||||
},
|
||||
'desktop-app-content': {
|
||||
cwd: 'desktop/',
|
||||
@@ -96,38 +145,20 @@ module.exports = function(grunt) {
|
||||
expand: true,
|
||||
nonull: true
|
||||
},
|
||||
'desktop-update': {
|
||||
cwd: 'tmp/desktop/KeeWeb-darwin-x64/KeeWeb.app/Contents/Resources/',
|
||||
src: 'app.asar',
|
||||
dest: 'tmp/desktop/update/',
|
||||
expand: true,
|
||||
nonull: true
|
||||
},
|
||||
'desktop-update-helper': {
|
||||
src: ['helper/darwin/KeeWebHelper', 'helper/win32/KeeWebHelper.exe'],
|
||||
dest: 'tmp/desktop/update/',
|
||||
nonull: true
|
||||
},
|
||||
'desktop-windows-helper-ia32': {
|
||||
src: 'helper/win32/KeeWebHelper.exe',
|
||||
dest: 'tmp/desktop/KeeWeb-win32-ia32/Resources/',
|
||||
nonull: true
|
||||
},
|
||||
'desktop-windows-helper-x64': {
|
||||
src: 'helper/win32/KeeWebHelper.exe',
|
||||
dest: 'tmp/desktop/KeeWeb-win32-x64/Resources/',
|
||||
nonull: true
|
||||
},
|
||||
'desktop-darwin-helper-x64': {
|
||||
src: 'helper/darwin/KeeWebHelper',
|
||||
dest: 'tmp/desktop/KeeWeb-darwin-x64/KeeWeb.app/Contents/Resources/',
|
||||
nonull: true,
|
||||
options: { mode: '0755' }
|
||||
},
|
||||
'desktop-darwin-installer': {
|
||||
cwd: 'package/osx/KeeWeb Installer.app',
|
||||
dest: 'tmp/desktop/KeeWeb-darwin-x64/KeeWeb.app/Contents/Installer/KeeWeb Installer.app',
|
||||
'desktop-darwin-installer-helper-x64': {
|
||||
cwd: 'tmp/desktop/KeeWeb Installer.app',
|
||||
src: '**',
|
||||
dest:
|
||||
'tmp/desktop/KeeWeb-darwin-x64/KeeWeb.app/Contents/Installer/KeeWeb Installer.app',
|
||||
expand: true,
|
||||
nonull: true,
|
||||
options: { mode: true }
|
||||
},
|
||||
'desktop-darwin-installer-helper-arm64': {
|
||||
cwd: 'tmp/desktop/KeeWeb Installer.app',
|
||||
src: '**',
|
||||
dest:
|
||||
'tmp/desktop/KeeWeb-darwin-arm64/KeeWeb.app/Contents/Installer/KeeWeb Installer.app',
|
||||
expand: true,
|
||||
nonull: true,
|
||||
options: { mode: true }
|
||||
@@ -141,36 +172,111 @@ module.exports = function(grunt) {
|
||||
src: 'tmp/desktop/KeeWeb.win.ia32.exe',
|
||||
dest: `dist/desktop/KeeWeb-${pkg.version}.win.ia32.exe`,
|
||||
nonull: true
|
||||
},
|
||||
'desktop-win32-dist-arm64': {
|
||||
src: 'tmp/desktop/KeeWeb.win.arm64.exe',
|
||||
dest: `dist/desktop/KeeWeb-${pkg.version}.win.arm64.exe`,
|
||||
nonull: true
|
||||
},
|
||||
'native-modules-darwin-x64': {
|
||||
src: 'node_modules/@keeweb/keeweb-native-modules/*-darwin-x64.node',
|
||||
dest: 'tmp/desktop/KeeWeb-darwin-x64/KeeWeb.app/Contents/Resources/',
|
||||
nonull: true
|
||||
},
|
||||
'native-modules-darwin-arm64': {
|
||||
src: 'node_modules/@keeweb/keeweb-native-modules/*-darwin-arm64.node',
|
||||
dest: 'tmp/desktop/KeeWeb-darwin-arm64/KeeWeb.app/Contents/Resources/',
|
||||
nonull: true
|
||||
},
|
||||
'native-modules-win32-x64': {
|
||||
src: 'node_modules/@keeweb/keeweb-native-modules/*-win32-x64.node',
|
||||
dest: 'tmp/desktop/KeeWeb-win32-x64/resources/',
|
||||
nonull: true
|
||||
},
|
||||
'native-modules-win32-ia32': {
|
||||
src: 'node_modules/@keeweb/keeweb-native-modules/*-win32-ia32.node',
|
||||
dest: 'tmp/desktop/KeeWeb-win32-ia32/resources/',
|
||||
nonull: true
|
||||
},
|
||||
'native-modules-win32-arm64': {
|
||||
src: 'node_modules/@keeweb/keeweb-native-modules/*-win32-arm64.node',
|
||||
dest: 'tmp/desktop/KeeWeb-win32-arm64/resources/',
|
||||
nonull: true
|
||||
},
|
||||
'native-modules-linux-x64': {
|
||||
src: 'node_modules/@keeweb/keeweb-native-modules/*-linux-x64.node',
|
||||
dest: 'tmp/desktop/keeweb-linux-x64/resources/',
|
||||
nonull: true
|
||||
},
|
||||
'electron-builder-dist-linux-rpm': {
|
||||
src: `tmp/desktop/electron-builder/KeeWeb-${pkg.version}.x86_64.rpm`,
|
||||
dest: `dist/desktop/KeeWeb-${pkg.version}.linux.x86_64.rpm`,
|
||||
nonull: true
|
||||
},
|
||||
'electron-builder-dist-linux-snap': {
|
||||
src: `tmp/desktop/electron-builder/KeeWeb_${pkg.version}_amd64.snap`,
|
||||
dest: `dist/desktop/KeeWeb-${pkg.version}.linux.snap`,
|
||||
nonull: true
|
||||
},
|
||||
'electron-builder-dist-linux-appimage': {
|
||||
src: `tmp/desktop/electron-builder/keeweb-${pkg.version}.AppImage`,
|
||||
dest: `dist/desktop/KeeWeb-${pkg.version}.linux.AppImage`,
|
||||
nonull: true
|
||||
},
|
||||
'darwin-installer-icon': {
|
||||
src: 'graphics/icon.icns',
|
||||
dest: 'tmp/desktop/KeeWeb Installer.app/Contents/Resources/applet.icns',
|
||||
nonull: true
|
||||
},
|
||||
'native-messaging-host-darwin-x64': {
|
||||
src:
|
||||
'node_modules/@keeweb/keeweb-native-messaging-host/darwin-x64/keeweb-native-messaging-host',
|
||||
dest:
|
||||
'tmp/desktop/KeeWeb-darwin-x64/KeeWeb.app/Contents/MacOS/util/keeweb-native-messaging-host',
|
||||
nonull: true,
|
||||
options: { mode: '0755' }
|
||||
},
|
||||
'native-messaging-host-darwin-arm64': {
|
||||
src:
|
||||
'node_modules/@keeweb/keeweb-native-messaging-host/darwin-arm64/keeweb-native-messaging-host',
|
||||
dest:
|
||||
'tmp/desktop/KeeWeb-darwin-arm64/KeeWeb.app/Contents/MacOS/util/keeweb-native-messaging-host',
|
||||
nonull: true,
|
||||
options: { mode: '0755' }
|
||||
},
|
||||
'native-messaging-host-linux-x64': {
|
||||
src:
|
||||
'node_modules/@keeweb/keeweb-native-messaging-host/linux-x64/keeweb-native-messaging-host',
|
||||
dest: 'tmp/desktop/keeweb-linux-x64/keeweb-native-messaging-host',
|
||||
nonull: true,
|
||||
options: { mode: '0755' }
|
||||
},
|
||||
'native-messaging-host-win32-x64': {
|
||||
src:
|
||||
'node_modules/@keeweb/keeweb-native-messaging-host/win32-x64/keeweb-native-messaging-host.exe',
|
||||
dest: 'tmp/desktop/KeeWeb-win32-x64/keeweb-native-messaging-host.exe',
|
||||
nonull: true
|
||||
},
|
||||
'native-messaging-host-win32-ia32': {
|
||||
src:
|
||||
'node_modules/@keeweb/keeweb-native-messaging-host/win32-ia32/keeweb-native-messaging-host.exe',
|
||||
dest: 'tmp/desktop/KeeWeb-win32-ia32/keeweb-native-messaging-host.exe',
|
||||
nonull: true
|
||||
},
|
||||
'native-messaging-host-win32-arm64': {
|
||||
src:
|
||||
'node_modules/@keeweb/keeweb-native-messaging-host/win32-arm64/keeweb-native-messaging-host.exe',
|
||||
dest: 'tmp/desktop/KeeWeb-win32-arm64/keeweb-native-messaging-host.exe',
|
||||
nonull: true
|
||||
}
|
||||
},
|
||||
eslint: {
|
||||
app: ['app/scripts/**/*.js'],
|
||||
desktop: ['desktop/**/*.js', '!desktop/node_modules/**'],
|
||||
grunt: ['Gruntfile.js', 'grunt/**/*.js']
|
||||
},
|
||||
sass: {
|
||||
options: {
|
||||
sourceMap: false,
|
||||
includePaths: ['./node_modules'],
|
||||
implementation: sass
|
||||
},
|
||||
dist: {
|
||||
files: {
|
||||
'tmp/css/main.css': 'app/styles/main.scss'
|
||||
}
|
||||
}
|
||||
},
|
||||
postcss: {
|
||||
options: {
|
||||
processors: [
|
||||
postCssReplaceFont,
|
||||
require('cssnano')({discardComments: {removeAll: true}})
|
||||
]
|
||||
},
|
||||
dist: {
|
||||
src: 'tmp/css/main.css',
|
||||
dest: 'tmp/css/main.css'
|
||||
}
|
||||
build: ['Gruntfile.js', 'grunt.*.js', 'build/**/*.js', 'webpack.config.js'],
|
||||
plugins: ['plugins/**/*.js'],
|
||||
util: ['util/**/*.js'],
|
||||
installer: ['package/osx/installer.js']
|
||||
},
|
||||
inline: {
|
||||
app: {
|
||||
@@ -178,6 +284,19 @@ module.exports = function(grunt) {
|
||||
dest: 'tmp/app.html'
|
||||
}
|
||||
},
|
||||
'csp-hashes': {
|
||||
options: {
|
||||
algo: 'sha512',
|
||||
expected: {
|
||||
style: 1,
|
||||
script: 1
|
||||
}
|
||||
},
|
||||
app: {
|
||||
src: 'tmp/app.html',
|
||||
dest: 'dist/index.html'
|
||||
}
|
||||
},
|
||||
htmlmin: {
|
||||
options: {
|
||||
removeComments: true,
|
||||
@@ -185,154 +304,196 @@ module.exports = function(grunt) {
|
||||
},
|
||||
app: {
|
||||
files: {
|
||||
'dist/index.html': 'tmp/app.html'
|
||||
'tmp/app.html': 'tmp/app.html'
|
||||
}
|
||||
}
|
||||
},
|
||||
'string-replace': {
|
||||
manifest: {
|
||||
'update-manifest': {
|
||||
options: {
|
||||
replacements: [
|
||||
{ pattern: '# YYYY-MM-DD:v0.0.0', replacement: '# ' + dt + ':v' + pkg.version },
|
||||
{ pattern: '# updmin:v0.0.0', replacement: '# updmin:v' + minElectronVersionForUpdate }
|
||||
{
|
||||
pattern: /"version":\s*".*?"/,
|
||||
replacement: `"version": "${pkg.version}"`
|
||||
},
|
||||
{
|
||||
pattern: /"date":\s*".*?"/,
|
||||
replacement: `"date": "${dt}"`
|
||||
}
|
||||
]
|
||||
},
|
||||
files: { 'dist/manifest.appcache': 'app/manifest.appcache' }
|
||||
files: { 'dist/update.json': 'app/update.json' }
|
||||
},
|
||||
'manifest-html': {
|
||||
options: { replacements: [{ pattern: '<html', replacement: '<html manifest="manifest.appcache"' }] },
|
||||
files: { 'dist/index.html': 'dist/index.html' }
|
||||
},
|
||||
'desktop-html': {
|
||||
options: { replacements: [{ pattern: ' manifest="manifest.appcache"', replacement: '' }] },
|
||||
files: { 'tmp/desktop/app/index.html': 'dist/index.html' }
|
||||
'service-worker': {
|
||||
options: { replacements: [{ pattern: '0.0.0', replacement: pkg.version }] },
|
||||
files: { 'dist/service-worker.js': 'app/service-worker.js' }
|
||||
},
|
||||
'desktop-public-key': {
|
||||
options: { replacements: [{ pattern: '\'@@PUBLIC_KEY_CONTENT\'', replacement:
|
||||
'`' + fs.readFileSync('app/resources/public-key.pem', {encoding: 'utf8'}).trim() + '`' }] },
|
||||
options: {
|
||||
replacements: [
|
||||
{
|
||||
pattern: "'@@PUBLIC_KEY_CONTENT'",
|
||||
replacement:
|
||||
'`' +
|
||||
fs
|
||||
.readFileSync('app/resources/public-key.pem', {
|
||||
encoding: 'utf8'
|
||||
})
|
||||
.trim() +
|
||||
'`'
|
||||
}
|
||||
]
|
||||
},
|
||||
files: { 'tmp/desktop/app/main.js': 'desktop/main.js' }
|
||||
},
|
||||
'cordova-html': {
|
||||
options: { replacements: [{ pattern: '<script', replacement: '<script src="cordova.js"></script><script' }] },
|
||||
files: { 'tmp/cordova/app/index.html': 'dist/index.html' }
|
||||
}
|
||||
},
|
||||
webpack: {
|
||||
js: webpackConfig.config(grunt)
|
||||
app: webpackConfig.config(webpackOptions),
|
||||
test: webpackConfigTest
|
||||
},
|
||||
'webpack-dev-server': {
|
||||
options: {
|
||||
webpack: webpackConfig.devServerConfig(grunt),
|
||||
publicPath: '/tmp/js',
|
||||
webpack: webpackConfig.config({
|
||||
...webpackOptions,
|
||||
mode: 'development',
|
||||
sha: 'dev'
|
||||
}),
|
||||
publicPath: '/',
|
||||
contentBase: [
|
||||
path.resolve(__dirname, 'tmp'),
|
||||
path.resolve(__dirname, 'app/content')
|
||||
],
|
||||
progress: false
|
||||
},
|
||||
js: {
|
||||
keepalive: true,
|
||||
webpack: {
|
||||
devtool: 'source-map'
|
||||
},
|
||||
port: 8085
|
||||
}
|
||||
},
|
||||
uglify: {
|
||||
options: {
|
||||
preserveComments: false
|
||||
},
|
||||
app: {
|
||||
files: { 'tmp/js/app.js': ['tmp/js/app.js'] }
|
||||
},
|
||||
vendor: {
|
||||
options: {
|
||||
mangle: false,
|
||||
compress: false
|
||||
},
|
||||
files: { 'tmp/js/vendor.js': ['tmp/js/vendor.js'] }
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
options: {
|
||||
interrupt: true,
|
||||
debounceDelay: 500
|
||||
},
|
||||
styles: {
|
||||
files: 'app/styles/**/*.scss',
|
||||
tasks: ['sass']
|
||||
},
|
||||
indexhtml: {
|
||||
files: 'app/index.html',
|
||||
tasks: ['copy:html']
|
||||
}
|
||||
},
|
||||
electron: {
|
||||
options: {
|
||||
name: 'KeeWeb',
|
||||
dir: 'tmp/desktop/app',
|
||||
out: 'tmp/desktop',
|
||||
electronVersion: electronVersion,
|
||||
electronVersion,
|
||||
overwrite: true,
|
||||
asar: true,
|
||||
'appCopyright': `Copyright © ${year} Antelle`,
|
||||
'appVersion': pkg.version,
|
||||
'buildVersion': '<%= gitinfo.local.branch.current.shortSHA %>'
|
||||
appCopyright: `Copyright © ${year} Antelle`,
|
||||
appVersion: pkg.version,
|
||||
buildVersion: sha
|
||||
},
|
||||
linux: {
|
||||
options: {
|
||||
name: 'keeweb',
|
||||
platform: 'linux',
|
||||
arch: ['x64', 'ia32'],
|
||||
arch: 'x64',
|
||||
icon: 'graphics/icon.ico'
|
||||
}
|
||||
},
|
||||
darwin: {
|
||||
'darwin-x64': {
|
||||
options: {
|
||||
platform: 'darwin',
|
||||
arch: ['x64'],
|
||||
arch: 'x64',
|
||||
icon: 'graphics/icon.icns',
|
||||
'appBundleId': 'net.antelle.keeweb',
|
||||
'appCategoryType': 'public.app-category.productivity',
|
||||
'extendInfo': 'package/osx/extend.plist'
|
||||
appBundleId: 'net.antelle.keeweb',
|
||||
appCategoryType: 'public.app-category.productivity',
|
||||
extendInfo: 'package/osx/extend.plist'
|
||||
}
|
||||
},
|
||||
win32: {
|
||||
'darwin-arm64': {
|
||||
options: {
|
||||
platform: 'darwin',
|
||||
arch: 'arm64',
|
||||
icon: 'graphics/icon.icns',
|
||||
appBundleId: 'net.antelle.keeweb',
|
||||
appCategoryType: 'public.app-category.productivity',
|
||||
extendInfo: 'package/osx/extend.plist'
|
||||
}
|
||||
},
|
||||
'win32-x64': {
|
||||
options: {
|
||||
platform: 'win32',
|
||||
arch: ['ia32', 'x64'],
|
||||
arch: 'x64',
|
||||
icon: 'graphics/icon.ico',
|
||||
'buildVersion': pkg.version,
|
||||
'version-string': {
|
||||
'CompanyName': 'KeeWeb',
|
||||
'FileDescription': pkg.description,
|
||||
'OriginalFilename': 'KeeWeb.exe',
|
||||
'ProductName': 'KeeWeb',
|
||||
'InternalName': 'KeeWeb'
|
||||
buildVersion: pkg.version,
|
||||
'version-string': windowsAppVersionString
|
||||
}
|
||||
},
|
||||
'win32-ia32': {
|
||||
options: {
|
||||
platform: 'win32',
|
||||
arch: 'ia32',
|
||||
icon: 'graphics/icon.ico',
|
||||
buildVersion: pkg.version,
|
||||
'version-string': windowsAppVersionString
|
||||
}
|
||||
},
|
||||
'win32-arm64': {
|
||||
options: {
|
||||
platform: 'win32',
|
||||
arch: 'arm64',
|
||||
icon: 'graphics/icon.ico',
|
||||
buildVersion: pkg.version,
|
||||
'version-string': windowsAppVersionString
|
||||
}
|
||||
}
|
||||
},
|
||||
'electron-builder': {
|
||||
linux: {
|
||||
options: {
|
||||
publish: 'never',
|
||||
targets: 'linux',
|
||||
prepackaged: 'tmp/desktop/keeweb-linux-x64',
|
||||
config: {
|
||||
appId: 'net.antelle.keeweb',
|
||||
productName: 'keeweb',
|
||||
copyright: `Copyright © ${year} Antelle`,
|
||||
directories: {
|
||||
output: 'tmp/desktop/electron-builder',
|
||||
app: 'desktop',
|
||||
buildResources: 'graphics'
|
||||
},
|
||||
fileAssociations: {
|
||||
ext: 'kdbx',
|
||||
name: 'KeePass 2 database',
|
||||
mimeType: 'application/x-keepass2'
|
||||
},
|
||||
linux: {
|
||||
target: ['AppImage', 'snap', 'rpm'],
|
||||
category: 'Utility'
|
||||
},
|
||||
rpm: {
|
||||
// depends: linuxDependencies
|
||||
},
|
||||
snap: {
|
||||
stagePackages: linuxDependencies
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
codesign: {
|
||||
app: {
|
||||
options: {
|
||||
identity: 'app',
|
||||
deep: true
|
||||
},
|
||||
src: ['tmp/desktop/KeeWeb-darwin-x64/KeeWeb.app']
|
||||
'electron-patch': {
|
||||
'win32-x64': 'tmp/desktop/KeeWeb-win32-x64/KeeWeb.exe',
|
||||
'win32-ia32': 'tmp/desktop/KeeWeb-win32-ia32/KeeWeb.exe',
|
||||
'win32-arm64': 'tmp/desktop/KeeWeb-win32-arm64/KeeWeb.exe',
|
||||
'darwin-x64': 'tmp/desktop/KeeWeb-darwin-x64/KeeWeb.app',
|
||||
'darwin-arm64': 'tmp/desktop/KeeWeb-darwin-arm64/KeeWeb.app',
|
||||
'linux': 'tmp/desktop/KeeWeb-linux-x64/keeweb'
|
||||
},
|
||||
osacompile: {
|
||||
options: {
|
||||
language: 'JavaScript'
|
||||
},
|
||||
dmg: {
|
||||
options: {
|
||||
identity: 'app'
|
||||
},
|
||||
src: [`dist/desktop/KeeWeb-${pkg.version}.mac.dmg`]
|
||||
installer: {
|
||||
files: {
|
||||
'tmp/desktop/KeeWeb Installer.app': 'package/osx/installer.js'
|
||||
}
|
||||
}
|
||||
},
|
||||
compress: {
|
||||
options: {
|
||||
level: 6
|
||||
},
|
||||
'desktop-update': {
|
||||
options: { archive: 'dist/desktop/UpdateDesktop.zip', comment: zipCommentPlaceholder },
|
||||
files: [
|
||||
{ cwd: 'tmp/desktop/update', src: '**', expand: true, nonull: true }
|
||||
]
|
||||
},
|
||||
'win32-x64': {
|
||||
options: { archive: `dist/desktop/KeeWeb-${pkg.version}.win.x64.zip` },
|
||||
files: [{ cwd: 'tmp/desktop/KeeWeb-win32-x64', src: '**', expand: true }]
|
||||
@@ -341,39 +502,33 @@ module.exports = function(grunt) {
|
||||
options: { archive: `dist/desktop/KeeWeb-${pkg.version}.win.ia32.zip` },
|
||||
files: [{ cwd: 'tmp/desktop/KeeWeb-win32-ia32', src: '**', expand: true }]
|
||||
},
|
||||
'win32-arm64': {
|
||||
options: { archive: `dist/desktop/KeeWeb-${pkg.version}.win.arm64.zip` },
|
||||
files: [{ cwd: 'tmp/desktop/KeeWeb-win32-arm64', src: '**', expand: true }]
|
||||
},
|
||||
'linux-x64': {
|
||||
options: { archive: `dist/desktop/KeeWeb-${pkg.version}.linux.x64.zip` },
|
||||
files: [{ cwd: 'tmp/desktop/KeeWeb-linux-x64', src: '**', expand: true },
|
||||
{ cwd: 'graphics', src: '128x128.png', nonull: true, expand: true }]
|
||||
},
|
||||
'linux-ia32': {
|
||||
options: { archive: `dist/desktop/KeeWeb-${pkg.version}.linux.ia32.zip` },
|
||||
files: [{ cwd: 'tmp/desktop/KeeWeb-linux-ia32', src: '**', expand: true },
|
||||
{ cwd: 'graphics', src: '128x128.png', nonull: true, expand: true }]
|
||||
files: [
|
||||
{ cwd: 'tmp/desktop/keeweb-linux-x64', src: '**', expand: true },
|
||||
{ cwd: 'graphics', src: '128x128.png', nonull: true, expand: true }
|
||||
]
|
||||
}
|
||||
},
|
||||
appdmg: {
|
||||
options: {
|
||||
title: 'KeeWeb',
|
||||
icon: 'graphics/icon.icns',
|
||||
background: 'graphics/background.png',
|
||||
'background-color': '#E0E6F9',
|
||||
'icon-size': 80,
|
||||
window: { size: { width: 658, height: 498 } },
|
||||
contents: [
|
||||
{ x: 438, y: 344, type: 'link', path: '/Applications' },
|
||||
{ x: 192, y: 344, type: 'file', path: 'tmp/desktop/KeeWeb-darwin-x64/KeeWeb.app' }
|
||||
]
|
||||
x64: {
|
||||
options: appdmgOptions('x64'),
|
||||
dest: `dist/desktop/KeeWeb-${pkg.version}.mac.x64.dmg`
|
||||
},
|
||||
app: {
|
||||
dest: `dist/desktop/KeeWeb-${pkg.version}.mac.dmg`
|
||||
arm64: {
|
||||
options: appdmgOptions('arm64'),
|
||||
dest: `dist/desktop/KeeWeb-${pkg.version}.mac.arm64.dmg`
|
||||
}
|
||||
},
|
||||
nsis: {
|
||||
options: {
|
||||
vars: {
|
||||
version: pkg.version,
|
||||
rev: function() { return grunt.config.get('gitinfo.local.branch.current.shortSHA'); },
|
||||
rev: sha,
|
||||
homepage: pkg.homepage
|
||||
}
|
||||
},
|
||||
@@ -404,6 +559,28 @@ module.exports = function(grunt) {
|
||||
arch: 'ia32',
|
||||
output: 'tmp/desktop/KeeWeb-win32-ia32/uninst.exe'
|
||||
}
|
||||
},
|
||||
'win32-arm64': {
|
||||
options: {
|
||||
installScript: 'package/nsis/main.nsi',
|
||||
arch: 'arm64',
|
||||
output: 'tmp/desktop/KeeWeb.win.arm64.exe'
|
||||
}
|
||||
},
|
||||
'win32-un-arm64': {
|
||||
options: {
|
||||
installScript: 'package/nsis/main-un.nsi',
|
||||
arch: 'arm64',
|
||||
output: 'tmp/desktop/KeeWeb-win32-arm64/uninst.exe'
|
||||
}
|
||||
}
|
||||
},
|
||||
chmod: {
|
||||
'linux-desktop-x64': {
|
||||
options: {
|
||||
mode: '4755'
|
||||
},
|
||||
src: ['tmp/desktop/keeweb-linux-x64/chrome-sandbox']
|
||||
}
|
||||
},
|
||||
deb: {
|
||||
@@ -415,7 +592,7 @@ module.exports = function(grunt) {
|
||||
description: pkg.description,
|
||||
author: pkg.author,
|
||||
homepage: pkg.homepage,
|
||||
rev: function() { return grunt.config.get('gitinfo.local.branch.current.shortSHA'); }
|
||||
rev: sha
|
||||
}
|
||||
},
|
||||
'linux-x64': {
|
||||
@@ -425,7 +602,7 @@ module.exports = function(grunt) {
|
||||
pkgName: `KeeWeb-${pkg.version}.linux.x64.deb`,
|
||||
targetDir: 'dist/desktop',
|
||||
appName: 'KeeWeb',
|
||||
depends: 'libappindicator1, libgconf2-4',
|
||||
depends: linuxDependencies.join(', '),
|
||||
scripts: {
|
||||
postinst: 'package/deb/scripts/postinst'
|
||||
}
|
||||
@@ -433,82 +610,86 @@ module.exports = function(grunt) {
|
||||
},
|
||||
files: [
|
||||
{ cwd: 'package/deb/usr', src: '**', dest: '/usr', expand: true, nonull: true },
|
||||
{ cwd: 'tmp/desktop/KeeWeb-linux-x64/', src: '**', dest: '/opt/keeweb-desktop', expand: true, nonull: true },
|
||||
{ src: 'graphics/128x128.png', dest: '/usr/share/icons/hicolor/128x128/apps/keeweb.png', nonull: true }
|
||||
{
|
||||
cwd: 'tmp/desktop/keeweb-linux-x64/',
|
||||
src: '**',
|
||||
dest: '/usr/share/keeweb-desktop',
|
||||
expand: true,
|
||||
nonull: true
|
||||
},
|
||||
{
|
||||
src: 'graphics/128x128.png',
|
||||
dest: '/usr/share/icons/hicolor/128x128/apps/keeweb.png',
|
||||
nonull: true
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
'osx-sign': {
|
||||
options: {
|
||||
get identity() {
|
||||
return getCodeSignConfig().identities.app;
|
||||
},
|
||||
hardenedRuntime: true,
|
||||
entitlements: 'package/osx/entitlements.plist',
|
||||
'entitlements-inherit': 'package/osx/entitlements-inherit.plist',
|
||||
'gatekeeper-assess': false
|
||||
},
|
||||
'linux-ia32': {
|
||||
'desktop-x64': {
|
||||
options: {
|
||||
info: {
|
||||
arch: 'i386',
|
||||
pkgName: `KeeWeb-${pkg.version}.linux.ia32.deb`,
|
||||
targetDir: 'dist/desktop',
|
||||
appName: 'KeeWeb',
|
||||
depends: 'libappindicator1, libgconf2-4',
|
||||
scripts: {
|
||||
postinst: 'package/deb/scripts/postinst'
|
||||
}
|
||||
}
|
||||
'provisioning-profile': './keys/keeweb.provisionprofile'
|
||||
},
|
||||
files: [
|
||||
{ cwd: 'package/deb/usr', src: '**', dest: '/usr', expand: true, nonull: true },
|
||||
{ cwd: 'tmp/desktop/KeeWeb-linux-ia32/', src: '**', dest: '/opt/keeweb-desktop', expand: true, nonull: true },
|
||||
{ src: 'graphics/128x128.png', dest: '/usr/share/icons/hicolor/128x128/apps/keeweb.png', nonull: true }
|
||||
]
|
||||
src: 'tmp/desktop/KeeWeb-darwin-x64/KeeWeb.app'
|
||||
},
|
||||
'desktop-arm64': {
|
||||
options: {
|
||||
'provisioning-profile': './keys/keeweb.provisionprofile'
|
||||
},
|
||||
src: 'tmp/desktop/KeeWeb-darwin-arm64/KeeWeb.app'
|
||||
},
|
||||
'installer': {
|
||||
src: 'tmp/desktop/KeeWeb Installer.app'
|
||||
}
|
||||
},
|
||||
'sign-archive': {
|
||||
'desktop-update': {
|
||||
options: {
|
||||
file: 'dist/desktop/UpdateDesktop.zip',
|
||||
signature: zipCommentPlaceholder
|
||||
}
|
||||
}
|
||||
},
|
||||
'sign-desktop-files': {
|
||||
'desktop-update': {
|
||||
options: {
|
||||
path: 'tmp/desktop/update'
|
||||
}
|
||||
}
|
||||
},
|
||||
'validate-desktop-update': {
|
||||
desktop: {
|
||||
options: {
|
||||
file: 'dist/desktop/UpdateDesktop.zip',
|
||||
expected: [
|
||||
'app.asar',
|
||||
'helper/darwin/KeeWebHelper',
|
||||
'helper/win32/KeeWebHelper.exe'
|
||||
],
|
||||
expectedCount: 7,
|
||||
publicKey: 'app/resources/public-key.pem'
|
||||
}
|
||||
}
|
||||
},
|
||||
'sign-html': {
|
||||
'app': {
|
||||
options: {
|
||||
file: 'dist/index.html',
|
||||
skip: grunt.option('skip-sign')
|
||||
notarize: {
|
||||
options: {
|
||||
appBundleId: 'net.antelle.keeweb',
|
||||
get appleId() {
|
||||
return getCodeSignConfig().appleId;
|
||||
},
|
||||
appleIdPassword: '@keychain:AC_PASSWORD',
|
||||
get ascProvider() {
|
||||
return getCodeSignConfig().teamId;
|
||||
}
|
||||
},
|
||||
'desktop-x64': {
|
||||
src: 'tmp/desktop/KeeWeb-darwin-x64/KeeWeb.app'
|
||||
},
|
||||
'desktop-arm64': {
|
||||
src: 'tmp/desktop/KeeWeb-darwin-arm64/KeeWeb.app'
|
||||
}
|
||||
},
|
||||
'sign-exe': {
|
||||
options: {
|
||||
spc: 'keys/keeweb.spc',
|
||||
key: '01',
|
||||
algo: 'sha256',
|
||||
url: pkg.homepage
|
||||
url: pkg.homepage,
|
||||
get windows() {
|
||||
return getCodeSignConfig().windows;
|
||||
},
|
||||
get certHash() {
|
||||
return getCodeSignConfig().microsoftCertHash;
|
||||
}
|
||||
},
|
||||
'win32-build-x64': {
|
||||
options: {
|
||||
files: {
|
||||
'tmp/desktop/KeeWeb-win32-x64/KeeWeb.exe': 'KeeWeb',
|
||||
'tmp/desktop/KeeWeb-win32-x64/keeweb-native-messaging-host.exe':
|
||||
'KeeWeb Native Messaging Host',
|
||||
'tmp/desktop/KeeWeb-win32-x64/ffmpeg.dll': '',
|
||||
'tmp/desktop/KeeWeb-win32-x64/libEGL.dll': 'ANGLE libEGL Dynamic Link Library',
|
||||
'tmp/desktop/KeeWeb-win32-x64/libGLESv2.dll': 'ANGLE libGLESv2 Dynamic Link Library',
|
||||
'tmp/desktop/KeeWeb-win32-x64/osmesa.dll': ''
|
||||
'tmp/desktop/KeeWeb-win32-x64/libEGL.dll':
|
||||
'ANGLE libEGL Dynamic Link Library',
|
||||
'tmp/desktop/KeeWeb-win32-x64/libGLESv2.dll':
|
||||
'ANGLE libGLESv2 Dynamic Link Library'
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -516,10 +697,27 @@ module.exports = function(grunt) {
|
||||
options: {
|
||||
files: {
|
||||
'tmp/desktop/KeeWeb-win32-ia32/KeeWeb.exe': 'KeeWeb',
|
||||
'tmp/desktop/KeeWeb-win32-ia32/keeweb-native-messaging-host.exe':
|
||||
'KeeWeb Native Messaging Host',
|
||||
'tmp/desktop/KeeWeb-win32-ia32/ffmpeg.dll': '',
|
||||
'tmp/desktop/KeeWeb-win32-ia32/libEGL.dll': 'ANGLE libEGL Dynamic Link Library',
|
||||
'tmp/desktop/KeeWeb-win32-ia32/libGLESv2.dll': 'ANGLE libGLESv2 Dynamic Link Library',
|
||||
'tmp/desktop/KeeWeb-win32-ia32/osmesa.dll': ''
|
||||
'tmp/desktop/KeeWeb-win32-ia32/libEGL.dll':
|
||||
'ANGLE libEGL Dynamic Link Library',
|
||||
'tmp/desktop/KeeWeb-win32-ia32/libGLESv2.dll':
|
||||
'ANGLE libGLESv2 Dynamic Link Library'
|
||||
}
|
||||
}
|
||||
},
|
||||
'win32-build-arm64': {
|
||||
options: {
|
||||
files: {
|
||||
'tmp/desktop/KeeWeb-win32-arm64/KeeWeb.exe': 'KeeWeb',
|
||||
'tmp/desktop/KeeWeb-win32-arm64/keeweb-native-messaging-host.exe':
|
||||
'KeeWeb Native Messaging Host',
|
||||
'tmp/desktop/KeeWeb-win32-arm64/ffmpeg.dll': '',
|
||||
'tmp/desktop/KeeWeb-win32-arm64/libEGL.dll':
|
||||
'ANGLE libEGL Dynamic Link Library',
|
||||
'tmp/desktop/KeeWeb-win32-arm64/libGLESv2.dll':
|
||||
'ANGLE libGLESv2 Dynamic Link Library'
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -537,6 +735,13 @@ module.exports = function(grunt) {
|
||||
}
|
||||
}
|
||||
},
|
||||
'win32-uninst-arm64': {
|
||||
options: {
|
||||
files: {
|
||||
'tmp/desktop/KeeWeb-win32-arm64/uninst.exe': 'KeeWeb Uninstaller'
|
||||
}
|
||||
}
|
||||
},
|
||||
'win32-installer-x64': {
|
||||
options: {
|
||||
files: {
|
||||
@@ -550,26 +755,40 @@ module.exports = function(grunt) {
|
||||
'tmp/desktop/KeeWeb.win.ia32.exe': 'KeeWeb Setup'
|
||||
}
|
||||
}
|
||||
},
|
||||
'win32-installer-arm64': {
|
||||
options: {
|
||||
files: {
|
||||
'tmp/desktop/KeeWeb.win.arm64.exe': 'KeeWeb Setup'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
'concurrent': {
|
||||
options: {
|
||||
logConcurrentOutput: true
|
||||
},
|
||||
'dev-server': [
|
||||
'watch:styles',
|
||||
'webpack-dev-server'
|
||||
]
|
||||
},
|
||||
'sign-dist': {
|
||||
'dist': {
|
||||
dist: {
|
||||
options: {
|
||||
sign: 'dist/desktop/Verify.sign.sha256'
|
||||
},
|
||||
files: {
|
||||
'dist/desktop/Verify.sha256': ['dist/desktop/KeeWeb-*', 'dist/desktop/UpdateDesktop.zip']
|
||||
'dist/desktop/Verify.sha256': ['dist/desktop/KeeWeb-*']
|
||||
}
|
||||
}
|
||||
},
|
||||
'run-test': {
|
||||
options: {
|
||||
headless: true
|
||||
},
|
||||
default: 'test/runner.html'
|
||||
},
|
||||
virustotal: {
|
||||
options: {
|
||||
prefix: `keeweb.v${pkg.version}-${sha}.`,
|
||||
timeout: 10 * 60 * 1000,
|
||||
get apiKey() {
|
||||
return require('./keys/virus-total.json').apiKey;
|
||||
}
|
||||
},
|
||||
html: 'dist/index.html'
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2019 Antelle
|
||||
Copyright (c) 2021 Antelle https://antelle.net
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
@@ -5,22 +5,22 @@ The app can run either in browser, or as a desktop app.
|
||||
|
||||

|
||||
|
||||
# Quick Links
|
||||
## Quick Links
|
||||
|
||||
Apps: [Web](https://app.keeweb.info/), [Desktop](https://github.com/keeweb/keeweb/releases/latest)
|
||||
Timeline: [Release Notes](release-notes.md), [TODO](https://github.com/keeweb/keeweb/wiki/TODO)
|
||||
On one page: [Features](https://keeweb.info/#features), [FAQ](https://github.com/keeweb/keeweb/wiki/FAQ)
|
||||
Website: [keeweb.info](https://keeweb.info)
|
||||
Twitter: [kee_web](https://twitter.com/kee_web)
|
||||
Donate: [OpenCollective](https://opencollective.com/keeweb#support), [GitHub](https://github.com/sponsors/antelle)
|
||||
|
||||
# Status
|
||||
## Status
|
||||
|
||||
The app is already rather stable, so basic stuff should work.
|
||||
Project roadmap with planned features and approximate schedule is on [TODO](https://github.com/keeweb/keeweb/wiki/TODO) page.
|
||||
The app is quite stable now. Basic stuff, as well as more advanced operations, should be rather reliable.
|
||||
|
||||
# Self-hosting
|
||||
## Self-hosting
|
||||
|
||||
Everything you need to host this app on your server is any static file server. The app is a single HTML file + cache manifest (optionally; for offline access).
|
||||
Everything you need to host this app on your server is any static file server. The app is a single HTML file + a service worker (optionally; for offline access).
|
||||
You can download the latest distribution files from [gh-pages](https://github.com/keeweb/keeweb/archive/gh-pages.zip) branch.
|
||||
|
||||
If you are using Docker:
|
||||
@@ -33,47 +33,68 @@ docker run --name keeweb -d -p 443:443 -p 80:80 -v $EXT_DIR:/etc/nginx/external/
|
||||
|
||||
To make Dropbox work in your self-hosted app, [go to this Wiki page](https://github.com/keeweb/keeweb/wiki/Dropbox-and-GDrive).
|
||||
|
||||
# Building
|
||||
## Building
|
||||
|
||||
The easiest way to clone all KeeWeb repos is:
|
||||
```bash
|
||||
curl https://raw.githubusercontent.com/keeweb/keeweb/develop/dev-env.sh | bash -
|
||||
```
|
||||
|
||||
The app can be built with grunt: `grunt` (html file will be in `dist/`).
|
||||
Desktop apps are built with `grunt desktop`. This works only in macOS as it builds dmg; requires wine.
|
||||
Also, a hardware token is required.
|
||||
To run Electron app without building an installer, build the app with `grunt` and start it this way:
|
||||
The app can be built with grunt: `grunt` (html files will be in `dist/`).
|
||||
Desktop apps are built with `grunt desktop`. This requires some magic and currently works only on CI,
|
||||
you can find more details in [the GitHub Actions workflow](.github/workflows/build.yaml).
|
||||
|
||||
To run the desktop (electron) app without building an installer, build the app with `grunt` and start it this way:
|
||||
```bash
|
||||
grunt dev
|
||||
npm run-script electron
|
||||
npm run dev
|
||||
npm run electron
|
||||
```
|
||||
|
||||
For debug build:
|
||||
|
||||
1. run `grunt dev`
|
||||
2. open `http://localhost:8085/tmp`
|
||||
1. run `npm run dev`
|
||||
2. open `http://localhost:8085`
|
||||
|
||||
# Contributing
|
||||
To build desktop apps, use these goals, the result can be found in `tmp`:
|
||||
|
||||
```
|
||||
npm run dev-desktop-macos
|
||||
npm run dev-desktop-windows
|
||||
npm run dev-desktop-linux
|
||||
```
|
||||
|
||||
## Contributing
|
||||
|
||||
Please read contribution guidelines [for pull requests](.github/PULL_REQUEST_TEMPLATE.md).
|
||||
Here's a [list of issues](https://github.com/keeweb/keeweb/labels/help%20wanted) where your help would be very welcome.
|
||||
Also you can help by [translating KeeWeb](https://keeweb.oneskyapp.com) to your language.
|
||||
|
||||
### Important notes for pull requests
|
||||
Other ways of contribution can be found [on this page](CONTRIBUTING.md).
|
||||
|
||||
#### Important notes for pull requests
|
||||
|
||||
- please branch from `develop`, not `master`
|
||||
- don't edit translation files except base.json, they will be replaced
|
||||
|
||||
# Donations
|
||||
## Donations
|
||||
|
||||
KeeWeb is not free to develop. It takes time, requires paid code signing certificates and domains.
|
||||
You can help the project or say "thank you" with this button:
|
||||
[<img src="img/paypal-donate.png" alt="Donate with PayPal" width="100">](https://www.paypal.me/dvitkovsky)
|
||||
[<img src="https://opencollective.com/keeweb/tiers/backer.svg?avatarHeight=42&width=880" alt="OpenCollective">](https://opencollective.com/keeweb#support)
|
||||
|
||||
You can also sponsor the developer directly [on GitHub](https://github.com/sponsors/antelle).
|
||||
|
||||
Please note: donation does not imply any type of service contract.
|
||||
|
||||
## Thank you
|
||||
|
||||
# License
|
||||
Notable contributions to KeeWeb:
|
||||
|
||||
- Florian Reuschel ([@Loilo](https://github.com/Loilo)): [German translation](https://keeweb.oneskyapp.com/collaboration/translate/project/project/173183/language/550)
|
||||
- Dennis Ploeger ([@dploeger](https://github.com/dploeger)): [auto-type improvements](https://github.com/keeweb/keeweb/pulls?q=is%3Apr+is%3Aclosed+author%3Adploeger)
|
||||
- Hackmanit ([hackmanit.de](https://www.hackmanit.de)): [penetration test](https://www.hackmanit.de/en/blog-en/104-pro-bono-penetration-test-keeweb)
|
||||
- Peter Bittner ([@bittner](https://github.com/bittner)): [Wikipedia article](https://en.wikipedia.org/wiki/KeeWeb)
|
||||
|
||||
## License
|
||||
|
||||
[MIT](https://github.com/keeweb/keeweb/blob/master/LICENSE)
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
# Security Policy
|
||||
|
||||
## Supported Versions
|
||||
|
||||
Only the latest version of the product is supported. This version can be accessed at https://app.keeweb.info
|
||||
and downloaded from https://keeweb.info or GitHub releases ([latest release link](https://github.com/keeweb/keeweb/releases/latest)).
|
||||
|
||||
## Reporting a Vulnerability
|
||||
|
||||
We would appreciate [responsible disclosure](https://en.wikipedia.org/wiki/Responsible_disclosure).
|
||||
If you would like to report a vulnerability, the preferred way to do so is [contacting the developer directly](mailto:antelle.net@gmail.com).
|
||||
@@ -0,0 +1,28 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>Not Found</title>
|
||||
<style>
|
||||
body {
|
||||
font-family: -apple-system, 'BlinkMacSystemFont', 'Raleway', 'Helvetica Neue',
|
||||
'Helvetica', 'Arial', sans-serif;
|
||||
font-feature-settings: 'liga' 0;
|
||||
text-align: center;
|
||||
background: #f5f5f5;
|
||||
font-weight: 300;
|
||||
}
|
||||
h1 {
|
||||
font-size: 3em;
|
||||
margin-top: 10vh;
|
||||
}
|
||||
p {
|
||||
line-height: 1.5em;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>404 Not Found</h1>
|
||||
<p>Sorry, the page you're looking for was not found.</p>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,16 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>KeeWeb</title>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
window.opener.postMessage(
|
||||
{ storage: 'dropbox', search: location.search },
|
||||
window.location.origin
|
||||
);
|
||||
window.close();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,16 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>KeeWeb</title>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
window.opener.postMessage(
|
||||
{ storage: 'gdrive', search: location.search },
|
||||
window.location.origin
|
||||
);
|
||||
window.close();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,16 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>KeeWeb</title>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
window.opener.postMessage(
|
||||
{ storage: 'teams', search: location.search },
|
||||
window.location.origin
|
||||
);
|
||||
window.close();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,16 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>KeeWeb</title>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
window.opener.postMessage(
|
||||
{ storage: 'onedrive', search: location.search },
|
||||
window.location.origin
|
||||
);
|
||||
window.close();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
Before Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 9.0 KiB After Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 61 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 685 B |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 6.3 KiB |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 1.7 KiB |
@@ -1 +1 @@
|
||||
<svg version="1" xmlns="http://www.w3.org/2000/svg" width="922.667" height="922.667" viewBox="0 0 692.000000 692.000000"><path d="M266.9 57.4c-.2.2-4 .6-8.3 1-4.4.4-8.2.8-8.5 1-.3.2-2.7.7-5.3 1-5.5.7-21.6 4.8-29.8 7.5-46.3 15.4-93.3 48.9-126.5 90.1-25.7 31.8-46.8 74.8-52.9 107.4-.5 2.8-1.5 8.3-2.1 12.1-1.9 11.6-2.6 35.9-1.3 45 .3 2.7.9 7 1.2 9.5 3.3 27.4 16.9 55.4 36.1 74.5 12.1 12.1 27.3 22.7 40 27.8 3.9 1.6 7.9 3.3 9 3.7 1.1.5 4.3 1.5 7 2.4 4.4 1.3 7.1 1.9 18.5 4.1 12.1 2.4 42.4 2.4 56.5 0 1.7-.3 4.4-.7 6-1 1.7-.3 4.1-.7 5.5-1 1.4-.3 3.7-.7 5.1-1 4.5-.8 19.1-5.2 28.4-8.6 16.8-6.1 42.9-20.2 59.4-32.2l5.3-3.9 130.7 130.5C567.7 654 571.7 657.8 577.5 660c6.2 2.2 15.3 2.9 21.4 1.6 12.8-2.7 27.8-15.7 34.7-30.1 2.5-5.3 2.9-7.1 2.9-15-.1-15.8 1.1-14.3-49.6-65.1l-44-44 18.1-18.2 18.1-18.1 6.7 7.1c20.7 21.9 32.6 32.8 38.6 35.3 5.6 2.4 11.5-1.2 26.5-15.8 16.1-15.8 21.8-23.8 20-28.6-.9-2.3-4.6-7.8-7.4-10.7-.5-.6-4.1-4.8-8-9.2-7.2-8.3-64.7-65.9-91-91.1-8.2-7.9-16-14.7-17.3-15.2-6.8-2.6-12.6.8-28.4 16.3-13.1 12.9-19.8 21.8-19.8 26.3 0 5.6 13.3 21 37.4 43.4l5.8 5.4-18.1 18.1-18.1 18.1-67-67c-36.9-36.8-67-67.3-67-67.7 0-.4 3-5.1 6.7-10.4 16.1-23.5 30.3-53.8 35.8-76.4.7-2.8 4.3-22.5 5.3-28.5 1.1-6.5.8-41.1-.3-48.5-1.4-9.2-6.4-26.8-10-35.3-9.9-23.3-28.4-44.9-50.5-58.8-21.8-13.8-47.4-20.5-78.6-20.7-7.3-.1-13.3 0-13.5.2zm22 74c12.1 2.8 22.6 7.6 31.1 14.4 13.3 10.7 23.7 27.4 26.3 42.7 6 34.4-9.5 65.3-40.5 80.7-16.1 7.9-40.9 8.5-58.1 1.3-4.4-1.8-5.2-1.9-4-.3 1.1 1.4 4 9.8 4.8 13.9 5.3 25.7-.6 47.7-17.7 66-8.9 9.6-19.7 16.4-31.3 19.8-9.7 2.9-11.7 3.1-22.2 3.2-24.8 0-47.2-12.3-61-33.3-15.4-23.7-15.3-56.4.4-79.3 11.1-16.2 26.6-27.1 44.3-31.1 14.4-3.2 32.9-1.7 43.9 3.7 2 .9 3.7 1.6 3.8 1.5.2-.2-.8-3.4-2.2-7.3-3.4-9.7-3.7-11.4-4-23.3-.4-17.1 3.8-30.7 13.8-44 11.4-15.2 26.5-24.8 44.7-28.4 6.2-1.2 22.9-1.4 27.9-.2z"/></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="-64 -64 640 640"><path d="M136.736 512c-4.892-.008-10.322-2.061-15.92-4.997-11.941-6.265-20.13-14.185-13.293-27.218l166.101-316.638c-1.972-1.022-3.619-1.88-4.743-2.469-59.892-31.418-86.463-77.87-64.952-118.877 24.726-47.135 101.304-55.69 171.042-19.107 69.738 36.584 106.227 104.451 81.501 151.586-21.264 40.536-76.784 44.151-132.61 14.866-1.538-.807-4.033-2.103-6.857-3.567L150.768 502.471c-3.632 6.924-8.488 9.538-14.032 9.529zm-30.582-67.835l-3.144-1.649-.7-.366-42.546-22.32v-.001l-10.256-5.38c-1.738-.911-2.407-3.057-1.496-4.794l13.465-25.667c.906-1.728 3.036-2.399 4.768-1.509l.028.013 20.513 10.761c1.736.911 3.883.241 4.794-1.496l13.466-25.667c.911-1.737.24-3.883-1.497-4.794l-10.256-5.382-10.256-5.38c-1.737-.911-2.406-3.057-1.495-4.794l13.464-25.669c.911-1.737 3.058-2.406 4.794-1.494l10.258 5.38 26.697 14.005 16.548 8.681c.007.003.014.007.021.011l3.125 1.639-14.142 26.957-.973 1.855c0 .001-.001.003-.002.004l-20.063 38.245-2.041 3.888-11.424 21.779c-.002.004-.005.009-.008.014zm67.232-128.162l-3.145-1.651-14.938-7.837-11.794-6.187c-1.737-.911-2.408-3.057-1.497-4.794l13.466-25.667c.911-1.737 3.058-2.408 4.794-1.497l11.795 6.188 14.939 7.837c.007.003.014.007.021.01l3.125 1.64-1.651 3.145-6.731 12.834-6.733 12.833c-.003.005-.006.008-.009.013zm219.778-151.914c8.857.016 15.784-3.552 20.386-12.326 14.027-26.737-11.92-67.987-57.953-92.135-46.032-24.148-94.719-22.049-108.746 4.688-14.026 26.737 24.987 44.293 71.02 68.441 30.928 16.224 57.156 31.296 75.293 31.332z"/></svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 1013 KiB |
|
After Width: | Height: | Size: 960 KiB |
|
After Width: | Height: | Size: 1.0 MiB |
|
After Width: | Height: | Size: 1.1 MiB |
|
After Width: | Height: | Size: 1.5 MiB |
|
After Width: | Height: | Size: 322 KiB |
|
After Width: | Height: | Size: 408 KiB |
@@ -1,30 +1,85 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head lang="en">
|
||||
<meta charset="UTF-8">
|
||||
<title>KeeWeb</title>
|
||||
<meta name="application-name" content="KeeWeb">
|
||||
<meta name="kw-signature" content="">
|
||||
<meta name="kw-config" content="(no-config)">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
||||
<link rel="manifest" href="manifest.json">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="icons/apple-touch-icon.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="icons/favicon-32x32.png">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="icons/favicon-16x16.png">
|
||||
<link rel="mask-icon" href="icons/safari-pinned-tab.svg" color="#6386ec">
|
||||
<meta name="msapplication-config" content="browserconfig.xml">
|
||||
<meta name="msapplication-TileColor" content="#6386ec">
|
||||
<meta name="theme-color" content="#6386ec">
|
||||
<link rel="stylesheet" href="css/main.css?__inline=true" />
|
||||
<script src="js/vendor.js?__inline=true"></script>
|
||||
<script src="js/app.js?__inline=true"></script>
|
||||
<script src="js/runtime.js?__inline=true"></script>
|
||||
</head>
|
||||
<body class="th-d">
|
||||
<noscript>
|
||||
<h1>KeeWeb</h1>
|
||||
<p>KeeWeb is a password manager written in JavaScript. Please enable JavaScript to run it.</p>
|
||||
</noscript>
|
||||
</body>
|
||||
<head lang="en">
|
||||
<meta charset="UTF-8" />
|
||||
<title>KeeWeb</title>
|
||||
<meta
|
||||
http-equiv="Content-Security-Policy"
|
||||
content="
|
||||
default-src 'self';
|
||||
font-src data:;
|
||||
script-src 'self' 'unsafe-eval';
|
||||
style-src 'self' blob:;
|
||||
connect-src 'self' ws: https:;
|
||||
child-src 'self' blob:;
|
||||
worker-src 'self' blob:;
|
||||
img-src 'self' data: blob: https://services.keeweb.info/;
|
||||
object-src 'none';
|
||||
form-action 'none';
|
||||
"
|
||||
/>
|
||||
<meta name="application-name" content="KeeWeb" />
|
||||
<meta name="kw-config" content="(no-config)" />
|
||||
<meta
|
||||
name="viewport"
|
||||
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"
|
||||
/>
|
||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
|
||||
<meta name="apple-mobile-web-app-title" content="KeeWeb" />
|
||||
<meta name="theme-color" content="#6386ec" />
|
||||
<meta name="msapplication-config" content="browserconfig.xml" />
|
||||
<meta name="msapplication-TileColor" content="#6386ec" />
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="icons/apple-touch-icon.png" />
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="icons/favicon-32x32.png" />
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="icons/favicon-16x16.png" />
|
||||
<link rel="mask-icon" href="icons/safari-pinned-tab.svg" color="#6386ec" />
|
||||
<link
|
||||
rel="apple-touch-startup-image"
|
||||
href="icons/splash-640x1136.png"
|
||||
media="(device-width: 320px) and (device-height: 568px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)"
|
||||
/>
|
||||
<link
|
||||
rel="apple-touch-startup-image"
|
||||
href="icons/splash-750x1294.png"
|
||||
media="(device-width: 375px) and (device-height: 667px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)"
|
||||
/>
|
||||
<link
|
||||
rel="apple-touch-startup-image"
|
||||
href="icons/splash-1242x2148.png"
|
||||
media="(device-width: 414px) and (device-height: 736px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)"
|
||||
/>
|
||||
<link
|
||||
rel="apple-touch-startup-image"
|
||||
href="icons/splash-1125x2436.png"
|
||||
media="(device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)"
|
||||
/>
|
||||
<link
|
||||
rel="apple-touch-startup-image"
|
||||
href="icons/splash-1536x2048.png"
|
||||
media="(min-device-width: 768px) and (max-device-width: 1024px) and (-webkit-min-device-pixel-ratio: 2) and (orientation: portrait)"
|
||||
/>
|
||||
<link
|
||||
rel="apple-touch-startup-image"
|
||||
href="icons/splash-1668x2224.png"
|
||||
media="(min-device-width: 834px) and (max-device-width: 834px) and (-webkit-min-device-pixel-ratio: 2) and (orientation: portrait)"
|
||||
/>
|
||||
<link
|
||||
rel="apple-touch-startup-image"
|
||||
href="icons/splash-2048x2732.png"
|
||||
media="(min-device-width: 1024px) and (max-device-width: 1024px) and (-webkit-min-device-pixel-ratio: 2) and (orientation: portrait)"
|
||||
/>
|
||||
<link rel="manifest" href="manifest.json" />
|
||||
<link rel="stylesheet" href="css/app.css?__inline=true" />
|
||||
<script src="js/app.js?__inline=true"></script>
|
||||
</head>
|
||||
<body class="th-d">
|
||||
<noscript>
|
||||
<h1>KeeWeb</h1>
|
||||
<p>
|
||||
KeeWeb is a password manager written in JavaScript. Please enable JavaScript to run
|
||||
it.
|
||||
</p>
|
||||
</noscript>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
(function (global) {
|
||||
var babelHelpers = global.babelHelpers = {};
|
||||
babelHelpers.typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
|
||||
return typeof obj;
|
||||
} : function (obj) {
|
||||
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
||||
};
|
||||
|
||||
babelHelpers.defineProperty = function (obj, key, value) {
|
||||
if (key in obj) {
|
||||
Object.defineProperty(obj, key, {
|
||||
value: value,
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
writable: true
|
||||
});
|
||||
} else {
|
||||
obj[key] = value;
|
||||
}
|
||||
|
||||
return obj;
|
||||
};
|
||||
|
||||
babelHelpers.slicedToArray = function () {
|
||||
function sliceIterator(arr, i) {
|
||||
var _arr = [];
|
||||
var _n = true;
|
||||
var _d = false;
|
||||
var _e = undefined;
|
||||
|
||||
try {
|
||||
for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
|
||||
_arr.push(_s.value);
|
||||
|
||||
if (i && _arr.length === i) break;
|
||||
}
|
||||
} catch (err) {
|
||||
_d = true;
|
||||
_e = err;
|
||||
} finally {
|
||||
try {
|
||||
if (!_n && _i["return"]) _i["return"]();
|
||||
} finally {
|
||||
if (_d) throw _e;
|
||||
}
|
||||
}
|
||||
|
||||
return _arr;
|
||||
}
|
||||
|
||||
return function (arr, i) {
|
||||
if (Array.isArray(arr)) {
|
||||
return arr;
|
||||
} else if (Symbol.iterator in Object(arr)) {
|
||||
return sliceIterator(arr, i);
|
||||
} else {
|
||||
throw new TypeError("Invalid attempt to destructure non-iterable instance");
|
||||
}
|
||||
};
|
||||
}();
|
||||
|
||||
babelHelpers.toConsumableArray = function (arr) {
|
||||
if (Array.isArray(arr)) {
|
||||
for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];
|
||||
|
||||
return arr2;
|
||||
} else {
|
||||
return Array.from(arr);
|
||||
}
|
||||
};
|
||||
})(typeof global === "undefined" ? self : global);
|
||||
@@ -1,10 +0,0 @@
|
||||
CACHE MANIFEST
|
||||
|
||||
# YYYY-MM-DD:v0.0.0
|
||||
# updmin:v0.0.0
|
||||
|
||||
CACHE:
|
||||
index.html
|
||||
|
||||
NETWORK:
|
||||
*
|
||||
@@ -1,21 +1,21 @@
|
||||
{
|
||||
"name": "KeeWeb",
|
||||
"short_name": "KeeWeb",
|
||||
"description": "Free cross-platform password manager compatible with KeePass",
|
||||
"display": "standalone",
|
||||
"orientation": "any",
|
||||
"theme_color": "#6386ec",
|
||||
"background_color": "#6386ec",
|
||||
"icons": [
|
||||
{
|
||||
"src": "icons/android-chrome-192x192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "icons/android-chrome-512x512.png",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png"
|
||||
}
|
||||
]
|
||||
"name": "KeeWeb",
|
||||
"short_name": "KeeWeb",
|
||||
"description": "Free cross-platform password manager compatible with KeePass",
|
||||
"start_url": "./",
|
||||
"display": "standalone",
|
||||
"theme_color": "#6386ec",
|
||||
"background_color": "#6386ec",
|
||||
"icons": [
|
||||
{
|
||||
"src": "icons/android-chrome-192x192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "icons/android-chrome-512x512.png",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
-----BEGIN PUBLIC KEY-----
|
||||
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyZAmWXMpKsh9WCyUO5TR
|
||||
2/QIJsgyaViWRAgY5nHZhTR/sjhfG97OeurW7NYC4XPsnyJDepEjDsj9LNzquMES
|
||||
xsLRSmxo+m1lVWn8Q59LwqOvUK+BKH4eZYF89Nwv2HZjZnr/w7xYcxJbhOuAzpbq
|
||||
FD/gAvlozrsHG9uI95h1FHPd6mfolEHLK30LXPQ5FdJ/AWb29ILKYbVEdM8qsjoN
|
||||
fSICw7XTbd7wB0TMcgRpjWllzKaftxCO38svhBjAz4cUvtZ05yi4dzK0VsJHfW33
|
||||
uno3YBn0/bwLkqMzD1/Hv05p6CVzuDTOCBsXkEobra8OBviatoSukot6cS4Famki
|
||||
9QIDAQAB
|
||||
-----END PUBLIC KEY-----
|
||||
@@ -1,9 +1,9 @@
|
||||
-----BEGIN PUBLIC KEY-----
|
||||
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0oZB2Kt7AzRFNqf8FuO3
|
||||
C3kepHPAIQYiDPYdQxHcsiaFCwyKVx6K1cE/3vBhb8/2rj+QIIWNfAAuu1Y+2VK9
|
||||
0ZBeq6HciukWzQRO/HWhfdy0c7JwDAslmyGI5olj0ZQkNLhkde1MiMxjDPpRhZtd
|
||||
JaryVO5cFJaJESpv3dV6m0qXsaQCluWYOSNfSjP9C8o2zRVjSi3ZQZnZIV5pnk9K
|
||||
2MtlZIPXrN9iJiM5zZ9DTSnqApI6dC9mX4R3LvGN+GTovm9C8Crl+qb106nGRR3L
|
||||
cweicDnPyMtZLa/E0DBpWYxUVLDp6WeLhxoUBr+6+t3Xp9IDnPoANDQXJXD0f1vQ
|
||||
xQIDAQAB
|
||||
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnRq2k3TTx0ewTe6wDr6Q
|
||||
VeB5diwiIWzsJD+ApfZu1KNPedcAgslAfjpNsYF1if6cYsPMJH70xJ2np6RQBl1V
|
||||
PdwShOuxkD7m0BD5Hw/Aar8Hdp5cvAdOOMdBO+0DbGeUMy+z66s+oUCJmqVp19T6
|
||||
PkkxbhN08rgtT7v+aFvrbqbO/vlsskbJpH2K2io+e1XmRGPnSr9q4KSqfGbTfe5g
|
||||
LwDIOFd66Z4mb5Utb5wWpsy6Gjh06Yf257AccGD3A1bkTNOyeeX0tqciYBePWMk0
|
||||
icP/aZ6hnErfhnUKf3tOgPLppSHiGcaSKekhChZ2xLUs3U64JwrXSmwHj+TzdO3S
|
||||
0QIDAQAB
|
||||
-----END PUBLIC KEY-----
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"rules": {
|
||||
"import/no-commonjs": "error"
|
||||
}
|
||||
}
|
||||
@@ -1,84 +1,105 @@
|
||||
const Backbone = require('backbone');
|
||||
const AppModel = require('./models/app-model');
|
||||
const AppView = require('./views/app-view');
|
||||
const AppSettingsModel = require('./models/app-settings-model');
|
||||
const UpdateModel = require('./models/update-model');
|
||||
const RuntimeDataModel = require('./models/runtime-data-model');
|
||||
const FileInfoCollection = require('./collections/file-info-collection');
|
||||
const KeyHandler = require('./comp/key-handler');
|
||||
const IdleTracker = require('./comp/idle-tracker');
|
||||
const PopupNotifier = require('./comp/popup-notifier');
|
||||
const SingleInstanceChecker = require('./comp/single-instance-checker');
|
||||
const AppRightsChecker = require('./comp/app-rights-checker');
|
||||
const CookieManager = require('./comp/cookie-manager');
|
||||
const Alerts = require('./comp/alerts');
|
||||
const Updater = require('./comp/updater');
|
||||
const AuthReceiver = require('./comp/auth-receiver');
|
||||
const ExportApi = require('./comp/export-api');
|
||||
const SettingsManager = require('./comp/settings-manager');
|
||||
const PluginManager = require('./plugins/plugin-manager');
|
||||
const Launcher = require('./comp/launcher');
|
||||
const FeatureTester = require('./comp/feature-tester');
|
||||
const Timeouts = require('./const/timeouts');
|
||||
const FeatureDetector = require('./util/feature-detector');
|
||||
const KdbxwebInit = require('./util/kdbxweb-init');
|
||||
const Locale = require('./util/locale');
|
||||
import { Events } from 'framework/events';
|
||||
import { StartProfiler } from 'comp/app/start-profiler';
|
||||
import { FileInfoCollection } from 'collections/file-info-collection';
|
||||
import { AppRightsChecker } from 'comp/app/app-rights-checker';
|
||||
import { ExportApi } from 'comp/app/export-api';
|
||||
import { SingleInstanceChecker } from 'comp/app/single-instance-checker';
|
||||
import { Updater } from 'comp/app/updater';
|
||||
import { UsbListener } from 'comp/app/usb-listener';
|
||||
import { BrowserExtensionConnector } from 'comp/extension/browser-extension-connector';
|
||||
import { FeatureTester } from 'comp/browser/feature-tester';
|
||||
import { FocusDetector } from 'comp/browser/focus-detector';
|
||||
import { IdleTracker } from 'comp/browser/idle-tracker';
|
||||
import { ThemeWatcher } from 'comp/browser/theme-watcher';
|
||||
import { KeyHandler } from 'comp/browser/key-handler';
|
||||
import { PopupNotifier } from 'comp/browser/popup-notifier';
|
||||
import { Launcher } from 'comp/launcher';
|
||||
import { SettingsManager } from 'comp/settings/settings-manager';
|
||||
import { Alerts } from 'comp/ui/alerts';
|
||||
import { Timeouts } from 'const/timeouts';
|
||||
import { AppModel } from 'models/app-model';
|
||||
import { AppSettingsModel } from 'models/app-settings-model';
|
||||
import { RuntimeDataModel } from 'models/runtime-data-model';
|
||||
import { UpdateModel } from 'models/update-model';
|
||||
import { PluginManager } from 'plugins/plugin-manager';
|
||||
import { Features } from 'util/features';
|
||||
import { KdbxwebInit } from 'util/kdbxweb/kdbxweb-init';
|
||||
import { Locale } from 'util/locale';
|
||||
import { AppView } from 'views/app-view';
|
||||
import 'hbs-helpers';
|
||||
import { AutoType } from './auto-type';
|
||||
import { Storage } from './storage';
|
||||
|
||||
const ready = Launcher && Launcher.ready || $;
|
||||
StartProfiler.milestone('loading modules');
|
||||
|
||||
const ready = (Launcher && Launcher.ready) || $;
|
||||
|
||||
ready(() => {
|
||||
if (FeatureDetector.isPopup && AuthReceiver.receive() || FeatureDetector.isFrame) {
|
||||
return;
|
||||
}
|
||||
loadMixins();
|
||||
StartProfiler.milestone('document ready');
|
||||
|
||||
const appModel = new AppModel();
|
||||
StartProfiler.milestone('creating app model');
|
||||
|
||||
Promise.resolve()
|
||||
.then(loadConfigs)
|
||||
.then(initModules)
|
||||
.then(loadRemoteConfig)
|
||||
.then(ensureCanRun)
|
||||
.then(initStorage)
|
||||
.then(initUsbListener)
|
||||
.then(showApp)
|
||||
.then(postInit)
|
||||
.catch(e => {
|
||||
.catch((e) => {
|
||||
appModel.appLogger.error('Error starting app', e);
|
||||
});
|
||||
|
||||
function loadMixins() {
|
||||
require('./mixins/view');
|
||||
require('./helpers');
|
||||
}
|
||||
|
||||
function ensureCanRun() {
|
||||
if (Features.isFrame && !appModel.settings.allowIframes) {
|
||||
return Promise.reject(
|
||||
'Running in iframe is not allowed (this can be changed in the app config).'
|
||||
);
|
||||
}
|
||||
return FeatureTester.test()
|
||||
.catch(e => {
|
||||
.catch((e) => {
|
||||
Alerts.error({
|
||||
header: Locale.appSettingsError,
|
||||
body: Locale.appNotSupportedError + '<br/><br/>' + e,
|
||||
body: Locale.appNotSupportedError,
|
||||
pre: e,
|
||||
buttons: [],
|
||||
esc: false, enter: false, click: false
|
||||
esc: false,
|
||||
enter: false,
|
||||
click: false
|
||||
});
|
||||
throw 'Feature testing failed: ' + e;
|
||||
})
|
||||
.then(() => {
|
||||
StartProfiler.milestone('checking features');
|
||||
});
|
||||
}
|
||||
|
||||
function loadConfigs() {
|
||||
return Promise.all([
|
||||
AppSettingsModel.instance.load(),
|
||||
UpdateModel.instance.load(),
|
||||
RuntimeDataModel.instance.load(),
|
||||
FileInfoCollection.instance.load()
|
||||
]);
|
||||
AppSettingsModel.load(),
|
||||
UpdateModel.load(),
|
||||
RuntimeDataModel.load(),
|
||||
FileInfoCollection.load()
|
||||
]).then(() => {
|
||||
StartProfiler.milestone('loading configs');
|
||||
});
|
||||
}
|
||||
|
||||
function initModules() {
|
||||
KeyHandler.init();
|
||||
IdleTracker.init();
|
||||
PopupNotifier.init();
|
||||
KdbxwebInit.init();
|
||||
FocusDetector.init();
|
||||
AutoType.init();
|
||||
ThemeWatcher.init();
|
||||
SettingsManager.init();
|
||||
window.kw = ExportApi;
|
||||
return PluginManager.init();
|
||||
return PluginManager.init().then(() => {
|
||||
StartProfiler.milestone('initializing modules');
|
||||
});
|
||||
}
|
||||
|
||||
function showSettingsLoadError() {
|
||||
@@ -86,71 +107,96 @@ ready(() => {
|
||||
header: Locale.appSettingsError,
|
||||
body: Locale.appSettingsErrorBody,
|
||||
buttons: [],
|
||||
esc: false, enter: false, click: false
|
||||
esc: false,
|
||||
enter: false,
|
||||
click: false
|
||||
});
|
||||
}
|
||||
|
||||
function loadRemoteConfig() {
|
||||
return Promise.resolve()
|
||||
.then(() => {
|
||||
SettingsManager.setBySettings();
|
||||
const configParam = getConfigParam();
|
||||
if (configParam) {
|
||||
return appModel
|
||||
.loadConfig(configParam)
|
||||
.then(() => {
|
||||
SettingsManager.setBySettings();
|
||||
})
|
||||
.catch((e) => {
|
||||
if (!appModel.settings.cacheConfigSettings) {
|
||||
showSettingsLoadError();
|
||||
throw e;
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
.then(() => {
|
||||
StartProfiler.milestone('loading remote config');
|
||||
});
|
||||
}
|
||||
|
||||
function initStorage() {
|
||||
for (const prv of Object.values(Storage)) {
|
||||
prv.init();
|
||||
}
|
||||
StartProfiler.milestone('initializing storage');
|
||||
}
|
||||
|
||||
function initUsbListener() {
|
||||
UsbListener.init();
|
||||
StartProfiler.milestone('starting usb');
|
||||
}
|
||||
|
||||
function showApp() {
|
||||
return Promise.resolve().then(() => {
|
||||
SettingsManager.setBySettings(appModel.settings);
|
||||
const configParam = getConfigParam();
|
||||
if (configParam) {
|
||||
return appModel.loadConfig(configParam).then(() => {
|
||||
SettingsManager.setBySettings(appModel.settings);
|
||||
}).catch(e => {
|
||||
if (!appModel.settings.get('cacheConfigSettings')) {
|
||||
showSettingsLoadError();
|
||||
throw e;
|
||||
}
|
||||
const skipHttpsWarning =
|
||||
localStorage.skipHttpsWarning || appModel.settings.skipHttpsWarning;
|
||||
const protocolIsInsecure = ['https:', 'file:', 'app:'].indexOf(location.protocol) < 0;
|
||||
const hostIsInsecure = location.hostname !== 'localhost';
|
||||
if (protocolIsInsecure && hostIsInsecure && !skipHttpsWarning) {
|
||||
return new Promise((resolve) => {
|
||||
Alerts.error({
|
||||
header: Locale.appSecWarn,
|
||||
icon: 'user-secret',
|
||||
esc: false,
|
||||
enter: false,
|
||||
click: false,
|
||||
body: Locale.appSecWarnBody1 + '\n\n' + Locale.appSecWarnBody2,
|
||||
buttons: [{ result: '', title: Locale.appSecWarnBtn, error: true }],
|
||||
complete: () => {
|
||||
showView();
|
||||
resolve();
|
||||
}
|
||||
});
|
||||
});
|
||||
} else {
|
||||
showView();
|
||||
return new Promise((resolve) => requestAnimationFrame(resolve));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function showApp() {
|
||||
return Promise.resolve()
|
||||
.then(() => {
|
||||
const skipHttpsWarning = localStorage.skipHttpsWarning || appModel.settings.get('skipHttpsWarning');
|
||||
const protocolIsInsecure = ['https:', 'file:', 'app:'].indexOf(location.protocol) < 0;
|
||||
const hostIsInsecure = location.hostname !== 'localhost';
|
||||
if (protocolIsInsecure && hostIsInsecure && !skipHttpsWarning) {
|
||||
return new Promise(resolve => {
|
||||
Alerts.error({
|
||||
header: Locale.appSecWarn, icon: 'user-secret', esc: false, enter: false, click: false,
|
||||
body: Locale.appSecWarnBody1 + '<br/><br/>' + Locale.appSecWarnBody2,
|
||||
buttons: [
|
||||
{result: '', title: Locale.appSecWarnBtn, error: true}
|
||||
],
|
||||
complete: () => {
|
||||
showView();
|
||||
resolve();
|
||||
}
|
||||
});
|
||||
});
|
||||
} else {
|
||||
showView();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function postInit() {
|
||||
Updater.init();
|
||||
SingleInstanceChecker.init();
|
||||
AppRightsChecker.init();
|
||||
CookieManager.init();
|
||||
setTimeout(() => PluginManager.runAutoUpdate(), Timeouts.AutoUpdatePluginsAfterStart);
|
||||
setTimeout(() => {
|
||||
Updater.init();
|
||||
SingleInstanceChecker.init();
|
||||
AppRightsChecker.init();
|
||||
IdleTracker.init();
|
||||
BrowserExtensionConnector.init(appModel);
|
||||
PluginManager.runAutoUpdate();
|
||||
}, Timeouts.AutoUpdatePluginsAfterStart);
|
||||
}
|
||||
|
||||
function showView() {
|
||||
appModel.prepare();
|
||||
new AppView({ model: appModel }).render();
|
||||
Backbone.trigger('app-ready');
|
||||
logStartupTime();
|
||||
}
|
||||
new AppView(appModel).render();
|
||||
StartProfiler.milestone('first view rendering');
|
||||
|
||||
function logStartupTime() {
|
||||
const time = Math.round(performance.now());
|
||||
appModel.appLogger.info(`Started in ${time}ms ¯\\_(ツ)_/¯`);
|
||||
Events.emit('app-ready');
|
||||
StartProfiler.milestone('app ready event');
|
||||
|
||||
StartProfiler.report();
|
||||
}
|
||||
|
||||
function getConfigParam() {
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
const Launcher = require('../comp/launcher');
|
||||
|
||||
const AutoTypeEmitterFactory = {
|
||||
create: function(callback) {
|
||||
if (Launcher && Launcher.autoTypeSupported) {
|
||||
const AutoTypeEmitter = require('./emitter/auto-type-emitter-' + Launcher.platform());
|
||||
return new AutoTypeEmitter(callback);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = AutoTypeEmitterFactory;
|
||||
@@ -0,0 +1,160 @@
|
||||
import { Features } from 'util/features';
|
||||
import { NativeModules } from 'comp/launcher/native-modules';
|
||||
import { Logger } from 'util/logger';
|
||||
import { Launcher } from 'comp/launcher';
|
||||
import { Timeouts } from 'const/timeouts';
|
||||
|
||||
const logger = new Logger('auto-type-emitter');
|
||||
|
||||
const KeyMap = {
|
||||
tab: 'Tab',
|
||||
enter: 'Return',
|
||||
space: 'Space',
|
||||
up: 'UpArrow',
|
||||
down: 'DownArrow',
|
||||
left: 'LeftArrow',
|
||||
right: 'RightArrow',
|
||||
home: 'Home',
|
||||
end: 'End',
|
||||
pgup: 'PageUp',
|
||||
pgdn: 'PageDown',
|
||||
ins: 'Insert',
|
||||
del: 'ForwardDelete',
|
||||
bs: 'BackwardDelete',
|
||||
esc: 'Escape',
|
||||
win: 'Meta',
|
||||
rwin: 'RightMeta',
|
||||
f1: 'F1',
|
||||
f2: 'F2',
|
||||
f3: 'F3',
|
||||
f4: 'F4',
|
||||
f5: 'F5',
|
||||
f6: 'F6',
|
||||
f7: 'F7',
|
||||
f8: 'F8',
|
||||
f9: 'F9',
|
||||
f10: 'F10',
|
||||
f11: 'F11',
|
||||
f12: 'F12',
|
||||
f13: 'F13',
|
||||
f14: 'F14',
|
||||
f15: 'F15',
|
||||
f16: 'F16',
|
||||
add: 'KeypadPlus',
|
||||
subtract: 'KeypadMinus',
|
||||
multiply: 'KeypadMultiply',
|
||||
divide: 'KeypadDivide',
|
||||
n0: 'D0',
|
||||
n1: 'D1',
|
||||
n2: 'D2',
|
||||
n3: 'D3',
|
||||
n4: 'D4',
|
||||
n5: 'D5',
|
||||
n6: 'D6',
|
||||
n7: 'D7',
|
||||
n8: 'D8',
|
||||
n9: 'D9'
|
||||
};
|
||||
|
||||
const ModMap = {
|
||||
'^': Features.isMac ? 'Command' : 'Ctrl',
|
||||
'+': 'Shift',
|
||||
'%': 'Alt',
|
||||
'^^': 'Ctrl'
|
||||
};
|
||||
|
||||
class AutoTypeEmitter {
|
||||
constructor(callback) {
|
||||
this.callback = callback;
|
||||
this.mod = {};
|
||||
}
|
||||
|
||||
begin() {
|
||||
this.withCallback(NativeModules.kbdEnsureModifierNotPressed());
|
||||
}
|
||||
|
||||
setMod(mod, enabled) {
|
||||
const nativeMod = ModMap[mod];
|
||||
if (!nativeMod) {
|
||||
return this.callback(`Bad modifier: ${mod}`);
|
||||
}
|
||||
NativeModules.kbdKeyMoveWithModifier(!!enabled, [nativeMod]).catch((e) => {
|
||||
logger.error('Error moving modifier', mod, enabled ? 'down' : 'up', e);
|
||||
});
|
||||
if (enabled) {
|
||||
this.mod[nativeMod] = true;
|
||||
} else {
|
||||
delete this.mod[nativeMod];
|
||||
}
|
||||
}
|
||||
|
||||
text(str) {
|
||||
if (!str) {
|
||||
return this.withCallback(Promise.resolve());
|
||||
}
|
||||
const mods = Object.keys(this.mod);
|
||||
if (mods.length) {
|
||||
this.withCallback(NativeModules.kbdTextAsKeys(str, mods));
|
||||
} else {
|
||||
this.withCallback(NativeModules.kbdText(str));
|
||||
}
|
||||
}
|
||||
|
||||
key(key) {
|
||||
const mods = Object.keys(this.mod);
|
||||
if (typeof key === 'number') {
|
||||
this.withCallback(NativeModules.kbdKeyPressWithCharacter(0, key, mods));
|
||||
} else {
|
||||
if (!KeyMap[key]) {
|
||||
return this.callback('Bad key: ' + key);
|
||||
}
|
||||
const code = KeyMap[key];
|
||||
this.withCallback(NativeModules.kbdKeyPress(code, mods));
|
||||
}
|
||||
}
|
||||
|
||||
copyPaste(text) {
|
||||
setTimeout(() => {
|
||||
Launcher.setClipboardText(text);
|
||||
setTimeout(() => {
|
||||
this.withCallback(NativeModules.kbdShortcut('V'));
|
||||
}, Timeouts.AutoTypeCopyPaste);
|
||||
}, Timeouts.AutoTypeCopyPaste);
|
||||
}
|
||||
|
||||
wait(time) {
|
||||
setTimeout(() => this.withCallback(Promise.resolve()), time);
|
||||
}
|
||||
|
||||
waitComplete() {
|
||||
this.withCallback(Promise.resolve());
|
||||
}
|
||||
|
||||
setDelay() {
|
||||
this.callback('Not implemented');
|
||||
}
|
||||
|
||||
withCallback(promise) {
|
||||
promise
|
||||
.then(() => {
|
||||
try {
|
||||
this.callback();
|
||||
} catch (err) {
|
||||
logger.error('Callback error', err);
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
const keyPressFailed = err.message === 'Key press failed';
|
||||
if (keyPressFailed) {
|
||||
err.keyPressFailed = true;
|
||||
}
|
||||
try {
|
||||
this.callback(err);
|
||||
} catch (err) {
|
||||
logger.error('Callback error', err);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
export { AutoTypeEmitter };
|
||||
@@ -1,99 +0,0 @@
|
||||
const EntryCollection = require('../collections/entry-collection');
|
||||
|
||||
const urlPartsRegex = /^(\w+:\/\/)?(?:(?:www|wwws|secure)\.)?([^\/]+)\/?(.*)/;
|
||||
|
||||
const AutoTypeFilter = function(windowInfo, appModel) {
|
||||
this.title = windowInfo.title;
|
||||
this.url = windowInfo.url;
|
||||
this.text = '';
|
||||
this.ignoreWindowInfo = false;
|
||||
this.appModel = appModel;
|
||||
};
|
||||
|
||||
AutoTypeFilter.prototype.getEntries = function() {
|
||||
const filter = {
|
||||
text: this.text,
|
||||
autoType: true
|
||||
};
|
||||
this.prepareFilter();
|
||||
let entries = this.appModel.getEntriesByFilter(filter)
|
||||
.map(e => [e, this.getEntryRank(e)]);
|
||||
if (!this.ignoreWindowInfo) {
|
||||
entries = entries.filter(e => e[1]);
|
||||
}
|
||||
entries = entries.sort((x, y) => x[1] === y[1] ? x[0].title.localeCompare(y[0].title) : y[1] - x[1]);
|
||||
entries = entries.map(p => p[0]);
|
||||
return new EntryCollection(entries, {comparator: 'none'});
|
||||
};
|
||||
|
||||
AutoTypeFilter.prototype.hasWindowInfo = function() {
|
||||
return this.title || this.url;
|
||||
};
|
||||
|
||||
AutoTypeFilter.prototype.prepareFilter = function() {
|
||||
this.titleLower = this.title ? this.title.toLowerCase() : null;
|
||||
this.urlLower = this.url ? this.url.toLowerCase() : null;
|
||||
this.urlParts = this.url ? urlPartsRegex.exec(this.urlLower) : null;
|
||||
};
|
||||
|
||||
AutoTypeFilter.prototype.getEntryRank = function(entry) {
|
||||
let rank = 0;
|
||||
if (this.titleLower && entry.title) {
|
||||
rank += this.getStringRank(entry.title.toLowerCase(), this.titleLower);
|
||||
}
|
||||
if (this.urlParts && entry.url) {
|
||||
const entryUrlParts = urlPartsRegex.exec(entry.url.toLowerCase());
|
||||
if (entryUrlParts) {
|
||||
const [, scheme, domain, path] = entryUrlParts;
|
||||
const [, thisScheme, thisDomain, thisPath] = this.urlParts;
|
||||
if (domain === thisDomain || thisDomain.indexOf('.' + domain) > 0) {
|
||||
if (domain === thisDomain) {
|
||||
rank += 20;
|
||||
} else {
|
||||
rank += 10;
|
||||
}
|
||||
if (path === thisPath) {
|
||||
rank += 10;
|
||||
} else if (path && thisPath) {
|
||||
if (path.lastIndexOf(thisPath, 0) === 0) {
|
||||
rank += 5;
|
||||
} else if (thisPath.lastIndexOf(path, 0) === 0) {
|
||||
rank += 3;
|
||||
}
|
||||
}
|
||||
if (scheme === thisScheme) {
|
||||
rank += 1;
|
||||
}
|
||||
} else {
|
||||
if (entry.searchText.indexOf(this.urlLower) >= 0) {
|
||||
// the url is in some field; include it
|
||||
rank += 5;
|
||||
} else {
|
||||
// another domain; don't show this record at all, ignore title match
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return rank;
|
||||
};
|
||||
|
||||
AutoTypeFilter.prototype.getStringRank = function(s1, s2) {
|
||||
let ix = s1.indexOf(s2);
|
||||
if (ix === 0 && s1.length === s2.length) {
|
||||
return 10;
|
||||
} else if (ix === 0) {
|
||||
return 5;
|
||||
} else if (ix > 0) {
|
||||
return 3;
|
||||
}
|
||||
ix = s2.indexOf(s1);
|
||||
if (ix === 0) {
|
||||
return 5;
|
||||
} else if (ix > 0) {
|
||||
return 3;
|
||||
}
|
||||
return 0;
|
||||
};
|
||||
|
||||
module.exports = AutoTypeFilter;
|
||||
@@ -1,13 +0,0 @@
|
||||
const Launcher = require('../comp/launcher');
|
||||
|
||||
const AutoTypeHelperFactory = {
|
||||
create: function() {
|
||||
if (Launcher && Launcher.autoTypeSupported) {
|
||||
const AutoTypeHelper = require('./helper/auto-type-helper-' + Launcher.platform());
|
||||
return new AutoTypeHelper();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = AutoTypeHelperFactory;
|
||||
@@ -0,0 +1,16 @@
|
||||
import { NativeModules } from 'comp/launcher/native-modules';
|
||||
|
||||
class AutoTypeHelper {
|
||||
getActiveWindowInfo(callback) {
|
||||
NativeModules.kbdGetActiveWindow({
|
||||
getWindowTitle: true,
|
||||
getBrowserUrl: true
|
||||
})
|
||||
.then((win) => {
|
||||
callback(undefined, win);
|
||||
})
|
||||
.catch((err) => callback(err));
|
||||
}
|
||||
}
|
||||
|
||||
export { AutoTypeHelper };
|
||||
@@ -1,14 +1,17 @@
|
||||
const Logger = require('../util/logger');
|
||||
import { Logger } from 'util/logger';
|
||||
|
||||
const logger = new Logger('auto-type-obfuscator');
|
||||
logger.setLevel(localStorage.autoTypeDebug ? Logger.Level.All : Logger.Level.Warn);
|
||||
const logger = new Logger(
|
||||
'auto-type-obfuscator',
|
||||
undefined,
|
||||
localStorage.debugAutoType ? Logger.Level.All : Logger.Level.Warn
|
||||
);
|
||||
|
||||
const MaxFakeOps = 30;
|
||||
const MaxSteps = 1000;
|
||||
const MaxCopy = 2;
|
||||
const FakeCharAlphabet = 'ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnpqrstuvwxyz123456789O0oIl';
|
||||
|
||||
const AutoTypeObfuscator = function(chars) {
|
||||
const AutoTypeObfuscator = function (chars) {
|
||||
this.chars = chars;
|
||||
this.inputChars = [];
|
||||
this.inputCursor = 0;
|
||||
@@ -18,7 +21,7 @@ const AutoTypeObfuscator = function(chars) {
|
||||
this.copyCount = 0;
|
||||
};
|
||||
|
||||
AutoTypeObfuscator.prototype.obfuscate = function() {
|
||||
AutoTypeObfuscator.prototype.obfuscate = function () {
|
||||
while (!this.finished()) {
|
||||
this.step();
|
||||
if (this.stepCount++ > MaxSteps) {
|
||||
@@ -32,12 +35,16 @@ AutoTypeObfuscator.prototype.obfuscate = function() {
|
||||
return this.ops;
|
||||
};
|
||||
|
||||
AutoTypeObfuscator.prototype.finished = function() {
|
||||
return this.chars.length === this.inputChars.length &&
|
||||
this.chars.every(function(ch, ix) { return this.inputChars[ix].ch === ch; }, this);
|
||||
AutoTypeObfuscator.prototype.finished = function () {
|
||||
return (
|
||||
this.chars.length === this.inputChars.length &&
|
||||
this.chars.every(function (ch, ix) {
|
||||
return this.inputChars[ix].ch === ch;
|
||||
}, this)
|
||||
);
|
||||
};
|
||||
|
||||
AutoTypeObfuscator.prototype.step = function() {
|
||||
AutoTypeObfuscator.prototype.step = function () {
|
||||
const isFake = this.stepCount < MaxFakeOps && Math.random() > this.stepCount / MaxFakeOps;
|
||||
if (isFake) {
|
||||
this.stepFake();
|
||||
@@ -45,11 +52,11 @@ AutoTypeObfuscator.prototype.step = function() {
|
||||
this.stepReal();
|
||||
}
|
||||
if (logger.getLevel() >= Logger.Level.Debug) {
|
||||
logger.debug('value', this.inputChars.map(ic => ic.ch).join(''));
|
||||
logger.debug('value', this.inputChars.map((ic) => ic.ch).join(''));
|
||||
}
|
||||
};
|
||||
|
||||
AutoTypeObfuscator.prototype.stepFake = function() {
|
||||
AutoTypeObfuscator.prototype.stepFake = function () {
|
||||
const pos = Math.floor(Math.random() * (this.inputChars.length + 1));
|
||||
const ch = FakeCharAlphabet[Math.floor(Math.random() * FakeCharAlphabet.length)];
|
||||
logger.info('step.fake', pos, ch);
|
||||
@@ -78,7 +85,7 @@ AutoTypeObfuscator.prototype.stepFake = function() {
|
||||
}
|
||||
};
|
||||
|
||||
AutoTypeObfuscator.prototype.stepReal = function() {
|
||||
AutoTypeObfuscator.prototype.stepReal = function () {
|
||||
const possibleActions = [];
|
||||
const inputRealPositions = [];
|
||||
let i;
|
||||
@@ -106,7 +113,7 @@ AutoTypeObfuscator.prototype.stepReal = function() {
|
||||
break;
|
||||
}
|
||||
}
|
||||
possibleActions.push({ ins: true, ch: this.chars[i], ix: i, from: from, to: to });
|
||||
possibleActions.push({ ins: true, ch: this.chars[i], ix: i, from, to });
|
||||
}
|
||||
}
|
||||
const action = possibleActions[Math.floor(Math.random() * possibleActions.length)];
|
||||
@@ -127,7 +134,7 @@ AutoTypeObfuscator.prototype.stepReal = function() {
|
||||
}
|
||||
};
|
||||
|
||||
AutoTypeObfuscator.prototype.moveToPos = function(pos) {
|
||||
AutoTypeObfuscator.prototype.moveToPos = function (pos) {
|
||||
logger.debug('moveToPos', pos);
|
||||
while (this.inputCursor > pos) {
|
||||
this.moveLeft();
|
||||
@@ -137,47 +144,47 @@ AutoTypeObfuscator.prototype.moveToPos = function(pos) {
|
||||
}
|
||||
};
|
||||
|
||||
AutoTypeObfuscator.prototype.moveLeft = function() {
|
||||
AutoTypeObfuscator.prototype.moveLeft = function () {
|
||||
logger.debug('moveLeft');
|
||||
this.ops.push({ type: 'key', value: 'left' });
|
||||
this.inputCursor--;
|
||||
this.inputSel = 0;
|
||||
};
|
||||
|
||||
AutoTypeObfuscator.prototype.moveRight = function() {
|
||||
AutoTypeObfuscator.prototype.moveRight = function () {
|
||||
logger.debug('moveRight');
|
||||
this.ops.push({ type: 'key', value: 'right' });
|
||||
this.inputCursor++;
|
||||
this.inputSel = 0;
|
||||
};
|
||||
|
||||
AutoTypeObfuscator.prototype.inputChar = function(ch) {
|
||||
AutoTypeObfuscator.prototype.inputChar = function (ch) {
|
||||
logger.debug('inputChar', ch);
|
||||
this.ops.push({ type: 'text', value: ch });
|
||||
this.inputChars.splice(this.inputCursor, this.inputSel, { ch: ch });
|
||||
this.inputChars.splice(this.inputCursor, this.inputSel, { ch });
|
||||
this.inputCursor++;
|
||||
this.inputSel = 0;
|
||||
};
|
||||
|
||||
AutoTypeObfuscator.prototype.copyPaste = function(ch) {
|
||||
AutoTypeObfuscator.prototype.copyPaste = function (ch) {
|
||||
logger.debug('copyPaste', ch);
|
||||
this.ops.push({type: 'cmd', value: 'copyPaste', arg: ch});
|
||||
this.inputChars.splice(this.inputCursor, this.inputSel, { ch: ch });
|
||||
this.ops.push({ type: 'cmd', value: 'copyPaste', arg: ch });
|
||||
this.inputChars.splice(this.inputCursor, this.inputSel, { ch });
|
||||
this.inputCursor++;
|
||||
this.inputSel = 0;
|
||||
};
|
||||
|
||||
AutoTypeObfuscator.prototype.selectText = function(backward, count) {
|
||||
AutoTypeObfuscator.prototype.selectText = function (backward, count) {
|
||||
logger.debug('selectText', backward ? 'left' : 'right', count);
|
||||
const ops = [];
|
||||
for (let i = 0; i < count; i++) {
|
||||
ops.push({ type: 'key', value: backward ? 'left' : 'right' });
|
||||
}
|
||||
if (ops.length === 1) {
|
||||
ops[0].mod = {'+': true};
|
||||
ops[0].mod = { '+': true };
|
||||
this.ops.push(ops[0]);
|
||||
} else {
|
||||
this.ops.push({type: 'group', value: ops, mod: {'+': true}});
|
||||
this.ops.push({ type: 'group', value: ops, mod: { '+': true } });
|
||||
}
|
||||
if (backward) {
|
||||
this.inputCursor -= count;
|
||||
@@ -185,7 +192,7 @@ AutoTypeObfuscator.prototype.selectText = function(backward, count) {
|
||||
this.inputSel = count;
|
||||
};
|
||||
|
||||
AutoTypeObfuscator.prototype.deleteText = function(backward) {
|
||||
AutoTypeObfuscator.prototype.deleteText = function (backward) {
|
||||
logger.debug('deleteText', backward ? 'left' : 'right');
|
||||
this.ops.push({ type: 'key', value: backward ? 'bs' : 'del' });
|
||||
if (this.inputSel) {
|
||||
@@ -199,4 +206,4 @@ AutoTypeObfuscator.prototype.deleteText = function(backward) {
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = AutoTypeObfuscator;
|
||||
export { AutoTypeObfuscator };
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const AutoTypeRunner = require('./auto-type-runner');
|
||||
import { AutoTypeRunner } from 'auto-type/auto-type-runner';
|
||||
|
||||
const AutoTypeParser = function(sequence) {
|
||||
const AutoTypeParser = function (sequence) {
|
||||
this.sequence = sequence;
|
||||
this.ix = 0;
|
||||
this.states = [];
|
||||
@@ -8,7 +8,7 @@ const AutoTypeParser = function(sequence) {
|
||||
|
||||
AutoTypeParser.opRegex = /^(.*?)(?:([\s:=])[\s:=]*(.*))?$/;
|
||||
|
||||
AutoTypeParser.prototype.parse = function() {
|
||||
AutoTypeParser.prototype.parse = function () {
|
||||
const len = this.sequence.length;
|
||||
this.pushState();
|
||||
while (this.ix < len) {
|
||||
@@ -45,14 +45,14 @@ AutoTypeParser.prototype.parse = function() {
|
||||
return new AutoTypeRunner(this.state().ops);
|
||||
};
|
||||
|
||||
AutoTypeParser.prototype.pushState = function() {
|
||||
AutoTypeParser.prototype.pushState = function () {
|
||||
this.states.unshift({
|
||||
modifiers: null,
|
||||
ops: []
|
||||
});
|
||||
};
|
||||
|
||||
AutoTypeParser.prototype.popState = function() {
|
||||
AutoTypeParser.prototype.popState = function () {
|
||||
if (this.states.length <= 1) {
|
||||
throw 'Unexpected ")" at index ' + this.ix;
|
||||
}
|
||||
@@ -60,11 +60,11 @@ AutoTypeParser.prototype.popState = function() {
|
||||
this.addState(state);
|
||||
};
|
||||
|
||||
AutoTypeParser.prototype.state = function() {
|
||||
AutoTypeParser.prototype.state = function () {
|
||||
return this.states[0];
|
||||
};
|
||||
|
||||
AutoTypeParser.prototype.readOp = function() {
|
||||
AutoTypeParser.prototype.readOp = function () {
|
||||
const toIx = this.sequence.indexOf('}', this.ix + 2);
|
||||
if (toIx < 0) {
|
||||
throw 'Mismatched "{" at index ' + this.ix;
|
||||
@@ -79,7 +79,7 @@ AutoTypeParser.prototype.readOp = function() {
|
||||
this.addOp(op, sep, arg);
|
||||
};
|
||||
|
||||
AutoTypeParser.prototype.readModifier = function(modifier) {
|
||||
AutoTypeParser.prototype.readModifier = function (modifier) {
|
||||
const state = this.state();
|
||||
if (!state.modifiers) {
|
||||
state.modifiers = {};
|
||||
@@ -91,14 +91,14 @@ AutoTypeParser.prototype.readModifier = function(modifier) {
|
||||
state.modifiers[modifier] = true;
|
||||
};
|
||||
|
||||
AutoTypeParser.prototype.resetModifiers = function() {
|
||||
AutoTypeParser.prototype.resetModifiers = function () {
|
||||
const state = this.state();
|
||||
const modifiers = state.modifiers;
|
||||
state.modifiers = null;
|
||||
return modifiers;
|
||||
};
|
||||
|
||||
AutoTypeParser.prototype.addState = function(state) {
|
||||
AutoTypeParser.prototype.addState = function (state) {
|
||||
this.state().ops.push({
|
||||
type: 'group',
|
||||
value: state.ops,
|
||||
@@ -106,7 +106,7 @@ AutoTypeParser.prototype.addState = function(state) {
|
||||
});
|
||||
};
|
||||
|
||||
AutoTypeParser.prototype.addChar = function(ch) {
|
||||
AutoTypeParser.prototype.addChar = function (ch) {
|
||||
this.state().ops.push({
|
||||
type: 'text',
|
||||
value: ch,
|
||||
@@ -114,14 +114,14 @@ AutoTypeParser.prototype.addChar = function(ch) {
|
||||
});
|
||||
};
|
||||
|
||||
AutoTypeParser.prototype.addOp = function(op, sep, arg) {
|
||||
AutoTypeParser.prototype.addOp = function (op, sep, arg) {
|
||||
this.state().ops.push({
|
||||
type: 'op',
|
||||
value: op,
|
||||
mod: this.resetModifiers(),
|
||||
sep: sep,
|
||||
arg: arg
|
||||
sep,
|
||||
arg
|
||||
});
|
||||
};
|
||||
|
||||
module.exports = AutoTypeParser;
|
||||
export { AutoTypeParser };
|
||||
|
||||
@@ -1,12 +1,15 @@
|
||||
const AutoTypeObfuscator = require('./auto-type-obfuscator');
|
||||
const AutoTypeEmitterFactory = require('./auto-type-emitter-factory');
|
||||
const Format = require('../util/format');
|
||||
const Logger = require('../util/logger');
|
||||
import { AutoTypeEmitter } from 'auto-type/auto-type-emitter';
|
||||
import { AutoTypeObfuscator } from 'auto-type/auto-type-obfuscator';
|
||||
import { StringFormat } from 'util/formatting/string-format';
|
||||
import { Logger } from 'util/logger';
|
||||
|
||||
const emitterLogger = new Logger('auto-type-emitter');
|
||||
emitterLogger.setLevel(localStorage.autoTypeDebug ? Logger.Level.All : Logger.Level.Warn);
|
||||
const emitterLogger = new Logger(
|
||||
'auto-type-emitter',
|
||||
undefined,
|
||||
localStorage.debugAutoType ? Logger.Level.All : Logger.Level.Info
|
||||
);
|
||||
|
||||
const AutoTypeRunner = function(ops) {
|
||||
const AutoTypeRunner = function (ops) {
|
||||
this.ops = ops;
|
||||
this.pendingResolvesCount = 0;
|
||||
this.entry = null;
|
||||
@@ -16,43 +19,132 @@ const AutoTypeRunner = function(ops) {
|
||||
AutoTypeRunner.PendingResolve = { pending: true };
|
||||
|
||||
AutoTypeRunner.Keys = {
|
||||
tab: 'tab', enter: 'enter', space: 'space',
|
||||
up: 'up', down: 'down', left: 'left', right: 'right', home: 'home', end: 'end', pgup: 'pgup', pgdn: 'pgdn',
|
||||
insert: 'ins', ins: 'ins', delete: 'del', del: 'del', backspace: 'bs', bs: 'bs', bksp: 'bs', esc: 'esc',
|
||||
win: 'win', lwin: 'win', rwin: 'rwin', f1: 'f1', f2: 'f2', f3: 'f3', f4: 'f4', f5: 'f5', f6: 'f6',
|
||||
f7: 'f7', f8: 'f8', f9: 'f9', f10: 'f10', f11: 'f11', f12: 'f12', f13: 'f13', f14: 'f14', f15: 'f15', f16: 'f16',
|
||||
add: 'add', subtract: 'subtract', multiply: 'multiply', divide: 'divide',
|
||||
numpad0: 'n0', numpad1: 'n1', numpad2: 'n2', numpad3: 'n3', numpad4: 'n4',
|
||||
numpad5: 'n5', numpad6: 'n6', numpad7: 'n7', numpad8: 'n8', numpad9: 'n9'
|
||||
tab: 'tab',
|
||||
enter: 'enter',
|
||||
space: 'space',
|
||||
up: 'up',
|
||||
down: 'down',
|
||||
left: 'left',
|
||||
right: 'right',
|
||||
home: 'home',
|
||||
end: 'end',
|
||||
pgup: 'pgup',
|
||||
pgdn: 'pgdn',
|
||||
insert: 'ins',
|
||||
ins: 'ins',
|
||||
delete: 'del',
|
||||
del: 'del',
|
||||
backspace: 'bs',
|
||||
bs: 'bs',
|
||||
bksp: 'bs',
|
||||
esc: 'esc',
|
||||
win: 'win',
|
||||
lwin: 'win',
|
||||
rwin: 'rwin',
|
||||
f1: 'f1',
|
||||
f2: 'f2',
|
||||
f3: 'f3',
|
||||
f4: 'f4',
|
||||
f5: 'f5',
|
||||
f6: 'f6',
|
||||
f7: 'f7',
|
||||
f8: 'f8',
|
||||
f9: 'f9',
|
||||
f10: 'f10',
|
||||
f11: 'f11',
|
||||
f12: 'f12',
|
||||
f13: 'f13',
|
||||
f14: 'f14',
|
||||
f15: 'f15',
|
||||
f16: 'f16',
|
||||
add: 'add',
|
||||
subtract: 'subtract',
|
||||
multiply: 'multiply',
|
||||
divide: 'divide',
|
||||
numpad0: 'n0',
|
||||
numpad1: 'n1',
|
||||
numpad2: 'n2',
|
||||
numpad3: 'n3',
|
||||
numpad4: 'n4',
|
||||
numpad5: 'n5',
|
||||
numpad6: 'n6',
|
||||
numpad7: 'n7',
|
||||
numpad8: 'n8',
|
||||
numpad9: 'n9'
|
||||
};
|
||||
|
||||
AutoTypeRunner.Substitutions = {
|
||||
title: function(runner, op) { return runner.getEntryFieldKeys('Title', op); },
|
||||
username: function(runner, op) { return runner.getEntryFieldKeys('UserName', op); },
|
||||
url: function(runner, op) { return runner.getEntryFieldKeys('URL', op); },
|
||||
password: function(runner, op) { return runner.getEntryFieldKeys('Password', op); },
|
||||
notes: function(runner, op) { return runner.getEntryFieldKeys('Notes', op); },
|
||||
group: function(runner) { return runner.getEntryGroupName(); },
|
||||
totp: function(runner, op) { return runner.getOtp(op); },
|
||||
s: function(runner, op) { return runner.getEntryFieldKeys(op.arg, op); },
|
||||
'dt_simple': function(runner) { return runner.dt('simple'); },
|
||||
'dt_year': function(runner) { return runner.dt('Y'); },
|
||||
'dt_month': function(runner) { return runner.dt('M'); },
|
||||
'dt_day': function(runner) { return runner.dt('D'); },
|
||||
'dt_hour': function(runner) { return runner.dt('h'); },
|
||||
'dt_minute': function(runner) { return runner.dt('m'); },
|
||||
'dt_second': function(runner) { return runner.dt('s'); },
|
||||
'dt_utc_simple': function(runner) { return runner.udt('simple'); },
|
||||
'dt_utc_year': function(runner) { return runner.udt('Y'); },
|
||||
'dt_utc_month': function(runner) { return runner.udt('M'); },
|
||||
'dt_utc_day': function(runner) { return runner.udt('D'); },
|
||||
'dt_utc_hour': function(runner) { return runner.udt('h'); },
|
||||
'dt_utc_minute': function(runner) { return runner.udt('m'); },
|
||||
'dt_utc_second': function(runner) { return runner.udt('s'); }
|
||||
title(runner, op) {
|
||||
return runner.getEntryFieldKeys('Title', op);
|
||||
},
|
||||
username(runner, op) {
|
||||
return runner.getEntryFieldKeys('UserName', op);
|
||||
},
|
||||
url(runner, op) {
|
||||
return runner.getEntryFieldKeys('URL', op);
|
||||
},
|
||||
password(runner, op) {
|
||||
return runner.getEntryFieldKeys('Password', op);
|
||||
},
|
||||
notes(runner, op) {
|
||||
return runner.getEntryFieldKeys('Notes', op);
|
||||
},
|
||||
group(runner) {
|
||||
return runner.getEntryGroupName();
|
||||
},
|
||||
totp(runner, op) {
|
||||
return runner.getOtp(op);
|
||||
},
|
||||
s(runner, op) {
|
||||
return runner.getEntryFieldKeys(op.arg, op);
|
||||
},
|
||||
'dt_simple'(runner) {
|
||||
return runner.dt('simple');
|
||||
},
|
||||
'dt_year'(runner) {
|
||||
return runner.dt('Y');
|
||||
},
|
||||
'dt_month'(runner) {
|
||||
return runner.dt('M');
|
||||
},
|
||||
'dt_day'(runner) {
|
||||
return runner.dt('D');
|
||||
},
|
||||
'dt_hour'(runner) {
|
||||
return runner.dt('h');
|
||||
},
|
||||
'dt_minute'(runner) {
|
||||
return runner.dt('m');
|
||||
},
|
||||
'dt_second'(runner) {
|
||||
return runner.dt('s');
|
||||
},
|
||||
'dt_utc_simple'(runner) {
|
||||
return runner.udt('simple');
|
||||
},
|
||||
'dt_utc_year'(runner) {
|
||||
return runner.udt('Y');
|
||||
},
|
||||
'dt_utc_month'(runner) {
|
||||
return runner.udt('M');
|
||||
},
|
||||
'dt_utc_day'(runner) {
|
||||
return runner.udt('D');
|
||||
},
|
||||
'dt_utc_hour'(runner) {
|
||||
return runner.udt('h');
|
||||
},
|
||||
'dt_utc_minute'(runner) {
|
||||
return runner.udt('m');
|
||||
},
|
||||
'dt_utc_second'(runner) {
|
||||
return runner.udt('s');
|
||||
}
|
||||
};
|
||||
|
||||
AutoTypeRunner.prototype.resolve = function(entry, callback) {
|
||||
AutoTypeRunner.prototype.resolve = function (entry, context, callback) {
|
||||
this.entry = entry;
|
||||
this.context = context;
|
||||
try {
|
||||
this.resolveOps(this.ops);
|
||||
if (!this.pendingResolvesCount) {
|
||||
@@ -65,7 +157,7 @@ AutoTypeRunner.prototype.resolve = function(entry, callback) {
|
||||
}
|
||||
};
|
||||
|
||||
AutoTypeRunner.prototype.resolveOps = function(ops) {
|
||||
AutoTypeRunner.prototype.resolveOps = function (ops) {
|
||||
for (let i = 0, len = ops.length; i < len; i++) {
|
||||
const op = ops[i];
|
||||
if (op.type === 'group') {
|
||||
@@ -76,7 +168,7 @@ AutoTypeRunner.prototype.resolveOps = function(ops) {
|
||||
}
|
||||
};
|
||||
|
||||
AutoTypeRunner.prototype.resolveOp = function(op) {
|
||||
AutoTypeRunner.prototype.resolveOp = function (op) {
|
||||
if (op.value.length === 1 && !op.sep) {
|
||||
// {x}
|
||||
op.type = 'text';
|
||||
@@ -103,7 +195,7 @@ AutoTypeRunner.prototype.resolveOp = function(op) {
|
||||
op.value = [];
|
||||
const count = +op.arg;
|
||||
for (let i = 0; i < count; i++) {
|
||||
op.value.push({type: 'key', value: key});
|
||||
op.value.push({ type: 'key', value: key });
|
||||
}
|
||||
} else {
|
||||
// {TAB}
|
||||
@@ -112,6 +204,11 @@ AutoTypeRunner.prototype.resolveOp = function(op) {
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (this.context?.resolved?.[lowerValue]) {
|
||||
op.type = 'text';
|
||||
op.value = this.context.resolved[lowerValue];
|
||||
return;
|
||||
}
|
||||
const substitution = AutoTypeRunner.Substitutions[lowerValue];
|
||||
if (substitution) {
|
||||
// {title}
|
||||
@@ -127,7 +224,7 @@ AutoTypeRunner.prototype.resolveOp = function(op) {
|
||||
}
|
||||
};
|
||||
|
||||
AutoTypeRunner.prototype.tryParseCommand = function(op) {
|
||||
AutoTypeRunner.prototype.tryParseCommand = function (op) {
|
||||
switch (op.value.toLowerCase()) {
|
||||
case 'clearfield':
|
||||
// {CLEARFIELD}
|
||||
@@ -142,7 +239,7 @@ AutoTypeRunner.prototype.tryParseCommand = function(op) {
|
||||
// {VKEY 10} {VKEY 0x1F}
|
||||
op.type = 'key';
|
||||
op.value = parseInt(op.arg);
|
||||
if (isNaN(op.value) || op.value <= 0) {
|
||||
if (isNaN(op.value) || op.value < 0) {
|
||||
throw 'Bad vkey: ' + op.arg;
|
||||
}
|
||||
return true;
|
||||
@@ -166,7 +263,7 @@ AutoTypeRunner.prototype.tryParseCommand = function(op) {
|
||||
}
|
||||
};
|
||||
|
||||
AutoTypeRunner.prototype.getEntryFieldKeys = function(field, op) {
|
||||
AutoTypeRunner.prototype.getEntryFieldKeys = function (field, op) {
|
||||
if (!field || !this.entry) {
|
||||
return '';
|
||||
}
|
||||
@@ -177,11 +274,11 @@ AutoTypeRunner.prototype.getEntryFieldKeys = function(field, op) {
|
||||
if (value.isProtected) {
|
||||
op.type = 'group';
|
||||
const ops = [];
|
||||
value.forEachChar(ch => {
|
||||
value.forEachChar((ch) => {
|
||||
if (ch === 10 || ch === 13) {
|
||||
ops.push({type: 'key', value: 'enter'});
|
||||
ops.push({ type: 'key', value: 'enter' });
|
||||
} else {
|
||||
ops.push({type: 'text', value: String.fromCharCode(ch)});
|
||||
ops.push({ type: 'text', value: String.fromCharCode(ch) });
|
||||
}
|
||||
});
|
||||
return ops;
|
||||
@@ -192,65 +289,79 @@ AutoTypeRunner.prototype.getEntryFieldKeys = function(field, op) {
|
||||
}
|
||||
op.type = 'group';
|
||||
const partsOps = [];
|
||||
parts.forEach(part => {
|
||||
parts.forEach((part) => {
|
||||
if (partsOps.length) {
|
||||
partsOps.push({type: 'key', value: 'enter'});
|
||||
partsOps.push({ type: 'key', value: 'enter' });
|
||||
}
|
||||
if (part) {
|
||||
partsOps.push({type: 'text', value: part});
|
||||
partsOps.push({ type: 'text', value: part });
|
||||
}
|
||||
});
|
||||
return partsOps;
|
||||
}
|
||||
};
|
||||
|
||||
AutoTypeRunner.prototype.getEntryGroupName = function() {
|
||||
return this.entry && this.entry.group.get('title');
|
||||
AutoTypeRunner.prototype.getEntryGroupName = function () {
|
||||
return this.entry && this.entry.group.title;
|
||||
};
|
||||
|
||||
AutoTypeRunner.prototype.dt = function(part) {
|
||||
AutoTypeRunner.prototype.dt = function (part) {
|
||||
switch (part) {
|
||||
case 'simple':
|
||||
return this.dt('Y') + this.dt('M') + this.dt('D') + this.dt('h') + this.dt('m') + this.dt('s');
|
||||
return (
|
||||
this.dt('Y') +
|
||||
this.dt('M') +
|
||||
this.dt('D') +
|
||||
this.dt('h') +
|
||||
this.dt('m') +
|
||||
this.dt('s')
|
||||
);
|
||||
case 'Y':
|
||||
return this.now.getFullYear().toString();
|
||||
case 'M':
|
||||
return Format.pad(this.now.getMonth() + 1, 2);
|
||||
return StringFormat.pad(this.now.getMonth() + 1, 2);
|
||||
case 'D':
|
||||
return Format.pad(this.now.getDate(), 2);
|
||||
return StringFormat.pad(this.now.getDate(), 2);
|
||||
case 'h':
|
||||
return Format.pad(this.now.getHours(), 2);
|
||||
return StringFormat.pad(this.now.getHours(), 2);
|
||||
case 'm':
|
||||
return Format.pad(this.now.getMinutes(), 2);
|
||||
return StringFormat.pad(this.now.getMinutes(), 2);
|
||||
case 's':
|
||||
return Format.pad(this.now.getSeconds(), 2);
|
||||
return StringFormat.pad(this.now.getSeconds(), 2);
|
||||
default:
|
||||
throw 'Bad part: ' + part;
|
||||
}
|
||||
};
|
||||
|
||||
AutoTypeRunner.prototype.udt = function(part) {
|
||||
AutoTypeRunner.prototype.udt = function (part) {
|
||||
switch (part) {
|
||||
case 'simple':
|
||||
return this.udt('Y') + this.udt('M') + this.udt('D') + this.udt('h') + this.udt('m') + this.udt('s');
|
||||
return (
|
||||
this.udt('Y') +
|
||||
this.udt('M') +
|
||||
this.udt('D') +
|
||||
this.udt('h') +
|
||||
this.udt('m') +
|
||||
this.udt('s')
|
||||
);
|
||||
case 'Y':
|
||||
return this.now.getUTCFullYear().toString();
|
||||
case 'M':
|
||||
return Format.pad(this.now.getUTCMonth() + 1, 2);
|
||||
return StringFormat.pad(this.now.getUTCMonth() + 1, 2);
|
||||
case 'D':
|
||||
return Format.pad(this.now.getUTCDate(), 2);
|
||||
return StringFormat.pad(this.now.getUTCDate(), 2);
|
||||
case 'h':
|
||||
return Format.pad(this.now.getUTCHours(), 2);
|
||||
return StringFormat.pad(this.now.getUTCHours(), 2);
|
||||
case 'm':
|
||||
return Format.pad(this.now.getUTCMinutes(), 2);
|
||||
return StringFormat.pad(this.now.getUTCMinutes(), 2);
|
||||
case 's':
|
||||
return Format.pad(this.now.getUTCSeconds(), 2);
|
||||
return StringFormat.pad(this.now.getUTCSeconds(), 2);
|
||||
default:
|
||||
throw 'Bad part: ' + part;
|
||||
}
|
||||
};
|
||||
|
||||
AutoTypeRunner.prototype.getOtp = function(op) {
|
||||
AutoTypeRunner.prototype.getOtp = function (op) {
|
||||
if (!this.entry) {
|
||||
return '';
|
||||
}
|
||||
@@ -258,13 +369,13 @@ AutoTypeRunner.prototype.getOtp = function(op) {
|
||||
if (!this.entry.otpGenerator) {
|
||||
return '';
|
||||
}
|
||||
this.entry.otpGenerator.next(otp => {
|
||||
this.pendingResolved(op, otp, otp ? undefined : 'OTP error');
|
||||
this.entry.otpGenerator.next((err, otp) => {
|
||||
this.pendingResolved(op, otp, err);
|
||||
});
|
||||
return AutoTypeRunner.PendingResolve;
|
||||
};
|
||||
|
||||
AutoTypeRunner.prototype.pendingResolved = function(op, value, error) {
|
||||
AutoTypeRunner.prototype.pendingResolved = function (op, value, error) {
|
||||
const wasPending = op.value === AutoTypeRunner.PendingResolve;
|
||||
if (value) {
|
||||
op.value = value;
|
||||
@@ -279,11 +390,11 @@ AutoTypeRunner.prototype.pendingResolved = function(op, value, error) {
|
||||
}
|
||||
};
|
||||
|
||||
AutoTypeRunner.prototype.obfuscate = function() {
|
||||
AutoTypeRunner.prototype.obfuscate = function () {
|
||||
this.obfuscateOps(this.ops);
|
||||
};
|
||||
|
||||
AutoTypeRunner.prototype.obfuscateOps = function(ops) {
|
||||
AutoTypeRunner.prototype.obfuscateOps = function (ops) {
|
||||
for (let i = 0, len = ops.length; i < len; i++) {
|
||||
const op = ops[i];
|
||||
if (op.mod) {
|
||||
@@ -292,7 +403,7 @@ AutoTypeRunner.prototype.obfuscateOps = function(ops) {
|
||||
if (op.type === 'text') {
|
||||
this.obfuscateOp(op);
|
||||
} else if (op.type === 'group') {
|
||||
const onlyText = op.value.every(grOp => grOp.type === 'text' && !grOp.mod);
|
||||
const onlyText = op.value.every((grOp) => grOp.type === 'text' && !grOp.mod);
|
||||
if (onlyText) {
|
||||
this.obfuscateOp(op);
|
||||
} else {
|
||||
@@ -302,7 +413,7 @@ AutoTypeRunner.prototype.obfuscateOps = function(ops) {
|
||||
}
|
||||
};
|
||||
|
||||
AutoTypeRunner.prototype.obfuscateOp = function(op) {
|
||||
AutoTypeRunner.prototype.obfuscateOp = function (op) {
|
||||
let letters = [];
|
||||
if (op.type === 'text') {
|
||||
if (!op.value || op.value.length <= 1) {
|
||||
@@ -310,7 +421,7 @@ AutoTypeRunner.prototype.obfuscateOp = function(op) {
|
||||
}
|
||||
letters = op.value.split('');
|
||||
} else {
|
||||
op.value.forEach(grOp => letters.push.apply(letters, grOp.value.split('')));
|
||||
op.value.forEach((grOp) => letters.push(...grOp.value.split('')));
|
||||
}
|
||||
if (letters.length <= 1) {
|
||||
return;
|
||||
@@ -320,10 +431,10 @@ AutoTypeRunner.prototype.obfuscateOp = function(op) {
|
||||
op.type = 'group';
|
||||
};
|
||||
|
||||
AutoTypeRunner.prototype.run = function(callback) {
|
||||
this.emitter = AutoTypeEmitterFactory.create(this.emitNext.bind(this));
|
||||
AutoTypeRunner.prototype.run = function (callback, windowId) {
|
||||
this.emitter = new AutoTypeEmitter(this.emitNext.bind(this), windowId);
|
||||
this.emitterState = {
|
||||
callback: callback,
|
||||
callback,
|
||||
stack: [],
|
||||
ops: this.ops,
|
||||
opIx: 0,
|
||||
@@ -331,10 +442,10 @@ AutoTypeRunner.prototype.run = function(callback) {
|
||||
activeMod: {},
|
||||
finished: null
|
||||
};
|
||||
this.emitNext();
|
||||
this.emitter.begin();
|
||||
};
|
||||
|
||||
AutoTypeRunner.prototype.emitNext = function(err) {
|
||||
AutoTypeRunner.prototype.emitNext = function (err) {
|
||||
if (err) {
|
||||
this.emitterState.finished = true;
|
||||
this.emitterState.callback(err);
|
||||
@@ -348,7 +459,7 @@ AutoTypeRunner.prototype.emitNext = function(err) {
|
||||
if (this.emitterState.opIx >= this.emitterState.ops.length) {
|
||||
const state = this.emitterState.stack.pop();
|
||||
if (state) {
|
||||
_.extend(this.emitterState, { ops: state.ops, opIx: state.opIx, mod: state.mod });
|
||||
Object.assign(this.emitterState, { ops: state.ops, opIx: state.opIx, mod: state.mod });
|
||||
this.emitNext();
|
||||
} else {
|
||||
this.resetEmitterMod({});
|
||||
@@ -366,12 +477,12 @@ AutoTypeRunner.prototype.emitNext = function(err) {
|
||||
this.emitterState.stack.push({
|
||||
ops: this.emitterState.ops,
|
||||
opIx: this.emitterState.opIx + 1,
|
||||
mod: _.clone(this.emitterState.mod)
|
||||
mod: { ...this.emitterState.mod }
|
||||
});
|
||||
_.extend(this.emitterState, {
|
||||
Object.assign(this.emitterState, {
|
||||
ops: op.value,
|
||||
opIx: 0,
|
||||
mod: _.clone(this.emitterState.activeMod)
|
||||
mod: { ...this.emitterState.activeMod }
|
||||
});
|
||||
this.emitNext();
|
||||
return;
|
||||
@@ -393,7 +504,7 @@ AutoTypeRunner.prototype.emitNext = function(err) {
|
||||
emitterLogger.debug('key', op.value);
|
||||
this.emitter.key(op.value);
|
||||
break;
|
||||
case 'cmd':
|
||||
case 'cmd': {
|
||||
const method = this.emitter[op.value];
|
||||
if (!method) {
|
||||
throw 'Bad cmd: ' + op.value;
|
||||
@@ -401,13 +512,14 @@ AutoTypeRunner.prototype.emitNext = function(err) {
|
||||
emitterLogger.debug(op.value, op.arg);
|
||||
method.call(this.emitter, op.arg);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
throw 'Bad op: ' + op.type;
|
||||
}
|
||||
};
|
||||
|
||||
AutoTypeRunner.prototype.setEmitterMod = function(addedMod) {
|
||||
Object.keys(addedMod).forEach(function(mod) {
|
||||
AutoTypeRunner.prototype.setEmitterMod = function (addedMod) {
|
||||
Object.keys(addedMod).forEach(function (mod) {
|
||||
if (addedMod[mod] && !this.emitterState.activeMod[mod]) {
|
||||
emitterLogger.debug('mod', mod, true);
|
||||
this.emitter.setMod(mod, true);
|
||||
@@ -416,8 +528,8 @@ AutoTypeRunner.prototype.setEmitterMod = function(addedMod) {
|
||||
}, this);
|
||||
};
|
||||
|
||||
AutoTypeRunner.prototype.resetEmitterMod = function(targetState) {
|
||||
Object.keys(this.emitterState.activeMod).forEach(function(mod) {
|
||||
AutoTypeRunner.prototype.resetEmitterMod = function (targetState) {
|
||||
Object.keys(this.emitterState.activeMod).forEach(function (mod) {
|
||||
if (this.emitterState.activeMod[mod] && !targetState[mod]) {
|
||||
emitterLogger.debug('mod', mod, false);
|
||||
this.emitter.setMod(mod, false);
|
||||
@@ -426,4 +538,4 @@ AutoTypeRunner.prototype.resetEmitterMod = function(targetState) {
|
||||
}, this);
|
||||
};
|
||||
|
||||
module.exports = AutoTypeRunner;
|
||||
export { AutoTypeRunner };
|
||||
|
||||
@@ -1,91 +0,0 @@
|
||||
const Launcher = require('../../comp/launcher');
|
||||
const AutoTypeNativeHelper = require('../helper/auto-type-native-helper');
|
||||
|
||||
// http://eastmanreference.com/complete-list-of-applescript-key-codes/
|
||||
const KeyMap = {
|
||||
tab: 48, enter: 36, space: 49,
|
||||
up: 126, down: 125, left: 123, right: 124, home: 115, end: 119, pgup: 116, pgdn: 121,
|
||||
ins: 114, del: 117, bs: 51, esc: 53,
|
||||
win: 55, rwin: 55,
|
||||
f1: 122, f2: 120, f3: 99, f4: 118, f5: 96, f6: 97, f7: 98, f8: 100, f9: 101,
|
||||
f10: 109, f11: 103, f12: 111, f13: 105, f14: 107, f15: 113, f16: 106,
|
||||
add: 69, subtract: 78, multiply: 67, divide: 75,
|
||||
n0: 82, n1: 83, n2: 84, n3: 85, n4: 86,
|
||||
n5: 87, n6: 88, n7: 89, n8: 91, n9: 92
|
||||
};
|
||||
|
||||
const ModMap = {
|
||||
'^': '@',
|
||||
'+': '+',
|
||||
'%': '%',
|
||||
'^^': '^'
|
||||
};
|
||||
|
||||
const AutoTypeEmitter = function(callback) {
|
||||
this.callback = callback;
|
||||
this.mod = {};
|
||||
this.pendingScript = [];
|
||||
};
|
||||
|
||||
AutoTypeEmitter.prototype.setMod = function(mod, enabled) {
|
||||
if (enabled) {
|
||||
this.mod[ModMap[mod]] = true;
|
||||
} else {
|
||||
delete this.mod[ModMap[mod]];
|
||||
}
|
||||
};
|
||||
|
||||
AutoTypeEmitter.prototype.text = function(text) {
|
||||
this.pendingScript.push('text ' + this.modString() + ' ' + text);
|
||||
this.callback();
|
||||
};
|
||||
|
||||
AutoTypeEmitter.prototype.key = function(key) {
|
||||
if (typeof key !== 'number') {
|
||||
if (!KeyMap[key]) {
|
||||
return this.callback('Bad key: ' + key);
|
||||
}
|
||||
key = KeyMap[key];
|
||||
}
|
||||
this.pendingScript.push('key ' + this.modString() + key);
|
||||
this.callback();
|
||||
};
|
||||
|
||||
AutoTypeEmitter.prototype.copyPaste = function(text) {
|
||||
this.pendingScript.push('copypaste ' + text);
|
||||
this.callback();
|
||||
};
|
||||
|
||||
AutoTypeEmitter.prototype.wait = function(time) {
|
||||
this.pendingScript.push('wait ' + time);
|
||||
this.callback();
|
||||
};
|
||||
|
||||
AutoTypeEmitter.prototype.waitComplete = function() {
|
||||
if (this.pendingScript.length) {
|
||||
const script = this.pendingScript.join('\n');
|
||||
this.pendingScript.length = 0;
|
||||
this.runScript(script);
|
||||
} else {
|
||||
this.callback();
|
||||
}
|
||||
};
|
||||
|
||||
AutoTypeEmitter.prototype.setDelay = function(delay) {
|
||||
this.delay = delay || 0;
|
||||
this.callback('Not implemented');
|
||||
};
|
||||
|
||||
AutoTypeEmitter.prototype.modString = function() {
|
||||
return Object.keys(this.mod).join('');
|
||||
};
|
||||
|
||||
AutoTypeEmitter.prototype.runScript = function(script) {
|
||||
Launcher.spawn({
|
||||
cmd: AutoTypeNativeHelper.getHelperPath(),
|
||||
data: script,
|
||||
complete: this.callback
|
||||
});
|
||||
};
|
||||
|
||||
module.exports = AutoTypeEmitter;
|
||||
@@ -1,109 +0,0 @@
|
||||
const Launcher = require('../../comp/launcher');
|
||||
const Locale = require('../../util/locale');
|
||||
|
||||
// https://cgit.freedesktop.org/xorg/proto/x11proto/plain/keysymdef.h
|
||||
const KeyMap = {
|
||||
tab: 'Tab', enter: 'KP_Enter', space: 'KP_Space',
|
||||
up: 'Up', down: 'Down', left: 'Left', right: 'Right', home: 'Home', end: 'End', pgup: 'Page_Up', pgdn: 'Page_Down',
|
||||
ins: 'Insert', del: 'Delete', bs: 'BackSpace', esc: 'Escape',
|
||||
win: 'Meta_L', rwin: 'Meta_R',
|
||||
f1: 'F1', f2: 'F2', f3: 'F3', f4: 'F4', f5: 'F5', f6: 'F6', f7: 'F7', f8: 'F8', f9: 'F9',
|
||||
f10: 'F10', f11: 'F11', f12: 'F12', f13: 'F13', f14: 'F14', f15: 'F15', f16: 'F16',
|
||||
add: 'KP_Add', subtract: 'KP_Subtract', multiply: 'KP_Multiply', divide: 'KP_Divide',
|
||||
n0: 'KP_0', n1: 'KP_1', n2: 'KP_2', n3: 'KP_3', n4: 'KP_4',
|
||||
n5: 'KP_5', n6: 'KP_6', n7: 'KP_7', n8: 'KP_8', n9: 'KP_9'
|
||||
};
|
||||
|
||||
const ModMap = {
|
||||
'^': 'ctrl',
|
||||
'+': 'shift',
|
||||
'%': 'alt',
|
||||
'^^': 'ctrl'
|
||||
};
|
||||
|
||||
const AutoTypeEmitter = function(callback) {
|
||||
this.callback = callback;
|
||||
this.mod = {};
|
||||
this.pendingScript = [];
|
||||
};
|
||||
|
||||
AutoTypeEmitter.prototype.setMod = function(mod, enabled) {
|
||||
if (enabled) {
|
||||
this.mod[ModMap[mod]] = true;
|
||||
} else {
|
||||
delete this.mod[ModMap[mod]];
|
||||
}
|
||||
};
|
||||
|
||||
AutoTypeEmitter.prototype.text = function(text) {
|
||||
this.pendingScript.push('keyup ctrl alt shift t');
|
||||
Object.keys(this.mod).forEach(mod => {
|
||||
this.pendingScript.push('keydown ' + ModMap[mod]);
|
||||
});
|
||||
text.split('').map(char => {
|
||||
this.pendingScript.push('key U' + char.charCodeAt(0).toString(16));
|
||||
});
|
||||
Object.keys(this.mod).forEach(mod => {
|
||||
this.pendingScript.push('keyup ' + ModMap[mod]);
|
||||
});
|
||||
this.waitComplete();
|
||||
};
|
||||
|
||||
AutoTypeEmitter.prototype.key = function(key) {
|
||||
if (typeof key !== 'number') {
|
||||
if (!KeyMap[key]) {
|
||||
return this.callback('Bad key: ' + key);
|
||||
}
|
||||
key = KeyMap[key].toString(16);
|
||||
}
|
||||
this.pendingScript.push('key --clearmodifiers ' + this.modString() + key);
|
||||
this.callback();
|
||||
};
|
||||
|
||||
AutoTypeEmitter.prototype.copyPaste = function(text) {
|
||||
this.pendingScript.push('sleep 0.5');
|
||||
Launcher.setClipboardText(text);
|
||||
this.pendingScript.push('key --clearmodifiers shift+Insert');
|
||||
this.pendingScript.push('sleep 0.5');
|
||||
this.waitComplete();
|
||||
};
|
||||
|
||||
AutoTypeEmitter.prototype.wait = function(time) {
|
||||
this.pendingScript.push('sleep ' + (time / 1000));
|
||||
this.callback();
|
||||
};
|
||||
|
||||
AutoTypeEmitter.prototype.waitComplete = function(callback) {
|
||||
if (this.pendingScript.length) {
|
||||
const script = this.pendingScript.join(' ');
|
||||
this.pendingScript.length = 0;
|
||||
this.runScript(script, callback);
|
||||
} else {
|
||||
this.callback();
|
||||
}
|
||||
};
|
||||
|
||||
AutoTypeEmitter.prototype.modString = function() {
|
||||
let mod = '';
|
||||
Object.keys(this.mod).forEach(key => {
|
||||
mod += key + '+';
|
||||
});
|
||||
return mod;
|
||||
};
|
||||
|
||||
AutoTypeEmitter.prototype.runScript = function(script, callback) {
|
||||
Launcher.spawn({
|
||||
cmd: 'xdotool',
|
||||
args: ['-'],
|
||||
data: script,
|
||||
complete: (err, stdout, code) => {
|
||||
if (err && err.code === 'ENOENT') {
|
||||
err = Locale.autoTypeErrorNotInstalled.replace('{}', 'xdotool');
|
||||
}
|
||||
const cb = callback || this.callback;
|
||||
cb(err, stdout, code);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
module.exports = AutoTypeEmitter;
|
||||
@@ -1,93 +0,0 @@
|
||||
const Launcher = require('../../comp/launcher');
|
||||
const AutoTypeNativeHelper = require('../helper/auto-type-native-helper');
|
||||
|
||||
// https://msdn.microsoft.com/en-us/library/windows/desktop/dd375731(v=vs.85).aspx
|
||||
const KeyMap = {
|
||||
tab: 0x09, enter: 0x0D, space: 0x20,
|
||||
up: 0x26, down: 0x28, left: 0x25, right: 0x27, home: 0x24, end: 0x23, pgup: 0x21, pgdn: 0x22,
|
||||
ins: 0x2D, del: 0x2E, bs: 0x08, esc: 0x1B,
|
||||
win: 0x5B, rwin: 0x5C,
|
||||
f1: 0x70, f2: 0x71, f3: 0x72, f4: 0x73, f5: 0x74, f6: 0x75, f7: 0x76, f8: 0x77, f9: 0x78,
|
||||
f10: 0x79, f11: 0x7A, f12: 0x7B, f13: 0x7C, f14: 0x7D, f15: 0x7E, f16: 0x7F,
|
||||
add: 0x6B, subtract: 0x6D, multiply: 0x6A, divide: 0x6F,
|
||||
n0: 0x30, n1: 0x31, n2: 0x32, n3: 0x33, n4: 0x34,
|
||||
n5: 0x35, n6: 0x36, n7: 0x37, n8: 0x38, n9: 0x39
|
||||
};
|
||||
|
||||
const ModMap = {
|
||||
'^': '^',
|
||||
'+': '+',
|
||||
'%': '%',
|
||||
'^^': '^'
|
||||
};
|
||||
|
||||
const AutoTypeEmitter = function(callback) {
|
||||
this.callback = callback;
|
||||
this.mod = {};
|
||||
this.pendingScript = [];
|
||||
};
|
||||
|
||||
AutoTypeEmitter.prototype.setMod = function(mod, enabled) {
|
||||
if (enabled) {
|
||||
this.mod[ModMap[mod]] = true;
|
||||
} else {
|
||||
delete this.mod[ModMap[mod]];
|
||||
}
|
||||
};
|
||||
|
||||
AutoTypeEmitter.prototype.text = function(text) {
|
||||
if (text) {
|
||||
this.pendingScript.push('text ' + this.modStr() + ' ' + text);
|
||||
}
|
||||
this.callback();
|
||||
};
|
||||
|
||||
AutoTypeEmitter.prototype.key = function(key) {
|
||||
if (typeof key !== 'number') {
|
||||
if (!KeyMap[key]) {
|
||||
return this.callback('Bad key: ' + key);
|
||||
}
|
||||
key = KeyMap[key];
|
||||
}
|
||||
this.pendingScript.push('key ' + this.modStr() + key);
|
||||
this.callback();
|
||||
};
|
||||
|
||||
AutoTypeEmitter.prototype.copyPaste = function(text) {
|
||||
this.pendingScript.push('copypaste ' + text);
|
||||
this.callback();
|
||||
};
|
||||
|
||||
AutoTypeEmitter.prototype.wait = function(time) {
|
||||
this.pendingScript.push('wait ' + time);
|
||||
this.callback();
|
||||
};
|
||||
|
||||
AutoTypeEmitter.prototype.waitComplete = function() {
|
||||
if (this.pendingScript.length) {
|
||||
const script = this.pendingScript.join('\n');
|
||||
this.pendingScript.length = 0;
|
||||
this.runScript(script);
|
||||
} else {
|
||||
this.callback();
|
||||
}
|
||||
};
|
||||
|
||||
AutoTypeEmitter.prototype.setDelay = function(delay) {
|
||||
this.delay = delay || 0;
|
||||
this.callback('Not implemented');
|
||||
};
|
||||
|
||||
AutoTypeEmitter.prototype.modStr = function() {
|
||||
return Object.keys(this.mod).join('');
|
||||
};
|
||||
|
||||
AutoTypeEmitter.prototype.runScript = function(script) {
|
||||
Launcher.spawn({
|
||||
cmd: AutoTypeNativeHelper.getHelperPath(),
|
||||
data: script,
|
||||
complete: this.callback
|
||||
});
|
||||
};
|
||||
|
||||
module.exports = AutoTypeEmitter;
|
||||
@@ -1,59 +0,0 @@
|
||||
const Launcher = require('../../comp/launcher');
|
||||
|
||||
const ForeMostAppScript = 'tell application "System Events" to set frontApp to name of first process whose frontmost is true';
|
||||
const ChromeScript = 'tell application "{}" to set appUrl to URL of active tab of front window\n' +
|
||||
'tell application "{}" to set appTitle to title of active tab of front window\n' +
|
||||
'return appUrl & "\n" & appTitle';
|
||||
const SafariScript = 'tell application "{}" to set appUrl to URL of front document\n' +
|
||||
'tell application "{}" to set appTitle to name of front document\n' +
|
||||
'return appUrl & "\n" & appTitle';
|
||||
const OtherAppsScript = 'tell application "System Events"\n' +
|
||||
' tell process "{}"\n' +
|
||||
' tell (1st window whose value of attribute "AXMain" is true)\n' +
|
||||
' set windowTitle to value of attribute "AXTitle"\n' +
|
||||
' end tell\n' +
|
||||
' end tell\n' +
|
||||
'end tell';
|
||||
|
||||
const AutoTypeHelper = function() {
|
||||
};
|
||||
|
||||
AutoTypeHelper.prototype.getActiveWindowTitle = function(callback) {
|
||||
AutoTypeHelper.exec(ForeMostAppScript, (err, out) => {
|
||||
if (err) { return callback(err); }
|
||||
const appName = out.trim();
|
||||
// getting urls and titles from Chrome or Safari:
|
||||
// - will suit in 90% cases
|
||||
// - does not require assistive access
|
||||
// - allows to get url
|
||||
if (['Google Chrome', 'Chromium', 'Google Chrome Canary'].indexOf(appName) >= 0) {
|
||||
AutoTypeHelper.exec(ChromeScript.replace(/\{}/g, appName), (err, out) => {
|
||||
if (err) { return callback(err); }
|
||||
const parts = out.split('\n');
|
||||
return callback(null, (parts[1] || '').trim(), parts[0].trim());
|
||||
});
|
||||
} else if (['Safari', 'Webkit'].indexOf(appName) >= 0) {
|
||||
AutoTypeHelper.exec(SafariScript.replace(/\{}/g, appName), (err, out) => {
|
||||
if (err) { return callback(err); }
|
||||
const parts = out.split('\n');
|
||||
return callback(null, (parts[1] || '').trim(), parts[0].trim());
|
||||
});
|
||||
} else {
|
||||
// special cases are not available. this method may ask the user about assistive access
|
||||
AutoTypeHelper.exec(OtherAppsScript.replace(/\{}/g, appName), (err, out) => {
|
||||
if (err) { return callback(err); }
|
||||
return callback(null, out.trim());
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
AutoTypeHelper.exec = function(script, callback) {
|
||||
Launcher.spawn({
|
||||
cmd: 'osascript',
|
||||
args: ['-e', script],
|
||||
complete: callback
|
||||
});
|
||||
};
|
||||
|
||||
module.exports = AutoTypeHelper;
|
||||
@@ -1,16 +0,0 @@
|
||||
const Launcher = require('../../comp/launcher');
|
||||
|
||||
const AutoTypeHelper = function() {
|
||||
};
|
||||
|
||||
AutoTypeHelper.prototype.getActiveWindowTitle = function(callback) {
|
||||
Launcher.spawn({
|
||||
cmd: 'xdotool',
|
||||
args: ['getactivewindow', 'getwindowname'],
|
||||
complete: function(err, res) {
|
||||
return callback(err, res ? res.trim() : undefined);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
module.exports = AutoTypeHelper;
|
||||
@@ -1,20 +0,0 @@
|
||||
const Launcher = require('../../comp/launcher');
|
||||
const AutoTypeNativeHelper = require('./auto-type-native-helper');
|
||||
|
||||
const AutoTypeHelper = function() {
|
||||
};
|
||||
|
||||
AutoTypeHelper.prototype.getActiveWindowTitle = function(callback) {
|
||||
Launcher.spawn({
|
||||
cmd: AutoTypeNativeHelper.getHelperPath(),
|
||||
args: ['--window-info'],
|
||||
complete: function(err, out) {
|
||||
if (err) { return callback(err); }
|
||||
const parts = out.split('\n');
|
||||
return callback(null, (parts[0] || '').trim(),
|
||||
parts[1] ? parts[1].trim() : undefined);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
module.exports = AutoTypeHelper;
|
||||
@@ -1,21 +0,0 @@
|
||||
const Launcher = require('../../comp/launcher');
|
||||
const Logger = require('../../util/logger');
|
||||
|
||||
const logger = new Logger('auto-type');
|
||||
|
||||
const AutoTypeNativeHelper = {
|
||||
getHelperPath() {
|
||||
if (this._helperPath) {
|
||||
return this._helperPath;
|
||||
}
|
||||
const ext = process.platform === 'win32' ? '.exe' : '';
|
||||
const helperRelPath = `helper/${process.platform}/KeeWebHelper${ext}`;
|
||||
const helperPath = Launcher.getAppPath(helperRelPath);
|
||||
Launcher.ensureRunnable(helperPath);
|
||||
logger.debug('Using auto-type helper', helperPath);
|
||||
this._helperPath = helperPath;
|
||||
return helperPath;
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = AutoTypeNativeHelper;
|
||||
@@ -1,44 +1,47 @@
|
||||
const Backbone = require('backbone');
|
||||
const AutoTypeParser = require('./auto-type-parser');
|
||||
const AutoTypeFilter = require('./auto-type-filter');
|
||||
const AutoTypeHelperFactory = require('./auto-type-helper-factory');
|
||||
const Launcher = require('../comp/launcher');
|
||||
const Alerts = require('../comp/alerts');
|
||||
const AutoTypeSelectView = require('../views/auto-type/auto-type-select-view');
|
||||
const Logger = require('../util/logger');
|
||||
const Locale = require('../util/locale');
|
||||
const Timeouts = require('../const/timeouts');
|
||||
const AppSettingsModel = require('../models/app-settings-model');
|
||||
const AutoTypeSequenceType = require('../const/autotype-sequencetype');
|
||||
import { Events } from 'framework/events';
|
||||
import { AutoTypeHelper } from 'auto-type/auto-type-helper';
|
||||
import { AutoTypeParser } from 'auto-type/auto-type-parser';
|
||||
import { SelectEntryFilter } from 'comp/app/select-entry-filter';
|
||||
import { Launcher } from 'comp/launcher';
|
||||
import { Features } from 'util/features';
|
||||
import { Alerts } from 'comp/ui/alerts';
|
||||
import { Timeouts } from 'const/timeouts';
|
||||
import { AppSettingsModel } from 'models/app-settings-model';
|
||||
import { AppModel } from 'models/app-model';
|
||||
import { Locale } from 'util/locale';
|
||||
import { Logger } from 'util/logger';
|
||||
import { Links } from 'const/links';
|
||||
import { SelectEntryView } from 'views/select/select-entry-view';
|
||||
|
||||
const logger = new Logger('auto-type');
|
||||
const clearTextAutoTypeLog = localStorage.autoTypeDebug;
|
||||
const clearTextAutoTypeLog = !!localStorage.debugAutoType;
|
||||
|
||||
const AutoType = {
|
||||
helper: AutoTypeHelperFactory.create(),
|
||||
enabled: !!(Launcher && Launcher.autoTypeSupported),
|
||||
supportsEventsWithWindowId: !!(Launcher && Launcher.platform() === 'linux'),
|
||||
selectEntryView: false,
|
||||
pendingEvent: null,
|
||||
running: false,
|
||||
|
||||
init(appModel) {
|
||||
init() {
|
||||
if (!this.enabled) {
|
||||
return;
|
||||
}
|
||||
this.appModel = appModel;
|
||||
Backbone.on('auto-type', this.handleEvent, this);
|
||||
Backbone.on('main-window-blur main-window-will-close', this.resetPendingEvent, this);
|
||||
Events.on('auto-type', (e) => this.handleEvent(e));
|
||||
},
|
||||
|
||||
handleEvent(e) {
|
||||
const entry = e && e.entry || null;
|
||||
const entry = (e && e.entry) || null;
|
||||
const sequence = (e && e.sequence) || null;
|
||||
const context = (e && e.context) || null;
|
||||
logger.debug('Auto type event', entry);
|
||||
if (this.running) {
|
||||
logger.debug('Already running, skipping event');
|
||||
return;
|
||||
}
|
||||
if (entry) {
|
||||
this.hideWindow(() => { this.runAndHandleResult({ entry }); });
|
||||
this.hideWindow(() => {
|
||||
this.runAndHandleResult({ entry, sequence, context });
|
||||
});
|
||||
} else {
|
||||
if (this.selectEntryView) {
|
||||
return;
|
||||
@@ -54,38 +57,39 @@ const AutoType = {
|
||||
}
|
||||
},
|
||||
|
||||
runAndHandleResult(result) {
|
||||
this.run(result, err => {
|
||||
runAndHandleResult(result, windowId) {
|
||||
this.run(result, windowId, (err) => {
|
||||
if (err) {
|
||||
let body = Locale.autoTypeErrorGeneric.replace('{}', err.message || err.toString());
|
||||
let link;
|
||||
if (err.keyPressFailed && Features.isMac) {
|
||||
body = Locale.autoTypeErrorAccessibilityMacOS;
|
||||
link = Links.AutoTypeMacOS;
|
||||
}
|
||||
Alerts.error({
|
||||
header: Locale.autoTypeError,
|
||||
body: Locale.autoTypeErrorGeneric.replace('{}', err.toString())
|
||||
body,
|
||||
link
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
if (AppSettingsModel.instance.get('lockOnAutoType')) {
|
||||
Backbone.trigger('lock-workspace');
|
||||
if (AppSettingsModel.lockOnAutoType) {
|
||||
Events.emit('lock-workspace');
|
||||
}
|
||||
},
|
||||
|
||||
run(result, callback) {
|
||||
run(result, windowId, callback) {
|
||||
this.running = true;
|
||||
let sequence;
|
||||
if (result.sequenceType === AutoTypeSequenceType.PASSWORD) {
|
||||
sequence = '{PASSWORD}';
|
||||
} else if (result.sequenceType === AutoTypeSequenceType.USERNAME) {
|
||||
sequence = '{USERNAME}';
|
||||
} else {
|
||||
sequence = result.entry.getEffectiveAutoTypeSeq();
|
||||
}
|
||||
const sequence = result.sequence || result.entry.getEffectiveAutoTypeSeq();
|
||||
const context = result.context;
|
||||
logger.debug('Start', sequence);
|
||||
const ts = logger.ts();
|
||||
try {
|
||||
const parser = new AutoTypeParser(sequence);
|
||||
const runner = parser.parse();
|
||||
logger.debug('Parsed', this.printOps(runner.ops));
|
||||
runner.resolve(result.entry, err => {
|
||||
runner.resolve(result.entry, context, (err) => {
|
||||
if (err) {
|
||||
this.running = false;
|
||||
logger.error('Resolve error', err);
|
||||
@@ -102,7 +106,7 @@ const AutoType = {
|
||||
}
|
||||
logger.debug('Obfuscated');
|
||||
}
|
||||
runner.run(err => {
|
||||
runner.run((err) => {
|
||||
this.running = false;
|
||||
if (err) {
|
||||
logger.error('Run error', err);
|
||||
@@ -110,7 +114,7 @@ const AutoType = {
|
||||
}
|
||||
logger.debug('Complete', logger.ts(ts));
|
||||
return callback && callback();
|
||||
});
|
||||
}, windowId);
|
||||
});
|
||||
} catch (ex) {
|
||||
this.running = false;
|
||||
@@ -123,7 +127,7 @@ const AutoType = {
|
||||
try {
|
||||
const parser = new AutoTypeParser(sequence);
|
||||
const runner = parser.parse();
|
||||
runner.resolve(entry, callback);
|
||||
runner.resolve(entry, null, callback);
|
||||
} catch (ex) {
|
||||
return callback(ex);
|
||||
}
|
||||
@@ -158,89 +162,151 @@ const AutoType = {
|
||||
}
|
||||
},
|
||||
|
||||
getActiveWindowTitle(callback) {
|
||||
logger.debug('Get window title');
|
||||
return this.helper.getActiveWindowTitle((err, title, url) => {
|
||||
getActiveWindowInfo(callback) {
|
||||
logger.debug('Getting window info');
|
||||
const helper = new AutoTypeHelper();
|
||||
return helper.getActiveWindowInfo((err, windowInfo) => {
|
||||
if (err) {
|
||||
logger.error('Error get window title', err);
|
||||
logger.error('Error getting window info', err);
|
||||
} else {
|
||||
if (!url) {
|
||||
if (!windowInfo.url) {
|
||||
// try to find a URL in the title
|
||||
const urlMatcher = new RegExp(
|
||||
'https?:\\/\\/(www\\.)?[-a-zA-Z0-9@:%._\\+~#=]{2,256}\\.[a-z]{2,4}\\b([-a-zA-Z0-9@:%_\\+.~#?&//=]*)'
|
||||
);
|
||||
const urlMatches = urlMatcher.exec(title);
|
||||
url = urlMatches && urlMatches.length > 0 ? urlMatches[0] : null;
|
||||
const urlMatcher = /https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\\+~#=]{2,256}\.[a-z]{2,4}\b([-a-zA-Z0-9@:%_\\+.~#?&\/=]*)/;
|
||||
const urlMatches = urlMatcher.exec(windowInfo.title);
|
||||
windowInfo.url = urlMatches && urlMatches.length > 0 ? urlMatches[0] : null;
|
||||
}
|
||||
logger.debug('Window title', title, url);
|
||||
logger.debug('Window info', windowInfo.id, windowInfo.title, windowInfo.url);
|
||||
}
|
||||
return callback(err, title, url);
|
||||
return callback(err, windowInfo);
|
||||
});
|
||||
},
|
||||
|
||||
activeWindowMatches(windowInfo, callback) {
|
||||
if (!windowInfo || !windowInfo.id) {
|
||||
logger.debug('Skipped active window check because window id is unknown');
|
||||
return callback(true);
|
||||
}
|
||||
this.getActiveWindowInfo((err, activeWindowInfo) => {
|
||||
if (!activeWindowInfo) {
|
||||
logger.debug('Error during active window check, something is wrong', err);
|
||||
return callback(false);
|
||||
}
|
||||
if (activeWindowInfo.id !== windowInfo.id && !this.supportsEventsWithWindowId) {
|
||||
logger.info(
|
||||
`Active window doesn't match: ID is different. ` +
|
||||
`Expected ${windowInfo.id}, got ${activeWindowInfo.id}`
|
||||
);
|
||||
return callback(false, activeWindowInfo);
|
||||
}
|
||||
if (activeWindowInfo.url !== windowInfo.url && !this.supportsEventsWithWindowId) {
|
||||
logger.info(
|
||||
`Active window doesn't match: url is different. ` +
|
||||
`Expected "${windowInfo.url}", got "${activeWindowInfo.url}"`
|
||||
);
|
||||
return callback(false, activeWindowInfo);
|
||||
}
|
||||
logger.info('Active window matches');
|
||||
callback(true, activeWindowInfo);
|
||||
});
|
||||
},
|
||||
|
||||
selectEntryAndRun() {
|
||||
this.getActiveWindowTitle((e, title, url) => {
|
||||
const filter = new AutoTypeFilter({title, url}, this.appModel);
|
||||
const evt = { filter };
|
||||
if (!this.appModel.files.hasOpenFiles()) {
|
||||
this.pendingEvent = evt;
|
||||
this.appModel.files.once('update', this.processPendingEvent, this);
|
||||
this.getActiveWindowInfo(async (e, windowInfo) => {
|
||||
const filter = new SelectEntryFilter(
|
||||
windowInfo,
|
||||
AppModel.instance,
|
||||
AppModel.instance.files,
|
||||
{
|
||||
autoType: true
|
||||
}
|
||||
);
|
||||
const evt = { filter, windowInfo };
|
||||
if (!AppModel.instance.files.hasOpenFiles()) {
|
||||
logger.debug('auto-type event delayed');
|
||||
this.focusMainWindow();
|
||||
} else {
|
||||
this.processEventWithFilter(evt);
|
||||
try {
|
||||
await AppModel.instance.unlockAnyFile('autoTypeUnlockMessage');
|
||||
} catch {
|
||||
logger.debug('auto-type event canceled');
|
||||
return;
|
||||
}
|
||||
if (this.selectEntryView) {
|
||||
this.selectEntryView.show();
|
||||
}
|
||||
}
|
||||
logger.debug('processing auto-type event');
|
||||
this.processEventWithFilter(evt);
|
||||
});
|
||||
},
|
||||
|
||||
focusMainWindow() {
|
||||
setTimeout(() => Launcher.showMainWindow(), Timeouts.RedrawInactiveWindow);
|
||||
if (!Launcher.isAppFocused()) {
|
||||
setTimeout(() => Launcher.showMainWindow(), Timeouts.RedrawInactiveWindow);
|
||||
}
|
||||
},
|
||||
|
||||
processEventWithFilter(evt) {
|
||||
const entries = evt.filter.getEntries();
|
||||
if (entries.length === 1) {
|
||||
let entries = evt.filter.getEntries();
|
||||
if (entries.length === 1 && AppSettingsModel.directAutotype) {
|
||||
this.hideWindow(() => {
|
||||
this.runAndHandleResult({ entry: entries.at(0) });
|
||||
this.runAndHandleResult({ entry: entries[0] }, evt.windowInfo.id);
|
||||
});
|
||||
return;
|
||||
}
|
||||
this.focusMainWindow();
|
||||
evt.filter.ignoreWindowInfo = true;
|
||||
this.selectEntryView = new AutoTypeSelectView({
|
||||
model: { filter: evt.filter }
|
||||
}).render();
|
||||
this.selectEntryView.on('result', result => {
|
||||
|
||||
if (entries.length === 0) {
|
||||
if (evt.filter.useUrl) {
|
||||
evt.filter.useUrl = false;
|
||||
if (evt.filter.title && AppSettingsModel.autoTypeTitleFilterEnabled) {
|
||||
evt.filter.useTitle = true;
|
||||
}
|
||||
}
|
||||
entries = evt.filter.getEntries();
|
||||
if (entries.length === 0 && evt.filter.useTitle) {
|
||||
evt.filter.useTitle = false;
|
||||
}
|
||||
}
|
||||
|
||||
const humanReadableTarget = evt.filter.title || evt.filter.url;
|
||||
const topMessage = humanReadableTarget
|
||||
? Locale.autoTypeMsgMatchedByWindow.replace('{}', humanReadableTarget)
|
||||
: Locale.autoTypeMsgNoWindow;
|
||||
|
||||
this.selectEntryView = new SelectEntryView({
|
||||
isAutoType: true,
|
||||
itemOptions: true,
|
||||
filter: evt.filter,
|
||||
topMessage
|
||||
});
|
||||
this.selectEntryView.on('result', (result) => {
|
||||
logger.debug('Entry selected', result);
|
||||
this.selectEntryView.off('result');
|
||||
this.selectEntryView.remove();
|
||||
this.selectEntryView = null;
|
||||
this.hideWindow(() => {
|
||||
if (result) {
|
||||
this.runAndHandleResult(result);
|
||||
if (result?.entry) {
|
||||
this.activeWindowMatches(evt.windowInfo, (matches, activeWindowInfo) => {
|
||||
if (matches) {
|
||||
this.runAndHandleResult(result, evt.windowInfo.id);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
resetPendingEvent() {
|
||||
if (this.pendingEvent) {
|
||||
this.pendingEvent = null;
|
||||
this.appModel.files.off('update', this.processPendingEvent, this);
|
||||
logger.debug('auto-type event cancelled');
|
||||
}
|
||||
},
|
||||
|
||||
processPendingEvent() {
|
||||
if (!this.pendingEvent) {
|
||||
return;
|
||||
}
|
||||
logger.debug('processing pending auto-type event');
|
||||
const evt = this.pendingEvent;
|
||||
this.appModel.files.off('update', this.processPendingEvent, this);
|
||||
this.pendingEvent = null;
|
||||
this.processEventWithFilter(evt);
|
||||
this.selectEntryView.render();
|
||||
this.selectEntryView.on('show-open-files', async () => {
|
||||
this.selectEntryView.hide();
|
||||
try {
|
||||
await AppModel.instance.unlockAnyFile('autoTypeUnlockMessage');
|
||||
} catch {
|
||||
this.selectEntryView.emit('result', undefined);
|
||||
return;
|
||||
}
|
||||
this.selectEntryView.show();
|
||||
this.selectEntryView.render();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = AutoType;
|
||||
export { AutoType };
|
||||
|
||||
@@ -1,47 +1,8 @@
|
||||
const Backbone = require('backbone');
|
||||
const EntryModel = require('../models/entry-model');
|
||||
const Comparators = require('../util/comparators');
|
||||
import { Collection } from 'framework/collection';
|
||||
import { EntryModel } from 'models/entry-model';
|
||||
|
||||
const EntryCollection = Backbone.Collection.extend({
|
||||
model: EntryModel,
|
||||
class EntryCollection extends Collection {
|
||||
static model = EntryModel;
|
||||
}
|
||||
|
||||
comparator: null,
|
||||
|
||||
comparators: {
|
||||
'none': null,
|
||||
'title': Comparators.stringComparator('title', true),
|
||||
'-title': Comparators.stringComparator('title', false),
|
||||
'website': Comparators.stringComparator('url', true),
|
||||
'-website': Comparators.stringComparator('url', false),
|
||||
'user': Comparators.stringComparator('user', true),
|
||||
'-user': Comparators.stringComparator('user', false),
|
||||
'created': Comparators.dateComparator('created', true),
|
||||
'-created': Comparators.dateComparator('created', false),
|
||||
'updated': Comparators.dateComparator('updated', true),
|
||||
'-updated': Comparators.dateComparator('updated', false),
|
||||
'-attachments': function(x, y) { return this.attachmentSortVal(x).localeCompare(this.attachmentSortVal(y)); }
|
||||
},
|
||||
|
||||
defaultComparator: 'title',
|
||||
|
||||
initialize: function(models, options) {
|
||||
const comparatorName = options && options.comparator || this.defaultComparator;
|
||||
this.comparator = this.comparators[comparatorName];
|
||||
},
|
||||
|
||||
sortEntries: function(comparator) {
|
||||
this.comparator = this.comparators[comparator] || this.comparators[this.defaultComparator];
|
||||
this.sort();
|
||||
},
|
||||
|
||||
attachmentSortVal: function(entry) {
|
||||
const att = entry.attachments;
|
||||
let str = att.length ? String.fromCharCode(64 + att.length) : 'Z';
|
||||
if (att[0]) {
|
||||
str += att[0].title;
|
||||
}
|
||||
return str;
|
||||
}
|
||||
});
|
||||
|
||||
module.exports = EntryCollection;
|
||||
export { EntryCollection };
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
const Backbone = require('backbone');
|
||||
const FileModel = require('../models/file-model');
|
||||
import { Collection } from 'framework/collection';
|
||||
import { Model } from 'framework/model';
|
||||
|
||||
const FileCollection = Backbone.Collection.extend({
|
||||
model: FileModel,
|
||||
class FileCollection extends Collection {
|
||||
static model = Model;
|
||||
|
||||
hasOpenFiles: function() {
|
||||
return this.some(file => file.get('open'));
|
||||
},
|
||||
|
||||
hasUnsavedFiles: function() {
|
||||
return this.some(file => file.get('modified'));
|
||||
},
|
||||
|
||||
hasDirtyFiles: function() {
|
||||
return this.some(file => file.get('dirty'));
|
||||
},
|
||||
|
||||
getByName: function(name) {
|
||||
return this.find(file => file.get('name').toLowerCase() === name.toLowerCase());
|
||||
hasOpenFiles() {
|
||||
return this.some((file) => file.active);
|
||||
}
|
||||
});
|
||||
|
||||
module.exports = FileCollection;
|
||||
hasUnsavedFiles() {
|
||||
return this.some((file) => file.modified);
|
||||
}
|
||||
|
||||
hasDirtyFiles() {
|
||||
return this.some((file) => file.dirty);
|
||||
}
|
||||
|
||||
getByName(name) {
|
||||
return this.find((file) => file.name.toLowerCase() === name.toLowerCase());
|
||||
}
|
||||
}
|
||||
|
||||
export { FileCollection };
|
||||
|
||||
@@ -1,42 +1,39 @@
|
||||
const Backbone = require('backbone');
|
||||
const FileInfoModel = require('../models/file-info-model');
|
||||
const SettingsStore = require('../comp/settings-store');
|
||||
import { Collection } from 'framework/collection';
|
||||
import { SettingsStore } from 'comp/settings/settings-store';
|
||||
import { FileInfoModel } from 'models/file-info-model';
|
||||
|
||||
const FileInfoCollection = Backbone.Collection.extend({
|
||||
model: FileInfoModel,
|
||||
class FileInfoCollection extends Collection {
|
||||
static model = FileInfoModel;
|
||||
|
||||
initialize: function () {
|
||||
},
|
||||
|
||||
load: function () {
|
||||
return SettingsStore.load('file-info').then(data => {
|
||||
load() {
|
||||
return SettingsStore.load('file-info').then((data) => {
|
||||
if (data) {
|
||||
this.reset(data, {silent: true});
|
||||
for (const item of data) {
|
||||
this.push(new FileInfoModel(item));
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
save: function () {
|
||||
SettingsStore.save('file-info', this.toJSON());
|
||||
},
|
||||
|
||||
getLast: function () {
|
||||
return this.first();
|
||||
},
|
||||
|
||||
getMatch: function (storage, name, path) {
|
||||
return this.find(fi => {
|
||||
return (fi.get('storage') || '') === (storage || '') &&
|
||||
(fi.get('name') || '') === (name || '') &&
|
||||
(fi.get('path') || '') === (path || '');
|
||||
});
|
||||
},
|
||||
|
||||
getByName: function(name) {
|
||||
return this.find(file => file.get('name').toLowerCase() === name.toLowerCase());
|
||||
}
|
||||
});
|
||||
|
||||
FileInfoCollection.instance = new FileInfoCollection();
|
||||
save() {
|
||||
SettingsStore.save('file-info', this);
|
||||
}
|
||||
|
||||
module.exports = FileInfoCollection;
|
||||
getMatch(storage, name, path) {
|
||||
return this.find((fi) => {
|
||||
return (
|
||||
(fi.storage || '') === (storage || '') &&
|
||||
(fi.name || '') === (name || '') &&
|
||||
(fi.path || '') === (path || '')
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
getByName(name) {
|
||||
return this.find((file) => file.name.toLowerCase() === name.toLowerCase());
|
||||
}
|
||||
}
|
||||
|
||||
const instance = new FileInfoCollection();
|
||||
|
||||
export { instance as FileInfoCollection };
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
const Backbone = require('backbone');
|
||||
const GroupModel = require('../models/group-model');
|
||||
import { Collection } from 'framework/collection';
|
||||
import { GroupModel } from 'models/group-model';
|
||||
|
||||
const GroupCollection = Backbone.Collection.extend({
|
||||
model: GroupModel
|
||||
});
|
||||
class GroupCollection extends Collection {
|
||||
static model = GroupModel;
|
||||
}
|
||||
|
||||
module.exports = GroupCollection;
|
||||
export { GroupCollection };
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
const Backbone = require('backbone');
|
||||
const MenuItemModel = require('../../models/menu/menu-item-model');
|
||||
import { Collection } from 'framework/collection';
|
||||
import { MenuItemModel } from 'models/menu/menu-item-model';
|
||||
|
||||
const MenuItemCollection = Backbone.Collection.extend({
|
||||
model: MenuItemModel
|
||||
});
|
||||
class MenuItemCollection extends Collection {
|
||||
static model = MenuItemModel;
|
||||
}
|
||||
|
||||
module.exports = MenuItemCollection;
|
||||
export { MenuItemCollection };
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
const Backbone = require('backbone');
|
||||
const MenuOptionModel = require('../../models/menu/menu-option-model');
|
||||
import { Collection } from 'framework/collection';
|
||||
import { MenuOptionModel } from 'models/menu/menu-option-model';
|
||||
|
||||
const MenuOptionCollection = Backbone.Collection.extend({
|
||||
model: MenuOptionModel
|
||||
});
|
||||
class MenuOptionCollection extends Collection {
|
||||
static model = MenuOptionModel;
|
||||
}
|
||||
|
||||
module.exports = MenuOptionCollection;
|
||||
export { MenuOptionCollection };
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
const Backbone = require('backbone');
|
||||
const MenuSectionModel = require('../../models/menu/menu-section-model');
|
||||
import { Collection } from 'framework/collection';
|
||||
import { MenuSectionModel } from 'models/menu/menu-section-model';
|
||||
|
||||
const MenuSectionCollection = Backbone.Collection.extend({
|
||||
model: MenuSectionModel
|
||||
});
|
||||
class MenuSectionCollection extends Collection {
|
||||
static model = MenuSectionModel;
|
||||
}
|
||||
|
||||
module.exports = MenuSectionCollection;
|
||||
export { MenuSectionCollection };
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
import { Collection } from 'framework/collection';
|
||||
import { Model } from 'framework/model';
|
||||
import { Comparators } from 'util/data/comparators';
|
||||
|
||||
class SearchResultCollection extends Collection {
|
||||
static model = Model;
|
||||
|
||||
comparators = {
|
||||
'none': null,
|
||||
'title': Comparators.stringComparator('title', true),
|
||||
'-title': Comparators.stringComparator('title', false),
|
||||
'website': Comparators.stringComparator('url', true),
|
||||
'-website': Comparators.stringComparator('url', false),
|
||||
'user': Comparators.stringComparator('user', true),
|
||||
'-user': Comparators.stringComparator('user', false),
|
||||
'created': Comparators.dateComparator('created', true),
|
||||
'-created': Comparators.dateComparator('created', false),
|
||||
'updated': Comparators.dateComparator('updated', true),
|
||||
'-updated': Comparators.dateComparator('updated', false),
|
||||
'-attachments': (x, y) => {
|
||||
return this.attachmentSortVal(x).localeCompare(this.attachmentSortVal(y));
|
||||
},
|
||||
'-rank': Comparators.rankComparator().bind(this)
|
||||
};
|
||||
|
||||
defaultComparator = 'title';
|
||||
|
||||
entryFilter = null;
|
||||
|
||||
constructor(models, options) {
|
||||
super(models);
|
||||
const comparatorName = (options && options.comparator) || this.defaultComparator;
|
||||
this.comparator = this.comparators[comparatorName];
|
||||
}
|
||||
|
||||
sortEntries(comparator, filter) {
|
||||
this.entryFilter = filter;
|
||||
this.comparator = this.comparators[comparator] || this.comparators[this.defaultComparator];
|
||||
this.sort();
|
||||
}
|
||||
|
||||
attachmentSortVal(entry) {
|
||||
const att = entry.attachments;
|
||||
let str = att.length ? String.fromCharCode(64 + att.length) : 'Z';
|
||||
if (att[0]) {
|
||||
str += att[0].title;
|
||||
}
|
||||
return str;
|
||||
}
|
||||
}
|
||||
|
||||
export { SearchResultCollection };
|
||||
@@ -1,23 +1,23 @@
|
||||
const FeatureDetector = require('../util/feature-detector');
|
||||
const Alerts = require('../comp/alerts');
|
||||
const AppSettingsModel = require('../models/app-settings-model');
|
||||
const Launcher = require('./launcher');
|
||||
const Locale = require('../util/locale');
|
||||
import { Launcher } from 'comp/launcher';
|
||||
import { Alerts } from 'comp/ui/alerts';
|
||||
import { AppSettingsModel } from 'models/app-settings-model';
|
||||
import { Features } from 'util/features';
|
||||
import { Locale } from 'util/locale';
|
||||
|
||||
const AppRightsChecker = {
|
||||
AppPath: '/Applications/KeeWeb.app',
|
||||
|
||||
init() {
|
||||
if (!FeatureDetector.isDesktop || !FeatureDetector.isMac) {
|
||||
if (!Features.isDesktop || !Features.isMac) {
|
||||
return;
|
||||
}
|
||||
if (AppSettingsModel.instance.get('skipFolderRightsWarning')) {
|
||||
if (AppSettingsModel.skipFolderRightsWarning) {
|
||||
return;
|
||||
}
|
||||
if (!Launcher.getAppPath().startsWith(this.AppPath)) {
|
||||
return;
|
||||
}
|
||||
this.needRunInstaller(needRun => {
|
||||
this.needRunInstaller((needRun) => {
|
||||
if (needRun) {
|
||||
this.showAlert();
|
||||
this.runInstaller();
|
||||
@@ -26,7 +26,7 @@ const AppRightsChecker = {
|
||||
},
|
||||
|
||||
needRunInstaller(callback) {
|
||||
Launcher.statFile(this.AppPath, stat => {
|
||||
Launcher.statFile(this.AppPath, (stat) => {
|
||||
const folderIsRoot = stat && stat.uid === 0;
|
||||
callback(!folderIsRoot);
|
||||
});
|
||||
@@ -37,10 +37,13 @@ const AppRightsChecker = {
|
||||
this.alert = Alerts.alert({
|
||||
icon: 'lock',
|
||||
header: Locale.appRightsAlert,
|
||||
body: Locale.appRightsAlertBody1.replace('{}', `<code>${this.AppPath}</code>`) +
|
||||
'<br/>' + Locale.appRightsAlertBody2 + `: <pre>${command}</pre>`,
|
||||
body:
|
||||
Locale.appRightsAlertBody1.replace('{}', this.AppPath) +
|
||||
'\n' +
|
||||
Locale.appRightsAlertBody2,
|
||||
pre: command,
|
||||
buttons: [
|
||||
{result: 'skip', title: Locale.alertDoNotAsk, error: true},
|
||||
{ result: 'skip', title: Locale.alertDoNotAsk, error: true },
|
||||
Alerts.buttons.ok
|
||||
],
|
||||
success: (result) => {
|
||||
@@ -54,9 +57,10 @@ const AppRightsChecker = {
|
||||
|
||||
runInstaller() {
|
||||
Launcher.spawn({
|
||||
cmd: this.AppPath + '/Contents/Installer/KeeWeb\ Installer.app/Contents/MacOS/applet',
|
||||
cmd: this.AppPath + '/Contents/Installer/KeeWeb Installer.app/Contents/MacOS/applet',
|
||||
args: ['--install'],
|
||||
complete: () => {
|
||||
this.needRunInstaller(needRun => {
|
||||
this.needRunInstaller((needRun) => {
|
||||
if (this.alert && !needRun) {
|
||||
this.alert.closeWithResult('cancel');
|
||||
}
|
||||
@@ -66,12 +70,12 @@ const AppRightsChecker = {
|
||||
},
|
||||
|
||||
dontAskAnymore() {
|
||||
this.needRunInstaller(needRun => {
|
||||
this.needRunInstaller((needRun) => {
|
||||
if (needRun) {
|
||||
AppSettingsModel.instance.set('skipFolderRightsWarning', true);
|
||||
AppSettingsModel.skipFolderRightsWarning = true;
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = AppRightsChecker;
|
||||
export { AppRightsChecker };
|
||||
@@ -0,0 +1,194 @@
|
||||
import { Events } from 'framework/events';
|
||||
import { Logger } from 'util/logger';
|
||||
import { YubiKey } from 'comp/app/yubikey';
|
||||
import { UsbListener } from 'comp/app/usb-listener';
|
||||
import { Alerts } from 'comp/ui/alerts';
|
||||
import { Locale } from 'util/locale';
|
||||
import { Timeouts } from 'const/timeouts';
|
||||
import { Launcher } from 'comp/launcher';
|
||||
import { AppSettingsModel } from 'models/app-settings-model';
|
||||
|
||||
const logger = new Logger('chal-resp');
|
||||
|
||||
const ChalRespCalculator = {
|
||||
cache: {},
|
||||
|
||||
getCacheKey(params) {
|
||||
return `${params.vid}:${params.pid}:${params.serial}:${params.slot}`;
|
||||
},
|
||||
|
||||
build(params) {
|
||||
if (!params) {
|
||||
return null;
|
||||
}
|
||||
return (challenge) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
challenge = Buffer.from(challenge);
|
||||
const hexChallenge = challenge.toString('hex');
|
||||
|
||||
const cacheKey = this.getCacheKey(params);
|
||||
const respFromCache = this.cache[cacheKey]?.[hexChallenge];
|
||||
if (respFromCache) {
|
||||
logger.debug('Found ChalResp in cache');
|
||||
return resolve(Buffer.from(respFromCache, 'hex'));
|
||||
}
|
||||
|
||||
if (!AppSettingsModel.enableUsb) {
|
||||
logger.debug('USB is disabled');
|
||||
Alerts.error({
|
||||
header: Locale.yubiKeyDisabledErrorHeader,
|
||||
body: Locale.yubiKeyDisabledErrorBody,
|
||||
complete() {
|
||||
const err = new Error(Locale.yubiKeyDisabledErrorHeader);
|
||||
err.userCanceled = true;
|
||||
err.ykError = true;
|
||||
|
||||
reject(err);
|
||||
}
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
logger.debug('Calculating ChalResp using a YubiKey', params);
|
||||
|
||||
this._calc(params, challenge, (err, response) => {
|
||||
if (err) {
|
||||
return reject(err);
|
||||
}
|
||||
resolve(response);
|
||||
});
|
||||
});
|
||||
};
|
||||
},
|
||||
|
||||
_calc(params, challenge, callback) {
|
||||
let touchAlert = null;
|
||||
let userCanceled = false;
|
||||
|
||||
YubiKey.calculateChalResp(params, challenge, (err, response) => {
|
||||
if (userCanceled) {
|
||||
userCanceled = false;
|
||||
return;
|
||||
}
|
||||
if (touchAlert) {
|
||||
touchAlert.closeWithoutResult();
|
||||
touchAlert = null;
|
||||
}
|
||||
if (err) {
|
||||
if (err.noKey) {
|
||||
logger.info('YubiKey ChalResp: no key');
|
||||
this._showNoKeyAlert(params.serial, (err) => {
|
||||
if (err) {
|
||||
return callback(err);
|
||||
}
|
||||
this._calc(params, challenge, callback);
|
||||
});
|
||||
return;
|
||||
} else if (err.touchRequested) {
|
||||
logger.info('YubiKey ChalResp: touch requested');
|
||||
touchAlert = this._showTouchAlert(params.serial, (err) => {
|
||||
touchAlert = null;
|
||||
userCanceled = true;
|
||||
|
||||
logger.info('YubiKey ChalResp canceled');
|
||||
YubiKey.cancelChalResp();
|
||||
|
||||
callback(err);
|
||||
});
|
||||
return;
|
||||
} else {
|
||||
logger.error('YubiKey ChalResp error', err);
|
||||
}
|
||||
return callback(err);
|
||||
}
|
||||
|
||||
const cacheKey = this.getCacheKey(params);
|
||||
if (!this.cache[cacheKey]) {
|
||||
this.cache[cacheKey] = {};
|
||||
}
|
||||
|
||||
const hexChallenge = challenge.toString('hex');
|
||||
this.cache[cacheKey][hexChallenge] = response.toString('hex');
|
||||
|
||||
logger.info('Calculated YubiKey ChalResp');
|
||||
callback(null, response);
|
||||
});
|
||||
},
|
||||
|
||||
_showNoKeyAlert(serial, callback) {
|
||||
Launcher.showMainWindow();
|
||||
|
||||
let noKeyAlert = null;
|
||||
let deviceEnumerationTimer;
|
||||
|
||||
const onUsbDevicesChanged = () => {
|
||||
if (!UsbListener.attachedYubiKeys) {
|
||||
return;
|
||||
}
|
||||
deviceEnumerationTimer = setTimeout(() => {
|
||||
YubiKey.list((err, list) => {
|
||||
if (err) {
|
||||
logger.error('YubiKey list error', err);
|
||||
return;
|
||||
}
|
||||
const isAttached = list.some((yk) => yk.serial === serial);
|
||||
logger.info(isAttached ? 'YubiKey found' : 'YubiKey not found');
|
||||
if (isAttached) {
|
||||
Events.off('usb-devices-changed', onUsbDevicesChanged);
|
||||
if (noKeyAlert) {
|
||||
noKeyAlert.closeWithoutResult();
|
||||
}
|
||||
callback();
|
||||
}
|
||||
});
|
||||
}, Timeouts.ExternalDeviceAfterReconnect);
|
||||
};
|
||||
|
||||
Events.on('usb-devices-changed', onUsbDevicesChanged);
|
||||
|
||||
noKeyAlert = Alerts.alert({
|
||||
header: Locale.yubiKeyNoKeyHeader,
|
||||
body: Locale.yubiKeyNoKeyBody.replace('{}', serial),
|
||||
buttons: [Alerts.buttons.cancel],
|
||||
icon: 'usb-token',
|
||||
cancel: () => {
|
||||
logger.info('No key alert closed');
|
||||
|
||||
clearTimeout(deviceEnumerationTimer);
|
||||
Events.off('usb-devices-changed', onUsbDevicesChanged);
|
||||
|
||||
const err = new Error('User canceled the YubiKey no key prompt');
|
||||
err.userCanceled = true;
|
||||
err.ykError = true;
|
||||
|
||||
return callback(err);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
_showTouchAlert(serial, callback) {
|
||||
Launcher.showMainWindow();
|
||||
|
||||
return Alerts.alert({
|
||||
header: Locale.yubiKeyTouchRequestedHeader,
|
||||
body: Locale.yubiKeyTouchRequestedBody.replace('{}', serial),
|
||||
buttons: [Alerts.buttons.cancel],
|
||||
icon: 'usb-token',
|
||||
cancel: () => {
|
||||
logger.info('Touch alert closed');
|
||||
|
||||
const err = new Error('User canceled the YubiKey touch prompt');
|
||||
err.userCanceled = true;
|
||||
err.ykError = true;
|
||||
|
||||
return callback(err);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
clearCache(params) {
|
||||
delete this.cache[this.getCacheKey(params)];
|
||||
}
|
||||
};
|
||||
|
||||
export { ChalRespCalculator };
|
||||
@@ -2,4 +2,4 @@ const DragDropInfo = {
|
||||
dragObject: null
|
||||
};
|
||||
|
||||
module.exports = DragDropInfo;
|
||||
export { DragDropInfo };
|
||||
@@ -1,20 +1,21 @@
|
||||
const AppSettingsModel = require('../models/app-settings-model');
|
||||
import { AppSettingsModel } from 'models/app-settings-model';
|
||||
import { UrlFormat } from 'util/formatting/url-format';
|
||||
|
||||
const ChooserAppKey = 'qp7ctun6qt5n9d6';
|
||||
|
||||
const DropboxChooser = function(callback) {
|
||||
const DropboxChooser = function (callback) {
|
||||
this.cb = callback;
|
||||
this.onMessage = this.onMessage.bind(this);
|
||||
};
|
||||
|
||||
DropboxChooser.prototype.callback = function(err, res) {
|
||||
DropboxChooser.prototype.callback = function (err, res) {
|
||||
if (this.cb) {
|
||||
this.cb(err, res);
|
||||
}
|
||||
this.cb = null;
|
||||
};
|
||||
|
||||
DropboxChooser.prototype.choose = function() {
|
||||
DropboxChooser.prototype.choose = function () {
|
||||
const windowFeatures = 'width=640,height=552,left=357,top=100,resizable=yes,location=yes';
|
||||
const url = this.buildUrl();
|
||||
this.popup = window.open(url, 'dropbox', windowFeatures);
|
||||
@@ -25,10 +26,10 @@ DropboxChooser.prototype.choose = function() {
|
||||
this.closeInt = setInterval(this.checkClose.bind(this), 200);
|
||||
};
|
||||
|
||||
DropboxChooser.prototype.buildUrl = function() {
|
||||
const urlParams = {
|
||||
origin: encodeURIComponent(window.location.protocol + '//' + window.location.host),
|
||||
'app_key': AppSettingsModel.instance.get('dropboxAppKey') || ChooserAppKey,
|
||||
DropboxChooser.prototype.buildUrl = function () {
|
||||
return UrlFormat.makeUrl('https://www.dropbox.com/chooser', {
|
||||
origin: window.location.protocol + '//' + window.location.host,
|
||||
'app_key': AppSettingsModel.dropboxAppKey || ChooserAppKey,
|
||||
'link_type': 'direct',
|
||||
trigger: 'js',
|
||||
multiselect: 'false',
|
||||
@@ -36,12 +37,11 @@ DropboxChooser.prototype.buildUrl = function() {
|
||||
folderselect: 'false',
|
||||
iframe: 'false',
|
||||
version: 2
|
||||
};
|
||||
return 'https://www.dropbox.com/chooser?' + Object.keys(urlParams).map(key => key + '=' + urlParams[key]).join('&');
|
||||
});
|
||||
};
|
||||
|
||||
DropboxChooser.prototype.onMessage = function(e) {
|
||||
if (e.source !== this.popup) {
|
||||
DropboxChooser.prototype.onMessage = function (e) {
|
||||
if (e.source !== this.popup || e.origin !== 'https://www.dropbox.com') {
|
||||
return;
|
||||
}
|
||||
const data = JSON.parse(e.data);
|
||||
@@ -69,7 +69,7 @@ DropboxChooser.prototype.onMessage = function(e) {
|
||||
}
|
||||
};
|
||||
|
||||
DropboxChooser.prototype.checkClose = function() {
|
||||
DropboxChooser.prototype.checkClose = function () {
|
||||
if (this.popup.closed) {
|
||||
clearInterval(this.closeInt);
|
||||
window.removeEventListener('message', this.onMessage);
|
||||
@@ -79,7 +79,7 @@ DropboxChooser.prototype.checkClose = function() {
|
||||
}
|
||||
};
|
||||
|
||||
DropboxChooser.prototype.success = function(params) {
|
||||
DropboxChooser.prototype.success = function (params) {
|
||||
if (!params || !params[0] || !params[0].link || params[0].is_dir) {
|
||||
return this.callback('bad result');
|
||||
}
|
||||
@@ -87,7 +87,7 @@ DropboxChooser.prototype.success = function(params) {
|
||||
this.readFile(this.result.link);
|
||||
};
|
||||
|
||||
DropboxChooser.prototype.readFile = function(url) {
|
||||
DropboxChooser.prototype.readFile = function (url) {
|
||||
const xhr = new XMLHttpRequest();
|
||||
xhr.addEventListener('load', () => {
|
||||
this.callback(null, { name: this.result.name, data: xhr.response });
|
||||
@@ -99,4 +99,4 @@ DropboxChooser.prototype.readFile = function(url) {
|
||||
xhr.send();
|
||||
};
|
||||
|
||||
module.exports = DropboxChooser;
|
||||
export { DropboxChooser };
|
||||
@@ -0,0 +1,29 @@
|
||||
import { AppSettingsModel } from 'models/app-settings-model';
|
||||
import { RuntimeDataModel } from 'models/runtime-data-model';
|
||||
|
||||
const ExportApi = {
|
||||
settings: {
|
||||
get(key) {
|
||||
return key ? AppSettingsModel[key] : { ...AppSettingsModel };
|
||||
},
|
||||
set(key, value) {
|
||||
AppSettingsModel[key] = value;
|
||||
},
|
||||
del(key) {
|
||||
delete AppSettingsModel[key];
|
||||
}
|
||||
},
|
||||
runtimeData: {
|
||||
get(key) {
|
||||
return key ? RuntimeDataModel[key] : { ...RuntimeDataModel };
|
||||
},
|
||||
set(key, value) {
|
||||
RuntimeDataModel[key] = value;
|
||||
},
|
||||
del(key) {
|
||||
delete RuntimeDataModel[key];
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export { ExportApi };
|
||||
@@ -0,0 +1,18 @@
|
||||
import { Logger } from 'util/logger';
|
||||
|
||||
const logger = new Logger(
|
||||
'focus-manager',
|
||||
undefined,
|
||||
localStorage.debugFocusManager ? Logger.Level.Debug : Logger.Level.Info
|
||||
);
|
||||
|
||||
const FocusManager = {
|
||||
modal: null,
|
||||
|
||||
setModal(modal) {
|
||||
this.modal = modal;
|
||||
logger.debug('Set modal', modal);
|
||||
}
|
||||
};
|
||||
|
||||
export { FocusManager };
|
||||
@@ -0,0 +1,177 @@
|
||||
import { AppSettingsModel } from 'models/app-settings-model';
|
||||
import { Locale } from 'util/locale';
|
||||
|
||||
const GeneratorPresets = {
|
||||
get defaultPreset() {
|
||||
return {
|
||||
name: 'Default',
|
||||
title: Locale.genPresetDefault,
|
||||
length: 16,
|
||||
upper: true,
|
||||
lower: true,
|
||||
digits: true
|
||||
};
|
||||
},
|
||||
|
||||
get browserExtensionPreset() {
|
||||
return {
|
||||
name: 'BrowserExtension',
|
||||
length: 20,
|
||||
upper: true,
|
||||
lower: true,
|
||||
special: true,
|
||||
brackets: true,
|
||||
ambiguous: true
|
||||
};
|
||||
},
|
||||
|
||||
get builtIn() {
|
||||
return [
|
||||
this.defaultPreset,
|
||||
{
|
||||
name: 'Pronounceable',
|
||||
title: Locale.genPresetPronounceable,
|
||||
length: 10,
|
||||
lower: true,
|
||||
upper: true
|
||||
},
|
||||
{
|
||||
name: 'Med',
|
||||
title: Locale.genPresetMed,
|
||||
length: 16,
|
||||
upper: true,
|
||||
lower: true,
|
||||
digits: true,
|
||||
special: true,
|
||||
brackets: true,
|
||||
ambiguous: true
|
||||
},
|
||||
{
|
||||
name: 'Long',
|
||||
title: Locale.genPresetLong,
|
||||
length: 32,
|
||||
upper: true,
|
||||
lower: true,
|
||||
digits: true
|
||||
},
|
||||
{ name: 'Pin4', title: Locale.genPresetPin4, length: 4, digits: true },
|
||||
{
|
||||
name: 'Mac',
|
||||
title: Locale.genPresetMac,
|
||||
length: 17,
|
||||
include: '0123456789ABCDEF',
|
||||
pattern: 'XX-'
|
||||
},
|
||||
{
|
||||
name: 'Hash128',
|
||||
title: Locale.genPresetHash128,
|
||||
length: 32,
|
||||
include: '0123456789abcdef'
|
||||
},
|
||||
{
|
||||
name: 'Hash256',
|
||||
title: Locale.genPresetHash256,
|
||||
length: 64,
|
||||
include: '0123456789abcdef'
|
||||
}
|
||||
];
|
||||
},
|
||||
|
||||
get all() {
|
||||
let presets = this.builtIn;
|
||||
presets.forEach((preset) => {
|
||||
preset.builtIn = true;
|
||||
});
|
||||
const setting = AppSettingsModel.generatorPresets;
|
||||
if (setting) {
|
||||
if (setting.user) {
|
||||
presets = presets.concat(setting.user.map((item) => ({ ...item })));
|
||||
}
|
||||
let hasDefault = false;
|
||||
presets.forEach((preset) => {
|
||||
if (setting.disabled && setting.disabled[preset.name]) {
|
||||
preset.disabled = true;
|
||||
}
|
||||
if (setting.default === preset.name) {
|
||||
hasDefault = true;
|
||||
preset.default = true;
|
||||
}
|
||||
});
|
||||
if (!hasDefault) {
|
||||
presets[0].default = true;
|
||||
}
|
||||
}
|
||||
return presets;
|
||||
},
|
||||
|
||||
get enabled() {
|
||||
const allPresets = this.all.filter((preset) => !preset.disabled);
|
||||
if (!allPresets.length) {
|
||||
allPresets.push(this.defaultPreset);
|
||||
}
|
||||
return allPresets;
|
||||
},
|
||||
|
||||
getOrCreateSetting() {
|
||||
let setting = AppSettingsModel.generatorPresets;
|
||||
if (!setting) {
|
||||
setting = { user: [] };
|
||||
}
|
||||
return setting;
|
||||
},
|
||||
|
||||
add(preset) {
|
||||
const setting = this.getOrCreateSetting();
|
||||
if (preset.name && !setting.user.filter((p) => p.name === preset.name).length) {
|
||||
setting.user.push(preset);
|
||||
this.save(setting);
|
||||
}
|
||||
},
|
||||
|
||||
remove(name) {
|
||||
const setting = this.getOrCreateSetting();
|
||||
setting.user = setting.user.filter((p) => p.name !== name);
|
||||
this.save(setting);
|
||||
},
|
||||
|
||||
setPreset(name, props) {
|
||||
const setting = this.getOrCreateSetting();
|
||||
const preset = setting.user.filter((p) => p.name === name)[0];
|
||||
if (preset) {
|
||||
Object.assign(preset, props);
|
||||
this.save(setting);
|
||||
}
|
||||
},
|
||||
|
||||
setDisabled(name, disabled) {
|
||||
const setting = this.getOrCreateSetting();
|
||||
if (disabled) {
|
||||
if (!setting.disabled) {
|
||||
setting.disabled = {};
|
||||
}
|
||||
setting.disabled[name] = true;
|
||||
} else {
|
||||
if (setting.disabled) {
|
||||
delete setting.disabled[name];
|
||||
}
|
||||
}
|
||||
this.save(setting);
|
||||
},
|
||||
|
||||
setDefault(name) {
|
||||
const setting = this.getOrCreateSetting();
|
||||
if (name) {
|
||||
setting.default = name;
|
||||
} else {
|
||||
delete setting.default;
|
||||
}
|
||||
this.save(setting);
|
||||
},
|
||||
|
||||
save(setting) {
|
||||
AppSettingsModel.set({ generatorPresets: undefined }, { silent: true });
|
||||
AppSettingsModel.generatorPresets = setting;
|
||||
}
|
||||
};
|
||||
|
||||
export { GeneratorPresets };
|
||||
@@ -0,0 +1,37 @@
|
||||
import * as kdbxweb from 'kdbxweb';
|
||||
import { Logger } from 'util/logger';
|
||||
|
||||
const logger = new Logger('online-password-checker');
|
||||
|
||||
const exposedPasswords = {};
|
||||
|
||||
function checkIfPasswordIsExposedOnline(password) {
|
||||
if (!password || !password.isProtected || !password.byteLength) {
|
||||
return false;
|
||||
}
|
||||
const saltedValue = password.saltedValue();
|
||||
const cached = exposedPasswords[saltedValue];
|
||||
if (cached !== undefined) {
|
||||
return cached;
|
||||
}
|
||||
const passwordBytes = password.getBinary();
|
||||
return crypto.subtle
|
||||
.digest({ name: 'SHA-1' }, passwordBytes)
|
||||
.then((sha1) => {
|
||||
kdbxweb.ByteUtils.zeroBuffer(passwordBytes);
|
||||
sha1 = kdbxweb.ByteUtils.bytesToHex(sha1).toUpperCase();
|
||||
const shaFirst = sha1.substr(0, 5);
|
||||
return fetch(`https://api.pwnedpasswords.com/range/${shaFirst}`)
|
||||
.then((response) => response.text())
|
||||
.then((response) => {
|
||||
const isPresent = response.includes(sha1.substr(5));
|
||||
exposedPasswords[saltedValue] = isPresent;
|
||||
return isPresent;
|
||||
});
|
||||
})
|
||||
.catch((e) => {
|
||||
logger.error('Error checking password online', e);
|
||||
});
|
||||
}
|
||||
|
||||
export { checkIfPasswordIsExposedOnline };
|
||||
@@ -0,0 +1,99 @@
|
||||
import { SearchResultCollection } from 'collections/search-result-collection';
|
||||
import { Ranking } from 'util/data/ranking';
|
||||
|
||||
const urlPartsRegex = /^(\w+:\/\/)?(?:(?:www|wwws|secure)\.)?([^\/]+)\/?(.*)/;
|
||||
|
||||
class SelectEntryFilter {
|
||||
constructor(windowInfo, appModel, files, filterOptions) {
|
||||
this.title = windowInfo.title;
|
||||
this.useTitle = !!windowInfo.title && !windowInfo.url;
|
||||
this.url = windowInfo.url;
|
||||
this.useUrl = !!windowInfo.url;
|
||||
this.subdomains = true;
|
||||
this.text = '';
|
||||
this.appModel = appModel;
|
||||
this.files = files;
|
||||
this.filterOptions = filterOptions;
|
||||
}
|
||||
|
||||
getEntries() {
|
||||
const filter = {
|
||||
text: this.text,
|
||||
...this.filterOptions
|
||||
};
|
||||
let entries = this.appModel
|
||||
.getEntriesByFilter(filter, this.files)
|
||||
.map((e) => [e, this._getEntryRank(e)]);
|
||||
if (this.useUrl || this.useTitle) {
|
||||
entries = entries.filter((e) => e[1]);
|
||||
}
|
||||
entries = entries.sort((x, y) =>
|
||||
x[1] === y[1] ? x[0].title.localeCompare(y[0].title) : y[1] - x[1]
|
||||
);
|
||||
entries = entries.map((p) => p[0]);
|
||||
return new SearchResultCollection(entries, { comparator: 'none' });
|
||||
}
|
||||
|
||||
_getEntryRank(entry) {
|
||||
let titleRank = 0;
|
||||
let urlRank = 0;
|
||||
|
||||
if (this.useTitle && this.title && entry.title) {
|
||||
titleRank = Ranking.getStringRank(entry.title.toLowerCase(), this.title.toLowerCase());
|
||||
if (!titleRank) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (this.useUrl && this.url) {
|
||||
const searchUrlLower = this.url.toLowerCase();
|
||||
const searchUrlParts = urlPartsRegex.exec(searchUrlLower);
|
||||
|
||||
for (const url of entry.getAllUrls()) {
|
||||
const entryUrlParts = urlPartsRegex.exec(url.toLowerCase());
|
||||
if (entryUrlParts) {
|
||||
const [, scheme, domain, path] = entryUrlParts;
|
||||
const [, searchScheme, searchDomain, searchPath] = searchUrlParts;
|
||||
if (
|
||||
domain === searchDomain ||
|
||||
(this.subdomains && searchDomain.indexOf('.' + domain) > 0)
|
||||
) {
|
||||
if (domain === searchDomain) {
|
||||
urlRank += 20;
|
||||
} else {
|
||||
urlRank += 10;
|
||||
}
|
||||
if (path === searchPath) {
|
||||
urlRank += 10;
|
||||
} else if (path && searchPath) {
|
||||
if (path.lastIndexOf(searchPath, 0) === 0) {
|
||||
urlRank += 5;
|
||||
} else if (searchPath.lastIndexOf(path, 0) === 0) {
|
||||
urlRank += 3;
|
||||
}
|
||||
}
|
||||
if (scheme === searchScheme) {
|
||||
urlRank += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (entry.searchText.includes(searchUrlLower)) {
|
||||
// the url is in some field; include it
|
||||
urlRank += 5;
|
||||
}
|
||||
}
|
||||
|
||||
if (this.useTitle && !titleRank) {
|
||||
return 0;
|
||||
}
|
||||
if (this.useUrl && !urlRank) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return titleRank + urlRank;
|
||||
}
|
||||
}
|
||||
|
||||
export { SelectEntryFilter };
|
||||
@@ -0,0 +1,138 @@
|
||||
import { Launcher } from 'comp/launcher';
|
||||
import { Keys } from 'const/keys';
|
||||
import { AppSettingsModel } from 'models/app-settings-model';
|
||||
import { Features } from 'util/features';
|
||||
import { StringFormat } from 'util/formatting/string-format';
|
||||
import { Locale } from 'util/locale';
|
||||
|
||||
let allowedKeys;
|
||||
|
||||
function getAllowedKeys() {
|
||||
if (!allowedKeys) {
|
||||
allowedKeys = {};
|
||||
for (const [name, code] of Object.entries(Keys)) {
|
||||
const keyName = name.replace('DOM_VK_', '');
|
||||
if (/^([0-9A-Z]|F\d{1,2})$/.test(keyName)) {
|
||||
allowedKeys[code] = keyName;
|
||||
}
|
||||
}
|
||||
}
|
||||
return allowedKeys;
|
||||
}
|
||||
|
||||
const globalShortcuts = {
|
||||
copyPassword: { mac: 'Ctrl+Alt+C', all: 'Shift+Alt+C' },
|
||||
copyUser: { mac: 'Ctrl+Alt+B', all: 'Shift+Alt+B' },
|
||||
copyUrl: { mac: 'Ctrl+Alt+U', all: 'Shift+Alt+U' },
|
||||
copyOtp: {},
|
||||
autoType: { mac: 'Ctrl+Alt+T', all: 'Shift+Alt+T' },
|
||||
restoreApp: {}
|
||||
};
|
||||
|
||||
const Shortcuts = {
|
||||
keyEventToShortcut(event) {
|
||||
const modifiers = [];
|
||||
if (event.ctrlKey) {
|
||||
modifiers.push('Ctrl');
|
||||
}
|
||||
if (event.altKey) {
|
||||
modifiers.push('Alt');
|
||||
}
|
||||
if (event.shiftKey) {
|
||||
modifiers.push('Shift');
|
||||
}
|
||||
if (Features.isMac && event.metaKey) {
|
||||
modifiers.push('Meta');
|
||||
}
|
||||
const keyName = getAllowedKeys()[event.which];
|
||||
return {
|
||||
value: modifiers.join('+') + '+' + (keyName || '…'),
|
||||
valid: modifiers.length > 0 && !!keyName
|
||||
};
|
||||
},
|
||||
presentShortcut(shortcutValue, formatting) {
|
||||
if (!shortcutValue) {
|
||||
return '-';
|
||||
}
|
||||
return shortcutValue
|
||||
.split(/\+/g)
|
||||
.map((part) => {
|
||||
switch (part) {
|
||||
case 'Ctrl':
|
||||
return this.ctrlShortcutSymbol(formatting);
|
||||
case 'Alt':
|
||||
return this.altShortcutSymbol(formatting);
|
||||
case 'Shift':
|
||||
return this.shiftShortcutSymbol(formatting);
|
||||
case 'Meta':
|
||||
return this.actionShortcutSymbol(formatting);
|
||||
default:
|
||||
return part;
|
||||
}
|
||||
})
|
||||
.join('');
|
||||
},
|
||||
actionShortcutSymbol(formatting) {
|
||||
return Features.isMac ? '⌘' : this.formatShortcut(Locale.ctrlKey, formatting);
|
||||
},
|
||||
altShortcutSymbol(formatting) {
|
||||
return Features.isMac ? '⌥' : this.formatShortcut(Locale.altKey, formatting);
|
||||
},
|
||||
shiftShortcutSymbol(formatting) {
|
||||
return Features.isMac ? '⇧' : this.formatShortcut(Locale.shiftKey, formatting);
|
||||
},
|
||||
ctrlShortcutSymbol(formatting) {
|
||||
return Features.isMac ? '⌃' : this.formatShortcut(Locale.ctrlKey, formatting);
|
||||
},
|
||||
formatShortcut(shortcut, formatting) {
|
||||
return formatting ? `${shortcut} + ` : `${shortcut}+`;
|
||||
},
|
||||
globalShortcutText(type, formatting) {
|
||||
return this.presentShortcut(this.globalShortcut(type), formatting);
|
||||
},
|
||||
globalShortcut(type) {
|
||||
const appSettingsShortcut = AppSettingsModel[this.globalShortcutAppSettingsKey(type)];
|
||||
if (appSettingsShortcut) {
|
||||
return appSettingsShortcut;
|
||||
}
|
||||
const globalShortcut = globalShortcuts[type];
|
||||
if (globalShortcut) {
|
||||
if (Features.isMac && globalShortcut.mac) {
|
||||
return globalShortcut.mac;
|
||||
}
|
||||
return globalShortcut.all;
|
||||
}
|
||||
return undefined;
|
||||
},
|
||||
setGlobalShortcut(type, value) {
|
||||
if (!globalShortcuts[type]) {
|
||||
throw new Error('Bad shortcut: ' + type);
|
||||
}
|
||||
if (value) {
|
||||
AppSettingsModel[this.globalShortcutAppSettingsKey(type)] = value;
|
||||
} else {
|
||||
delete AppSettingsModel[this.globalShortcutAppSettingsKey(type)];
|
||||
}
|
||||
Launcher.setGlobalShortcuts(AppSettingsModel);
|
||||
},
|
||||
globalShortcutAppSettingsKey(type) {
|
||||
return 'globalShortcut' + StringFormat.capFirst(type);
|
||||
},
|
||||
screenshotToClipboardShortcut() {
|
||||
if (Features.isiOS) {
|
||||
return 'Sleep+Home';
|
||||
}
|
||||
if (Features.isMobile) {
|
||||
return '';
|
||||
}
|
||||
if (Features.isMac) {
|
||||
return 'Command-Shift-Control-4';
|
||||
}
|
||||
if (Features.isWindows) {
|
||||
return 'Alt+PrintScreen';
|
||||
}
|
||||
return '';
|
||||
}
|
||||
};
|
||||
|
||||
export { Shortcuts };
|
||||
@@ -1,5 +1,5 @@
|
||||
const Backbone = require('backbone');
|
||||
const Launcher = require('./launcher');
|
||||
import { Events } from 'framework/events';
|
||||
import { Launcher } from 'comp/launcher';
|
||||
|
||||
const LocalStorageKeyName = 'instanceCheck';
|
||||
const LocalStorageResponseKeyName = 'instanceMaster';
|
||||
@@ -7,7 +7,7 @@ const LocalStorageResponseKeyName = 'instanceMaster';
|
||||
const instanceKey = Date.now().toString();
|
||||
|
||||
const SingleInstanceChecker = {
|
||||
init: function() {
|
||||
init() {
|
||||
if (Launcher) {
|
||||
return;
|
||||
}
|
||||
@@ -15,24 +15,29 @@ const SingleInstanceChecker = {
|
||||
SingleInstanceChecker.setKey(LocalStorageKeyName, instanceKey);
|
||||
},
|
||||
|
||||
storageChanged: function(e) {
|
||||
storageChanged(e) {
|
||||
if (!e.newValue) {
|
||||
return;
|
||||
}
|
||||
if (e.key === LocalStorageKeyName && e.newValue !== instanceKey) {
|
||||
SingleInstanceChecker.setKey(LocalStorageResponseKeyName, instanceKey + Math.random().toString());
|
||||
SingleInstanceChecker.setKey(
|
||||
LocalStorageResponseKeyName,
|
||||
instanceKey + Math.random().toString()
|
||||
);
|
||||
} else if (e.key === LocalStorageResponseKeyName && e.newValue.indexOf(instanceKey) < 0) {
|
||||
window.removeEventListener('storage', SingleInstanceChecker.storageChanged);
|
||||
Backbone.trigger('second-instance');
|
||||
Events.emit('second-instance');
|
||||
}
|
||||
},
|
||||
|
||||
setKey: function(key, value) {
|
||||
setKey(key, value) {
|
||||
try {
|
||||
localStorage.setItem(key, value);
|
||||
setTimeout(() => { localStorage.removeItem(key); }, 100);
|
||||
setTimeout(() => {
|
||||
localStorage.removeItem(key);
|
||||
}, 100);
|
||||
} catch (e) {}
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = SingleInstanceChecker;
|
||||
export { SingleInstanceChecker };
|
||||
@@ -0,0 +1,54 @@
|
||||
import { Logger } from 'util/logger';
|
||||
|
||||
const logger = new Logger('start-profiler');
|
||||
|
||||
let lastTs = 0;
|
||||
|
||||
const operations = [];
|
||||
|
||||
const StartProfiler = {
|
||||
milestone(name) {
|
||||
const ts = logger.ts();
|
||||
const elapsed = ts - lastTs;
|
||||
lastTs = ts;
|
||||
operations.push({ name, elapsed });
|
||||
},
|
||||
|
||||
report() {
|
||||
const networkTime = this.getNetworkTime();
|
||||
operations.unshift({ name: 'fetching', elapsed: networkTime });
|
||||
|
||||
const time = Math.round(performance.now());
|
||||
|
||||
this.printReport('App', operations, time);
|
||||
},
|
||||
|
||||
reportAppProfile(data) {
|
||||
this.printReport('Electron app', data.timings, data.totalTime);
|
||||
},
|
||||
|
||||
printReport(name, operations, totalTime) {
|
||||
const message =
|
||||
`${name} started in ${totalTime}ms: ` +
|
||||
operations.map((op) => `${op.name}=${Math.round(op.elapsed)}ms`).join(', ');
|
||||
|
||||
logger.info(message);
|
||||
},
|
||||
|
||||
getNetworkTime() {
|
||||
let perfEntry;
|
||||
|
||||
if (performance.getEntriesByType) {
|
||||
[perfEntry] = performance.getEntriesByType('navigation');
|
||||
}
|
||||
if (!perfEntry || !perfEntry.responseEnd || !perfEntry.fetchStart) {
|
||||
perfEntry = performance.timing;
|
||||
}
|
||||
|
||||
return perfEntry.responseEnd - perfEntry.fetchStart;
|
||||
}
|
||||
};
|
||||
|
||||
StartProfiler.milestone('pre-init');
|
||||
|
||||
export { StartProfiler };
|
||||
@@ -0,0 +1,306 @@
|
||||
import * as kdbxweb from 'kdbxweb';
|
||||
import { Events } from 'framework/events';
|
||||
import { RuntimeInfo } from 'const/runtime-info';
|
||||
import { Transport } from 'comp/browser/transport';
|
||||
import { Launcher } from 'comp/launcher';
|
||||
import { Links } from 'const/links';
|
||||
import { AppSettingsModel } from 'models/app-settings-model';
|
||||
import { UpdateModel } from 'models/update-model';
|
||||
import { SemVer } from 'util/data/semver';
|
||||
import { Logger } from 'util/logger';
|
||||
import { SignatureVerifier } from 'util/data/signature-verifier';
|
||||
|
||||
const logger = new Logger('updater');
|
||||
|
||||
const Updater = {
|
||||
UpdateInterval: 1000 * 60 * 60 * 24,
|
||||
MinUpdateTimeout: 500,
|
||||
MinUpdateSize: 10000,
|
||||
nextCheckTimeout: null,
|
||||
updateCheckDate: new Date(0),
|
||||
enabled: Launcher?.updaterEnabled(),
|
||||
|
||||
getAutoUpdateType() {
|
||||
if (!this.enabled) {
|
||||
return false;
|
||||
}
|
||||
let autoUpdate = AppSettingsModel.autoUpdate;
|
||||
if (autoUpdate && autoUpdate === true) {
|
||||
autoUpdate = 'install';
|
||||
}
|
||||
return autoUpdate;
|
||||
},
|
||||
|
||||
updateInProgress() {
|
||||
return (
|
||||
UpdateModel.status === 'checking' ||
|
||||
['downloading', 'extracting', 'updating'].indexOf(UpdateModel.updateStatus) >= 0
|
||||
);
|
||||
},
|
||||
|
||||
init() {
|
||||
this.scheduleNextCheck();
|
||||
if (!Launcher && navigator.serviceWorker && !RuntimeInfo.beta && !RuntimeInfo.devMode) {
|
||||
navigator.serviceWorker
|
||||
.register('service-worker.js')
|
||||
.then((reg) => {
|
||||
logger.info('Service worker registered');
|
||||
reg.addEventListener('updatefound', () => {
|
||||
if (reg.active) {
|
||||
logger.info('Service worker found an update');
|
||||
UpdateModel.set({ updateStatus: 'ready' });
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch((e) => {
|
||||
logger.error('Failed to register a service worker', e);
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
scheduleNextCheck() {
|
||||
if (this.nextCheckTimeout) {
|
||||
clearTimeout(this.nextCheckTimeout);
|
||||
this.nextCheckTimeout = null;
|
||||
}
|
||||
if (!this.getAutoUpdateType()) {
|
||||
return;
|
||||
}
|
||||
let timeDiff = this.MinUpdateTimeout;
|
||||
const lastCheckDate = UpdateModel.lastCheckDate;
|
||||
if (lastCheckDate) {
|
||||
timeDiff = Math.min(
|
||||
Math.max(this.UpdateInterval + (lastCheckDate - new Date()), this.MinUpdateTimeout),
|
||||
this.UpdateInterval
|
||||
);
|
||||
}
|
||||
this.nextCheckTimeout = setTimeout(this.check.bind(this), timeDiff);
|
||||
logger.info('Next update check will happen in ' + Math.round(timeDiff / 1000) + 's');
|
||||
},
|
||||
|
||||
check(startedByUser) {
|
||||
if (!this.enabled || this.updateInProgress()) {
|
||||
return;
|
||||
}
|
||||
UpdateModel.set({ status: 'checking' });
|
||||
if (!startedByUser) {
|
||||
// additional protection from broken program logic, to ensure that auto-checks are not performed more than once an hour
|
||||
const diffMs = new Date() - this.updateCheckDate;
|
||||
if (isNaN(diffMs) || diffMs < 1000 * 60 * 60) {
|
||||
logger.error(
|
||||
'Prevented update check; last check was performed at ' + this.updateCheckDate
|
||||
);
|
||||
this.scheduleNextCheck();
|
||||
return;
|
||||
}
|
||||
this.updateCheckDate = new Date();
|
||||
}
|
||||
logger.info('Checking for update...');
|
||||
Transport.httpGet({
|
||||
url: Links.UpdateJson,
|
||||
json: true,
|
||||
success: (updateJson) => {
|
||||
const dt = new Date();
|
||||
logger.info('Update check: ' + (updateJson.version || 'unknown'));
|
||||
if (!updateJson.version) {
|
||||
const errMsg = 'No version info found';
|
||||
UpdateModel.set({
|
||||
status: 'error',
|
||||
lastCheckDate: dt,
|
||||
lastCheckError: errMsg
|
||||
});
|
||||
UpdateModel.save();
|
||||
this.scheduleNextCheck();
|
||||
return;
|
||||
}
|
||||
const prevLastVersion = UpdateModel.lastVersion;
|
||||
UpdateModel.set({
|
||||
status: 'ok',
|
||||
lastCheckDate: dt,
|
||||
lastSuccessCheckDate: dt,
|
||||
lastVersionReleaseDate: new Date(updateJson.date),
|
||||
lastVersion: updateJson.version,
|
||||
lastCheckError: null,
|
||||
lastCheckUpdMin: updateJson.minVersion || null
|
||||
});
|
||||
UpdateModel.save();
|
||||
this.scheduleNextCheck();
|
||||
if (!this.canAutoUpdate()) {
|
||||
return;
|
||||
}
|
||||
if (
|
||||
prevLastVersion === UpdateModel.lastVersion &&
|
||||
UpdateModel.updateStatus === 'ready'
|
||||
) {
|
||||
logger.info('Waiting for the user to apply downloaded update');
|
||||
return;
|
||||
}
|
||||
if (!startedByUser && this.getAutoUpdateType() === 'install') {
|
||||
this.update(startedByUser);
|
||||
} else if (
|
||||
SemVer.compareVersions(UpdateModel.lastVersion, RuntimeInfo.version) > 0
|
||||
) {
|
||||
UpdateModel.set({ updateStatus: 'found' });
|
||||
}
|
||||
},
|
||||
error: (e) => {
|
||||
logger.error('Update check error', e);
|
||||
UpdateModel.set({
|
||||
status: 'error',
|
||||
lastCheckDate: new Date(),
|
||||
lastCheckError: 'Error checking last version'
|
||||
});
|
||||
UpdateModel.save();
|
||||
this.scheduleNextCheck();
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
canAutoUpdate() {
|
||||
const minLauncherVersion = UpdateModel.lastCheckUpdMin;
|
||||
if (minLauncherVersion) {
|
||||
const cmp = SemVer.compareVersions(RuntimeInfo.version, minLauncherVersion);
|
||||
if (cmp < 0) {
|
||||
UpdateModel.set({ updateStatus: 'ready', updateManual: true });
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
},
|
||||
|
||||
update(startedByUser, successCallback) {
|
||||
const ver = UpdateModel.lastVersion;
|
||||
if (!this.enabled) {
|
||||
logger.info('Updater is disabled');
|
||||
return;
|
||||
}
|
||||
if (SemVer.compareVersions(RuntimeInfo.version, ver) >= 0) {
|
||||
logger.info('You are using the latest version');
|
||||
return;
|
||||
}
|
||||
UpdateModel.set({ updateStatus: 'downloading', updateError: null });
|
||||
logger.info('Downloading update', ver);
|
||||
const updateAssetName = this.getUpdateAssetName(ver);
|
||||
if (!updateAssetName) {
|
||||
logger.error('Empty updater asset name for', Launcher.platform(), Launcher.arch());
|
||||
return;
|
||||
}
|
||||
const updateUrlBasePath = Links.UpdateBasePath.replace('{ver}', ver);
|
||||
const updateAssetUrl = updateUrlBasePath + updateAssetName;
|
||||
Transport.httpGet({
|
||||
url: updateAssetUrl,
|
||||
file: updateAssetName,
|
||||
cleanupOldFiles: true,
|
||||
cache: true,
|
||||
success: (assetFilePath) => {
|
||||
logger.info('Downloading update signatures');
|
||||
Transport.httpGet({
|
||||
url: updateUrlBasePath + 'Verify.sign.sha256',
|
||||
text: true,
|
||||
file: updateAssetName + '.sign',
|
||||
cleanupOldFiles: true,
|
||||
cache: true,
|
||||
success: (assetFileSignaturePath) => {
|
||||
this.verifySignature(assetFilePath, updateAssetName, (err, valid) => {
|
||||
if (err || !valid) {
|
||||
UpdateModel.set({
|
||||
updateStatus: 'error',
|
||||
updateError: err
|
||||
? 'Error verifying update signature'
|
||||
: 'Invalid update signature'
|
||||
});
|
||||
Launcher.deleteFile(assetFilePath);
|
||||
Launcher.deleteFile(assetFileSignaturePath);
|
||||
return;
|
||||
}
|
||||
logger.info('Update is ready', assetFilePath);
|
||||
UpdateModel.set({ updateStatus: 'ready', updateError: null });
|
||||
if (!startedByUser) {
|
||||
Events.emit('update-app');
|
||||
}
|
||||
if (typeof successCallback === 'function') {
|
||||
successCallback();
|
||||
}
|
||||
});
|
||||
},
|
||||
error(e) {
|
||||
logger.error('Error downloading update signatures', e);
|
||||
UpdateModel.set({
|
||||
updateStatus: 'error',
|
||||
updateError: 'Error downloading update signatures'
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
error(e) {
|
||||
logger.error('Error downloading update', e);
|
||||
UpdateModel.set({
|
||||
updateStatus: 'error',
|
||||
updateError: 'Error downloading update'
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
verifySignature(assetFilePath, assetName, callback) {
|
||||
logger.info('Verifying update signature', assetName);
|
||||
const fs = Launcher.req('fs');
|
||||
const signaturesTxt = fs.readFileSync(assetFilePath + '.sign', 'utf8');
|
||||
const assetSignatureLine = signaturesTxt
|
||||
.split('\n')
|
||||
.find((line) => line.endsWith(assetName));
|
||||
if (!assetSignatureLine) {
|
||||
logger.error('Signature not found for asset', assetName);
|
||||
callback('Asset signature not found');
|
||||
return;
|
||||
}
|
||||
const signature = kdbxweb.ByteUtils.hexToBytes(assetSignatureLine.split(' ')[0]);
|
||||
const fileBytes = fs.readFileSync(assetFilePath);
|
||||
SignatureVerifier.verify(fileBytes, signature)
|
||||
.catch((e) => {
|
||||
logger.error('Error verifying signature', e);
|
||||
callback('Error verifying signature');
|
||||
})
|
||||
.then((valid) => {
|
||||
logger.info(`Update asset signature is ${valid ? 'valid' : 'invalid'}`);
|
||||
callback(undefined, valid);
|
||||
});
|
||||
},
|
||||
|
||||
getUpdateAssetName(ver) {
|
||||
const platform = Launcher.platform();
|
||||
const arch = Launcher.arch();
|
||||
switch (platform) {
|
||||
case 'win32':
|
||||
switch (arch) {
|
||||
case 'x64':
|
||||
return `KeeWeb-${ver}.win.x64.exe`;
|
||||
case 'ia32':
|
||||
return `KeeWeb-${ver}.win.ia32.exe`;
|
||||
case 'arm64':
|
||||
return `KeeWeb-${ver}.win.arm64.exe`;
|
||||
}
|
||||
break;
|
||||
case 'darwin':
|
||||
switch (arch) {
|
||||
case 'x64':
|
||||
return `KeeWeb-${ver}.mac.x64.dmg`;
|
||||
case 'arm64':
|
||||
return `KeeWeb-${ver}.mac.arm64.dmg`;
|
||||
}
|
||||
break;
|
||||
}
|
||||
return undefined;
|
||||
},
|
||||
|
||||
installAndRestart() {
|
||||
if (!Launcher) {
|
||||
return;
|
||||
}
|
||||
const updateAssetName = this.getUpdateAssetName(UpdateModel.lastVersion);
|
||||
const updateFilePath = Transport.cacheFilePath(updateAssetName);
|
||||
Launcher.requestRestartAndUpdate(updateFilePath);
|
||||
}
|
||||
};
|
||||
|
||||
export { Updater };
|
||||
@@ -0,0 +1,69 @@
|
||||
import { Events } from 'framework/events';
|
||||
import { Logger } from 'util/logger';
|
||||
import { NativeModules } from 'comp/launcher/native-modules';
|
||||
import { AppSettingsModel } from 'models/app-settings-model';
|
||||
import { Features } from 'util/features';
|
||||
|
||||
const logger = new Logger('usb-listener');
|
||||
|
||||
const UsbListener = {
|
||||
supported: Features.isDesktop,
|
||||
attachedYubiKeys: 0,
|
||||
|
||||
init() {
|
||||
if (!this.supported) {
|
||||
return;
|
||||
}
|
||||
|
||||
Events.on('native-modules-yubikeys', (e) => {
|
||||
if (e.numYubiKeys !== this.attachedYubiKeys) {
|
||||
logger.debug(`YubiKeys changed ${this.attachedYubiKeys} => ${e.numYubiKeys}`);
|
||||
this.attachedYubiKeys = e.numYubiKeys;
|
||||
Events.emit('usb-devices-changed');
|
||||
}
|
||||
});
|
||||
|
||||
AppSettingsModel.on('change:enableUsb', (model, enabled) => {
|
||||
if (enabled) {
|
||||
this.start();
|
||||
} else {
|
||||
this.stop();
|
||||
}
|
||||
});
|
||||
|
||||
if (AppSettingsModel.enableUsb) {
|
||||
this.start();
|
||||
}
|
||||
},
|
||||
|
||||
start() {
|
||||
logger.info('Starting USB listener');
|
||||
|
||||
if (this.usb) {
|
||||
this.stop();
|
||||
}
|
||||
|
||||
try {
|
||||
NativeModules.startUsbListener();
|
||||
} catch (e) {
|
||||
logger.error('Error starting USB listener', e);
|
||||
}
|
||||
},
|
||||
|
||||
stop() {
|
||||
logger.info('Stopping USB listener');
|
||||
|
||||
try {
|
||||
NativeModules.stopUsbListener();
|
||||
} catch (e) {
|
||||
logger.error('Error stopping USB listener', e);
|
||||
}
|
||||
|
||||
if (this.attachedYubiKeys) {
|
||||
this.attachedYubiKeys = 0;
|
||||
Events.emit('usb-devices-changed');
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export { UsbListener };
|
||||
@@ -0,0 +1,291 @@
|
||||
import { Events } from 'framework/events';
|
||||
import { Launcher } from 'comp/launcher';
|
||||
import { NativeModules } from 'comp/launcher/native-modules';
|
||||
import { Logger } from 'util/logger';
|
||||
import { UsbListener } from 'comp/app/usb-listener';
|
||||
import { AppSettingsModel } from 'models/app-settings-model';
|
||||
import { Timeouts } from 'const/timeouts';
|
||||
import { YubiKeyProductIds, YubiKeyChallengeSize } from 'const/hardware';
|
||||
import { Locale } from 'util/locale';
|
||||
|
||||
const logger = new Logger('yubikey');
|
||||
|
||||
const YubiKey = {
|
||||
ykmanStatus: undefined,
|
||||
process: null,
|
||||
aborted: false,
|
||||
|
||||
cmd() {
|
||||
if (this._cmd) {
|
||||
return this._cmd;
|
||||
}
|
||||
const macYkmanPath = '/usr/local/bin/ykman';
|
||||
if (Launcher.platform() === 'darwin' && Launcher.fileExistsSync(macYkmanPath)) {
|
||||
this._cmd = macYkmanPath;
|
||||
} else {
|
||||
this._cmd = 'ykman';
|
||||
}
|
||||
return this._cmd;
|
||||
},
|
||||
|
||||
checkToolStatus() {
|
||||
if (this.ykmanStatus === 'ok') {
|
||||
return Promise.resolve(this.ykmanStatus);
|
||||
}
|
||||
return new Promise((resolve) => {
|
||||
this.ykmanStatus = 'checking';
|
||||
this._cmd = undefined;
|
||||
Launcher.spawn({
|
||||
cmd: this.cmd(),
|
||||
args: ['-v'],
|
||||
noStdOutLogging: true,
|
||||
complete: (err, stdout, code) => {
|
||||
if (err || code !== 0) {
|
||||
this.ykmanStatus = 'error';
|
||||
} else {
|
||||
this.ykmanStatus = 'ok';
|
||||
}
|
||||
resolve(this.ykmanStatus);
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
abort() {
|
||||
logger.info('Aborting');
|
||||
if (this.process) {
|
||||
logger.info('Killing the process');
|
||||
try {
|
||||
this.process.kill();
|
||||
} catch {}
|
||||
}
|
||||
this.aborted = true;
|
||||
this.process = null;
|
||||
},
|
||||
|
||||
list(callback) {
|
||||
NativeModules.getYubiKeys({})
|
||||
.then((yubiKeys) => {
|
||||
yubiKeys = yubiKeys.map(({ serial, vid, pid, version, slots }) => {
|
||||
return {
|
||||
vid,
|
||||
pid,
|
||||
serial,
|
||||
slots,
|
||||
fullName: this.getKeyFullName(pid, version, serial)
|
||||
};
|
||||
});
|
||||
callback(null, yubiKeys);
|
||||
})
|
||||
.catch(callback);
|
||||
},
|
||||
|
||||
getKeyFullName(pid, version, serial) {
|
||||
let name = 'YubiKey';
|
||||
if (YubiKeyProductIds.Gen1.includes(pid)) {
|
||||
name += ' Gen 1';
|
||||
} else if (YubiKeyProductIds.NEO.includes(pid)) {
|
||||
name += ' NEO';
|
||||
} else if (YubiKeyProductIds.YK4.includes(pid)) {
|
||||
if (version >= '5.1.0') {
|
||||
name += ' 5';
|
||||
}
|
||||
}
|
||||
return `${name} ${serial}`;
|
||||
},
|
||||
|
||||
listWithYkman(callback) {
|
||||
this._listWithYkman(callback, true);
|
||||
},
|
||||
|
||||
_listWithYkman(callback, canRetry) {
|
||||
if (this.process) {
|
||||
return callback('Already in progress');
|
||||
}
|
||||
this.aborted = false;
|
||||
|
||||
logger.info('Listing YubiKeys');
|
||||
|
||||
if (!UsbListener.attachedYubiKeys) {
|
||||
return callback(null, []);
|
||||
}
|
||||
|
||||
this.process = Launcher.spawn({
|
||||
cmd: this.cmd(),
|
||||
args: ['list'],
|
||||
noStdOutLogging: true,
|
||||
complete: (err, stdout) => {
|
||||
this.process = null;
|
||||
|
||||
if (this.aborted) {
|
||||
return callback('Aborted');
|
||||
}
|
||||
if (err) {
|
||||
return callback(err);
|
||||
}
|
||||
|
||||
const yubiKeysIncludingEmpty = stdout
|
||||
.trim()
|
||||
.split(/\n/g)
|
||||
.map((line) => {
|
||||
const fullName = line;
|
||||
const serial = (line.match(/\d{5,}$/g) || [])[0];
|
||||
return { fullName, serial };
|
||||
});
|
||||
|
||||
const yubiKeys = yubiKeysIncludingEmpty.filter((s) => s.serial);
|
||||
|
||||
if (
|
||||
yubiKeysIncludingEmpty.length === 1 &&
|
||||
yubiKeys.length === 0 &&
|
||||
stdout.startsWith('YubiKey') &&
|
||||
stdout.includes('CCID') &&
|
||||
!stdout.includes('Serial')
|
||||
) {
|
||||
logger.info('The YubiKey is probably stuck');
|
||||
if (!AppSettingsModel.yubiKeyStuckWorkaround) {
|
||||
return callback(Locale.yubiKeyStuckError);
|
||||
}
|
||||
if (canRetry) {
|
||||
return this._repairStuckYubiKey(callback);
|
||||
}
|
||||
}
|
||||
|
||||
if (!yubiKeys.length) {
|
||||
return callback('No YubiKeys returned by "ykman list"');
|
||||
}
|
||||
|
||||
callback(null, yubiKeys);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
_repairStuckYubiKey(callback) {
|
||||
logger.info('Repairing a stuck YubiKey');
|
||||
|
||||
let openTimeout;
|
||||
const countYubiKeys = UsbListener.attachedYubiKeys;
|
||||
const onDevicesChangedDuringRepair = () => {
|
||||
if (UsbListener.attachedYubiKeys === countYubiKeys) {
|
||||
logger.info('YubiKey was reconnected');
|
||||
Events.off('usb-devices-changed', onDevicesChangedDuringRepair);
|
||||
clearTimeout(openTimeout);
|
||||
this.aborted = false;
|
||||
setTimeout(() => {
|
||||
this._listWithYkman(callback, false);
|
||||
}, Timeouts.ExternalDeviceAfterReconnect);
|
||||
}
|
||||
};
|
||||
Events.on('usb-devices-changed', onDevicesChangedDuringRepair);
|
||||
|
||||
Launcher.spawn({
|
||||
cmd: this.cmd(),
|
||||
args: ['config', 'usb', '-e', 'oath', '-f'],
|
||||
noStdOutLogging: true,
|
||||
complete: (err) => {
|
||||
logger.info('Repair complete', err ? 'with error' : 'OK');
|
||||
if (err) {
|
||||
Events.off('usb-devices-changed', onDevicesChangedDuringRepair);
|
||||
return callback(`YubiKey repair error: ${err}`);
|
||||
}
|
||||
openTimeout = setTimeout(() => {
|
||||
Events.off('usb-devices-changed', onDevicesChangedDuringRepair);
|
||||
}, Timeouts.ExternalDeviceReconnect);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
getOtpCodes(serial, callback) {
|
||||
if (this.process) {
|
||||
return callback('Already in progress');
|
||||
}
|
||||
this.aborted = false;
|
||||
|
||||
this.process = Launcher.spawn({
|
||||
cmd: this.cmd(),
|
||||
args: ['-d', serial, 'oath', 'accounts', 'code'],
|
||||
noStdOutLogging: true,
|
||||
throwOnStdErr: true,
|
||||
complete: (err, stdout) => {
|
||||
this.process = null;
|
||||
|
||||
if (this.aborted) {
|
||||
return callback('Aborted');
|
||||
}
|
||||
if (err) {
|
||||
return callback(err);
|
||||
}
|
||||
|
||||
const codes = [];
|
||||
|
||||
for (const line of stdout.split('\n')) {
|
||||
const match = line.match(/^(.*?):(.*?)\s+(.*)$/);
|
||||
if (!match) {
|
||||
continue;
|
||||
}
|
||||
const [, title, user, code] = match;
|
||||
const needsTouch = !code.match(/^\d+$/);
|
||||
|
||||
codes.push({
|
||||
title,
|
||||
user,
|
||||
needsTouch
|
||||
});
|
||||
}
|
||||
|
||||
callback(null, codes);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
getOtp(serial, entry, callback) {
|
||||
return Launcher.spawn({
|
||||
cmd: this.cmd(),
|
||||
args: ['-d', serial, 'oath', 'accounts', 'code', '--single', entry],
|
||||
noStdOutLogging: true,
|
||||
complete: (err, stdout) => {
|
||||
if (err) {
|
||||
return callback(err);
|
||||
}
|
||||
const otp = stdout.trim();
|
||||
callback(null, otp);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
calculateChalResp(chalResp, challenge, callback) {
|
||||
const { vid, pid, serial, slot } = chalResp;
|
||||
const yubiKey = { vid, pid, serial };
|
||||
|
||||
challenge = Buffer.from(challenge);
|
||||
|
||||
// https://github.com/Yubico/yubikey-personalization-gui/issues/86
|
||||
// https://github.com/keepassxreboot/keepassxc/blob/develop/src/keys/drivers/YubiKey.cpp#L318
|
||||
|
||||
const padLen = YubiKeyChallengeSize - challenge.byteLength;
|
||||
|
||||
const paddedChallenge = Buffer.alloc(YubiKeyChallengeSize, padLen);
|
||||
challenge.copy(paddedChallenge);
|
||||
|
||||
NativeModules.yubiKeyChallengeResponse(
|
||||
yubiKey,
|
||||
[...paddedChallenge],
|
||||
slot,
|
||||
(err, result) => {
|
||||
if (result) {
|
||||
result = Buffer.from(result);
|
||||
}
|
||||
if (err) {
|
||||
err.ykError = true;
|
||||
}
|
||||
return callback(err, result);
|
||||
}
|
||||
);
|
||||
},
|
||||
|
||||
cancelChalResp() {
|
||||
NativeModules.yubiKeyCancelChallengeResponse();
|
||||
}
|
||||
};
|
||||
|
||||
export { YubiKey };
|
||||
@@ -1,34 +0,0 @@
|
||||
const FeatureDetector = require('../util/feature-detector');
|
||||
const Storage = require('../storage');
|
||||
|
||||
const AuthReceiver = {
|
||||
receive: function() {
|
||||
const opener = window.opener || window.parent;
|
||||
const message = this.urlArgsToMessage(window.location.href);
|
||||
const hasKeys = Object.keys(message).filter(key => key !== 'config').length > 0;
|
||||
if (!hasKeys) {
|
||||
return false;
|
||||
}
|
||||
if (FeatureDetector.isStandalone) {
|
||||
Storage[sessionStorage.authStorage].handleOAuthReturnMessage(message);
|
||||
return false;
|
||||
} else {
|
||||
opener.postMessage(message, window.location.origin);
|
||||
window.close();
|
||||
return true;
|
||||
}
|
||||
},
|
||||
|
||||
urlArgsToMessage: function(url) {
|
||||
const message = {};
|
||||
url.split(/[?#&]/g).forEach(part => {
|
||||
const parts = part.split('=');
|
||||
if (parts.length === 2) {
|
||||
message[parts[0]] = parts[1];
|
||||
}
|
||||
});
|
||||
return message;
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = AuthReceiver;
|
||||
@@ -0,0 +1,74 @@
|
||||
import { Events } from 'framework/events';
|
||||
import { Launcher } from 'comp/launcher';
|
||||
import { AppSettingsModel } from 'models/app-settings-model';
|
||||
|
||||
const CopyPaste = {
|
||||
simpleCopy: !!(Launcher && Launcher.clipboardSupported),
|
||||
|
||||
copy(text) {
|
||||
if (this.simpleCopy) {
|
||||
Launcher.setClipboardText(text);
|
||||
const clipboardSeconds = AppSettingsModel.clipboardSeconds;
|
||||
if (clipboardSeconds > 0) {
|
||||
const clearClipboard = () => {
|
||||
if (Launcher.getClipboardText() === text) {
|
||||
Launcher.clearClipboardText();
|
||||
}
|
||||
};
|
||||
Events.on('main-window-will-close', clearClipboard);
|
||||
setTimeout(() => {
|
||||
clearClipboard();
|
||||
Events.off('main-window-will-close', clearClipboard);
|
||||
}, clipboardSeconds * 1000);
|
||||
}
|
||||
return { success: true, seconds: clipboardSeconds };
|
||||
} else {
|
||||
try {
|
||||
if (document.execCommand('copy')) {
|
||||
return { success: true };
|
||||
}
|
||||
} catch (e) {}
|
||||
return false;
|
||||
}
|
||||
},
|
||||
|
||||
createHiddenInput(text) {
|
||||
const hiddenInput = $('<input/>')
|
||||
.val(text)
|
||||
.attr({ type: 'text', 'class': 'hide-by-pos' })
|
||||
.appendTo(document.body);
|
||||
hiddenInput[0].selectionStart = 0;
|
||||
hiddenInput[0].selectionEnd = text.length;
|
||||
hiddenInput.focus();
|
||||
hiddenInput.on({
|
||||
'copy cut paste'() {
|
||||
setTimeout(() => hiddenInput.blur(), 0);
|
||||
},
|
||||
blur() {
|
||||
hiddenInput.remove();
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
copyHtml(html) {
|
||||
const el = document.createElement('div');
|
||||
el.style.userSelect = 'auto';
|
||||
el.style.webkitUserSelect = 'auto';
|
||||
el.style.mozUserSelect = 'auto';
|
||||
el.innerHTML = html;
|
||||
document.body.appendChild(el);
|
||||
|
||||
const range = document.createRange();
|
||||
range.selectNodeContents(el);
|
||||
const sel = window.getSelection();
|
||||
sel.removeAllRanges();
|
||||
sel.addRange(range);
|
||||
|
||||
const result = document.execCommand('copy');
|
||||
|
||||
el.remove();
|
||||
return result;
|
||||
}
|
||||
};
|
||||
|
||||
export { CopyPaste };
|
||||
@@ -0,0 +1,41 @@
|
||||
import { Features } from 'util/features';
|
||||
|
||||
const FeatureTester = {
|
||||
test() {
|
||||
return Promise.resolve()
|
||||
.then(() => this.checkWebAssembly())
|
||||
.then(() => this.checkLocalStorage())
|
||||
.then(() => this.checkWebCrypto());
|
||||
},
|
||||
|
||||
checkWebAssembly() {
|
||||
try {
|
||||
const module = new global.WebAssembly.Module(
|
||||
Uint8Array.of(0x0, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00, 0x00)
|
||||
);
|
||||
return new global.WebAssembly.Instance(module) instanceof global.WebAssembly.Instance;
|
||||
} catch (e) {
|
||||
throw 'WebAssembly is not supported';
|
||||
}
|
||||
},
|
||||
|
||||
checkLocalStorage() {
|
||||
if (Features.isDesktop) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
localStorage.setItem('_test', '1');
|
||||
localStorage.removeItem('_test');
|
||||
} catch (e) {
|
||||
throw 'LocalStorage is not supported';
|
||||
}
|
||||
},
|
||||
|
||||
checkWebCrypto() {
|
||||
if (!global.crypto.subtle) {
|
||||
throw 'WebCrypto is not supported';
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export { FeatureTester };
|
||||
@@ -0,0 +1,36 @@
|
||||
import { Events } from 'framework/events';
|
||||
import { Launcher } from 'comp/launcher';
|
||||
import { Features } from 'util/features';
|
||||
|
||||
const FocusDetector = {
|
||||
init() {
|
||||
this.isFocused = true;
|
||||
this.detectsFocusWithEvents = !Features.isDesktop && !Features.isMobile;
|
||||
if (this.detectsFocusWithEvents) {
|
||||
window.addEventListener('focus', () => {
|
||||
if (!FocusDetector.isFocused) {
|
||||
FocusDetector.isFocused = true;
|
||||
Events.emit('main-window-focus');
|
||||
}
|
||||
});
|
||||
window.addEventListener('blur', () => {
|
||||
if (FocusDetector.isFocused) {
|
||||
FocusDetector.isFocused = false;
|
||||
Events.emit('main-window-blur');
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
hasFocus() {
|
||||
if (this.detectsFocusWithEvents) {
|
||||
return this.isFocused;
|
||||
} else if (Launcher) {
|
||||
return Launcher.isAppFocused();
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export { FocusDetector };
|
||||
@@ -0,0 +1,24 @@
|
||||
import { Events } from 'framework/events';
|
||||
import { AppSettingsModel } from 'models/app-settings-model';
|
||||
|
||||
const IdleTracker = {
|
||||
actionTime: Date.now(),
|
||||
init() {
|
||||
setInterval(this.checkIdle.bind(this), 1000 * 60);
|
||||
},
|
||||
checkIdle() {
|
||||
const idleMinutes = (Date.now() - this.actionTime) / 1000 / 60;
|
||||
const maxIdleMinutes = AppSettingsModel.idleMinutes;
|
||||
if (maxIdleMinutes && idleMinutes > maxIdleMinutes) {
|
||||
Events.emit('before-user-idle');
|
||||
Events.emit('user-idle');
|
||||
}
|
||||
},
|
||||
regUserAction() {
|
||||
this.actionTime = Date.now();
|
||||
}
|
||||
};
|
||||
|
||||
Events.on('power-monitor-resume', () => IdleTracker.checkIdle);
|
||||
|
||||
export { IdleTracker };
|
||||
@@ -0,0 +1,139 @@
|
||||
import { Events } from 'framework/events';
|
||||
import { IdleTracker } from 'comp/browser/idle-tracker';
|
||||
import { Keys } from 'const/keys';
|
||||
import { FocusManager } from 'comp/app/focus-manager';
|
||||
|
||||
const shortcutKeyProp = navigator.platform.indexOf('Mac') >= 0 ? 'metaKey' : 'ctrlKey';
|
||||
|
||||
class KeyHandler {
|
||||
SHORTCUT_ACTION = 1;
|
||||
SHORTCUT_OPT = 2;
|
||||
SHORTCUT_SHIFT = 4;
|
||||
|
||||
shortcuts = {};
|
||||
|
||||
init() {
|
||||
$(document).bind('keypress', this.keypress.bind(this));
|
||||
$(document).bind('keydown', this.keydown.bind(this));
|
||||
|
||||
this.shortcuts[Keys.DOM_VK_A] = [
|
||||
{
|
||||
handler: this.handleAKey,
|
||||
thisArg: this,
|
||||
shortcut: this.SHORTCUT_ACTION,
|
||||
modal: true,
|
||||
noPrevent: true
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
onKey(key, handler, thisArg, shortcut, modal, noPrevent) {
|
||||
let keyShortcuts = this.shortcuts[key];
|
||||
if (!keyShortcuts) {
|
||||
this.shortcuts[key] = keyShortcuts = [];
|
||||
}
|
||||
keyShortcuts.push({
|
||||
handler,
|
||||
thisArg,
|
||||
shortcut,
|
||||
modal,
|
||||
noPrevent
|
||||
});
|
||||
}
|
||||
|
||||
offKey(key, handler, thisArg) {
|
||||
if (this.shortcuts[key]) {
|
||||
this.shortcuts[key] = this.shortcuts[key].filter(
|
||||
(sh) => sh.handler !== handler || sh.thisArg !== thisArg
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
isActionKey(e) {
|
||||
return e[shortcutKeyProp];
|
||||
}
|
||||
|
||||
keydown(e) {
|
||||
IdleTracker.regUserAction();
|
||||
const code = e.keyCode || e.which;
|
||||
const keyShortcuts = this.shortcuts[code];
|
||||
if (keyShortcuts && keyShortcuts.length) {
|
||||
for (const sh of keyShortcuts) {
|
||||
if (FocusManager.modal && sh.modal !== FocusManager.modal && sh.modal !== '*') {
|
||||
e.stopPropagation();
|
||||
continue;
|
||||
}
|
||||
const isActionKey = this.isActionKey(e);
|
||||
switch (sh.shortcut) {
|
||||
case this.SHORTCUT_ACTION:
|
||||
if (!isActionKey) {
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
case this.SHORTCUT_OPT:
|
||||
if (!e.altKey) {
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
case this.SHORTCUT_SHIFT:
|
||||
if (!e.shiftKey) {
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
case this.SHORTCUT_ACTION + this.SHORTCUT_OPT:
|
||||
if (!e.altKey || !isActionKey) {
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if (e.metaKey || e.ctrlKey || e.altKey || e.shiftKey) {
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
sh.handler.call(sh.thisArg, e, code);
|
||||
if (isActionKey && !sh.noPrevent) {
|
||||
e.preventDefault();
|
||||
}
|
||||
if (e.isImmediatePropagationStopped()) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
keypress(e) {
|
||||
if (
|
||||
!FocusManager.modal &&
|
||||
e.which !== Keys.DOM_VK_RETURN &&
|
||||
e.which !== Keys.DOM_VK_ESCAPE &&
|
||||
e.which !== Keys.DOM_VK_TAB &&
|
||||
!e.altKey &&
|
||||
!e.ctrlKey &&
|
||||
!e.metaKey
|
||||
) {
|
||||
Events.emit('keypress', e);
|
||||
} else if (FocusManager.modal) {
|
||||
Events.emit('keypress:' + FocusManager.modal, e);
|
||||
}
|
||||
}
|
||||
|
||||
reg() {
|
||||
IdleTracker.regUserAction();
|
||||
}
|
||||
|
||||
handleAKey(e) {
|
||||
if (
|
||||
e.target.tagName.toLowerCase() === 'input' &&
|
||||
['password', 'text'].indexOf(e.target.type) >= 0
|
||||
) {
|
||||
e.stopImmediatePropagation();
|
||||
} else {
|
||||
e.preventDefault();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const instance = new KeyHandler();
|
||||
|
||||
export { instance as KeyHandler };
|
||||
@@ -0,0 +1,73 @@
|
||||
import { Events } from 'framework/events';
|
||||
import { Launcher } from 'comp/launcher';
|
||||
import { Alerts } from 'comp/ui/alerts';
|
||||
import { Timeouts } from 'const/timeouts';
|
||||
import { Locale } from 'util/locale';
|
||||
import { Logger } from 'util/logger';
|
||||
import { noop } from 'util/fn';
|
||||
|
||||
const PopupNotifier = {
|
||||
logger: null,
|
||||
|
||||
init() {
|
||||
this.logger = new Logger('popup-notifier');
|
||||
|
||||
if (Launcher) {
|
||||
window.open = noop;
|
||||
} else {
|
||||
const windowOpen = window.open;
|
||||
window.open = function (...args) {
|
||||
const win = windowOpen.apply(window, args);
|
||||
if (win) {
|
||||
PopupNotifier.deferCheckClosed(win);
|
||||
Events.emit('popup-opened', win);
|
||||
} else {
|
||||
if (!Alerts.alertDisplayed) {
|
||||
Alerts.error({
|
||||
header: Locale.authPopupRequired,
|
||||
body: Locale.authPopupRequiredBody
|
||||
});
|
||||
}
|
||||
}
|
||||
return win;
|
||||
};
|
||||
}
|
||||
},
|
||||
|
||||
deferCheckClosed(win) {
|
||||
setTimeout(PopupNotifier.checkClosed.bind(PopupNotifier, win), Timeouts.CheckWindowClosed);
|
||||
},
|
||||
|
||||
checkClosed(win) {
|
||||
if (win.closed) {
|
||||
setTimeout(
|
||||
PopupNotifier.triggerClosed.bind(PopupNotifier, win),
|
||||
Timeouts.CheckWindowClosed
|
||||
);
|
||||
} else {
|
||||
const loc = PopupNotifier.tryGetLocationSearch(win);
|
||||
if (loc) {
|
||||
try {
|
||||
win.close();
|
||||
} catch {}
|
||||
PopupNotifier.triggerClosed(win, loc);
|
||||
return;
|
||||
}
|
||||
PopupNotifier.deferCheckClosed(win);
|
||||
}
|
||||
},
|
||||
|
||||
tryGetLocationSearch(win) {
|
||||
try {
|
||||
if (win.location.host === location.host) {
|
||||
return win.location.search;
|
||||
}
|
||||
} catch {}
|
||||
},
|
||||
|
||||
triggerClosed(window, locationSearch) {
|
||||
Events.emit('popup-closed', { window, locationSearch });
|
||||
}
|
||||
};
|
||||
|
||||
export { PopupNotifier };
|
||||
@@ -1,6 +1,6 @@
|
||||
const kdbxweb = require('kdbxweb');
|
||||
import * as kdbxweb from 'kdbxweb';
|
||||
|
||||
const SecureInput = function() {
|
||||
const SecureInput = function () {
|
||||
this.el = null;
|
||||
this.minChar = 0x1400 + Math.round(Math.random() * 100);
|
||||
this.maxLen = 1024;
|
||||
@@ -9,13 +9,13 @@ const SecureInput = function() {
|
||||
this.salt = new Uint32Array(0);
|
||||
};
|
||||
|
||||
SecureInput.prototype.setElement = function(el) {
|
||||
SecureInput.prototype.setElement = function (el) {
|
||||
this.el = el;
|
||||
this.el.val(this.pseudoValue);
|
||||
this.el.on('input', this._input.bind(this));
|
||||
};
|
||||
|
||||
SecureInput.prototype.reset = function() {
|
||||
SecureInput.prototype.reset = function () {
|
||||
this.el = null;
|
||||
this.length = 0;
|
||||
this.pseudoValue = '';
|
||||
@@ -28,7 +28,7 @@ SecureInput.prototype.reset = function() {
|
||||
this.salt = new Uint32Array(0);
|
||||
};
|
||||
|
||||
SecureInput.prototype._input = function() {
|
||||
SecureInput.prototype._input = function () {
|
||||
const selStart = this.el[0].selectionStart;
|
||||
const value = this.el.val();
|
||||
let newPs = '';
|
||||
@@ -63,35 +63,39 @@ SecureInput.prototype._input = function() {
|
||||
this.el[0].selectionEnd = selStart;
|
||||
};
|
||||
|
||||
SecureInput.prototype._getChar = function(ix) {
|
||||
SecureInput.prototype._getChar = function (ix) {
|
||||
return String.fromCharCode(this.minChar + ix);
|
||||
};
|
||||
|
||||
SecureInput.prototype._isSpecialChar = function(ch) {
|
||||
SecureInput.prototype._isSpecialChar = function (ch) {
|
||||
return ch >= this.minChar && ch <= this.minChar + this.maxLen;
|
||||
};
|
||||
|
||||
Object.defineProperty(SecureInput.prototype, 'value', {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
get() {
|
||||
const pseudoValue = this.pseudoValue;
|
||||
const salt = this.salt;
|
||||
const len = pseudoValue.length;
|
||||
let byteLength = 0;
|
||||
const valueBytes = new Uint8Array(len * 4);
|
||||
const saltBytes = kdbxweb.Random.getBytes(len * 4);
|
||||
const saltBytes = kdbxweb.CryptoEngine.random(len * 4);
|
||||
let ch;
|
||||
let bytes;
|
||||
for (let i = 0; i < len; i++) {
|
||||
ch = String.fromCharCode(pseudoValue.charCodeAt(i) ^ salt[i]);
|
||||
const pseudoCharCode = pseudoValue.charCodeAt(i);
|
||||
ch = String.fromCharCode(salt[i] ^ pseudoCharCode);
|
||||
bytes = kdbxweb.ByteUtils.stringToBytes(ch);
|
||||
for (let j = 0; j < bytes.length; j++) {
|
||||
valueBytes[byteLength] = bytes[j] ^ saltBytes[byteLength];
|
||||
byteLength++;
|
||||
}
|
||||
}
|
||||
return new kdbxweb.ProtectedValue(valueBytes.buffer.slice(0, byteLength), saltBytes.buffer.slice(0, byteLength));
|
||||
return new kdbxweb.ProtectedValue(
|
||||
valueBytes.buffer.slice(0, byteLength),
|
||||
saltBytes.buffer.slice(0, byteLength)
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
module.exports = SecureInput;
|
||||
export { SecureInput };
|
||||
@@ -0,0 +1,19 @@
|
||||
import { Events } from 'framework/events';
|
||||
|
||||
const ThemeWatcher = {
|
||||
dark: false,
|
||||
|
||||
init() {
|
||||
const mediaQuery = window.matchMedia('(prefers-color-scheme: dark)');
|
||||
if (mediaQuery && mediaQuery.addEventListener) {
|
||||
mediaQuery.addEventListener('change', (e) => {
|
||||
const dark = e.matches;
|
||||
this.dark = dark;
|
||||
Events.emit('dark-mode-changed', { dark });
|
||||
});
|
||||
}
|
||||
this.dark = !!mediaQuery.matches;
|
||||
}
|
||||
};
|
||||
|
||||
export { ThemeWatcher };
|
||||
@@ -0,0 +1,118 @@
|
||||
import { Launcher } from 'comp/launcher';
|
||||
import { Logger } from 'util/logger';
|
||||
import { noop } from 'util/fn';
|
||||
import { StringFormat } from 'util/formatting/string-format';
|
||||
|
||||
const logger = new Logger('transport');
|
||||
|
||||
const Transport = {
|
||||
cacheFilePath(fileName) {
|
||||
return Launcher.getTempPath(fileName);
|
||||
},
|
||||
|
||||
httpGet(config) {
|
||||
let tmpFile;
|
||||
const fs = Launcher.req('fs');
|
||||
if (config.file) {
|
||||
const baseTempPath = Launcher.getTempPath();
|
||||
if (config.cleanupOldFiles) {
|
||||
const allFiles = fs.readdirSync(baseTempPath);
|
||||
for (const file of allFiles) {
|
||||
if (
|
||||
file !== config.file &&
|
||||
StringFormat.replaceVersion(file, '0') ===
|
||||
StringFormat.replaceVersion(config.file, '0')
|
||||
) {
|
||||
fs.unlinkSync(Launcher.joinPath(baseTempPath, file));
|
||||
}
|
||||
}
|
||||
}
|
||||
tmpFile = Launcher.joinPath(baseTempPath, config.file);
|
||||
if (fs.existsSync(tmpFile)) {
|
||||
try {
|
||||
if (config.cache && fs.statSync(tmpFile).size > 0) {
|
||||
logger.info('File already downloaded ' + config.url);
|
||||
return config.success(tmpFile);
|
||||
} else {
|
||||
fs.unlinkSync(tmpFile);
|
||||
}
|
||||
} catch (e) {
|
||||
fs.unlink(tmpFile, noop);
|
||||
}
|
||||
}
|
||||
}
|
||||
const proto = config.url.split(':')[0];
|
||||
logger.info('GET ' + config.url);
|
||||
const opts = Launcher.req('url').parse(config.url);
|
||||
opts.headers = { 'User-Agent': navigator.userAgent };
|
||||
Launcher.resolveProxy(config.url, (proxy) => {
|
||||
logger.info(
|
||||
'Request to ' +
|
||||
config.url +
|
||||
' ' +
|
||||
(proxy ? 'using proxy ' + proxy.host + ':' + proxy.port : 'without proxy')
|
||||
);
|
||||
if (proxy) {
|
||||
opts.headers.Host = opts.host;
|
||||
opts.host = proxy.host;
|
||||
opts.port = proxy.port;
|
||||
opts.path = config.url;
|
||||
}
|
||||
Launcher.req(proto)
|
||||
.get(opts, (res) => {
|
||||
logger.info('Response from ' + config.url + ': ' + res.statusCode);
|
||||
if (res.statusCode === 200) {
|
||||
if (config.file) {
|
||||
const file = fs.createWriteStream(tmpFile);
|
||||
res.pipe(file);
|
||||
file.on('finish', () => {
|
||||
file.close(() => {
|
||||
config.success(tmpFile);
|
||||
});
|
||||
});
|
||||
file.on('error', (err) => {
|
||||
config.error(err);
|
||||
});
|
||||
} else {
|
||||
let data = [];
|
||||
res.on('data', (chunk) => {
|
||||
data.push(chunk);
|
||||
});
|
||||
res.on('end', () => {
|
||||
data = window.Buffer.concat(data);
|
||||
if (config.text || config.json) {
|
||||
data = data.toString('utf8');
|
||||
}
|
||||
if (config.json) {
|
||||
try {
|
||||
data = JSON.parse(data);
|
||||
} catch (e) {
|
||||
config.error('Error parsing JSON: ' + e.message);
|
||||
}
|
||||
}
|
||||
config.success(data);
|
||||
});
|
||||
}
|
||||
} else if (res.headers.location && [301, 302].indexOf(res.statusCode) >= 0) {
|
||||
if (config.noRedirect) {
|
||||
return config.error('Too many redirects');
|
||||
}
|
||||
config.url = res.headers.location;
|
||||
config.noRedirect = true;
|
||||
Transport.httpGet(config);
|
||||
} else {
|
||||
config.error('HTTP status ' + res.statusCode);
|
||||
}
|
||||
})
|
||||
.on('error', (e) => {
|
||||
logger.error('Cannot GET ' + config.url, e);
|
||||
if (tmpFile) {
|
||||
fs.unlink(tmpFile, noop);
|
||||
}
|
||||
config.error(e);
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
export { Transport };
|
||||