mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 16:15:41 +01:00
Compare commits
3534 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ec78a33c7b | ||
|
|
165cfcb101 | ||
|
|
09eede5b26 | ||
|
|
7649edb383 | ||
|
|
b8fa85f6c8 | ||
|
|
ebe111d469 | ||
|
|
02a9562005 | ||
|
|
94a5762a32 | ||
|
|
c619ef9a3d | ||
|
|
bf4931bb98 | ||
|
|
516f350bda | ||
|
|
9221aa0ef8 | ||
|
|
d678c1d32d | ||
|
|
f047a08481 | ||
|
|
220c1cab84 | ||
|
|
1b175c701c | ||
|
|
574b846ad2 | ||
|
|
5486e82ffa | ||
|
|
e70b6618f4 | ||
|
|
36efbe07d9 | ||
|
|
422d19e3d6 | ||
|
|
3ebf03ad14 | ||
|
|
2baf3291e9 | ||
|
|
f42be23bf6 | ||
|
|
ecd2990fb9 | ||
|
|
d84acb4d8f | ||
|
|
abae948dc3 | ||
|
|
925720b094 | ||
|
|
e7c9226d78 | ||
|
|
d38215cf6b | ||
|
|
b62a81677f | ||
|
|
81b06fd717 | ||
|
|
d89eb54d17 | ||
|
|
b3250fa2b9 | ||
|
|
9c7b547a98 | ||
|
|
ca5dfa5092 | ||
|
|
e8e70b3154 | ||
|
|
a2b9eb07f2 | ||
|
|
c0063aedfa | ||
|
|
c8b3ac9087 | ||
|
|
7102eff209 | ||
|
|
473bc634aa | ||
|
|
3b30c6efb1 | ||
|
|
96665ee0e3 | ||
|
|
93c8b62ea6 | ||
|
|
3a25d8ef40 | ||
|
|
649d4c35e5 | ||
|
|
32f1053239 | ||
|
|
268d8ce6a7 | ||
|
|
1889c7e7dd | ||
|
|
d3a3c45f48 | ||
|
|
04e09e38ce | ||
|
|
d3649a2a6b | ||
|
|
708c529972 | ||
|
|
ca96114e39 | ||
|
|
5a7e917587 | ||
|
|
0fd6f29a23 | ||
|
|
a59f6c8a72 | ||
|
|
298ad9e43d | ||
|
|
892ca6497e | ||
|
|
56b58b5674 | ||
|
|
52ceb953bf | ||
|
|
a30f4f9920 | ||
|
|
e2764eac56 | ||
|
|
f5e7e16b8f | ||
|
|
558def6f54 | ||
|
|
b16daf88e2 | ||
|
|
6194383804 | ||
|
|
953f4ecc85 | ||
|
|
e979ae38e3 | ||
|
|
3b2be8eda6 | ||
|
|
c998a7c80f | ||
|
|
699cae24be | ||
|
|
7c2310116c | ||
|
|
9242cdfd03 | ||
|
|
05d44d8422 | ||
|
|
2e93787361 | ||
|
|
1b33d5dced | ||
|
|
52d68ac7c4 | ||
|
|
52ad0e5320 | ||
|
|
cdc4da5d91 | ||
|
|
2a3d33900c | ||
|
|
7795b8c5c7 | ||
|
|
c5e6b52034 | ||
|
|
cf7739b752 | ||
|
|
f17ccd3d70 | ||
|
|
ffb77d5cfc | ||
|
|
a597d2cea1 | ||
|
|
de2829500d | ||
|
|
4e45ba0c5f | ||
|
|
c7f027ed9e | ||
|
|
c41951a02b | ||
|
|
759c442dae | ||
|
|
6f3fbe8c3a | ||
|
|
b19105b7e7 | ||
|
|
a4d7907bd4 | ||
|
|
9e4368a8e9 | ||
|
|
d2c20a1ad7 | ||
|
|
3bfde9adce | ||
|
|
15e0a93777 | ||
|
|
2f901020a7 | ||
|
|
6037f70acb | ||
|
|
4825f8bdea | ||
|
|
771cfe74cf | ||
|
|
ecc00a0e24 | ||
|
|
2af2bd7810 | ||
|
|
e56ad4b588 | ||
|
|
f420968fc9 | ||
|
|
8ae32433da | ||
|
|
a81306325b | ||
|
|
dd6bdfe8da | ||
|
|
495d075be0 | ||
|
|
e03e965994 | ||
|
|
14b0e04b0d | ||
|
|
d2205cb8ee | ||
|
|
a4b088e410 | ||
|
|
ae5cab77cb | ||
|
|
9adbed19a9 | ||
|
|
d2fa0d21a7 | ||
|
|
5ea1993c30 | ||
|
|
175a1d10b4 | ||
|
|
55a0ed9269 | ||
|
|
4dc7b06d9b | ||
|
|
2695fe2483 | ||
|
|
f6dc0eb8fc | ||
|
|
53e8e1ce30 | ||
|
|
7959d5c66e | ||
|
|
3c7eb57085 | ||
|
|
f262e8f931 | ||
|
|
b31d22b9ee | ||
|
|
b8a83d5356 | ||
|
|
e52ff42729 | ||
|
|
67d664a329 | ||
|
|
88c558b55d | ||
|
|
2713684d6c | ||
|
|
f6187471ca | ||
|
|
cd5d52c919 | ||
|
|
93a0a2df32 | ||
|
|
d4bb0a8224 | ||
|
|
02de12a70e | ||
|
|
5181be1011 | ||
|
|
5eb2aba338 | ||
|
|
2f8db3f6f8 | ||
|
|
333adbbe6b | ||
|
|
032130e4bb | ||
|
|
c321d0fbec | ||
|
|
29a4a3aa14 | ||
|
|
ada2b3d6ae | ||
|
|
8a98f87be7 | ||
|
|
d15d6ba3b7 | ||
|
|
654fd3d5ab | ||
|
|
1eed4472e1 | ||
|
|
f883fe9d81 | ||
|
|
c49fdf9f0c | ||
|
|
045e29b7d8 | ||
|
|
a5e379c985 | ||
|
|
21fd5535f1 | ||
|
|
63f3805f29 | ||
|
|
a845ff6b27 | ||
|
|
d919f283e9 | ||
|
|
64fc0cf1b4 | ||
|
|
c869a186ff | ||
|
|
b400f83fe3 | ||
|
|
13072d3f18 | ||
|
|
ea1ee1ab50 | ||
|
|
48e6f86eca | ||
|
|
27978a8064 | ||
|
|
86538cca14 | ||
|
|
418ae49a8e | ||
|
|
7d97bc2392 | ||
|
|
7be409ee98 | ||
|
|
5a8eb62e4e | ||
|
|
707338797b | ||
|
|
ed45c2e7b8 | ||
|
|
0037b13fb5 | ||
|
|
77e16ebc81 | ||
|
|
ac2c7a1add | ||
|
|
8503aef01e | ||
|
|
3fd1654ff6 | ||
|
|
2b748950d6 | ||
|
|
851a5580ed | ||
|
|
98252250b2 | ||
|
|
725eb796f4 | ||
|
|
7014d40936 | ||
|
|
9f5ddf9d19 | ||
|
|
92f21bfb5b | ||
|
|
c1707b8fde | ||
|
|
c92a363985 | ||
|
|
bfc5f7cd32 | ||
|
|
023ae4284a | ||
|
|
f66cb92abd | ||
|
|
b590b36008 | ||
|
|
7782231e06 | ||
|
|
4b7e26f0a9 | ||
|
|
c34a2ee7c1 | ||
|
|
ebbcdffaab | ||
|
|
e558a99254 | ||
|
|
4123f0be85 | ||
|
|
c9e8112991 | ||
|
|
69991d6613 | ||
|
|
b3ad68b237 | ||
|
|
67960d2298 | ||
|
|
21007360ca | ||
|
|
c2040c43c8 | ||
|
|
3284441937 | ||
|
|
8617a8af9e | ||
|
|
fd84f5469d | ||
|
|
21db3aebf0 | ||
|
|
73b47d4592 | ||
|
|
9488e7e078 | ||
|
|
b0330f8eed | ||
|
|
6c7087b94e | ||
|
|
4fc87360d1 | ||
|
|
787421ee54 | ||
|
|
698e0ecafd | ||
|
|
9be16fa852 | ||
|
|
eb704f3a86 | ||
|
|
c3aeff033a | ||
|
|
d39ac8ecc0 | ||
|
|
8d1525eb6d | ||
|
|
dfca77d071 | ||
|
|
84a181bb6b | ||
|
|
d8144cfa0e | ||
|
|
99622db664 | ||
|
|
cb106b4eb1 | ||
|
|
e1a06068e8 | ||
|
|
72dcedbbd5 | ||
|
|
c1a6140b8c | ||
|
|
3fd1649231 | ||
|
|
2122b33813 | ||
|
|
5e5af013f8 | ||
|
|
d5a1a09eba | ||
|
|
d38b385382 | ||
|
|
aafca45ff9 | ||
|
|
091550e898 | ||
|
|
fb97898186 | ||
|
|
843ff9b9d7 | ||
|
|
5d9b9bef9b | ||
|
|
f70d545aa9 | ||
|
|
4eb9d98fc6 | ||
|
|
614c084092 | ||
|
|
d200c7147a | ||
|
|
12ff291428 | ||
|
|
3e047efd34 | ||
|
|
e409ac061d | ||
|
|
02a36af3ca | ||
|
|
f6c2dac4c3 | ||
|
|
93957fafa0 | ||
|
|
8665a71b37 | ||
|
|
cfdfe2191c | ||
|
|
6354c357c6 | ||
|
|
105e132c20 | ||
|
|
2e82147fb6 | ||
|
|
f015a01227 | ||
|
|
7e3d25aaca | ||
|
|
c38f07a36e | ||
|
|
94c055bcbd | ||
|
|
fc4b92a890 | ||
|
|
51ba6777fc | ||
|
|
e7d7a5b072 | ||
|
|
c4fa782fc2 | ||
|
|
04ece42881 | ||
|
|
31b04afb94 | ||
|
|
38e1e3d097 | ||
|
|
50a8a5ffbf | ||
|
|
e637c1f34c | ||
|
|
3a71daa740 | ||
|
|
5636a40221 | ||
|
|
0f95ee0d84 | ||
|
|
74e783a53a | ||
|
|
97c7fdb35c | ||
|
|
b1827a5f53 | ||
|
|
09a944d5d8 | ||
|
|
7dac0d0a2e | ||
|
|
be57cbf4ef | ||
|
|
cb0a7d9dd5 | ||
|
|
580db05321 | ||
|
|
b256998be5 | ||
|
|
25f18a39a1 | ||
|
|
37b1981287 | ||
|
|
1556feb83b | ||
|
|
c951e05221 | ||
|
|
5ea17c3f59 | ||
|
|
f19138215f | ||
|
|
0365f0ed20 | ||
|
|
c4e3037ed0 | ||
|
|
e1e946ac65 | ||
|
|
de76be4e6c | ||
|
|
e6c4acec69 | ||
|
|
c46883da4f | ||
|
|
b79687ee17 | ||
|
|
b9cda7e6a8 | ||
|
|
83b3cf23ca | ||
|
|
18dfe4da0d | ||
|
|
9aba8f774c | ||
|
|
f70fabb863 | ||
|
|
34f6c10073 | ||
|
|
dc5c24591b | ||
|
|
2df7a51aa1 | ||
|
|
84d1bed101 | ||
|
|
5ce724a281 | ||
|
|
62e11b4b49 | ||
|
|
d514ddaa8d | ||
|
|
990456e51f | ||
|
|
60a087657e | ||
|
|
e2f5720cbb | ||
|
|
0d7608bd10 | ||
|
|
12a85be518 | ||
|
|
6b79219c16 | ||
|
|
ff3621a3fa | ||
|
|
35ba0194b2 | ||
|
|
815929cfc1 | ||
|
|
72a7f3229d | ||
|
|
6c7d6b1e2f | ||
|
|
5f70e6fc72 | ||
|
|
74470a5fb2 | ||
|
|
3be92eea76 | ||
|
|
8bb1a4e863 | ||
|
|
5744a230ae | ||
|
|
c84c0cb8f9 | ||
|
|
292c2400a0 | ||
|
|
4d4f13ced1 | ||
|
|
0c6348a71d | ||
|
|
f62e724254 | ||
|
|
584584e65b | ||
|
|
311eaa4dfb | ||
|
|
496274aae9 | ||
|
|
265712998d | ||
|
|
52d3b7ed6d | ||
|
|
358be7cd03 | ||
|
|
28e6548d15 | ||
|
|
c6bec62c33 | ||
|
|
0e330ae453 | ||
|
|
3c860ee758 | ||
|
|
6b9d289ce3 | ||
|
|
424abe722e | ||
|
|
21df16c2da | ||
|
|
b61f404730 | ||
|
|
c270d67d6d | ||
|
|
d2ec32be72 | ||
|
|
e5366f65e8 | ||
|
|
6163a51770 | ||
|
|
8270c45a38 | ||
|
|
68f779a782 | ||
|
|
7d75202fb5 | ||
|
|
ba68ad0693 | ||
|
|
598d45b159 | ||
|
|
2f51994ab5 | ||
|
|
2b2cfac8fa | ||
|
|
8983c59033 | ||
|
|
cd9da2d1c3 | ||
|
|
ef3a98e0a2 | ||
|
|
1322e33b0d | ||
|
|
ebfddbd4fb | ||
|
|
ce36afc6c5 | ||
|
|
225be1f83c | ||
|
|
47ecf09c2c | ||
|
|
af0106a971 | ||
|
|
e3b1a47554 | ||
|
|
858b03fd8a | ||
|
|
20a8d5a651 | ||
|
|
d04d8188c9 | ||
|
|
e0f314294d | ||
|
|
c526b6bf0b | ||
|
|
842214b80e | ||
|
|
29bf7f9a91 | ||
|
|
1c6f48aa7d | ||
|
|
fb47a0f545 | ||
|
|
14a92401d7 | ||
|
|
e8e3ac9ac1 | ||
|
|
74fb36aa50 | ||
|
|
20c3f8ff1e | ||
|
|
6c77360f6b | ||
|
|
044810afa9 | ||
|
|
3724eefaf5 | ||
|
|
689a4b89b2 | ||
|
|
b61b4d70e3 | ||
|
|
4244bc3a06 | ||
|
|
f5b50400fc | ||
|
|
4886e1da08 | ||
|
|
f8c175d0c4 | ||
|
|
181f03ecce | ||
|
|
08f81975c8 | ||
|
|
e531b5c337 | ||
|
|
8eed80bf5e | ||
|
|
85111e1f3e | ||
|
|
f3cac1faff | ||
|
|
788b6a2982 | ||
|
|
c7ce77ba18 | ||
|
|
c3b271bc70 | ||
|
|
ebb017c8ed | ||
|
|
30a786cf5f | ||
|
|
ae158a2524 | ||
|
|
ca1f701102 | ||
|
|
8307f38c4b | ||
|
|
5495aa8e01 | ||
|
|
38731c726a | ||
|
|
047133aeb3 | ||
|
|
12fd5c0fdb | ||
|
|
f116465526 | ||
|
|
0d72bf6c93 | ||
|
|
d793f4d6fd | ||
|
|
a35f32ecc1 | ||
|
|
407bba039b | ||
|
|
9504cab8fb | ||
|
|
899e234bc9 | ||
|
|
4c7c8ca8ee | ||
|
|
20597c8e39 | ||
|
|
cdc7acf822 | ||
|
|
150d1d309c | ||
|
|
d83d8467ad | ||
|
|
7ed13a5596 | ||
|
|
4392096db2 | ||
|
|
7374280f4e | ||
|
|
1431f4561f | ||
|
|
4d3ed6fe28 | ||
|
|
55ad2e867b | ||
|
|
2541de85e4 | ||
|
|
01a48285c1 | ||
|
|
e43c0525cf | ||
|
|
4a80f8e852 | ||
|
|
fe18f2e950 | ||
|
|
2469088cc7 | ||
|
|
80ee9b3995 | ||
|
|
2b3444b493 | ||
|
|
c5006e9dfe | ||
|
|
bd6aa19f1f | ||
|
|
01b6fa5b2e | ||
|
|
ce6624f433 | ||
|
|
9d14e8283a | ||
|
|
7747977e3a | ||
|
|
0f64bdb69f | ||
|
|
1f5765a3bb | ||
|
|
dae7f13f9e | ||
|
|
d62f239f37 | ||
|
|
0c283fdc07 | ||
|
|
f20e0c8d47 | ||
|
|
19bce8bfba | ||
|
|
8629931e99 | ||
|
|
544dfbffca | ||
|
|
920affc75f | ||
|
|
836c19717b | ||
|
|
6f4b37e3fa | ||
|
|
5b9f89146a | ||
|
|
56c4633825 | ||
|
|
9d5d765fe4 | ||
|
|
01c0a5be61 | ||
|
|
5bbf36c369 | ||
|
|
2b2e2a1eb7 | ||
|
|
ca7b9105cb | ||
|
|
59e529cc36 | ||
|
|
a1a90c30fd | ||
|
|
e353080621 | ||
|
|
6c56744c34 | ||
|
|
a79b034ec4 | ||
|
|
894e86a863 | ||
|
|
30e55994a5 | ||
|
|
05cbb29410 | ||
|
|
1d29a6420a | ||
|
|
f86fe93775 | ||
|
|
0677fa6e30 | ||
|
|
4e1721e7bb | ||
|
|
43f712259c | ||
|
|
2c0e8015f6 | ||
|
|
f7e0f46653 | ||
|
|
84c5f99efe | ||
|
|
429ff9b108 | ||
|
|
3b800d8192 | ||
|
|
9cb6000aba | ||
|
|
bdc690af2f | ||
|
|
26aff5b514 | ||
|
|
268f388cfb | ||
|
|
f2d1d1d4a1 | ||
|
|
b959906fe3 | ||
|
|
8c0dd6c726 | ||
|
|
397617aec5 | ||
|
|
e48d884fb3 | ||
|
|
e031d5e9a9 | ||
|
|
b67461f194 | ||
|
|
fc2d3334f4 | ||
|
|
d98d3600ef | ||
|
|
5ccfdf7c02 | ||
|
|
1e541d68dd | ||
|
|
fb0d6bada1 | ||
|
|
c5c197b145 | ||
|
|
0b9f3c15d2 | ||
|
|
2f556e3f9d | ||
|
|
8cb33ff6cb | ||
|
|
ce0b1b9788 | ||
|
|
355c1ec992 | ||
|
|
6e7b4b68dd | ||
|
|
c6c3d1db73 | ||
|
|
1d48778c0d | ||
|
|
e1906cbd8d | ||
|
|
8f9c2ecf4f | ||
|
|
91f80cd7e2 | ||
|
|
008c3074d0 | ||
|
|
37a683fd0b | ||
|
|
e9202665f4 | ||
|
|
34996e6242 | ||
|
|
f8bdfcbaba | ||
|
|
6b1ae1c271 | ||
|
|
07a1f8c89a | ||
|
|
af2f1c6510 | ||
|
|
2afaf9e4b1 | ||
|
|
267724fd65 | ||
|
|
7178908069 | ||
|
|
383b675c0e | ||
|
|
dd59f90b15 | ||
|
|
ca9dc14b49 | ||
|
|
9574fdea36 | ||
|
|
74aea25605 | ||
|
|
6baab4ba0a | ||
|
|
1a92dc7d3f | ||
|
|
5411c5e55f | ||
|
|
3bbba87147 | ||
|
|
c3ba46abc7 | ||
|
|
08439de587 | ||
|
|
1b0a30a121 | ||
|
|
abe6f22474 | ||
|
|
376d2872d1 | ||
|
|
6e7a9ae234 | ||
|
|
10577a0641 | ||
|
|
5eff543347 | ||
|
|
c59c649c28 | ||
|
|
30f0acb38b | ||
|
|
f9c53f16a5 | ||
|
|
beed7d171a | ||
|
|
ccb646cca9 | ||
|
|
71ac097e61 | ||
|
|
65955789cc | ||
|
|
accd0df430 | ||
|
|
42fe637bc9 | ||
|
|
c1ea0cd858 | ||
|
|
2b2dc65777 | ||
|
|
1a9fd8b095 | ||
|
|
4ef8a6f97b | ||
|
|
f23f4da42b | ||
|
|
d27f113eaa | ||
|
|
31b21cfea6 | ||
|
|
d13eeb93d4 | ||
|
|
6cef5301f4 | ||
|
|
b4737b60ed | ||
|
|
831c6b4dbb | ||
|
|
e85d06aa9b | ||
|
|
1f0d010563 | ||
|
|
41e1ee2d52 | ||
|
|
c92637e1f1 | ||
|
|
e734dd81f7 | ||
|
|
5afd16be13 | ||
|
|
af396f24af | ||
|
|
1b52a6708c | ||
|
|
d368cc48cc | ||
|
|
09a12374d2 | ||
|
|
7c569c1687 | ||
|
|
20fa01fe60 | ||
|
|
a88f6fc66e | ||
|
|
847adeaaa4 | ||
|
|
ab65824d1c | ||
|
|
960f125d45 | ||
|
|
0ae7f53a7e | ||
|
|
8a65d74a3b | ||
|
|
4d819a8cf8 | ||
|
|
629021b16b | ||
|
|
4897b74d6d | ||
|
|
81d9c401a5 | ||
|
|
476a5e51e4 | ||
|
|
ee30f4e1c5 | ||
|
|
9cba1bbd3a | ||
|
|
a0a88bd7c6 | ||
|
|
8d313a9472 | ||
|
|
55238ee123 | ||
|
|
141570e7a6 | ||
|
|
3f380e24a0 | ||
|
|
1119c51370 | ||
|
|
4532feefb7 | ||
|
|
681b38140f | ||
|
|
9e0662ad3e | ||
|
|
bc083f4db3 | ||
|
|
0a967ad241 | ||
|
|
85b11871a4 | ||
|
|
c7ea3cf4c9 | ||
|
|
212670ceb4 | ||
|
|
02acc28d0e | ||
|
|
b70454a6b9 | ||
|
|
6d9c7ea306 | ||
|
|
7261b03e9d | ||
|
|
b5df92554d | ||
|
|
366b9c38ff | ||
|
|
eac891f9bf | ||
|
|
90dd955ff5 | ||
|
|
98674ca321 | ||
|
|
d95ca35e28 | ||
|
|
415b279fa0 | ||
|
|
030f5f59f1 | ||
|
|
e4c45ba467 | ||
|
|
d493d9fd8c | ||
|
|
a472aae39f | ||
|
|
8f8b47432b | ||
|
|
ed05245a03 | ||
|
|
f53d7f1b98 | ||
|
|
7152c5ed09 | ||
|
|
d610648458 | ||
|
|
d4c5d185a5 | ||
|
|
78bfe772e2 | ||
|
|
d4aa3b8f35 | ||
|
|
65d13756cf | ||
|
|
41595126ea | ||
|
|
1160858c06 | ||
|
|
b1eace9857 | ||
|
|
1a70afe692 | ||
|
|
a02ad6c9a5 | ||
|
|
40f82f21aa | ||
|
|
1dc513ee38 | ||
|
|
22f24b3dde | ||
|
|
12a978900a | ||
|
|
c49fcab8f0 | ||
|
|
6fe0852863 | ||
|
|
0b59e74a02 | ||
|
|
0f8ea46080 | ||
|
|
1aa33634de | ||
|
|
0d94323b00 | ||
|
|
bc9e8523b5 | ||
|
|
9375d4ba65 | ||
|
|
6e995f7503 | ||
|
|
30a85dbf36 | ||
|
|
8fc2ca540c | ||
|
|
2b3d8516c6 | ||
|
|
5d653b2569 | ||
|
|
a3d4b960c5 | ||
|
|
547870b688 | ||
|
|
d9d70cd349 | ||
|
|
ddbd09d044 | ||
|
|
416b686d69 | ||
|
|
d63c89d832 | ||
|
|
790b6e743d | ||
|
|
22698f2c1b | ||
|
|
54a4e45a10 | ||
|
|
a31ea7d6c5 | ||
|
|
ab889ff2cc | ||
|
|
1575bc8ae9 | ||
|
|
9d4574b10b | ||
|
|
50d14789db | ||
|
|
b3883c13af | ||
|
|
68b964addf | ||
|
|
9d3404c134 | ||
|
|
0ddaffa092 | ||
|
|
7bfc150164 | ||
|
|
35eb0efbc0 | ||
|
|
6223b3b279 | ||
|
|
fe0d5f5891 | ||
|
|
963ea1edeb | ||
|
|
17daab82e0 | ||
|
|
9d278685b0 | ||
|
|
5c5bdc5c18 | ||
|
|
dddcfabb9d | ||
|
|
9d3b549aa6 | ||
|
|
9b2e90e2d9 | ||
|
|
4c5552d6a5 | ||
|
|
913ae66ad8 | ||
|
|
acc3d9a8d0 | ||
|
|
f90ab429ab | ||
|
|
12d4d82bdf | ||
|
|
58100e52b8 | ||
|
|
16d120645d | ||
|
|
5b7a2eff9d | ||
|
|
5be41f8e80 | ||
|
|
37703ae1a1 | ||
|
|
519407a929 | ||
|
|
d83a306b9b | ||
|
|
f57624cdc1 | ||
|
|
d943d7040d | ||
|
|
b15654dd7a | ||
|
|
80390ce4f0 | ||
|
|
8830766c43 | ||
|
|
8c99f89f93 | ||
|
|
19da7ede28 | ||
|
|
39a8b976ff | ||
|
|
d4ea5f53f1 | ||
|
|
dbf74268d3 | ||
|
|
62aa423a2b | ||
|
|
475c42daa2 | ||
|
|
abe52ad13b | ||
|
|
68ac1dda1b | ||
|
|
45175a565a | ||
|
|
c82fd2cd2c | ||
|
|
6a9cec5add | ||
|
|
12f045c793 | ||
|
|
005d096784 | ||
|
|
fbb29873f3 | ||
|
|
936376af3d | ||
|
|
22d9e38150 | ||
|
|
a23163a1bb | ||
|
|
75927c6de7 | ||
|
|
cd5cb50747 | ||
|
|
aa4b5873ea | ||
|
|
11aba068ce | ||
|
|
f3f6b743be | ||
|
|
d57a1c5d66 | ||
|
|
535c89291b | ||
|
|
9bc4fa9b27 | ||
|
|
442439f87f | ||
|
|
25ad26c14b | ||
|
|
faaf58c790 | ||
|
|
788cc9f930 | ||
|
|
1ccc3a650d | ||
|
|
c6e59c5f43 | ||
|
|
81b29ba9ef | ||
|
|
b0923a0725 | ||
|
|
e2df88093a | ||
|
|
b27bccd123 | ||
|
|
35b3ba2a30 | ||
|
|
74e568b1ee | ||
|
|
7b152aaad0 | ||
|
|
73f73a59e8 | ||
|
|
8c5cfebcc8 | ||
|
|
a3a0153739 | ||
|
|
d1b144b37b | ||
|
|
0ccda7ac4d | ||
|
|
a5298e13bb | ||
|
|
1afc12a341 | ||
|
|
dd2db387ab | ||
|
|
20a1e0750f | ||
|
|
7755d67b8b | ||
|
|
92a1dad12d | ||
|
|
ce7f3259c1 | ||
|
|
9e1bd604de | ||
|
|
5e5600bd44 | ||
|
|
0acf88b6b5 | ||
|
|
e87ef8ef11 | ||
|
|
7d2065d55d | ||
|
|
ab869e8469 | ||
|
|
3b048a990b | ||
|
|
e36a41dcc4 | ||
|
|
54d5450200 | ||
|
|
85c81a046c | ||
|
|
3a91ce8411 | ||
|
|
752a5d56ab | ||
|
|
d987b87d6d | ||
|
|
3e936d0e3f | ||
|
|
e57709f4d9 | ||
|
|
8e34418a64 | ||
|
|
675844ac7e | ||
|
|
55edb3fc58 | ||
|
|
2c5c9636a2 | ||
|
|
b22235db9f | ||
|
|
290a62d727 | ||
|
|
d001070938 | ||
|
|
9f5f254d2e | ||
|
|
d3a5ccae5e | ||
|
|
ecc47da2a3 | ||
|
|
f868933d09 | ||
|
|
4090ff3db2 | ||
|
|
77e4e30364 | ||
|
|
ab386ca3d6 | ||
|
|
0a5975d046 | ||
|
|
ca2692a0dc | ||
|
|
9119a5bd3d | ||
|
|
567bdb5e1e | ||
|
|
4b1abad427 | ||
|
|
5efb9d63ec | ||
|
|
db5039b702 | ||
|
|
5e45f78478 | ||
|
|
18bf1f4658 | ||
|
|
72b7b1ea3b | ||
|
|
3717a26fcb | ||
|
|
f0c47e6e2d | ||
|
|
83cb8faa8c | ||
|
|
7826dee4ea | ||
|
|
2905d317af | ||
|
|
0fc0cfdab6 | ||
|
|
3668ca8977 | ||
|
|
36f7110813 | ||
|
|
661b83d7b0 | ||
|
|
0d48f9fec8 | ||
|
|
c03eee3f55 | ||
|
|
978cfb4258 | ||
|
|
726cbbecbc | ||
|
|
208f9218f9 | ||
|
|
c0b99e4785 | ||
|
|
53feef5cf5 | ||
|
|
eed1e1cf27 | ||
|
|
29a2735168 | ||
|
|
aa75ddccbb | ||
|
|
d7ac67dbf8 | ||
|
|
0bc9ebb914 | ||
|
|
d8417a5576 | ||
|
|
e1570658ec | ||
|
|
46f20da8c2 | ||
|
|
a64cfd6ebb | ||
|
|
3e9f3304ce | ||
|
|
50be61163a | ||
|
|
fa79ad755d | ||
|
|
c9be1b35fb | ||
|
|
4bf3b49c41 | ||
|
|
a903ac1afc | ||
|
|
84665761ff | ||
|
|
7138fd1ffb | ||
|
|
3a6cbe0787 | ||
|
|
f1be014b8f | ||
|
|
8b3ac48ea1 | ||
|
|
69809452a8 | ||
|
|
91edee5791 | ||
|
|
9eb7c18143 | ||
|
|
a35721026f | ||
|
|
24f57fec21 | ||
|
|
4c068a7b8d | ||
|
|
f8066b86df | ||
|
|
259196bc1e | ||
|
|
7ec6ac210f | ||
|
|
bcc7fd43aa | ||
|
|
4268f423e8 | ||
|
|
ee5303f9cc | ||
|
|
743073476a | ||
|
|
75af762db9 | ||
|
|
8f2bc4ac98 | ||
|
|
22c629374e | ||
|
|
f3dda000c6 | ||
|
|
c8be2f8782 | ||
|
|
9f0a9c263f | ||
|
|
1134d5e82b | ||
|
|
5330724dff | ||
|
|
3d0ac205d3 | ||
|
|
d735c42561 | ||
|
|
3e1050ffd6 | ||
|
|
f1d2e8e34a | ||
|
|
4ba89c03b1 | ||
|
|
dfd3e884ff | ||
|
|
94ee4c9c70 | ||
|
|
9fac3918b2 | ||
|
|
2a243d07fe | ||
|
|
714038590d | ||
|
|
4870c685b1 | ||
|
|
87c94338e9 | ||
|
|
f50e0abe46 | ||
|
|
54bd5fcdaa | ||
|
|
7f2428dcb7 | ||
|
|
c90e917ae6 | ||
|
|
b32abff689 | ||
|
|
bfb6a42e3d | ||
|
|
c9e1c9962b | ||
|
|
93c7165c32 | ||
|
|
3aebbb1c42 | ||
|
|
3159d3d6c9 | ||
|
|
29454a6a53 | ||
|
|
1c19118f82 | ||
|
|
22487ca8e1 | ||
|
|
a385674a34 | ||
|
|
be3ac39fbf | ||
|
|
25e85af033 | ||
|
|
3a58c2a6ba | ||
|
|
6e73daa1d2 | ||
|
|
911545031d | ||
|
|
899a8eb798 | ||
|
|
491d70bdaa | ||
|
|
41ff265429 | ||
|
|
7fc2b23c7e | ||
|
|
3ed28633bd | ||
|
|
1943ce5ecc | ||
|
|
cfa9035aa5 | ||
|
|
70ff052f2c | ||
|
|
860d306c84 | ||
|
|
c31bb1eab8 | ||
|
|
e617386720 | ||
|
|
fc603de98e | ||
|
|
684cbae427 | ||
|
|
94f81dc4ae | ||
|
|
9af034d1cb | ||
|
|
844b726ea2 | ||
|
|
a8878c8cfe | ||
|
|
6389400e10 | ||
|
|
3ad48dbde4 | ||
|
|
2b7072d663 | ||
|
|
d70607de55 | ||
|
|
fc234d6a57 | ||
|
|
0684241bac | ||
|
|
5a58ab7f00 | ||
|
|
e0fbcd2bda | ||
|
|
2ec5fd9d3b | ||
|
|
5737501c81 | ||
|
|
337587859b | ||
|
|
d8c699832b | ||
|
|
94de72c4a9 | ||
|
|
87f976a786 | ||
|
|
888883e33e | ||
|
|
ad4a942460 | ||
|
|
10251b81a0 | ||
|
|
3ae92d5f1a | ||
|
|
3e433551a9 | ||
|
|
a6fae61e35 | ||
|
|
3afc60f1ac | ||
|
|
252e010eb7 | ||
|
|
103da73f28 | ||
|
|
f1fc190711 | ||
|
|
7e010114fe | ||
|
|
495aa7f860 | ||
|
|
705e60fbf9 | ||
|
|
119b4dbe5f | ||
|
|
d5dd935683 | ||
|
|
218caac488 | ||
|
|
5e40d80881 | ||
|
|
dda0f6caf9 | ||
|
|
d031927599 | ||
|
|
7eee44891f | ||
|
|
0abbb2be7d | ||
|
|
e77825074d | ||
|
|
b84d22c6fb | ||
|
|
876f3ec018 | ||
|
|
51ab8d1537 | ||
|
|
c938ee0b32 | ||
|
|
dc0f824c38 | ||
|
|
13a4caf0cd | ||
|
|
fbe2b4c7a9 | ||
|
|
83f13054ad | ||
|
|
776353f3e3 | ||
|
|
233ecd49b1 | ||
|
|
6b2f528d9f | ||
|
|
86cff74999 | ||
|
|
0afd248a29 | ||
|
|
81276a8df8 | ||
|
|
1126efe8d2 | ||
|
|
10bce38a76 | ||
|
|
3f9b0c5573 | ||
|
|
5414af93ba | ||
|
|
df492782e2 | ||
|
|
c7aa369f6f | ||
|
|
187bd22d5d | ||
|
|
2c2696f124 | ||
|
|
8908955efd | ||
|
|
ed3ada771a | ||
|
|
ee5da3672a | ||
|
|
1f9655af22 | ||
|
|
b4f1ca62dd | ||
|
|
3de27fe12d | ||
|
|
b01c42dd04 | ||
|
|
02a021b217 | ||
|
|
67e1bddc33 | ||
|
|
88714a7f6b | ||
|
|
41be945ca5 | ||
|
|
2fb82fb3ad | ||
|
|
2379aa505f | ||
|
|
850c4820bf | ||
|
|
80ded16f54 | ||
|
|
7a9cff59a7 | ||
|
|
7318711606 | ||
|
|
3638651cde | ||
|
|
dd6b5825eb | ||
|
|
37f12e39a3 | ||
|
|
f012a2aeee | ||
|
|
bbaa2d846d | ||
|
|
91c9c0cec3 | ||
|
|
979d6a1b26 | ||
|
|
d33ec7c209 | ||
|
|
2d6b5590c7 | ||
|
|
4f03f6c4bf | ||
|
|
a33b7cee5a | ||
|
|
8f57069f86 | ||
|
|
b49f8ffd5f | ||
|
|
8d7bf2ad76 | ||
|
|
3cb8acd2e9 | ||
|
|
89d05c5889 | ||
|
|
81023950c6 | ||
|
|
6e986e8f96 | ||
|
|
4b2441bf66 | ||
|
|
09c6ea48f0 | ||
|
|
ca17e09d53 | ||
|
|
1c2358bdf9 | ||
|
|
0312af769b | ||
|
|
54a4ae36e8 | ||
|
|
955df228dd | ||
|
|
44a956cb42 | ||
|
|
7e766abe78 | ||
|
|
41ded74b37 | ||
|
|
0322b59e50 | ||
|
|
04742ae492 | ||
|
|
58251db14d | ||
|
|
6f2dc28949 | ||
|
|
903a92c7bb | ||
|
|
97da96fa8c | ||
|
|
e425abb5f5 | ||
|
|
23f5ddfe3a | ||
|
|
cad7e90951 | ||
|
|
33ea399f99 | ||
|
|
d9013a86c4 | ||
|
|
430d8e6e17 | ||
|
|
32f9897bf2 | ||
|
|
091f871e65 | ||
|
|
c9081ee4f3 | ||
|
|
207f0cf42a | ||
|
|
240b684846 | ||
|
|
a06e20f8fe | ||
|
|
df3ee0f9d7 | ||
|
|
cf27b4665e | ||
|
|
1b8bf663ae | ||
|
|
6535feb2a5 | ||
|
|
68d7a125ad | ||
|
|
e1481e0174 | ||
|
|
512498b487 | ||
|
|
d06ca7bfec | ||
|
|
8971aa0cb8 | ||
|
|
009bc9b864 | ||
|
|
ed1ee25b7b | ||
|
|
7bc83ba139 | ||
|
|
892c164a7b | ||
|
|
79f4a4cf75 | ||
|
|
5bb2a27249 | ||
|
|
6c96c40148 | ||
|
|
6e932c3629 | ||
|
|
7286264340 | ||
|
|
1f837fe159 | ||
|
|
e65bc32232 | ||
|
|
45227a089e | ||
|
|
dfe35b15bb | ||
|
|
423a55b305 | ||
|
|
de38109d4c | ||
|
|
f84185f497 | ||
|
|
a21839d00d | ||
|
|
db6aec351b | ||
|
|
78b2edf1e3 | ||
|
|
4b06502eb2 | ||
|
|
ab787465b6 | ||
|
|
6c2ce28dc0 | ||
|
|
321b556878 | ||
|
|
e8dabe034a | ||
|
|
edb439d4f6 | ||
|
|
a66f20ee2e | ||
|
|
43b3d4968c | ||
|
|
4f48e64902 | ||
|
|
d901c5b613 | ||
|
|
45ae1272ea | ||
|
|
6054aa23fc | ||
|
|
26544b7d01 | ||
|
|
5c54d2085f | ||
|
|
136ce723f7 | ||
|
|
c3ac455fd2 | ||
|
|
7b371107bf | ||
|
|
219b9b25eb | ||
|
|
0f7286cf55 | ||
|
|
d5e3af3744 | ||
|
|
8b4f06b8c5 | ||
|
|
c41a5ce8aa | ||
|
|
a8df4018f1 | ||
|
|
d2a70a52f5 | ||
|
|
02cec3ff0f | ||
|
|
88b417d421 | ||
|
|
b3f2986d69 | ||
|
|
08459beac3 | ||
|
|
59484624a4 | ||
|
|
e717007697 | ||
|
|
57e5156385 | ||
|
|
cf554e8cf9 | ||
|
|
6b2860b7b0 | ||
|
|
0278fd481d | ||
|
|
e32c9af809 | ||
|
|
84e25e9b41 | ||
|
|
aa5bb2cfa7 | ||
|
|
d2e1d5104f | ||
|
|
cb84b99583 | ||
|
|
8c6103a3b4 | ||
|
|
dcbd8121d9 | ||
|
|
c0d4493bd9 | ||
|
|
0c394c0c7c | ||
|
|
a50081289e | ||
|
|
6bfac402fb | ||
|
|
8944900f86 | ||
|
|
1ffcd4ae93 | ||
|
|
c8344afb94 | ||
|
|
9a52545094 | ||
|
|
734e1cb987 | ||
|
|
88fd0a6e7f | ||
|
|
c8d3fc1fd0 | ||
|
|
829ee45850 | ||
|
|
63e425ffe2 | ||
|
|
bc3274a7c8 | ||
|
|
94ca41beeb | ||
|
|
c419101f73 | ||
|
|
1b00da60ec | ||
|
|
e441fd4498 | ||
|
|
67a240a269 | ||
|
|
70d1828179 | ||
|
|
8430c538b4 | ||
|
|
8af6bd5f8a | ||
|
|
8da980ff79 | ||
|
|
e9074202ae | ||
|
|
5a7ba61be9 | ||
|
|
5af2334c5e | ||
|
|
a6ebcecf27 | ||
|
|
9eba6e70b8 | ||
|
|
13b1e47f23 | ||
|
|
953db09db8 | ||
|
|
1a21834a97 | ||
|
|
a155838b58 | ||
|
|
f21d9494a2 | ||
|
|
84bdc31efe | ||
|
|
b4178b1190 | ||
|
|
0356594dee | ||
|
|
f99eab0ceb | ||
|
|
7c6062ccf7 | ||
|
|
ebcdd4fe0d | ||
|
|
2029730ddd | ||
|
|
5b763c4eb0 | ||
|
|
94735b023f | ||
|
|
a9ab892f7a | ||
|
|
6bb69eca2b | ||
|
|
a16b896c3f | ||
|
|
fb0da62177 | ||
|
|
03834eb1ec | ||
|
|
497507ffee | ||
|
|
2249f929c6 | ||
|
|
06e4658c00 | ||
|
|
fe17140a89 | ||
|
|
65df6f61dd | ||
|
|
eb6034e8a5 | ||
|
|
4a8558dcef | ||
|
|
862f1c607e | ||
|
|
9f47a7d964 | ||
|
|
1f4eda7d11 | ||
|
|
a87b3a40b5 | ||
|
|
49f367aaca | ||
|
|
d5d0f7e76b | ||
|
|
bb72646030 | ||
|
|
153561d989 | ||
|
|
903992dc45 | ||
|
|
4fbf3a1cf2 | ||
|
|
cfc503db64 | ||
|
|
82dcc20042 | ||
|
|
f650027fc6 | ||
|
|
137ce4ea27 | ||
|
|
2d30f7c061 | ||
|
|
b96c33666f | ||
|
|
c1c050eb61 | ||
|
|
c23acaa3b7 | ||
|
|
4b4125f30d | ||
|
|
e4eaced459 | ||
|
|
e9840b1c90 | ||
|
|
c4f2e20471 | ||
|
|
767677f0f6 | ||
|
|
4ed52cbd2b | ||
|
|
ecfdb35cda | ||
|
|
ce367b0b80 | ||
|
|
7e1d706f5f | ||
|
|
0b103fa28c | ||
|
|
0e901e285a | ||
|
|
da955efc3d | ||
|
|
b763728b60 | ||
|
|
8876a63cdb | ||
|
|
2db4b4ef7f | ||
|
|
27c31112a6 | ||
|
|
31cf2775f5 | ||
|
|
79ba83e1b5 | ||
|
|
9474cac9bf | ||
|
|
493bdc6c1f | ||
|
|
7d8e983bac | ||
|
|
8b16286cc3 | ||
|
|
f377e9e7ac | ||
|
|
49ba01f724 | ||
|
|
25cb9d78a8 | ||
|
|
b9969d41cb | ||
|
|
ee57c14cc2 | ||
|
|
e56acf710a | ||
|
|
97ff11be97 | ||
|
|
64042339ee | ||
|
|
e3a760e054 | ||
|
|
5cba23203c | ||
|
|
4317b5353b | ||
|
|
d6f84c6e3b | ||
|
|
5f40d268df | ||
|
|
c75289c39d | ||
|
|
66f57d0811 | ||
|
|
215112db6d | ||
|
|
f2e2b1d3a4 | ||
|
|
6b6fc00cc1 | ||
|
|
dcf7a7a058 | ||
|
|
ed4b7ec250 | ||
|
|
85d22afc03 | ||
|
|
9ff1f28566 | ||
|
|
c33c68bdcc | ||
|
|
bb8ac53651 | ||
|
|
8d58a70300 | ||
|
|
5641b25d8d | ||
|
|
972af31cdb | ||
|
|
4848249f37 | ||
|
|
3f21d2b2de | ||
|
|
34de41a057 | ||
|
|
b39800cf5e | ||
|
|
107e6c27b8 | ||
|
|
a92176bdfa | ||
|
|
d2c65e3b93 | ||
|
|
21b51b4830 | ||
|
|
9f325e1160 | ||
|
|
e877a4355d | ||
|
|
e8f34f3e53 | ||
|
|
6190b68c94 | ||
|
|
68f15991cd | ||
|
|
d7bac5ab41 | ||
|
|
e3007c840c | ||
|
|
64925db945 | ||
|
|
7752fecda8 | ||
|
|
44f6296aab | ||
|
|
33cd46150a | ||
|
|
563abfd711 | ||
|
|
6f93540f34 | ||
|
|
1a0d39eb31 | ||
|
|
1b8581c9aa | ||
|
|
1684631ef4 | ||
|
|
1196e89298 | ||
|
|
38d3d8d988 | ||
|
|
7790a3d03c | ||
|
|
7611cdeb2a | ||
|
|
7aff4574f8 | ||
|
|
c83422ee30 | ||
|
|
632bb45fd7 | ||
|
|
fd784d74f6 | ||
|
|
bc63fbefe3 | ||
|
|
a78014911c | ||
|
|
7864307620 | ||
|
|
f31fe819c8 | ||
|
|
9533070c7c | ||
|
|
55f6c858e5 | ||
|
|
e1cadbf946 | ||
|
|
b6fe2a0292 | ||
|
|
f1b1350d18 | ||
|
|
9b343cc756 | ||
|
|
cd18b89cd8 | ||
|
|
cd4dbb626d | ||
|
|
7b894fec0b | ||
|
|
f2cfcfde71 | ||
|
|
b416f4a52b | ||
|
|
9cc5cee0c5 | ||
|
|
dfbb6e7c5c | ||
|
|
9ac38db9ad | ||
|
|
59c4bb5939 | ||
|
|
1ca7184cb4 | ||
|
|
e199c75c47 | ||
|
|
0b8ce4d96e | ||
|
|
3f99281cb8 | ||
|
|
5c14212618 | ||
|
|
3ecea82819 | ||
|
|
6a882e9569 | ||
|
|
10e20baade | ||
|
|
ca3790b68c | ||
|
|
104b0cb587 | ||
|
|
14965508c7 | ||
|
|
db56675c94 | ||
|
|
886541ab35 | ||
|
|
801e892014 | ||
|
|
a647a1b617 | ||
|
|
a73ab1223b | ||
|
|
848d5201ae | ||
|
|
e42557eac7 | ||
|
|
49672308d6 | ||
|
|
39085a622b | ||
|
|
1003cde6f7 | ||
|
|
fd82e6baad | ||
|
|
54e01d831e | ||
|
|
a53ac54f4e | ||
|
|
c8a5be4ee1 | ||
|
|
5b3c0d0116 | ||
|
|
5204ce8300 | ||
|
|
c7c029db8e | ||
|
|
0abbf3cb5c | ||
|
|
e4629337d5 | ||
|
|
971120f29e | ||
|
|
a40145a4c9 | ||
|
|
d0132fe244 | ||
|
|
05dea33db8 | ||
|
|
7903958fcc | ||
|
|
ddc2f60c7e | ||
|
|
116c3cf36d | ||
|
|
874d98a040 | ||
|
|
0b1dc817dc | ||
|
|
b7b0e10af4 | ||
|
|
7670d8d50d | ||
|
|
aa2f269204 | ||
|
|
b4b9aa7bc1 | ||
|
|
7675187830 | ||
|
|
f8845c945c | ||
|
|
dd73e08d19 | ||
|
|
5632f5fed3 | ||
|
|
39c9674e1d | ||
|
|
477748c885 | ||
|
|
5a86b4a41c | ||
|
|
f2677d4f8e | ||
|
|
27d5b2d06a | ||
|
|
5aea61bf88 | ||
|
|
950497cddf | ||
|
|
9d8a7bdf60 | ||
|
|
c31d1933fa | ||
|
|
87942d7d25 | ||
|
|
f3cb047e98 | ||
|
|
c60db94932 | ||
|
|
52597f7064 | ||
|
|
d3e1f45a4e | ||
|
|
0ab2dffd3b | ||
|
|
7099bd75fe | ||
|
|
46bc7435b7 | ||
|
|
34888a7d3e | ||
|
|
ad78615d47 | ||
|
|
2459e4a023 | ||
|
|
91dab37cd1 | ||
|
|
1c7cae5c2b | ||
|
|
3767bab049 | ||
|
|
a81a06709e | ||
|
|
97afb2259b | ||
|
|
4c5bfeb135 | ||
|
|
17582eaec0 | ||
|
|
8edbbc5a7b | ||
|
|
791b8223f9 | ||
|
|
871c66b451 | ||
|
|
cfdc74341d | ||
|
|
219f413d22 | ||
|
|
bd3b9d0442 | ||
|
|
fa0053f154 | ||
|
|
1fc218be40 | ||
|
|
da5f1c127f | ||
|
|
781d21f954 | ||
|
|
7be48826ac | ||
|
|
6bc4008730 | ||
|
|
c2d74bbc1d | ||
|
|
e50e2a274b | ||
|
|
65554d83e3 | ||
|
|
26a8cec43a | ||
|
|
8c28f5c367 | ||
|
|
3765313249 | ||
|
|
af103dd2f6 | ||
|
|
416cea65a0 | ||
|
|
5fa50ecc21 | ||
|
|
075be30f2c | ||
|
|
96183b6e44 | ||
|
|
f85fd5388e | ||
|
|
772a333a1b | ||
|
|
b37e7b64b4 | ||
|
|
3f845fdad1 | ||
|
|
781a9eff61 | ||
|
|
f09f7bbc24 | ||
|
|
d5515f3fae | ||
|
|
3853c7d360 | ||
|
|
af1e5fb993 | ||
|
|
04c34d444a | ||
|
|
4dbc07d557 | ||
|
|
5bb59bb0b1 | ||
|
|
dee5461cb1 | ||
|
|
eda372028c | ||
|
|
0b018cd216 | ||
|
|
c3927326fc | ||
|
|
44217a8efe | ||
|
|
6247554999 | ||
|
|
45a71af3f4 | ||
|
|
ab0f110432 | ||
|
|
58344d47d1 | ||
|
|
f40d79d54d | ||
|
|
7b96ed2fbd | ||
|
|
16850dd85a | ||
|
|
91136c816f | ||
|
|
8f6ebdc724 | ||
|
|
448f27d22a | ||
|
|
da855e40d5 | ||
|
|
45491d1a7e | ||
|
|
cb4199a26d | ||
|
|
bb5255962a | ||
|
|
354a9ab899 | ||
|
|
e2a78745d6 | ||
|
|
d27f333f4b | ||
|
|
5ec642f9f5 | ||
|
|
58fc636dad | ||
|
|
a408a3138c | ||
|
|
57a88a08c2 | ||
|
|
5b640ff59d | ||
|
|
dda62a58b7 | ||
|
|
a03a8ba908 | ||
|
|
b8e0740b41 | ||
|
|
b3114eb924 | ||
|
|
f3fa8ab7bd | ||
|
|
8589305d82 | ||
|
|
9402ad3182 | ||
|
|
62fab0cf3c | ||
|
|
bfcb2c5b77 | ||
|
|
77b9d171c0 | ||
|
|
3fb5fa051e | ||
|
|
3161137291 | ||
|
|
19ce286ce4 | ||
|
|
6c876fc9f9 | ||
|
|
6148b8a130 | ||
|
|
d9423be825 | ||
|
|
aedb82f709 | ||
|
|
5be4e6fdc7 | ||
|
|
8c87af57ca | ||
|
|
14d67a892e | ||
|
|
9e989a9689 | ||
|
|
cc4a7ba9b5 | ||
|
|
fdd4346891 | ||
|
|
c8b5d5b6d5 | ||
|
|
e3f8dd8f34 | ||
|
|
3e32a8c020 | ||
|
|
fc06a69b8f | ||
|
|
6574e5e5e5 | ||
|
|
d24f1a5ad7 | ||
|
|
ba7abda22f | ||
|
|
b0e254d257 | ||
|
|
a59162dbd4 | ||
|
|
f645729aa6 | ||
|
|
ebdc056429 | ||
|
|
9524853450 | ||
|
|
ab81f06037 | ||
|
|
fb643d08a4 | ||
|
|
5a6d5776df | ||
|
|
9151c25852 | ||
|
|
b0505adb10 | ||
|
|
aa82857f6d | ||
|
|
2e49eaa84c | ||
|
|
072f6c4cd8 | ||
|
|
45672f7b86 | ||
|
|
8d1d3da3e5 | ||
|
|
afad736e9b | ||
|
|
89b597c1e8 | ||
|
|
673a74c772 | ||
|
|
bd55cf1f24 | ||
|
|
f01c55a282 | ||
|
|
319a1ddf56 | ||
|
|
5f9cbb44b5 | ||
|
|
74dc6cecc0 | ||
|
|
1a8360be0c | ||
|
|
4c864e98d2 | ||
|
|
9a0f5e7f3b | ||
|
|
e0c11b34f5 | ||
|
|
96f836960b | ||
|
|
c5f090d034 | ||
|
|
3517c361e6 | ||
|
|
6a8411c30e | ||
|
|
08dd4fad2b | ||
|
|
3f0fb34244 | ||
|
|
882c65e325 | ||
|
|
21839da687 | ||
|
|
c306027c98 | ||
|
|
cfe53c2e15 | ||
|
|
ae9e867dc6 | ||
|
|
7462aef57b | ||
|
|
b80471a6bf | ||
|
|
a4f5b5248c | ||
|
|
02d506ac84 | ||
|
|
85846f57aa | ||
|
|
4bee2e646d | ||
|
|
5bb24cf2ac | ||
|
|
1b8a998f00 | ||
|
|
f595049d3d | ||
|
|
4d93e35acf | ||
|
|
e7d5b97033 | ||
|
|
50ead0342b | ||
|
|
9084b55571 | ||
|
|
2e51a90014 | ||
|
|
d78c032a75 | ||
|
|
90417ad4ff | ||
|
|
a96ba973c1 | ||
|
|
b8faeb5ae6 | ||
|
|
d2adc1dcd9 | ||
|
|
3a7c892f01 | ||
|
|
7a150ace74 | ||
|
|
f611ddcdaf | ||
|
|
83d3e7abcf | ||
|
|
8989f44eb5 | ||
|
|
84f5017333 | ||
|
|
9b3954e5c5 | ||
|
|
22e7676a8c | ||
|
|
e9fb83dcb1 | ||
|
|
b60c47312b | ||
|
|
1c728100ce | ||
|
|
e67efc904f | ||
|
|
3c896884e9 | ||
|
|
ab8e37a748 | ||
|
|
273f426f5b | ||
|
|
bc9c229a64 | ||
|
|
d6197d6e14 | ||
|
|
e658625799 | ||
|
|
e21f2e5629 | ||
|
|
3e40369a31 | ||
|
|
2469cdddc3 | ||
|
|
999aa25f2a | ||
|
|
f792f4c986 | ||
|
|
5860263c42 | ||
|
|
bbcb5b4a55 | ||
|
|
ee12401f93 | ||
|
|
9928c69e43 | ||
|
|
5e4b3f14ae | ||
|
|
408ad69850 | ||
|
|
5bca489245 | ||
|
|
822c1ea614 | ||
|
|
64504b9ffb | ||
|
|
19071cd8fa | ||
|
|
92d6800a00 | ||
|
|
f40a55fc31 | ||
|
|
c124699f22 | ||
|
|
a1acf858a2 | ||
|
|
8c11afab49 | ||
|
|
57aa9e8a21 | ||
|
|
6cfca9c29d | ||
|
|
0500e21d95 | ||
|
|
d57e723bb8 | ||
|
|
a3db9c0c16 | ||
|
|
ee3e99c890 | ||
|
|
764f93a838 | ||
|
|
8a727aa289 | ||
|
|
a6953225a9 | ||
|
|
9bb8895475 | ||
|
|
ffd28b299d | ||
|
|
e602dddb6c | ||
|
|
470711442d | ||
|
|
2c0b52559b | ||
|
|
398b1e18de | ||
|
|
366bbc03fb | ||
|
|
80dcc010ae | ||
|
|
2a94362905 | ||
|
|
8dc663d323 | ||
|
|
a61dba6bc5 | ||
|
|
ac0f9cf966 | ||
|
|
ed57760e69 | ||
|
|
0d7f7069ca | ||
|
|
d4e91e07d8 | ||
|
|
c258dd0cec | ||
|
|
be6a4ef68c | ||
|
|
57af10ae01 | ||
|
|
126dbe1f6f | ||
|
|
7336c2d0a1 | ||
|
|
0f5dda5820 | ||
|
|
8e1692b10d | ||
|
|
1dca22127c | ||
|
|
a1f9aeea18 | ||
|
|
a5b4a189c2 | ||
|
|
14192f5c4e | ||
|
|
5f1f3bb148 | ||
|
|
c8c2ebc277 | ||
|
|
265d83f041 | ||
|
|
ec67c169a8 | ||
|
|
5a4476ee8c | ||
|
|
e8b0174a8e | ||
|
|
262b8b30cf | ||
|
|
c854fa12c6 | ||
|
|
cf629b9522 | ||
|
|
4d5d53889d | ||
|
|
d4ef80c72e | ||
|
|
830839bd5a | ||
|
|
f849d3f265 | ||
|
|
3d742c69ea | ||
|
|
9260315042 | ||
|
|
f82adbf877 | ||
|
|
9b5e8d1910 | ||
|
|
e76a5b5bbb | ||
|
|
e450fb6641 | ||
|
|
cb1e32bf2b | ||
|
|
5f483af0ef | ||
|
|
a92b661ea5 | ||
|
|
c2f8ecbba8 | ||
|
|
0469b8fd8b | ||
|
|
83ed1f3fb3 | ||
|
|
34339c7214 | ||
|
|
ff51196856 | ||
|
|
f860d7aea6 | ||
|
|
5bce191a0c | ||
|
|
82635e7161 | ||
|
|
d9c66949be | ||
|
|
eaa07c08dd | ||
|
|
fb9583ffd7 | ||
|
|
5294e3e929 | ||
|
|
88ec202bad | ||
|
|
ecd888cdc5 | ||
|
|
d437cf3054 | ||
|
|
803466d050 | ||
|
|
1be8b30e74 | ||
|
|
c9255aa6eb | ||
|
|
7a07b3daf7 | ||
|
|
74ef32ee32 | ||
|
|
c038d3bdf3 | ||
|
|
461acd159c | ||
|
|
16f9e444cb | ||
|
|
72e42c9b4b | ||
|
|
830e5bbd42 | ||
|
|
86ee17e305 | ||
|
|
fbf099e515 | ||
|
|
3253e929d5 | ||
|
|
1cada068d1 | ||
|
|
14c560f898 | ||
|
|
27336b6fb4 | ||
|
|
b08878cbb3 | ||
|
|
1c659e7dc9 | ||
|
|
bace074942 | ||
|
|
1d126b7cfa | ||
|
|
1f05ce8a2f | ||
|
|
3ec5a44918 | ||
|
|
722c968e81 | ||
|
|
c8755ac4cd | ||
|
|
63f71c7c3f | ||
|
|
8185c5b348 | ||
|
|
4dfad91ee8 | ||
|
|
6222e3fdb9 | ||
|
|
733d68af03 | ||
|
|
84cb0e62a3 | ||
|
|
9a7dd62fff | ||
|
|
c1b88facf1 | ||
|
|
e62d8d0d8a | ||
|
|
f1f9faf666 | ||
|
|
e4aee3f5a3 | ||
|
|
2fc7f49574 | ||
|
|
5f8be27e1e | ||
|
|
f87a5f32bc | ||
|
|
51f6b59cc3 | ||
|
|
494fea68ba | ||
|
|
1fd3a99e93 | ||
|
|
5a17ea5a5d | ||
|
|
5413083ae7 | ||
|
|
f1754a3b26 | ||
|
|
9fb1d9e5ae | ||
|
|
07c0037bae | ||
|
|
35ca8c06e4 | ||
|
|
f29d232c48 | ||
|
|
5aa272fd25 | ||
|
|
450c5e9875 | ||
|
|
b45c7b96db | ||
|
|
63defc03a5 | ||
|
|
464f3ec4b8 | ||
|
|
ae46dfbebd | ||
|
|
e00244ddb5 | ||
|
|
eedbbc68ce | ||
|
|
3ff7e86f8c | ||
|
|
dffb2ebf1f | ||
|
|
cc8da6b7fb | ||
|
|
a78b94491d | ||
|
|
22746ae61a | ||
|
|
c86c7346a8 | ||
|
|
c16c8958e5 | ||
|
|
be30e69ac2 | ||
|
|
fd9146b41b | ||
|
|
e111b302bc | ||
|
|
4f3f360837 | ||
|
|
506dba1e33 | ||
|
|
a7400fc99f | ||
|
|
d2028b1a75 | ||
|
|
9605800975 | ||
|
|
728fe88d80 | ||
|
|
23bd524cc3 | ||
|
|
6bf10f7b32 | ||
|
|
b817a5d6b8 | ||
|
|
7e0afc8f43 | ||
|
|
47ffd256b9 | ||
|
|
e782cf103f | ||
|
|
2a06ef83d7 | ||
|
|
3623161a9c | ||
|
|
bdd3de5f00 | ||
|
|
10776a19b8 | ||
|
|
425b0e3c9e | ||
|
|
2dcf85a5e8 | ||
|
|
68b07de006 | ||
|
|
08c64ab616 | ||
|
|
d456465df5 | ||
|
|
feeaa714aa | ||
|
|
575f6764c9 | ||
|
|
371afd3515 | ||
|
|
f379dfc153 | ||
|
|
6c41187baa | ||
|
|
bbedc82694 | ||
|
|
8664abc331 | ||
|
|
8b9e18c804 | ||
|
|
0b66311655 | ||
|
|
f53b683f37 | ||
|
|
c5586a25cf | ||
|
|
398fd0eee6 | ||
|
|
365af6fa65 | ||
|
|
3c52c0fadf | ||
|
|
6950069f37 | ||
|
|
4b25f66566 | ||
|
|
db4c9f21b4 | ||
|
|
271fd7dcab | ||
|
|
1a0f0274a0 | ||
|
|
cbb9baab8c | ||
|
|
26ff8cb857 | ||
|
|
839a3bad24 | ||
|
|
acb1bb306c | ||
|
|
46b863d34c | ||
|
|
bb6231ad91 | ||
|
|
77add4162b | ||
|
|
1ba6bff6f7 | ||
|
|
474cd0d01c | ||
|
|
a5f5052c05 | ||
|
|
f4b71344e5 | ||
|
|
09fc703127 | ||
|
|
47b7fd3e2d | ||
|
|
e45e533d24 | ||
|
|
2372a593b3 | ||
|
|
5adfc2c139 | ||
|
|
928e5ba14e | ||
|
|
7a8e83e2a0 | ||
|
|
966506278e | ||
|
|
8cc4272694 | ||
|
|
d994aae9f0 | ||
|
|
4ec20bbd1f | ||
|
|
6d60341672 | ||
|
|
bce6fe83af | ||
|
|
078ee54715 | ||
|
|
45ffe716a2 | ||
|
|
be0f95eaff | ||
|
|
49a548240c | ||
|
|
441be95ef7 | ||
|
|
f0d9391a9c | ||
|
|
07621e127b | ||
|
|
60477286f3 | ||
|
|
7443e5ef84 | ||
|
|
2a73aeb3a6 | ||
|
|
30b94b3806 | ||
|
|
ee6d058e66 | ||
|
|
0ac03ae5cd | ||
|
|
8381cb3579 | ||
|
|
e31737a45d | ||
|
|
c196027bdc | ||
|
|
233f97cde9 | ||
|
|
364aa1f427 | ||
|
|
ee8392eb0c | ||
|
|
45279f68e2 | ||
|
|
1b39474886 | ||
|
|
c564da6793 | ||
|
|
4cede3f83f | ||
|
|
e104ffa598 | ||
|
|
6c6bde9595 | ||
|
|
653464ce5f | ||
|
|
937fea0271 | ||
|
|
c8a45c5ade | ||
|
|
2166da9e69 | ||
|
|
3055a6e22e | ||
|
|
5389ec04d0 | ||
|
|
417b141df9 | ||
|
|
8316fef208 | ||
|
|
decded9610 | ||
|
|
5acd328185 | ||
|
|
f92998eec0 | ||
|
|
a1c30dff82 | ||
|
|
14ee0314c0 | ||
|
|
2bb6a93576 | ||
|
|
dfb2aaa1f4 | ||
|
|
adf97b09cf | ||
|
|
ffca8b9634 | ||
|
|
2ff2f65be7 | ||
|
|
c09657381e | ||
|
|
8a4357c301 | ||
|
|
db327beb63 | ||
|
|
51fe304f01 | ||
|
|
70d1cb1704 | ||
|
|
2a996151d7 | ||
|
|
6a4cd5fe25 | ||
|
|
0907d3e800 | ||
|
|
c4c0a98ef7 | ||
|
|
cb9d6191f5 | ||
|
|
4f7c1f574f | ||
|
|
ab9b790eba | ||
|
|
bd037a9faf | ||
|
|
926a1051b8 | ||
|
|
d7cc098c48 | ||
|
|
1af07d9cdb | ||
|
|
8cff40cd56 | ||
|
|
85c67d753f | ||
|
|
5f2d3f73ab | ||
|
|
a258f3a296 | ||
|
|
f67f0a9cfa | ||
|
|
fce6b6161e | ||
|
|
8dcc86c73f | ||
|
|
cbf04705ea | ||
|
|
96feaecfa4 | ||
|
|
e77dc655b9 | ||
|
|
a972e015fb | ||
|
|
f6226d37f2 | ||
|
|
ee95401a40 | ||
|
|
b87c75d7e9 | ||
|
|
21ceb6a387 | ||
|
|
7509dfc100 | ||
|
|
2edd71ff65 | ||
|
|
251cec6aa4 | ||
|
|
1a46d23399 | ||
|
|
d089cc232d | ||
|
|
ff1d221031 | ||
|
|
2af61871de | ||
|
|
98cc547869 | ||
|
|
adfd5a1d3c | ||
|
|
fe14e563ba | ||
|
|
2f06141c30 | ||
|
|
5ebacc725f | ||
|
|
9b90326796 | ||
|
|
5db3946e4a | ||
|
|
ff1c7a5a5c | ||
|
|
fb0c77cf75 | ||
|
|
8f71c6b9a6 | ||
|
|
64d8798d5d | ||
|
|
4f0aec5dd1 | ||
|
|
8eaefdcbad | ||
|
|
31a9c290b4 | ||
|
|
0180119c69 | ||
|
|
0b344d31d0 | ||
|
|
06e3393f83 | ||
|
|
d75eee19c6 | ||
|
|
28d4512f33 | ||
|
|
0a6d139688 | ||
|
|
3dc8a37cc3 | ||
|
|
9c57d47b94 | ||
|
|
5500b2ea0a | ||
|
|
406da26cb7 | ||
|
|
ec11002385 | ||
|
|
2dbc016394 | ||
|
|
9d8859a82d | ||
|
|
7e6f0bfccb | ||
|
|
3efc637414 | ||
|
|
cff50c2a31 | ||
|
|
256e10bb54 | ||
|
|
780a5b6022 | ||
|
|
9dd7846d25 | ||
|
|
ab8921d09b | ||
|
|
b79ec00ec5 | ||
|
|
5ee395c5ee | ||
|
|
166e63b991 | ||
|
|
89fdcf5424 | ||
|
|
701cad7f75 | ||
|
|
6d0fbd443f | ||
|
|
5577502c1c | ||
|
|
1272e92acd | ||
|
|
ea9ddb0a8c | ||
|
|
6a18fe6517 | ||
|
|
a7f23c2eba | ||
|
|
151b807fee | ||
|
|
1ca4a3a0aa | ||
|
|
490c7b6765 | ||
|
|
bd35c01ba9 | ||
|
|
c77b1099da | ||
|
|
2845e42207 | ||
|
|
776384e14e | ||
|
|
87864636a3 | ||
|
|
4b0ccacae8 | ||
|
|
ce1ef3d8a3 | ||
|
|
a5738f657a | ||
|
|
3c5b7f2ddc | ||
|
|
fe2c5515e1 | ||
|
|
b557a57c71 | ||
|
|
5e6333bf4e | ||
|
|
7c84b2228b | ||
|
|
b9b5743b72 | ||
|
|
253d7803bb | ||
|
|
471de29a20 | ||
|
|
c402ee962f | ||
|
|
3e1a236812 | ||
|
|
26d78129fa | ||
|
|
577cfae1cf | ||
|
|
94d92a7181 | ||
|
|
dca2041f54 | ||
|
|
1396f98763 | ||
|
|
fede24ed75 | ||
|
|
7b2cebe6a7 | ||
|
|
2d5021b402 | ||
|
|
c00ccf8b1d | ||
|
|
ba1856ae5a | ||
|
|
7969f65220 | ||
|
|
a213b303a6 | ||
|
|
577f254aac | ||
|
|
ca76528ce1 | ||
|
|
0dbccdea3d | ||
|
|
86f6d762df | ||
|
|
7a46ec2649 | ||
|
|
b2e616bc5f | ||
|
|
b2a10419ce | ||
|
|
1d6f5a0e24 | ||
|
|
b717cfe2f1 | ||
|
|
3237250330 | ||
|
|
bb69053ca5 | ||
|
|
1cc49e82f5 | ||
|
|
a87d0cce83 | ||
|
|
7d61f37314 | ||
|
|
0a5bf64304 | ||
|
|
1dd0635db4 | ||
|
|
93f8458ba0 | ||
|
|
3875ac87b3 | ||
|
|
f6505d22f2 | ||
|
|
778ace10c0 | ||
|
|
553eddf6b3 | ||
|
|
99f2e84186 | ||
|
|
618f2cff2d | ||
|
|
f697f2e5ba | ||
|
|
e47349321a | ||
|
|
3f5e937cf1 | ||
|
|
0dd8a91422 | ||
|
|
0c36fc7eb7 | ||
|
|
2ea08783c2 | ||
|
|
6d7b03a1de | ||
|
|
849d676919 | ||
|
|
30bf6e2449 | ||
|
|
61a0941817 | ||
|
|
35454d834d | ||
|
|
a4e1adf141 | ||
|
|
9f0b007faf | ||
|
|
8cd0490d1e | ||
|
|
e0992c9470 | ||
|
|
4673efd4c4 | ||
|
|
ce6687e23b | ||
|
|
05f3891fd1 | ||
|
|
4fefe8993f | ||
|
|
88eef5d7d2 | ||
|
|
77e39dbd1e | ||
|
|
8589ee2ccd | ||
|
|
128d4befd8 | ||
|
|
250984b6d2 | ||
|
|
6655a9028e | ||
|
|
609014d4e6 | ||
|
|
b8e34b6913 | ||
|
|
fa74fe012c | ||
|
|
274c1c3dfc | ||
|
|
a467bb0774 | ||
|
|
9548c68804 | ||
|
|
0625d2630b | ||
|
|
209730c94f | ||
|
|
85de95e643 | ||
|
|
6d49c51b83 | ||
|
|
aee134f9c1 | ||
|
|
d7dfa0431f | ||
|
|
a5b927fca1 | ||
|
|
9dfddf5bdc | ||
|
|
da4b0a6136 | ||
|
|
5c9694ce6d | ||
|
|
fbff7ddb9f | ||
|
|
d1895cea2c | ||
|
|
950c06f26e | ||
|
|
266e2c1a39 | ||
|
|
8c06e270cd | ||
|
|
7509953880 | ||
|
|
75b2a69851 | ||
|
|
39003d4b56 | ||
|
|
1e47fbb52a | ||
|
|
daabff0021 | ||
|
|
53909ad4e9 | ||
|
|
916bd49bbf | ||
|
|
8617e98da3 | ||
|
|
9251a98a55 | ||
|
|
67177e284b | ||
|
|
5624ce9124 | ||
|
|
ee0e0a7846 | ||
|
|
9deb43ba53 | ||
|
|
c299715eea | ||
|
|
88e57802f2 | ||
|
|
47c383a1da | ||
|
|
5f2025c7c3 | ||
|
|
fce1d2eed8 | ||
|
|
7d0bb2e5e3 | ||
|
|
2540fc020e | ||
|
|
47ee25bf88 | ||
|
|
a76443c23b | ||
|
|
cbf1d6a12b | ||
|
|
1bab4e14fe | ||
|
|
887411e17c | ||
|
|
dd8427dac0 | ||
|
|
a9bc75441d | ||
|
|
1b4729c63b | ||
|
|
b54a35c660 | ||
|
|
551115f82d | ||
|
|
46d7bf8522 | ||
|
|
05b5aa1df0 | ||
|
|
28741d3741 | ||
|
|
fcc397a6f5 | ||
|
|
4cd57f6ca3 | ||
|
|
cf927a9e2c | ||
|
|
32926a385a | ||
|
|
d2577bf88c | ||
|
|
5620c27122 | ||
|
|
d7ddf03fde | ||
|
|
ff60b4a68d | ||
|
|
e623bb9f76 | ||
|
|
b8b1a20578 | ||
|
|
3b7054deed | ||
|
|
6a5f2c1d98 | ||
|
|
0d4ee9bd62 | ||
|
|
1ff72394c1 | ||
|
|
3f8210652c | ||
|
|
45f731f75a | ||
|
|
71bbf3f7a5 | ||
|
|
01a31541c7 | ||
|
|
736ab4b0c4 | ||
|
|
cdde8b405f | ||
|
|
48bed9874a | ||
|
|
0994d6746c | ||
|
|
7eb550521a | ||
|
|
3655d9a96a | ||
|
|
d6a0637288 | ||
|
|
ec24aa6171 | ||
|
|
a279c9d743 | ||
|
|
8805903bf0 | ||
|
|
77c3f5bcb3 | ||
|
|
de7d5bb2d6 | ||
|
|
b5a0ee71c2 | ||
|
|
7adfb57575 | ||
|
|
5d26fa656f | ||
|
|
fe81c9998b | ||
|
|
ae93394351 | ||
|
|
65473735f8 | ||
|
|
03db2f621f | ||
|
|
632bab3968 | ||
|
|
c620a60f78 | ||
|
|
7bde413e17 | ||
|
|
dc47a2706e | ||
|
|
bcd7a108ac | ||
|
|
24f923b7c0 | ||
|
|
e2b1aa8169 | ||
|
|
38b4e2ec0e | ||
|
|
ea43fa272c | ||
|
|
592f026771 | ||
|
|
c1c7d4b76a | ||
|
|
207f8be3f0 | ||
|
|
3f0ee1c537 | ||
|
|
b665c1b566 | ||
|
|
7eda0d0948 | ||
|
|
0c05f6af28 | ||
|
|
f9b88b3fb8 | ||
|
|
2ed113477e | ||
|
|
25ac8dca69 | ||
|
|
eaacb00bb4 | ||
|
|
98a8d5a06a | ||
|
|
2b259d70e0 | ||
|
|
ccfa555758 | ||
|
|
c4d683af71 | ||
|
|
a0b002fb34 | ||
|
|
3bbef09ccf | ||
|
|
1f2a253bd5 | ||
|
|
b7f134d98b | ||
|
|
11abbeebb2 | ||
|
|
5b08a3733e | ||
|
|
f98e0fdff0 | ||
|
|
3b600204b8 | ||
|
|
8267281d21 | ||
|
|
cdf8b88e35 | ||
|
|
14fbd7c2e0 | ||
|
|
e4ab9e4360 | ||
|
|
bc8541448a | ||
|
|
4ec9d1e432 | ||
|
|
00036c08f3 | ||
|
|
bad4bcfe35 | ||
|
|
6a5c30039f | ||
|
|
89aa3dceaa | ||
|
|
6ca3dba45e | ||
|
|
17072a2c36 | ||
|
|
f90097dbbc | ||
|
|
10a995c595 | ||
|
|
f94e9a43f3 | ||
|
|
1caefef64b | ||
|
|
802217b877 | ||
|
|
f6223d69e6 | ||
|
|
78aceedb37 | ||
|
|
53f4ab5b0f | ||
|
|
33b130172d | ||
|
|
0bd24b523b | ||
|
|
e032f77fb9 | ||
|
|
d71d21ec6f | ||
|
|
dfa3f22cc6 | ||
|
|
da92d8fcc8 | ||
|
|
e76c7068a0 | ||
|
|
8aa2205ff3 | ||
|
|
5c82c65ae8 | ||
|
|
f9a577ee8b | ||
|
|
71919c681e | ||
|
|
eee394ef11 | ||
|
|
9ca6cef477 | ||
|
|
b16a1195eb | ||
|
|
2811880280 | ||
|
|
06d7cfe314 | ||
|
|
491bd2a849 | ||
|
|
f6a2196885 | ||
|
|
f9a8e60122 | ||
|
|
483a447093 | ||
|
|
72321822f4 | ||
|
|
1f15497486 | ||
|
|
ec203f864f | ||
|
|
07cbd6dacb | ||
|
|
7e0f9bc899 | ||
|
|
4f6fa314b0 | ||
|
|
0400efce32 | ||
|
|
9092951419 | ||
|
|
92762e4a36 | ||
|
|
4228d13957 | ||
|
|
75b57d7643 | ||
|
|
a914f02a54 | ||
|
|
1e5e7200b0 | ||
|
|
f4ce69dad7 | ||
|
|
c9ee73f793 | ||
|
|
de56cb86c2 | ||
|
|
972bdb614d | ||
|
|
3835b013c3 | ||
|
|
adf61a891c | ||
|
|
1f303216a8 | ||
|
|
9f9255e30e | ||
|
|
16f88ea8e7 | ||
|
|
33e9ac3a88 | ||
|
|
40dcf9d8a0 | ||
|
|
2bbb4ed4b9 | ||
|
|
fd244a1577 | ||
|
|
92c4b95f7e | ||
|
|
e91b33e295 | ||
|
|
5b9ff27ef8 | ||
|
|
a943d3d0b0 | ||
|
|
3947765710 | ||
|
|
1fb6a3ccbb | ||
|
|
d6706a2e60 | ||
|
|
20287c8392 | ||
|
|
9ce99e38b0 | ||
|
|
7e5825c355 | ||
|
|
9de193a100 | ||
|
|
b6b3e0a0db | ||
|
|
229378ae98 | ||
|
|
4e2ba08fc6 | ||
|
|
24a660f022 | ||
|
|
998a8b2efb | ||
|
|
4370bf50c7 | ||
|
|
307c82d5c4 | ||
|
|
c50642f89b | ||
|
|
97beb02321 | ||
|
|
c6b50fc678 | ||
|
|
c0fb272a34 | ||
|
|
75cb14f8f0 | ||
|
|
3a3d0106b6 | ||
|
|
b445fa011e | ||
|
|
5b7c0c4bbb | ||
|
|
1e25eedcf4 | ||
|
|
fc473a7565 | ||
|
|
e19a56f9e1 | ||
|
|
5aeade9285 | ||
|
|
03a2082bc2 | ||
|
|
730a8dbc40 | ||
|
|
524549df30 | ||
|
|
79b845efb7 | ||
|
|
d8296a49bb | ||
|
|
8dc9857968 | ||
|
|
6e6f809173 | ||
|
|
5e3cec5520 | ||
|
|
3bab84bf28 | ||
|
|
ac6f4773fc | ||
|
|
4aeb9fb47a | ||
|
|
3d0dae8fe1 | ||
|
|
e7551d3bf9 | ||
|
|
c9c13e7b55 | ||
|
|
68d9e00fbe | ||
|
|
74707cb636 | ||
|
|
fba61ffccf | ||
|
|
c123d330e7 | ||
|
|
1ac58eb592 | ||
|
|
a3a6f7981a | ||
|
|
99f7b1185c | ||
|
|
aff86cc64c | ||
|
|
f397fae745 | ||
|
|
21fb24c290 | ||
|
|
adc49310ee | ||
|
|
8b18d160db | ||
|
|
933c7faef2 | ||
|
|
d5b5ce14f4 | ||
|
|
1732115bbd | ||
|
|
d869590a5e | ||
|
|
5b64fd4938 | ||
|
|
b7194c4617 | ||
|
|
c050127710 | ||
|
|
91e9a453c9 | ||
|
|
7104a97f34 | ||
|
|
a5ee0c964f | ||
|
|
f7d75e139c | ||
|
|
301d809ebb | ||
|
|
155292c59d | ||
|
|
558be96998 | ||
|
|
c6ad8230be | ||
|
|
274cc4a172 | ||
|
|
e0636d94ff | ||
|
|
75e4622b1e | ||
|
|
53be7ba6a0 | ||
|
|
e86c4f00bf | ||
|
|
02af058977 | ||
|
|
dc793af002 | ||
|
|
94fad9287a | ||
|
|
d3fdf3bfc7 | ||
|
|
c854d18c35 | ||
|
|
aa757660ec | ||
|
|
6b6ddf11a7 | ||
|
|
e93745ede8 | ||
|
|
9ac4ec836b | ||
|
|
e647012c72 | ||
|
|
356e291d1b | ||
|
|
40cf59faad | ||
|
|
1579cafcad | ||
|
|
b3ca1387e1 | ||
|
|
a819bbcf45 | ||
|
|
098e45a0cc | ||
|
|
f3afc1b721 | ||
|
|
fbf2532136 | ||
|
|
f8b00d3a06 | ||
|
|
58c8efef50 | ||
|
|
5300c90f58 | ||
|
|
aeab384123 | ||
|
|
3fec0c1bcf | ||
|
|
0ed9a6c3e9 | ||
|
|
39e73742b4 | ||
|
|
f67f33d8bb | ||
|
|
1cea151b6b | ||
|
|
ee734dd791 | ||
|
|
577406a3f5 | ||
|
|
3596f46e41 | ||
|
|
0dd1066fc4 | ||
|
|
559bc5255a | ||
|
|
7d4d30f874 | ||
|
|
ceff666ed1 | ||
|
|
374dc8fd95 | ||
|
|
01ce7f0d4c | ||
|
|
2c0cc512fa | ||
|
|
a73e4de7be | ||
|
|
70dcf9020c | ||
|
|
5bdff0c4a7 | ||
|
|
63e076eb1f | ||
|
|
c9cd029f2a | ||
|
|
b708d609d0 | ||
|
|
5883288970 | ||
|
|
8c432bf06e | ||
|
|
737b9e4b88 | ||
|
|
78ce549566 | ||
|
|
b83621ff68 | ||
|
|
bcb9eb1b11 | ||
|
|
1cd7f1a301 | ||
|
|
e0342a7ec6 | ||
|
|
3623a3a509 | ||
|
|
67969886ec | ||
|
|
532285bcf5 | ||
|
|
727d782748 | ||
|
|
b995fa2c05 | ||
|
|
37f6c649ba | ||
|
|
d98a11a696 | ||
|
|
0a4ed9a829 | ||
|
|
d511bfdcc7 | ||
|
|
603e672661 | ||
|
|
c9f75d56c2 | ||
|
|
c86307ab92 | ||
|
|
6dce21c4e5 | ||
|
|
55e809cc72 | ||
|
|
b8063f957f | ||
|
|
c8b92c097f | ||
|
|
65602c1a09 | ||
|
|
f102b6067a | ||
|
|
6ca4958538 | ||
|
|
de8bd2ba4f | ||
|
|
bdc9560718 | ||
|
|
22dcdaf5e5 | ||
|
|
002037408a | ||
|
|
19ec8cd768 | ||
|
|
f1b2e50e7c | ||
|
|
e5f64ddfef | ||
|
|
c79ea537b5 | ||
|
|
9c63f2d1a6 | ||
|
|
59a35665b3 | ||
|
|
847025bc6a | ||
|
|
7e5cb3e7ac | ||
|
|
2389ae38aa | ||
|
|
bb70a4ba02 | ||
|
|
ce7745700e | ||
|
|
18f80838f6 | ||
|
|
7e126d7c02 | ||
|
|
d033572249 | ||
|
|
0ff5946bfd | ||
|
|
1c6738c96e | ||
|
|
7da3699622 | ||
|
|
e9de765a1e | ||
|
|
e28160f19e | ||
|
|
c2dba464fa | ||
|
|
b4e9a75a8b | ||
|
|
987f04155a | ||
|
|
bf113cc059 | ||
|
|
1857fa19bb | ||
|
|
1b01285899 | ||
|
|
329cadd860 | ||
|
|
29ef43ce53 | ||
|
|
f558b8f4ff | ||
|
|
8e01f87054 | ||
|
|
adacbd1951 | ||
|
|
3121f853a4 | ||
|
|
02fb6bfd43 | ||
|
|
e7291e938a | ||
|
|
8440cba727 | ||
|
|
989b7a9e71 | ||
|
|
c002f7424f | ||
|
|
34095b6b55 | ||
|
|
7814d873bd | ||
|
|
949255ee32 | ||
|
|
dfaf55beb9 | ||
|
|
d48ba11f8a | ||
|
|
e42100cd9b | ||
|
|
ad24e28a8e | ||
|
|
4753ef058d | ||
|
|
d6f43f7fc6 | ||
|
|
c30e98acab | ||
|
|
01040633ae | ||
|
|
7bce3f3c92 | ||
|
|
584f788a42 | ||
|
|
1f3bf27460 | ||
|
|
c13c791795 | ||
|
|
06afa62cde | ||
|
|
d199064a4b | ||
|
|
27b10e31fa | ||
|
|
5253d46b5b | ||
|
|
f04c54d0f3 | ||
|
|
67eac92a0c | ||
|
|
bdf46a7551 | ||
|
|
347d55eb96 | ||
|
|
0e0cf007e2 | ||
|
|
b1993078c4 | ||
|
|
fd2ab300e9 | ||
|
|
19e24b67be | ||
|
|
b9f61a5750 | ||
|
|
ce5a045dbd | ||
|
|
646bf45257 | ||
|
|
37035ef372 | ||
|
|
daafcb4ce8 | ||
|
|
3027cf0994 | ||
|
|
ea5b064df6 | ||
|
|
18fd7687ce | ||
|
|
af895106ca | ||
|
|
4a39951383 | ||
|
|
b4d1a1e6b2 | ||
|
|
22c0d87c23 | ||
|
|
40c2b11e24 | ||
|
|
be400caee9 | ||
|
|
1702ca1c07 | ||
|
|
9f6ee398d6 | ||
|
|
712d09735f | ||
|
|
4c037e5a51 | ||
|
|
5e89da1eef | ||
|
|
4273b13ac4 | ||
|
|
dc033aecd9 | ||
|
|
94a5d3b9db | ||
|
|
59d1dd0941 | ||
|
|
ddbd7148e4 | ||
|
|
0c045ae782 | ||
|
|
7df6821309 | ||
|
|
ee3edd1bd5 | ||
|
|
19554e0f06 | ||
|
|
d818518649 | ||
|
|
d9372e4944 | ||
|
|
124925af44 | ||
|
|
20a7a99557 | ||
|
|
485bb60924 | ||
|
|
8b7da30623 | ||
|
|
f94dca207a | ||
|
|
4db1f4f9f2 | ||
|
|
f962c6ee6f | ||
|
|
e9a6b14c7b | ||
|
|
7605b1802a | ||
|
|
7625391590 | ||
|
|
c0f4050960 | ||
|
|
0f97f5fd54 | ||
|
|
ff32e4a315 | ||
|
|
f39458d794 | ||
|
|
6b2271c1c1 | ||
|
|
e9381f692d | ||
|
|
06ba3ff7e8 | ||
|
|
125ea00813 | ||
|
|
8612cdf3fc | ||
|
|
5f5ad5056f | ||
|
|
e174b96db8 | ||
|
|
c362bfab0e | ||
|
|
d064a46b48 | ||
|
|
7e0bb7aa51 | ||
|
|
8d80dc2f52 | ||
|
|
945211a03e | ||
|
|
3ec5c9d2e3 | ||
|
|
5d97a5f16e | ||
|
|
ef9c54d884 | ||
|
|
c35fbebb5a | ||
|
|
d23fd1e0a0 | ||
|
|
78076d9bf8 | ||
|
|
7edb4d6f13 | ||
|
|
f0832de23a | ||
|
|
ba44226434 | ||
|
|
e4d55a9189 | ||
|
|
6c73d7f708 | ||
|
|
185a9d5052 | ||
|
|
292108c5ee | ||
|
|
357f54c652 | ||
|
|
a5c9de82be | ||
|
|
24b8c98534 | ||
|
|
43c84303ac | ||
|
|
440404716e | ||
|
|
4c2b07fb31 | ||
|
|
70e48eeb52 | ||
|
|
e39fa719bc | ||
|
|
5c2439210d | ||
|
|
b1fe6ca63e | ||
|
|
6d8ff4c54f | ||
|
|
3e3d229435 | ||
|
|
735ae599dc | ||
|
|
e132721b08 | ||
|
|
f5b48af525 | ||
|
|
34c155adaa | ||
|
|
a404c91e22 | ||
|
|
20f1b5a2ab | ||
|
|
ec16c9c01a | ||
|
|
22d999d519 | ||
|
|
9d51b7ced9 | ||
|
|
c4eea357d9 | ||
|
|
438b87cf17 | ||
|
|
1336ea407f | ||
|
|
f9595842a3 | ||
|
|
a103c438d4 | ||
|
|
da22aff470 | ||
|
|
3c3465db29 | ||
|
|
35c57b5990 | ||
|
|
8a2b406930 | ||
|
|
505232c7c8 | ||
|
|
a9a96f4382 | ||
|
|
03a82594d2 | ||
|
|
b923f46ad6 | ||
|
|
6b675164e5 | ||
|
|
ea1dd2c5cf | ||
|
|
2683160fab | ||
|
|
e493629099 | ||
|
|
4b680d4874 | ||
|
|
4ab50c667e | ||
|
|
1ff4648d05 | ||
|
|
0eed4aa652 | ||
|
|
a6f2e04d34 | ||
|
|
140cba979d | ||
|
|
41797ecbbb | ||
|
|
c071453275 | ||
|
|
0d3e237e27 | ||
|
|
faf8fd35c1 | ||
|
|
d605a30cc7 | ||
|
|
d4687537fd | ||
|
|
3dd748c39c | ||
|
|
f7abfe5a37 | ||
|
|
f0df74079c | ||
|
|
3f16600ec1 | ||
|
|
4061962186 | ||
|
|
223c3eb54f | ||
|
|
c77f11b1b0 | ||
|
|
6f6f1b43f0 | ||
|
|
8f7537dee5 | ||
|
|
4054a20fdc | ||
|
|
fbc966ab1b | ||
|
|
854a28ccc8 | ||
|
|
1d1473de8e | ||
|
|
ca9e6a49ed | ||
|
|
e8b7ffdcac | ||
|
|
9941fe08ed | ||
|
|
9d7497846a | ||
|
|
9af2ead38d | ||
|
|
094013374c | ||
|
|
c17896b800 | ||
|
|
6096325b12 | ||
|
|
71728e7e92 | ||
|
|
3acd0a1fad | ||
|
|
65b61b69ca | ||
|
|
63f764226e | ||
|
|
5de8ee67af | ||
|
|
5f51fd24f3 | ||
|
|
5ac536ca6e | ||
|
|
d7b9a173c1 | ||
|
|
fe422fea5a | ||
|
|
8aef99d4dc | ||
|
|
5fb5b8462f | ||
|
|
49cad96dad | ||
|
|
00eb81a04a | ||
|
|
cf85c0785a | ||
|
|
d558cab174 | ||
|
|
9eb201f72f | ||
|
|
d8a6aaf6a0 | ||
|
|
9c27a942ca | ||
|
|
6e721355cc | ||
|
|
5900e034e9 | ||
|
|
f137ccee65 | ||
|
|
dbbf697250 | ||
|
|
a25eb9ea65 | ||
|
|
96f41a5292 | ||
|
|
9fbc8242ca | ||
|
|
98e17d3990 | ||
|
|
2a88406fe7 | ||
|
|
f3174dba95 | ||
|
|
3731f02b7f | ||
|
|
f70f178c03 | ||
|
|
527c95f016 | ||
|
|
a450f6054c | ||
|
|
f6d638686b | ||
|
|
3b8ad270d8 | ||
|
|
27f5823a7e | ||
|
|
858705e742 | ||
|
|
ad86fb7954 | ||
|
|
ad77f86a8c | ||
|
|
9961f06110 | ||
|
|
70f12687bb | ||
|
|
e054e6cb4c | ||
|
|
f537e6e183 | ||
|
|
20a36a1d87 | ||
|
|
ab9e0b371b | ||
|
|
3e322e5dfb | ||
|
|
62ba0daa6c | ||
|
|
35f3f99ff2 | ||
|
|
9e08d445f3 | ||
|
|
db8a6cb237 | ||
|
|
d9ca7d5c2a | ||
|
|
2d499618df | ||
|
|
44afc8fef1 | ||
|
|
ded449e13e | ||
|
|
f0cb9d9ece | ||
|
|
82bf4ac472 | ||
|
|
4f84652df4 | ||
|
|
d5857b5e08 | ||
|
|
c04fb4f942 | ||
|
|
f3261d3c1b | ||
|
|
ce396439a4 | ||
|
|
f7439f5aaf | ||
|
|
ac6675b8b8 | ||
|
|
12717ff7d5 | ||
|
|
3664cb4445 | ||
|
|
0f4f663181 | ||
|
|
2a0508fc89 | ||
|
|
76520b7330 | ||
|
|
2000b63fa4 | ||
|
|
9c914da118 | ||
|
|
609b93eb01 | ||
|
|
6653d96ddd | ||
|
|
76a8299ad5 | ||
|
|
074a0cc08b | ||
|
|
45f9bf94f0 | ||
|
|
0a5a23ac39 | ||
|
|
cad50490f4 | ||
|
|
4f669bd261 | ||
|
|
86be4222b6 | ||
|
|
f4280b21d6 | ||
|
|
078dafa41e | ||
|
|
87f8ec98d8 | ||
|
|
520bf9a506 | ||
|
|
0a2434505e | ||
|
|
7def6c908f | ||
|
|
94b11619c0 | ||
|
|
4c16f5e7c6 | ||
|
|
6fd52304fb | ||
|
|
bb79ae01c1 | ||
|
|
8c298b270d | ||
|
|
e92950d10f | ||
|
|
5383ed83a6 | ||
|
|
a0b747d9a4 | ||
|
|
fb53cb7cb4 | ||
|
|
c8948d74e4 | ||
|
|
a22f240a65 | ||
|
|
30d6d921c8 | ||
|
|
a808a5ea93 | ||
|
|
00ea4e300e | ||
|
|
21376c35de | ||
|
|
2c18c1e799 | ||
|
|
8d039c9816 | ||
|
|
290e35d7b2 | ||
|
|
45d4471447 | ||
|
|
57e85c6274 | ||
|
|
6182bc8a42 | ||
|
|
8ddd2b62eb | ||
|
|
97aed2f33a | ||
|
|
2428149f99 | ||
|
|
0e412306eb | ||
|
|
43c8a14805 | ||
|
|
b48262b8c1 | ||
|
|
8694e28edb | ||
|
|
3928208ab4 | ||
|
|
5428f8a943 | ||
|
|
40fdb5d594 | ||
|
|
80e9270d80 | ||
|
|
6feaf43d1d | ||
|
|
64751cb70d | ||
|
|
8aa75f66b5 | ||
|
|
2bc43e14fd | ||
|
|
301adcdf4a | ||
|
|
623dbc1acc | ||
|
|
79ad5abdb3 | ||
|
|
39e2f4e709 | ||
|
|
ce94995e72 | ||
|
|
22dd0fcb8c | ||
|
|
921b01ffe1 | ||
|
|
1dba6e9904 | ||
|
|
c59dd6a01e | ||
|
|
4b0d5c54d2 | ||
|
|
1d4b425215 | ||
|
|
4f984dbade | ||
|
|
e556e53389 | ||
|
|
c6c45135c2 | ||
|
|
ff09e59985 | ||
|
|
2086fa380f | ||
|
|
4792444361 | ||
|
|
66b5497f3c | ||
|
|
2ec7e51c73 | ||
|
|
b476163b69 | ||
|
|
110bd6562f | ||
|
|
64498cc8cd | ||
|
|
8d98c752ca | ||
|
|
ce3a0652b3 | ||
|
|
3e6c3ee653 | ||
|
|
744e2f25af | ||
|
|
97b26e76f9 | ||
|
|
1bd93df64b | ||
|
|
d46361b007 | ||
|
|
f4420fb3f1 | ||
|
|
66254d1e60 | ||
|
|
8a99e801dd | ||
|
|
afb9f52b7c | ||
|
|
95bc3b13a7 | ||
|
|
417c24347d | ||
|
|
97fa344ed9 | ||
|
|
0aea831f05 | ||
|
|
95872c9b82 | ||
|
|
2f7821f494 | ||
|
|
f9243c19e4 | ||
|
|
d2e728fe93 | ||
|
|
c65a13afa1 | ||
|
|
1188cfa1bb | ||
|
|
5ff5d6d984 | ||
|
|
073f212f63 | ||
|
|
b276d3ea83 | ||
|
|
383f172aee | ||
|
|
71327a4c27 | ||
|
|
dbbbc1b531 | ||
|
|
d8409c7f1f | ||
|
|
68cb00d20f | ||
|
|
801fa1e84b | ||
|
|
c91fcbecca | ||
|
|
c2e9b691dc | ||
|
|
cb473c82aa | ||
|
|
935bd5275a | ||
|
|
4a45fb36af | ||
|
|
6bf8d839f3 | ||
|
|
a3d4b50888 | ||
|
|
be2ce9d233 | ||
|
|
3a22d5db6d | ||
|
|
1fdfb38901 | ||
|
|
d085b3bad8 | ||
|
|
711d51d9fc | ||
|
|
661fd04454 | ||
|
|
f166cef0aa | ||
|
|
ca5e6abbe0 | ||
|
|
9669392026 | ||
|
|
a15d655b34 | ||
|
|
c36f474eb5 | ||
|
|
7fe62b9b48 | ||
|
|
5772497c05 | ||
|
|
6a5fa113a5 | ||
|
|
2fa1e0f3a6 | ||
|
|
104d63abb3 | ||
|
|
5ac4970fd5 | ||
|
|
3257611038 | ||
|
|
8beee8b589 | ||
|
|
6e4a60bfdd | ||
|
|
ea3b0177cf | ||
|
|
463998d94e | ||
|
|
ac8cbe3edb | ||
|
|
f86321e052 | ||
|
|
701a5b4584 | ||
|
|
159af65cc5 | ||
|
|
d2c6f44a77 | ||
|
|
e605ab21ef | ||
|
|
02fcbd578a | ||
|
|
c734cbaf0c | ||
|
|
466bc4f0dd | ||
|
|
a3d82924a9 | ||
|
|
e808dc34a6 | ||
|
|
acea7fd4a1 | ||
|
|
c421273fca | ||
|
|
1d66cf8412 | ||
|
|
40dfb97e56 | ||
|
|
750b688642 | ||
|
|
5e178f81c8 | ||
|
|
1fcd19be1c | ||
|
|
b04ceadff2 | ||
|
|
178be30d46 | ||
|
|
e656c6a449 | ||
|
|
9498adec54 | ||
|
|
7140444de9 | ||
|
|
370169f666 | ||
|
|
a02a95603d | ||
|
|
70020ec3be | ||
|
|
c0e876a4a8 | ||
|
|
552bfedb75 | ||
|
|
5557352259 | ||
|
|
f5602dc25a | ||
|
|
b08b71f7e4 | ||
|
|
5ab4ffac72 | ||
|
|
ce1fb4aab7 | ||
|
|
61c5a476e7 | ||
|
|
4336d9c40f | ||
|
|
ca8e66588a | ||
|
|
cd8c782c0e | ||
|
|
62d143821a | ||
|
|
0821a3dd33 | ||
|
|
be47b28d96 | ||
|
|
d1e907a30c | ||
|
|
95c8a531a2 | ||
|
|
46d0fd6400 | ||
|
|
44cb53cd6e | ||
|
|
201fa54695 | ||
|
|
a56039de2d | ||
|
|
1e6ff8e032 | ||
|
|
35afe8257c | ||
|
|
bc5c3656cb | ||
|
|
4a58571f1b | ||
|
|
5f30811868 | ||
|
|
a0809e5d56 | ||
|
|
946bbab820 | ||
|
|
1dd1bd085b | ||
|
|
c4f9d704e5 | ||
|
|
ac6eafddf5 | ||
|
|
a50aef743c | ||
|
|
0932a0bb67 | ||
|
|
6fc362e75a | ||
|
|
3979a669f3 | ||
|
|
4b1d2982ff | ||
|
|
63639e2ec5 | ||
|
|
54f904f6fe | ||
|
|
3a4ade6b5b | ||
|
|
8d740b7665 | ||
|
|
e6f882e3f1 | ||
|
|
2d6f48ee53 | ||
|
|
5e33eb349b | ||
|
|
04038d546a | ||
|
|
5c68d18081 | ||
|
|
dc76b1fc95 | ||
|
|
046a04289b | ||
|
|
e0ecde0617 | ||
|
|
5d86ca2aa7 | ||
|
|
d94b2f8c41 | ||
|
|
7c6fe3b1bf | ||
|
|
250f5d42d8 | ||
|
|
b261c99d53 | ||
|
|
985b1bdc11 | ||
|
|
56df5af3e5 | ||
|
|
a63a94a9af | ||
|
|
134fe29df2 | ||
|
|
eb48b847e5 | ||
|
|
8380da7fff | ||
|
|
79b5433bb4 | ||
|
|
a356c8ad22 | ||
|
|
f0ef36333b | ||
|
|
48e17a0001 | ||
|
|
30868019d9 | ||
|
|
1e3817ae55 | ||
|
|
22ba9ff9c7 | ||
|
|
146fedb9cf | ||
|
|
92ea8b5d76 | ||
|
|
5569d6fa18 | ||
|
|
ebe8c27add | ||
|
|
1723fda926 | ||
|
|
8332b52938 | ||
|
|
50ced222cb | ||
|
|
59cf966107 | ||
|
|
76f0f15077 | ||
|
|
98d97d8541 | ||
|
|
cfa6425859 | ||
|
|
807111133c | ||
|
|
19632dfaa6 | ||
|
|
6c50bcf61c | ||
|
|
fdf97477a6 | ||
|
|
ce9ef2b74d | ||
|
|
69230df585 | ||
|
|
14f6229243 | ||
|
|
16f9c159f2 | ||
|
|
c2cc55508b | ||
|
|
b1bb04e2f1 | ||
|
|
7e67afdc3d | ||
|
|
c20f6dd6aa | ||
|
|
c7b54325fd | ||
|
|
5c1bcb6ae3 | ||
|
|
5f84834ffa | ||
|
|
198d321805 | ||
|
|
be0d51046c | ||
|
|
f46294da86 | ||
|
|
0a0c14ab03 | ||
|
|
18e09b4100 | ||
|
|
29bee2f3ef | ||
|
|
520915ef46 | ||
|
|
12294521e0 | ||
|
|
6f38c8fe44 | ||
|
|
79eaf088de | ||
|
|
6f3c349061 | ||
|
|
9987c4fd86 | ||
|
|
fa97cf3a83 | ||
|
|
7a8774bafd | ||
|
|
29bed5adbd | ||
|
|
b6b4422ab4 | ||
|
|
f7a3a213f6 | ||
|
|
0fff4b5721 | ||
|
|
0c074dcc2a | ||
|
|
b6f47a51d6 | ||
|
|
4f1958ac27 | ||
|
|
32838abddd | ||
|
|
0474b13c9d | ||
|
|
380fe86dd8 | ||
|
|
8bfec94690 | ||
|
|
87f68ff7af | ||
|
|
3884bd5470 | ||
|
|
44bfaed10e | ||
|
|
eaf91c414e | ||
|
|
f1ea23c229 | ||
|
|
083face122 | ||
|
|
05bb6c9204 | ||
|
|
3892487cb8 | ||
|
|
b8cf0d688f | ||
|
|
7173f056fa | ||
|
|
7cc8adadec | ||
|
|
c1510365db | ||
|
|
ef899cbd35 | ||
|
|
61bfb5f8a6 | ||
|
|
3dd38f1ca5 | ||
|
|
c09fd5d81d | ||
|
|
e0cad2423f | ||
|
|
817ca5bd99 | ||
|
|
6b7dfecca4 | ||
|
|
c75e97e037 | ||
|
|
900e817512 | ||
|
|
5c8480449b | ||
|
|
d7ef525b1d | ||
|
|
f6fb545dc9 | ||
|
|
4279391dde | ||
|
|
03655e6da9 | ||
|
|
779a88524d | ||
|
|
fe5ddc65b2 | ||
|
|
046f324627 | ||
|
|
28e4b900b8 | ||
|
|
5142ee6c30 | ||
|
|
407357f852 | ||
|
|
1b82be2abf | ||
|
|
6dc4fba5de | ||
|
|
781bcdd267 | ||
|
|
968fccdaec | ||
|
|
7eb290dff4 | ||
|
|
8f3204478a | ||
|
|
7195ea606e | ||
|
|
14e82b33a4 | ||
|
|
63308cf6aa | ||
|
|
1e565b33ac | ||
|
|
6911ed6b88 | ||
|
|
a021ab7a38 | ||
|
|
0e6ea95f4f | ||
|
|
f878fb07da | ||
|
|
67cc4d9fe2 | ||
|
|
418157fe99 | ||
|
|
6b854819a3 | ||
|
|
b030b3ab81 | ||
|
|
c95fac4d7c | ||
|
|
e9046ef4a9 | ||
|
|
c0250bfca3 | ||
|
|
1fc63ab25c | ||
|
|
b9fbec9b1e | ||
|
|
49ca1a835b | ||
|
|
ef18d5129e | ||
|
|
352e71bed9 | ||
|
|
c3291a2b5f | ||
|
|
2d87862e54 | ||
|
|
5c2a695a7a | ||
|
|
922865708b | ||
|
|
bcd0803238 | ||
|
|
fe637537e0 | ||
|
|
9c1b72ad0b | ||
|
|
c77aec86d5 | ||
|
|
d806983671 | ||
|
|
4b122a71cb | ||
|
|
8045997506 | ||
|
|
47d02d469a | ||
|
|
5011586b50 | ||
|
|
9589cfacb8 | ||
|
|
ff60cf8b84 | ||
|
|
5aba6b02ac | ||
|
|
104b90d358 | ||
|
|
139273dc0a | ||
|
|
b5607fec63 | ||
|
|
cf3e5fdad4 | ||
|
|
3902b0b55c | ||
|
|
64641eebb2 | ||
|
|
3efd3be6db | ||
|
|
887aa9faa1 | ||
|
|
6f34b63e40 | ||
|
|
26db7182c6 | ||
|
|
2fc074ebcd | ||
|
|
427abfc518 | ||
|
|
d09c2e5681 | ||
|
|
3e40e40b22 | ||
|
|
5c40240cb2 | ||
|
|
008a5a9f98 | ||
|
|
8006ce3fe9 | ||
|
|
831ba249e3 | ||
|
|
27bb265b52 | ||
|
|
32921a26c6 | ||
|
|
4f663fab48 | ||
|
|
476420ef51 | ||
|
|
f800aa3abe | ||
|
|
e824352114 | ||
|
|
961659d32e | ||
|
|
2639244ae8 | ||
|
|
b321f94acd | ||
|
|
2bc4f7f5ad | ||
|
|
ec6bc4dd9f | ||
|
|
7600ac6d14 | ||
|
|
118c0d5783 | ||
|
|
7c18d303e6 | ||
|
|
7ff49af7a6 | ||
|
|
f3912eaaf9 | ||
|
|
8af485d6bf | ||
|
|
3b733d9822 | ||
|
|
1f658b24a4 | ||
|
|
0bd3f1cfa9 | ||
|
|
29d4a13cbc | ||
|
|
56d8482d10 | ||
|
|
b622773393 | ||
|
|
8715142a0d | ||
|
|
38bdd17d43 | ||
|
|
6fa2a2ec0e | ||
|
|
10e8a5d23f | ||
|
|
a2aa459e5e | ||
|
|
169dd4ab69 | ||
|
|
53ad835ce7 | ||
|
|
2535fd5a79 | ||
|
|
a47ca0bf3e | ||
|
|
abaa22c84e | ||
|
|
5d5e00dbb2 | ||
|
|
c19aff59af | ||
|
|
7d6ae1b4f3 | ||
|
|
ba79244d69 | ||
|
|
32f5433657 | ||
|
|
171f24402b | ||
|
|
1004677023 | ||
|
|
9ebb2999b7 | ||
|
|
2bcd0cbbd3 | ||
|
|
2680c7133d | ||
|
|
c53f010cc1 | ||
|
|
bae84c6e1f | ||
|
|
702ab4958f | ||
|
|
0b3e6b9b53 | ||
|
|
0231fb5a71 | ||
|
|
253f997a4e | ||
|
|
1dd81b2204 | ||
|
|
6a5991abba | ||
|
|
1044447b0a | ||
|
|
d3dce49268 | ||
|
|
f22dfb79ba | ||
|
|
a6f35e1e52 | ||
|
|
f692f47f73 | ||
|
|
e19530c358 | ||
|
|
becf53e270 | ||
|
|
d91a3865e4 | ||
|
|
999747d36d | ||
|
|
b8a3d0a727 | ||
|
|
2d54688825 | ||
|
|
d2db3faa76 | ||
|
|
3aff8636e1 | ||
|
|
4c12640101 | ||
|
|
cc15298334 | ||
|
|
98b335974d | ||
|
|
1fb34177ec | ||
|
|
21ac5f13ec | ||
|
|
c6192de715 | ||
|
|
7b320a1336 | ||
|
|
290dd05367 | ||
|
|
af8569258d | ||
|
|
408862ba77 | ||
|
|
b734cea11a | ||
|
|
b900ebbd75 | ||
|
|
8f28c119c0 | ||
|
|
fa96d31665 | ||
|
|
994b5d31e9 | ||
|
|
46247f86ca | ||
|
|
ec369b424a | ||
|
|
1c57ad0197 | ||
|
|
596f52b4d9 | ||
|
|
93c48edccc | ||
|
|
49f2283894 | ||
|
|
9cdbea5f86 | ||
|
|
95ad374e88 | ||
|
|
d0aebd991c | ||
|
|
364575ee25 | ||
|
|
75cf77eb64 | ||
|
|
db021c78d6 | ||
|
|
7f49596882 | ||
|
|
0ab1a24b8d | ||
|
|
13fb3f4b6c | ||
|
|
be4df5641b | ||
|
|
6d29cf6810 | ||
|
|
f8781eda2e | ||
|
|
770b47221c | ||
|
|
d899dc15be | ||
|
|
6426199699 | ||
|
|
791ffb66f5 | ||
|
|
b2fa948b7c | ||
|
|
59282ddaf6 | ||
|
|
e8e78d99db | ||
|
|
380f6ab53f | ||
|
|
121c293b98 | ||
|
|
9df44200c0 | ||
|
|
0944ea5897 | ||
|
|
f0f1142183 | ||
|
|
4903cb5f00 | ||
|
|
22f5c6aa9e | ||
|
|
5a0b7532f3 | ||
|
|
043283146c | ||
|
|
a8741f55a9 | ||
|
|
faf0d9a93a | ||
|
|
5d8e7bfc6a | ||
|
|
50517cad24 | ||
|
|
717952e163 | ||
|
|
d75e5fdb8f | ||
|
|
2ad83718b7 | ||
|
|
dfbeb25855 | ||
|
|
bcc10f8425 | ||
|
|
bf7c78973c | ||
|
|
64d2e8c8ef | ||
|
|
ca775cc8f3 | ||
|
|
2208018338 | ||
|
|
e5d3880ac4 | ||
|
|
09e0f8b047 | ||
|
|
4158e69096 | ||
|
|
c45bf2eff6 | ||
|
|
41bb016283 | ||
|
|
9be21f963e | ||
|
|
e2b014d8d7 | ||
|
|
6a61202ff4 | ||
|
|
92af97ca38 | ||
|
|
ae43973e77 | ||
|
|
a9a9a486ce | ||
|
|
fb489d416f | ||
|
|
51df390edc | ||
|
|
acfa9cf274 | ||
|
|
c4bd2cdd37 | ||
|
|
5f51559926 | ||
|
|
5c70cefbad | ||
|
|
c48bbd4dd6 | ||
|
|
0b10139f53 | ||
|
|
896f576a64 | ||
|
|
e52655e468 | ||
|
|
e87b2e9445 | ||
|
|
a09a5607c2 | ||
|
|
b7b82b5d4f | ||
|
|
2c5e6d5448 | ||
|
|
1f4f98abc1 | ||
|
|
b2365bd7c9 | ||
|
|
aed7441450 | ||
|
|
4514e58f07 | ||
|
|
3ff2bd5d03 | ||
|
|
00b766829b | ||
|
|
d387351c5f | ||
|
|
a9dbe7bcaf | ||
|
|
3e631e8385 | ||
|
|
ff043657bd | ||
|
|
929093d981 | ||
|
|
19b622bb0a | ||
|
|
524db65880 | ||
|
|
c4f9df0f80 | ||
|
|
13c997af18 | ||
|
|
a9ba86ce03 | ||
|
|
4c0f0748e8 | ||
|
|
fcb300dc51 | ||
|
|
5994d965a6 | ||
|
|
4ce2107152 | ||
|
|
bad3c34056 | ||
|
|
2e880e0089 | ||
|
|
6594f6614f | ||
|
|
5f8c74986c | ||
|
|
7382c4690b | ||
|
|
33b0698269 | ||
|
|
222072d0f2 | ||
|
|
225a1181c9 | ||
|
|
5bbc1eb01c | ||
|
|
68f56a91e7 | ||
|
|
6b6ff7ff5b | ||
|
|
30f92d1ce6 | ||
|
|
cc0dfec714 | ||
|
|
a717147619 | ||
|
|
7623a4c5cc | ||
|
|
d5f2122535 | ||
|
|
eea97aa450 | ||
|
|
7255316533 | ||
|
|
3c98fd9269 | ||
|
|
e7e82c1516 | ||
|
|
92629b423e | ||
|
|
bfcf32fde0 | ||
|
|
b4ef188d9b | ||
|
|
56d3e5736e | ||
|
|
4930b6aff5 | ||
|
|
48f80526d6 | ||
|
|
e5c642781a | ||
|
|
5ec45016d7 | ||
|
|
706c25292d | ||
|
|
63d6dadc9c | ||
|
|
a8812c65eb | ||
|
|
69ad62c985 | ||
|
|
d039a0eff0 | ||
|
|
fd172013f7 | ||
|
|
c06e446e8c | ||
|
|
7027f0b4ba | ||
|
|
e162b4ba29 | ||
|
|
011f9411cd | ||
|
|
e641182722 | ||
|
|
950b513448 | ||
|
|
60fe7424a8 | ||
|
|
1e7815dd72 | ||
|
|
1b369b6de8 | ||
|
|
8ef75ad01c | ||
|
|
c8da645d93 | ||
|
|
9e1afc2619 | ||
|
|
72904610c7 | ||
|
|
0281b3f960 | ||
|
|
70ffd3f0c2 | ||
|
|
c85db6cb64 | ||
|
|
0604e55391 | ||
|
|
77b9f571f6 | ||
|
|
d5f9985edb | ||
|
|
a7b44c7331 | ||
|
|
eff3dd58fe | ||
|
|
4c208b788c | ||
|
|
ec6eefbd32 | ||
|
|
c9e4b0bb2d | ||
|
|
8176a1a607 | ||
|
|
7d0be081d0 | ||
|
|
e4bd4842e6 | ||
|
|
1c96b05095 | ||
|
|
d07e4c3052 | ||
|
|
35fe8506c0 | ||
|
|
ea92199f34 | ||
|
|
4a075f9cc4 | ||
|
|
f37e26bee5 | ||
|
|
efbe127375 | ||
|
|
99d9c30dc3 | ||
|
|
69a2c9e376 | ||
|
|
7b38df12a1 | ||
|
|
ee4fe0475d | ||
|
|
6ce435ec23 | ||
|
|
6328b62e22 | ||
|
|
3d3fea5626 | ||
|
|
301b0b29f6 | ||
|
|
49b6457c6e | ||
|
|
2ac44bc4de | ||
|
|
f76febf95b | ||
|
|
b3beae902d | ||
|
|
68e7912e18 | ||
|
|
fbdcb70601 | ||
|
|
e294277b7e | ||
|
|
c9c77f499b | ||
|
|
845b55aee5 | ||
|
|
c8118cb17e | ||
|
|
3cac4e7522 | ||
|
|
076db3dcc7 | ||
|
|
9a25293cce | ||
|
|
06c48a7281 | ||
|
|
ecfce903c4 | ||
|
|
b49b64f05b | ||
|
|
9d724f1e05 | ||
|
|
a3fe14998f | ||
|
|
3155a06129 | ||
|
|
f279caa864 | ||
|
|
261f853a1d | ||
|
|
1a124f5415 | ||
|
|
7a30ac0613 | ||
|
|
b92a250dc6 | ||
|
|
7f87eca1ac | ||
|
|
8ce9803370 | ||
|
|
43690bfee7 | ||
|
|
c044162233 | ||
|
|
9542c9f433 | ||
|
|
a3101cd032 | ||
|
|
be2c47c854 | ||
|
|
3e7008e334 | ||
|
|
d475297526 | ||
|
|
3c5417b252 | ||
|
|
f661c5f826 | ||
|
|
da162968ac | ||
|
|
d9d2ca27bc | ||
|
|
2586e9d789 | ||
|
|
2981d7bc43 | ||
|
|
b14815ec66 | ||
|
|
3e43ebc34a | ||
|
|
9865a5f5a0 | ||
|
|
37e390f5ae | ||
|
|
ae07fd5aeb | ||
|
|
d44a63734c | ||
|
|
bd847cb2a0 | ||
|
|
6053795334 | ||
|
|
6a3a3edd5e | ||
|
|
345fa67059 | ||
|
|
0fd6593f86 | ||
|
|
2ae9c9680f | ||
|
|
df620a6670 | ||
|
|
9b5c885b40 | ||
|
|
de35151091 | ||
|
|
2b347b1a47 | ||
|
|
cf8dfdae8f | ||
|
|
31d31cd817 | ||
|
|
4e97f005e6 | ||
|
|
3d17695d93 | ||
|
|
3d272380ab | ||
|
|
a210d77cf4 | ||
|
|
f3f3e04ad2 | ||
|
|
cd24ba4660 | ||
|
|
767f6c4429 | ||
|
|
96f4a46448 | ||
|
|
12024252f9 | ||
|
|
2b855d64b6 | ||
|
|
f59fa81626 | ||
|
|
eebf585fc3 | ||
|
|
dc71c2092d | ||
|
|
bcbfe78228 | ||
|
|
bddfc57c8a | ||
|
|
61932aa6b1 | ||
|
|
f032b58597 | ||
|
|
55f629828d | ||
|
|
f1b96cadd5 | ||
|
|
5618dbdb4f | ||
|
|
3549972fdf | ||
|
|
5c569a6788 | ||
|
|
715e3023a0 | ||
|
|
c71ca222d3 | ||
|
|
d38a5e5bb7 | ||
|
|
d0026161f0 | ||
|
|
a2420bccfb | ||
|
|
a5e6a9e8c8 | ||
|
|
e36d87461c | ||
|
|
088301bfb9 | ||
|
|
3c875c4ac9 | ||
|
|
ab02fc6402 | ||
|
|
4ecd94aff9 | ||
|
|
6fecefa24b | ||
|
|
8b2dab26d2 | ||
|
|
de86b65723 | ||
|
|
04170905b3 | ||
|
|
101cd2c825 | ||
|
|
9efc8a652e | ||
|
|
d4c12fde31 | ||
|
|
f7877a7b22 | ||
|
|
6787816d8e | ||
|
|
bc8df3676c | ||
|
|
eb82671c37 | ||
|
|
18916e97a4 | ||
|
|
a75676a7e9 | ||
|
|
77ac642bf5 | ||
|
|
6e7de77d86 | ||
|
|
b3ab0a8d58 | ||
|
|
daadc5b223 | ||
|
|
0e78d5c099 | ||
|
|
bd9f4dccb4 | ||
|
|
80a677c51c | ||
|
|
cc7b52cdcc | ||
|
|
6e84504731 | ||
|
|
46a9f90baa | ||
|
|
f5f4706596 | ||
|
|
8cbd548f8e | ||
|
|
77b2acb257 | ||
|
|
1aa0efb727 | ||
|
|
a0f4474c54 | ||
|
|
bfee5d6752 | ||
|
|
f0fdc683c1 | ||
|
|
3adb8be659 | ||
|
|
c3c3443c00 | ||
|
|
6882a78485 | ||
|
|
da418eb8d9 | ||
|
|
36b879e624 | ||
|
|
21953fde00 | ||
|
|
b5b35011ef | ||
|
|
c50417fb36 | ||
|
|
03eaf41470 | ||
|
|
35fffade6a | ||
|
|
b15a5d4b98 | ||
|
|
6b4e9948dc | ||
|
|
f487f4f76d | ||
|
|
d62ad052d0 | ||
|
|
84365cfba1 | ||
|
|
73ca7943b6 | ||
|
|
6ed77931c1 | ||
|
|
59ceb2d3be | ||
|
|
754bc0d5b6 | ||
|
|
0116c0e95c | ||
|
|
825ed22017 | ||
|
|
33f534fbe9 | ||
|
|
4a40162eba | ||
|
|
b8c3d91c6a | ||
|
|
5bbfcd8fe4 | ||
|
|
73ef480e97 | ||
|
|
aa19fe0d6f | ||
|
|
25e381f6f9 | ||
|
|
b817dda06a | ||
|
|
7a10545fee | ||
|
|
4621d2bfa0 | ||
|
|
96d79c8180 | ||
|
|
564d195403 | ||
|
|
68ba05ecd8 | ||
|
|
f144cfb0ba | ||
|
|
517d32307e | ||
|
|
d52230e85e | ||
|
|
de4fbdf57e | ||
|
|
31f3b79004 | ||
|
|
77e9dcdca4 | ||
|
|
dba0c1f2a0 | ||
|
|
87f6b8e19d | ||
|
|
46354e4c4b | ||
|
|
9ff02988e6 | ||
|
|
a88225bcf0 | ||
|
|
3b2c5f3f32 | ||
|
|
5b4125c325 | ||
|
|
4d34d4843c | ||
|
|
f53c1650ed | ||
|
|
340b687f6a | ||
|
|
c72ade006f | ||
|
|
db5dfea6bc | ||
|
|
ac89ee029e | ||
|
|
cd6cee8241 | ||
|
|
4dd22f337d | ||
|
|
fd80161c08 | ||
|
|
0adb5b8c74 | ||
|
|
f57c0d0747 | ||
|
|
9a20b7c584 | ||
|
|
376e97713a | ||
|
|
4f8cfd44b3 | ||
|
|
d96d3b863b | ||
|
|
b05c374f39 | ||
|
|
daf48dd5e2 | ||
|
|
79ec6c6841 | ||
|
|
58f6b54d96 | ||
|
|
3b0a3b3b41 | ||
|
|
69912f9b93 | ||
|
|
09b372338c | ||
|
|
ba7a261af3 | ||
|
|
33bc2d01f4 | ||
|
|
ca246f0350 | ||
|
|
9205fd98a6 | ||
|
|
4e1031f084 | ||
|
|
27c7315d4b | ||
|
|
67c0d408a0 | ||
|
|
df77c1f729 | ||
|
|
cdd1cdd0be | ||
|
|
5e78e912f2 | ||
|
|
f4d3d312db | ||
|
|
59d79a9a2b | ||
|
|
0224ec8e0e | ||
|
|
ab254ceffc | ||
|
|
3b003d8637 | ||
|
|
57054a860f | ||
|
|
d71afeadce | ||
|
|
017c502809 | ||
|
|
b82f866e12 | ||
|
|
8cc4c3d35c | ||
|
|
52e39d313e | ||
|
|
3058339ea9 | ||
|
|
5d907f60f3 | ||
|
|
d0f7359bc0 | ||
|
|
83bf09fbef | ||
|
|
e1a09ac16d | ||
|
|
a7917b195e | ||
|
|
36cd3492ec | ||
|
|
331b09c796 | ||
|
|
e83992b95d | ||
|
|
bb831fbc82 | ||
|
|
7248dae5be | ||
|
|
7dc4974d98 | ||
|
|
5e08803177 | ||
|
|
f1f3088632 | ||
|
|
712fb631b5 | ||
|
|
0eadaef95c | ||
|
|
e26e40806d | ||
|
|
f26f3636d9 | ||
|
|
08e7666e5c | ||
|
|
966c0823e1 | ||
|
|
fb992723d6 | ||
|
|
9776a83923 | ||
|
|
a970570d64 | ||
|
|
11fbe57652 | ||
|
|
dfbd13e448 | ||
|
|
c78c7308a8 | ||
|
|
4dfa2b4d44 | ||
|
|
077be8bd68 | ||
|
|
af1a2ba847 | ||
|
|
5b86272f55 | ||
|
|
df6136ea12 | ||
|
|
39edd5b230 | ||
|
|
318fd9e252 | ||
|
|
2d6057d65f | ||
|
|
7abb948157 | ||
|
|
b7fa7737f4 | ||
|
|
f635a90223 | ||
|
|
4517bc53a7 | ||
|
|
7724ecff21 | ||
|
|
b46ee7feeb | ||
|
|
4eab336f3e | ||
|
|
aef19eb790 | ||
|
|
e53257dd45 | ||
|
|
e13d89495f | ||
|
|
c9bbfd2834 | ||
|
|
221024b1e3 | ||
|
|
a96726f43f | ||
|
|
31dddee326 | ||
|
|
b48fd28aa5 | ||
|
|
c133c2eb2b | ||
|
|
841b1ed9e5 | ||
|
|
741a1e5438 | ||
|
|
7829739f77 | ||
|
|
20e9e10736 | ||
|
|
6d6e1bab7f | ||
|
|
737e0f1650 | ||
|
|
c4a322c1b1 | ||
|
|
27e19e5f54 | ||
|
|
894e8f9669 | ||
|
|
2ca146d5c5 | ||
|
|
0b6b8d8c41 | ||
|
|
eaf0fb53f0 | ||
|
|
300fe6ab69 | ||
|
|
8a31f7f50e | ||
|
|
8a50a4ffc0 | ||
|
|
196f355660 | ||
|
|
50eafc20f6 | ||
|
|
3248b9469e | ||
|
|
776e684da2 | ||
|
|
f8f33bc833 | ||
|
|
867476531d | ||
|
|
b9333be154 | ||
|
|
f9905fad97 | ||
|
|
0b41054ac2 | ||
|
|
a4e18e4226 | ||
|
|
abf4bd70a3 | ||
|
|
17faf6a3b7 | ||
|
|
745893d211 | ||
|
|
346cb83091 | ||
|
|
e76aa16381 | ||
|
|
a6e0092cd1 | ||
|
|
a7179b0bef | ||
|
|
6047f09f96 | ||
|
|
a4cbae45cd | ||
|
|
07e48c2191 | ||
|
|
0d4fd0f14c | ||
|
|
5767393c5b | ||
|
|
44c71ed7cc | ||
|
|
01cf2aeea8 | ||
|
|
dbfa9a3980 | ||
|
|
13035407db | ||
|
|
f397abf752 | ||
|
|
1bf301f43c | ||
|
|
05b73a85a5 | ||
|
|
4504c54874 | ||
|
|
67fedfef19 | ||
|
|
b0adbfc134 | ||
|
|
5b81784f66 | ||
|
|
529591c5d3 | ||
|
|
14358c5207 | ||
|
|
a3add25ef5 | ||
|
|
e1052ec3f6 | ||
|
|
e7a464ac1a | ||
|
|
ac3194b4b8 | ||
|
|
36f649087d | ||
|
|
ba5e90065a | ||
|
|
c1a1f8663d | ||
|
|
bef864d90c | ||
|
|
3d6089a05e | ||
|
|
5331d01b45 | ||
|
|
cbe01cea43 | ||
|
|
459fd28b57 | ||
|
|
584d8ebb96 | ||
|
|
bd6c7342a1 | ||
|
|
7e50cccbb2 | ||
|
|
a95094a599 | ||
|
|
531e80f318 | ||
|
|
34b3c1af4a | ||
|
|
8d8b5d204c | ||
|
|
b456ef4b26 | ||
|
|
e3a06b11c8 | ||
|
|
ba8bde4807 | ||
|
|
f999b64a46 | ||
|
|
19616c8a6f | ||
|
|
8d523f9831 | ||
|
|
dc9df814a7 | ||
|
|
ca09509a14 | ||
|
|
da30aaede9 | ||
|
|
05ec778389 | ||
|
|
76d2d0b8d1 | ||
|
|
617a941c42 | ||
|
|
f900c52a58 | ||
|
|
50e0c8d70c | ||
|
|
4dad8338f9 | ||
|
|
7c99aae3b8 | ||
|
|
a398c4f33b | ||
|
|
543663b2f0 | ||
|
|
c7a3e42fe6 | ||
|
|
cb18dcc629 | ||
|
|
8511003383 | ||
|
|
deeac70d58 | ||
|
|
88216552d9 | ||
|
|
18f953b747 | ||
|
|
6d75d678b6 | ||
|
|
ffdbb8f20e | ||
|
|
552ac11e4e | ||
|
|
7fb0572779 | ||
|
|
53c3e4010d | ||
|
|
1ea9e2f88b | ||
|
|
876a2de2af | ||
|
|
3b85bdbffd | ||
|
|
e61cf2c079 | ||
|
|
0abdd95fe1 | ||
|
|
0ba3ca8747 | ||
|
|
b83bf844f2 | ||
|
|
4be02a4e82 | ||
|
|
ef359fa044 | ||
|
|
ad61b15585 | ||
|
|
ff503e756e | ||
|
|
293cc3aa55 | ||
|
|
2380ce142c | ||
|
|
dc598757e7 | ||
|
|
00a2db0fcd | ||
|
|
5b539ef0bd | ||
|
|
500e5616c6 | ||
|
|
6ce3e358f5 | ||
|
|
4e34ca8bdf | ||
|
|
62030f63a6 | ||
|
|
51f62859ef | ||
|
|
8323d0fff3 | ||
|
|
710ef24847 | ||
|
|
9fecd471a8 | ||
|
|
8636651671 | ||
|
|
132d967431 | ||
|
|
a30bf9ceac | ||
|
|
23b305079f | ||
|
|
dcb32585cc | ||
|
|
49445c0a59 | ||
|
|
0b49ac28c5 | ||
|
|
1296453b6c | ||
|
|
66cbc99a1e | ||
|
|
3f5e823039 | ||
|
|
7ba10ddbfb | ||
|
|
14f3eddc6b | ||
|
|
d40eeccae0 | ||
|
|
ab14589e93 | ||
|
|
7bd4d2543f | ||
|
|
73295879a4 | ||
|
|
9878b4c42a | ||
|
|
6dcc1c017d | ||
|
|
50effc62a9 | ||
|
|
73265012bb | ||
|
|
c4177ec697 | ||
|
|
83339b4d97 | ||
|
|
331acc5fef | ||
|
|
7ac7ab93e8 | ||
|
|
82734bfad1 | ||
|
|
a818bfffee |
942 changed files with 453039 additions and 58152 deletions
106
.azure-pipelines/publish-nightly.yml
Normal file
106
.azure-pipelines/publish-nightly.yml
Normal file
|
|
@ -0,0 +1,106 @@
|
|||
###############################################################################################
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
###############################################################################################
|
||||
name: $(Date:yyyyMMdd)$(Rev:.r)
|
||||
|
||||
trigger: none
|
||||
pr: none
|
||||
|
||||
schedules:
|
||||
- cron: '0 7 * * *'
|
||||
displayName: Daily release
|
||||
branches:
|
||||
include:
|
||||
- main
|
||||
always: true
|
||||
|
||||
resources:
|
||||
repositories:
|
||||
- repository: templates
|
||||
type: github
|
||||
name: microsoft/vscode-engineering
|
||||
ref: main
|
||||
endpoint: Monaco
|
||||
|
||||
parameters:
|
||||
- name: publishMonacoEditorCore
|
||||
displayName: 🚀 Publish Monaco Editor Core
|
||||
type: boolean
|
||||
default: true
|
||||
- name: publishMonacoEditor
|
||||
displayName: 🚀 Publish Monaco Editor
|
||||
type: boolean
|
||||
default: true
|
||||
- name: vscodeRef
|
||||
displayName: The VS Code commit id.
|
||||
type: string
|
||||
default: 'main'
|
||||
- name: prereleaseVersion
|
||||
displayName: The prerelease version.
|
||||
type: string
|
||||
default: 'dev-${today}'
|
||||
|
||||
extends:
|
||||
template: azure-pipelines/npm-package/pipeline.yml@templates
|
||||
parameters:
|
||||
cgIgnoreDirectories: $(Build.SourcesDirectory)/dependencies/vscode
|
||||
npmPackages:
|
||||
- name: monaco-editor-core
|
||||
workingDirectory: $(Build.SourcesDirectory)/dependencies/vscode/out-monaco-editor-core
|
||||
testPlatforms: []
|
||||
skipAPIScan: true # package build requires Linux
|
||||
buildSteps:
|
||||
- task: NodeTool@0
|
||||
inputs:
|
||||
versionSource: fromFile
|
||||
versionFilePath: .nvmrc
|
||||
|
||||
- script: sudo apt install -y libkrb5-dev
|
||||
displayName: Install libkrb5-dev
|
||||
|
||||
- script: npm ci
|
||||
displayName: Install NPM dependencies
|
||||
|
||||
- script: npx playwright install --with-deps
|
||||
displayName: Install Playwright Dependencies
|
||||
|
||||
- script: yarn ts-node ./scripts/ci/build-monaco-editor-core-pkg nightly
|
||||
env:
|
||||
VSCODE_REF: ${{ parameters.vscodeRef }}
|
||||
PRERELEASE_VERSION: ${{ parameters.prereleaseVersion }}
|
||||
retryCountOnTaskFailure: 5
|
||||
displayName: Setup, Build & Test monaco-editor-core
|
||||
|
||||
tag: next
|
||||
ghCreateTag: false
|
||||
publishPackage: ${{ parameters.publishMonacoEditorCore }}
|
||||
publishRequiresApproval: false
|
||||
|
||||
- name: monaco-editor
|
||||
dependsOn: monaco-editor-core
|
||||
workingDirectory: $(Build.SourcesDirectory)/out/monaco-editor
|
||||
testPlatforms: []
|
||||
skipAPIScan: true # package build requires Linux
|
||||
buildSteps:
|
||||
- task: NodeTool@0
|
||||
inputs:
|
||||
versionSource: fromFile
|
||||
versionFilePath: .nvmrc
|
||||
|
||||
- script: npm ci
|
||||
displayName: Install NPM dependencies
|
||||
|
||||
- script: npx playwright install --with-deps
|
||||
displayName: Install Playwright Dependencies
|
||||
|
||||
- script: yarn ts-node ./scripts/ci/build-monaco-editor-pkg nightly
|
||||
env:
|
||||
VSCODE_REF: ${{ parameters.vscodeRef }}
|
||||
PRERELEASE_VERSION: ${{ parameters.prereleaseVersion }}
|
||||
retryCountOnTaskFailure: 5
|
||||
displayName: Setup, Build & Test monaco-editor
|
||||
|
||||
tag: next
|
||||
publishPackage: ${{ parameters.publishMonacoEditor }}
|
||||
publishRequiresApproval: false
|
||||
105
.azure-pipelines/publish-stable.yml
Normal file
105
.azure-pipelines/publish-stable.yml
Normal file
|
|
@ -0,0 +1,105 @@
|
|||
###############################################################################################
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
###############################################################################################
|
||||
name: $(Date:yyyyMMdd)$(Rev:.r)
|
||||
|
||||
trigger: none
|
||||
pr: none
|
||||
|
||||
resources:
|
||||
repositories:
|
||||
- repository: templates
|
||||
type: github
|
||||
name: microsoft/vscode-engineering
|
||||
ref: main
|
||||
endpoint: Monaco
|
||||
|
||||
parameters:
|
||||
- name: publishMonacoEditorCore
|
||||
displayName: 🚀 Publish Monaco Editor Core
|
||||
type: boolean
|
||||
default: false
|
||||
- name: publishMonacoEditor
|
||||
displayName: 🚀 Publish Monaco Editor
|
||||
type: boolean
|
||||
default: false
|
||||
- name: publishWebpackPlugin
|
||||
displayName: 🚀 Publish Webpack Plugin
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
extends:
|
||||
template: azure-pipelines/npm-package/pipeline.yml@templates
|
||||
parameters:
|
||||
cgIgnoreDirectories: $(Build.SourcesDirectory)/dependencies/vscode
|
||||
npmPackages:
|
||||
- name: monaco-editor-core
|
||||
workingDirectory: $(Build.SourcesDirectory)/dependencies/vscode/out-monaco-editor-core
|
||||
testPlatforms: []
|
||||
skipAPIScan: true # package build requires Linux
|
||||
buildSteps:
|
||||
- task: NodeTool@0
|
||||
inputs:
|
||||
versionSource: fromFile
|
||||
versionFilePath: .nvmrc
|
||||
|
||||
- script: sudo apt install -y libkrb5-dev
|
||||
displayName: Install libkrb5-dev
|
||||
|
||||
- script: npm ci
|
||||
displayName: Install NPM dependencies
|
||||
|
||||
- script: npx playwright install --with-deps
|
||||
displayName: Install Playwright Dependencies
|
||||
|
||||
- script: yarn ts-node ./scripts/ci/build-monaco-editor-core-pkg stable
|
||||
displayName: Setup, Build & Test monaco-editor-core
|
||||
|
||||
tag: latest
|
||||
ghCreateTag: false
|
||||
publishPackage: ${{ parameters.publishMonacoEditorCore }}
|
||||
publishRequiresApproval: false
|
||||
|
||||
- name: monaco-editor
|
||||
dependsOn: monaco-editor-core
|
||||
workingDirectory: $(Build.SourcesDirectory)/out/monaco-editor
|
||||
testPlatforms: []
|
||||
skipAPIScan: true # package build requires Linux
|
||||
buildSteps:
|
||||
- task: NodeTool@0
|
||||
inputs:
|
||||
versionSource: fromFile
|
||||
versionFilePath: .nvmrc
|
||||
|
||||
- script: npm ci
|
||||
displayName: Install NPM dependencies
|
||||
|
||||
- script: npx playwright install --with-deps
|
||||
displayName: Install Playwright Dependencies
|
||||
|
||||
- script: yarn ts-node ./scripts/ci/build-monaco-editor-pkg stable
|
||||
displayName: Setup, Build & Test monaco-editor
|
||||
|
||||
tag: latest
|
||||
publishPackage: ${{ parameters.publishMonacoEditor }}
|
||||
publishRequiresApproval: false
|
||||
|
||||
- name: monaco-editor-webpack-plugin
|
||||
dependsOn: monaco-editor
|
||||
workingDirectory: $(Build.SourcesDirectory)/webpack-plugin
|
||||
testPlatforms: []
|
||||
packagePlatform: Windows
|
||||
buildSteps:
|
||||
- script: npm ci
|
||||
displayName: Install NPM dependencies
|
||||
workingDirectory: $(Build.SourcesDirectory)/webpack-plugin
|
||||
|
||||
- script: npm run compile
|
||||
displayName: Build plugin
|
||||
workingDirectory: $(Build.SourcesDirectory)/webpack-plugin
|
||||
|
||||
tag: latest
|
||||
ghCreateTag: false
|
||||
publishPackage: ${{ parameters.publishWebpackPlugin }}
|
||||
publishRequiresApproval: false
|
||||
8
.devcontainer/devcontainer.json
Normal file
8
.devcontainer/devcontainer.json
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"image": "mcr.microsoft.com/devcontainers/typescript-node",
|
||||
"customizations": {
|
||||
"vscode": {
|
||||
"extensions": ["ms-vscode.js-debug-nightly"]
|
||||
}
|
||||
}
|
||||
}
|
||||
1
.gitattributes
vendored
Normal file
1
.gitattributes
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
* text=auto
|
||||
57
.github/ISSUE_TEMPLATE/1_bug_report.yaml
vendored
Normal file
57
.github/ISSUE_TEMPLATE/1_bug_report.yaml
vendored
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
name: Bug Report
|
||||
description: File a bug report
|
||||
title: '[Bug] '
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
To help us processing your bug report, please fill out this form.
|
||||
- type: checkboxes
|
||||
id: reproducible-in-vscode
|
||||
attributes:
|
||||
label: Reproducible in vscode.dev or in VS Code Desktop?
|
||||
description: Can you reproduce the bug in [vscode.dev](https://vscode.dev) or in VS Code Desktop? If so, please create [an issue in the VS Code repository](https://github.com/microsoft/vscode/issues). **VS Code issues are usually looked at within a couple of days.**
|
||||
options:
|
||||
- label: Not reproducible in [vscode.dev](https://vscode.dev) or VS Code Desktop
|
||||
required: true
|
||||
- type: checkboxes
|
||||
id: reproducible-in-monaco-playground
|
||||
attributes:
|
||||
label: Reproducible in the monaco editor playground?
|
||||
description: Can you reproduce the bug in [the monaco editor playground](https://microsoft.github.io/monaco-editor/playground.html)? A minimal reproducible example will make it significantly easier for us to get this bug fixed.
|
||||
options:
|
||||
- label: Not reproducible in [the monaco editor playground](https://microsoft.github.io/monaco-editor/playground.html)
|
||||
- type: textarea
|
||||
id: playgroundLink
|
||||
attributes:
|
||||
label: Monaco Editor Playground Link
|
||||
description: Please share the link to the [monaco editor playground](https://microsoft.github.io/monaco-editor/playground.html) after you entered your example. In case of regressions, please also provide the first broken version.
|
||||
|
||||
- type: textarea
|
||||
id: playgroundSourceCode
|
||||
attributes:
|
||||
label: Monaco Editor Playground Code
|
||||
description: Please provide the code from the monaco editor playground example.
|
||||
render: typescript
|
||||
- type: textarea
|
||||
id: steps
|
||||
attributes:
|
||||
label: Reproduction Steps
|
||||
description: Please describe the steps (in the playground) that lead to the problematic behavior
|
||||
- type: textarea
|
||||
id: actual-behavior
|
||||
attributes:
|
||||
label: Actual (Problematic) Behavior
|
||||
description: Please describe the actual (problematic) behavior, as observed in the playground.
|
||||
|
||||
- type: textarea
|
||||
id: expected-behavior
|
||||
attributes:
|
||||
label: Expected Behavior
|
||||
description: Please describe the expected behavior.
|
||||
|
||||
- type: textarea
|
||||
id: additional-context
|
||||
attributes:
|
||||
label: Additional Context
|
||||
description: Please provide additional context.
|
||||
38
.github/ISSUE_TEMPLATE/2_feature_request.yaml
vendored
Normal file
38
.github/ISSUE_TEMPLATE/2_feature_request.yaml
vendored
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
name: Feature Request
|
||||
description: Suggest an idea for this project
|
||||
title: '[Feature Request] '
|
||||
labels:
|
||||
- 'feature-request'
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
To help us efficiently reviewing your feature request, please fill out this form.
|
||||
- type: checkboxes
|
||||
id: not
|
||||
attributes:
|
||||
label: Context
|
||||
options:
|
||||
- label: This issue is not a bug report. *(please use a different template for reporting a bug)*
|
||||
required: true
|
||||
- label: This issue is not a duplicate of an existing issue. *(please use the [search](https://github.com/microsoft/monaco-editor/issues) to find existing issues)*
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: description
|
||||
attributes:
|
||||
label: Description
|
||||
description: Please describe your feature request.
|
||||
|
||||
- type: textarea
|
||||
id: relevantCodePlaygroundLink
|
||||
attributes:
|
||||
label: Monaco Editor Playground Link
|
||||
description: If applicable, please share the link to a relevant [monaco editor playground sample](https://microsoft.github.io/monaco-editor/playground.html)
|
||||
|
||||
- type: textarea
|
||||
id: releveantCode
|
||||
attributes:
|
||||
label: Monaco Editor Playground Code
|
||||
description: If applicable, please share the code from the monaco editor playground sample.
|
||||
render: typescript
|
||||
4
.github/ISSUE_TEMPLATE/3_other.md
vendored
Normal file
4
.github/ISSUE_TEMPLATE/3_other.md
vendored
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
name: Other Request (For Maintainers Only)
|
||||
about: This issue template should only be used by maintainers.
|
||||
---
|
||||
5
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
5
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: Question
|
||||
url: https://stackoverflow.com/questions/tagged/monaco-editor
|
||||
about: Please ask and answer questions here.
|
||||
150
.github/commands.json
vendored
Normal file
150
.github/commands.json
vendored
Normal file
|
|
@ -0,0 +1,150 @@
|
|||
[
|
||||
{
|
||||
"type": "comment",
|
||||
"name": "question",
|
||||
"allowUsers": [],
|
||||
"action": "updateLabels",
|
||||
"addLabel": "*question"
|
||||
},
|
||||
{
|
||||
"type": "label",
|
||||
"name": "*question",
|
||||
"action": "close",
|
||||
"reason": "not_planned",
|
||||
"comment": "We closed this issue because it is a question about using Monaco Editor rather than an issue or feature request. Please search for help on [StackOverflow](https://stackoverflow.com/questions/tagged/monaco-editor), where the community has already answered many similar questions. See also our [issue reporting guidelines](https://github.com/microsoft/monaco-editor#contributing).\n\nHappy Coding!"
|
||||
},
|
||||
{
|
||||
"type": "label",
|
||||
"name": "*out-of-scope",
|
||||
"action": "close",
|
||||
"reason": "not_planned",
|
||||
"comment": "We closed this issue because we don't plan to address it in the foreseeable future. If you disagree and feel that this issue is crucial: we are happy to listen and to reconsider.\n\nThanks for your understanding, and happy coding!"
|
||||
},
|
||||
{
|
||||
"type": "label",
|
||||
"name": "wont-fix",
|
||||
"action": "close",
|
||||
"reason": "not_planned",
|
||||
"comment": "We closed this issue because we don't plan to address it.\n\nThanks for your understanding, and happy coding!"
|
||||
},
|
||||
{
|
||||
"type": "comment",
|
||||
"name": "duplicate",
|
||||
"allowUsers": [],
|
||||
"action": "updateLabels",
|
||||
"addLabel": "*duplicate"
|
||||
},
|
||||
{
|
||||
"type": "label",
|
||||
"name": "*duplicate",
|
||||
"action": "close",
|
||||
"reason": "not_planned",
|
||||
"comment": "Thanks for creating this issue! We figured it's covering the same as another one we already have. Thus, we closed this one as a duplicate. You can search for [existing issues](https://github.com/microsoft/monaco-editor/issues).\n\nHappy Coding!"
|
||||
},
|
||||
{
|
||||
"type": "comment",
|
||||
"name": "verified",
|
||||
"allowUsers": [
|
||||
"@author"
|
||||
],
|
||||
"action": "updateLabels",
|
||||
"addLabel": "verified",
|
||||
"removeLabel": "author-verification-requested",
|
||||
"requireLabel": "author-verification-requested",
|
||||
"disallowLabel": "unreleased"
|
||||
},
|
||||
{
|
||||
"type": "comment",
|
||||
"name": "confirm",
|
||||
"allowUsers": [],
|
||||
"action": "updateLabels",
|
||||
"addLabel": "confirmed",
|
||||
"removeLabel": "confirmation-pending"
|
||||
},
|
||||
{
|
||||
"type": "comment",
|
||||
"name": "confirmationPending",
|
||||
"allowUsers": [],
|
||||
"action": "updateLabels",
|
||||
"addLabel": "confirmation-pending",
|
||||
"removeLabel": "confirmed"
|
||||
},
|
||||
{
|
||||
"type": "comment",
|
||||
"name": "needsMoreInfo",
|
||||
"allowUsers": [],
|
||||
"action": "updateLabels",
|
||||
"addLabel": "~info-needed"
|
||||
},
|
||||
{
|
||||
"type": "comment",
|
||||
"name": "closedWith",
|
||||
"allowUsers": [],
|
||||
"action": "close",
|
||||
"reason": "completed",
|
||||
"addLabel": "unreleased"
|
||||
},
|
||||
{
|
||||
"type": "comment",
|
||||
"name": "spam",
|
||||
"allowUsers": [],
|
||||
"action": "close",
|
||||
"reason": "not_planned",
|
||||
"addLabel": "invalid"
|
||||
},
|
||||
{
|
||||
"__comment__": "Allows folks on the team to label issues by commenting: `\\label My-Label` ",
|
||||
"type": "comment",
|
||||
"name": "label",
|
||||
"allowUsers": []
|
||||
},
|
||||
{
|
||||
"type": "label",
|
||||
"name": "~verification-steps-needed",
|
||||
"action": "updateLabels",
|
||||
"addLabel": "verification-steps-needed",
|
||||
"removeLabel": "~verification-steps-needed",
|
||||
"comment": "Friendly ping! Looks like this issue requires some further steps to be verified. Please provide us with the steps necessary to verify this issue."
|
||||
},
|
||||
{
|
||||
"type": "label",
|
||||
"name": "~info-needed",
|
||||
"action": "updateLabels",
|
||||
"addLabel": "info-needed",
|
||||
"removeLabel": "~info-needed",
|
||||
"comment": "Thanks for creating this issue! We figured it's missing some basic information or doesn't follow our issue reporting guidelines. Please take the time to review these and update the issue.\n\nHappy Coding!"
|
||||
},
|
||||
{
|
||||
"type": "label",
|
||||
"name": "~version-info-needed",
|
||||
"action": "updateLabels",
|
||||
"addLabel": "info-needed",
|
||||
"removeLabel": "~version-info-needed",
|
||||
"comment": "Thanks for creating this issue! We figured it's missing some basic information, such as a version number. Please take the time to update the issue with the Monaco Editor version you're using.\n\nHappy Coding!"
|
||||
},
|
||||
{
|
||||
"type": "label",
|
||||
"name": "~confirmation-needed",
|
||||
"action": "updateLabels",
|
||||
"addLabel": "info-needed",
|
||||
"removeLabel": "~confirmation-needed",
|
||||
"comment": "Please try to reproduce this issue with the latest version of Monaco Editor. If the issue persists, please update the issue with confirmation.\n\nHappy Coding!"
|
||||
},
|
||||
{
|
||||
"type": "comment",
|
||||
"name": "gifPlease",
|
||||
"allowUsers": [],
|
||||
"action": "comment",
|
||||
"addLabel": "info-needed",
|
||||
"comment": "Thanks for reporting this issue! Unfortunately, it's hard for us to understand what issue you're seeing. Please help us out by providing a screen recording showing exactly what isn't working as expected. While we can work with most standard formats, `.gif` files are preferred as they are displayed inline on GitHub. You may find https://gifcap.dev helpful as a browser-based gif recording tool.\n\nHappy coding!"
|
||||
},
|
||||
{
|
||||
"type": "comment",
|
||||
"name": "upstream",
|
||||
"allowUsers": [],
|
||||
"action": "close",
|
||||
"reason": "not_planned",
|
||||
"addLabel": "upstream",
|
||||
"comment": "This issue is caused by an upstream dependency (VS Code editor core). The fix needs to happen in the [VS Code repository](https://github.com/microsoft/vscode). Please check if there's already an issue filed there, or create one if not.\n\nHappy Coding!"
|
||||
}
|
||||
]
|
||||
7
.github/publish-failure-issue-template.md
vendored
Normal file
7
.github/publish-failure-issue-template.md
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
title: NPM Publishing Failed
|
||||
assignees: []
|
||||
labels: bug
|
||||
---
|
||||
|
||||
NPM publishing failed. Check the last GitHub Action log.
|
||||
100
.github/workflows/ci.yml
vendored
Normal file
100
.github/workflows/ci.yml
vendored
Normal file
|
|
@ -0,0 +1,100 @@
|
|||
name: CI
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: CI
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version-file: .nvmrc
|
||||
|
||||
- name: Cache node modules
|
||||
id: cacheNodeModules
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: '**/node_modules'
|
||||
key: ${{ runner.os }}-cacheNodeModules2-${{ hashFiles('**/package-lock.json', '**/package.json') }}
|
||||
restore-keys: ${{ runner.os }}-cacheNodeModules2-
|
||||
|
||||
- name: Install build tools
|
||||
if: steps.cache-node-modules.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
sudo apt update -y
|
||||
sudo apt install -y build-essential pkg-config libx11-dev libx11-xcb-dev libxkbfile-dev libnotify-bin libkrb5-dev
|
||||
|
||||
- name: execute `npm ci` (1)
|
||||
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
|
||||
env:
|
||||
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
|
||||
ELECTRON_SKIP_BINARY_DOWNLOAD: 1
|
||||
run: |
|
||||
npm ci
|
||||
|
||||
- name: Download Playwright
|
||||
run: npx playwright install --with-deps
|
||||
|
||||
- name: execute `npm ci` (2)
|
||||
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
|
||||
run: npm ci --prefix webpack-plugin
|
||||
|
||||
# CI steps temporarily disabled (enable by end of august 2025)
|
||||
# # <building-from-source>
|
||||
# - name: Setup, Build & Test monaco-editor-core
|
||||
# run: yarn ts-node ./scripts/ci/build-monaco-editor-core-pkg nightly
|
||||
# env:
|
||||
# VSCODE_REF: 'main'
|
||||
# PRERELEASE_VERSION: 'dev-${today}'
|
||||
|
||||
# - name: Link monaco-editor-core
|
||||
# run: npm link
|
||||
# working-directory: ./dependencies/vscode/out-monaco-editor-core
|
||||
|
||||
# - name: Link monaco-editor-core
|
||||
# run: npm link monaco-editor-core
|
||||
# # </building-from-source>
|
||||
|
||||
# TODO: prettier formatting
|
||||
# - name: Check prettier
|
||||
# run: npm run prettier-check
|
||||
|
||||
- name: Build
|
||||
run: npm run build
|
||||
|
||||
- name: Run unit tests
|
||||
run: npm test
|
||||
|
||||
- name: Compile webpack plugin
|
||||
run: npm run compile --prefix webpack-plugin
|
||||
|
||||
- name: Package using webpack plugin
|
||||
run: npm run package-for-smoketest
|
||||
|
||||
# - name: Package using parcel
|
||||
# run: npm run package-for-smoketest-parcel --prefix test/smoke/parcel
|
||||
# Disabled for now, as the parcel bundler cannot deal with VS Code process variable
|
||||
|
||||
- name: Run smoke test
|
||||
run: npm run smoketest
|
||||
|
||||
- name: Install website node modules
|
||||
working-directory: website
|
||||
run: npm ci
|
||||
|
||||
- name: Install most recent version of monaco-editor
|
||||
working-directory: website
|
||||
run: npm install monaco-editor
|
||||
|
||||
- name: Build website
|
||||
working-directory: website
|
||||
run: npm run build
|
||||
|
||||
- name: Test website
|
||||
working-directory: website
|
||||
run: npm run test
|
||||
72
.github/workflows/website.yml
vendored
Normal file
72
.github/workflows/website.yml
vendored
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
name: Publish Website
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: 0 23 * * *
|
||||
workflow_dispatch: {}
|
||||
|
||||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
|
||||
permissions:
|
||||
contents: read
|
||||
pages: write
|
||||
id-token: write
|
||||
|
||||
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
|
||||
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
|
||||
concurrency:
|
||||
group: 'pages'
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
environment:
|
||||
name: github-pages
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version-file: .nvmrc
|
||||
- name: Cache node modules
|
||||
id: cacheNodeModules
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: '**/node_modules'
|
||||
key: ${{ runner.os }}-cacheNodeModules2-${{ hashFiles('**/package-lock.json') }}
|
||||
restore-keys: ${{ runner.os }}-cacheNodeModules2-
|
||||
- name: execute `npm ci` (1)
|
||||
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
|
||||
run: npm ci
|
||||
|
||||
# For TypeDoc
|
||||
- name: Build
|
||||
run: npm run build
|
||||
|
||||
- name: Install website node modules
|
||||
working-directory: website
|
||||
run: npm ci
|
||||
|
||||
- name: Install most recent version of monaco-editor
|
||||
working-directory: website
|
||||
run: npm install monaco-editor
|
||||
|
||||
- name: Build website
|
||||
working-directory: website
|
||||
run: npm run build
|
||||
|
||||
- name: Test website
|
||||
working-directory: website
|
||||
run: npm run test
|
||||
|
||||
- name: Setup Pages
|
||||
uses: actions/configure-pages@v5
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-pages-artifact@v3
|
||||
with:
|
||||
# Upload entire repository
|
||||
path: './website/dist'
|
||||
- name: Deploy to GitHub Pages
|
||||
id: deployment
|
||||
uses: actions/deploy-pages@v4
|
||||
10
.gitignore
vendored
10
.gitignore
vendored
|
|
@ -1,2 +1,8 @@
|
|||
/node_modules/
|
||||
/release/
|
||||
**/node_modules/
|
||||
**/dependencies/
|
||||
/test/manual/generated/**
|
||||
/test/smoke/vite/dist/**
|
||||
/test/smoke/parcel/dist/**
|
||||
/test/smoke/parcel/.cache/**
|
||||
**/dist/
|
||||
**/out/
|
||||
|
|
|
|||
2
.husky/pre-commit
Executable file
2
.husky/pre-commit
Executable file
|
|
@ -0,0 +1,2 @@
|
|||
#!/bin/sh
|
||||
. "$(dirname "$0")/_/husky.sh"
|
||||
4
.mocharc.json
Normal file
4
.mocharc.json
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"delay": true,
|
||||
"ui": "tdd"
|
||||
}
|
||||
1
.nvmrc
Normal file
1
.nvmrc
Normal file
|
|
@ -0,0 +1 @@
|
|||
22.21.1
|
||||
17
.prettierignore
Normal file
17
.prettierignore
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
**/node_modules/
|
||||
**/dist/
|
||||
**/out/
|
||||
/samples/browser-esm-parcel/.parcel-cache/
|
||||
/samples/browser-esm-parcel/dist/
|
||||
/samples/browser-esm-vite-react/dist/**/*.js
|
||||
/samples/browser-esm-webpack/dist/*.js
|
||||
/samples/browser-esm-webpack-monaco-plugin/dist/*.js
|
||||
/samples/browser-esm-webpack-small/dist/*.js
|
||||
/samples/browser-esm-webpack-typescript/dist/*.js
|
||||
/samples/browser-esm-webpack-typescript-react/dist/*.js
|
||||
/src/language/typescript/lib/
|
||||
/test/manual/generated/
|
||||
/website/lib/
|
||||
/website/typedoc/monaco.d.ts
|
||||
/test/smoke/vite/dist
|
||||
/test/smoke/parcel/dist
|
||||
8
.prettierrc
Normal file
8
.prettierrc
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"arrowParens": "always",
|
||||
"singleQuote": true,
|
||||
"trailingComma": "none",
|
||||
"semi": true,
|
||||
"useTabs": true,
|
||||
"printWidth": 100
|
||||
}
|
||||
68
.vscode/launch.json
vendored
Normal file
68
.vscode/launch.json
vendored
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
{
|
||||
// Use IntelliSense to learn about possible attributes.
|
||||
// Hover to view descriptions of existing attributes.
|
||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Monaco Editor Playground (Languages from source, needs 'npm run watch', no JSON/CSS/... workers!)",
|
||||
"type": "chrome",
|
||||
"request": "launch",
|
||||
"url": "https://microsoft.github.io/monaco-editor/playground.html?sourceLanguages=http%3A%2F%2Flocalhost%3A5002%2Fout%2Flanguages%2Famd-tsc",
|
||||
"preLaunchTask": "Launch Http Server",
|
||||
"presentation": {
|
||||
"group": "monaco",
|
||||
"order": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Monaco Editor Playground (Languages locally bundled, needs 'npm run build')",
|
||||
"type": "chrome",
|
||||
"request": "launch",
|
||||
"url": "https://microsoft.github.io/monaco-editor/playground.html?sourceLanguages=http%3A%2F%2Flocalhost%3A5002%2Fout%2Flanguages%2Fbundled%2Famd-dev%2Fvs",
|
||||
"preLaunchTask": "Launch Http Server",
|
||||
"presentation": {
|
||||
"group": "monaco",
|
||||
"order": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Website",
|
||||
"type": "chrome",
|
||||
"request": "launch",
|
||||
"url": "http://localhost:8080/"
|
||||
},
|
||||
{
|
||||
// Clone VS Code and make sure the task "Launch Http Server" runs.
|
||||
// Then the editor is build from sources.
|
||||
// We recommend to use the workspace feature for this.
|
||||
"name": "Monaco Editor Playground (Load From VS Code Http Server)",
|
||||
"type": "chrome",
|
||||
"request": "launch",
|
||||
"url": "https://microsoft.github.io/monaco-editor/playground.html?sourceLanguages=http%3A%2F%2Flocalhost%3A5002%2Fout%2Flanguages%2Famd-tsc&source=http%3A%2F%2Flocalhost%3A5001%2Fout%2Fvs",
|
||||
"preLaunchTask": "Launch Http Server",
|
||||
"presentation": {
|
||||
"group": "monaco",
|
||||
"order": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "node",
|
||||
"request": "launch",
|
||||
"name": "Monaco Languages Unit Tests",
|
||||
"skipFiles": ["<node_internals>/**"],
|
||||
"program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",
|
||||
"args": ["-r", "test/unit/all.js"],
|
||||
"outFiles": ["${workspaceFolder}/**/*.js"]
|
||||
},
|
||||
{
|
||||
"type": "node",
|
||||
"request": "launch",
|
||||
"name": "webpack plugin test",
|
||||
"skipFiles": ["<node_internals>/**"],
|
||||
"program": "${workspaceFolder}/webpack-plugin/node_modules/.bin/webpack",
|
||||
"args": ["--config", "test/webpack.config.js"],
|
||||
"cwd": "${workspaceFolder}/webpack-plugin/"
|
||||
}
|
||||
]
|
||||
}
|
||||
16
.vscode/settings.json
vendored
16
.vscode/settings.json
vendored
|
|
@ -1,9 +1,17 @@
|
|||
// Place your settings in this file to overwrite default and user settings.
|
||||
{
|
||||
"editor.tabSize": 4,
|
||||
"editor.insertSpaces": false,
|
||||
"files.insertFinalNewline": true,
|
||||
"files.trimTrailingWhitespace": true,
|
||||
"search.exclude": {
|
||||
"**/node_modules": true,
|
||||
"**/bower_components": true,
|
||||
"**/release": true
|
||||
}
|
||||
}
|
||||
"**/dist": true,
|
||||
"**/out": true
|
||||
},
|
||||
"typescript.tsdk": "./node_modules/typescript/lib",
|
||||
"git.branchProtection": ["main", "release/*"],
|
||||
"git.branchProtectionPrompt": "alwaysCommitToNewBranch",
|
||||
"git.branchRandomName.enable": true,
|
||||
"editor.formatOnSave": true
|
||||
}
|
||||
|
|
|
|||
30
.vscode/tasks.json
vendored
Normal file
30
.vscode/tasks.json
vendored
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"label": "Launch Http Server",
|
||||
"type": "shell",
|
||||
"command": "node_modules/.bin/http-server --cors --port 5002 -a 127.0.0.1 -c-1",
|
||||
"isBackground": true,
|
||||
"problemMatcher": {
|
||||
"pattern": {
|
||||
"regexp": "does not support problems"
|
||||
},
|
||||
"background": {
|
||||
"activeOnStart": true,
|
||||
"beginsPattern": "Shutting down http-server (will never match)",
|
||||
"endsPattern": "Starting up http-server"
|
||||
}
|
||||
},
|
||||
"dependsOn": ["npm: watch"]
|
||||
},
|
||||
{
|
||||
"type": "npm",
|
||||
"script": "watch",
|
||||
"group": "build",
|
||||
"problemMatcher": ["$tsc-watch"],
|
||||
"isBackground": true,
|
||||
"label": "npm: watch"
|
||||
}
|
||||
]
|
||||
}
|
||||
1691
CHANGELOG.md
Normal file
1691
CHANGELOG.md
Normal file
File diff suppressed because it is too large
Load diff
125
CONTRIBUTING.md
Normal file
125
CONTRIBUTING.md
Normal file
|
|
@ -0,0 +1,125 @@
|
|||
# Contributing / Dev Setup
|
||||
|
||||
## Source Code Structure
|
||||
|
||||
It is important to understand that the Monaco Editor _Core_ is built directly from the [VS Code source code](https://github.com/microsoft/vscode).
|
||||
The Monaco Editor then enhances the Monaco Editor Core with some basic language features.
|
||||
|
||||
This diagram describes the relationships between the repositories and the npm packages:
|
||||
|
||||

|
||||
|
||||
By default, `monaco-editor-core` is installed from npm (through the initial `npm install`), so you can work on Monaco Editor language features without having to build the core editor / VS Code.
|
||||
The nightly builds build a fresh version of `monaco-editor-core` from the `main` branch of VS Code.
|
||||
For a stable release, the commit specified in `vscodeRef` in [package.json](./package.json) specifies the commit of VS Code that is used to build `monaco-editor-core`.
|
||||
|
||||
## Contributing a new tokenizer / a new language
|
||||
|
||||
Please understand that we only bundle languages with the monaco editor that have a significant relevance (for example, those that have an article in Wikipedia).
|
||||
|
||||
- create `$/src/basic-languages/{myLang}/{myLang}.contribution.ts`
|
||||
- create `$/src/basic-languages/{myLang}/{myLang}.ts`
|
||||
- create `$/src/basic-languages/{myLang}/{myLang}.test.ts`
|
||||
- edit `$/src/basic-languages/monaco.contribution.ts` and register your new language
|
||||
- create `$/website/index/samples/sample.{myLang}.txt`
|
||||
|
||||
```js
|
||||
import './{myLang}/{myLang}.contribution';
|
||||
```
|
||||
|
||||
## Debugging / Developing The Core Editor
|
||||
|
||||
To debug core editor issues.
|
||||
|
||||
This can be done directly from the VS Code repository and does not involve the monaco editor repository.
|
||||
|
||||
- Clone the [VS Code repository](https://github.com/microsoft/vscode): `git clone https://github.com/microsoft/vscode`
|
||||
- Open the repository in VS Code: `code vscode`
|
||||
- Run `yarn install`
|
||||
- Select and run the launch configuration "Monaco Editor Playground" (this might take a while, as it compiles the sources):
|
||||
|
||||

|
||||
|
||||
- Now you can set breakpoints and change the source code
|
||||
|
||||

|
||||
|
||||
- Optionally, you can build `monaco-editor-core` and link it to the monaco editor repository:
|
||||
|
||||
```bash
|
||||
# builds out-monaco-editor-core
|
||||
> yarn gulp editor-distro
|
||||
|
||||
> cd out-monaco-editor-core
|
||||
> npm link
|
||||
> cd ../path/to/monaco-editor
|
||||
|
||||
# symlinks the monaco-editor-core package to the out-monaco-editor-core folder we just built
|
||||
> npm link monaco-editor-core
|
||||
```
|
||||
|
||||
## Debugging / Developing Language Support
|
||||
|
||||
To debug bundled languages, such as JSON, HTML or TypeScript/JavaScript.
|
||||
|
||||
- Clone the [monaco editor repository](https://github.com/microsoft/monaco-editor): `git clone https://github.com/microsoft/monaco-editor`
|
||||
- Open the repository in VS Code: `code monaco-editor`
|
||||
- Run `npm install`
|
||||
- Select and run the launch configuration "Monaco Editor Playground" (this might take a while, as it compiles the sources):
|
||||
|
||||

|
||||
|
||||
- Now you can set breakpoints and change the source code
|
||||
|
||||

|
||||
|
||||
- Optionally, you can build `monaco-editor` and link it if you want to test your changes in a real application:
|
||||
|
||||
```bash
|
||||
# builds out/monaco-editor
|
||||
> npm run build-monaco-editor
|
||||
|
||||
> cd out/monaco-editor
|
||||
> npm link
|
||||
|
||||
> cd ../path/to/my-app
|
||||
> npm link monaco-editor
|
||||
```
|
||||
|
||||
## Running the editor tests
|
||||
|
||||
```bash
|
||||
> npm run build-monaco-editor
|
||||
> npm run test
|
||||
> npm run compile --prefix webpack-plugin
|
||||
|
||||
> npm run package-for-smoketest-webpack
|
||||
> npm run package-for-smoketest-esbuild
|
||||
> npm run package-for-smoketest-vite
|
||||
> npm run package-for-smoketest-parcel --prefix test/smoke/parcel
|
||||
> npm run smoketest-debug
|
||||
```
|
||||
|
||||
## Running the website locally
|
||||
|
||||
```bash
|
||||
> npm install
|
||||
> npm run build-monaco-editor
|
||||
|
||||
> cd website
|
||||
> yarn install
|
||||
> yarn typedoc
|
||||
> yarn dev
|
||||
```
|
||||
|
||||
Now webpack logs the path to the website.
|
||||
|
||||
## Out Folders
|
||||
|
||||
This diagram describes the output folders of the build process:
|
||||
|
||||

|
||||
|
||||
## Maintaining
|
||||
|
||||
Checkout [MAINTAINING.md](./MAINTAINING.md) for common maintaining tasks (for maintainers only).
|
||||
|
|
@ -1,21 +1,21 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2016 Microsoft Corporation
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2016 - present Microsoft Corporation
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
55
MAINTAINING.md
Normal file
55
MAINTAINING.md
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
# Maintaining
|
||||
|
||||
(For maintainers only)
|
||||
|
||||
Make sure every unassigned issue is labeled properly:
|
||||
|
||||
- [Inbox Queue](https://github.com/microsoft/monaco-editor/issues?q=is%3Aissue+is%3Aopen+no%3Aassignee+-label%3Afeature-request+-label%3Aupstream+-label%3A%22info-needed%22++-label%3Abug+)
|
||||
|
||||
## Publishing a stable build monaco-editor build
|
||||
|
||||
- Trigger an rc-build
|
||||
- Go to https://github.com/microsoft/vscode/tree/release/1.89 (use latest VS Code version instead of .89!) and copy the id of the latest commit
|
||||
- Go to https://dev.azure.com/monacotools/Monaco/_build?definitionId=421 and click on "Run pipeline"
|
||||
- Use the copied commit id for `The VS Code commit id.`
|
||||
- Use `rc` for `The prerelease version.`
|
||||
- Wait until pipeline completes
|
||||
- [Compare Last Stable With Nightly](https://microsoft.github.io/monaco-editor/playground.html?source=v0.40.0-dev.20230704#XQAAAAIGBwAAAAAAAABBqQkHQ5NjdMjwa-jY7SIQ9S7DNlzs5W-mwj0fe1ZCDRFc9ws9XQE0SJE1jc2VKxhaLFIw9vEWSxW3yscxAWG5G70rT-mLieOxDi0igaBcv2nRy9q6wT9hrC3N47TPeSd0URO3iwn_firHxVGLm2_8QMEuG2aOJ-jnXkHfLAawVi9XJdfEkOLYHqAT78XFdClh7HNBHFpSfLkCNQ3vE811FAdf6WYL_UK2n1jfGRMcnWqaztoAOTcWNn5qQ9RusryNfDBRqtjOJktItFKSNuOcLg104A0xatH8uXcfAULeE9RZRf41YqC9wbcZDEp7Mnul26YzW_IBv-vL-EGPcEFiu34YZPHQguQiuU8L4VXh7uAtKRWehN9N2m2XFF3yHCBpSGiN8qmBi4HSBRjbhkEKka_icj87t3Lfmg15PMqKgTr7l73XusvkQCZDvqumlN-mcVTZiIdD51m-OFugmn0Cq_ZPU2zq45rRtk1he8PcWiZpPSbCknJsHs4D-mKcc-ypq6CLYlqO8Cvc5lRWzwD-pG6e6uPAQsRAOJ45-mySqhRo_MGJ7aLfkhe7fVn9OvOm6BRsDAYmNVZqpA5aKJzwjeUwQqHwV8CW-b4hrZooiPavu8m2XgbiSW_5nmzbjQ-SaPnBsJxcAewWB_NiYiU3H_Gfhi8K0qQZlBxaetqYX5Ns1Ww6S_By4izRxeEln7McyDQxKk-tnywSCklMhZPiMaR0AZsXs5DQSxGTlB5q61e7Wtxb0RLdk5einYvNwXDooi5Vi5go_ZsO7JYmzylxi-T_hdsPgKNoy6j9IVh5BZb_HgRoaGCrojOWJdYpNNrPJJG_1fyZ8Bk80eYNmHHPJ7Q-pdXqQuAZBdd9Grv4UfXoY1R3Sl529QkIjEHTzgzYGn4C5KE5IGhEfu49Ugy0fFHU-yJGY__aPECJ)
|
||||
- Check the metadata and verify that the last stable is on the left and the the last rc build is on the right
|
||||
- Update [package.json](./package.json)
|
||||
- set `version` to _lastNightly.nextStableVersion_ (from the compare step)
|
||||
- set `vscodeRef` to _lastNightly.vscodeCommitId_
|
||||
- update `devDependencies.monaco-editor-core` to _lastNightly.currentVersion_
|
||||
- Run `npm install` to update lockfile
|
||||
- Update [CHANGELOG.md](./CHANGELOG.md)
|
||||
- API Changes / Breaking Changes / New and noteworthy (use the diff from the compare step)
|
||||
- Add thank you mentions ([use this tool](https://tools.code.visualstudio.com/acknowledgement) and select only the monaco-editor)
|
||||
- Commit & Create PR
|
||||
- [Trigger build](https://dev.azure.com/monacotools/Monaco/_build?definitionId=416) once merged. Tick the following checkboxes:
|
||||
- Publish Monaco Editor Core
|
||||
- Publish Monaco Editor
|
||||
|
||||
#### Publish new webpack plugin
|
||||
|
||||
- **TBD**
|
||||
- https://github.com/microsoft/monaco-editor/tree/main/webpack-plugin
|
||||
- `npm install .`
|
||||
- `npm run import-editor`
|
||||
- if there are no changes generated after the script:
|
||||
- update the peer dependency in `package.json` and use the `||` format e.g. `"monaco-editor": "0.27.x || 0.28.x"`
|
||||
- update the version matrix in the README.md and add the new editor version to the plugin's current major version
|
||||
- use `npm version minor`
|
||||
- publish using `npm publish`
|
||||
- if there are any changes generated after the script:
|
||||
- update the peer dependency in `package.json` e.g. `"monaco-editor": "0.29.x"`
|
||||
- update the version matrix in the README.md and add a new row with the new major version
|
||||
- use `npm version major`
|
||||
- publish using `npm publish`
|
||||
- remember to push tags upstream
|
||||
|
||||
## Updating TypeScript
|
||||
|
||||
- change typescript's version in `package.json`.
|
||||
- execute `npm install .`
|
||||
- execute `npm run import-typescript`
|
||||
- adopt new APIs
|
||||
248
README.md
248
README.md
|
|
@ -1,125 +1,123 @@
|
|||
# Monaco Editor
|
||||
|
||||
The Monaco Editor is the code editor that powers [VS Code](https://github.com/Microsoft/vscode), a good page describing the code editor's features is [here](https://code.visualstudio.com/docs/editor/editingevolved).
|
||||
|
||||

|
||||
|
||||
## Issues
|
||||
|
||||
Please mention the version of the editor when creating issues and the browser you're having trouble in.
|
||||
|
||||
This repository contains only the scripts to glue things together, please create issues against the actual repositories where the source code lives:
|
||||
* monaco-editor-core: [Issues](https://github.com/Microsoft/vscode) -- [npm module](https://www.npmjs.com/package/monaco-editor-core) (Issues with the editor itself)
|
||||
* monaco-typescript: [Issues](https://github.com/Microsoft/monaco-typescript) -- [npm module](https://www.npmjs.com/package/monaco-typescript) (Issues with JavaScript or TypeScript language support)
|
||||
* monaco-languages: [Issues](https://github.com/Microsoft/monaco-languages) -- [npm module](https://www.npmjs.com/package/monaco-languages) (Issues with bat, coffee script, cpp, csharp, fsharp, go, ini, jade, lua, objective-c, powershell, python, r, ruby, sql, swift, vb or xml)
|
||||
|
||||
## Known issues
|
||||
In IE, the editor must be completely surrounded in the body element, otherwise the hit testing we do for mouse operations does not work. You can inspect this using F12 and clicking on the body element and confirm that visually it surrounds the editor.
|
||||
|
||||
## Installing
|
||||
|
||||
```
|
||||
npm install monaco-editor
|
||||
```
|
||||
|
||||
You will get:
|
||||
* inside `dev`: bundled, not minified
|
||||
* inside `min`: bundled, and minified
|
||||
* inside `min-maps`: source maps for `min`
|
||||
* `monaco.d.ts`: this specifies the API of the editor (this is what is actually versioned, everything else is considered private and might break with any release).
|
||||
|
||||
It is recommended to develop against the `dev` version, and in production to use the `min` version.
|
||||
|
||||
## Integrate
|
||||
|
||||
Here is the most basic HTML page that embeds the editor. More samples are available at [monaco-editor-samples](https://github.com/Microsoft/monaco-editor-samples).
|
||||
|
||||
```html
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" >
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="container" style="width:800px;height:600px;border:1px solid grey"></div>
|
||||
|
||||
<script src="monaco-editor/min/vs/loader.js"></script>
|
||||
<script>
|
||||
require.config({ paths: { 'vs': 'monaco-editor/min/vs' }});
|
||||
require(['vs/editor/editor.main'], function() {
|
||||
var editor = monaco.editor.create(document.getElementById('container'), {
|
||||
value: [
|
||||
'function x() {',
|
||||
'\tconsole.log("Hello world!");',
|
||||
'}'
|
||||
].join('\n'),
|
||||
language: 'javascript'
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
```
|
||||
|
||||
## Integrate cross domain
|
||||
|
||||
If you are hosting your `.js` on a different domain (e.g. on a CDN) than the HTML, you should know that the Monaco Editor creates web workers for smart language features. Cross-domain web workers are not allowed, but here is how you can proxy their loading and get them to work:
|
||||
|
||||
```html
|
||||
<!--
|
||||
Assuming the HTML lives on www.mydomain.com and that the editor is hosted on www.mycdn.com
|
||||
-->
|
||||
<script type="text/javascript" src="http://www.mycdn.com/monaco-editor/vs/loader.js"></script>
|
||||
<script>
|
||||
require.config({ paths: { 'vs': 'http://www.mycdn.com/monaco-editor/min/vs' }});
|
||||
|
||||
// Before loading vs/editor/editor.main, define a global MonacoEnvironment that overwrites
|
||||
// the default worker url location (used when creating WebWorkers). The problem here is that
|
||||
// HTML5 does not allow cross-domain web workers, so we need to proxy the instantion of
|
||||
// a web worker through a same-domain script
|
||||
window.MonacoEnvironment = {
|
||||
getWorkerUrl: function(workerId, label) {
|
||||
return 'monaco-editor-worker-loader-proxy.js';
|
||||
}
|
||||
};
|
||||
|
||||
require(["vs/editor/editor.main"], function () {
|
||||
// ...
|
||||
});
|
||||
</script>
|
||||
|
||||
<!--
|
||||
Create http://www.mydomain.com/monaco-editor-worker-loader-proxy.js with the following content:
|
||||
self.MonacoEnvironment = {
|
||||
baseUrl: 'http://www.mycdn.com/monaco-editor/'
|
||||
};
|
||||
importScripts('www.mycdn.com/monaco-editor/vs/base/worker/workerMain.js');
|
||||
That's it. You're good to go! :)
|
||||
-->
|
||||
```
|
||||
|
||||
## FAQ
|
||||
|
||||
> Q: What is the relationship between VS Code and the Monaco Editor?<br/>
|
||||
> A: The Monaco Editor is generated straight from VS Code's sources with some shims around services the code needs to make it run in a web browser outside of its home.
|
||||
|
||||
<br/>
|
||||
> Q: What is the relationship between VS Code's version and the Monaco Editor's version?<br/>
|
||||
> A: None. The Monaco Editor is a library and it reflects directly the source code.
|
||||
|
||||
<br/>
|
||||
> Q: I've written an extension for VS Code, will it work on the Monaco Editor in a browser?<br/>
|
||||
> A: No.
|
||||
|
||||
<br/>
|
||||
> Q: Why all these web workers and why should I care?<br/>
|
||||
> A: Language services create web workers to compute heavy stuff outside the UI thread. They cost hardly anything in terms of resource overhead and you shouldn't worry too much about them, as long as you get them to work (see above the cross-domain case).
|
||||
|
||||
<br/>
|
||||
> Q: What is this `loader.js`? Can I use `require.js`?<br/>
|
||||
> A: It is an AMD loader that we use in VS Code. Yes.
|
||||
|
||||
## License
|
||||
[MIT](https://github.com/Microsoft/monaco-editor/blob/master/LICENSE.md)
|
||||
# Monaco Editor
|
||||
|
||||
[](https://www.npmjs.com/package/monaco-editor)
|
||||
[](https://www.npmjs.com/package/monaco-editor)
|
||||
[](https://github.com/microsoft/monaco-editor/issues?q=is%3Aopen+is%3Aissue+label%3Afeature-request+sort%3Areactions-%2B1-desc)
|
||||
[](https://github.com/microsoft/monaco-editor/issues?utf8=✓&q=is%3Aissue+is%3Aopen+label%3Abug)
|
||||
|
||||
The Monaco Editor is the fully featured code editor from [VS Code](https://github.com/microsoft/vscode). Check out the [VS Code docs](https://code.visualstudio.com/docs/editor/editingevolved) to see some of the supported features.
|
||||
|
||||

|
||||
|
||||
## Try it out
|
||||
|
||||
Try out the editor and see various examples [in our interactive playground](https://microsoft.github.io/monaco-editor/playground.html).
|
||||
|
||||
The playground is the best way to learn about how to use the editor, which features is supports, to try out different versions and to create minimal reproducible examples for bug reports.
|
||||
|
||||
## Installing
|
||||
|
||||
```
|
||||
> npm install monaco-editor
|
||||
```
|
||||
|
||||
You will get:
|
||||
|
||||
- inside `/esm`: ESM version of the editor (compatible with e.g. webpack)
|
||||
- `monaco.d.ts`: this specifies the API of the editor (this is what is actually versioned, everything else is considered private and might break with any release).
|
||||
|
||||
:warning: The monaco editor also ships an `AMD` build for backwards-compatibility reasons, but the `AMD` support is deprecated and will be removed in future versions.
|
||||
|
||||
## Localization
|
||||
|
||||
To load the editor in a specific language, make sure that the corresponding nls script file is loaded before the main monaco editor script. For example, to load the editor in German, include the following script tag:
|
||||
```html
|
||||
<script src="path/to/monaco-editor/esm/nls.messages.de.js"></script>
|
||||
```
|
||||
|
||||
Check the sources for available languages.
|
||||
|
||||
## Concepts
|
||||
|
||||
Monaco editor is best known for being the text editor that powers VS Code. However, it's a bit more nuanced. Some basic understanding about the underlying concepts is needed to use Monaco editor effectively.
|
||||
|
||||
### Models
|
||||
|
||||
Models are at the heart of Monaco editor. It's what you interact with when managing content. A model represents a file that has been opened. This could represent a file that exists on a file system, but it doesn't have to. For example, the model holds the text content, determines the language of the content, and tracks the edit history of the content.
|
||||
|
||||
### URIs
|
||||
|
||||
Each model is identified by a URI. This is why it's not possible for two models to have the same URI. Ideally when you represent content in Monaco editor, you should think of a virtual file system that matches the files your users are editing. For example, you could use `file:///` as a base path. If a model is created without a URI, its URI will be `inmemory://model/1`. The number increases as more models are created.
|
||||
|
||||
### Editors
|
||||
|
||||
An editor is a user facing view of the model. This is what gets attached to the DOM and what your users see visually. Typical editor operations are displaying a model, managing the view state, or executing actions or commands.
|
||||
|
||||
### Providers
|
||||
|
||||
Providers provide smart editor features. For example, this includes completion and hover information. It is not the same as, but often maps to [language server protocol](https://microsoft.github.io/language-server-protocol) features.
|
||||
|
||||
Providers work on models. Some smart features depends on the file URI. For example, for TypeScript to resolve imports, or for JSON IntelliSense to determine which JSON schema to apply to which model. So it's important to choose proper model URIs.
|
||||
|
||||
### Disposables
|
||||
|
||||
Many Monaco related objects often implement the `.dispose()` method. This method is intended to perform cleanups when a resource is no longer needed. For example, calling `model.dispose()` will unregister it, freeing up the URI for a new model. Editors should be disposed to free up resources and remove their model listeners.
|
||||
|
||||
## Documentation
|
||||
|
||||
- Learn how to integrate the editor with these [complete samples](./samples/).
|
||||
- [Integrate the ESM version](./docs/integrate-esm.md)
|
||||
- Learn how to use the editor API and try out your own customizations in the [playground](https://microsoft.github.io/monaco-editor/playground.html).
|
||||
- Explore the [API docs](https://microsoft.github.io/monaco-editor/docs.html) or read them straight from [`monaco.d.ts`](https://github.com/microsoft/monaco-editor/blob/gh-pages/node_modules/monaco-editor/monaco.d.ts).
|
||||
- Read [this guide](https://github.com/microsoft/monaco-editor/wiki/Accessibility-Guide-for-Integrators) to ensure the editor is accessible to all your users!
|
||||
- Create a Monarch tokenizer for a new programming language [in the Monarch playground](https://microsoft.github.io/monaco-editor/monarch.html).
|
||||
- Ask questions on [StackOverflow](https://stackoverflow.com/questions/tagged/monaco-editor)! Search open and closed issues, there are a lot of tips in there!
|
||||
|
||||
## Issues
|
||||
|
||||
Create [issues](https://github.com/microsoft/monaco-editor/issues) in this repository for anything related to the Monaco Editor. Please search for existing issues to avoid duplicates.
|
||||
|
||||
## FAQ
|
||||
|
||||
❓ **What is the relationship between VS Code and the Monaco Editor?**
|
||||
|
||||
The Monaco Editor is generated straight from VS Code's sources with some shims around services the code needs to make it run in a web browser outside of its home.
|
||||
|
||||
❓ **What is the relationship between VS Code's version and the Monaco Editor's version?**
|
||||
|
||||
None. The Monaco Editor is a library and it reflects directly the source code.
|
||||
|
||||
❓ **I've written an extension for VS Code, will it work on the Monaco Editor in a browser?**
|
||||
|
||||
No.
|
||||
|
||||
> Note: If the extension is fully based on the [LSP](https://microsoft.github.io/language-server-protocol/) and if the language server is authored in JavaScript, then it would be possible.
|
||||
|
||||
❓ **Why all these web workers and why should I care?**
|
||||
|
||||
Language services create web workers to compute heavy stuff outside of the UI thread. They cost hardly anything in terms of resource overhead and you shouldn't worry too much about them, as long as you get them to work (see above the cross-domain case).
|
||||
|
||||
❓ **I see the warning "Could not create web worker". What should I do?**
|
||||
|
||||
HTML5 does not allow pages loaded on `file://` to create web workers. Please load the editor with a web server on `http://` or `https://` schemes.
|
||||
|
||||
❓ **Is the editor supported in mobile browsers or mobile web app frameworks?**
|
||||
|
||||
No.
|
||||
|
||||
❓ **Why doesn't the editor support TextMate grammars?**
|
||||
|
||||
- Please see https://github.com/bolinfest/monaco-tm which puts together `monaco-editor`, `vscode-oniguruma` and `vscode-textmate` to get TM grammar support in the editor.
|
||||
|
||||
## Contributing / Local Development
|
||||
|
||||
We are welcoming contributions from the community!
|
||||
Please see [CONTRIBUTING](./CONTRIBUTING.md) for details how you can contribute effectively, how you can run the editor from sources and how you can debug and fix issues.
|
||||
|
||||
## Code of Conduct
|
||||
|
||||
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
|
||||
|
||||
## License
|
||||
|
||||
Licensed under the [MIT](https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt) License.
|
||||
|
|
|
|||
41
SECURITY.md
Normal file
41
SECURITY.md
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
<!-- BEGIN MICROSOFT SECURITY.MD V0.0.5 BLOCK -->
|
||||
|
||||
## Security
|
||||
|
||||
Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/).
|
||||
|
||||
If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](<https://docs.microsoft.com/en-us/previous-versions/tn-archive/cc751383(v=technet.10)>), please report it to us as described below.
|
||||
|
||||
## Reporting Security Issues
|
||||
|
||||
**Please do not report security vulnerabilities through public GitHub issues.**
|
||||
|
||||
Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://msrc.microsoft.com/create-report).
|
||||
|
||||
If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://www.microsoft.com/en-us/msrc/pgp-key-msrc).
|
||||
|
||||
You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://www.microsoft.com/msrc).
|
||||
|
||||
Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:
|
||||
|
||||
- Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
|
||||
- Full paths of source file(s) related to the manifestation of the issue
|
||||
- The location of the affected source code (tag/branch/commit or direct URL)
|
||||
- Any special configuration required to reproduce the issue
|
||||
- Step-by-step instructions to reproduce the issue
|
||||
- Proof-of-concept or exploit code (if possible)
|
||||
- Impact of the issue, including how an attacker might exploit the issue
|
||||
|
||||
This information will help us triage your report more quickly.
|
||||
|
||||
If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://microsoft.com/msrc/bounty) page for more details about our active programs.
|
||||
|
||||
## Preferred Languages
|
||||
|
||||
We prefer all communications to be in English.
|
||||
|
||||
## Policy
|
||||
|
||||
Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://www.microsoft.com/en-us/msrc/cvd).
|
||||
|
||||
<!-- END MICROSOFT SECURITY.MD BLOCK -->
|
||||
392
ThirdPartyNotices.txt
Normal file
392
ThirdPartyNotices.txt
Normal file
File diff suppressed because one or more lines are too long
8
build/amd/build.script.ts
Normal file
8
build/amd/build.script.ts
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
import { run } from '../../scripts/lib/index';
|
||||
|
||||
export async function buildAmdMinDev() {
|
||||
const rootPath = __dirname;
|
||||
await run('npx vite build --mode development', { cwd: rootPath });
|
||||
await run('npx vite build', { cwd: rootPath });
|
||||
await run('npx rollup -c rollup-types.config.mjs', { cwd: rootPath });
|
||||
}
|
||||
60
build/amd/plugin.js
Normal file
60
build/amd/plugin.js
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* @type {() => import('rollup').Plugin}
|
||||
*/
|
||||
export function urlToEsmPlugin() {
|
||||
return {
|
||||
name: 'import-meta-url',
|
||||
async transform(code, id) {
|
||||
if (this.environment?.mode === 'dev') {
|
||||
return;
|
||||
}
|
||||
let idx = 0;
|
||||
|
||||
// Look for `new URL("...?worker", import.meta.url)` patterns.
|
||||
const regex = /new\s+URL\s*\(\s*(['"`])(.*?)\?worker\1\s*,\s*import\.meta\.url\s*\)?/g;
|
||||
|
||||
let match;
|
||||
let modified = false;
|
||||
let result = code;
|
||||
let offset = 0;
|
||||
/** @type {string[]} */
|
||||
const additionalImports = [];
|
||||
|
||||
while ((match = regex.exec(code)) !== null) {
|
||||
let path = match[2];
|
||||
|
||||
if (!path.startsWith('.') && !path.startsWith('/')) {
|
||||
path = `./${path}`;
|
||||
}
|
||||
|
||||
const start = match.index;
|
||||
const end = start + match[0].length;
|
||||
|
||||
const varName = `__worker_url_${idx++}__`;
|
||||
additionalImports.push(`import ${varName} from ${JSON.stringify(path + '?worker&url')};`);
|
||||
|
||||
const replacement = varName;
|
||||
|
||||
result = result.slice(0, start + offset) + replacement + result.slice(end + offset);
|
||||
offset += replacement.length - (end - start);
|
||||
modified = true;
|
||||
}
|
||||
|
||||
if (!modified) {
|
||||
return null;
|
||||
}
|
||||
|
||||
result = additionalImports.join('\n') + '\n' + result;
|
||||
|
||||
return {
|
||||
code: result,
|
||||
map: null
|
||||
};
|
||||
}
|
||||
};
|
||||
}
|
||||
44
build/amd/rollup-types.config.mjs
Normal file
44
build/amd/rollup-types.config.mjs
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
// @ts-check
|
||||
|
||||
import nodeResolve from '@rollup/plugin-node-resolve';
|
||||
import { join } from 'path';
|
||||
import { defineConfig } from 'rollup';
|
||||
import { dts } from 'rollup-plugin-dts';
|
||||
import { dtsDeprecationWarning, mapModuleId } from '../shared.mjs';
|
||||
|
||||
export default defineConfig({
|
||||
input: {
|
||||
types: join(import.meta.dirname, './src/types.ts')
|
||||
},
|
||||
output: {
|
||||
dir: join(import.meta.dirname, './out'),
|
||||
format: 'es',
|
||||
preserveModules: false,
|
||||
entryFileNames: function (chunkInfo) {
|
||||
const moduleId = chunkInfo.facadeModuleId;
|
||||
if (moduleId) {
|
||||
const m = mapModuleId(moduleId, '.d.ts');
|
||||
if (m !== undefined) {
|
||||
return m;
|
||||
}
|
||||
}
|
||||
return '[name].d.ts';
|
||||
}
|
||||
},
|
||||
external: [/.*\.css/],
|
||||
plugins: [
|
||||
nodeResolve(),
|
||||
dts({
|
||||
compilerOptions: {
|
||||
stripInternal: true
|
||||
},
|
||||
includeExternal: ['monaco-editor-core', '@vscode/monaco-lsp-client']
|
||||
}),
|
||||
dtsDeprecationWarning(),
|
||||
]
|
||||
});
|
||||
94
build/amd/src/editor.main.ts
Normal file
94
build/amd/src/editor.main.ts
Normal file
|
|
@ -0,0 +1,94 @@
|
|||
/// @ts-ignore
|
||||
import * as require from 'require';
|
||||
|
||||
if (typeof (globalThis as any).require !== 'undefined' && typeof (globalThis as any).require.config === 'function') {
|
||||
(globalThis as any).require.config({
|
||||
ignoreDuplicateModules: [
|
||||
'vscode-languageserver-types',
|
||||
'vscode-languageserver-types/main',
|
||||
'vscode-languageserver-textdocument',
|
||||
'vscode-languageserver-textdocument/main',
|
||||
'vscode-nls',
|
||||
'vscode-nls/vscode-nls',
|
||||
'jsonc-parser',
|
||||
'jsonc-parser/main',
|
||||
'vscode-uri',
|
||||
'vscode-uri/index',
|
||||
'vs/basic-languages/typescript/typescript'
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
self.MonacoEnvironment = {
|
||||
getWorker: function (_moduleId, label) {
|
||||
if (label === 'json') {
|
||||
return new Worker(
|
||||
getWorkerBootstrapUrl(
|
||||
/// @ts-ignore
|
||||
new URL('../../../src/language/json/json.worker.ts?worker', import.meta.url)
|
||||
)
|
||||
);
|
||||
}
|
||||
if (label === 'css' || label === 'scss' || label === 'less') {
|
||||
return new Worker(
|
||||
getWorkerBootstrapUrl(
|
||||
/// @ts-ignore
|
||||
new URL('../../../src/language/css/css.worker.ts?worker', import.meta.url)
|
||||
)
|
||||
);
|
||||
}
|
||||
if (label === 'html' || label === 'handlebars' || label === 'razor') {
|
||||
return new Worker(
|
||||
getWorkerBootstrapUrl(
|
||||
/// @ts-ignore
|
||||
new URL('../../../src/language/html/html.worker.ts?worker', import.meta.url)
|
||||
)
|
||||
);
|
||||
}
|
||||
if (label === 'typescript' || label === 'javascript') {
|
||||
return new Worker(
|
||||
getWorkerBootstrapUrl(
|
||||
/// @ts-ignore
|
||||
new URL('../../../src/language/typescript/ts.worker.ts?worker', import.meta.url)
|
||||
)
|
||||
);
|
||||
}
|
||||
return new Worker(
|
||||
/// @ts-ignore
|
||||
getWorkerBootstrapUrl(new URL('../../../src/editor/editor.worker.ts?worker', import.meta.url))
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
function getWorkerBootstrapUrl(workerScriptUrl: string | URL) {
|
||||
if (typeof workerScriptUrl !== 'string') {
|
||||
workerScriptUrl = workerScriptUrl.toString();
|
||||
}
|
||||
const blob = new Blob(
|
||||
[
|
||||
[
|
||||
`const ttPolicy = globalThis.trustedTypes?.createPolicy('defaultWorkerFactory', { createScriptURL: value => value });`,
|
||||
`globalThis.workerttPolicy = ttPolicy;`,
|
||||
`importScripts(ttPolicy?.createScriptURL(${JSON.stringify(
|
||||
workerScriptUrl
|
||||
)}) ?? ${JSON.stringify(workerScriptUrl)});`,
|
||||
`globalThis.postMessage({ type: 'vscode-worker-ready' });`
|
||||
].join('')
|
||||
],
|
||||
{ type: 'application/javascript' }
|
||||
);
|
||||
return URL.createObjectURL(blob);
|
||||
}
|
||||
|
||||
import 'vs/nls.messages-loader!';
|
||||
import * as monaco from '../../../src/editor/editor.main';
|
||||
export * from '../../../src/editor/editor.main';
|
||||
|
||||
globalThis.monaco = monaco;
|
||||
|
||||
const styleSheetUrl = require.toUrl('vs/editor/editor.main.css');
|
||||
|
||||
const link = document.createElement('link');
|
||||
link.rel = 'stylesheet';
|
||||
link.href = styleSheetUrl;
|
||||
document.head.appendChild(link);
|
||||
1368
build/amd/src/loader.js
Normal file
1368
build/amd/src/loader.js
Normal file
File diff suppressed because it is too large
Load diff
10
build/amd/src/nls.messages-loader.js
Normal file
10
build/amd/src/nls.messages-loader.js
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
export function load(name, req, load, config) {
|
||||
const requestedLanguage = config['vs/nls']?.availableLanguages?.['*'];
|
||||
if (!requestedLanguage || requestedLanguage === 'en') {
|
||||
load({});
|
||||
} else {
|
||||
req([`vs/nls.messages.${requestedLanguage}`], () => {
|
||||
load({});
|
||||
});
|
||||
}
|
||||
}
|
||||
3
build/amd/src/types.ts
Normal file
3
build/amd/src/types.ts
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
import * as m from './editor.main';
|
||||
|
||||
export { m };
|
||||
82
build/amd/vite.config.mjs
Normal file
82
build/amd/vite.config.mjs
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
import { readFileSync } from 'node:fs';
|
||||
import { dirname, resolve } from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import { defineConfig } from 'vite';
|
||||
import { urlToEsmPlugin } from './plugin';
|
||||
import { getNlsEntryPoints } from '../shared.mjs';
|
||||
|
||||
const __dirname = dirname(fileURLToPath(import.meta.url));
|
||||
|
||||
export default defineConfig(async (args) => {
|
||||
/** @type {import('vite').UserConfig} */
|
||||
return {
|
||||
base: './',
|
||||
resolve: {
|
||||
dedupe: ['monaco-editor-core']
|
||||
},
|
||||
build: {
|
||||
lib: {
|
||||
cssFileName: 'editor/editor.main',
|
||||
entry: {
|
||||
...getNlsEntryPoints(),
|
||||
'nls.messages-loader': resolve(__dirname, 'src/nls.messages-loader.js'),
|
||||
'editor/editor.main': resolve(__dirname, 'src/editor.main.ts'),
|
||||
'basic-languages/monaco.contribution': resolve(
|
||||
__dirname,
|
||||
'../../src/basic-languages/monaco.contribution.ts'
|
||||
),
|
||||
'language/css/monaco.contribution': resolve(
|
||||
__dirname,
|
||||
'../../src/language/css/monaco.contribution.ts'
|
||||
),
|
||||
'language/html/monaco.contribution': resolve(
|
||||
__dirname,
|
||||
'../../src/language/html/monaco.contribution.ts'
|
||||
),
|
||||
'language/json/monaco.contribution': resolve(
|
||||
__dirname,
|
||||
'../../src/language/json/monaco.contribution.ts'
|
||||
),
|
||||
'language/typescript/monaco.contribution': resolve(
|
||||
__dirname,
|
||||
'../../src/language/typescript/monaco.contribution.ts'
|
||||
)
|
||||
},
|
||||
name: 'monaco-editor',
|
||||
fileName: (_format, entryName) => entryName + '.js',
|
||||
formats: ['amd']
|
||||
},
|
||||
outDir: resolve(
|
||||
__dirname,
|
||||
'../../out/monaco-editor/',
|
||||
args.mode === 'development' ? 'dev' : 'min',
|
||||
'vs'
|
||||
),
|
||||
rollupOptions: {
|
||||
external: ['require', 'vs/nls.messages-loader!'],
|
||||
output: {
|
||||
amd: {
|
||||
basePath: 'vs',
|
||||
autoId: true
|
||||
}
|
||||
}
|
||||
},
|
||||
minify: args.mode !== 'development',
|
||||
emptyOutDir: true
|
||||
},
|
||||
plugins: [
|
||||
{
|
||||
name: 'copy-loader',
|
||||
apply: 'build',
|
||||
generateBundle() {
|
||||
this.emitFile({
|
||||
type: 'asset',
|
||||
fileName: 'loader.js',
|
||||
source: readFileSync(resolve(__dirname, './src/loader.js'), 'utf-8')
|
||||
});
|
||||
}
|
||||
},
|
||||
urlToEsmPlugin()
|
||||
]
|
||||
};
|
||||
});
|
||||
81
build/build-monaco-editor.ts
Normal file
81
build/build-monaco-editor.ts
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import path = require('path');
|
||||
import fs = require('fs');
|
||||
import { REPO_ROOT, readFiles, writeFiles } from '../build/utils';
|
||||
import { generateEsmMetadataJsAndDTs } from './releaseMetadata';
|
||||
import { buildESM } from './esm/build.script';
|
||||
import { buildAmdMinDev } from './amd/build.script';
|
||||
import { rm } from 'fs/promises';
|
||||
|
||||
async function run() {
|
||||
await rm(path.join(REPO_ROOT, './out/monaco-editor'), { recursive: true, force: true });
|
||||
|
||||
await buildESM();
|
||||
await buildAmdMinDev();
|
||||
|
||||
// copy types.d.ts from build/amd/out/ to out/monaco-editor/monaco.d.ts (and append `declare global { export import monaco = editor_main; }`)
|
||||
(() => {
|
||||
let contents = fs.readFileSync('build/amd/out/types.d.ts', { encoding: 'utf8' });
|
||||
contents += '\n\ndeclare global { export import monaco = editor_main; }\n';
|
||||
fs.writeFileSync('out/monaco-editor/monaco.d.ts', contents);
|
||||
})();
|
||||
|
||||
createThirdPartyNoticesDotTxt();
|
||||
generateEsmMetadataJsAndDTs();
|
||||
|
||||
// package.json
|
||||
(() => {
|
||||
const packageJSON = readFiles('package.json', { base: '' })[0];
|
||||
const json = JSON.parse(packageJSON.contents.toString());
|
||||
|
||||
json.private = false;
|
||||
delete json.scripts['postinstall'];
|
||||
|
||||
packageJSON.contents = Buffer.from(JSON.stringify(json, null, ' '));
|
||||
writeFiles([packageJSON], `out/monaco-editor`);
|
||||
})();
|
||||
|
||||
(() => {
|
||||
/** @type {IFile[]} */
|
||||
let otherFiles = [];
|
||||
|
||||
otherFiles = otherFiles.concat(readFiles('README.md', { base: '' }));
|
||||
otherFiles = otherFiles.concat(readFiles('CHANGELOG.md', { base: '' }));
|
||||
otherFiles = otherFiles.concat(
|
||||
readFiles('node_modules/monaco-editor-core/LICENSE', {
|
||||
base: 'node_modules/monaco-editor-core/'
|
||||
})
|
||||
);
|
||||
|
||||
writeFiles(otherFiles, `out/monaco-editor`);
|
||||
})();
|
||||
}
|
||||
|
||||
/**
|
||||
* Edit ThirdPartyNotices.txt:
|
||||
* - append ThirdPartyNotices.txt from plugins
|
||||
*/
|
||||
function createThirdPartyNoticesDotTxt() {
|
||||
const tpn = readFiles('node_modules/monaco-editor-core/ThirdPartyNotices.txt', {
|
||||
base: 'node_modules/monaco-editor-core'
|
||||
})[0];
|
||||
|
||||
let contents = tpn.contents.toString();
|
||||
|
||||
console.log('ADDING ThirdPartyNotices from ./ThirdPartyNotices.txt');
|
||||
let thirdPartyNoticeContent = fs
|
||||
.readFileSync(path.join(REPO_ROOT, 'ThirdPartyNotices.txt'))
|
||||
.toString();
|
||||
thirdPartyNoticeContent = thirdPartyNoticeContent.split('\n').slice(8).join('\n');
|
||||
|
||||
contents += '\n' + thirdPartyNoticeContent;
|
||||
tpn.contents = Buffer.from(contents);
|
||||
|
||||
writeFiles([tpn], `out/monaco-editor`);
|
||||
}
|
||||
|
||||
run();
|
||||
53
build/check-samples.ts
Normal file
53
build/check-samples.ts
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as fs from 'fs';
|
||||
import * as glob from 'glob';
|
||||
import * as path from 'path';
|
||||
import { REPO_ROOT } from './utils';
|
||||
|
||||
checkEveryMonacoLanguageHasASample();
|
||||
|
||||
function checkEveryMonacoLanguageHasASample() {
|
||||
let languages = glob
|
||||
.sync('src/basic-languages/*/*.contribution.ts', { cwd: REPO_ROOT })
|
||||
.map((f) => path.dirname(f))
|
||||
.map((f) => f.substring('src/basic-languages/'.length));
|
||||
languages.push('css');
|
||||
languages.push('html');
|
||||
languages.push('json');
|
||||
languages.push('typescript');
|
||||
|
||||
// some languages have a different id than their folder
|
||||
languages = languages.map((l) => {
|
||||
switch (l) {
|
||||
case 'coffee':
|
||||
return 'coffeescript';
|
||||
case 'protobuf':
|
||||
return 'proto';
|
||||
case 'solidity':
|
||||
return 'sol';
|
||||
case 'sophia':
|
||||
return 'aes';
|
||||
default:
|
||||
return l;
|
||||
}
|
||||
});
|
||||
|
||||
let fail = false;
|
||||
for (const language of languages) {
|
||||
const expectedSamplePath = path.join(
|
||||
REPO_ROOT,
|
||||
`website/src/website/data/home-samples/sample.${language}.txt`
|
||||
);
|
||||
if (!fs.existsSync(expectedSamplePath)) {
|
||||
console.error(`Missing sample for ${language} at ${expectedSamplePath}`);
|
||||
fail = true;
|
||||
}
|
||||
}
|
||||
if (fail) {
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
7
build/esm/build.script.ts
Normal file
7
build/esm/build.script.ts
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
import { run } from '../../scripts/lib/index';
|
||||
|
||||
export async function buildESM() {
|
||||
const rootPath = __dirname;
|
||||
await run('npx rollup -c rollup.config.mjs', { cwd: rootPath });
|
||||
await run('npx rollup -c rollup-types.config.mjs', { cwd: rootPath });
|
||||
}
|
||||
1
build/esm/rollup-plugin-keep-css-imports/.gitignore
vendored
Normal file
1
build/esm/rollup-plugin-keep-css-imports/.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
!dist
|
||||
21
build/esm/rollup-plugin-keep-css-imports/LICENSE
Normal file
21
build/esm/rollup-plugin-keep-css-imports/LICENSE
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2024 Alexandr Yeskov
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
2
build/esm/rollup-plugin-keep-css-imports/README.md
Normal file
2
build/esm/rollup-plugin-keep-css-imports/README.md
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
See https://www.npmjs.com/package/rollup-plugin-keep-css-imports.
|
||||
Compare index.mjs with index.original.mjs to see the patch.
|
||||
25
build/esm/rollup-plugin-keep-css-imports/dist/ImportUpdater.d.ts
vendored
Normal file
25
build/esm/rollup-plugin-keep-css-imports/dist/ImportUpdater.d.ts
vendored
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
import MagicString from "magic-string";
|
||||
import type { RenderedChunk } from "rollup";
|
||||
import { OutputOptions, KeepCssImportsPluginContext } from "./types";
|
||||
interface ChunkDetails {
|
||||
chunk: RenderedChunk;
|
||||
bundleOutDir: string;
|
||||
moduleRoot: string;
|
||||
}
|
||||
export declare class ImportUpdater {
|
||||
private _outputOptions;
|
||||
private _pluginContext;
|
||||
constructor(pluginContext: KeepCssImportsPluginContext, outputOptions: OutputOptions);
|
||||
getMagicId(id: string): string;
|
||||
updateImports(code: string, chunk: RenderedChunk, bundleOutDir: string, moduleRoot: string): {
|
||||
code: string;
|
||||
map: import("magic-string").SourceMap;
|
||||
};
|
||||
updateMatchedImport(m: RegExpMatchArray, magicString: MagicString, chunkDetails: ChunkDetails): void;
|
||||
private addImportAndGetNewId;
|
||||
private updateChunk;
|
||||
private saveAndGetUpdatedImportPath;
|
||||
private shouldAddPrefixCurrentDir;
|
||||
private resolveOutputPath;
|
||||
}
|
||||
export {};
|
||||
31
build/esm/rollup-plugin-keep-css-imports/dist/compileSass.d.ts
vendored
Normal file
31
build/esm/rollup-plugin-keep-css-imports/dist/compileSass.d.ts
vendored
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
import type { AsyncCompiler, Options } from "sass";
|
||||
type SassAsyncCompiler = Pick<AsyncCompiler, "compileAsync" | "compileStringAsync">;
|
||||
export type PostCssCompatible = {
|
||||
process: (css: string, opt: {
|
||||
from: string;
|
||||
to: string;
|
||||
map: {
|
||||
prev: string;
|
||||
inline: boolean;
|
||||
} | null;
|
||||
}) => string | {
|
||||
css: string;
|
||||
map?: string;
|
||||
};
|
||||
};
|
||||
export interface CompilationOptions {
|
||||
outputExt: string;
|
||||
sass?: SassAsyncCompiler;
|
||||
postProcessor?: (css: string, map: string) => Promise<PostCssCompatible | string | {
|
||||
css: string;
|
||||
map?: string;
|
||||
}>;
|
||||
loadPaths?: string[];
|
||||
sourceMap?: boolean;
|
||||
sassOptions: Options<"async">;
|
||||
}
|
||||
export declare const compileSass: (sassPath: string, outWatchList: string[] | undefined, { outputExt, sass, postProcessor, loadPaths, sourceMap, sassOptions }: CompilationOptions) => Promise<{
|
||||
css: string;
|
||||
map: string;
|
||||
}>;
|
||||
export {};
|
||||
3
build/esm/rollup-plugin-keep-css-imports/dist/constants.d.ts
vendored
Normal file
3
build/esm/rollup-plugin-keep-css-imports/dist/constants.d.ts
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
export declare const PLUGIN_NAME = "keep-css-imports";
|
||||
export declare const FILE_URL_PREFIX: string;
|
||||
export declare const KEY_EXT_STRING = ".[keep-css-imports-plugin-ext]";
|
||||
52
build/esm/rollup-plugin-keep-css-imports/dist/helpers.d.ts
vendored
Normal file
52
build/esm/rollup-plugin-keep-css-imports/dist/helpers.d.ts
vendored
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
import { EmitFile } from "rollup";
|
||||
import { StylesMap } from "./types";
|
||||
export declare const escapeRegex: (val: any) => any;
|
||||
export declare const assertDuplicates: (stylesToEmit: StylesMap) => void;
|
||||
export declare const assertLocation: (outDir: any, assetPath: any) => void;
|
||||
export declare const ensureSourceMap: ({ css, map }: {
|
||||
css?: string | Uint8Array;
|
||||
map?: string | Uint8Array;
|
||||
}, includeSourceMap: boolean | "inline" | undefined, fileName: string, onEmit: EmitFile) => string | Uint8Array;
|
||||
export declare const formatProcessedToCSS: (input: string | {
|
||||
css: string;
|
||||
map?: string | object;
|
||||
}, sourceMap: boolean) => {
|
||||
css: string;
|
||||
map: string;
|
||||
};
|
||||
export declare const requireSass: () => Promise<{
|
||||
default: typeof import("sass");
|
||||
AsyncCompiler: typeof import("sass").AsyncCompiler;
|
||||
Compiler: typeof import("sass").Compiler;
|
||||
compile: typeof import("sass").compile;
|
||||
compileAsync: typeof import("sass").compileAsync;
|
||||
compileString: typeof import("sass").compileString;
|
||||
compileStringAsync: typeof import("sass").compileStringAsync;
|
||||
initCompiler: typeof import("sass").initCompiler;
|
||||
initAsyncCompiler: typeof import("sass").initAsyncCompiler;
|
||||
Exception: typeof import("sass").Exception;
|
||||
Logger: typeof import("sass").Logger;
|
||||
CalculationInterpolation: typeof import("sass").CalculationInterpolation;
|
||||
CalculationOperation: typeof import("sass").CalculationOperation;
|
||||
SassArgumentList: typeof import("sass").SassArgumentList;
|
||||
SassBoolean: typeof import("sass").SassBoolean;
|
||||
SassCalculation: typeof import("sass").SassCalculation;
|
||||
SassColor: typeof import("sass").SassColor;
|
||||
SassFunction: typeof import("sass").SassFunction;
|
||||
SassList: typeof import("sass").SassList;
|
||||
SassMap: typeof import("sass").SassMap;
|
||||
SassMixin: typeof import("sass").SassMixin;
|
||||
SassNumber: typeof import("sass").SassNumber;
|
||||
SassString: typeof import("sass").SassString;
|
||||
Value: typeof import("sass").Value;
|
||||
sassFalse: import("sass").SassBoolean;
|
||||
sassNull: import("sass").Value;
|
||||
sassTrue: import("sass").SassBoolean;
|
||||
FALSE: import("sass").types.Boolean<false>;
|
||||
NULL: import("sass").types.Null;
|
||||
TRUE: import("sass").types.Boolean<true>;
|
||||
types: typeof import("sass").types;
|
||||
render: typeof import("sass").render;
|
||||
renderSync: typeof import("sass").renderSync;
|
||||
info: string;
|
||||
}>;
|
||||
4
build/esm/rollup-plugin-keep-css-imports/dist/index.d.ts
vendored
Normal file
4
build/esm/rollup-plugin-keep-css-imports/dist/index.d.ts
vendored
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
import type { Plugin } from "rollup";
|
||||
import { KeepCssImportsOptions } from "./types";
|
||||
declare function keepCssImports({ outputExt, outputPath, skipCurrentFolderPart, includeRegexp, sass, postProcessor, sassOptions, ...options }?: KeepCssImportsOptions): Plugin;
|
||||
export default keepCssImports;
|
||||
487
build/esm/rollup-plugin-keep-css-imports/dist/index.mjs
vendored
Normal file
487
build/esm/rollup-plugin-keep-css-imports/dist/index.mjs
vendored
Normal file
|
|
@ -0,0 +1,487 @@
|
|||
import { readFile } from 'fs/promises';
|
||||
import * as path from 'path';
|
||||
import MagicString from 'magic-string';
|
||||
|
||||
/******************************************************************************
|
||||
Copyright (c) Microsoft Corporation.
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||||
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||||
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
PERFORMANCE OF THIS SOFTWARE.
|
||||
***************************************************************************** */
|
||||
/* global Reflect, Promise, SuppressedError, Symbol */
|
||||
|
||||
|
||||
var __assign = function () {
|
||||
__assign = Object.assign || function __assign(t) {
|
||||
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
||||
s = arguments[i];
|
||||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
||||
}
|
||||
return t;
|
||||
};
|
||||
return __assign.apply(this, arguments);
|
||||
};
|
||||
|
||||
function __rest(s, e) {
|
||||
var t = {};
|
||||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
||||
t[p] = s[p];
|
||||
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
||||
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
||||
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
||||
t[p[i]] = s[p[i]];
|
||||
}
|
||||
return t;
|
||||
}
|
||||
|
||||
function __awaiter(thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
}
|
||||
|
||||
function __generator(thisArg, body) {
|
||||
var _ = { label: 0, sent: function () { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
||||
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
|
||||
function verb(n) { return function (v) { return step([n, v]); }; }
|
||||
function step(op) {
|
||||
if (f) throw new TypeError("Generator is already executing.");
|
||||
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
||||
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
||||
if (y = 0, t) op = [op[0] & 2, t.value];
|
||||
switch (op[0]) {
|
||||
case 0: case 1: t = op; break;
|
||||
case 4: _.label++; return { value: op[1], done: false };
|
||||
case 5: _.label++; y = op[1]; op = [0]; continue;
|
||||
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
||||
default:
|
||||
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
||||
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
||||
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
||||
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
||||
if (t[2]) _.ops.pop();
|
||||
_.trys.pop(); continue;
|
||||
}
|
||||
op = body.call(thisArg, _);
|
||||
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
||||
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
||||
}
|
||||
}
|
||||
|
||||
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
||||
var e = new Error(message);
|
||||
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
||||
};
|
||||
|
||||
var escapeRegex = function (val) { return val.replace(/[/\-\\^$*+?.()|[\]{}]/g, "\\$&"); };
|
||||
var assertDuplicates = function (stylesToEmit) {
|
||||
Object.values(stylesToEmit).forEach(function (v, i, all) {
|
||||
if (all.some(function (av, ai) { return !!v.output && v.output === av.output && ai != i; })) {
|
||||
throw new Error("Two or more assets have conflicting output path ".concat(v.output));
|
||||
}
|
||||
});
|
||||
};
|
||||
var assertLocation = function (outDir, assetPath) {
|
||||
if (!path.normalize(assetPath).startsWith(path.normalize(outDir))) {
|
||||
throw new Error("Output path ".concat(assetPath, " must be in output directory ").concat(outDir));
|
||||
}
|
||||
};
|
||||
var ensureSourceMap = function (_a, includeSourceMap, fileName, onEmit) {
|
||||
var css = _a.css, map = _a.map;
|
||||
if (map) {
|
||||
if (includeSourceMap === "inline") {
|
||||
css += "\n/*# sourceMappingURL=data:application/json;base64,".concat((map instanceof Uint8Array ? Buffer.from(map) : Buffer.from(map, "utf8")).toString("base64"), "*/");
|
||||
}
|
||||
else if (includeSourceMap === true) {
|
||||
css += "\n/*# sourceMappingURL=".concat(path.basename(fileName), ".map */");
|
||||
}
|
||||
if (includeSourceMap === true) {
|
||||
onEmit({
|
||||
type: "asset",
|
||||
fileName: fileName + ".map",
|
||||
source: map,
|
||||
});
|
||||
}
|
||||
}
|
||||
return css;
|
||||
};
|
||||
var formatProcessedToCSS = function (input, sourceMap) {
|
||||
return typeof input === "string"
|
||||
? { css: input, map: "" }
|
||||
: typeof input === "object"
|
||||
? {
|
||||
css: input.css,
|
||||
map: !sourceMap ? "" : typeof input.map === "object" ? JSON.stringify(input.map) : input.map,
|
||||
}
|
||||
: input;
|
||||
};
|
||||
var requireSass = function () {
|
||||
try {
|
||||
return import('sass');
|
||||
}
|
||||
catch (e) {
|
||||
throw new Error("You have to install `sass` package! Try running\n\t" +
|
||||
"npm install --save-dev sass\nor\nyarn add sass --dev\n" +
|
||||
"or use `sass` option to pass processor");
|
||||
}
|
||||
};
|
||||
|
||||
function ensureCompiler(sass) {
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var sassProcessor, _a;
|
||||
return __generator(this, function (_b) {
|
||||
switch (_b.label) {
|
||||
case 0:
|
||||
_a = sass;
|
||||
if (_a) return [3 /*break*/, 2];
|
||||
return [4 /*yield*/, requireSass()];
|
||||
case 1:
|
||||
_a = (_b.sent());
|
||||
_b.label = 2;
|
||||
case 2:
|
||||
sassProcessor = _a;
|
||||
if (!("compileAsync" in sassProcessor)) {
|
||||
throw new Error("You have to install `sass` package! Or provide an object which implements `compileAsync` as `sass` option");
|
||||
}
|
||||
return [2 /*return*/, sassProcessor];
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
var isPostCssCompatible = function (result) {
|
||||
return result && typeof result === "object" && "process" in result && typeof result.process === "function";
|
||||
};
|
||||
var compileSass = function (sassPath, outWatchList, _a) {
|
||||
var outputExt = _a.outputExt, sass = _a.sass, postProcessor = _a.postProcessor, loadPaths = _a.loadPaths, sourceMap = _a.sourceMap, sassOptions = _a.sassOptions;
|
||||
return __awaiter(void 0, void 0, void 0, function () {
|
||||
var sassProcessor, watchListNeeded, compiled, css, mapObject, sources, map, result, _b, _c;
|
||||
return __generator(this, function (_d) {
|
||||
switch (_d.label) {
|
||||
case 0:
|
||||
if (!sassPath) {
|
||||
return [2 /*return*/, { css: "", map: "" }];
|
||||
}
|
||||
return [4 /*yield*/, ensureCompiler(sass)];
|
||||
case 1:
|
||||
sassProcessor = _d.sent();
|
||||
watchListNeeded = Array.isArray(outWatchList);
|
||||
return [4 /*yield*/, sassProcessor.compileAsync(sassPath, __assign({ loadPaths: loadPaths, style: "expanded", sourceMap: !!sourceMap || watchListNeeded, sourceMapIncludeSources: !!sourceMap || watchListNeeded }, (sassOptions || [])))];
|
||||
case 2:
|
||||
compiled = _d.sent();
|
||||
css = compiled.css.toString();
|
||||
if (watchListNeeded && compiled.sourceMap && typeof compiled.sourceMap === "object") {
|
||||
mapObject = "toJSON" in compiled.sourceMap && typeof compiled.sourceMap.toJSON === "function"
|
||||
? compiled.sourceMap.toJSON()
|
||||
: compiled.sourceMap;
|
||||
sources = mapObject.sources || mapObject._sources;
|
||||
outWatchList.push.apply(outWatchList, sources.filter(function (s) { return s && typeof s === "string"; }));
|
||||
}
|
||||
map = compiled.sourceMap
|
||||
? typeof compiled.sourceMap === "object"
|
||||
? JSON.stringify(compiled.sourceMap)
|
||||
: compiled.sourceMap
|
||||
: "";
|
||||
if (!(typeof postProcessor === "function")) return [3 /*break*/, 7];
|
||||
return [4 /*yield*/, postProcessor(css, map)];
|
||||
case 3:
|
||||
result = _d.sent();
|
||||
if ((typeof result !== "string" && typeof result !== "object") || result === null) {
|
||||
throw new Error("`postProcessor` must return string, object with `css` and `map` or PostCSS like object which implements `process` function");
|
||||
}
|
||||
_b = formatProcessedToCSS;
|
||||
if (!isPostCssCompatible(result) // If PostCSS compatible result
|
||||
) return [3 /*break*/, 5]; // If PostCSS compatible result
|
||||
return [4 /*yield*/, Promise.resolve(result.process(css, {
|
||||
from: sassPath,
|
||||
to: path.parse(sassPath).name + outputExt,
|
||||
map: map ? { prev: map, inline: false } : null,
|
||||
}))];
|
||||
case 4:
|
||||
_c = _d.sent();
|
||||
return [3 /*break*/, 6];
|
||||
case 5:
|
||||
_c = result;
|
||||
_d.label = 6;
|
||||
case 6: return [2 /*return*/, _b.apply(void 0, [_c, sourceMap])];
|
||||
case 7: return [2 /*return*/, { css: css, map: sourceMap ? map : undefined }];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
var PLUGIN_NAME = "keep-css-imports";
|
||||
var FILE_URL_PREFIX = new URL("file://").toString();
|
||||
var KEY_EXT_STRING = ".[keep-css-imports-plugin-ext]";
|
||||
|
||||
var createErrorMessage = function (message) { return "[".concat(PLUGIN_NAME, "] ").concat(message); };
|
||||
var ImportUpdater = /** @class */ (function () {
|
||||
function ImportUpdater(pluginContext, outputOptions) {
|
||||
var _this = this;
|
||||
this.addImportAndGetNewId = function (resolvedId) {
|
||||
var moduleIndex = _this._pluginContext.allStyleImports.indexOf(resolvedId);
|
||||
return !~moduleIndex ? _this._pluginContext.allStyleImports.push(resolvedId) - 1 : moduleIndex;
|
||||
};
|
||||
this._pluginContext = pluginContext;
|
||||
this._outputOptions = outputOptions;
|
||||
}
|
||||
ImportUpdater.prototype.getMagicId = function (id) {
|
||||
return "\0" + this.addImportAndGetNewId(id) + KEY_EXT_STRING;
|
||||
};
|
||||
ImportUpdater.prototype.updateImports = function (code, chunk, bundleOutDir, moduleRoot) {
|
||||
var _this = this;
|
||||
var magicString = new MagicString(code);
|
||||
var matchRegex = new RegExp("\0([^\"']+)".concat(escapeRegex(KEY_EXT_STRING)), "g");
|
||||
Array.from(code.matchAll(matchRegex))
|
||||
.reverse()
|
||||
.forEach(function (m) {
|
||||
return _this.updateMatchedImport(m, magicString, {
|
||||
chunk: chunk,
|
||||
bundleOutDir: bundleOutDir,
|
||||
moduleRoot: moduleRoot,
|
||||
});
|
||||
});
|
||||
return {
|
||||
code: magicString.toString(),
|
||||
map: magicString.generateMap({ hires: true }),
|
||||
};
|
||||
};
|
||||
ImportUpdater.prototype.updateMatchedImport = function (m, magicString, chunkDetails) {
|
||||
var importId = m[0];
|
||||
var assetId = this._pluginContext.allStyleImports[m[1]];
|
||||
if (!assetId || typeof assetId !== "string" || !this._pluginContext.stylesToEmit[assetId]) {
|
||||
return;
|
||||
}
|
||||
var updatedImport = this.saveAndGetUpdatedImportPath(assetId, chunkDetails);
|
||||
var start = m.index;
|
||||
var end = start + importId.length;
|
||||
magicString.overwrite(start, end, updatedImport);
|
||||
this.updateChunk(importId, updatedImport, chunkDetails.chunk);
|
||||
};
|
||||
ImportUpdater.prototype.updateChunk = function (importId, updatedImport, chunk) {
|
||||
if (chunk.importedBindings[importId]) {
|
||||
chunk.importedBindings[updatedImport] = chunk.importedBindings[importId];
|
||||
if (updatedImport !== importId) {
|
||||
delete chunk.importedBindings[importId];
|
||||
}
|
||||
}
|
||||
var importIndex = chunk.imports.indexOf(importId);
|
||||
if (~importIndex) {
|
||||
chunk.imports[importIndex] = updatedImport;
|
||||
}
|
||||
};
|
||||
ImportUpdater.prototype.saveAndGetUpdatedImportPath = function (assetId, _a) {
|
||||
var bundleOutDir = _a.bundleOutDir, moduleRoot = _a.moduleRoot, chunk = _a.chunk;
|
||||
var assetOutput = this.resolveOutputPath(bundleOutDir, assetId, moduleRoot);
|
||||
var updatedImport = path
|
||||
.relative(path.dirname(path.resolve(bundleOutDir, chunk.fileName)), assetOutput)
|
||||
.replace(/\\/g, "/");
|
||||
this._pluginContext.stylesToEmit[assetId].output = path.relative(path.resolve(bundleOutDir), assetOutput);
|
||||
if (this.shouldAddPrefixCurrentDir(updatedImport) &&
|
||||
!updatedImport.startsWith("./") &&
|
||||
!updatedImport.startsWith("../") &&
|
||||
!updatedImport.match(/^[a-zA-Z]:/)) {
|
||||
updatedImport = "./" + updatedImport;
|
||||
}
|
||||
return updatedImport;
|
||||
};
|
||||
ImportUpdater.prototype.shouldAddPrefixCurrentDir = function (updatedImport) {
|
||||
var skip = this._outputOptions.skipCurrentFolderPart;
|
||||
return !skip || (skip instanceof RegExp && !skip.test(updatedImport));
|
||||
};
|
||||
ImportUpdater.prototype.resolveOutputPath = function (bundleOutDir, assetId, moduleRoot) {
|
||||
var _a = this._outputOptions, outputPath = _a.outputPath, outputDir = _a.outputDir, outputExt = _a.outputExt;
|
||||
var newPath = undefined;
|
||||
if (typeof outputPath === "function") {
|
||||
newPath = outputPath(assetId);
|
||||
assertLocation(bundleOutDir, newPath);
|
||||
}
|
||||
else if (typeof outputPath === "string") {
|
||||
newPath = path.resolve(bundleOutDir, outputDir, outputPath !== "keep" ? outputPath : path.relative(moduleRoot, assetId));
|
||||
assertLocation(bundleOutDir, newPath);
|
||||
}
|
||||
else {
|
||||
throw new Error(createErrorMessage("Invalid outputPath option value!"));
|
||||
}
|
||||
return newPath.replace(/\.s[ca]ss$/, outputExt);
|
||||
};
|
||||
return ImportUpdater;
|
||||
}());
|
||||
|
||||
var ensureStylesInfo = function (stylesMap, importer, resolvedId) {
|
||||
stylesMap[resolvedId] = stylesMap[resolvedId] || { importers: [], watchList: [] };
|
||||
stylesMap[resolvedId].importers.push(importer);
|
||||
return stylesMap[resolvedId];
|
||||
};
|
||||
var ensureCodeAndWatchList = function (filePath, stylesInfo, isWatch, compilerOptions) {
|
||||
return __awaiter(void 0, void 0, void 0, function () {
|
||||
var outWatchList, _a, _b, css, map;
|
||||
return __generator(this, function (_c) {
|
||||
switch (_c.label) {
|
||||
case 0:
|
||||
outWatchList = [];
|
||||
if (!filePath.endsWith(".css")) return [3 /*break*/, 2];
|
||||
_a = stylesInfo;
|
||||
return [4 /*yield*/, readFile(filePath, "utf8")];
|
||||
case 1:
|
||||
_a.css = _c.sent();
|
||||
return [3 /*break*/, 4];
|
||||
case 2: return [4 /*yield*/, compileSass(filePath, isWatch ? outWatchList : undefined, compilerOptions)];
|
||||
case 3:
|
||||
_b = _c.sent(), css = _b.css, map = _b.map;
|
||||
stylesInfo.css = css;
|
||||
stylesInfo.map = map;
|
||||
_c.label = 4;
|
||||
case 4:
|
||||
outWatchList.push(filePath);
|
||||
stylesInfo.watchList = outWatchList.map(function (watchFile) { return path.resolve(watchFile.replace(FILE_URL_PREFIX, "")); });
|
||||
return [2 /*return*/];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
function keepCssImports(_a) {
|
||||
if (_a === void 0) { _a = {}; }
|
||||
var _b = _a.outputExt, outputExt = _b === void 0 ? ".css" : _b, _c = _a.outputPath, outputPath = _c === void 0 ? "keep" : _c, _d = _a.skipCurrentFolderPart, skipCurrentFolderPart = _d === void 0 ? false : _d, _e = _a.includeRegexp, includeRegexp = _e === void 0 ? /\.(?:s[ca]|c)ss$/ : _e, sass = _a.sass, postProcessor = _a.postProcessor, sassOptions = _a.sassOptions, options = __rest(_a, ["outputExt", "outputPath", "skipCurrentFolderPart", "includeRegexp", "sass", "postProcessor", "sassOptions"]);
|
||||
var stylesOutputOptions = {
|
||||
outputPath: outputPath,
|
||||
outputExt: outputExt,
|
||||
outputDir: options.outputDir ? path.resolve(options.outputDir) : "./",
|
||||
skipCurrentFolderPart: skipCurrentFolderPart,
|
||||
};
|
||||
var context = {
|
||||
allStyleImports: [],
|
||||
modulesWithCss: new Set(),
|
||||
stylesToEmit: {},
|
||||
};
|
||||
var importUpdater = new ImportUpdater(context, stylesOutputOptions);
|
||||
var loadPaths = options.includePaths || ["node_modules/"];
|
||||
loadPaths.push(process.cwd());
|
||||
loadPaths = loadPaths.filter(function (v, i, a) { return a.indexOf(v) === i; });
|
||||
var compilerOptions = {
|
||||
outputExt: outputExt,
|
||||
sass: sass,
|
||||
postProcessor: typeof postProcessor === "function"
|
||||
? function (css, map) { return postProcessor(css, map, context.stylesToEmit); }
|
||||
: undefined,
|
||||
loadPaths: loadPaths,
|
||||
sourceMap: !!options.sourceMap,
|
||||
sassOptions: sassOptions,
|
||||
};
|
||||
return {
|
||||
name: PLUGIN_NAME,
|
||||
resolveId: function (source, importer, resolveOptions) {
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var _a, custom, _b, _c, _d, _e, _f, alreadyResolving, resolved, styleInfo;
|
||||
var _g, _h;
|
||||
var _this = this;
|
||||
return __generator(this, function (_j) {
|
||||
switch (_j.label) {
|
||||
case 0:
|
||||
if (!importer || !includeRegexp.test(source) || /\0/.test(source)) {
|
||||
return [2 /*return*/, null];
|
||||
}
|
||||
_a = resolveOptions.custom, custom = _a === void 0 ? {} : _a;
|
||||
_b = custom, _c = PLUGIN_NAME, _d = _b[_c], _e = _d === void 0 ? {} : _d, _f = _e.resolving, alreadyResolving = _f === void 0 ? false : _f;
|
||||
if (alreadyResolving) {
|
||||
return [2 /*return*/, null];
|
||||
}
|
||||
return [4 /*yield*/, this.resolve(source, importer, __assign(__assign({ skipSelf: true }, resolveOptions), { custom: __assign(__assign({}, custom), (_g = {}, _g[PLUGIN_NAME] = __assign(__assign({}, custom[PLUGIN_NAME]), { resolving: true }), _g)) }))];
|
||||
case 1:
|
||||
resolved = _j.sent();
|
||||
if (!resolved || resolved.external) {
|
||||
return [2 /*return*/, resolved];
|
||||
}
|
||||
context.modulesWithCss.add(importer);
|
||||
styleInfo = ensureStylesInfo(context.stylesToEmit, importer, resolved.id);
|
||||
return [4 /*yield*/, ensureCodeAndWatchList(resolved.id, styleInfo, this.meta.watchMode, compilerOptions)];
|
||||
case 2:
|
||||
_j.sent();
|
||||
styleInfo.watchList.forEach(function (watchFile) {
|
||||
_this.addWatchFile(watchFile);
|
||||
});
|
||||
return [2 /*return*/, {
|
||||
id: importUpdater.getMagicId(resolved.id),
|
||||
meta: (_h = {}, _h[PLUGIN_NAME] = { sourceId: resolved.id }, _h),
|
||||
external: true,
|
||||
}];
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
buildStart: function () {
|
||||
var _this = this;
|
||||
// Every rebuild will refresh watcher, so we need to reattach
|
||||
if (this.meta.watchMode) {
|
||||
var allWatched_1 = this.getWatchFiles();
|
||||
Object.values(context.stylesToEmit).forEach(function (styleInfo) {
|
||||
return styleInfo.watchList.forEach(function (watchFile) {
|
||||
if (!allWatched_1.find(function (watched) { return path.normalize(watched) === path.normalize(watchFile); })) {
|
||||
_this.addWatchFile(watchFile);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
},
|
||||
watchChange: function (id) {
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var resolvedId, filesToUpdate;
|
||||
var _this = this;
|
||||
return __generator(this, function (_a) {
|
||||
switch (_a.label) {
|
||||
case 0:
|
||||
resolvedId = path.resolve(id);
|
||||
filesToUpdate = Object.entries(context.stylesToEmit).filter(function (_a) {
|
||||
var styleInfo = _a[1];
|
||||
return styleInfo.watchList.includes(resolvedId);
|
||||
});
|
||||
return [4 /*yield*/, Promise.all(filesToUpdate.map(function (_a) {
|
||||
var fileName = _a[0], styleInfo = _a[1];
|
||||
return ensureCodeAndWatchList(fileName, styleInfo, _this.meta.watchMode, compilerOptions);
|
||||
}))];
|
||||
case 1:
|
||||
_a.sent();
|
||||
return [2 /*return*/];
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
renderChunk: function (code, chunk, outputOptions) {
|
||||
var bundleOutDir = path.resolve(outputOptions.dir || path.dirname(outputOptions.file));
|
||||
// Always do it, otherwise some modules are missed
|
||||
var moduleRoot = outputOptions.preserveModulesRoot || process.cwd();
|
||||
return importUpdater.updateImports(code, chunk, bundleOutDir, moduleRoot);
|
||||
},
|
||||
generateBundle: function (_, __, isWrite) {
|
||||
if (!isWrite) {
|
||||
return;
|
||||
}
|
||||
assertDuplicates(context.stylesToEmit);
|
||||
for (var file in context.stylesToEmit) {
|
||||
var stylesInfo = context.stylesToEmit[file];
|
||||
var fileName = stylesInfo.output;
|
||||
var source = file.endsWith(".css")
|
||||
? stylesInfo.css
|
||||
: ensureSourceMap(stylesInfo, options.sourceMap || (sassOptions === null || sassOptions === void 0 ? void 0 : sassOptions.sourceMap), fileName, this.emitFile);
|
||||
this.emitFile({
|
||||
type: "asset",
|
||||
fileName: fileName,
|
||||
source: source,
|
||||
});
|
||||
}
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
export { keepCssImports as default };
|
||||
489
build/esm/rollup-plugin-keep-css-imports/dist/index.original.mjs
vendored
Normal file
489
build/esm/rollup-plugin-keep-css-imports/dist/index.original.mjs
vendored
Normal file
|
|
@ -0,0 +1,489 @@
|
|||
import { readFile } from 'fs/promises';
|
||||
import * as path from 'path';
|
||||
import MagicString from 'magic-string';
|
||||
|
||||
/******************************************************************************
|
||||
Copyright (c) Microsoft Corporation.
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||||
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||||
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
PERFORMANCE OF THIS SOFTWARE.
|
||||
***************************************************************************** */
|
||||
/* global Reflect, Promise, SuppressedError, Symbol */
|
||||
|
||||
|
||||
var __assign = function () {
|
||||
__assign = Object.assign || function __assign(t) {
|
||||
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
||||
s = arguments[i];
|
||||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
||||
}
|
||||
return t;
|
||||
};
|
||||
return __assign.apply(this, arguments);
|
||||
};
|
||||
|
||||
function __rest(s, e) {
|
||||
var t = {};
|
||||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
||||
t[p] = s[p];
|
||||
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
||||
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
||||
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
||||
t[p[i]] = s[p[i]];
|
||||
}
|
||||
return t;
|
||||
}
|
||||
|
||||
function __awaiter(thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
}
|
||||
|
||||
function __generator(thisArg, body) {
|
||||
var _ = { label: 0, sent: function () { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
||||
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
|
||||
function verb(n) { return function (v) { return step([n, v]); }; }
|
||||
function step(op) {
|
||||
if (f) throw new TypeError("Generator is already executing.");
|
||||
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
||||
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
||||
if (y = 0, t) op = [op[0] & 2, t.value];
|
||||
switch (op[0]) {
|
||||
case 0: case 1: t = op; break;
|
||||
case 4: _.label++; return { value: op[1], done: false };
|
||||
case 5: _.label++; y = op[1]; op = [0]; continue;
|
||||
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
||||
default:
|
||||
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
||||
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
||||
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
||||
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
||||
if (t[2]) _.ops.pop();
|
||||
_.trys.pop(); continue;
|
||||
}
|
||||
op = body.call(thisArg, _);
|
||||
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
||||
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
||||
}
|
||||
}
|
||||
|
||||
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
||||
var e = new Error(message);
|
||||
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
||||
};
|
||||
|
||||
var escapeRegex = function (val) { return val.replace(/[/\-\\^$*+?.()|[\]{}]/g, "\\$&"); };
|
||||
var assertDuplicates = function (stylesToEmit) {
|
||||
Object.values(stylesToEmit).forEach(function (v, i, all) {
|
||||
if (all.some(function (av, ai) { return !!v.output && v.output === av.output && ai != i; })) {
|
||||
throw new Error("Two or more assets have conflicting output path ".concat(v.output));
|
||||
}
|
||||
});
|
||||
};
|
||||
var assertLocation = function (outDir, assetPath) {
|
||||
if (!path.normalize(assetPath).startsWith(path.normalize(outDir))) {
|
||||
throw new Error("Output path ".concat(assetPath, " must be in output directory ").concat(outDir));
|
||||
}
|
||||
};
|
||||
var ensureSourceMap = function (_a, includeSourceMap, fileName, onEmit) {
|
||||
var css = _a.css, map = _a.map;
|
||||
if (map) {
|
||||
if (includeSourceMap === "inline") {
|
||||
css += "\n/*# sourceMappingURL=data:application/json;base64,".concat((map instanceof Uint8Array ? Buffer.from(map) : Buffer.from(map, "utf8")).toString("base64"), "*/");
|
||||
}
|
||||
else if (includeSourceMap === true) {
|
||||
css += "\n/*# sourceMappingURL=".concat(path.basename(fileName), ".map */");
|
||||
}
|
||||
if (includeSourceMap === true) {
|
||||
onEmit({
|
||||
type: "asset",
|
||||
fileName: fileName + ".map",
|
||||
source: map,
|
||||
});
|
||||
}
|
||||
}
|
||||
return css;
|
||||
};
|
||||
var formatProcessedToCSS = function (input, sourceMap) {
|
||||
return typeof input === "string"
|
||||
? { css: input, map: "" }
|
||||
: typeof input === "object"
|
||||
? {
|
||||
css: input.css,
|
||||
map: !sourceMap ? "" : typeof input.map === "object" ? JSON.stringify(input.map) : input.map,
|
||||
}
|
||||
: input;
|
||||
};
|
||||
var requireSass = function () {
|
||||
try {
|
||||
return import('sass');
|
||||
}
|
||||
catch (e) {
|
||||
throw new Error("You have to install `sass` package! Try running\n\t" +
|
||||
"npm install --save-dev sass\nor\nyarn add sass --dev\n" +
|
||||
"or use `sass` option to pass processor");
|
||||
}
|
||||
};
|
||||
|
||||
function ensureCompiler(sass) {
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var sassProcessor, _a;
|
||||
return __generator(this, function (_b) {
|
||||
switch (_b.label) {
|
||||
case 0:
|
||||
_a = sass;
|
||||
if (_a) return [3 /*break*/, 2];
|
||||
return [4 /*yield*/, requireSass()];
|
||||
case 1:
|
||||
_a = (_b.sent());
|
||||
_b.label = 2;
|
||||
case 2:
|
||||
sassProcessor = _a;
|
||||
if (!("compileAsync" in sassProcessor)) {
|
||||
throw new Error("You have to install `sass` package! Or provide an object which implements `compileAsync` as `sass` option");
|
||||
}
|
||||
return [2 /*return*/, sassProcessor];
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
var isPostCssCompatible = function (result) {
|
||||
return result && typeof result === "object" && "process" in result && typeof result.process === "function";
|
||||
};
|
||||
var compileSass = function (sassPath, outWatchList, _a) {
|
||||
var outputExt = _a.outputExt, sass = _a.sass, postProcessor = _a.postProcessor, loadPaths = _a.loadPaths, sourceMap = _a.sourceMap, sassOptions = _a.sassOptions;
|
||||
return __awaiter(void 0, void 0, void 0, function () {
|
||||
var sassProcessor, watchListNeeded, compiled, css, mapObject, sources, map, result, _b, _c;
|
||||
return __generator(this, function (_d) {
|
||||
switch (_d.label) {
|
||||
case 0:
|
||||
if (!sassPath) {
|
||||
return [2 /*return*/, { css: "", map: "" }];
|
||||
}
|
||||
return [4 /*yield*/, ensureCompiler(sass)];
|
||||
case 1:
|
||||
sassProcessor = _d.sent();
|
||||
watchListNeeded = Array.isArray(outWatchList);
|
||||
return [4 /*yield*/, sassProcessor.compileAsync(sassPath, __assign({ loadPaths: loadPaths, style: "expanded", sourceMap: !!sourceMap || watchListNeeded, sourceMapIncludeSources: !!sourceMap || watchListNeeded }, (sassOptions || [])))];
|
||||
case 2:
|
||||
compiled = _d.sent();
|
||||
css = compiled.css.toString();
|
||||
if (watchListNeeded && compiled.sourceMap && typeof compiled.sourceMap === "object") {
|
||||
mapObject = "toJSON" in compiled.sourceMap && typeof compiled.sourceMap.toJSON === "function"
|
||||
? compiled.sourceMap.toJSON()
|
||||
: compiled.sourceMap;
|
||||
sources = mapObject.sources || mapObject._sources;
|
||||
outWatchList.push.apply(outWatchList, sources.filter(function (s) { return s && typeof s === "string"; }));
|
||||
}
|
||||
map = compiled.sourceMap
|
||||
? typeof compiled.sourceMap === "object"
|
||||
? JSON.stringify(compiled.sourceMap)
|
||||
: compiled.sourceMap
|
||||
: "";
|
||||
if (!(typeof postProcessor === "function")) return [3 /*break*/, 7];
|
||||
return [4 /*yield*/, postProcessor(css, map)];
|
||||
case 3:
|
||||
result = _d.sent();
|
||||
if ((typeof result !== "string" && typeof result !== "object") || result === null) {
|
||||
throw new Error("`postProcessor` must return string, object with `css` and `map` or PostCSS like object which implements `process` function");
|
||||
}
|
||||
_b = formatProcessedToCSS;
|
||||
if (!isPostCssCompatible(result) // If PostCSS compatible result
|
||||
) return [3 /*break*/, 5]; // If PostCSS compatible result
|
||||
return [4 /*yield*/, Promise.resolve(result.process(css, {
|
||||
from: sassPath,
|
||||
to: path.parse(sassPath).name + outputExt,
|
||||
map: map ? { prev: map, inline: false } : null,
|
||||
}))];
|
||||
case 4:
|
||||
_c = _d.sent();
|
||||
return [3 /*break*/, 6];
|
||||
case 5:
|
||||
_c = result;
|
||||
_d.label = 6;
|
||||
case 6: return [2 /*return*/, _b.apply(void 0, [_c, sourceMap])];
|
||||
case 7: return [2 /*return*/, { css: css, map: sourceMap ? map : undefined }];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
var PLUGIN_NAME = "keep-css-imports";
|
||||
var FILE_URL_PREFIX = new URL("file://").toString();
|
||||
var KEY_EXT_STRING = ".[keep-css-imports-plugin-ext]";
|
||||
|
||||
var createErrorMessage = function (message) { return "[".concat(PLUGIN_NAME, "] ").concat(message); };
|
||||
var ImportUpdater = /** @class */ (function () {
|
||||
function ImportUpdater(pluginContext, outputOptions) {
|
||||
var _this = this;
|
||||
this.addImportAndGetNewId = function (resolvedId) {
|
||||
var moduleIndex = _this._pluginContext.allStyleImports.indexOf(resolvedId);
|
||||
return !~moduleIndex ? _this._pluginContext.allStyleImports.push(resolvedId) - 1 : moduleIndex;
|
||||
};
|
||||
this._pluginContext = pluginContext;
|
||||
this._outputOptions = outputOptions;
|
||||
}
|
||||
ImportUpdater.prototype.getMagicId = function (id) {
|
||||
return "\0" + this.addImportAndGetNewId(id) + KEY_EXT_STRING;
|
||||
};
|
||||
ImportUpdater.prototype.updateImports = function (code, chunk, bundleOutDir, moduleRoot) {
|
||||
var _this = this;
|
||||
var magicString = new MagicString(code);
|
||||
var matchRegex = new RegExp("\0([^\"']+)".concat(escapeRegex(KEY_EXT_STRING)), "g");
|
||||
Array.from(code.matchAll(matchRegex))
|
||||
.reverse()
|
||||
.forEach(function (m) {
|
||||
return _this.updateMatchedImport(m, magicString, {
|
||||
chunk: chunk,
|
||||
bundleOutDir: bundleOutDir,
|
||||
moduleRoot: moduleRoot,
|
||||
});
|
||||
});
|
||||
return {
|
||||
code: magicString.toString(),
|
||||
map: magicString.generateMap({ hires: true }),
|
||||
};
|
||||
};
|
||||
ImportUpdater.prototype.updateMatchedImport = function (m, magicString, chunkDetails) {
|
||||
var importId = m[0];
|
||||
var assetId = this._pluginContext.allStyleImports[m[1]];
|
||||
if (!assetId || typeof assetId !== "string" || !this._pluginContext.stylesToEmit[assetId]) {
|
||||
return;
|
||||
}
|
||||
var updatedImport = this.saveAndGetUpdatedImportPath(assetId, chunkDetails);
|
||||
var start = m.index;
|
||||
var end = start + importId.length;
|
||||
magicString.overwrite(start, end, updatedImport);
|
||||
this.updateChunk(importId, updatedImport, chunkDetails.chunk);
|
||||
};
|
||||
ImportUpdater.prototype.updateChunk = function (importId, updatedImport, chunk) {
|
||||
if (chunk.importedBindings[importId]) {
|
||||
chunk.importedBindings[updatedImport] = chunk.importedBindings[importId];
|
||||
if (updatedImport !== importId) {
|
||||
delete chunk.importedBindings[importId];
|
||||
}
|
||||
}
|
||||
var importIndex = chunk.imports.indexOf(importId);
|
||||
if (~importIndex) {
|
||||
chunk.imports[importIndex] = updatedImport;
|
||||
}
|
||||
};
|
||||
ImportUpdater.prototype.saveAndGetUpdatedImportPath = function (assetId, _a) {
|
||||
var bundleOutDir = _a.bundleOutDir, moduleRoot = _a.moduleRoot, chunk = _a.chunk;
|
||||
var assetOutput = this.resolveOutputPath(bundleOutDir, assetId, moduleRoot);
|
||||
var updatedImport = path
|
||||
.relative(path.dirname(path.resolve(bundleOutDir, chunk.fileName)), assetOutput)
|
||||
.replace(/\\/g, "/");
|
||||
this._pluginContext.stylesToEmit[assetId].output = path.relative(path.resolve(bundleOutDir), assetOutput);
|
||||
if (this.shouldAddPrefixCurrentDir(updatedImport) &&
|
||||
!updatedImport.startsWith("./") &&
|
||||
!updatedImport.startsWith("../") &&
|
||||
!updatedImport.match(/^[a-zA-Z]:/)) {
|
||||
updatedImport = "./" + updatedImport;
|
||||
}
|
||||
return updatedImport;
|
||||
};
|
||||
ImportUpdater.prototype.shouldAddPrefixCurrentDir = function (updatedImport) {
|
||||
var skip = this._outputOptions.skipCurrentFolderPart;
|
||||
return !skip || (skip instanceof RegExp && !skip.test(updatedImport));
|
||||
};
|
||||
ImportUpdater.prototype.resolveOutputPath = function (bundleOutDir, assetId, moduleRoot) {
|
||||
var _a = this._outputOptions, outputPath = _a.outputPath, outputDir = _a.outputDir, outputExt = _a.outputExt;
|
||||
var newPath = undefined;
|
||||
if (typeof outputPath === "function") {
|
||||
newPath = outputPath(assetId);
|
||||
assertLocation(bundleOutDir, newPath);
|
||||
}
|
||||
else if (typeof outputPath === "string") {
|
||||
newPath = path.resolve(bundleOutDir, outputDir, outputPath !== "keep" ? outputPath : path.relative(moduleRoot, assetId));
|
||||
assertLocation(bundleOutDir, newPath);
|
||||
}
|
||||
else {
|
||||
throw new Error(createErrorMessage("Invalid outputPath option value!"));
|
||||
}
|
||||
return newPath.replace(/\.s[ca]ss$/, outputExt);
|
||||
};
|
||||
return ImportUpdater;
|
||||
}());
|
||||
|
||||
var ensureStylesInfo = function (stylesMap, importer, resolvedId) {
|
||||
stylesMap[resolvedId] = stylesMap[resolvedId] || { importers: [], watchList: [] };
|
||||
stylesMap[resolvedId].importers.push(importer);
|
||||
return stylesMap[resolvedId];
|
||||
};
|
||||
var ensureCodeAndWatchList = function (filePath, stylesInfo, isWatch, compilerOptions) {
|
||||
return __awaiter(void 0, void 0, void 0, function () {
|
||||
var outWatchList, _a, _b, css, map;
|
||||
return __generator(this, function (_c) {
|
||||
switch (_c.label) {
|
||||
case 0:
|
||||
outWatchList = [];
|
||||
if (!filePath.endsWith(".css")) return [3 /*break*/, 2];
|
||||
_a = stylesInfo;
|
||||
return [4 /*yield*/, readFile(filePath, "utf8")];
|
||||
case 1:
|
||||
_a.css = _c.sent();
|
||||
return [3 /*break*/, 4];
|
||||
case 2: return [4 /*yield*/, compileSass(filePath, isWatch ? outWatchList : undefined, compilerOptions)];
|
||||
case 3:
|
||||
_b = _c.sent(), css = _b.css, map = _b.map;
|
||||
stylesInfo.css = css;
|
||||
stylesInfo.map = map;
|
||||
_c.label = 4;
|
||||
case 4:
|
||||
outWatchList.push(filePath);
|
||||
stylesInfo.watchList = outWatchList.map(function (watchFile) { return path.resolve(watchFile.replace(FILE_URL_PREFIX, "")); });
|
||||
return [2 /*return*/];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
function keepCssImports(_a) {
|
||||
if (_a === void 0) { _a = {}; }
|
||||
var _b = _a.outputExt, outputExt = _b === void 0 ? ".css" : _b, _c = _a.outputPath, outputPath = _c === void 0 ? "keep" : _c, _d = _a.skipCurrentFolderPart, skipCurrentFolderPart = _d === void 0 ? false : _d, _e = _a.includeRegexp, includeRegexp = _e === void 0 ? /\.(?:s[ca]|c)ss$/ : _e, sass = _a.sass, postProcessor = _a.postProcessor, sassOptions = _a.sassOptions, options = __rest(_a, ["outputExt", "outputPath", "skipCurrentFolderPart", "includeRegexp", "sass", "postProcessor", "sassOptions"]);
|
||||
var stylesOutputOptions = {
|
||||
outputPath: outputPath,
|
||||
outputExt: outputExt,
|
||||
outputDir: options.outputDir ? path.resolve(options.outputDir) : "./",
|
||||
skipCurrentFolderPart: skipCurrentFolderPart,
|
||||
};
|
||||
var context = {
|
||||
allStyleImports: [],
|
||||
modulesWithCss: new Set(),
|
||||
stylesToEmit: {},
|
||||
};
|
||||
var importUpdater = new ImportUpdater(context, stylesOutputOptions);
|
||||
var loadPaths = options.includePaths || ["node_modules/"];
|
||||
loadPaths.push(process.cwd());
|
||||
loadPaths = loadPaths.filter(function (v, i, a) { return a.indexOf(v) === i; });
|
||||
var compilerOptions = {
|
||||
outputExt: outputExt,
|
||||
sass: sass,
|
||||
postProcessor: typeof postProcessor === "function"
|
||||
? function (css, map) { return postProcessor(css, map, context.stylesToEmit); }
|
||||
: undefined,
|
||||
loadPaths: loadPaths,
|
||||
sourceMap: !!options.sourceMap,
|
||||
sassOptions: sassOptions,
|
||||
};
|
||||
return {
|
||||
name: PLUGIN_NAME,
|
||||
resolveId: function (source, importer, resolveOptions) {
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var _a, custom, _b, _c, _d, _e, _f, alreadyResolving, resolved, styleInfo;
|
||||
var _g, _h;
|
||||
var _this = this;
|
||||
return __generator(this, function (_j) {
|
||||
switch (_j.label) {
|
||||
case 0:
|
||||
if (!importer || !includeRegexp.test(source) || /\0/.test(source)) {
|
||||
return [2 /*return*/, null];
|
||||
}
|
||||
_a = resolveOptions.custom, custom = _a === void 0 ? {} : _a;
|
||||
_b = custom, _c = PLUGIN_NAME, _d = _b[_c], _e = _d === void 0 ? {} : _d, _f = _e.resolving, alreadyResolving = _f === void 0 ? false : _f;
|
||||
if (alreadyResolving) {
|
||||
return [2 /*return*/, null];
|
||||
}
|
||||
return [4 /*yield*/, this.resolve(source, importer, __assign(__assign({ skipSelf: true }, resolveOptions), { custom: __assign(__assign({}, custom), (_g = {}, _g[PLUGIN_NAME] = __assign(__assign({}, custom[PLUGIN_NAME]), { resolving: true }), _g)) }))];
|
||||
case 1:
|
||||
resolved = _j.sent();
|
||||
if (!resolved || resolved.external) {
|
||||
return [2 /*return*/, resolved];
|
||||
}
|
||||
context.modulesWithCss.add(importer);
|
||||
styleInfo = ensureStylesInfo(context.stylesToEmit, importer, resolved.id);
|
||||
return [4 /*yield*/, ensureCodeAndWatchList(resolved.id, styleInfo, this.meta.watchMode, compilerOptions)];
|
||||
case 2:
|
||||
_j.sent();
|
||||
styleInfo.watchList.forEach(function (watchFile) {
|
||||
_this.addWatchFile(watchFile);
|
||||
});
|
||||
return [2 /*return*/, {
|
||||
id: importUpdater.getMagicId(resolved.id),
|
||||
meta: (_h = {}, _h[PLUGIN_NAME] = { sourceId: resolved.id }, _h),
|
||||
external: true,
|
||||
}];
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
buildStart: function () {
|
||||
var _this = this;
|
||||
// Every rebuild will refresh watcher, so we need to reattach
|
||||
if (this.meta.watchMode) {
|
||||
var allWatched_1 = this.getWatchFiles();
|
||||
Object.values(context.stylesToEmit).forEach(function (styleInfo) {
|
||||
return styleInfo.watchList.forEach(function (watchFile) {
|
||||
if (!allWatched_1.find(function (watched) { return path.normalize(watched) === path.normalize(watchFile); })) {
|
||||
_this.addWatchFile(watchFile);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
},
|
||||
watchChange: function (id) {
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var resolvedId, filesToUpdate;
|
||||
var _this = this;
|
||||
return __generator(this, function (_a) {
|
||||
switch (_a.label) {
|
||||
case 0:
|
||||
resolvedId = path.resolve(id);
|
||||
filesToUpdate = Object.entries(context.stylesToEmit).filter(function (_a) {
|
||||
var styleInfo = _a[1];
|
||||
return styleInfo.watchList.includes(resolvedId);
|
||||
});
|
||||
return [4 /*yield*/, Promise.all(filesToUpdate.map(function (_a) {
|
||||
var fileName = _a[0], styleInfo = _a[1];
|
||||
return ensureCodeAndWatchList(fileName, styleInfo, _this.meta.watchMode, compilerOptions);
|
||||
}))];
|
||||
case 1:
|
||||
_a.sent();
|
||||
return [2 /*return*/];
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
renderChunk: function (code, chunk, outputOptions) {
|
||||
var bundleOutDir = path.resolve(outputOptions.dir || path.dirname(outputOptions.file));
|
||||
if (code && chunk.modules && Object.keys(chunk.modules).some(function (m) { return context.modulesWithCss.has(m); })) {
|
||||
var moduleRoot = outputOptions.preserveModulesRoot || process.cwd();
|
||||
return importUpdater.updateImports(code, chunk, bundleOutDir, moduleRoot);
|
||||
}
|
||||
return null;
|
||||
},
|
||||
generateBundle: function (_, __, isWrite) {
|
||||
if (!isWrite) {
|
||||
return;
|
||||
}
|
||||
assertDuplicates(context.stylesToEmit);
|
||||
for (var file in context.stylesToEmit) {
|
||||
var stylesInfo = context.stylesToEmit[file];
|
||||
var fileName = stylesInfo.output;
|
||||
var source = file.endsWith(".css")
|
||||
? stylesInfo.css
|
||||
: ensureSourceMap(stylesInfo, options.sourceMap || (sassOptions === null || sassOptions === void 0 ? void 0 : sassOptions.sourceMap), fileName, this.emitFile);
|
||||
this.emitFile({
|
||||
type: "asset",
|
||||
fileName: fileName,
|
||||
source: source,
|
||||
});
|
||||
}
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
export { keepCssImports as default };
|
||||
110
build/esm/rollup-plugin-keep-css-imports/dist/types.d.ts
vendored
Normal file
110
build/esm/rollup-plugin-keep-css-imports/dist/types.d.ts
vendored
Normal file
|
|
@ -0,0 +1,110 @@
|
|||
import { type CompilationOptions, PostCssCompatible } from "./compileSass";
|
||||
import type { Options as SassOptions } from "sass";
|
||||
export type KeepCssImportsOptions = OutputOptions & InputOptions & Extensions;
|
||||
export type StyleRefInfo = {
|
||||
/**
|
||||
* Collection of files with reference to the current file
|
||||
*/
|
||||
importers: string[];
|
||||
/**
|
||||
* List of files which are used to render the current file
|
||||
*/
|
||||
watchList: string[];
|
||||
/**
|
||||
* Emit path
|
||||
*/
|
||||
output?: string;
|
||||
/**
|
||||
* Processed CSS content to emit
|
||||
*/
|
||||
css?: string | Uint8Array;
|
||||
/**
|
||||
* Processed CSS content map to emit
|
||||
*/
|
||||
map?: string | Uint8Array;
|
||||
};
|
||||
export type StylesMap = Record<string, StyleRefInfo>;
|
||||
interface Extensions {
|
||||
/**
|
||||
* Customised SASS (SCSS) processor. If not provided plugin will try to
|
||||
* import locally installed `sass` if required
|
||||
*/
|
||||
sass?: CompilationOptions["sass"];
|
||||
/**
|
||||
* An optional object that allows to provide additional options for the
|
||||
* SASS compiler.
|
||||
*/
|
||||
sassOptions?: SassOptions<"async">;
|
||||
/**
|
||||
* Specifies the list of include paths for SASS to search when resolving imports.
|
||||
*
|
||||
* Default: `["node_modules/"]`
|
||||
*/
|
||||
includePaths?: string[];
|
||||
/**
|
||||
* An optional function that allows you to perform additional processing on the
|
||||
* generated CSS, such as applying PostCSS plugins.
|
||||
*/
|
||||
postProcessor?: (css: string, map: string, stylesMap: StylesMap) => Promise<PostCssCompatible | string | {
|
||||
css: string;
|
||||
map?: string;
|
||||
}>;
|
||||
}
|
||||
type OutputPath = string | "keep" | ((assetId: string) => string);
|
||||
export interface OutputOptions {
|
||||
/**
|
||||
* Specifies the file extension for the output CSS files.
|
||||
*
|
||||
* Default: `".css"`
|
||||
*/
|
||||
outputExt?: string;
|
||||
/**
|
||||
* Specifies the output directory for the generated CSS files.
|
||||
* Relative to Rollup output folder.
|
||||
*
|
||||
* Default: `"./"`
|
||||
*/
|
||||
outputDir?: string;
|
||||
/**
|
||||
* Specifies the output path relative to `outputDir` for the generated CSS
|
||||
* files.
|
||||
* The default value, "keep", preserves the original file paths. It is also
|
||||
* possible to provide a custom function to generate output paths based on
|
||||
* the input file.
|
||||
*
|
||||
* Default: `"keep"`
|
||||
*/
|
||||
outputPath?: OutputPath;
|
||||
/**
|
||||
* Specifies whether to generate source maps for the compiled CSS.
|
||||
* Use `"inline"` to inline source maps into CSS files.
|
||||
*
|
||||
* Default: `false`
|
||||
*/
|
||||
sourceMap?: boolean | "inline";
|
||||
/**
|
||||
* By default CSS paths will be prefixed with current folder mark `./`.
|
||||
* To avoid this for CSS files use `true` or specify RegExp filter.
|
||||
*
|
||||
* If RegExp filter matches `./` won't be added to the path.
|
||||
* This option may be helpful if you have some issues with external
|
||||
* modules imports from `node_modules`
|
||||
*
|
||||
* Default: `false`
|
||||
*/
|
||||
skipCurrentFolderPart?: boolean | RegExp;
|
||||
}
|
||||
interface InputOptions {
|
||||
/**
|
||||
* Regular expression to test if an import should be processed by this plugin
|
||||
*
|
||||
* Default: `/\.(?:s[ca]|c)ss$/`
|
||||
*/
|
||||
includeRegexp?: RegExp;
|
||||
}
|
||||
export interface KeepCssImportsPluginContext {
|
||||
allStyleImports: string[];
|
||||
modulesWithCss: Set<string>;
|
||||
stylesToEmit: StylesMap;
|
||||
}
|
||||
export {};
|
||||
74
build/esm/rollup-plugin-keep-css-imports/package.json
Normal file
74
build/esm/rollup-plugin-keep-css-imports/package.json
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
{
|
||||
"name": "rollup-plugin-keep-css-imports",
|
||||
"version": "1.0.0",
|
||||
"description": "Rollup plugin that allows to maintain the original structure of style imports without altering them during the bundling process",
|
||||
"main": "dist/index.cjs",
|
||||
"module": "dist/index.mjs",
|
||||
"types": "dist/index.d.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"import": {
|
||||
"types": "./dist/index.d.ts",
|
||||
"default": "./dist/index.mjs"
|
||||
},
|
||||
"require": {
|
||||
"types": "./dist/index.d.ts",
|
||||
"default": "./dist/index.cjs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"files": [
|
||||
"dist",
|
||||
"README.md",
|
||||
"LICENSE"
|
||||
],
|
||||
"keywords": [
|
||||
"rollup",
|
||||
"rollup-plugin",
|
||||
"css-modules",
|
||||
"sass",
|
||||
"scss",
|
||||
"keep",
|
||||
"preserve",
|
||||
"imports"
|
||||
],
|
||||
"homepage": "https://github.com/SLTKA/rollup-plugin-keep-css-imports",
|
||||
"author": "Alexandr Yeskov",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/SLTKA/rollup-plugin-keep-css-imports"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/SLTKA/rollup-plugin-keep-css-imports/issues"
|
||||
},
|
||||
"scripts": {
|
||||
"prebuild": "rimraf -rf dist/",
|
||||
"build": "rollup -c",
|
||||
"test": "mocha",
|
||||
"pretest": "yarn build"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@rollup/plugin-typescript": "^11.1.6",
|
||||
"@types/mocha": "^10.0.6",
|
||||
"@types/node": "^20.11.24",
|
||||
"@typescript-eslint/eslint-plugin": "^7.1.1",
|
||||
"@typescript-eslint/parser": "^7.1.1",
|
||||
"eslint": "^8.57.0",
|
||||
"eslint-config-prettier": "^9.1.0",
|
||||
"eslint-plugin-mocha": "^10.2.0",
|
||||
"eslint-plugin-prettier": "^5.1.3",
|
||||
"mocha": "^10.2.0",
|
||||
"prettier": "^3.2.4",
|
||||
"rimraf": "^5.0.5",
|
||||
"rollup": "^4.9.5",
|
||||
"rollup-plugin-dts": "^6.1.0",
|
||||
"sass": "^1.70.0",
|
||||
"ts-node": "^10.9.2",
|
||||
"typescript": "^5.3.3",
|
||||
"typescript-eslint": "^7.1.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"magic-string": "^0.30.5"
|
||||
}
|
||||
}
|
||||
47
build/esm/rollup-types.config.mjs
Normal file
47
build/esm/rollup-types.config.mjs
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
// @ts-check
|
||||
|
||||
import nodeResolve from '@rollup/plugin-node-resolve';
|
||||
import { join } from 'path';
|
||||
import { defineConfig } from 'rollup';
|
||||
import { dts } from "rollup-plugin-dts";
|
||||
import { dtsDeprecationWarning, mapModuleId } from '../shared.mjs';
|
||||
|
||||
const root = join(import.meta.dirname, '../../');
|
||||
|
||||
export default defineConfig({
|
||||
input: {
|
||||
entry: join(root, './src/editor/editor.main.ts'),
|
||||
editorApi: join(root, './src/editor/editor.api.ts'),
|
||||
},
|
||||
output: {
|
||||
dir: join(root, './out/monaco-editor/esm'),
|
||||
format: 'es',
|
||||
preserveModules: false,
|
||||
entryFileNames: function (chunkInfo) {
|
||||
const moduleId = chunkInfo.facadeModuleId;
|
||||
if (moduleId) {
|
||||
const m = mapModuleId(moduleId, '.d.ts');
|
||||
if (m !== undefined) {
|
||||
return m;
|
||||
}
|
||||
}
|
||||
return '[name].d.ts';
|
||||
},
|
||||
},
|
||||
external: [/.*\.css/],
|
||||
plugins: [
|
||||
nodeResolve(),
|
||||
dts({
|
||||
compilerOptions: {
|
||||
stripInternal: true,
|
||||
},
|
||||
includeExternal: ['monaco-editor-core', '@vscode/monaco-lsp-client']
|
||||
}),
|
||||
dtsDeprecationWarning(f => f.endsWith('editor.api.d.ts')),
|
||||
],
|
||||
});
|
||||
63
build/esm/rollup-url-to-module-plugin/index.mjs
Normal file
63
build/esm/rollup-url-to-module-plugin/index.mjs
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* @type {() => import('rollup').Plugin}
|
||||
*/
|
||||
export function urlToEsmPlugin() {
|
||||
return {
|
||||
name: 'import-meta-url',
|
||||
async transform(code, id) {
|
||||
if (this.environment?.mode === 'dev') {
|
||||
return;
|
||||
}
|
||||
|
||||
// Look for `new URL(..., import.meta.url)` patterns.
|
||||
const regex = /new\s+URL\s*\(\s*(['"`])(.*?)\1\s*,\s*import\.meta\.url\s*\)?/g;
|
||||
|
||||
let match;
|
||||
let modified = false;
|
||||
let result = code;
|
||||
let offset = 0;
|
||||
|
||||
while ((match = regex.exec(code)) !== null) {
|
||||
let path = match[2];
|
||||
|
||||
if (!path.startsWith('.') && !path.startsWith('/')) {
|
||||
path = `./${path}`;
|
||||
}
|
||||
const resolved = await this.resolve(path, id);
|
||||
|
||||
if (!resolved) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Add the file as an entry point
|
||||
const refId = this.emitFile({
|
||||
type: 'chunk',
|
||||
id: resolved.id,
|
||||
});
|
||||
|
||||
const start = match.index;
|
||||
const end = start + match[0].length;
|
||||
|
||||
const replacement = `import.meta.ROLLUP_FILE_URL_OBJ_${refId}`;
|
||||
|
||||
result = result.slice(0, start + offset) + replacement + result.slice(end + offset);
|
||||
offset += replacement.length - (end - start);
|
||||
modified = true;
|
||||
}
|
||||
|
||||
if (!modified) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return {
|
||||
code: result,
|
||||
map: null
|
||||
};
|
||||
}
|
||||
};
|
||||
}
|
||||
86
build/esm/rollup.config.mjs
Normal file
86
build/esm/rollup.config.mjs
Normal file
|
|
@ -0,0 +1,86 @@
|
|||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
// @ts-check
|
||||
|
||||
import { join, relative } from 'path';
|
||||
import { defineConfig } from 'rollup';
|
||||
import esbuild from 'rollup-plugin-esbuild';
|
||||
//import { urlToEsmPlugin } from '../rollup-url-to-module-plugin/index.mjs';
|
||||
import del from 'rollup-plugin-delete';
|
||||
import keepCssImports from './rollup-plugin-keep-css-imports/dist/index.mjs';
|
||||
import nodeResolve from '@rollup/plugin-node-resolve';
|
||||
import { urlToEsmPlugin } from './rollup-url-to-module-plugin/index.mjs';
|
||||
import { getNlsEntryPoints, mapModuleId } from '../shared.mjs';
|
||||
import { readFileSync } from 'fs';
|
||||
|
||||
|
||||
const root = join(import.meta.dirname, '../../');
|
||||
const outDir = join(root, './out/monaco-editor/esm');
|
||||
|
||||
export default defineConfig({
|
||||
input: {
|
||||
entry: join(root, './src/editor/editor.main.ts'),
|
||||
editorAll: join(root, './src/editor/editor.all.ts'),
|
||||
edcoreMain: join(root, './src/editor/edcore.main.ts'),
|
||||
editorApi: join(root, './src/editor/editor.api.ts'),
|
||||
editorWorker: join(root, './src/editor/editor.worker.ts'),
|
||||
...getNlsEntryPoints(),
|
||||
},
|
||||
|
||||
output: {
|
||||
dir: outDir,
|
||||
format: 'es',
|
||||
|
||||
entryFileNames: function (chunkInfo) {
|
||||
const moduleId = chunkInfo.facadeModuleId;
|
||||
if (moduleId) {
|
||||
const r = mapModuleId(moduleId, '.js');
|
||||
if (r !== undefined) {
|
||||
return r;
|
||||
}
|
||||
}
|
||||
return '[name].js';
|
||||
},
|
||||
preserveModules: true,
|
||||
},
|
||||
|
||||
|
||||
plugins: [
|
||||
del({ targets: outDir, force: true }),
|
||||
|
||||
{
|
||||
name: 'copy-codicon-font',
|
||||
generateBundle() {
|
||||
this.emitFile({
|
||||
type: 'asset',
|
||||
fileName: 'vs/base/browser/ui/codicons/codicon/codicon.ttf',
|
||||
source: readFileSync(join(root, 'node_modules/monaco-editor-core/esm/vs/base/browser/ui/codicons/codicon/codicon.ttf'))
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
urlToEsmPlugin(),
|
||||
esbuild(),
|
||||
|
||||
keepCssImports({
|
||||
/**
|
||||
* @param {string} assetId
|
||||
*/
|
||||
outputPath: (assetId) => {
|
||||
const r = mapModuleId(assetId, '.css');
|
||||
if (r !== undefined) {
|
||||
return join(outDir, r);
|
||||
}
|
||||
const relativePath = join(outDir, relative(root, assetId));
|
||||
return relativePath.replace(/(\.s[ca]ss)$/, ".min$1")
|
||||
},
|
||||
}),
|
||||
nodeResolve({
|
||||
dedupe: ['monaco-editor-core', '@vscode/monaco-lsp-client'],
|
||||
browser: true,
|
||||
}),
|
||||
],
|
||||
});
|
||||
67
build/fs.ts
Normal file
67
build/fs.ts
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as fs from 'fs';
|
||||
import * as path from 'path';
|
||||
|
||||
const REPO_ROOT = path.join(__dirname, '../');
|
||||
|
||||
const existingDirCache = new Set();
|
||||
|
||||
export function ensureDir(dirname: string) {
|
||||
/** @type {string[]} */
|
||||
const dirs = [];
|
||||
|
||||
while (dirname.length > REPO_ROOT.length) {
|
||||
dirs.push(dirname);
|
||||
dirname = path.dirname(dirname);
|
||||
}
|
||||
dirs.reverse();
|
||||
dirs.forEach((dir) => {
|
||||
if (!existingDirCache.has(dir)) {
|
||||
try {
|
||||
fs.mkdirSync(dir);
|
||||
} catch (err) { }
|
||||
existingDirCache.add(dir);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove a directory and all its contents.
|
||||
*/
|
||||
export function removeDir(_dirPath: string, keep?: (filename: string) => boolean) {
|
||||
if (typeof keep === 'undefined') {
|
||||
keep = () => false;
|
||||
}
|
||||
const dirPath = path.join(REPO_ROOT, _dirPath);
|
||||
if (!fs.existsSync(dirPath)) {
|
||||
return;
|
||||
}
|
||||
rmDir(dirPath, _dirPath);
|
||||
console.log(`Deleted ${_dirPath}`);
|
||||
|
||||
function rmDir(dirPath: string, relativeDirPath: string): boolean {
|
||||
let keepsFiles = false;
|
||||
const entries = fs.readdirSync(dirPath);
|
||||
for (const entry of entries) {
|
||||
const filePath = path.join(dirPath, entry);
|
||||
const relativeFilePath = path.join(relativeDirPath, entry);
|
||||
if (keep!(relativeFilePath)) {
|
||||
keepsFiles = true;
|
||||
continue;
|
||||
}
|
||||
if (fs.statSync(filePath).isFile()) {
|
||||
fs.unlinkSync(filePath);
|
||||
} else {
|
||||
keepsFiles = rmDir(filePath, relativeFilePath) || keepsFiles;
|
||||
}
|
||||
}
|
||||
if (!keepsFiles) {
|
||||
fs.rmdirSync(dirPath);
|
||||
}
|
||||
return keepsFiles;
|
||||
}
|
||||
}
|
||||
192
build/importTypescript.ts
Normal file
192
build/importTypescript.ts
Normal file
|
|
@ -0,0 +1,192 @@
|
|||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import path = require('path');
|
||||
import fs = require('fs');
|
||||
import child_process = require('child_process');
|
||||
import { REPO_ROOT } from './utils';
|
||||
|
||||
const generatedNote = `//
|
||||
// **NOTE**: Do not edit directly! This file is generated using \`npm run import-typescript\`
|
||||
//
|
||||
`;
|
||||
|
||||
const TYPESCRIPT_LIB_SOURCE = path.join(REPO_ROOT, 'node_modules/typescript/lib');
|
||||
const TYPESCRIPT_LIB_DESTINATION = path.join(REPO_ROOT, 'src/language/typescript/lib');
|
||||
|
||||
(function () {
|
||||
try {
|
||||
fs.statSync(TYPESCRIPT_LIB_DESTINATION);
|
||||
} catch (err) {
|
||||
fs.mkdirSync(TYPESCRIPT_LIB_DESTINATION);
|
||||
}
|
||||
importLibs();
|
||||
|
||||
const npmLsOutput = JSON.parse(
|
||||
child_process.execSync('npm ls typescript --depth=0 --json=true', { cwd: REPO_ROOT }).toString()
|
||||
);
|
||||
const typeScriptDependencyVersion = npmLsOutput.dependencies.typescript.version;
|
||||
|
||||
fs.writeFileSync(
|
||||
path.join(TYPESCRIPT_LIB_DESTINATION, 'typescriptServicesMetadata.ts'),
|
||||
`${generatedNote}
|
||||
export const typescriptVersion = "${typeScriptDependencyVersion}";\n`
|
||||
);
|
||||
|
||||
let tsServices = fs.readFileSync(path.join(TYPESCRIPT_LIB_SOURCE, 'typescript.js')).toString();
|
||||
|
||||
tsServices = tsServices
|
||||
.replace(
|
||||
'const path = matchedStar ? subst.replace("*", matchedStar) : subst;',
|
||||
'const path = matchedStar ? subst.replace("*", matchedStar) : subst; // CodeQL [SM02383] This is a false positive, the code is from the TypeScript compiler'
|
||||
)
|
||||
.replace(
|
||||
'return key.replace("*", matchedStar);',
|
||||
'return key.replace("*", matchedStar); // CodeQL [SM02383] This is a false positive, the code is from the TypeScript compiler'
|
||||
);
|
||||
|
||||
// The output from this build will only be accessible via ESM; rather than removing
|
||||
// references to require/module, define them as dummy variables that bundlers will ignore.
|
||||
// The TS code can figure out that it's not running under Node even with these defined.
|
||||
tsServices =
|
||||
`
|
||||
/* MONACOCHANGE */
|
||||
var require = undefined;
|
||||
var module = { exports: {} };
|
||||
/* END MONACOCHANGE */
|
||||
` + tsServices;
|
||||
|
||||
const tsServices_esm =
|
||||
generatedNote +
|
||||
tsServices +
|
||||
`
|
||||
// MONACOCHANGE
|
||||
export var createClassifier = ts.createClassifier;
|
||||
export var createLanguageService = ts.createLanguageService;
|
||||
export var displayPartsToString = ts.displayPartsToString;
|
||||
export var EndOfLineState = ts.EndOfLineState;
|
||||
export var flattenDiagnosticMessageText = ts.flattenDiagnosticMessageText;
|
||||
export var IndentStyle = ts.IndentStyle;
|
||||
export var ScriptKind = ts.ScriptKind;
|
||||
export var ScriptTarget = ts.ScriptTarget;
|
||||
export var TokenClass = ts.TokenClass;
|
||||
export var typescript = ts;
|
||||
// END MONACOCHANGE
|
||||
`;
|
||||
fs.writeFileSync(
|
||||
path.join(TYPESCRIPT_LIB_DESTINATION, 'typescriptServices.js'),
|
||||
stripSourceMaps(tsServices_esm)
|
||||
);
|
||||
|
||||
let dtsServices = fs.readFileSync(path.join(TYPESCRIPT_LIB_SOURCE, 'typescript.d.ts')).toString();
|
||||
|
||||
fs.writeFileSync(
|
||||
path.join(TYPESCRIPT_LIB_DESTINATION, 'typescriptServices.d.ts'),
|
||||
generatedNote + dtsServices
|
||||
);
|
||||
})();
|
||||
|
||||
function importLibs() {
|
||||
function readLibFile(name) {
|
||||
const srcPath = path.join(TYPESCRIPT_LIB_SOURCE, name);
|
||||
return fs.readFileSync(srcPath).toString();
|
||||
}
|
||||
|
||||
let strLibResult = `/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
${generatedNote}
|
||||
|
||||
/** Contains all the lib files */
|
||||
export const libFileMap: Record<string, string> = {}
|
||||
`;
|
||||
let strIndexResult = `/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
${generatedNote}
|
||||
|
||||
/** Contains all the lib files */
|
||||
export const libFileSet: Record<string, boolean> = {}
|
||||
`;
|
||||
const dtsFiles = fs.readdirSync(TYPESCRIPT_LIB_SOURCE).filter((f) => f.includes('lib.'));
|
||||
while (dtsFiles.length > 0) {
|
||||
const name = dtsFiles.shift();
|
||||
const output = readLibFile(name).replace(/\r\n/g, '\n');
|
||||
strLibResult += `libFileMap['${name}'] = "${escapeText(output)}";\n`;
|
||||
strIndexResult += `libFileSet['${name}'] = true;\n`;
|
||||
}
|
||||
|
||||
fs.writeFileSync(path.join(TYPESCRIPT_LIB_DESTINATION, 'lib.ts'), strLibResult);
|
||||
fs.writeFileSync(path.join(TYPESCRIPT_LIB_DESTINATION, 'lib.index.ts'), strIndexResult);
|
||||
}
|
||||
|
||||
/**
|
||||
* Escape text such that it can be used in a javascript string enclosed by double quotes (")
|
||||
*/
|
||||
function escapeText(text) {
|
||||
// See http://www.javascriptkit.com/jsref/escapesequence.shtml
|
||||
const _backspace = '\b'.charCodeAt(0);
|
||||
const _formFeed = '\f'.charCodeAt(0);
|
||||
const _newLine = '\n'.charCodeAt(0);
|
||||
const _nullChar = 0;
|
||||
const _carriageReturn = '\r'.charCodeAt(0);
|
||||
const _tab = '\t'.charCodeAt(0);
|
||||
const _verticalTab = '\v'.charCodeAt(0);
|
||||
const _backslash = '\\'.charCodeAt(0);
|
||||
const _doubleQuote = '"'.charCodeAt(0);
|
||||
|
||||
const len = text.length;
|
||||
let startPos = 0;
|
||||
let chrCode;
|
||||
let replaceWith = null;
|
||||
let resultPieces = [];
|
||||
|
||||
for (let i = 0; i < len; i++) {
|
||||
chrCode = text.charCodeAt(i);
|
||||
switch (chrCode) {
|
||||
case _backspace:
|
||||
replaceWith = '\\b';
|
||||
break;
|
||||
case _formFeed:
|
||||
replaceWith = '\\f';
|
||||
break;
|
||||
case _newLine:
|
||||
replaceWith = '\\n';
|
||||
break;
|
||||
case _nullChar:
|
||||
replaceWith = '\\0';
|
||||
break;
|
||||
case _carriageReturn:
|
||||
replaceWith = '\\r';
|
||||
break;
|
||||
case _tab:
|
||||
replaceWith = '\\t';
|
||||
break;
|
||||
case _verticalTab:
|
||||
replaceWith = '\\v';
|
||||
break;
|
||||
case _backslash:
|
||||
replaceWith = '\\\\';
|
||||
break;
|
||||
case _doubleQuote:
|
||||
replaceWith = '\\"';
|
||||
break;
|
||||
}
|
||||
if (replaceWith !== null) {
|
||||
resultPieces.push(text.substring(startPos, i));
|
||||
resultPieces.push(replaceWith);
|
||||
startPos = i + 1;
|
||||
replaceWith = null;
|
||||
}
|
||||
}
|
||||
resultPieces.push(text.substring(startPos, len));
|
||||
return resultPieces.join('');
|
||||
}
|
||||
|
||||
function stripSourceMaps(str) {
|
||||
return str.replace(/\/\/# sourceMappingURL[^\n]+/gm, '');
|
||||
}
|
||||
44
build/npm/installAll.ts
Normal file
44
build/npm/installAll.ts
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import glob = require('glob');
|
||||
import path = require('path');
|
||||
import fs = require('fs');
|
||||
import cp = require('child_process');
|
||||
const npm = process.platform === 'win32' ? 'npm.cmd' : 'npm';
|
||||
import { REPO_ROOT } from '../utils';
|
||||
|
||||
const files = glob.sync('**/package.json', {
|
||||
cwd: REPO_ROOT,
|
||||
ignore: ['**/node_modules/**', '**/dist/**', '**/out/**']
|
||||
});
|
||||
|
||||
for (const file of files) {
|
||||
const filePath = path.join(REPO_ROOT, file);
|
||||
const contents = JSON.parse(fs.readFileSync(filePath).toString());
|
||||
if (!contents.dependencies && !contents.devDependencies && !contents.optionalDependencies) {
|
||||
// nothing to install
|
||||
continue;
|
||||
}
|
||||
|
||||
npmInstall(path.dirname(file));
|
||||
}
|
||||
|
||||
function npmInstall(location) {
|
||||
const stdio = 'inherit';
|
||||
const args = ['install'];
|
||||
|
||||
console.log(`Installing dependencies in ${location}...`);
|
||||
console.log(`$ npm ${args.join(' ')}`);
|
||||
const result = cp.spawnSync(npm, args, {
|
||||
env: process.env,
|
||||
cwd: location,
|
||||
stdio
|
||||
});
|
||||
|
||||
if (result.error || result.status !== 0) {
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
20
build/npm/removeAll.ts
Normal file
20
build/npm/removeAll.ts
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import glob from 'glob';
|
||||
import path from 'path';
|
||||
import fs from 'fs';
|
||||
import { REPO_ROOT } from '../utils';
|
||||
|
||||
const files = glob.sync('**/package-lock.json', {
|
||||
cwd: REPO_ROOT,
|
||||
ignore: ['**/node_modules/**', '**/out/**']
|
||||
});
|
||||
|
||||
for (const file of files) {
|
||||
const filePath = path.join(REPO_ROOT, file);
|
||||
console.log(`Deleting ${file}...`);
|
||||
fs.unlinkSync(filePath);
|
||||
}
|
||||
23
build/postinstall.ts
Normal file
23
build/postinstall.ts
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import cp = require('child_process');
|
||||
import path = require('path');
|
||||
|
||||
function huskyInstall() {
|
||||
console.log(`Installing husky hooks...`);
|
||||
console.log(`$ husky install`);
|
||||
const result = cp.spawnSync(
|
||||
process.execPath,
|
||||
[path.join(__dirname, '../node_modules/husky/lib/bin.js'), 'install'],
|
||||
{ stdio: 'inherit' }
|
||||
);
|
||||
|
||||
if (result.error || result.status !== 0) {
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
huskyInstall();
|
||||
280
build/releaseMetadata.ts
Normal file
280
build/releaseMetadata.ts
Normal file
|
|
@ -0,0 +1,280 @@
|
|||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See LICENSE in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import glob = require('glob');
|
||||
import path = require('path');
|
||||
import fs = require('fs');
|
||||
import { REPO_ROOT } from './utils';
|
||||
import { ensureDir } from './fs';
|
||||
|
||||
const customFeatureLabels = {
|
||||
'vs/editor/browser/controller/coreCommands': 'coreCommands',
|
||||
'vs/editor/contrib/caretOperations/caretOperations': 'caretOperations',
|
||||
'vs/editor/contrib/caretOperations/transpose': 'transpose',
|
||||
'vs/editor/contrib/colorPicker/colorDetector': 'colorDetector',
|
||||
'vs/editor/contrib/rename/onTypeRename': 'onTypeRename',
|
||||
'vs/editor/contrib/gotoSymbol/link/goToDefinitionAtPosition': 'gotoSymbol',
|
||||
'vs/editor/contrib/snippet/snippetController2': 'snippets',
|
||||
'vs/editor/standalone/browser/quickAccess/standaloneGotoLineQuickAccess': 'gotoLine',
|
||||
'vs/editor/standalone/browser/quickAccess/standaloneCommandsQuickAccess': 'quickCommand',
|
||||
'vs/editor/standalone/browser/quickAccess/standaloneGotoSymbolQuickAccess': 'quickOutline',
|
||||
'vs/editor/standalone/browser/quickAccess/standaloneHelpQuickAccess': 'quickHelp'
|
||||
};
|
||||
|
||||
function getBasicLanguages(): Promise<{ label: string; entry: string }[]> {
|
||||
return new Promise((resolve, reject) => {
|
||||
glob(
|
||||
'./out/monaco-editor/esm/vs/basic-languages/*/*.contribution.js',
|
||||
{ cwd: path.dirname(__dirname) },
|
||||
(err, files) => {
|
||||
if (err) {
|
||||
reject(err);
|
||||
return;
|
||||
}
|
||||
|
||||
resolve(
|
||||
files.map((file) => {
|
||||
const entry = file.substring('./out/monaco-editor/esm/'.length).replace(/\.js$/, '');
|
||||
const label = path.basename(file).replace(/\.contribution\.js$/, '');
|
||||
return {
|
||||
label: label,
|
||||
entry: entry
|
||||
};
|
||||
})
|
||||
);
|
||||
}
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
function readAdvancedLanguages(): Promise<string[]> {
|
||||
return new Promise((resolve, reject) => {
|
||||
glob(
|
||||
'./out/monaco-editor/esm/vs/language/*/monaco.contribution.js',
|
||||
{ cwd: path.dirname(__dirname) },
|
||||
(err, files) => {
|
||||
if (err) {
|
||||
reject(err);
|
||||
return;
|
||||
}
|
||||
|
||||
resolve(
|
||||
files
|
||||
.map((file) => file.substring('./out/monaco-editor/esm/vs/language/'.length))
|
||||
.map((file) => file.substring(0, file.length - '/monaco.contribution.js'.length))
|
||||
);
|
||||
}
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
function getAdvancedLanguages(): Promise<
|
||||
{ label: string; entry: string; worker: { id: string; entry: string } }[]
|
||||
> {
|
||||
return readAdvancedLanguages().then((languages) => {
|
||||
let result = [];
|
||||
for (const lang of languages) {
|
||||
let shortLang = lang === 'typescript' ? 'ts' : lang;
|
||||
const entry = `vs/language/${lang}/monaco.contribution`;
|
||||
checkFileExists(entry);
|
||||
const workerId = `vs/language/${lang}/${shortLang}Worker`;
|
||||
const workerEntry = `vs/language/${lang}/${shortLang}.worker`;
|
||||
checkFileExists(workerEntry);
|
||||
result.push({
|
||||
label: lang,
|
||||
entry: entry,
|
||||
worker: {
|
||||
id: workerId,
|
||||
entry: workerEntry
|
||||
}
|
||||
});
|
||||
}
|
||||
return result;
|
||||
});
|
||||
|
||||
function checkFileExists(moduleName) {
|
||||
const filePath = path.join(REPO_ROOT, 'out/monaco-editor/esm', `${moduleName}.js`);
|
||||
if (!fs.existsSync(filePath)) {
|
||||
console.error(`Could not find ${filePath}.`);
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export function generateEsmMetadataJsAndDTs() {
|
||||
return Promise.all([getBasicLanguages(), getAdvancedLanguages()]).then(
|
||||
([basicLanguages, advancedLanguages]) => {
|
||||
basicLanguages.sort((a, b) => strcmp(a.entry, b.entry));
|
||||
advancedLanguages.sort((a, b) => strcmp(a.entry, b.entry));
|
||||
|
||||
let i = 0,
|
||||
len = basicLanguages.length;
|
||||
let j = 0,
|
||||
lenJ = advancedLanguages.length;
|
||||
let languages = [];
|
||||
while (i < len || j < lenJ) {
|
||||
if (i < len && j < lenJ) {
|
||||
if (basicLanguages[i].label === advancedLanguages[j].label) {
|
||||
let entry = [];
|
||||
entry.push(basicLanguages[i].entry);
|
||||
entry.push(advancedLanguages[j].entry);
|
||||
languages.push({
|
||||
label: basicLanguages[i].label,
|
||||
entry: entry,
|
||||
worker: advancedLanguages[j].worker
|
||||
});
|
||||
i++;
|
||||
j++;
|
||||
} else if (basicLanguages[i].label < advancedLanguages[j].label) {
|
||||
languages.push(basicLanguages[i]);
|
||||
i++;
|
||||
} else {
|
||||
languages.push(advancedLanguages[j]);
|
||||
j++;
|
||||
}
|
||||
} else if (i < len) {
|
||||
languages.push(basicLanguages[i]);
|
||||
i++;
|
||||
} else {
|
||||
languages.push(advancedLanguages[j]);
|
||||
j++;
|
||||
}
|
||||
}
|
||||
|
||||
const features = getFeatures();
|
||||
|
||||
const dtsContents = `
|
||||
/*!----------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Released under the MIT license
|
||||
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
||||
*----------------------------------------------------------------*/
|
||||
|
||||
export interface IWorkerDefinition {
|
||||
id: string;
|
||||
entry: string;
|
||||
}
|
||||
|
||||
export interface IFeatureDefinition {
|
||||
label: string;
|
||||
entry: string | string[] | undefined;
|
||||
worker?: IWorkerDefinition;
|
||||
}
|
||||
|
||||
export const features: IFeatureDefinition[];
|
||||
|
||||
export const languages: IFeatureDefinition[];
|
||||
|
||||
export type EditorLanguage = ${languages.map((el) => `'${el.label}'`).join(' | ')};
|
||||
|
||||
export type EditorFeature = ${features.map((el) => `'${el.label}'`).join(' | ')};
|
||||
|
||||
export type NegatedEditorFeature = ${features.map((el) => `'!${el.label}'`).join(' | ')};
|
||||
|
||||
`;
|
||||
const dtsDestination = path.join(REPO_ROOT, 'out/monaco-editor/esm/metadata.d.ts');
|
||||
ensureDir(path.dirname(dtsDestination));
|
||||
fs.writeFileSync(dtsDestination, dtsContents.replace(/\r\n/g, '\n'));
|
||||
|
||||
const jsContents = `
|
||||
exports.features = ${JSON.stringify(features, null, ' ')};
|
||||
exports.languages = ${JSON.stringify(languages, null, ' ')};
|
||||
`;
|
||||
const jsDestination = path.join(REPO_ROOT, 'out/monaco-editor/esm/metadata.js');
|
||||
ensureDir(path.dirname(jsDestination));
|
||||
fs.writeFileSync(jsDestination, jsContents.replace(/\r\n/g, '\n'));
|
||||
|
||||
for (const feature of [...features, ...languages]) {
|
||||
const entries = [].concat(feature.entry);
|
||||
for (const entry of entries) {
|
||||
const dtsDestination = path.join(REPO_ROOT, 'out/monaco-editor/esm', entry) + '.d.ts';
|
||||
ensureDir(path.dirname(dtsDestination));
|
||||
fs.writeFileSync(dtsDestination, 'export {}\n');
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
function strcmp(a: string, b: string) {
|
||||
if (a < b) {
|
||||
return -1;
|
||||
}
|
||||
if (a > b) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
function getFeatures(): { label: string; entry: string | string[] }[] {
|
||||
const skipImports = [
|
||||
'vs/editor/browser/widget/codeEditorWidget',
|
||||
'vs/editor/browser/widget/diffEditorWidget',
|
||||
'vs/editor/browser/widget/diffNavigator',
|
||||
'vs/editor/common/standaloneStrings',
|
||||
'vs/editor/contrib/tokenization/tokenization',
|
||||
'vs/editor/editor.all',
|
||||
'vs/base/browser/ui/codicons/codiconStyles',
|
||||
'vs/editor/contrib/gotoSymbol/documentSymbols'
|
||||
];
|
||||
|
||||
let features: string[] = [];
|
||||
const files =
|
||||
fs
|
||||
.readFileSync(path.join(REPO_ROOT, 'out/monaco-editor/esm/vs/editor/edcore.main.js'))
|
||||
.toString() +
|
||||
fs
|
||||
.readFileSync(path.join(REPO_ROOT, 'out/monaco-editor/esm/vs/editor/editor.all.js'))
|
||||
.toString();
|
||||
files.split(/\r\n|\n/).forEach((line) => {
|
||||
const m = line.match(/import '([^']+)'/);
|
||||
if (m) {
|
||||
const tmp = path.posix.join('vs/editor', m[1]).replace(/\.js$/, '');
|
||||
if (skipImports.indexOf(tmp) === -1) {
|
||||
features.push(tmp);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
let result: { label: string; entry: any }[] = features.map((feature) => {
|
||||
/** @type {string} */ let label;
|
||||
if (customFeatureLabels[feature]) {
|
||||
label = customFeatureLabels[feature];
|
||||
} else {
|
||||
const m1 = feature.match(/^vs\/editor\/contrib\/([^\/]+)/);
|
||||
if (m1) {
|
||||
// for editor/contrib features, use the first segment
|
||||
label = m1[1];
|
||||
} else {
|
||||
// for everything else, use the last segment folder
|
||||
label = path.basename(path.dirname(feature));
|
||||
}
|
||||
}
|
||||
return {
|
||||
label: label,
|
||||
entry: feature
|
||||
};
|
||||
});
|
||||
|
||||
result.sort((a, b) => {
|
||||
const labelCmp = strcmp(a.label, b.label);
|
||||
if (labelCmp === 0) {
|
||||
return strcmp(a.entry, b.entry);
|
||||
}
|
||||
return labelCmp;
|
||||
});
|
||||
|
||||
for (let i = 0; i < result.length; i++) {
|
||||
if (i + 1 < result.length && result[i].label === result[i + 1].label) {
|
||||
if (typeof result[i].entry === 'string') {
|
||||
result[i].entry = [result[i].entry];
|
||||
}
|
||||
result[i].entry.push(result[i + 1].entry);
|
||||
result.splice(i + 1, 1);
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
96
build/shared.mjs
Normal file
96
build/shared.mjs
Normal file
|
|
@ -0,0 +1,96 @@
|
|||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
// @ts-check
|
||||
|
||||
import { dirname, join } from 'path';
|
||||
import { fileURLToPath } from 'url';
|
||||
import { readdirSync } from 'fs';
|
||||
|
||||
/**
|
||||
* @param {string} filePath
|
||||
* @param {string} newExt
|
||||
*/
|
||||
export function changeExt(filePath, newExt) {
|
||||
const idx = filePath.lastIndexOf('.');
|
||||
if (idx === -1) {
|
||||
return filePath + newExt;
|
||||
} else {
|
||||
return filePath.substring(0, idx) + newExt;
|
||||
}
|
||||
}
|
||||
|
||||
export function getNlsEntryPoints() {
|
||||
const nlsDir = dirname(fileURLToPath(import.meta.resolve('monaco-editor-core/esm/nls.messages.en.js')));
|
||||
const nlsFiles = readdirSync(nlsDir)
|
||||
.filter(file => file.startsWith('nls.messages.') && file.endsWith('.js'))
|
||||
.reduce((acc, file) => {
|
||||
// @ts-ignore
|
||||
acc[file] = join(nlsDir, file);
|
||||
return acc;
|
||||
}, {});
|
||||
return nlsFiles;
|
||||
}
|
||||
|
||||
const root = join(import.meta.dirname, '../');
|
||||
|
||||
const mappedPaths = {
|
||||
[join(root, 'node_modules/monaco-editor-core/esm/')]: '.',
|
||||
[join(root, 'node_modules/')]: 'external/',
|
||||
[join(root, 'monaco-lsp-client/')]: 'external/monaco-lsp-client/',
|
||||
[join(root, 'src/')]: 'vs/',
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {string} moduleId
|
||||
* @param {string} newExt (with leading .)
|
||||
* @returns {string | undefined}
|
||||
*/
|
||||
export function mapModuleId(moduleId, newExt) {
|
||||
for (const [key, val] of Object.entries(mappedPaths)) {
|
||||
if (moduleId.startsWith(key)) {
|
||||
const relativePath = moduleId.substring(key.length);
|
||||
return changeExt(join(val, relativePath), newExt);
|
||||
}
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {(moduleId: string) => boolean} [filter]
|
||||
* @return {import('rollup').Plugin}
|
||||
*/
|
||||
export function dtsDeprecationWarning(filter) {
|
||||
return {
|
||||
name: 'add-dts-deprecation-warning',
|
||||
generateBundle(options, bundle) {
|
||||
for (const fileName in bundle) {
|
||||
if (filter && !filter(fileName)) {
|
||||
continue;
|
||||
}
|
||||
const file = bundle[fileName];
|
||||
if (file.type === 'chunk' && fileName.endsWith('.d.ts')) {
|
||||
let content = file.code.toString();
|
||||
content = content + `
|
||||
declare namespace languages {
|
||||
/** @deprecated Use the new top level "css" namespace instead. */
|
||||
export const css: { deprecated: true };
|
||||
|
||||
/** @deprecated Use the new top level "html" namespace instead. */
|
||||
export const html: { deprecated: true };
|
||||
|
||||
/** @deprecated Use the new top level "json" namespace instead. */
|
||||
export const json: { deprecated: true };
|
||||
|
||||
/** @deprecated Use the new top level "typescript" namespace instead. */
|
||||
export const typescript: { deprecated: true };
|
||||
}
|
||||
`;
|
||||
file.code = content;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
69
build/simpleserver.ts
Normal file
69
build/simpleserver.ts
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import fs = require('fs');
|
||||
import path = require('path');
|
||||
import http = require('http');
|
||||
import yaserver = require('yaserver');
|
||||
import { REPO_ROOT } from './utils';
|
||||
import { ensureDir } from './fs';
|
||||
|
||||
generateTestSamplesTask();
|
||||
|
||||
const SERVER_ROOT = path.normalize(path.join(REPO_ROOT, '../'));
|
||||
createSimpleServer(SERVER_ROOT, 8080);
|
||||
createSimpleServer(SERVER_ROOT, 8088);
|
||||
|
||||
function generateTestSamplesTask() {
|
||||
const sampleNames = fs.readdirSync(path.join(REPO_ROOT, 'test/manual/samples'));
|
||||
let samples = sampleNames.map((sampleName) => {
|
||||
const samplePath = path.join(REPO_ROOT, 'test/manual/samples', sampleName);
|
||||
const sampleContent = fs.readFileSync(samplePath).toString();
|
||||
return {
|
||||
name: sampleName,
|
||||
content: sampleContent
|
||||
};
|
||||
});
|
||||
|
||||
// Add samples from website
|
||||
{
|
||||
let sampleNames = fs.readdirSync(path.join(REPO_ROOT, 'website/index/samples'));
|
||||
sampleNames = sampleNames.filter((name) => /^sample/.test(name));
|
||||
|
||||
samples = samples.concat(
|
||||
sampleNames.map((sampleName) => {
|
||||
const samplePath = path.join(REPO_ROOT, 'website/index/samples', sampleName);
|
||||
const sampleContent = fs.readFileSync(samplePath).toString();
|
||||
return {
|
||||
name: sampleName,
|
||||
content: sampleContent
|
||||
};
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
const prefix =
|
||||
'//This is a generated file via `npm run simpleserver`\ndefine([], function() { return';
|
||||
const suffix = '; });';
|
||||
|
||||
const destination = path.join(REPO_ROOT, 'test/manual/generated/all-samples.js');
|
||||
ensureDir(path.dirname(destination));
|
||||
fs.writeFileSync(destination, prefix + JSON.stringify(samples, null, '\t') + suffix);
|
||||
}
|
||||
|
||||
function createSimpleServer(rootDir: string, port: number) {
|
||||
yaserver
|
||||
.createServer({
|
||||
rootDir: rootDir
|
||||
})
|
||||
.then((staticServer) => {
|
||||
const server = http.createServer((request, response) => {
|
||||
return staticServer.handle(request, response);
|
||||
});
|
||||
server.listen(port, '127.0.0.1', () => {
|
||||
console.log(`Running at http://127.0.0.1:${port}`);
|
||||
});
|
||||
});
|
||||
}
|
||||
8
build/tsconfig.json
Normal file
8
build/tsconfig.json
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"noEmit": true,
|
||||
"module": "CommonJS",
|
||||
"esModuleInterop": true
|
||||
},
|
||||
"include": ["./**/*"]
|
||||
}
|
||||
52
build/utils.ts
Normal file
52
build/utils.ts
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as fs from 'fs';
|
||||
import * as path from 'path';
|
||||
import * as glob from 'glob';
|
||||
import { ensureDir } from './fs';
|
||||
|
||||
export const REPO_ROOT = path.join(__dirname, '../');
|
||||
|
||||
|
||||
export interface IFile {
|
||||
path: string;
|
||||
contents: Buffer;
|
||||
}
|
||||
|
||||
export function readFiles(
|
||||
pattern: string,
|
||||
options: { base: string; ignore?: string[]; dot?: boolean }
|
||||
): IFile[] {
|
||||
let files = glob.sync(pattern, { cwd: REPO_ROOT, ignore: options.ignore, dot: options.dot });
|
||||
// remove dirs
|
||||
files = files.filter((file) => {
|
||||
const fullPath = path.join(REPO_ROOT, file);
|
||||
const stats = fs.statSync(fullPath);
|
||||
return stats.isFile();
|
||||
});
|
||||
|
||||
const base = options.base;
|
||||
return files.map((file) => readFile(file, base));
|
||||
}
|
||||
|
||||
export function readFile(file: string, base: string = '') {
|
||||
const baseLength = base === '' ? 0 : base.endsWith('/') ? base.length : base.length + 1;
|
||||
const fullPath = path.join(REPO_ROOT, file);
|
||||
const contents = fs.readFileSync(fullPath);
|
||||
const relativePath = file.substring(baseLength);
|
||||
return {
|
||||
path: relativePath,
|
||||
contents
|
||||
};
|
||||
}
|
||||
|
||||
export function writeFiles(files: IFile[], dest: string) {
|
||||
for (const file of files) {
|
||||
const fullPath = path.join(REPO_ROOT, dest, file.path);
|
||||
ensureDir(path.dirname(fullPath));
|
||||
fs.writeFileSync(fullPath, file.contents);
|
||||
}
|
||||
}
|
||||
275
docs/code-structure.dio.svg
Normal file
275
docs/code-structure.dio.svg
Normal file
|
|
@ -0,0 +1,275 @@
|
|||
<svg host="65bd71144e" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="601px" height="391px" viewBox="-0.5 -0.5 601 391" content="<mxfile><diagram id="cU4r2CM7fKKh95v30pN0" name="Page-1">1Vpdk9osFP41XrqThBj1sqvd9qKd6XTfmbaXmKChjSED8au//j0kkA+IdtXo7t6sgcAJPOechwfYAZqt9584zuKvLCLJwHOi/QDNB57nOhMHfmTNoayZ+KpixWmkGtUVz/Qv0T1V7YZGRLQa5owlOc3alSFLUxLmrTrMOdu1my1Z0v5qhlfEqngOcWLX/qBRHqtZeOO6/jOhq1h/2Q2m5Zs11o3VTESMI7ZrVKGPAzTjjOXl03o/I4kET+NS9ns68rYaGCdp/pIOHlLjyA96ciSCuapiylL4eYzzdQIlFx7JnuY/4dl5GKnSr8abuXSxowsHXUhzfmh0ksVfzXd1t6Kk+5VDk+M5OjtVJdiGh7pVoCIC8xXRzcYVthCUhK0JfAfacJLgnG7b9rGKjlXVrgYQHhSG3Xgir7SxxclGWf3G2bYIVxhSTOrByrjjneh/wQtImBbsOKGrFJ5DmDnhULElPKcQkR/UizWNImnjkRNB/+JFYU+CmDGa5sWMRo+D0byCVRog+0FHuqjOdZA2AS8DxkZSWXIeIJnLXiq3FSAvRlqZ/iaHXdsdul7L6tD32ybYcinA26arqhG+yHs6dBre+0Tzz5sF1H0nGRM0Z3KUQQJoPC7Ae8FKPq1pyJlgS/j+01aEwHeWX3cxzclzhoso3QEttv171CdWsB+F3tXuUhAFU1Xe1RTlauaNG/QUONfHvTu2kEuzdTH+8I9kUxszluKQDUkkMR2GjJ+N2ZImyYwlkEQVUZlZkbPsNuBWK9a/wHWdPtCdXh+XLbzPhbob1w4H9AA1mvw7jpHfBbXbA9TazxcG8ivkPZq28XIdryM2gxslPhrdV0B4ZykIkkYfpN6TK2eChaBhWflEk7YHzhUZlexsiIyGgLtMZBRdYbz40Gig1u+jK6M/NphpZCg+sz0y2k8cw9/lCC5dQ5G9EjQUUILT1aZII2dJcL7htSASdmrRNEw2EU1X0Oi/QwYSnNMM5jKTgSxDqngKhSgffguW2kZwGsE7BtqLi85Yfctyq0yvE3ILTYO2MlLGr9VbuovWW1p/9aq39EcasfIEezHCbS+CKcHDV6DXkdPOl3HXyu90sOuoj9XIv5RdG9xaM203u0ZYxCTSBm7GmF4f7GgFanUmoOnM1FslQ6te10WrrcLmRAAlLSSJxYCZPIaAP4sNTaJ3RzVlrJ2gGteZGJsw1AvXGNJ6aBjoh2nsffkppinWGXu1uL+Yuy/bjC9lGyXLzhVz47PE3J14SgnaXo+PLlJ2gdbWmtrMszwzjwLnVPvrlZ29NZqTLVTMSQbIkzQ8vD/SO+LZivTGAGubnrx+SK9tdHIDzkPBxel8h2y+awK/ztYsMBMSnU7gkaFlpqjnBJ5YCaxONR7KrdM7S94ywE9tjnyt2Qxtce3uqG01GN9CsYxsxUKTjvMnMHTSi7cXLYH7iqIF3fkG640cQKE3cwBl7sCm0/MOoIz217OcbyWOdQVXXjc4+sy2PoF6bwx4+jZu6Dw4vtvrfdxNBYt9HCRimmUg+o+76A4Xa+aJadfFWtf5un8+vUGxvvwvIaz/hQJ9/B8=</diagram></mxfile>">
|
||||
<defs/>
|
||||
<g>
|
||||
<path d="M 90 60 L 90 143.63" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/>
|
||||
<path d="M 90 148.88 L 86.5 141.88 L 90 143.63 L 93.5 141.88 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 74px; margin-left: 80px;">
|
||||
<div data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
|
||||
<div style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;">
|
||||
Provides the source for
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="80" y="77" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="11px" text-anchor="middle">
|
||||
Provides the source for
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<rect x="0" y="0" width="180" height="60" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 178px; height: 1px; padding-top: 30px; margin-left: 1px;">
|
||||
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
|
||||
GitHub Repository
|
||||
<br/>
|
||||
microsoft/vscode
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="90" y="34" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
|
||||
GitHub Repository...
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<rect x="0" y="150" width="180" height="100" fill="none" stroke="rgb(0, 0, 0)" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe center; width: 178px; height: 1px; padding-top: 157px; margin-left: 1px;">
|
||||
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
|
||||
npm package
|
||||
<br/>
|
||||
monaco-editor-core
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="90" y="169" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
|
||||
npm package...
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<rect x="260" y="0" width="340" height="110" fill="none" stroke="rgb(0, 0, 0)" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe center; width: 338px; height: 1px; padding-top: 7px; margin-left: 261px;">
|
||||
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
|
||||
GitHub Repository
|
||||
<br/>
|
||||
microsoft/monaco-editor
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="430" y="19" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
|
||||
GitHub Repository...
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<rect x="270" y="330" width="160" height="60" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 158px; height: 1px; padding-top: 360px; margin-left: 271px;">
|
||||
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
|
||||
npm package
|
||||
<br/>
|
||||
monaco-editor
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="350" y="364" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
|
||||
npm package...
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<path d="M 430 100 L 358 154 Q 350 160 342 166 L 318 184 Q 310 190 310 200 L 310 323.63" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/>
|
||||
<path d="M 310 328.88 L 306.5 321.88 L 310 323.63 L 313.5 321.88 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 231px; margin-left: 290px;">
|
||||
<div data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
|
||||
<div style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;">
|
||||
Provides language feature sources
|
||||
<br/>
|
||||
including TypeScript, html, css, json
|
||||
<br/>
|
||||
and others
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="290" y="234" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="11px" text-anchor="middle">
|
||||
Provides language feature sources...
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<rect x="380" y="50" width="100" height="50" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 98px; height: 1px; padding-top: 75px; margin-left: 381px;">
|
||||
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
|
||||
Folder
|
||||
<br/>
|
||||
/src
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="430" y="79" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
|
||||
Folder...
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<path d="M 270 75 L 96.25 108.78" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" stroke-dasharray="3 3" pointer-events="stroke"/>
|
||||
<path d="M 91.1 109.79 L 97.3 105.01 L 96.25 108.78 L 98.64 111.89 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 91px; margin-left: 190px;">
|
||||
<div data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
|
||||
<div style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;">
|
||||
Describe how to build
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="190" y="94" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="11px" text-anchor="middle">
|
||||
Describe how to build
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<rect x="270" y="50" width="100" height="50" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 98px; height: 1px; padding-top: 75px; margin-left: 271px;">
|
||||
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
|
||||
Folder
|
||||
<br/>
|
||||
/scripts
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="320" y="79" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
|
||||
Folder...
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<path d="M 515 100 L 515 120 Q 515 130 505 130 L 150 130 Q 140 130 138.27 136.91 L 136.54 143.82" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" stroke-dasharray="3 3" pointer-events="stroke"/>
|
||||
<path d="M 135.27 148.92 L 133.57 141.28 L 136.54 143.82 L 140.36 142.97 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 120px; margin-left: 181px;">
|
||||
<div data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
|
||||
<div style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;">
|
||||
Dev Dependency
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="181" y="124" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="11px" text-anchor="middle">
|
||||
Dev Dependency
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<path d="M 540 100 L 540 130 Q 540 140 531.68 145.55 L 398.32 234.45 Q 390 240 390 250 L 390 323.63" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/>
|
||||
<path d="M 390 328.88 L 386.5 321.88 L 390 323.63 L 393.5 321.88 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 300px; margin-left: 391px;">
|
||||
<div data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
|
||||
<div style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;">
|
||||
package.json
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="391" y="303" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="11px" text-anchor="middle">
|
||||
package.json
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<rect x="490" y="50" width="100" height="50" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 98px; height: 1px; padding-top: 75px; margin-left: 491px;">
|
||||
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
|
||||
File
|
||||
<br/>
|
||||
/package.json
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="540" y="79" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
|
||||
File...
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<path d="M 90 240 L 90 290 Q 90 300 100 300 L 300 300 Q 310 300 310 310 L 310 323.63" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/>
|
||||
<path d="M 310 328.88 L 306.5 321.88 L 310 323.63 L 313.5 321.88 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 290px; margin-left: 179px;">
|
||||
<div data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
|
||||
<div style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;">
|
||||
Provides the core editor sources
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="179" y="294" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="11px" text-anchor="middle">
|
||||
Provides the core editor sources
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<rect x="10" y="200" width="160" height="40" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 158px; height: 1px; padding-top: 220px; margin-left: 11px;">
|
||||
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
|
||||
shipped sources
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="90" y="224" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
|
||||
shipped sources
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
</g>
|
||||
<switch>
|
||||
<g requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"/>
|
||||
<a transform="translate(0,-5)" xlink:href="https://www.diagrams.net/doc/faq/svg-export-text-problems" target="_blank">
|
||||
<text text-anchor="middle" font-size="10px" x="50%" y="100%">
|
||||
Text is not SVG - cannot display
|
||||
</text>
|
||||
</a>
|
||||
</switch>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 23 KiB |
BIN
docs/debugging-core.gif
Normal file
BIN
docs/debugging-core.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 249 KiB |
BIN
docs/debugging-languages.gif
Normal file
BIN
docs/debugging-languages.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 200 KiB |
229
docs/integrate-esm.md
Normal file
229
docs/integrate-esm.md
Normal file
|
|
@ -0,0 +1,229 @@
|
|||
## Integrating the ESM version of the Monaco Editor
|
||||
|
||||
- [Webpack](#using-webpack)
|
||||
- [Option 1: Using the Monaco Editor WebPack Plugin](#option-1-using-the-monaco-editor-webpack-plugin)
|
||||
- [Option 2: Using plain webpack](#option-2-using-plain-webpack)
|
||||
- [Parcel](#using-parcel)
|
||||
- [Vite](#using-vite)
|
||||
|
||||
### Using webpack
|
||||
|
||||
Here is the most basic script that imports the editor using ESM with webpack.
|
||||
|
||||
More self-contained samples are available in the [samples folder](../samples/).
|
||||
|
||||
---
|
||||
|
||||
### Option 1: Using the Monaco Editor WebPack Plugin
|
||||
|
||||
This is the easiest method, and it allows for options to be passed into the plugin in order to select only a subset of editor features or editor languages. Read more about the [Monaco Editor WebPack Plugin](../webpack-plugin/), which is a community authored plugin.
|
||||
|
||||
- `index.js`
|
||||
|
||||
```js
|
||||
import * as monaco from 'monaco-editor';
|
||||
|
||||
monaco.editor.create(document.getElementById('container'), {
|
||||
value: ['function x() {', '\tconsole.log("Hello world!");', '}'].join('\n'),
|
||||
language: 'javascript'
|
||||
});
|
||||
```
|
||||
|
||||
- `webpack.config.js`
|
||||
|
||||
```js
|
||||
const MonacoWebpackPlugin = require('monaco-editor-webpack-plugin');
|
||||
const path = require('path');
|
||||
|
||||
module.exports = {
|
||||
entry: './index.js',
|
||||
output: {
|
||||
path: path.resolve(__dirname, 'dist'),
|
||||
filename: 'app.js'
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.css$/,
|
||||
use: ['style-loader', 'css-loader']
|
||||
},
|
||||
{
|
||||
test: /\.ttf$/,
|
||||
use: ['file-loader']
|
||||
}
|
||||
]
|
||||
},
|
||||
plugins: [new MonacoWebpackPlugin()]
|
||||
};
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### Option 2: Using plain webpack
|
||||
|
||||
Full working samples are available at https://github.com/microsoft/monaco-editor/tree/main/samples/browser-esm-webpack or https://github.com/microsoft/monaco-editor/tree/main/samples/browser-esm-webpack-small
|
||||
|
||||
- `index.js`
|
||||
|
||||
```js
|
||||
import * as monaco from 'monaco-editor';
|
||||
|
||||
// Since packaging is done by you, you need
|
||||
// to instruct the editor how you named the
|
||||
// bundles that contain the web workers.
|
||||
self.MonacoEnvironment = {
|
||||
getWorkerUrl: function (moduleId, label) {
|
||||
if (label === 'json') {
|
||||
return './json.worker.bundle.js';
|
||||
}
|
||||
if (label === 'css' || label === 'scss' || label === 'less') {
|
||||
return './css.worker.bundle.js';
|
||||
}
|
||||
if (label === 'html' || label === 'handlebars' || label === 'razor') {
|
||||
return './html.worker.bundle.js';
|
||||
}
|
||||
if (label === 'typescript' || label === 'javascript') {
|
||||
return './ts.worker.bundle.js';
|
||||
}
|
||||
return './editor.worker.bundle.js';
|
||||
}
|
||||
};
|
||||
|
||||
monaco.editor.create(document.getElementById('container'), {
|
||||
value: ['function x() {', '\tconsole.log("Hello world!");', '}'].join('\n'),
|
||||
language: 'javascript'
|
||||
});
|
||||
```
|
||||
|
||||
- `webpack.config.js`:
|
||||
|
||||
```js
|
||||
const path = require('path');
|
||||
|
||||
module.exports = {
|
||||
entry: {
|
||||
app: './index.js',
|
||||
// Package each language's worker and give these filenames in `getWorkerUrl`
|
||||
'editor.worker': 'monaco-editor/esm/vs/editor/editor.worker.js',
|
||||
'json.worker': 'monaco-editor/esm/vs/language/json/json.worker',
|
||||
'css.worker': 'monaco-editor/esm/vs/language/css/css.worker',
|
||||
'html.worker': 'monaco-editor/esm/vs/language/html/html.worker',
|
||||
'ts.worker': 'monaco-editor/esm/vs/language/typescript/ts.worker'
|
||||
},
|
||||
output: {
|
||||
globalObject: 'self',
|
||||
filename: '[name].bundle.js',
|
||||
path: path.resolve(__dirname, 'dist')
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.css$/,
|
||||
use: ['style-loader', 'css-loader']
|
||||
},
|
||||
{
|
||||
test: /\.ttf$/,
|
||||
use: ['file-loader']
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### Using parcel
|
||||
|
||||
A full working sample is available at https://github.com/microsoft/monaco-editor/tree/main/samples/browser-esm-parcel
|
||||
|
||||
When using parcel, we need to use the `getWorkerUrl` function and build the workers seperately from our main source. To simplify things, we can write a tiny bash script to build the workers for us.
|
||||
|
||||
- `index.js`
|
||||
|
||||
```js
|
||||
import * as monaco from 'monaco-editor';
|
||||
|
||||
self.MonacoEnvironment = {
|
||||
getWorkerUrl: function (moduleId, label) {
|
||||
if (label === 'json') {
|
||||
return './json.worker.js';
|
||||
}
|
||||
if (label === 'css' || label === 'scss' || label === 'less') {
|
||||
return './css.worker.js';
|
||||
}
|
||||
if (label === 'html' || label === 'handlebars' || label === 'razor') {
|
||||
return './html.worker.js';
|
||||
}
|
||||
if (label === 'typescript' || label === 'javascript') {
|
||||
return './ts.worker.js';
|
||||
}
|
||||
return './editor.worker.js';
|
||||
}
|
||||
};
|
||||
|
||||
monaco.editor.create(document.getElementById('container'), {
|
||||
value: ['function x() {', '\tconsole.log("Hello world!");', '}'].join('\n'),
|
||||
language: 'javascript'
|
||||
});
|
||||
```
|
||||
|
||||
- `build_workers.sh`
|
||||
|
||||
```sh
|
||||
ROOT=$PWD/node_modules/monaco-editor/esm/vs
|
||||
OPTS="--no-source-maps --log-level 1" # Parcel options - See: https://parceljs.org/cli.html
|
||||
|
||||
parcel build $ROOT/language/json/json.worker.js $OPTS
|
||||
parcel build $ROOT/language/css/css.worker.js $OPTS
|
||||
parcel build $ROOT/language/html/html.worker.js $OPTS
|
||||
parcel build $ROOT/language/typescript/ts.worker.js $OPTS
|
||||
parcel build $ROOT/editor/editor.worker.js $OPTS
|
||||
```
|
||||
|
||||
Then, simply run `sh ./build_workers.sh && parcel index.html`. This builds the workers into the same directory as your main bundle (usually `./dist`). If you want to change the `--out-dir` of the workers, you must change the paths in `index.js` to reflect their new location.
|
||||
|
||||
_note - the `getWorkerUrl` paths are relative to the build directory of your src bundle_
|
||||
|
||||
---
|
||||
|
||||
### Using Vite
|
||||
|
||||
Adding monaco editor to [Vite](https://vitejs.dev/) is simple since it has built-in support for web workers. You only need to implement the `getWorker` function (NOT the `getWorkerUrl`) to use Vite's output ([Source](https://github.com/vitejs/vite/discussions/1791#discussioncomment-321046)):
|
||||
|
||||
```js
|
||||
import * as monaco from 'monaco-editor';
|
||||
|
||||
self.MonacoEnvironment = {
|
||||
getWorker: function (workerId, label) {
|
||||
const getWorkerModule = (moduleUrl, label) => {
|
||||
return new Worker(self.MonacoEnvironment.getWorkerUrl(moduleUrl), {
|
||||
name: label,
|
||||
type: 'module'
|
||||
});
|
||||
};
|
||||
|
||||
switch (label) {
|
||||
case 'json':
|
||||
return getWorkerModule('/monaco-editor/esm/vs/language/json/json.worker?worker', label);
|
||||
case 'css':
|
||||
case 'scss':
|
||||
case 'less':
|
||||
return getWorkerModule('/monaco-editor/esm/vs/language/css/css.worker?worker', label);
|
||||
case 'html':
|
||||
case 'handlebars':
|
||||
case 'razor':
|
||||
return getWorkerModule('/monaco-editor/esm/vs/language/html/html.worker?worker', label);
|
||||
case 'typescript':
|
||||
case 'javascript':
|
||||
return getWorkerModule('/monaco-editor/esm/vs/language/typescript/ts.worker?worker', label);
|
||||
default:
|
||||
return getWorkerModule('/monaco-editor/esm/vs/editor/editor.worker?worker', label);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
monaco.editor.create(document.getElementById('container'), {
|
||||
value: "function hello() {\n\talert('Hello world!');\n}",
|
||||
language: 'javascript'
|
||||
});
|
||||
```
|
||||
BIN
docs/launch config.png
Normal file
BIN
docs/launch config.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 10 KiB |
347
docs/out-folders.dio.svg
Normal file
347
docs/out-folders.dio.svg
Normal file
|
|
@ -0,0 +1,347 @@
|
|||
<svg host="65bd71144e" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="772px" height="562px" viewBox="-0.5 -0.5 772 562" content="<mxfile><diagram id="cU4r2CM7fKKh95v30pN0" name="Page-1">7Vvdc9o4EP9rmLnrDIzlL+AxIaV9aG4yk4e7PgosQFfb4mQRoH/9SZZkbEmEj5hAp3lprJW0lnb399NqTTvBKNt8oXC5eCQJSju+l2w6wUPH96Owz/8Vgq0UxEAJ5hQnUgR2gmf8Eymhp6QrnKCiMZARkjK8bAqnJM/RlDVkkFKybg6bkbT51iWcI0vwPIWpLf0bJ2whpQO/v5N/RXi+0G8G8VD2ZFAPVjspFjAh65oo+NwJRpQQJp+yzQilwnbaLnLeeE9vtTCKcnbMhFAt7AWmK7W5fJmVKqY/hBX8OOWK7ieUP83FU0ZyOCVdlGBGqNoE22rLrBeYoWc+WbTX3Pl8xoJlKW8B/viCKMPcjncpnudcxogYMMNpOiIpVxc85CTnU+/tfaitCQ1oUxOpfX1BJEOMbvmQjQ6qSE5RQQYiZfP1zmV+oMYsau7yh2ogVGEyr3TvLMkflDHLJpn8KwLN91I4QamcJpVoS/u1xSon1OyGEh5gqqlMUDMb2mD2T+35O3/2epFqPYgNe7qx1Y2cr1hM6no9zwNaIqcG/VALdrPLVmP6E6KY7xxRJdzrlYKs6FRtRYGAQTpHatRAisQmX/UcRSlk+KWJMpcX1NQngnO283jlOO1x05FyTWqW4ctqGS738qbysBtGgYUiVkwtcIj9f5PxUfcuVGCYcqsKU1soyXCSCB33FBX4J5yU+oQ/lmIn5d6i+0704PSQvwc3FTsqfQ0CcuGJx5Ef+oov3ugpDU09g8xmBTrRJzaXWU5AxWSFObf73ufnR6c7TsVc/0jQeU28RQfQdi6whkcCS5mdM0EVEKd58I5SuK0NUJG3H4pxE4q+FzXPoQPjA+AZ0SBXYMxuNX6iMyOkFhXfa123ESEAXIR7T40H0Df8O3zFv2f4Ln4F+3ePD7dBxVFbVOz1wjBqZjdRK7ysCUUp7V6CpvuWq/iMgtrH5YFcci8ijk8RB0a+ENsZItCZej1DjNtKEMdkxWXjFObzFc+2OYDGMEu6VfKgbTaobcNOHm8o6Q78wyb1XSYdnG7SQ0lZOGjlyL/iiT+0+TxoPZfeY13LnPZN0Rm/k1XOGZLz7hgVmeUASng3SpQRXIF7gSCsgutQEJ6Ba/sK7lmb/sWiTqcMjTQivFbY6dUcH3eCQTv9+wS9dHyu3stw3unbKcBVQjE4lg9bCUX/Vw/F8F1C8ayMNjIy2ujADccc33YGDOwaxCmVvO6UUGSFyw1lFkauFoaOXK3vABII20CSXVuoSMgoiI5vhXri6DD1gMGFqEenKccY7Gp5gmkhV55wMQuF18wT/FbYOXDkp/rTzqVrvZFR67VKintqvW+lef2eM2nbdQ381Et6cgk1/AxrSzr5xtcCNip+rQp4NjaGDmgEb77HOW/Kfb6ncUWrQkGNWStIgSsbDRjZXjh8L6PZ9HJuNfN2cr/AZpf2b7/nkYJBPlF4IPczxr9a3T6PRKpDtAqA4MbAEAXXA4Oz5ujORmS7RslXz0oczHuxrES/u2EpwwrFAi7F43RF0+095dcLAU+nOWoRtbOdaM1SvPyqnssofiIFZpiIWwSVW6puF9+M/qoGr6v1KZrVx9u1esKgmtsdCs8V8hclkqhacFkUhw2XxcDymOuOXyHkTR5z1UfkVS/BLw3Pxf+tSHkF5C6bl/7gt77ynnYnKHM++cMXXxXECVt/+LM0kjcjOevOYIbTrZzAFcJMeFmpHcFiChMMedeIJMjslvpGJC9IyjesDnJDBed/jDgMvb/Q2q2A45MUZZS1rW+3SxkfYo8ALDeyI8U56mrvlV1D1RVX+uS9Wpufa82d9t/3DlMRK7p5aUivVxa4ys9Z8m/XoC35RvEhpXxpcyEidRKhoKUGnnmQs8t9BoMrRhTehOqCUfIDGeUBR8VA2EiLEjSDq1RbTv0cDLSW6IIGdge+jd2onWPKxq7/m7Kt4xOo5cS9HvONA/Jd2dZVCPpg2yuyrSxy0pWgWkWRvwfrvQ1DoIkhV+ULXIr1IgeGPljv0DlleKwLov5RvBcGcQs+s39g88F7t8V7e1PCDxbch6kANO9tvs2C1e377SWK3a/6ZYln918jgs//Aw==</diagram></mxfile>">
|
||||
<defs/>
|
||||
<g>
|
||||
<rect x="535" y="130" width="235" height="290" fill="none" stroke="rgb(0, 0, 0)" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe center; width: 233px; height: 1px; padding-top: 137px; margin-left: 536px;">
|
||||
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
|
||||
npm package
|
||||
<br/>
|
||||
monaco-editor
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="653" y="149" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
|
||||
npm package...
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<path d="M 120 170 L 233.41 169.92" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/>
|
||||
<path d="M 238.66 169.92 L 231.66 173.43 L 233.41 169.92 L 231.66 166.43 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 170px; margin-left: 180px;">
|
||||
<div data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
|
||||
<div style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;">
|
||||
tsc
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="180" y="174" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="11px" text-anchor="middle">
|
||||
tsc
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<path d="M 120 185 L 170 185 Q 180 185 180 195 L 180 280 Q 180 290 190 290 L 233.63 290" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/>
|
||||
<path d="M 238.88 290 L 231.88 293.5 L 233.63 290 L 231.88 286.5 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 240px; margin-left: 180px;">
|
||||
<div data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
|
||||
<div style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;">
|
||||
esbuild ESM
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="180" y="243" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="11px" text-anchor="middle">
|
||||
esbuild ESM
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<path d="M 90 200 L 90 360 Q 90 370 100 370 L 233.63 370" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/>
|
||||
<path d="M 238.88 370 L 231.88 373.5 L 233.63 370 L 231.88 366.5 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 360px; margin-left: 181px;">
|
||||
<div data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
|
||||
<div style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;">
|
||||
esbuild AMD
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="181" y="364" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="11px" text-anchor="middle">
|
||||
esbuild AMD
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<rect x="0" y="140" width="120" height="60" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 170px; margin-left: 1px;">
|
||||
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
|
||||
/src
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="60" y="174" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
|
||||
/src
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<rect x="240" y="140" width="220" height="80" fill="none" stroke="rgb(0, 0, 0)" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe center; width: 218px; height: 1px; padding-top: 147px; margin-left: 241px;">
|
||||
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
|
||||
/out/languages/amd-tsc
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="350" y="159" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
|
||||
/out/languages/amd-tsc
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<path d="M 460 290 L 563.63 290" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/>
|
||||
<path d="M 568.88 290 L 561.88 293.5 L 563.63 290 L 561.88 286.5 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
|
||||
<rect x="240" y="260" width="220" height="60" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 218px; height: 1px; padding-top: 290px; margin-left: 241px;">
|
||||
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
|
||||
/out/languages/bundled/esm
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="350" y="294" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
|
||||
/out/languages/bundled/esm
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<path d="M 460 370 L 563.63 370" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/>
|
||||
<path d="M 568.88 370 L 561.88 373.5 L 563.63 370 L 561.88 366.5 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
|
||||
<rect x="240" y="340" width="220" height="60" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 218px; height: 1px; padding-top: 370px; margin-left: 241px;">
|
||||
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
|
||||
/out/languages/bundled/amd-{dev, min}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="350" y="374" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
|
||||
/out/languages/bundled/amd-{dev, min}
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<path d="M 130 485 L 480 485 Q 490 485 490 475 L 490 380 Q 490 370 500 370 L 563.63 370" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/>
|
||||
<path d="M 568.88 370 L 561.88 373.5 L 563.63 370 L 561.88 366.5 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
|
||||
<rect x="0" y="420" width="170" height="140" fill="none" stroke="rgb(0, 0, 0)" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe center; width: 168px; height: 1px; padding-top: 427px; margin-left: 1px;">
|
||||
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
|
||||
npm package
|
||||
<br/>
|
||||
monaco-editor-core
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="85" y="439" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
|
||||
npm package...
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<rect x="570" y="340" width="180" height="60" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 178px; height: 1px; padding-top: 370px; margin-left: 571px;">
|
||||
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
|
||||
/out/monaco-editor/{dev, min}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="660" y="374" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
|
||||
/out/monaco-editor/{dev, min}
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<rect x="570" y="260" width="180" height="60" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 178px; height: 1px; padding-top: 290px; margin-left: 571px;">
|
||||
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
|
||||
/out/monaco-editor/esm
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="660" y="294" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
|
||||
/out/monaco-editor/esm
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<path d="M 450 195 L 480 195 Q 490 195 500 195 L 563.63 195" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/>
|
||||
<path d="M 568.88 195 L 561.88 198.5 L 563.63 195 L 561.88 191.5 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
|
||||
<rect x="360" y="180" width="90" height="30" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 88px; height: 1px; padding-top: 195px; margin-left: 361px;">
|
||||
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
|
||||
*.d.ts
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="405" y="199" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
|
||||
*.d.ts
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<rect x="40" y="470" width="90" height="30" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 88px; height: 1px; padding-top: 485px; margin-left: 41px;">
|
||||
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
|
||||
{/dev, /min}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="85" y="489" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
|
||||
{/dev, /min}
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<path d="M 130 525 L 500 525 Q 510 525 510 515 L 510 300 Q 510 290 520 290 L 563.63 290" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/>
|
||||
<path d="M 568.88 290 L 561.88 293.5 L 563.63 290 L 561.88 286.5 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
|
||||
<rect x="40" y="510" width="90" height="30" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 88px; height: 1px; padding-top: 525px; margin-left: 41px;">
|
||||
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
|
||||
esm
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="85" y="529" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
|
||||
esm
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<rect x="570" y="180" width="180" height="60" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 178px; height: 1px; padding-top: 210px; margin-left: 571px;">
|
||||
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
|
||||
/out/monaco-editor/monaco.d.ts
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="660" y="214" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
|
||||
/out/monaco-editor/monaco.d.ts
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<path d="M 504 41 L 499 41 Q 494 41 494 51 L 494 91 Q 494 101 489 101 L 486.5 101 Q 484 101 489 101 L 491.5 101 Q 494 101 494 111 L 494 151 Q 494 161 499 161 L 504 161" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" transform="translate(494,0)scale(-1,1)translate(-494,0)rotate(90,494,101)" pointer-events="all"/>
|
||||
<rect x="361" y="62" width="250" height="30" fill="none" stroke="none" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 77px; margin-left: 486px;">
|
||||
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
|
||||
<div style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: nowrap;">
|
||||
<div style="background-color: rgb(255, 255, 255); font-family: "Cascadia Code", Consolas, "Courier New", monospace, Consolas, "Courier New", monospace; font-size: 11px; line-height: 19px;">
|
||||
<span style="font-size: 11px;">
|
||||
ts-node ./build/build-monaco-editor
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="486" y="80" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="11px" text-anchor="middle">
|
||||
ts-node ./build/build-monaco-editor
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<path d="M 190 41 L 185 41 Q 180 41 180 51 L 180 91 Q 180 101 175 101 L 172.5 101 Q 170 101 175 101 L 177.5 101 Q 180 101 180 111 L 180 151 Q 180 161 185 161 L 190 161" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" transform="translate(180,0)scale(-1,1)translate(-180,0)rotate(90,180,101)" pointer-events="all"/>
|
||||
<rect x="130" y="60" width="110" height="30" fill="none" stroke="none" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 75px; margin-left: 185px;">
|
||||
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
|
||||
<div style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: nowrap;">
|
||||
<div style="background-color: rgb(255, 255, 255); font-family: "Cascadia Code", Consolas, "Courier New", monospace, Consolas, "Courier New", monospace; font-size: 11px; line-height: 19px;">
|
||||
npm run build
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="185" y="78" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="11px" text-anchor="middle">
|
||||
npm run build
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<path d="M 350 -177 L 345 -177 Q 340 -177 340 -167 L 340 31 Q 340 41 335 41 L 332.5 41 Q 330 41 335 41 L 337.5 41 Q 340 41 340 51 L 340 249 Q 340 259 345 259 L 350 259" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" transform="translate(340,0)scale(-1,1)translate(-340,0)rotate(90,340,41)" pointer-events="all"/>
|
||||
<rect x="234" y="0" width="200" height="30" fill="none" stroke="none" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 15px; margin-left: 334px;">
|
||||
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
|
||||
<div style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: nowrap;">
|
||||
<div style="background-color: rgb(255, 255, 255); font-family: "Cascadia Code", Consolas, "Courier New", monospace, Consolas, "Courier New", monospace; font-size: 11px; line-height: 19px;">
|
||||
npm run build-monaco-editor
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="334" y="18" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="11px" text-anchor="middle">
|
||||
npm run build-monaco-editor
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
</g>
|
||||
<switch>
|
||||
<g requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"/>
|
||||
<a transform="translate(0,-5)" xlink:href="https://www.diagrams.net/doc/faq/svg-export-text-problems" target="_blank">
|
||||
<text text-anchor="middle" font-size="10px" x="50%" y="100%">
|
||||
Text is not SVG - cannot display
|
||||
</text>
|
||||
</a>
|
||||
</switch>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 31 KiB |
13
editor.code-workspace
Normal file
13
editor.code-workspace
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"folders": [
|
||||
{
|
||||
"path": "../vscode"
|
||||
},
|
||||
{
|
||||
"path": "../vscode-loc"
|
||||
},
|
||||
{
|
||||
"path": "."
|
||||
}
|
||||
]
|
||||
}
|
||||
335
gulpfile.js
335
gulpfile.js
|
|
@ -1,326 +1,9 @@
|
|||
|
||||
var gulp = require('gulp');
|
||||
var metadata = require('./metadata');
|
||||
var es = require('event-stream');
|
||||
var path = require('path');
|
||||
var fs = require('fs');
|
||||
var rimraf = require('rimraf');
|
||||
var cp = require('child_process');
|
||||
|
||||
var SAMPLES_MDOC_PATH = path.join(__dirname, 'website/playground/playground.mdoc');
|
||||
var WEBSITE_GENERATED_PATH = path.join(__dirname, 'website/playground/samples');
|
||||
|
||||
gulp.task('clean-release', function(cb) { rimraf('release', { maxBusyTries: 1 }, cb); });
|
||||
gulp.task('release', ['clean-release'], function() {
|
||||
return es.merge(
|
||||
|
||||
// dev folder
|
||||
releaseOne('dev'),
|
||||
|
||||
// min folder
|
||||
releaseOne('min'),
|
||||
|
||||
// package.json
|
||||
gulp.src('package.json')
|
||||
.pipe(es.through(function(data) {
|
||||
var json = JSON.parse(data.contents.toString());
|
||||
json.private = false;
|
||||
data.contents = new Buffer(JSON.stringify(json, null, ' '));
|
||||
this.emit('data', data);
|
||||
}))
|
||||
.pipe(gulp.dest('release')),
|
||||
|
||||
// min-maps folder
|
||||
gulp.src('node_modules/monaco-editor-core/min-maps/**/*').pipe(gulp.dest('release/min-maps')),
|
||||
|
||||
// other files
|
||||
gulp.src([
|
||||
'node_modules/monaco-editor-core/LICENSE',
|
||||
'node_modules/monaco-editor-core/monaco.d.ts',
|
||||
'node_modules/monaco-editor-core/ThirdPartyNotices.txt',
|
||||
'README.md'
|
||||
]).pipe(addPluginDTS()).pipe(gulp.dest('release'))
|
||||
)
|
||||
});
|
||||
|
||||
function releaseOne(type) {
|
||||
return es.merge(
|
||||
gulp.src('node_modules/monaco-editor-core/' + type + '/**/*')
|
||||
.pipe(addPluginContribs())
|
||||
.pipe(gulp.dest('release/' + type)),
|
||||
pluginStreams('release/' + type + '/')
|
||||
)
|
||||
}
|
||||
|
||||
function pluginStreams(destinationPath) {
|
||||
return es.merge(
|
||||
metadata.METADATA.PLUGINS.map(function(plugin) {
|
||||
return pluginStream(plugin, destinationPath);
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
function pluginStream(plugin, destinationPath) {
|
||||
var contribPath = path.join(plugin.path, plugin.contrib.substr(plugin.modulePrefix.length)) + '.js';
|
||||
return (
|
||||
gulp.src([
|
||||
plugin.path + '/**/*',
|
||||
'!' + contribPath
|
||||
])
|
||||
.pipe(gulp.dest(destinationPath + plugin.modulePrefix))
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Edit editor.main.js:
|
||||
* - rename the AMD module 'vs/editor/editor.main' to 'vs/editor/edcore.main'
|
||||
* - append contribs from plugins
|
||||
* - append new AMD module 'vs/editor/editor.main' that stiches things together
|
||||
*/
|
||||
function addPluginContribs() {
|
||||
return es.through(function(data) {
|
||||
if (!/editor\.main\.js$/.test(data.path)) {
|
||||
this.emit('data', data);
|
||||
return;
|
||||
}
|
||||
var contents = data.contents.toString();
|
||||
|
||||
// Rename the AMD module 'vs/editor/editor.main' to 'vs/editor/edcore.main'
|
||||
contents = contents.replace(/"vs\/editor\/editor\.main\"/, '"vs/editor/edcore.main"');
|
||||
|
||||
var extraContent = [];
|
||||
var allPluginsModuleIds = [];
|
||||
|
||||
metadata.METADATA.PLUGINS.forEach(function(plugin) {
|
||||
allPluginsModuleIds.push(plugin.contrib);
|
||||
var contribPath = path.join(__dirname, plugin.path, plugin.contrib.substr(plugin.modulePrefix.length)) + '.js';
|
||||
var contribContents = fs.readFileSync(contribPath).toString();
|
||||
|
||||
var contribDefineIndex = contribContents.indexOf('define("' + plugin.contrib);
|
||||
if (contribDefineIndex === -1) {
|
||||
console.error('(1) CANNOT DETERMINE AMD define location for contribution', plugin);
|
||||
process.exit(-1);
|
||||
}
|
||||
|
||||
var depsEndIndex = contribContents.indexOf(']', contribDefineIndex);
|
||||
if (contribDefineIndex === -1) {
|
||||
console.error('(2) CANNOT DETERMINE AMD define location for contribution', plugin);
|
||||
process.exit(-1);
|
||||
}
|
||||
|
||||
contribContents = contribContents.substring(0, depsEndIndex) + ',"vs/editor/edcore.main"' + contribContents.substring(depsEndIndex);
|
||||
|
||||
extraContent.push(contribContents);
|
||||
});
|
||||
|
||||
extraContent.push(`define("vs/editor/editor.main", ["vs/editor/edcore.main","${allPluginsModuleIds.join('","')}"], function() {});`);
|
||||
var insertIndex = contents.lastIndexOf('//# sourceMappingURL=');
|
||||
if (insertIndex === -1) {
|
||||
insertIndex = contents.length;
|
||||
}
|
||||
contents = contents.substring(0, insertIndex) + '\n' + extraContent.join('\n') + '\n' + contents.substring(insertIndex);
|
||||
|
||||
data.contents = new Buffer(contents);
|
||||
this.emit('data', data);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Edit monaco.d.ts:
|
||||
* - append monaco.d.ts from plugins
|
||||
*/
|
||||
function addPluginDTS() {
|
||||
return es.through(function(data) {
|
||||
if (!/monaco\.d\.ts$/.test(data.path)) {
|
||||
this.emit('data', data);
|
||||
return;
|
||||
}
|
||||
var contents = data.contents.toString();
|
||||
|
||||
var extraContent = [];
|
||||
metadata.METADATA.PLUGINS.forEach(function(plugin) {
|
||||
var dtsPath = path.join(plugin.path, 'monaco.d.ts');
|
||||
try {
|
||||
extraContent.push(fs.readFileSync(dtsPath).toString());
|
||||
} catch (err) {
|
||||
return;
|
||||
}
|
||||
});
|
||||
|
||||
contents += '\n' + extraContent.join('\n');
|
||||
data.contents = new Buffer(contents);
|
||||
|
||||
fs.writeFileSync('website/playground/monaco.d.ts.txt', contents);
|
||||
this.emit('data', data);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// --- website
|
||||
|
||||
gulp.task('clean-playground-samples', function(cb) { rimraf(WEBSITE_GENERATED_PATH, { maxBusyTries: 1 }, cb); });
|
||||
gulp.task('playground-samples', ['clean-playground-samples'], function() {
|
||||
function toFolderName(name) {
|
||||
var result = name.toLowerCase().replace(/[^a-z0-9\-_]/g, '-');
|
||||
|
||||
while (result.indexOf('--') >= 0) {
|
||||
result = result.replace(/--/, '-');
|
||||
}
|
||||
|
||||
while (result.charAt(result.length - 1) === '-') {
|
||||
result = result.substring(result, result.length - 1);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
function parse(txt) {
|
||||
function startsWith(haystack, needle) {
|
||||
return haystack.substring(0, needle.length) === needle;
|
||||
}
|
||||
|
||||
var CHAPTER_MARKER = "=";
|
||||
var SAMPLE_MARKER = "==";
|
||||
var SNIPPET_MARKER = "=======================";
|
||||
|
||||
var lines = txt.split(/\r\n|\n|\r/);
|
||||
var result = [];
|
||||
var currentChapter = null;
|
||||
var currentSample = null;
|
||||
var currentSnippet = null;
|
||||
|
||||
for (var i = 0; i < lines.length; i++) {
|
||||
var line = lines[i];
|
||||
|
||||
if (startsWith(line, SNIPPET_MARKER)) {
|
||||
var snippetType = line.substring(SNIPPET_MARKER.length).trim();
|
||||
|
||||
if (snippetType === 'HTML' || snippetType === 'JS' || snippetType === 'CSS') {
|
||||
currentSnippet = currentSample[snippetType];
|
||||
} else {
|
||||
currentSnippet = null;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
if (startsWith(line, SAMPLE_MARKER)) {
|
||||
currentSnippet = null;
|
||||
currentSample = {
|
||||
name: line.substring(SAMPLE_MARKER.length).trim(),
|
||||
JS: [],
|
||||
HTML: [],
|
||||
CSS: []
|
||||
};
|
||||
currentChapter.samples.push(currentSample);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (startsWith(line, CHAPTER_MARKER)) {
|
||||
currentSnippet = null;
|
||||
currentSample = null;
|
||||
currentChapter = {
|
||||
name: line.substring(CHAPTER_MARKER.length).trim(),
|
||||
samples: []
|
||||
};
|
||||
result.push(currentChapter);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (currentSnippet) {
|
||||
currentSnippet.push(line);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (line === '') {
|
||||
continue;
|
||||
}
|
||||
|
||||
// ignore inter-sample content
|
||||
console.warn('IGNORING INTER-SAMPLE CONTENT: ' + line);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
var chapters = parse(fs.readFileSync(SAMPLES_MDOC_PATH).toString());
|
||||
|
||||
var allSamples = [];
|
||||
|
||||
fs.mkdirSync(WEBSITE_GENERATED_PATH);
|
||||
|
||||
chapters.forEach(function(chapter) {
|
||||
var chapterFolderName = toFolderName(chapter.name);
|
||||
|
||||
chapter.samples.forEach(function(sample) {
|
||||
var sampleId = toFolderName(chapter.name + '-' + sample.name);
|
||||
|
||||
sample.sampleId = sampleId;
|
||||
|
||||
var js = [
|
||||
'//---------------------------------------------------',
|
||||
'// ' + chapter.name + ' > ' + sample.name,
|
||||
'//---------------------------------------------------',
|
||||
'',
|
||||
].concat(sample.JS)
|
||||
var sampleOut = {
|
||||
id: sampleId,
|
||||
js: js.join('\n'),
|
||||
html: sample.HTML.join('\n'),
|
||||
css: sample.CSS.join('\n')
|
||||
};
|
||||
|
||||
allSamples.push({
|
||||
chapter: chapter.name,
|
||||
name: sample.name,
|
||||
sampleId: sampleId
|
||||
});
|
||||
|
||||
var content =
|
||||
`// This is a generated file. Please do not edit directly.
|
||||
var SAMPLES = this.SAMPLES || [];
|
||||
SAMPLES.push(${JSON.stringify(sampleOut)});
|
||||
`
|
||||
|
||||
fs.writeFileSync(path.join(WEBSITE_GENERATED_PATH, sampleId + '.js'), content);
|
||||
});
|
||||
});
|
||||
|
||||
var content =
|
||||
`// This is a generated file. Please do not edit directly.
|
||||
this.SAMPLES = [];
|
||||
this.ALL_SAMPLES = ${JSON.stringify(allSamples)};`
|
||||
|
||||
fs.writeFileSync(path.join(WEBSITE_GENERATED_PATH, 'all.js'), content);
|
||||
|
||||
});
|
||||
|
||||
gulp.task('clean-website', function(cb) { rimraf('../monaco-editor-website', { maxBusyTries: 1 }, cb); });
|
||||
gulp.task('website', ['clean-website', 'playground-samples'], function() {
|
||||
|
||||
return (
|
||||
gulp.src('website/**/*')
|
||||
.pipe(es.through(function(data) {
|
||||
if (!data.contents || !/\.(js|html)$/.test(data.path)) {
|
||||
return this.emit('data', data);
|
||||
}
|
||||
|
||||
var contents = data.contents.toString();
|
||||
contents = contents.replace(/\.\.\/release\/min/g, 'node_modules/monaco-editor/min');
|
||||
// contents = contents.replace('© 2016 Microsoft', '© 2016 Microsoft [' + builtTime + ']');
|
||||
|
||||
data.contents = new Buffer(contents);
|
||||
|
||||
this.emit('data', data);
|
||||
}))
|
||||
.pipe(gulp.dest('../monaco-editor-website'))
|
||||
.pipe(es.through(function(data) {
|
||||
this.emit('data', data);
|
||||
}, function() {
|
||||
cp.execSync('npm install monaco-editor', {
|
||||
cwd: path.join(__dirname, '../monaco-editor-website')
|
||||
});
|
||||
this.emit('end');
|
||||
}))
|
||||
);
|
||||
|
||||
});
|
||||
const gulp = require('gulp');
|
||||
const es = require('event-stream');
|
||||
const path = require('path');
|
||||
const fs = require('fs');
|
||||
const rimraf = require('rimraf');
|
||||
const cp = require('child_process');
|
||||
const CleanCSS = require('clean-css');
|
||||
const uncss = require('uncss');
|
||||
const File = require('vinyl');
|
||||
|
|
|
|||
30
metadata.js
30
metadata.js
|
|
@ -1,30 +0,0 @@
|
|||
(function() {
|
||||
|
||||
var METADATA = {
|
||||
CORE: {
|
||||
path: 'node_modules/monaco-editor-core/min/vs',
|
||||
srcPath: '/vscode/out/vs'
|
||||
// srcPath: '/vscode/out-monaco-editor-core/min/vs'
|
||||
},
|
||||
PLUGINS: [{
|
||||
name: 'monaco-typescript',
|
||||
contrib: 'vs/language/typescript/src/monaco.contribution',
|
||||
modulePrefix: 'vs/language/typescript',
|
||||
path: 'node_modules/monaco-typescript/release',
|
||||
srcPath: '/monaco-typescript/out'
|
||||
}, {
|
||||
name: 'monaco-languages',
|
||||
contrib: 'vs/basic-languages/src/monaco.contribution',
|
||||
modulePrefix: 'vs/basic-languages',
|
||||
path: 'node_modules/monaco-languages/release',
|
||||
srcPath: '/monaco-languages/out'
|
||||
}]
|
||||
}
|
||||
|
||||
if (typeof exports !== 'undefined') {
|
||||
exports.METADATA = METADATA
|
||||
} else {
|
||||
self.METADATA = METADATA;
|
||||
}
|
||||
|
||||
})();
|
||||
5
monaco-lsp-client/README.md
Normal file
5
monaco-lsp-client/README.md
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
# Monaco LSP Client
|
||||
|
||||
Provides a Language Server Protocol (LSP) client for the Monaco Editor.
|
||||
|
||||
This package is in alpha stage and might contain many bugs.
|
||||
687
monaco-lsp-client/generator/index.ts
Normal file
687
monaco-lsp-client/generator/index.ts
Normal file
|
|
@ -0,0 +1,687 @@
|
|||
import * as fs from 'fs';
|
||||
import * as path from 'path';
|
||||
|
||||
/**
|
||||
* Utility class for writing formatted code with proper indentation
|
||||
*/
|
||||
class LineWriter {
|
||||
private lines: string[] = [];
|
||||
private indentLevel: number = 0;
|
||||
private indentStr: string = ' '; // 4 spaces
|
||||
|
||||
/**
|
||||
* Write a line with current indentation
|
||||
*/
|
||||
writeLine(line: string = ''): void {
|
||||
if (line.trim() === '') {
|
||||
this.lines.push('');
|
||||
} else {
|
||||
this.lines.push(this.indentStr.repeat(this.indentLevel) + line);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Write text without adding a new line
|
||||
*/
|
||||
write(text: string): void {
|
||||
if (this.lines.length === 0) {
|
||||
this.lines.push('');
|
||||
}
|
||||
const lastIndex = this.lines.length - 1;
|
||||
if (this.lines[lastIndex] === '') {
|
||||
this.lines[lastIndex] = this.indentStr.repeat(this.indentLevel) + text;
|
||||
} else {
|
||||
this.lines[lastIndex] += text;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Increase indentation level
|
||||
*/
|
||||
indent(): void {
|
||||
this.indentLevel++;
|
||||
}
|
||||
|
||||
/**
|
||||
* Decrease indentation level
|
||||
*/
|
||||
outdent(): void {
|
||||
if (this.indentLevel > 0) {
|
||||
this.indentLevel--;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the generated content as a string
|
||||
*/
|
||||
toString(): string {
|
||||
return this.lines.join('\n');
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear all content and reset indentation
|
||||
*/
|
||||
clear(): void {
|
||||
this.lines = [];
|
||||
this.indentLevel = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Interface definitions based on the metaModel schema
|
||||
*/
|
||||
interface MetaModel {
|
||||
metaData: MetaData;
|
||||
requests: Request[];
|
||||
notifications: Notification[];
|
||||
structures: Structure[];
|
||||
enumerations: Enumeration[];
|
||||
typeAliases: TypeAlias[];
|
||||
}
|
||||
|
||||
interface MetaData {
|
||||
version: string;
|
||||
}
|
||||
|
||||
interface Request {
|
||||
method: string;
|
||||
result: Type;
|
||||
messageDirection: MessageDirection;
|
||||
params?: Type | Type[];
|
||||
partialResult?: Type;
|
||||
errorData?: Type;
|
||||
registrationOptions?: Type;
|
||||
registrationMethod?: string;
|
||||
documentation?: string;
|
||||
since?: string;
|
||||
proposed?: boolean;
|
||||
deprecated?: string;
|
||||
}
|
||||
|
||||
interface Notification {
|
||||
method: string;
|
||||
messageDirection: MessageDirection;
|
||||
params?: Type | Type[];
|
||||
registrationOptions?: Type;
|
||||
registrationMethod?: string;
|
||||
documentation?: string;
|
||||
since?: string;
|
||||
proposed?: boolean;
|
||||
deprecated?: string;
|
||||
}
|
||||
|
||||
interface Structure {
|
||||
name: string;
|
||||
properties: Property[];
|
||||
extends?: Type[];
|
||||
mixins?: Type[];
|
||||
documentation?: string;
|
||||
since?: string;
|
||||
proposed?: boolean;
|
||||
deprecated?: string;
|
||||
}
|
||||
|
||||
interface Property {
|
||||
name: string;
|
||||
type: Type;
|
||||
optional?: boolean;
|
||||
documentation?: string;
|
||||
since?: string;
|
||||
proposed?: boolean;
|
||||
deprecated?: string;
|
||||
}
|
||||
|
||||
interface Enumeration {
|
||||
name: string;
|
||||
type: EnumerationType;
|
||||
values: EnumerationEntry[];
|
||||
supportsCustomValues?: boolean;
|
||||
documentation?: string;
|
||||
since?: string;
|
||||
proposed?: boolean;
|
||||
deprecated?: string;
|
||||
}
|
||||
|
||||
interface EnumerationEntry {
|
||||
name: string;
|
||||
value: string | number;
|
||||
documentation?: string;
|
||||
since?: string;
|
||||
proposed?: boolean;
|
||||
deprecated?: string;
|
||||
}
|
||||
|
||||
interface EnumerationType {
|
||||
kind: 'base';
|
||||
name: 'string' | 'integer' | 'uinteger';
|
||||
}
|
||||
|
||||
interface TypeAlias {
|
||||
name: string;
|
||||
type: Type;
|
||||
documentation?: string;
|
||||
since?: string;
|
||||
proposed?: boolean;
|
||||
deprecated?: string;
|
||||
}
|
||||
|
||||
type MessageDirection = 'clientToServer' | 'serverToClient' | 'both';
|
||||
|
||||
type Type =
|
||||
| BaseType
|
||||
| ReferenceType
|
||||
| ArrayType
|
||||
| MapType
|
||||
| AndType
|
||||
| OrType
|
||||
| TupleType
|
||||
| StructureLiteralType
|
||||
| StringLiteralType
|
||||
| IntegerLiteralType
|
||||
| BooleanLiteralType;
|
||||
|
||||
interface BaseType {
|
||||
kind: 'base';
|
||||
name:
|
||||
| 'URI'
|
||||
| 'DocumentUri'
|
||||
| 'integer'
|
||||
| 'uinteger'
|
||||
| 'decimal'
|
||||
| 'RegExp'
|
||||
| 'string'
|
||||
| 'boolean'
|
||||
| 'null';
|
||||
}
|
||||
|
||||
interface ReferenceType {
|
||||
kind: 'reference';
|
||||
name: string;
|
||||
}
|
||||
|
||||
interface ArrayType {
|
||||
kind: 'array';
|
||||
element: Type;
|
||||
}
|
||||
|
||||
interface MapType {
|
||||
kind: 'map';
|
||||
key: Type;
|
||||
value: Type;
|
||||
}
|
||||
|
||||
interface AndType {
|
||||
kind: 'and';
|
||||
items: Type[];
|
||||
}
|
||||
|
||||
interface OrType {
|
||||
kind: 'or';
|
||||
items: Type[];
|
||||
}
|
||||
|
||||
interface TupleType {
|
||||
kind: 'tuple';
|
||||
items: Type[];
|
||||
}
|
||||
|
||||
interface StructureLiteralType {
|
||||
kind: 'literal';
|
||||
value: StructureLiteral;
|
||||
}
|
||||
|
||||
interface StructureLiteral {
|
||||
properties: Property[];
|
||||
documentation?: string;
|
||||
since?: string;
|
||||
proposed?: boolean;
|
||||
deprecated?: string;
|
||||
}
|
||||
|
||||
interface StringLiteralType {
|
||||
kind: 'stringLiteral';
|
||||
value: string;
|
||||
}
|
||||
|
||||
interface IntegerLiteralType {
|
||||
kind: 'integerLiteral';
|
||||
value: number;
|
||||
}
|
||||
|
||||
interface BooleanLiteralType {
|
||||
kind: 'booleanLiteral';
|
||||
value: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* TypeScript types generator for LSP client
|
||||
*/
|
||||
class LSPTypesGenerator {
|
||||
private writer = new LineWriter();
|
||||
|
||||
/**
|
||||
* Load and parse the metaModel.json file
|
||||
*/
|
||||
private loadMetaModel(): MetaModel {
|
||||
const metaModelPath = path.join(__dirname, '..', 'metaModel.json');
|
||||
const content = fs.readFileSync(metaModelPath, 'utf-8');
|
||||
return JSON.parse(content) as MetaModel;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert Type to TypeScript type string
|
||||
*/
|
||||
private typeToTypeScript(type: Type): string {
|
||||
switch (type.kind) {
|
||||
case 'base':
|
||||
switch (type.name) {
|
||||
case 'string':
|
||||
case 'DocumentUri':
|
||||
case 'URI':
|
||||
return 'string';
|
||||
case 'integer':
|
||||
case 'uinteger':
|
||||
case 'decimal':
|
||||
return 'number';
|
||||
case 'boolean':
|
||||
return 'boolean';
|
||||
case 'null':
|
||||
return 'null';
|
||||
case 'RegExp':
|
||||
return 'RegExp';
|
||||
default:
|
||||
return 'any';
|
||||
}
|
||||
case 'reference':
|
||||
return type.name;
|
||||
case 'array':
|
||||
return `(${this.typeToTypeScript(type.element)})[]`;
|
||||
case 'map':
|
||||
return `{ [key: ${this.typeToTypeScript(type.key)}]: ${this.typeToTypeScript(
|
||||
type.value
|
||||
)} }`;
|
||||
case 'and':
|
||||
return type.items.map((item) => this.typeToTypeScript(item)).join(' & ');
|
||||
case 'or':
|
||||
return type.items.map((item) => this.typeToTypeScript(item)).join(' | ');
|
||||
case 'tuple':
|
||||
return `[${type.items.map((item) => this.typeToTypeScript(item)).join(', ')}]`;
|
||||
case 'literal':
|
||||
return this.structureLiteralToTypeScript(type.value);
|
||||
case 'stringLiteral':
|
||||
return `'${type.value}'`;
|
||||
case 'integerLiteral':
|
||||
return type.value.toString();
|
||||
case 'booleanLiteral':
|
||||
return type.value.toString();
|
||||
default:
|
||||
return 'any';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert structure literal to TypeScript interface
|
||||
*/
|
||||
private structureLiteralToTypeScript(literal: StructureLiteral): string {
|
||||
const properties = literal.properties.map((prop) => {
|
||||
const optional = prop.optional ? '?' : '';
|
||||
return `${prop.name}${optional}: ${this.typeToTypeScript(prop.type)}`;
|
||||
});
|
||||
return `{\n ${properties.join(';\n ')}\n}`;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate TypeScript interface for a structure
|
||||
*/
|
||||
private generateStructure(structure: Structure): void {
|
||||
if (structure.documentation) {
|
||||
this.writer.writeLine('/**');
|
||||
this.writer.writeLine(` * ${structure.documentation.replace(/\n/g, '\n * ')}`);
|
||||
this.writer.writeLine(' */');
|
||||
}
|
||||
|
||||
// Build extends clause combining extends and mixins
|
||||
const allParents: string[] = [];
|
||||
|
||||
if (structure.extends && structure.extends.length > 0) {
|
||||
allParents.push(...structure.extends.map((type) => this.typeToTypeScript(type)));
|
||||
}
|
||||
|
||||
if (structure.mixins && structure.mixins.length > 0) {
|
||||
allParents.push(...structure.mixins.map((type) => this.typeToTypeScript(type)));
|
||||
}
|
||||
|
||||
const extendsClause = allParents.length > 0 ? ` extends ${allParents.join(', ')}` : '';
|
||||
|
||||
this.writer.writeLine(`export interface ${structure.name}${extendsClause} {`);
|
||||
this.writer.indent();
|
||||
|
||||
// Add properties
|
||||
for (const property of structure.properties) {
|
||||
if (property.documentation) {
|
||||
this.writer.writeLine('/**');
|
||||
this.writer.writeLine(` * ${property.documentation.replace(/\n/g, '\n * ')}`);
|
||||
this.writer.writeLine(' */');
|
||||
}
|
||||
const optional = property.optional ? '?' : '';
|
||||
this.writer.writeLine(
|
||||
`${property.name}${optional}: ${this.typeToTypeScript(property.type)};`
|
||||
);
|
||||
}
|
||||
|
||||
this.writer.outdent();
|
||||
this.writer.writeLine('}');
|
||||
this.writer.writeLine('');
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate TypeScript enum for an enumeration
|
||||
*/
|
||||
private generateEnumeration(enumeration: Enumeration): void {
|
||||
if (enumeration.documentation) {
|
||||
this.writer.writeLine('/**');
|
||||
this.writer.writeLine(` * ${enumeration.documentation.replace(/\n/g, '\n * ')}`);
|
||||
this.writer.writeLine(' */');
|
||||
}
|
||||
|
||||
this.writer.writeLine(`export enum ${enumeration.name} {`);
|
||||
this.writer.indent();
|
||||
|
||||
for (let i = 0; i < enumeration.values.length; i++) {
|
||||
const entry = enumeration.values[i];
|
||||
if (entry.documentation) {
|
||||
this.writer.writeLine('/**');
|
||||
this.writer.writeLine(` * ${entry.documentation.replace(/\n/g, '\n * ')}`);
|
||||
this.writer.writeLine(' */');
|
||||
}
|
||||
const isLast = i === enumeration.values.length - 1;
|
||||
const comma = isLast ? '' : ',';
|
||||
if (typeof entry.value === 'string') {
|
||||
this.writer.writeLine(`${entry.name} = '${entry.value}'${comma}`);
|
||||
} else {
|
||||
this.writer.writeLine(`${entry.name} = ${entry.value}${comma}`);
|
||||
}
|
||||
}
|
||||
|
||||
this.writer.outdent();
|
||||
this.writer.writeLine('}');
|
||||
this.writer.writeLine('');
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate TypeScript type alias
|
||||
*/
|
||||
private generateTypeAlias(typeAlias: TypeAlias): void {
|
||||
if (typeAlias.documentation) {
|
||||
this.writer.writeLine('/**');
|
||||
this.writer.writeLine(` * ${typeAlias.documentation.replace(/\n/g, '\n * ')}`);
|
||||
this.writer.writeLine(' */');
|
||||
}
|
||||
|
||||
this.writer.writeLine(
|
||||
`export type ${typeAlias.name} = ${this.typeToTypeScript(typeAlias.type)};`
|
||||
);
|
||||
this.writer.writeLine('');
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate the Capability class
|
||||
*/
|
||||
private generateCapabilityClass(): void {
|
||||
this.writer.writeLine('/**');
|
||||
this.writer.writeLine(
|
||||
' * Represents a capability with its associated method and registration options type'
|
||||
);
|
||||
this.writer.writeLine(' */');
|
||||
this.writer.writeLine('export class Capability<T> {');
|
||||
this.writer.indent();
|
||||
this.writer.writeLine('constructor(public readonly method: string) {}');
|
||||
this.writer.outdent();
|
||||
this.writer.writeLine('}');
|
||||
this.writer.writeLine('');
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate the capabilities map
|
||||
*/
|
||||
private generateCapabilitiesMap(metaModel: MetaModel): void {
|
||||
this.writer.writeLine('/**');
|
||||
this.writer.writeLine(' * Map of all LSP capabilities with their registration options');
|
||||
this.writer.writeLine(' */');
|
||||
this.writer.writeLine('export const capabilities = {');
|
||||
this.writer.indent();
|
||||
|
||||
// Collect all requests and notifications with registration options
|
||||
const itemsWithRegistration: Array<{ method: string; registrationOptions?: Type }> = [];
|
||||
|
||||
for (const request of metaModel.requests) {
|
||||
if (request.registrationOptions) {
|
||||
itemsWithRegistration.push({
|
||||
method: request.method,
|
||||
registrationOptions: request.registrationOptions
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
for (const notification of metaModel.notifications) {
|
||||
if (notification.registrationOptions) {
|
||||
itemsWithRegistration.push({
|
||||
method: notification.method,
|
||||
registrationOptions: notification.registrationOptions
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// Generate capability entries
|
||||
for (const item of itemsWithRegistration) {
|
||||
const methodIdentifier = this.methodToIdentifier(item.method);
|
||||
const registrationType = item.registrationOptions
|
||||
? this.typeToTypeScript(item.registrationOptions)
|
||||
: 'unknown';
|
||||
|
||||
this.writer.writeLine(
|
||||
`${methodIdentifier}: new Capability<${registrationType}>('${item.method}'),`
|
||||
);
|
||||
}
|
||||
|
||||
this.writer.outdent();
|
||||
this.writer.writeLine('};');
|
||||
this.writer.writeLine('');
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert LSP method name to valid JavaScript identifier
|
||||
*/
|
||||
private methodToIdentifier(method: string): string {
|
||||
const parts = method
|
||||
.replace(/\$/g, '') // Remove $ characters
|
||||
.split('/') // Split on forward slashes
|
||||
.filter((part) => part.length > 0); // Remove empty parts
|
||||
|
||||
return parts
|
||||
.map((part, index) => {
|
||||
// Convert kebab-case to camelCase for each part
|
||||
const camelCase = part.replace(/-([a-z])/g, (_, letter) => letter.toUpperCase());
|
||||
// Capitalize first letter of all parts except the first non-empty part
|
||||
return index === 0 ? camelCase : camelCase.charAt(0).toUpperCase() + camelCase.slice(1);
|
||||
})
|
||||
.join('');
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate the API contract object
|
||||
*/
|
||||
private generateApiContract(metaModel: MetaModel): void {
|
||||
this.writer.writeLine('/**');
|
||||
this.writer.writeLine(' * LSP API Contract');
|
||||
this.writer.writeLine(' */');
|
||||
|
||||
this.writer.writeLine('export const api = contract({');
|
||||
this.writer.indent();
|
||||
|
||||
this.writer.writeLine('name: "LSP",');
|
||||
|
||||
// Helper function to generate request entries
|
||||
const generateRequest = (request: Request, isOptional: boolean = false) => {
|
||||
const methodIdentifier = this.methodToIdentifier(request.method);
|
||||
const paramsType = this.getParamsType(request.params);
|
||||
const resultType = this.typeToTypeScript(request.result);
|
||||
|
||||
if (request.documentation) {
|
||||
this.writer.writeLine('/**');
|
||||
this.writer.writeLine(` * ${request.documentation.replace(/\n/g, '\n * ')}`);
|
||||
this.writer.writeLine(' */');
|
||||
}
|
||||
|
||||
const optional = isOptional ? '.optional()' : '';
|
||||
this.writer.writeLine(
|
||||
`${methodIdentifier}: unverifiedRequest<${paramsType}, ${resultType}>({ method: "${request.method}" })${optional},`
|
||||
);
|
||||
};
|
||||
|
||||
// Helper function to generate notification entries
|
||||
const generateNotification = (notification: Notification) => {
|
||||
const methodIdentifier = this.methodToIdentifier(notification.method);
|
||||
const paramsType = this.getParamsType(notification.params);
|
||||
|
||||
if (notification.documentation) {
|
||||
this.writer.writeLine('/**');
|
||||
this.writer.writeLine(` * ${notification.documentation.replace(/\n/g, '\n * ')}`);
|
||||
this.writer.writeLine(' */');
|
||||
}
|
||||
this.writer.writeLine(
|
||||
`${methodIdentifier}: unverifiedNotification<${paramsType}>({ method: "${notification.method}" }),`
|
||||
);
|
||||
};
|
||||
|
||||
// Server section
|
||||
this.writer.writeLine('server: {');
|
||||
this.writer.indent();
|
||||
|
||||
// Server requests (sent from client to server)
|
||||
for (const request of metaModel.requests) {
|
||||
if (request.messageDirection === 'clientToServer' || request.messageDirection === 'both') {
|
||||
generateRequest(request);
|
||||
}
|
||||
}
|
||||
|
||||
// Server notifications (sent from client to server)
|
||||
for (const notification of metaModel.notifications) {
|
||||
if (
|
||||
notification.messageDirection === 'clientToServer' ||
|
||||
notification.messageDirection === 'both'
|
||||
) {
|
||||
generateNotification(notification);
|
||||
}
|
||||
}
|
||||
|
||||
this.writer.outdent();
|
||||
this.writer.writeLine('},');
|
||||
|
||||
// Client section
|
||||
this.writer.writeLine('client: {');
|
||||
this.writer.indent();
|
||||
|
||||
// Client requests (handled by server)
|
||||
for (const request of metaModel.requests) {
|
||||
if (request.messageDirection === 'serverToClient' || request.messageDirection === 'both') {
|
||||
generateRequest(request, true); // serverToClient requests are optional
|
||||
}
|
||||
}
|
||||
|
||||
// Client notifications (sent from server to client)
|
||||
for (const notification of metaModel.notifications) {
|
||||
if (
|
||||
notification.messageDirection === 'serverToClient' ||
|
||||
notification.messageDirection === 'both'
|
||||
) {
|
||||
generateNotification(notification);
|
||||
}
|
||||
}
|
||||
|
||||
this.writer.outdent();
|
||||
this.writer.writeLine('}');
|
||||
|
||||
this.writer.outdent();
|
||||
this.writer.writeLine('});');
|
||||
this.writer.writeLine('');
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper method to get parameter type
|
||||
*/
|
||||
private getParamsType(params?: Type | Type[]): string {
|
||||
if (!params) {
|
||||
return 'void';
|
||||
}
|
||||
if (Array.isArray(params)) {
|
||||
const paramTypes = params.map((p) => this.typeToTypeScript(p));
|
||||
return `[${paramTypes.join(', ')}]`;
|
||||
} else {
|
||||
return this.typeToTypeScript(params);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate the complete TypeScript types
|
||||
*/
|
||||
generate(): void {
|
||||
const metaModel = this.loadMetaModel();
|
||||
|
||||
this.writer.clear();
|
||||
this.writer.writeLine('// Generated TypeScript definitions for LSP');
|
||||
this.writer.writeLine(`// Protocol version: ${metaModel.metaData.version}`);
|
||||
this.writer.writeLine('// This file is auto-generated. Do not edit manually.');
|
||||
this.writer.writeLine('');
|
||||
|
||||
// Import contract types from @hediet/json-rpc
|
||||
this.writer.writeLine('import {');
|
||||
this.writer.indent();
|
||||
this.writer.writeLine('contract,');
|
||||
this.writer.writeLine('Contract,');
|
||||
this.writer.writeLine('unverifiedRequest,');
|
||||
this.writer.writeLine('unverifiedNotification,');
|
||||
this.writer.outdent();
|
||||
this.writer.writeLine('} from "@hediet/json-rpc";');
|
||||
this.writer.writeLine('');
|
||||
|
||||
// Generate enumerations
|
||||
for (const enumeration of metaModel.enumerations) {
|
||||
this.generateEnumeration(enumeration);
|
||||
}
|
||||
|
||||
// Generate type aliases
|
||||
for (const typeAlias of metaModel.typeAliases) {
|
||||
this.generateTypeAlias(typeAlias);
|
||||
}
|
||||
|
||||
// Generate structures
|
||||
for (const structure of metaModel.structures) {
|
||||
this.generateStructure(structure);
|
||||
}
|
||||
|
||||
// Generate Capability class
|
||||
this.generateCapabilityClass();
|
||||
|
||||
// Generate capabilities map
|
||||
this.generateCapabilitiesMap(metaModel);
|
||||
|
||||
// Generate API contract
|
||||
this.generateApiContract(metaModel);
|
||||
|
||||
// Write types file
|
||||
const srcDir = path.join(__dirname, '..', 'src');
|
||||
if (!fs.existsSync(srcDir)) {
|
||||
fs.mkdirSync(srcDir, { recursive: true });
|
||||
}
|
||||
fs.writeFileSync(path.join(srcDir, 'types.ts'), this.writer.toString());
|
||||
|
||||
console.log('Generated LSP types file: src/types.ts');
|
||||
}
|
||||
}
|
||||
|
||||
// Run the generator
|
||||
if (require.main === module) {
|
||||
const generator = new LSPTypesGenerator();
|
||||
generator.generate();
|
||||
}
|
||||
1607
monaco-lsp-client/package-lock.json
generated
Normal file
1607
monaco-lsp-client/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load diff
26
monaco-lsp-client/package.json
Normal file
26
monaco-lsp-client/package.json
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"name": "@vscode/monaco-lsp-client",
|
||||
"description": "description",
|
||||
"authors": "vscode",
|
||||
"version": "0.1.0",
|
||||
"main": "out/index.js",
|
||||
"types": "out/index.d.ts",
|
||||
"dependencies": {
|
||||
"@hediet/json-rpc": "^0.5.0",
|
||||
"@hediet/json-rpc-browser": "^0.5.1",
|
||||
"@hediet/json-rpc-websocket": "^0.5.1"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"monaco-editor-core": "^0.54.0-dev-20250929"
|
||||
},
|
||||
"devDependencies": {
|
||||
"rolldown": "^1.0.0-beta.41",
|
||||
"rolldown-plugin-dts": "^0.16.11",
|
||||
"rollup-plugin-delete": "^3.0.1"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "npx rolldown -c rolldown.config.mjs",
|
||||
"dev": "npx rolldown -c rolldown.config.mjs --watch",
|
||||
"generate": "tsx generator/index.ts"
|
||||
}
|
||||
}
|
||||
33
monaco-lsp-client/rolldown.config.mjs
Normal file
33
monaco-lsp-client/rolldown.config.mjs
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
// @ts-check
|
||||
|
||||
import { join } from 'path';
|
||||
import { defineConfig } from 'rolldown';
|
||||
import { dts } from 'rolldown-plugin-dts';
|
||||
import del from 'rollup-plugin-delete';
|
||||
import alias from '@rollup/plugin-alias';
|
||||
|
||||
export default defineConfig({
|
||||
input: {
|
||||
index: join(import.meta.dirname, './src/index.ts')
|
||||
},
|
||||
output: {
|
||||
dir: join(import.meta.dirname, './out'),
|
||||
format: 'es'
|
||||
},
|
||||
external: ['monaco-editor-core'],
|
||||
plugins: [
|
||||
del({ targets: 'out/*' }),
|
||||
alias({
|
||||
entries: {
|
||||
ws: 'undefined'
|
||||
}
|
||||
}),
|
||||
dts({
|
||||
tsconfig: false,
|
||||
compilerOptions: {
|
||||
stripInternal: true
|
||||
},
|
||||
resolve: true
|
||||
})
|
||||
]
|
||||
});
|
||||
40
monaco-lsp-client/src/adapters/ITextModelBridge.ts
Normal file
40
monaco-lsp-client/src/adapters/ITextModelBridge.ts
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
import * as monaco from 'monaco-editor-core';
|
||||
import { Position, Range, TextDocumentIdentifier } from '../../src/types';
|
||||
|
||||
export interface ITextModelBridge {
|
||||
translate(
|
||||
textModel: monaco.editor.ITextModel,
|
||||
monacoPos: monaco.Position
|
||||
): {
|
||||
textDocument: TextDocumentIdentifier;
|
||||
position: Position;
|
||||
};
|
||||
|
||||
translateRange(textModel: monaco.editor.ITextModel, monacoRange: monaco.Range): Range;
|
||||
|
||||
translateBack(
|
||||
textDocument: TextDocumentIdentifier,
|
||||
position: Position
|
||||
): {
|
||||
textModel: monaco.editor.ITextModel;
|
||||
position: monaco.Position;
|
||||
};
|
||||
|
||||
translateBackRange(
|
||||
textDocument: TextDocumentIdentifier,
|
||||
range: Range
|
||||
): {
|
||||
textModel: monaco.editor.ITextModel;
|
||||
range: monaco.Range;
|
||||
};
|
||||
}
|
||||
|
||||
export function assertTargetTextModel<T extends { textModel: monaco.editor.ITextModel }>(
|
||||
input: T,
|
||||
expectedTextModel: monaco.editor.ITextModel
|
||||
): T {
|
||||
if (input.textModel !== expectedTextModel) {
|
||||
throw new Error(`Expected text model to be ${expectedTextModel}, but got ${input.textModel}`);
|
||||
}
|
||||
return input;
|
||||
}
|
||||
254
monaco-lsp-client/src/adapters/LspCapabilitiesRegistry.ts
Normal file
254
monaco-lsp-client/src/adapters/LspCapabilitiesRegistry.ts
Normal file
|
|
@ -0,0 +1,254 @@
|
|||
import { TypedChannel } from '@hediet/json-rpc';
|
||||
import { ClientCapabilities, Capability, ServerCapabilities, api, capabilities, TextDocumentChangeRegistrationOptions, TextDocumentSyncKind } from '../../src/types';
|
||||
import { IDisposable, Disposable } from '../utils';
|
||||
|
||||
export interface ILspCapabilitiesRegistry {
|
||||
addStaticClientCapabilities(capability: ClientCapabilities): IDisposable;
|
||||
registerCapabilityHandler<T>(capability: Capability<T>, handleStaticCapability: boolean, handler: (capability: T) => IDisposable): IDisposable;
|
||||
}
|
||||
|
||||
export class LspCapabilitiesRegistry extends Disposable implements ILspCapabilitiesRegistry {
|
||||
private readonly _staticCapabilities = new Set<{ cap: ClientCapabilities; }>();
|
||||
private readonly _dynamicFromStatic = DynamicFromStaticOptions.create();
|
||||
private readonly _registrations = new Map<Capability<any>, CapabilityInfo<any>>();
|
||||
private _serverCapabilities: ServerCapabilities | undefined = undefined;
|
||||
|
||||
constructor(
|
||||
private readonly _connection: TypedChannel
|
||||
) {
|
||||
super();
|
||||
|
||||
this._register(this._connection.registerRequestHandler(api.client.clientRegisterCapability, async (params) => {
|
||||
for (const registration of params.registrations) {
|
||||
const capability = getCapabilityByMethod(registration.method);
|
||||
const r = new CapabilityRegistration(registration.id, capability, registration.registerOptions, false);
|
||||
this._registerCapabilityOptions(r);
|
||||
}
|
||||
return { ok: null };
|
||||
}));
|
||||
|
||||
this._register(this._connection.registerRequestHandler(api.client.clientUnregisterCapability, async (params) => {
|
||||
for (const unregistration of params.unregisterations) {
|
||||
const capability = getCapabilityByMethod(unregistration.method);
|
||||
const info = this._registrations.get(capability);
|
||||
const handlerInfo = info?.registrations.get(unregistration.id);
|
||||
if (!handlerInfo) {
|
||||
throw new Error(`No registration for method ${unregistration.method} with id ${unregistration.id}`);
|
||||
}
|
||||
handlerInfo?.handlerDisposables.forEach(d => d.dispose());
|
||||
info?.registrations.delete(unregistration.id);
|
||||
}
|
||||
return { ok: null };
|
||||
}));
|
||||
}
|
||||
|
||||
private _registerCapabilityOptions<T>(registration: CapabilityRegistration<T>) {
|
||||
let registrationForMethod = this._registrations.get(registration.capability);
|
||||
if (!registrationForMethod) {
|
||||
registrationForMethod = new CapabilityInfo();
|
||||
this._registrations.set(registration.capability, registrationForMethod);
|
||||
}
|
||||
if (registrationForMethod.registrations.has(registration.id)) {
|
||||
throw new Error(`Handler for method ${registration.capability.method} with id ${registration.id} already registered`);
|
||||
}
|
||||
registrationForMethod.registrations.set(registration.id, registration);
|
||||
for (const h of registrationForMethod.handlers) {
|
||||
if (!h.handleStaticCapability && registration.isFromStatic) {
|
||||
continue;
|
||||
}
|
||||
registration.handlerDisposables.set(h, h.handler(registration.options));
|
||||
}
|
||||
}
|
||||
|
||||
setServerCapabilities(serverCapabilities: ServerCapabilities) {
|
||||
if (this._serverCapabilities) {
|
||||
throw new Error('Server capabilities already set');
|
||||
}
|
||||
this._serverCapabilities = serverCapabilities;
|
||||
for (const cap of Object.values(capabilities)) {
|
||||
const options = this._dynamicFromStatic.getOptions(cap, serverCapabilities);
|
||||
if (options) {
|
||||
this._registerCapabilityOptions(new CapabilityRegistration(cap.method, cap, options, true));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
getClientCapabilities(): ClientCapabilities {
|
||||
const result: ClientCapabilities = {};
|
||||
for (const c of this._staticCapabilities) {
|
||||
deepAssign(result, c.cap);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
addStaticClientCapabilities(capability: ClientCapabilities): IDisposable {
|
||||
const obj = { cap: capability };
|
||||
this._staticCapabilities.add(obj);
|
||||
return {
|
||||
dispose: () => {
|
||||
this._staticCapabilities.delete(obj);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
registerCapabilityHandler<T>(capability: Capability<T>, handleStaticCapability: boolean, handler: (capability: T) => IDisposable): IDisposable {
|
||||
let info = this._registrations.get(capability);
|
||||
if (!info) {
|
||||
info = new CapabilityInfo();
|
||||
this._registrations.set(capability, info);
|
||||
}
|
||||
const handlerInfo = new CapabilityHandler(capability, handleStaticCapability, handler);
|
||||
info.handlers.add(handlerInfo);
|
||||
|
||||
for (const registration of info.registrations.values()) {
|
||||
if (!handlerInfo.handleStaticCapability && registration.isFromStatic) {
|
||||
continue;
|
||||
}
|
||||
registration.handlerDisposables.set(handlerInfo, handler(registration.options));
|
||||
}
|
||||
|
||||
return {
|
||||
dispose: () => {
|
||||
info.handlers.delete(handlerInfo);
|
||||
for (const registration of info.registrations.values()) {
|
||||
const disposable = registration.handlerDisposables.get(handlerInfo);
|
||||
if (disposable) {
|
||||
disposable.dispose();
|
||||
registration.handlerDisposables.delete(handlerInfo);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
class CapabilityHandler<T> {
|
||||
constructor(
|
||||
public readonly capability: Capability<T>,
|
||||
public readonly handleStaticCapability: boolean,
|
||||
public readonly handler: (capabilityOptions: T) => IDisposable
|
||||
) { }
|
||||
}
|
||||
|
||||
class CapabilityRegistration<T> {
|
||||
public readonly handlerDisposables = new Map<CapabilityHandler<any>, IDisposable>();
|
||||
|
||||
constructor(
|
||||
public readonly id: string,
|
||||
public readonly capability: Capability<T>,
|
||||
public readonly options: T,
|
||||
public readonly isFromStatic: boolean
|
||||
) { }
|
||||
}
|
||||
|
||||
const capabilitiesByMethod = new Map([...Object.values(capabilities)].map(c => [c.method, c]));
|
||||
function getCapabilityByMethod(method: string): Capability<any> {
|
||||
const c = capabilitiesByMethod.get(method);
|
||||
if (!c) {
|
||||
throw new Error(`No capability found for method ${method}`);
|
||||
}
|
||||
return c;
|
||||
}
|
||||
|
||||
class CapabilityInfo<T> {
|
||||
public readonly handlers = new Set<CapabilityHandler<T>>();
|
||||
public readonly registrations = new Map</* id */ string, CapabilityRegistration<T>>();
|
||||
}
|
||||
|
||||
class DynamicFromStaticOptions {
|
||||
private readonly _mappings = new Map</* method */ string, (serverCapabilities: ServerCapabilities) => any>();
|
||||
|
||||
public static create(): DynamicFromStaticOptions {
|
||||
const o = new DynamicFromStaticOptions();
|
||||
o.set(capabilities.textDocumentDidChange, s => {
|
||||
if (s.textDocumentSync === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (typeof s.textDocumentSync === 'object') {
|
||||
return {
|
||||
syncKind: s.textDocumentSync.change ?? TextDocumentSyncKind.None,
|
||||
documentSelector: null,
|
||||
} satisfies TextDocumentChangeRegistrationOptions;
|
||||
} else {
|
||||
return {
|
||||
syncKind: s.textDocumentSync,
|
||||
documentSelector: null,
|
||||
} satisfies TextDocumentChangeRegistrationOptions;
|
||||
}
|
||||
return null!;
|
||||
});
|
||||
|
||||
o.set(capabilities.textDocumentCompletion, s => s.completionProvider);
|
||||
o.set(capabilities.textDocumentHover, s => s.hoverProvider);
|
||||
o.set(capabilities.textDocumentSignatureHelp, s => s.signatureHelpProvider);
|
||||
o.set(capabilities.textDocumentDefinition, s => s.definitionProvider);
|
||||
o.set(capabilities.textDocumentReferences, s => s.referencesProvider);
|
||||
o.set(capabilities.textDocumentDocumentHighlight, s => s.documentHighlightProvider);
|
||||
o.set(capabilities.textDocumentDocumentSymbol, s => s.documentSymbolProvider);
|
||||
o.set(capabilities.textDocumentCodeAction, s => s.codeActionProvider);
|
||||
o.set(capabilities.textDocumentCodeLens, s => s.codeLensProvider);
|
||||
o.set(capabilities.textDocumentDocumentLink, s => s.documentLinkProvider);
|
||||
o.set(capabilities.textDocumentFormatting, s => s.documentFormattingProvider);
|
||||
o.set(capabilities.textDocumentRangeFormatting, s => s.documentRangeFormattingProvider);
|
||||
o.set(capabilities.textDocumentOnTypeFormatting, s => s.documentOnTypeFormattingProvider);
|
||||
o.set(capabilities.textDocumentRename, s => s.renameProvider);
|
||||
o.set(capabilities.textDocumentFoldingRange, s => s.foldingRangeProvider);
|
||||
o.set(capabilities.textDocumentDeclaration, s => s.declarationProvider);
|
||||
o.set(capabilities.textDocumentTypeDefinition, s => s.typeDefinitionProvider);
|
||||
o.set(capabilities.textDocumentImplementation, s => s.implementationProvider);
|
||||
o.set(capabilities.textDocumentDocumentColor, s => s.colorProvider);
|
||||
o.set(capabilities.textDocumentSelectionRange, s => s.selectionRangeProvider);
|
||||
o.set(capabilities.textDocumentLinkedEditingRange, s => s.linkedEditingRangeProvider);
|
||||
o.set(capabilities.textDocumentPrepareCallHierarchy, s => s.callHierarchyProvider);
|
||||
o.set(capabilities.textDocumentSemanticTokensFull, s => s.semanticTokensProvider);
|
||||
o.set(capabilities.textDocumentInlayHint, s => s.inlayHintProvider);
|
||||
o.set(capabilities.textDocumentInlineValue, s => s.inlineValueProvider);
|
||||
o.set(capabilities.textDocumentDiagnostic, s => s.diagnosticProvider);
|
||||
o.set(capabilities.textDocumentMoniker, s => s.monikerProvider);
|
||||
o.set(capabilities.textDocumentPrepareTypeHierarchy, s => s.typeHierarchyProvider);
|
||||
o.set(capabilities.workspaceSymbol, s => s.workspaceSymbolProvider);
|
||||
o.set(capabilities.workspaceExecuteCommand, s => s.executeCommandProvider);
|
||||
return o;
|
||||
}
|
||||
|
||||
set<T>(capability: Capability<T>, getOptionsFromStatic: (serverCapabilities: ServerCapabilities) => T | boolean | undefined): void {
|
||||
if (this._mappings.has(capability.method)) {
|
||||
throw new Error(`Capability for method ${capability.method} already registered`);
|
||||
}
|
||||
this._mappings.set(capability.method, getOptionsFromStatic);
|
||||
}
|
||||
|
||||
getOptions<T>(capability: Capability<T>, serverCapabilities: ServerCapabilities): T | undefined {
|
||||
const getter = this._mappings.get(capability.method);
|
||||
if (!getter) {
|
||||
return undefined;
|
||||
}
|
||||
const result = getter(serverCapabilities);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
function deepAssign(target: any, source: any) {
|
||||
for (const key of Object.keys(source)) {
|
||||
const srcValue = source[key];
|
||||
if (srcValue === undefined) {
|
||||
continue;
|
||||
}
|
||||
const tgtValue = target[key];
|
||||
if (tgtValue === undefined) {
|
||||
target[key] = srcValue;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (typeof srcValue !== 'object' || srcValue === null) {
|
||||
target[key] = srcValue;
|
||||
continue;
|
||||
}
|
||||
if (typeof tgtValue !== 'object' || tgtValue === null) {
|
||||
target[key] = srcValue;
|
||||
continue;
|
||||
}
|
||||
|
||||
deepAssign(tgtValue, srcValue);
|
||||
}
|
||||
}
|
||||
90
monaco-lsp-client/src/adapters/LspClient.ts
Normal file
90
monaco-lsp-client/src/adapters/LspClient.ts
Normal file
|
|
@ -0,0 +1,90 @@
|
|||
import { IMessageTransport, TypedChannel } from "@hediet/json-rpc";
|
||||
import { LspCompletionFeature } from "./languageFeatures/LspCompletionFeature";
|
||||
import { LspHoverFeature } from "./languageFeatures/LspHoverFeature";
|
||||
import { LspSignatureHelpFeature } from "./languageFeatures/LspSignatureHelpFeature";
|
||||
import { LspDefinitionFeature } from "./languageFeatures/LspDefinitionFeature";
|
||||
import { LspDeclarationFeature } from "./languageFeatures/LspDeclarationFeature";
|
||||
import { LspTypeDefinitionFeature } from "./languageFeatures/LspTypeDefinitionFeature";
|
||||
import { LspImplementationFeature } from "./languageFeatures/LspImplementationFeature";
|
||||
import { LspReferencesFeature } from "./languageFeatures/LspReferencesFeature";
|
||||
import { LspDocumentHighlightFeature } from "./languageFeatures/LspDocumentHighlightFeature";
|
||||
import { LspDocumentSymbolFeature } from "./languageFeatures/LspDocumentSymbolFeature";
|
||||
import { LspRenameFeature } from "./languageFeatures/LspRenameFeature";
|
||||
import { LspCodeActionFeature } from "./languageFeatures/LspCodeActionFeature";
|
||||
import { LspCodeLensFeature } from "./languageFeatures/LspCodeLensFeature";
|
||||
import { LspDocumentLinkFeature } from "./languageFeatures/LspDocumentLinkFeature";
|
||||
import { LspFormattingFeature } from "./languageFeatures/LspFormattingFeature";
|
||||
import { LspRangeFormattingFeature } from "./languageFeatures/LspRangeFormattingFeature";
|
||||
import { LspOnTypeFormattingFeature } from "./languageFeatures/LspOnTypeFormattingFeature";
|
||||
import { LspFoldingRangeFeature } from "./languageFeatures/LspFoldingRangeFeature";
|
||||
import { LspSelectionRangeFeature } from "./languageFeatures/LspSelectionRangeFeature";
|
||||
import { LspInlayHintsFeature } from "./languageFeatures/LspInlayHintsFeature";
|
||||
import { LspSemanticTokensFeature } from "./languageFeatures/LspSemanticTokensFeature";
|
||||
import { LspDiagnosticsFeature } from "./languageFeatures/LspDiagnosticsFeature";
|
||||
import { api } from "../../src/types";
|
||||
import { LspConnection } from "./LspConnection";
|
||||
import { LspCapabilitiesRegistry } from './LspCapabilitiesRegistry';
|
||||
import { TextDocumentSynchronizer } from "./TextDocumentSynchronizer";
|
||||
import { DisposableStore, IDisposable } from "../utils";
|
||||
|
||||
export class MonacoLspClient {
|
||||
private _connection: LspConnection;
|
||||
private readonly _capabilitiesRegistry: LspCapabilitiesRegistry;
|
||||
private readonly _bridge: TextDocumentSynchronizer;
|
||||
|
||||
private _initPromise: Promise<void>;
|
||||
|
||||
constructor(transport: IMessageTransport) {
|
||||
const c = TypedChannel.fromTransport(transport);
|
||||
const s = api.getServer(c, {});
|
||||
c.startListen();
|
||||
|
||||
this._capabilitiesRegistry = new LspCapabilitiesRegistry(c);
|
||||
this._bridge = new TextDocumentSynchronizer(s.server, this._capabilitiesRegistry);
|
||||
|
||||
this._connection = new LspConnection(s.server, this._bridge, this._capabilitiesRegistry, c);
|
||||
this.createFeatures();
|
||||
|
||||
this._initPromise = this._init();
|
||||
}
|
||||
|
||||
private async _init() {
|
||||
const result = await this._connection.server.initialize({
|
||||
processId: null,
|
||||
capabilities: this._capabilitiesRegistry.getClientCapabilities(),
|
||||
rootUri: null,
|
||||
});
|
||||
|
||||
this._connection.server.initialized({});
|
||||
this._capabilitiesRegistry.setServerCapabilities(result.capabilities);
|
||||
}
|
||||
|
||||
protected createFeatures(): IDisposable {
|
||||
const store = new DisposableStore();
|
||||
|
||||
store.add(new LspCompletionFeature(this._connection));
|
||||
store.add(new LspHoverFeature(this._connection));
|
||||
store.add(new LspSignatureHelpFeature(this._connection));
|
||||
store.add(new LspDefinitionFeature(this._connection));
|
||||
store.add(new LspDeclarationFeature(this._connection));
|
||||
store.add(new LspTypeDefinitionFeature(this._connection));
|
||||
store.add(new LspImplementationFeature(this._connection));
|
||||
store.add(new LspReferencesFeature(this._connection));
|
||||
store.add(new LspDocumentHighlightFeature(this._connection));
|
||||
store.add(new LspDocumentSymbolFeature(this._connection));
|
||||
store.add(new LspRenameFeature(this._connection));
|
||||
store.add(new LspCodeActionFeature(this._connection));
|
||||
store.add(new LspCodeLensFeature(this._connection));
|
||||
store.add(new LspDocumentLinkFeature(this._connection));
|
||||
store.add(new LspFormattingFeature(this._connection));
|
||||
store.add(new LspRangeFormattingFeature(this._connection));
|
||||
store.add(new LspOnTypeFormattingFeature(this._connection));
|
||||
store.add(new LspFoldingRangeFeature(this._connection));
|
||||
store.add(new LspSelectionRangeFeature(this._connection));
|
||||
store.add(new LspInlayHintsFeature(this._connection));
|
||||
store.add(new LspSemanticTokensFeature(this._connection));
|
||||
store.add(new LspDiagnosticsFeature(this._connection));
|
||||
|
||||
return store;
|
||||
}
|
||||
}
|
||||
13
monaco-lsp-client/src/adapters/LspConnection.ts
Normal file
13
monaco-lsp-client/src/adapters/LspConnection.ts
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
import { TypedChannel } from '@hediet/json-rpc';
|
||||
import { api } from '../../src/types';
|
||||
import { ITextModelBridge } from './ITextModelBridge';
|
||||
import { LspCapabilitiesRegistry } from './LspCapabilitiesRegistry';
|
||||
|
||||
export class LspConnection {
|
||||
constructor(
|
||||
public readonly server: typeof api.TServerInterface,
|
||||
public readonly bridge: ITextModelBridge,
|
||||
public readonly capabilities: LspCapabilitiesRegistry,
|
||||
public readonly connection: TypedChannel,
|
||||
) { }
|
||||
}
|
||||
183
monaco-lsp-client/src/adapters/TextDocumentSynchronizer.ts
Normal file
183
monaco-lsp-client/src/adapters/TextDocumentSynchronizer.ts
Normal file
|
|
@ -0,0 +1,183 @@
|
|||
import * as monaco from 'monaco-editor-core';
|
||||
import { api, capabilities, Position, Range, TextDocumentContentChangeEvent, TextDocumentIdentifier } from '../../src/types';
|
||||
import { Disposable } from '../utils';
|
||||
import { ITextModelBridge } from './ITextModelBridge';
|
||||
import { ILspCapabilitiesRegistry } from './LspCapabilitiesRegistry';
|
||||
|
||||
export class TextDocumentSynchronizer extends Disposable implements ITextModelBridge {
|
||||
private readonly _managedModels = new Map<monaco.editor.ITextModel, ManagedModel>();
|
||||
private readonly _managedModelsReverse = new Map</* uri */ string, monaco.editor.ITextModel>();
|
||||
|
||||
private _started = false;
|
||||
|
||||
constructor(
|
||||
private readonly _server: typeof api.TServerInterface,
|
||||
private readonly _capabilities: ILspCapabilitiesRegistry,
|
||||
) {
|
||||
super();
|
||||
|
||||
this._register(this._capabilities.addStaticClientCapabilities({
|
||||
textDocument: {
|
||||
synchronization: {
|
||||
dynamicRegistration: true,
|
||||
willSave: false,
|
||||
willSaveWaitUntil: false,
|
||||
didSave: false,
|
||||
}
|
||||
}
|
||||
}));
|
||||
|
||||
this._register(_capabilities.registerCapabilityHandler(capabilities.textDocumentDidChange, true, e => {
|
||||
if (this._started) {
|
||||
return {
|
||||
dispose: () => {
|
||||
}
|
||||
}
|
||||
}
|
||||
this._started = true;
|
||||
this._register(monaco.editor.onDidCreateModel(m => {
|
||||
this._getOrCreateManagedModel(m);
|
||||
}));
|
||||
for (const m of monaco.editor.getModels()) {
|
||||
this._getOrCreateManagedModel(m);
|
||||
}
|
||||
return {
|
||||
dispose: () => {
|
||||
}
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
private _getOrCreateManagedModel(m: monaco.editor.ITextModel) {
|
||||
if (!this._started) {
|
||||
throw new Error('Not started');
|
||||
}
|
||||
|
||||
const uriStr = m.uri.toString(true).toLowerCase();
|
||||
let mm = this._managedModels.get(m);
|
||||
if (!mm) {
|
||||
mm = new ManagedModel(m, this._server);
|
||||
this._managedModels.set(m, mm);
|
||||
this._managedModelsReverse.set(uriStr, m);
|
||||
}
|
||||
m.onWillDispose(() => {
|
||||
mm!.dispose();
|
||||
this._managedModels.delete(m);
|
||||
this._managedModelsReverse.delete(uriStr);
|
||||
});
|
||||
return mm;
|
||||
}
|
||||
|
||||
translateBack(textDocument: TextDocumentIdentifier, position: Position): { textModel: monaco.editor.ITextModel; position: monaco.Position; } {
|
||||
const uri = textDocument.uri.toLowerCase();
|
||||
const textModel = this._managedModelsReverse.get(uri);
|
||||
if (!textModel) {
|
||||
throw new Error(`No text model for uri ${uri}`);
|
||||
}
|
||||
const monacoPosition = new monaco.Position(position.line + 1, position.character + 1);
|
||||
return { textModel, position: monacoPosition };
|
||||
}
|
||||
|
||||
translateBackRange(textDocument: TextDocumentIdentifier, range: Range): { textModel: monaco.editor.ITextModel; range: monaco.Range; } {
|
||||
const uri = textDocument.uri.toLowerCase();
|
||||
const textModel = this._managedModelsReverse.get(uri);
|
||||
if (!textModel) {
|
||||
throw new Error(`No text model for uri ${uri}`);
|
||||
}
|
||||
const monacoRange = new monaco.Range(
|
||||
range.start.line + 1,
|
||||
range.start.character + 1,
|
||||
range.end.line + 1,
|
||||
range.end.character + 1
|
||||
);
|
||||
return { textModel, range: monacoRange };
|
||||
}
|
||||
|
||||
translate(textModel: monaco.editor.ITextModel, monacoPos: monaco.Position): { textDocument: TextDocumentIdentifier; position: Position; } {
|
||||
return {
|
||||
textDocument: {
|
||||
uri: textModel.uri.toString(true),
|
||||
},
|
||||
position: {
|
||||
line: monacoPos.lineNumber - 1,
|
||||
character: monacoPos.column - 1,
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
translateRange(textModel: monaco.editor.ITextModel, monacoRange: monaco.Range): Range {
|
||||
return {
|
||||
start: {
|
||||
line: monacoRange.startLineNumber - 1,
|
||||
character: monacoRange.startColumn - 1,
|
||||
},
|
||||
end: {
|
||||
line: monacoRange.endLineNumber - 1,
|
||||
character: monacoRange.endColumn - 1,
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
class ManagedModel extends Disposable {
|
||||
constructor(
|
||||
private readonly _textModel: monaco.editor.ITextModel,
|
||||
private readonly _api: typeof api.TServerInterface
|
||||
) {
|
||||
super();
|
||||
|
||||
const uri = _textModel.uri.toString(true).toLowerCase();
|
||||
|
||||
this._api.textDocumentDidOpen({
|
||||
textDocument: {
|
||||
languageId: _textModel.getLanguageId(),
|
||||
uri: uri,
|
||||
version: _textModel.getVersionId(),
|
||||
text: _textModel.getValue(),
|
||||
}
|
||||
});
|
||||
|
||||
this._register(_textModel.onDidChangeContent(e => {
|
||||
const contentChanges = e.changes.map(c => toLspTextDocumentContentChangeEvent(c));
|
||||
|
||||
this._api.textDocumentDidChange({
|
||||
textDocument: {
|
||||
uri: uri,
|
||||
version: _textModel.getVersionId(),
|
||||
},
|
||||
contentChanges: contentChanges
|
||||
});
|
||||
}));
|
||||
|
||||
this._register({
|
||||
dispose: () => {
|
||||
this._api.textDocumentDidClose({
|
||||
textDocument: {
|
||||
uri: uri,
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function toLspTextDocumentContentChangeEvent(change: monaco.editor.IModelContentChange): TextDocumentContentChangeEvent {
|
||||
return {
|
||||
range: toLspRange(change.range),
|
||||
rangeLength: change.rangeLength,
|
||||
text: change.text,
|
||||
};
|
||||
}
|
||||
|
||||
function toLspRange(range: monaco.IRange): Range {
|
||||
return {
|
||||
start: {
|
||||
line: range.startLineNumber - 1,
|
||||
character: range.startColumn - 1,
|
||||
},
|
||||
end: {
|
||||
line: range.endLineNumber - 1,
|
||||
character: range.endColumn - 1,
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,169 @@
|
|||
import * as monaco from 'monaco-editor-core';
|
||||
import { capabilities, CodeActionRegistrationOptions, Command, WorkspaceEdit, CodeAction } from '../../../src/types';
|
||||
import { Disposable } from '../../utils';
|
||||
import { LspConnection } from '../LspConnection';
|
||||
import { toMonacoLanguageSelector } from './common';
|
||||
import { lspCodeActionKindToMonacoCodeActionKind, toMonacoCodeActionKind, toLspDiagnosticSeverity, toLspCodeActionTriggerKind, toMonacoCommand } from './common';
|
||||
|
||||
export class LspCodeActionFeature extends Disposable {
|
||||
constructor(
|
||||
private readonly _connection: LspConnection,
|
||||
) {
|
||||
super();
|
||||
|
||||
this._register(this._connection.capabilities.addStaticClientCapabilities({
|
||||
textDocument: {
|
||||
codeAction: {
|
||||
dynamicRegistration: true,
|
||||
codeActionLiteralSupport: {
|
||||
codeActionKind: {
|
||||
valueSet: Array.from(lspCodeActionKindToMonacoCodeActionKind.keys()),
|
||||
}
|
||||
},
|
||||
isPreferredSupport: true,
|
||||
disabledSupport: true,
|
||||
dataSupport: true,
|
||||
resolveSupport: {
|
||||
properties: ['edit'],
|
||||
},
|
||||
}
|
||||
}
|
||||
}));
|
||||
|
||||
this._register(this._connection.capabilities.registerCapabilityHandler(capabilities.textDocumentCodeAction, true, capability => {
|
||||
return monaco.languages.registerCodeActionProvider(
|
||||
toMonacoLanguageSelector(capability.documentSelector),
|
||||
new LspCodeActionProvider(this._connection, capability),
|
||||
);
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
interface ExtendedCodeAction extends monaco.languages.CodeAction {
|
||||
_lspAction?: CodeAction;
|
||||
}
|
||||
|
||||
class LspCodeActionProvider implements monaco.languages.CodeActionProvider {
|
||||
public readonly resolveCodeAction;
|
||||
|
||||
constructor(
|
||||
private readonly _client: LspConnection,
|
||||
private readonly _capabilities: CodeActionRegistrationOptions,
|
||||
) {
|
||||
if (_capabilities.resolveProvider) {
|
||||
this.resolveCodeAction = async (codeAction: ExtendedCodeAction, token: monaco.CancellationToken): Promise<ExtendedCodeAction> => {
|
||||
if (codeAction._lspAction) {
|
||||
const resolved = await this._client.server.codeActionResolve(codeAction._lspAction);
|
||||
if (resolved.edit) {
|
||||
codeAction.edit = toMonacoWorkspaceEdit(resolved.edit, this._client);
|
||||
}
|
||||
if (resolved.command) {
|
||||
codeAction.command = toMonacoCommand(resolved.command);
|
||||
}
|
||||
}
|
||||
return codeAction;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
async provideCodeActions(
|
||||
model: monaco.editor.ITextModel,
|
||||
range: monaco.Range,
|
||||
context: monaco.languages.CodeActionContext,
|
||||
token: monaco.CancellationToken
|
||||
): Promise<monaco.languages.CodeActionList | null> {
|
||||
const translated = this._client.bridge.translate(model, range.getStartPosition());
|
||||
|
||||
const result = await this._client.server.textDocumentCodeAction({
|
||||
textDocument: translated.textDocument,
|
||||
range: this._client.bridge.translateRange(model, range),
|
||||
context: {
|
||||
diagnostics: context.markers.map(marker => ({
|
||||
range: this._client.bridge.translateRange(model, monaco.Range.lift(marker)),
|
||||
message: marker.message,
|
||||
severity: toLspDiagnosticSeverity(marker.severity),
|
||||
})),
|
||||
triggerKind: toLspCodeActionTriggerKind(context.trigger),
|
||||
},
|
||||
});
|
||||
|
||||
if (!result) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const actions = Array.isArray(result) ? result : [result];
|
||||
|
||||
return {
|
||||
actions: actions.map(action => {
|
||||
if ('title' in action && !('kind' in action)) {
|
||||
// Command
|
||||
const cmd = action as Command;
|
||||
const monacoAction: ExtendedCodeAction = {
|
||||
title: cmd.title,
|
||||
command: toMonacoCommand(cmd),
|
||||
};
|
||||
return monacoAction;
|
||||
} else {
|
||||
// CodeAction
|
||||
const codeAction = action as CodeAction;
|
||||
const monacoAction: ExtendedCodeAction = {
|
||||
title: codeAction.title,
|
||||
kind: toMonacoCodeActionKind(codeAction.kind),
|
||||
isPreferred: codeAction.isPreferred,
|
||||
disabled: codeAction.disabled?.reason,
|
||||
edit: codeAction.edit ? toMonacoWorkspaceEdit(codeAction.edit, this._client) : undefined,
|
||||
command: toMonacoCommand(codeAction.command),
|
||||
_lspAction: codeAction,
|
||||
};
|
||||
return monacoAction;
|
||||
}
|
||||
}),
|
||||
dispose: () => { },
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
function toMonacoWorkspaceEdit(
|
||||
edit: WorkspaceEdit,
|
||||
client: LspConnection
|
||||
): monaco.languages.WorkspaceEdit {
|
||||
const edits: monaco.languages.IWorkspaceTextEdit[] = [];
|
||||
|
||||
if (edit.changes) {
|
||||
for (const uri in edit.changes) {
|
||||
const textEdits = edit.changes[uri];
|
||||
for (const textEdit of textEdits) {
|
||||
const translated = client.bridge.translateBackRange({ uri }, textEdit.range);
|
||||
edits.push({
|
||||
resource: translated.textModel.uri,
|
||||
versionId: undefined,
|
||||
textEdit: {
|
||||
range: translated.range,
|
||||
text: textEdit.newText,
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (edit.documentChanges) {
|
||||
for (const change of edit.documentChanges) {
|
||||
if ('textDocument' in change) {
|
||||
const uri = change.textDocument.uri;
|
||||
for (const textEdit of change.edits) {
|
||||
const translated = client.bridge.translateBackRange({ uri }, textEdit.range);
|
||||
edits.push({
|
||||
resource: translated.textModel.uri,
|
||||
versionId: change.textDocument.version ?? undefined,
|
||||
textEdit: {
|
||||
range: translated.range,
|
||||
text: textEdit.newText,
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return { edits };
|
||||
}
|
||||
|
|
@ -0,0 +1,90 @@
|
|||
import * as monaco from 'monaco-editor-core';
|
||||
import { capabilities, CodeLensRegistrationOptions, CodeLens } from '../../../src/types';
|
||||
import { Disposable } from '../../utils';
|
||||
import { LspConnection } from '../LspConnection';
|
||||
import { toMonacoLanguageSelector } from './common';
|
||||
import { assertTargetTextModel } from '../ITextModelBridge';
|
||||
import { toMonacoCommand } from './common';
|
||||
|
||||
export class LspCodeLensFeature extends Disposable {
|
||||
constructor(
|
||||
private readonly _connection: LspConnection,
|
||||
) {
|
||||
super();
|
||||
|
||||
this._register(this._connection.capabilities.addStaticClientCapabilities({
|
||||
textDocument: {
|
||||
codeLens: {
|
||||
dynamicRegistration: true,
|
||||
}
|
||||
}
|
||||
}));
|
||||
|
||||
this._register(this._connection.capabilities.registerCapabilityHandler(capabilities.textDocumentCodeLens, true, capability => {
|
||||
return monaco.languages.registerCodeLensProvider(
|
||||
toMonacoLanguageSelector(capability.documentSelector),
|
||||
new LspCodeLensProvider(this._connection, capability),
|
||||
);
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
interface ExtendedCodeLens extends monaco.languages.CodeLens {
|
||||
_lspCodeLens?: CodeLens;
|
||||
}
|
||||
|
||||
class LspCodeLensProvider implements monaco.languages.CodeLensProvider {
|
||||
constructor(
|
||||
private readonly _client: LspConnection,
|
||||
private readonly _capabilities: CodeLensRegistrationOptions,
|
||||
) { }
|
||||
|
||||
async provideCodeLenses(
|
||||
model: monaco.editor.ITextModel,
|
||||
token: monaco.CancellationToken
|
||||
): Promise<monaco.languages.CodeLensList | null> {
|
||||
const translated = this._client.bridge.translate(model, new monaco.Position(1, 1));
|
||||
|
||||
const result = await this._client.server.textDocumentCodeLens({
|
||||
textDocument: translated.textDocument,
|
||||
});
|
||||
|
||||
if (!result) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return {
|
||||
lenses: result.map(lens => {
|
||||
const monacoLens: ExtendedCodeLens = {
|
||||
range: assertTargetTextModel(this._client.bridge.translateBackRange(translated.textDocument, lens.range), model).range,
|
||||
command: toMonacoCommand(lens.command),
|
||||
_lspCodeLens: lens,
|
||||
};
|
||||
return monacoLens;
|
||||
}),
|
||||
dispose: () => { },
|
||||
};
|
||||
}
|
||||
|
||||
async resolveCodeLens(
|
||||
model: monaco.editor.ITextModel,
|
||||
codeLens: ExtendedCodeLens,
|
||||
token: monaco.CancellationToken
|
||||
): Promise<monaco.languages.CodeLens> {
|
||||
if (!this._capabilities.resolveProvider || !codeLens._lspCodeLens) {
|
||||
return codeLens;
|
||||
}
|
||||
|
||||
const resolved = await this._client.server.codeLensResolve(codeLens._lspCodeLens);
|
||||
|
||||
if (resolved.command) {
|
||||
codeLens.command = {
|
||||
id: resolved.command.command,
|
||||
title: resolved.command.title,
|
||||
arguments: resolved.command.arguments,
|
||||
};
|
||||
}
|
||||
|
||||
return codeLens;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,202 @@
|
|||
import * as monaco from 'monaco-editor-core';
|
||||
import { capabilities, CompletionRegistrationOptions, MarkupContent, CompletionItem, TextDocumentPositionParams } from '../../../src/types';
|
||||
import { assertTargetTextModel, ITextModelBridge } from '../ITextModelBridge';
|
||||
import { Disposable } from '../../utils';
|
||||
import { LspConnection } from '../LspConnection';
|
||||
import { toMonacoLanguageSelector } from './common';
|
||||
import {
|
||||
lspCompletionItemKindToMonacoCompletionItemKind,
|
||||
lspCompletionItemTagToMonacoCompletionItemTag,
|
||||
toMonacoCompletionItemKind,
|
||||
toMonacoCompletionItemTag,
|
||||
toLspCompletionTriggerKind,
|
||||
toMonacoInsertTextRules,
|
||||
toMonacoCommand,
|
||||
} from './common';
|
||||
|
||||
export class LspCompletionFeature extends Disposable {
|
||||
constructor(
|
||||
private readonly _connection: LspConnection,
|
||||
) {
|
||||
super();
|
||||
|
||||
this._register(this._connection.capabilities.addStaticClientCapabilities({
|
||||
textDocument: {
|
||||
completion: {
|
||||
dynamicRegistration: true,
|
||||
contextSupport: true,
|
||||
completionItemKind: {
|
||||
valueSet: Array.from(lspCompletionItemKindToMonacoCompletionItemKind.keys()),
|
||||
},
|
||||
completionItem: {
|
||||
tagSupport: {
|
||||
valueSet: Array.from(lspCompletionItemTagToMonacoCompletionItemTag.keys()),
|
||||
},
|
||||
commitCharactersSupport: true,
|
||||
deprecatedSupport: true,
|
||||
preselectSupport: true,
|
||||
}
|
||||
}
|
||||
}
|
||||
}));
|
||||
|
||||
this._register(this._connection.capabilities.registerCapabilityHandler(capabilities.textDocumentCompletion, true, capability => {
|
||||
return monaco.languages.registerCompletionItemProvider(
|
||||
toMonacoLanguageSelector(capability.documentSelector),
|
||||
new LspCompletionProvider(this._connection, capability),
|
||||
);
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
interface ExtendedCompletionItem extends monaco.languages.CompletionItem {
|
||||
_lspItem: CompletionItem;
|
||||
_translated: TextDocumentPositionParams;
|
||||
_model: monaco.editor.ITextModel;
|
||||
}
|
||||
|
||||
class LspCompletionProvider implements monaco.languages.CompletionItemProvider {
|
||||
public readonly resolveCompletionItem;
|
||||
|
||||
constructor(
|
||||
private readonly _client: LspConnection,
|
||||
private readonly _capabilities: CompletionRegistrationOptions,
|
||||
) {
|
||||
if (_capabilities.resolveProvider) {
|
||||
this.resolveCompletionItem = async (item: ExtendedCompletionItem, token: monaco.CancellationToken): Promise<ExtendedCompletionItem> => {
|
||||
const resolved = await this._client.server.completionItemResolve(item._lspItem);
|
||||
applyLspCompletionItemProperties(item, resolved, this._client.bridge, item._translated, item._model);
|
||||
return item;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
get triggerCharacters(): string[] | undefined {
|
||||
return this._capabilities.triggerCharacters;
|
||||
}
|
||||
|
||||
async provideCompletionItems(
|
||||
model: monaco.editor.ITextModel,
|
||||
position: monaco.Position,
|
||||
context: monaco.languages.CompletionContext,
|
||||
token: monaco.CancellationToken
|
||||
): Promise<monaco.languages.CompletionList & { suggestions: ExtendedCompletionItem[] }> {
|
||||
const translated = this._client.bridge.translate(model, position);
|
||||
|
||||
const result = await this._client.server.textDocumentCompletion({
|
||||
textDocument: translated.textDocument,
|
||||
position: translated.position,
|
||||
context: context.triggerCharacter ? {
|
||||
triggerKind: toLspCompletionTriggerKind(context.triggerKind),
|
||||
triggerCharacter: context.triggerCharacter,
|
||||
} : undefined,
|
||||
});
|
||||
if (!result) {
|
||||
return { suggestions: [] };
|
||||
}
|
||||
|
||||
const items = Array.isArray(result) ? result : result.items;
|
||||
|
||||
return {
|
||||
suggestions: items.map<ExtendedCompletionItem>(i => {
|
||||
const item: ExtendedCompletionItem = {
|
||||
...convertLspToMonacoCompletionItem(
|
||||
i,
|
||||
this._client.bridge,
|
||||
translated,
|
||||
model,
|
||||
position
|
||||
),
|
||||
_lspItem: i,
|
||||
_translated: translated,
|
||||
_model: model,
|
||||
};
|
||||
|
||||
return item;
|
||||
})
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
function convertLspToMonacoCompletionItem(
|
||||
lspItem: CompletionItem,
|
||||
bridge: ITextModelBridge,
|
||||
translated: TextDocumentPositionParams,
|
||||
model: monaco.editor.ITextModel,
|
||||
position: monaco.Position
|
||||
): monaco.languages.CompletionItem {
|
||||
let insertText = lspItem.insertText || lspItem.label;
|
||||
let range: monaco.IRange | monaco.languages.CompletionItemRanges | undefined = undefined;
|
||||
|
||||
if (lspItem.textEdit) {
|
||||
if ('range' in lspItem.textEdit) {
|
||||
insertText = lspItem.textEdit.newText;
|
||||
range = assertTargetTextModel(bridge.translateBackRange(translated.textDocument, lspItem.textEdit.range), model).range;
|
||||
} else {
|
||||
insertText = lspItem.textEdit.newText;
|
||||
range = {
|
||||
insert: assertTargetTextModel(bridge.translateBackRange(translated.textDocument, lspItem.textEdit.insert), model).range,
|
||||
replace: assertTargetTextModel(bridge.translateBackRange(translated.textDocument, lspItem.textEdit.replace), model).range,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
if (!range) {
|
||||
range = monaco.Range.fromPositions(position, position);
|
||||
}
|
||||
|
||||
const item: monaco.languages.CompletionItem = {
|
||||
label: lspItem.label,
|
||||
kind: toMonacoCompletionItemKind(lspItem.kind),
|
||||
insertText,
|
||||
sortText: lspItem.sortText,
|
||||
filterText: lspItem.filterText,
|
||||
preselect: lspItem.preselect,
|
||||
commitCharacters: lspItem.commitCharacters,
|
||||
range: range,
|
||||
};
|
||||
|
||||
applyLspCompletionItemProperties(item, lspItem, bridge, translated, model);
|
||||
|
||||
return item;
|
||||
}
|
||||
|
||||
function applyLspCompletionItemProperties(
|
||||
monacoItem: monaco.languages.CompletionItem,
|
||||
lspItem: CompletionItem,
|
||||
bridge: ITextModelBridge,
|
||||
translated: TextDocumentPositionParams,
|
||||
targetModel: monaco.editor.ITextModel
|
||||
): void {
|
||||
if (lspItem.detail !== undefined) {
|
||||
monacoItem.detail = lspItem.detail;
|
||||
}
|
||||
if (lspItem.documentation !== undefined) {
|
||||
monacoItem.documentation = toMonacoDocumentation(lspItem.documentation);
|
||||
}
|
||||
if (lspItem.insertTextFormat !== undefined) {
|
||||
const insertTextRules = toMonacoInsertTextRules(lspItem.insertTextFormat);
|
||||
monacoItem.insertTextRules = insertTextRules;
|
||||
}
|
||||
if (lspItem.tags && lspItem.tags.length > 0) {
|
||||
monacoItem.tags = lspItem.tags.map(toMonacoCompletionItemTag).filter((tag): tag is monaco.languages.CompletionItemTag => tag !== undefined);
|
||||
}
|
||||
if (lspItem.additionalTextEdits && lspItem.additionalTextEdits.length > 0) {
|
||||
monacoItem.additionalTextEdits = lspItem.additionalTextEdits.map(edit => ({
|
||||
range: assertTargetTextModel(bridge.translateBackRange(translated.textDocument, edit.range), targetModel).range,
|
||||
text: edit.newText,
|
||||
}));
|
||||
}
|
||||
if (lspItem.command) {
|
||||
monacoItem.command = toMonacoCommand(lspItem.command);
|
||||
}
|
||||
}
|
||||
|
||||
function toMonacoDocumentation(doc: string | MarkupContent | undefined): string | monaco.IMarkdownString | undefined {
|
||||
if (!doc) return undefined;
|
||||
if (typeof doc === 'string') return doc;
|
||||
return {
|
||||
value: doc.value,
|
||||
isTrusted: true,
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,60 @@
|
|||
import * as monaco from 'monaco-editor-core';
|
||||
import { capabilities, DeclarationRegistrationOptions } from '../../../src/types';
|
||||
import { Disposable } from '../../utils';
|
||||
import { LspConnection } from '../LspConnection';
|
||||
import { toMonacoLanguageSelector } from './common';
|
||||
import { toMonacoLocation } from "./common";
|
||||
|
||||
export class LspDeclarationFeature extends Disposable {
|
||||
constructor(
|
||||
private readonly _connection: LspConnection,
|
||||
) {
|
||||
super();
|
||||
|
||||
this._register(this._connection.capabilities.addStaticClientCapabilities({
|
||||
textDocument: {
|
||||
declaration: {
|
||||
dynamicRegistration: true,
|
||||
linkSupport: true,
|
||||
}
|
||||
}
|
||||
}));
|
||||
|
||||
this._register(this._connection.capabilities.registerCapabilityHandler(capabilities.textDocumentDeclaration, true, capability => {
|
||||
return monaco.languages.registerDeclarationProvider(
|
||||
toMonacoLanguageSelector(capability.documentSelector),
|
||||
new LspDeclarationProvider(this._connection, capability),
|
||||
);
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
class LspDeclarationProvider implements monaco.languages.DeclarationProvider {
|
||||
constructor(
|
||||
private readonly _client: LspConnection,
|
||||
private readonly _capabilities: DeclarationRegistrationOptions,
|
||||
) { }
|
||||
|
||||
async provideDeclaration(
|
||||
model: monaco.editor.ITextModel,
|
||||
position: monaco.Position,
|
||||
token: monaco.CancellationToken
|
||||
): Promise<monaco.languages.Definition | monaco.languages.LocationLink[] | null> {
|
||||
const translated = this._client.bridge.translate(model, position);
|
||||
|
||||
const result = await this._client.server.textDocumentDeclaration({
|
||||
textDocument: translated.textDocument,
|
||||
position: translated.position,
|
||||
});
|
||||
|
||||
if (!result) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (Array.isArray(result)) {
|
||||
return result.map(loc => toMonacoLocation(loc, this._client));
|
||||
}
|
||||
|
||||
return toMonacoLocation(result, this._client);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,60 @@
|
|||
import * as monaco from 'monaco-editor-core';
|
||||
import { capabilities, DefinitionRegistrationOptions } from '../../../src/types';
|
||||
import { Disposable } from '../../utils';
|
||||
import { LspConnection } from '../LspConnection';
|
||||
import { toMonacoLanguageSelector } from './common';
|
||||
import { toMonacoLocation } from "./common";
|
||||
|
||||
export class LspDefinitionFeature extends Disposable {
|
||||
constructor(
|
||||
private readonly _connection: LspConnection,
|
||||
) {
|
||||
super();
|
||||
|
||||
this._register(this._connection.capabilities.addStaticClientCapabilities({
|
||||
textDocument: {
|
||||
definition: {
|
||||
dynamicRegistration: true,
|
||||
linkSupport: true,
|
||||
}
|
||||
}
|
||||
}));
|
||||
|
||||
this._register(this._connection.capabilities.registerCapabilityHandler(capabilities.textDocumentDefinition, true, capability => {
|
||||
return monaco.languages.registerDefinitionProvider(
|
||||
toMonacoLanguageSelector(capability.documentSelector),
|
||||
new LspDefinitionProvider(this._connection, capability),
|
||||
);
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
class LspDefinitionProvider implements monaco.languages.DefinitionProvider {
|
||||
constructor(
|
||||
private readonly _client: LspConnection,
|
||||
private readonly _capabilities: DefinitionRegistrationOptions,
|
||||
) { }
|
||||
|
||||
async provideDefinition(
|
||||
model: monaco.editor.ITextModel,
|
||||
position: monaco.Position,
|
||||
token: monaco.CancellationToken
|
||||
): Promise<monaco.languages.Definition | monaco.languages.LocationLink[] | null> {
|
||||
const translated = this._client.bridge.translate(model, position);
|
||||
|
||||
const result = await this._client.server.textDocumentDefinition({
|
||||
textDocument: translated.textDocument,
|
||||
position: translated.position,
|
||||
});
|
||||
|
||||
if (!result) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (Array.isArray(result)) {
|
||||
return result.map(loc => toMonacoLocation(loc, this._client));
|
||||
}
|
||||
|
||||
return toMonacoLocation(result, this._client);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,208 @@
|
|||
import * as monaco from 'monaco-editor-core';
|
||||
import { api, capabilities, Diagnostic, DiagnosticRegistrationOptions, DocumentDiagnosticReport, PublishDiagnosticsParams } from '../../../src/types';
|
||||
import { Disposable, DisposableStore } from '../../utils';
|
||||
import { LspConnection } from '../LspConnection';
|
||||
import { lspDiagnosticTagToMonacoMarkerTag, matchesDocumentSelector, toDiagnosticMarker } from './common';
|
||||
|
||||
export class LspDiagnosticsFeature extends Disposable {
|
||||
private readonly _diagnosticsMarkerOwner = 'lsp';
|
||||
private readonly _pullDiagnosticProviders = new Map<monaco.editor.ITextModel, ModelDiagnosticProvider>();
|
||||
|
||||
constructor(
|
||||
private readonly _connection: LspConnection,
|
||||
) {
|
||||
super();
|
||||
|
||||
this._register(this._connection.capabilities.addStaticClientCapabilities({
|
||||
textDocument: {
|
||||
publishDiagnostics: {
|
||||
relatedInformation: true,
|
||||
tagSupport: {
|
||||
valueSet: [...lspDiagnosticTagToMonacoMarkerTag.keys()],
|
||||
},
|
||||
versionSupport: true,
|
||||
codeDescriptionSupport: true,
|
||||
dataSupport: true,
|
||||
},
|
||||
diagnostic: {
|
||||
dynamicRegistration: true,
|
||||
relatedDocumentSupport: true,
|
||||
}
|
||||
}
|
||||
}));
|
||||
|
||||
debugger;
|
||||
this._register(this._connection.connection.registerNotificationHandler(
|
||||
api.client.textDocumentPublishDiagnostics,
|
||||
(params) => this._handlePublishDiagnostics(params)
|
||||
));
|
||||
|
||||
this._register(this._connection.capabilities.registerCapabilityHandler(
|
||||
capabilities.textDocumentDiagnostic,
|
||||
true,
|
||||
(capability) => {
|
||||
const disposables = new DisposableStore();
|
||||
for (const model of monaco.editor.getModels()) {
|
||||
this._addPullDiagnosticProvider(model, capability, disposables);
|
||||
}
|
||||
disposables.add(monaco.editor.onDidCreateModel(model => {
|
||||
this._addPullDiagnosticProvider(model, capability, disposables);
|
||||
}));
|
||||
return disposables;
|
||||
}
|
||||
));
|
||||
}
|
||||
|
||||
private _addPullDiagnosticProvider(
|
||||
model: monaco.editor.ITextModel,
|
||||
capability: DiagnosticRegistrationOptions,
|
||||
disposables: DisposableStore
|
||||
): void {
|
||||
// Check if model matches the document selector
|
||||
const languageId = model.getLanguageId();
|
||||
|
||||
if (!matchesDocumentSelector(model, capability.documentSelector)) {
|
||||
return;
|
||||
}
|
||||
|
||||
const provider = new ModelDiagnosticProvider(
|
||||
model,
|
||||
this._connection,
|
||||
this._diagnosticsMarkerOwner,
|
||||
capability
|
||||
);
|
||||
|
||||
this._pullDiagnosticProviders.set(model, provider);
|
||||
disposables.add(provider);
|
||||
|
||||
disposables.add(model.onWillDispose(() => {
|
||||
this._pullDiagnosticProviders.delete(model);
|
||||
}));
|
||||
}
|
||||
|
||||
private _handlePublishDiagnostics(params: PublishDiagnosticsParams): void {
|
||||
const uri = params.uri;
|
||||
|
||||
try {
|
||||
const translated = this._connection.bridge.translateBack({ uri }, { line: 0, character: 0 });
|
||||
const model = translated.textModel;
|
||||
|
||||
if (!model || model.isDisposed()) {
|
||||
return;
|
||||
}
|
||||
|
||||
const markers = params.diagnostics.map(diagnostic =>
|
||||
toDiagnosticMarker(diagnostic)
|
||||
);
|
||||
|
||||
monaco.editor.setModelMarkers(model, this._diagnosticsMarkerOwner, markers);
|
||||
} catch (error) {
|
||||
// Model not found or already disposed - this is normal when files are closed
|
||||
console.debug(`Could not set diagnostics for ${uri}:`, error);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Manages pull diagnostics for a single text model
|
||||
*/
|
||||
class ModelDiagnosticProvider extends Disposable {
|
||||
private _updateHandle: number | undefined;
|
||||
private _previousResultId: string | undefined;
|
||||
|
||||
constructor(
|
||||
private readonly _model: monaco.editor.ITextModel,
|
||||
private readonly _connection: LspConnection,
|
||||
private readonly _markerOwner: string,
|
||||
private readonly _capability: DiagnosticRegistrationOptions,
|
||||
) {
|
||||
super();
|
||||
this._register(this._model.onDidChangeContent(() => {
|
||||
this._scheduleDiagnosticUpdate();
|
||||
}));
|
||||
this._scheduleDiagnosticUpdate();
|
||||
}
|
||||
|
||||
private _scheduleDiagnosticUpdate(): void {
|
||||
if (this._updateHandle !== undefined) {
|
||||
clearTimeout(this._updateHandle);
|
||||
}
|
||||
|
||||
this._updateHandle = window.setTimeout(() => {
|
||||
this._updateHandle = undefined;
|
||||
this._requestDiagnostics();
|
||||
}, 500);
|
||||
}
|
||||
|
||||
private async _requestDiagnostics(): Promise<void> {
|
||||
if (this._model.isDisposed()) {
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
const translated = this._connection.bridge.translate(this._model, new monaco.Position(1, 1));
|
||||
|
||||
const result = await this._connection.server.textDocumentDiagnostic({
|
||||
textDocument: translated.textDocument,
|
||||
identifier: this._capability.identifier,
|
||||
previousResultId: this._previousResultId,
|
||||
});
|
||||
|
||||
if (this._model.isDisposed()) {
|
||||
return;
|
||||
}
|
||||
|
||||
this._handleDiagnosticReport(result);
|
||||
} catch (error) {
|
||||
console.error('Error requesting diagnostics:', error);
|
||||
}
|
||||
}
|
||||
|
||||
private _handleDiagnosticReport(report: DocumentDiagnosticReport): void {
|
||||
if (report.kind === 'full') {
|
||||
// Full diagnostic report
|
||||
this._previousResultId = report.resultId;
|
||||
|
||||
const markers = report.items.map(diagnostic => toDiagnosticMarker(diagnostic));
|
||||
monaco.editor.setModelMarkers(this._model, this._markerOwner, markers);
|
||||
|
||||
// Handle related documents if present
|
||||
if ('relatedDocuments' in report && report.relatedDocuments) {
|
||||
this._handleRelatedDocuments(report.relatedDocuments);
|
||||
}
|
||||
} else if (report.kind === 'unchanged') {
|
||||
// Unchanged report - diagnostics are still valid
|
||||
this._previousResultId = report.resultId;
|
||||
// No need to update markers
|
||||
}
|
||||
}
|
||||
|
||||
private _handleRelatedDocuments(relatedDocuments: { [key: string]: any }): void {
|
||||
for (const [uri, report] of Object.entries(relatedDocuments)) {
|
||||
try {
|
||||
const translated = this._connection.bridge.translateBack({ uri }, { line: 0, character: 0 });
|
||||
const model = translated.textModel;
|
||||
|
||||
if (!model || model.isDisposed()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (report.kind === 'full') {
|
||||
const markers = report.items.map((diagnostic: Diagnostic) => toDiagnosticMarker(diagnostic));
|
||||
monaco.editor.setModelMarkers(model, this._markerOwner, markers);
|
||||
}
|
||||
} catch (error) {
|
||||
// Model not found - this is normal
|
||||
console.debug(`Could not set related diagnostics for ${uri}:`, error);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override dispose(): void {
|
||||
if (this._updateHandle !== undefined) {
|
||||
clearTimeout(this._updateHandle);
|
||||
this._updateHandle = undefined;
|
||||
}
|
||||
super.dispose();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
import * as monaco from 'monaco-editor-core';
|
||||
import { capabilities, DocumentHighlightRegistrationOptions } from '../../../src/types';
|
||||
import { Disposable } from '../../utils';
|
||||
import { LspConnection } from '../LspConnection';
|
||||
import { toMonacoLanguageSelector } from './common';
|
||||
import { toMonacoDocumentHighlightKind } from './common';
|
||||
|
||||
export class LspDocumentHighlightFeature extends Disposable {
|
||||
constructor(
|
||||
private readonly _connection: LspConnection,
|
||||
) {
|
||||
super();
|
||||
|
||||
this._register(this._connection.capabilities.addStaticClientCapabilities({
|
||||
textDocument: {
|
||||
documentHighlight: {
|
||||
dynamicRegistration: true,
|
||||
}
|
||||
}
|
||||
}));
|
||||
|
||||
this._register(this._connection.capabilities.registerCapabilityHandler(capabilities.textDocumentDocumentHighlight, true, capability => {
|
||||
return monaco.languages.registerDocumentHighlightProvider(
|
||||
toMonacoLanguageSelector(capability.documentSelector),
|
||||
new LspDocumentHighlightProvider(this._connection, capability),
|
||||
);
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
class LspDocumentHighlightProvider implements monaco.languages.DocumentHighlightProvider {
|
||||
constructor(
|
||||
private readonly _client: LspConnection,
|
||||
private readonly _capabilities: DocumentHighlightRegistrationOptions,
|
||||
) { }
|
||||
|
||||
async provideDocumentHighlights(
|
||||
model: monaco.editor.ITextModel,
|
||||
position: monaco.Position,
|
||||
token: monaco.CancellationToken
|
||||
): Promise<monaco.languages.DocumentHighlight[] | null> {
|
||||
const translated = this._client.bridge.translate(model, position);
|
||||
|
||||
const result = await this._client.server.textDocumentDocumentHighlight({
|
||||
textDocument: translated.textDocument,
|
||||
position: translated.position,
|
||||
});
|
||||
|
||||
if (!result) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return result.map(highlight => ({
|
||||
range: this._client.bridge.translateBackRange(translated.textDocument, highlight.range).range,
|
||||
kind: toMonacoDocumentHighlightKind(highlight.kind),
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,71 @@
|
|||
import * as monaco from 'monaco-editor-core';
|
||||
import { capabilities, DocumentLinkRegistrationOptions } from '../../../src/types';
|
||||
import { Disposable } from '../../utils';
|
||||
import { LspConnection } from '../LspConnection';
|
||||
import { toMonacoLanguageSelector } from './common';
|
||||
|
||||
export class LspDocumentLinkFeature extends Disposable {
|
||||
constructor(
|
||||
private readonly _connection: LspConnection,
|
||||
) {
|
||||
super();
|
||||
|
||||
this._register(this._connection.capabilities.addStaticClientCapabilities({
|
||||
textDocument: {
|
||||
documentLink: {
|
||||
dynamicRegistration: true,
|
||||
tooltipSupport: true,
|
||||
}
|
||||
}
|
||||
}));
|
||||
|
||||
this._register(this._connection.capabilities.registerCapabilityHandler(capabilities.textDocumentDocumentLink, true, capability => {
|
||||
return monaco.languages.registerLinkProvider(
|
||||
toMonacoLanguageSelector(capability.documentSelector),
|
||||
new LspDocumentLinkProvider(this._connection, capability),
|
||||
);
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
class LspDocumentLinkProvider implements monaco.languages.LinkProvider {
|
||||
constructor(
|
||||
private readonly _client: LspConnection,
|
||||
private readonly _capabilities: DocumentLinkRegistrationOptions,
|
||||
) { }
|
||||
|
||||
async provideLinks(
|
||||
model: monaco.editor.ITextModel,
|
||||
token: monaco.CancellationToken
|
||||
): Promise<monaco.languages.ILinksList | null> {
|
||||
const translated = this._client.bridge.translate(model, new monaco.Position(1, 1));
|
||||
|
||||
const result = await this._client.server.textDocumentDocumentLink({
|
||||
textDocument: translated.textDocument,
|
||||
});
|
||||
|
||||
if (!result) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return {
|
||||
links: result.map(link => ({
|
||||
range: this._client.bridge.translateBackRange(translated.textDocument, link.range).range,
|
||||
url: link.target,
|
||||
tooltip: link.tooltip,
|
||||
})),
|
||||
};
|
||||
}
|
||||
|
||||
async resolveLink(
|
||||
link: monaco.languages.ILink,
|
||||
token: monaco.CancellationToken
|
||||
): Promise<monaco.languages.ILink> {
|
||||
if (!this._capabilities.resolveProvider) {
|
||||
return link;
|
||||
}
|
||||
|
||||
// TODO: Implement resolve
|
||||
return link;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,101 @@
|
|||
import * as monaco from 'monaco-editor-core';
|
||||
import { capabilities, DocumentSymbolRegistrationOptions, DocumentSymbol, SymbolInformation, SymbolTag } from '../../../src/types';
|
||||
import { Disposable } from '../../utils';
|
||||
import { LspConnection } from '../LspConnection';
|
||||
import { toMonacoLanguageSelector } from './common';
|
||||
import { lspSymbolKindToMonacoSymbolKind, toMonacoSymbolKind, toMonacoSymbolTag } from './common';
|
||||
|
||||
export class LspDocumentSymbolFeature extends Disposable {
|
||||
constructor(
|
||||
private readonly _connection: LspConnection,
|
||||
) {
|
||||
super();
|
||||
|
||||
this._register(this._connection.capabilities.addStaticClientCapabilities({
|
||||
textDocument: {
|
||||
documentSymbol: {
|
||||
dynamicRegistration: true,
|
||||
hierarchicalDocumentSymbolSupport: true,
|
||||
symbolKind: {
|
||||
valueSet: Array.from(lspSymbolKindToMonacoSymbolKind.keys()),
|
||||
},
|
||||
tagSupport: {
|
||||
valueSet: [SymbolTag.Deprecated],
|
||||
},
|
||||
}
|
||||
}
|
||||
}));
|
||||
|
||||
this._register(this._connection.capabilities.registerCapabilityHandler(capabilities.textDocumentDocumentSymbol, true, capability => {
|
||||
return monaco.languages.registerDocumentSymbolProvider(
|
||||
toMonacoLanguageSelector(capability.documentSelector),
|
||||
new LspDocumentSymbolProvider(this._connection, capability),
|
||||
);
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
class LspDocumentSymbolProvider implements monaco.languages.DocumentSymbolProvider {
|
||||
constructor(
|
||||
private readonly _client: LspConnection,
|
||||
private readonly _capabilities: DocumentSymbolRegistrationOptions,
|
||||
) { }
|
||||
|
||||
async provideDocumentSymbols(
|
||||
model: monaco.editor.ITextModel,
|
||||
token: monaco.CancellationToken
|
||||
): Promise<monaco.languages.DocumentSymbol[] | null> {
|
||||
const translated = this._client.bridge.translate(model, new monaco.Position(1, 1));
|
||||
|
||||
const result = await this._client.server.textDocumentDocumentSymbol({
|
||||
textDocument: translated.textDocument,
|
||||
});
|
||||
|
||||
if (!result) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (Array.isArray(result) && result.length > 0) {
|
||||
if ('location' in result[0]) {
|
||||
// SymbolInformation[]
|
||||
return (result as SymbolInformation[]).map(symbol => toMonacoSymbolInformation(symbol, this._client));
|
||||
} else {
|
||||
// DocumentSymbol[]
|
||||
return (result as DocumentSymbol[]).map(symbol => toMonacoDocumentSymbol(symbol, this._client, translated.textDocument));
|
||||
}
|
||||
}
|
||||
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
function toMonacoDocumentSymbol(
|
||||
symbol: DocumentSymbol,
|
||||
client: LspConnection,
|
||||
textDocument: { uri: string }
|
||||
): monaco.languages.DocumentSymbol {
|
||||
return {
|
||||
name: symbol.name,
|
||||
detail: symbol.detail || '',
|
||||
kind: toMonacoSymbolKind(symbol.kind),
|
||||
tags: symbol.tags?.map(tag => toMonacoSymbolTag(tag)).filter((t): t is monaco.languages.SymbolTag => t !== undefined) || [],
|
||||
range: client.bridge.translateBackRange(textDocument, symbol.range).range,
|
||||
selectionRange: client.bridge.translateBackRange(textDocument, symbol.selectionRange).range,
|
||||
children: symbol.children?.map(child => toMonacoDocumentSymbol(child, client, textDocument)) || [],
|
||||
};
|
||||
}
|
||||
|
||||
function toMonacoSymbolInformation(
|
||||
symbol: SymbolInformation,
|
||||
client: LspConnection
|
||||
): monaco.languages.DocumentSymbol {
|
||||
return {
|
||||
name: symbol.name,
|
||||
detail: '',
|
||||
kind: toMonacoSymbolKind(symbol.kind),
|
||||
tags: symbol.tags?.map(tag => toMonacoSymbolTag(tag)).filter((t): t is monaco.languages.SymbolTag => t !== undefined) || [],
|
||||
range: client.bridge.translateBackRange({ uri: symbol.location.uri }, symbol.location.range).range,
|
||||
selectionRange: client.bridge.translateBackRange({ uri: symbol.location.uri }, symbol.location.range).range,
|
||||
children: [],
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,63 @@
|
|||
import * as monaco from 'monaco-editor-core';
|
||||
import { capabilities, FoldingRangeRegistrationOptions, FoldingRangeKind } from '../../../src/types';
|
||||
import { Disposable } from '../../utils';
|
||||
import { LspConnection } from '../LspConnection';
|
||||
import { toMonacoLanguageSelector } from './common';
|
||||
import { toMonacoFoldingRangeKind } from './common';
|
||||
|
||||
export class LspFoldingRangeFeature extends Disposable {
|
||||
constructor(
|
||||
private readonly _connection: LspConnection,
|
||||
) {
|
||||
super();
|
||||
|
||||
this._register(this._connection.capabilities.addStaticClientCapabilities({
|
||||
textDocument: {
|
||||
foldingRange: {
|
||||
dynamicRegistration: true,
|
||||
rangeLimit: 5000,
|
||||
lineFoldingOnly: false,
|
||||
foldingRangeKind: {
|
||||
valueSet: [FoldingRangeKind.Comment, FoldingRangeKind.Imports, FoldingRangeKind.Region],
|
||||
},
|
||||
}
|
||||
}
|
||||
}));
|
||||
|
||||
this._register(this._connection.capabilities.registerCapabilityHandler(capabilities.textDocumentFoldingRange, true, capability => {
|
||||
return monaco.languages.registerFoldingRangeProvider(
|
||||
toMonacoLanguageSelector(capability.documentSelector),
|
||||
new LspFoldingRangeProvider(this._connection, capability),
|
||||
);
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
class LspFoldingRangeProvider implements monaco.languages.FoldingRangeProvider {
|
||||
constructor(
|
||||
private readonly _client: LspConnection,
|
||||
private readonly _capabilities: FoldingRangeRegistrationOptions,
|
||||
) { }
|
||||
|
||||
async provideFoldingRanges(
|
||||
model: monaco.editor.ITextModel,
|
||||
context: monaco.languages.FoldingContext,
|
||||
token: monaco.CancellationToken
|
||||
): Promise<monaco.languages.FoldingRange[] | null> {
|
||||
const translated = this._client.bridge.translate(model, new monaco.Position(1, 1));
|
||||
|
||||
const result = await this._client.server.textDocumentFoldingRange({
|
||||
textDocument: translated.textDocument,
|
||||
});
|
||||
|
||||
if (!result) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return result.map(range => ({
|
||||
start: range.startLine + 1,
|
||||
end: range.endLine + 1,
|
||||
kind: toMonacoFoldingRangeKind(range.kind),
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,60 @@
|
|||
import * as monaco from 'monaco-editor-core';
|
||||
import { capabilities, DocumentFormattingRegistrationOptions } from '../../../src/types';
|
||||
import { Disposable } from '../../utils';
|
||||
import { LspConnection } from '../LspConnection';
|
||||
import { toMonacoLanguageSelector } from './common';
|
||||
|
||||
export class LspFormattingFeature extends Disposable {
|
||||
constructor(
|
||||
private readonly _connection: LspConnection,
|
||||
) {
|
||||
super();
|
||||
|
||||
this._register(this._connection.capabilities.addStaticClientCapabilities({
|
||||
textDocument: {
|
||||
formatting: {
|
||||
dynamicRegistration: true,
|
||||
}
|
||||
}
|
||||
}));
|
||||
|
||||
this._register(this._connection.capabilities.registerCapabilityHandler(capabilities.textDocumentFormatting, true, capability => {
|
||||
return monaco.languages.registerDocumentFormattingEditProvider(
|
||||
toMonacoLanguageSelector(capability.documentSelector),
|
||||
new LspDocumentFormattingProvider(this._connection, capability),
|
||||
);
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
class LspDocumentFormattingProvider implements monaco.languages.DocumentFormattingEditProvider {
|
||||
constructor(
|
||||
private readonly _client: LspConnection,
|
||||
private readonly _capabilities: DocumentFormattingRegistrationOptions,
|
||||
) { }
|
||||
|
||||
async provideDocumentFormattingEdits(
|
||||
model: monaco.editor.ITextModel,
|
||||
options: monaco.languages.FormattingOptions,
|
||||
token: monaco.CancellationToken
|
||||
): Promise<monaco.languages.TextEdit[] | null> {
|
||||
const translated = this._client.bridge.translate(model, new monaco.Position(1, 1));
|
||||
|
||||
const result = await this._client.server.textDocumentFormatting({
|
||||
textDocument: translated.textDocument,
|
||||
options: {
|
||||
tabSize: options.tabSize,
|
||||
insertSpaces: options.insertSpaces,
|
||||
},
|
||||
});
|
||||
|
||||
if (!result) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return result.map(edit => ({
|
||||
range: this._client.bridge.translateBackRange(translated.textDocument, edit.range).range,
|
||||
text: edit.newText,
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,79 @@
|
|||
import * as monaco from 'monaco-editor-core';
|
||||
import { capabilities, HoverRegistrationOptions, MarkupContent, MarkedString, MarkupKind } from '../../../src/types';
|
||||
import { Disposable } from '../../utils';
|
||||
import { LspConnection } from '../LspConnection';
|
||||
import { toMonacoLanguageSelector } from './common';
|
||||
|
||||
export class LspHoverFeature extends Disposable {
|
||||
constructor(
|
||||
private readonly _connection: LspConnection,
|
||||
) {
|
||||
super();
|
||||
|
||||
this._register(this._connection.capabilities.addStaticClientCapabilities({
|
||||
textDocument: {
|
||||
hover: {
|
||||
dynamicRegistration: true,
|
||||
contentFormat: [MarkupKind.Markdown, MarkupKind.PlainText],
|
||||
}
|
||||
}
|
||||
}));
|
||||
|
||||
this._register(this._connection.capabilities.registerCapabilityHandler(capabilities.textDocumentHover, true, capability => {
|
||||
return monaco.languages.registerHoverProvider(
|
||||
toMonacoLanguageSelector(capability.documentSelector),
|
||||
new LspHoverProvider(this._connection, capability),
|
||||
);
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
class LspHoverProvider implements monaco.languages.HoverProvider {
|
||||
constructor(
|
||||
private readonly _client: LspConnection,
|
||||
private readonly _capabilities: HoverRegistrationOptions,
|
||||
) { }
|
||||
|
||||
async provideHover(
|
||||
model: monaco.editor.ITextModel,
|
||||
position: monaco.Position,
|
||||
token: monaco.CancellationToken
|
||||
): Promise<monaco.languages.Hover | null> {
|
||||
const translated = this._client.bridge.translate(model, position);
|
||||
|
||||
const result = await this._client.server.textDocumentHover({
|
||||
textDocument: translated.textDocument,
|
||||
position: translated.position,
|
||||
});
|
||||
|
||||
if (!result || !result.contents) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return {
|
||||
contents: toMonacoMarkdownString(result.contents),
|
||||
range: result.range ? this._client.bridge.translateBackRange(translated.textDocument, result.range).range : undefined,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
function toMonacoMarkdownString(
|
||||
contents: MarkupContent | MarkedString | MarkedString[]
|
||||
): monaco.IMarkdownString[] {
|
||||
if (Array.isArray(contents)) {
|
||||
return contents.map(c => toSingleMarkdownString(c));
|
||||
}
|
||||
return [toSingleMarkdownString(contents)];
|
||||
}
|
||||
|
||||
function toSingleMarkdownString(content: MarkupContent | MarkedString): monaco.IMarkdownString {
|
||||
if (typeof content === 'string') {
|
||||
return { value: content, isTrusted: true };
|
||||
}
|
||||
if ('kind' in content) {
|
||||
// MarkupContent
|
||||
return { value: content.value, isTrusted: true };
|
||||
}
|
||||
// MarkedString with language
|
||||
return { value: `\`\`\`${content.language}\n${content.value}\n\`\`\``, isTrusted: true };
|
||||
}
|
||||
|
|
@ -0,0 +1,60 @@
|
|||
import * as monaco from 'monaco-editor-core';
|
||||
import { capabilities, ImplementationRegistrationOptions } from '../../../src/types';
|
||||
import { Disposable } from '../../utils';
|
||||
import { LspConnection } from '../LspConnection';
|
||||
import { toMonacoLanguageSelector } from './common';
|
||||
import { toMonacoLocation } from "./common";
|
||||
|
||||
export class LspImplementationFeature extends Disposable {
|
||||
constructor(
|
||||
private readonly _connection: LspConnection,
|
||||
) {
|
||||
super();
|
||||
|
||||
this._register(this._connection.capabilities.addStaticClientCapabilities({
|
||||
textDocument: {
|
||||
implementation: {
|
||||
dynamicRegistration: true,
|
||||
linkSupport: true,
|
||||
}
|
||||
}
|
||||
}));
|
||||
|
||||
this._register(this._connection.capabilities.registerCapabilityHandler(capabilities.textDocumentImplementation, true, capability => {
|
||||
return monaco.languages.registerImplementationProvider(
|
||||
toMonacoLanguageSelector(capability.documentSelector),
|
||||
new LspImplementationProvider(this._connection, capability),
|
||||
);
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
class LspImplementationProvider implements monaco.languages.ImplementationProvider {
|
||||
constructor(
|
||||
private readonly _client: LspConnection,
|
||||
private readonly _capabilities: ImplementationRegistrationOptions,
|
||||
) { }
|
||||
|
||||
async provideImplementation(
|
||||
model: monaco.editor.ITextModel,
|
||||
position: monaco.Position,
|
||||
token: monaco.CancellationToken
|
||||
): Promise<monaco.languages.Definition | monaco.languages.LocationLink[] | null> {
|
||||
const translated = this._client.bridge.translate(model, position);
|
||||
|
||||
const result = await this._client.server.textDocumentImplementation({
|
||||
textDocument: translated.textDocument,
|
||||
position: translated.position,
|
||||
});
|
||||
|
||||
if (!result) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (Array.isArray(result)) {
|
||||
return result.map(loc => toMonacoLocation(loc, this._client));
|
||||
}
|
||||
|
||||
return toMonacoLocation(result, this._client);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,212 @@
|
|||
import * as monaco from 'monaco-editor-core';
|
||||
import { capabilities, InlayHintRegistrationOptions, InlayHint, MarkupContent, api } from '../../../src/types';
|
||||
import { Disposable } from '../../utils';
|
||||
import { LspConnection } from '../LspConnection';
|
||||
import { toMonacoLanguageSelector } from './common';
|
||||
import { assertTargetTextModel } from '../ITextModelBridge';
|
||||
import { toMonacoCommand, toMonacoInlayHintKind } from './common';
|
||||
|
||||
export class LspInlayHintsFeature extends Disposable {
|
||||
private readonly _providers = new Set<LspInlayHintsProvider>();
|
||||
|
||||
constructor(
|
||||
private readonly _connection: LspConnection,
|
||||
) {
|
||||
super();
|
||||
|
||||
this._register(this._connection.capabilities.addStaticClientCapabilities({
|
||||
textDocument: {
|
||||
inlayHint: {
|
||||
dynamicRegistration: true,
|
||||
resolveSupport: {
|
||||
properties: ['tooltip', 'textEdits', 'label.tooltip', 'label.location', 'label.command'],
|
||||
},
|
||||
}
|
||||
},
|
||||
workspace: {
|
||||
inlayHint: {
|
||||
refreshSupport: true,
|
||||
}
|
||||
}
|
||||
}));
|
||||
|
||||
this._register(this._connection.connection.registerRequestHandler(api.client.workspaceInlayHintRefresh, async () => {
|
||||
// Fire onDidChangeInlayHints for all providers
|
||||
for (const provider of this._providers) {
|
||||
provider.refresh();
|
||||
}
|
||||
return { ok: null };
|
||||
}));
|
||||
|
||||
this._register(this._connection.capabilities.registerCapabilityHandler(capabilities.textDocumentInlayHint, true, capability => {
|
||||
const provider = new LspInlayHintsProvider(this._connection, capability);
|
||||
this._providers.add(provider);
|
||||
|
||||
const disposable = monaco.languages.registerInlayHintsProvider(
|
||||
toMonacoLanguageSelector(capability.documentSelector),
|
||||
provider,
|
||||
);
|
||||
|
||||
return {
|
||||
dispose: () => {
|
||||
this._providers.delete(provider);
|
||||
disposable.dispose();
|
||||
}
|
||||
};
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
interface ExtendedInlayHint extends monaco.languages.InlayHint {
|
||||
_lspInlayHint: InlayHint;
|
||||
_targetUri: string;
|
||||
}
|
||||
|
||||
class LspInlayHintsProvider implements monaco.languages.InlayHintsProvider {
|
||||
private readonly _onDidChangeInlayHints = new monaco.Emitter<void>();
|
||||
public readonly onDidChangeInlayHints = this._onDidChangeInlayHints.event;
|
||||
|
||||
public readonly resolveInlayHint;
|
||||
|
||||
constructor(
|
||||
private readonly _client: LspConnection,
|
||||
private readonly _capabilities: InlayHintRegistrationOptions,
|
||||
) {
|
||||
if (_capabilities.resolveProvider) {
|
||||
this.resolveInlayHint = async (hint: ExtendedInlayHint, token: monaco.CancellationToken): Promise<monaco.languages.InlayHint> => {
|
||||
|
||||
const resolved = await this._client.server.inlayHintResolve(hint._lspInlayHint);
|
||||
|
||||
if (resolved.tooltip) {
|
||||
hint.tooltip = toMonacoTooltip(resolved.tooltip);
|
||||
}
|
||||
|
||||
if (resolved.label !== hint._lspInlayHint.label) {
|
||||
hint.label = toLspInlayHintLabel(resolved.label);
|
||||
}
|
||||
|
||||
if (resolved.textEdits) {
|
||||
hint.textEdits = resolved.textEdits.map(edit => {
|
||||
const translated = this._client.bridge.translateBackRange(
|
||||
{ uri: hint._targetUri },
|
||||
edit.range
|
||||
);
|
||||
return {
|
||||
range: translated.range,
|
||||
text: edit.newText,
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
return hint;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
public refresh(): void {
|
||||
this._onDidChangeInlayHints.fire();
|
||||
}
|
||||
|
||||
async provideInlayHints(
|
||||
model: monaco.editor.ITextModel,
|
||||
range: monaco.Range,
|
||||
token: monaco.CancellationToken
|
||||
): Promise<monaco.languages.InlayHintList | null> {
|
||||
const translated = this._client.bridge.translate(model, range.getStartPosition());
|
||||
|
||||
const result = await retryOnContentModified(async () =>
|
||||
await this._client.server.textDocumentInlayHint({
|
||||
textDocument: translated.textDocument,
|
||||
range: this._client.bridge.translateRange(model, range),
|
||||
})
|
||||
);
|
||||
|
||||
if (!result) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return {
|
||||
hints: result.map(hint => {
|
||||
const monacoHint: ExtendedInlayHint = {
|
||||
label: toLspInlayHintLabel(hint.label),
|
||||
position: assertTargetTextModel(
|
||||
this._client.bridge.translateBack(translated.textDocument, hint.position),
|
||||
model
|
||||
).position,
|
||||
kind: toMonacoInlayHintKind(hint.kind),
|
||||
tooltip: toMonacoTooltip(hint.tooltip),
|
||||
paddingLeft: hint.paddingLeft,
|
||||
paddingRight: hint.paddingRight,
|
||||
textEdits: hint.textEdits?.map(edit => ({
|
||||
range: assertTargetTextModel(
|
||||
this._client.bridge.translateBackRange(translated.textDocument, edit.range),
|
||||
model
|
||||
).range,
|
||||
text: edit.newText,
|
||||
})),
|
||||
_lspInlayHint: hint,
|
||||
_targetUri: translated.textDocument.uri,
|
||||
};
|
||||
return monacoHint;
|
||||
}),
|
||||
dispose: () => { },
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
async function retryOnContentModified<T>(cb: () => Promise<T>): Promise<T> {
|
||||
const nRetries = 3;
|
||||
for (let triesLeft = nRetries; ; triesLeft--) {
|
||||
try {
|
||||
return await cb();
|
||||
} catch (e: any) {
|
||||
if (e.message === 'content modified' && triesLeft > 0) {
|
||||
continue;
|
||||
}
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function toLspInlayHintLabel(label: string | any[]): string | monaco.languages.InlayHintLabelPart[] {
|
||||
if (typeof label === 'string') {
|
||||
return label;
|
||||
}
|
||||
|
||||
return label.map(part => {
|
||||
const monacoLabelPart: monaco.languages.InlayHintLabelPart = {
|
||||
label: part.value,
|
||||
tooltip: toMonacoTooltip(part.tooltip),
|
||||
command: toMonacoCommand(part.command),
|
||||
};
|
||||
|
||||
if (part.location) {
|
||||
monacoLabelPart.location = {
|
||||
uri: monaco.Uri.parse(part.location.uri),
|
||||
range: new monaco.Range(
|
||||
part.location.range.start.line + 1,
|
||||
part.location.range.start.character + 1,
|
||||
part.location.range.end.line + 1,
|
||||
part.location.range.end.character + 1
|
||||
),
|
||||
};
|
||||
}
|
||||
|
||||
return monacoLabelPart;
|
||||
});
|
||||
}
|
||||
|
||||
function toMonacoTooltip(tooltip: string | MarkupContent | undefined): string | monaco.IMarkdownString | undefined {
|
||||
if (!tooltip) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
if (typeof tooltip === 'string') {
|
||||
return tooltip;
|
||||
}
|
||||
|
||||
return {
|
||||
value: tooltip.value,
|
||||
isTrusted: true,
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,71 @@
|
|||
import * as monaco from 'monaco-editor-core';
|
||||
import { capabilities, DocumentOnTypeFormattingRegistrationOptions } from '../../../src/types';
|
||||
import { Disposable } from '../../utils';
|
||||
import { LspConnection } from '../LspConnection';
|
||||
import { toMonacoLanguageSelector } from './common';
|
||||
|
||||
export class LspOnTypeFormattingFeature extends Disposable {
|
||||
constructor(
|
||||
private readonly _connection: LspConnection,
|
||||
) {
|
||||
super();
|
||||
|
||||
this._register(this._connection.capabilities.addStaticClientCapabilities({
|
||||
textDocument: {
|
||||
onTypeFormatting: {
|
||||
dynamicRegistration: true,
|
||||
}
|
||||
}
|
||||
}));
|
||||
|
||||
this._register(this._connection.capabilities.registerCapabilityHandler(capabilities.textDocumentOnTypeFormatting, true, capability => {
|
||||
return monaco.languages.registerOnTypeFormattingEditProvider(
|
||||
toMonacoLanguageSelector(capability.documentSelector),
|
||||
new LspOnTypeFormattingProvider(this._connection, capability),
|
||||
);
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
class LspOnTypeFormattingProvider implements monaco.languages.OnTypeFormattingEditProvider {
|
||||
public readonly autoFormatTriggerCharacters: string[];
|
||||
|
||||
constructor(
|
||||
private readonly _client: LspConnection,
|
||||
private readonly _capabilities: DocumentOnTypeFormattingRegistrationOptions,
|
||||
) {
|
||||
this.autoFormatTriggerCharacters = [
|
||||
_capabilities.firstTriggerCharacter,
|
||||
...(_capabilities.moreTriggerCharacter || [])
|
||||
];
|
||||
}
|
||||
|
||||
async provideOnTypeFormattingEdits(
|
||||
model: monaco.editor.ITextModel,
|
||||
position: monaco.Position,
|
||||
ch: string,
|
||||
options: monaco.languages.FormattingOptions,
|
||||
token: monaco.CancellationToken
|
||||
): Promise<monaco.languages.TextEdit[] | null> {
|
||||
const translated = this._client.bridge.translate(model, position);
|
||||
|
||||
const result = await this._client.server.textDocumentOnTypeFormatting({
|
||||
textDocument: translated.textDocument,
|
||||
position: translated.position,
|
||||
ch,
|
||||
options: {
|
||||
tabSize: options.tabSize,
|
||||
insertSpaces: options.insertSpaces,
|
||||
},
|
||||
});
|
||||
|
||||
if (!result) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return result.map(edit => ({
|
||||
range: this._client.bridge.translateBackRange(translated.textDocument, edit.range).range,
|
||||
text: edit.newText,
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
import * as monaco from 'monaco-editor-core';
|
||||
import { capabilities, DocumentRangeFormattingRegistrationOptions } from '../../../src/types';
|
||||
import { Disposable } from '../../utils';
|
||||
import { LspConnection } from '../LspConnection';
|
||||
import { toMonacoLanguageSelector } from './common';
|
||||
|
||||
export class LspRangeFormattingFeature extends Disposable {
|
||||
constructor(
|
||||
private readonly _connection: LspConnection,
|
||||
) {
|
||||
super();
|
||||
|
||||
this._register(this._connection.capabilities.addStaticClientCapabilities({
|
||||
textDocument: {
|
||||
rangeFormatting: {
|
||||
dynamicRegistration: true,
|
||||
}
|
||||
}
|
||||
}));
|
||||
|
||||
this._register(this._connection.capabilities.registerCapabilityHandler(capabilities.textDocumentRangeFormatting, true, capability => {
|
||||
return monaco.languages.registerDocumentRangeFormattingEditProvider(
|
||||
toMonacoLanguageSelector(capability.documentSelector),
|
||||
new LspDocumentRangeFormattingProvider(this._connection, capability),
|
||||
);
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
class LspDocumentRangeFormattingProvider implements monaco.languages.DocumentRangeFormattingEditProvider {
|
||||
constructor(
|
||||
private readonly _client: LspConnection,
|
||||
private readonly _capabilities: DocumentRangeFormattingRegistrationOptions,
|
||||
) { }
|
||||
|
||||
async provideDocumentRangeFormattingEdits(
|
||||
model: monaco.editor.ITextModel,
|
||||
range: monaco.Range,
|
||||
options: monaco.languages.FormattingOptions,
|
||||
token: monaco.CancellationToken
|
||||
): Promise<monaco.languages.TextEdit[] | null> {
|
||||
const translated = this._client.bridge.translate(model, range.getStartPosition());
|
||||
|
||||
const result = await this._client.server.textDocumentRangeFormatting({
|
||||
textDocument: translated.textDocument,
|
||||
range: this._client.bridge.translateRange(model, range),
|
||||
options: {
|
||||
tabSize: options.tabSize,
|
||||
insertSpaces: options.insertSpaces,
|
||||
},
|
||||
});
|
||||
|
||||
if (!result) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return result.map(edit => ({
|
||||
range: this._client.bridge.translateBackRange(translated.textDocument, edit.range).range,
|
||||
text: edit.newText,
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
import * as monaco from 'monaco-editor-core';
|
||||
import { capabilities, ReferenceRegistrationOptions } from '../../../src/types';
|
||||
import { Disposable } from '../../utils';
|
||||
import { LspConnection } from '../LspConnection';
|
||||
import { toMonacoLanguageSelector } from './common';
|
||||
|
||||
export class LspReferencesFeature extends Disposable {
|
||||
constructor(
|
||||
private readonly _connection: LspConnection,
|
||||
) {
|
||||
super();
|
||||
|
||||
this._register(this._connection.capabilities.addStaticClientCapabilities({
|
||||
textDocument: {
|
||||
references: {
|
||||
dynamicRegistration: true,
|
||||
}
|
||||
}
|
||||
}));
|
||||
|
||||
this._register(this._connection.capabilities.registerCapabilityHandler(capabilities.textDocumentReferences, true, capability => {
|
||||
return monaco.languages.registerReferenceProvider(
|
||||
toMonacoLanguageSelector(capability.documentSelector),
|
||||
new LspReferenceProvider(this._connection, capability),
|
||||
);
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
class LspReferenceProvider implements monaco.languages.ReferenceProvider {
|
||||
constructor(
|
||||
private readonly _client: LspConnection,
|
||||
private readonly _capabilities: ReferenceRegistrationOptions,
|
||||
) { }
|
||||
|
||||
async provideReferences(
|
||||
model: monaco.editor.ITextModel,
|
||||
position: monaco.Position,
|
||||
context: monaco.languages.ReferenceContext,
|
||||
token: monaco.CancellationToken
|
||||
): Promise<monaco.languages.Location[] | null> {
|
||||
const translated = this._client.bridge.translate(model, position);
|
||||
|
||||
const result = await this._client.server.textDocumentReferences({
|
||||
textDocument: translated.textDocument,
|
||||
position: translated.position,
|
||||
context: {
|
||||
includeDeclaration: context.includeDeclaration,
|
||||
},
|
||||
});
|
||||
|
||||
if (!result) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return result.map(loc => {
|
||||
const translated = this._client.bridge.translateBackRange({ uri: loc.uri }, loc.range);
|
||||
return {
|
||||
uri: translated.textModel.uri,
|
||||
range: translated.range,
|
||||
};
|
||||
});
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue