Compare commits
643 Commits
Author | SHA1 | Date |
---|---|---|
Tony Garnock-Jones | 600d9b3c15 | |
Tony Garnock-Jones | f2fc6fdfba | |
Tony Garnock-Jones | d84f02ebfb | |
Tony Garnock-Jones | c430f03e7d | |
Tony Garnock-Jones | 05d1e9c692 | |
Tony Garnock-Jones | 86538dad31 | |
Tony Garnock-Jones | 2fd8319105 | |
Tony Garnock-Jones | d4abbe33f6 | |
Tony Garnock-Jones | 6fb100ee60 | |
Tony Garnock-Jones | f45ab47175 | |
Tony Garnock-Jones | 078c34632b | |
Tony Garnock-Jones | 626194fc99 | |
Tony Garnock-Jones | a8fd5aa2fe | |
Tony Garnock-Jones | 44fe1ff7b5 | |
Tony Garnock-Jones | d9fe78edf7 | |
Tony Garnock-Jones | 8fcea8362c | |
Tony Garnock-Jones | 4292c5f40f | |
Tony Garnock-Jones | a0ba43cfae | |
Tony Garnock-Jones | c59506fe0e | |
Tony Garnock-Jones | ffea85ece9 | |
Tony Garnock-Jones | 4c3eaeff1c | |
Tony Garnock-Jones | 830652d71c | |
Tony Garnock-Jones | d008cc3f94 | |
Tony Garnock-Jones | 333f743114 | |
Tony Garnock-Jones | 9c85ac5a85 | |
Tony Garnock-Jones | 248d22a3ef | |
Tony Garnock-Jones | 7a34dc9716 | |
Tony Garnock-Jones | 63ae985d83 | |
Tony Garnock-Jones | 4c5c93820b | |
Tony Garnock-Jones | ff1b013d66 | |
Tony Garnock-Jones | 25c701cd4e | |
Tony Garnock-Jones | 300c4046f8 | |
Tony Garnock-Jones | 81696a90b4 | |
Tony Garnock-Jones | d14ddc39f7 | |
Tony Garnock-Jones | 1e08230027 | |
Tony Garnock-Jones | 27c1c08bb6 | |
Tony Garnock-Jones | c7bb1035a6 | |
Tony Garnock-Jones | c8741c9c36 | |
Tony Garnock-Jones | df692507d9 | |
Tony Garnock-Jones | 3141582223 | |
Tony Garnock-Jones | 599b4ed469 | |
Tony Garnock-Jones | b4b5f5b111 | |
Tony Garnock-Jones | a8438f9191 | |
Tony Garnock-Jones | 047bded3af | |
Tony Garnock-Jones | 6e555c9fd5 | |
Emery Hemingway | 8ebde104ca | |
Tony Garnock-Jones | 221208dbbd | |
Tony Garnock-Jones | e3d419deab | |
Tony Garnock-Jones | ebe7700cee | |
Tony Garnock-Jones | f4f2ad0783 | |
Tony Garnock-Jones | c1cdf3660f | |
Tony Garnock-Jones | 9d8e7f5ccd | |
Tony Garnock-Jones | bf9d10813e | |
Tony Garnock-Jones | 80250fdac9 | |
Tony Garnock-Jones | 305c0c26ee | |
Tony Garnock-Jones | 782f24687f | |
Tony Garnock-Jones | 6d904d276e | |
Tony Garnock-Jones | 4b5eccad24 | |
Tony Garnock-Jones | 4a05bbad73 | |
Tony Garnock-Jones | 40bc9aadd3 | |
Tony Garnock-Jones | 17890a6b97 | |
Tony Garnock-Jones | 3b20a58dce | |
Tony Garnock-Jones | 4cce2fb6f2 | |
Tony Garnock-Jones | 96a8367667 | |
Tony Garnock-Jones | bdb759fe52 | |
Tony Garnock-Jones | c0239cf322 | |
Tony Garnock-Jones | 9cc4175f24 | |
Tony Garnock-Jones | 70f42dd931 | |
Tony Garnock-Jones | ef1ebe6412 | |
Tony Garnock-Jones | ca18ca08df | |
Tony Garnock-Jones | 40ca168eac | |
Tony Garnock-Jones | 5a73e8d4c3 | |
Tony Garnock-Jones | b6092b2a98 | |
Tony Garnock-Jones | 6b58ef9f0f | |
Tony Garnock-Jones | 29959c055e | |
Tony Garnock-Jones | 1708274401 | |
Tony Garnock-Jones | 39e7eaac8d | |
Tony Garnock-Jones | 687dff648f | |
Tony Garnock-Jones | 710ff91a64 | |
Tony Garnock-Jones | fd491b5c71 | |
Tony Garnock-Jones | cbcd4b9ad9 | |
Tony Garnock-Jones | bfef60eaa9 | |
Tony Garnock-Jones | c59e044695 | |
Tony Garnock-Jones | bf0d47f1b7 | |
Tony Garnock-Jones | 85b2299061 | |
Tony Garnock-Jones | 90aa9656ca | |
Tony Garnock-Jones | de596ae408 | |
Tony Garnock-Jones | 8ce11ddb12 | |
Tony Garnock-Jones | f105736694 | |
Tony Garnock-Jones | 8031eb1a17 | |
Tony Garnock-Jones | 906717121a | |
Tony Garnock-Jones | e0d5e86da8 | |
Tony Garnock-Jones | 2dca2c2d77 | |
Tony Garnock-Jones | da97db8548 | |
Tony Garnock-Jones | 63b5d23391 | |
Tony Garnock-Jones | 036c342264 | |
Tony Garnock-Jones | 7797a3cd09 | |
Tony Garnock-Jones | f5501ccb64 | |
Tony Garnock-Jones | 3b7543845a | |
Tony Garnock-Jones | a25cafdabb | |
Tony Garnock-Jones | 291ec1805b | |
Tony Garnock-Jones | de2a163dee | |
Tony Garnock-Jones | 227b3e5062 | |
Tony Garnock-Jones | 1e29d528d7 | |
Tony Garnock-Jones | 73b7759816 | |
Tony Garnock-Jones | 658f324e76 | |
Tony Garnock-Jones | 0f13f2b238 | |
Tony Garnock-Jones | 140dc240c8 | |
Tony Garnock-Jones | 2abb541aba | |
Tony Garnock-Jones | 44d0d030cc | |
Tony Garnock-Jones | 772a46b093 | |
Tony Garnock-Jones | 1958e4ec49 | |
Tony Garnock-Jones | 300e15b674 | |
Tony Garnock-Jones | 40f5ef4085 | |
Tony Garnock-Jones | 9521fc3dcc | |
Tony Garnock-Jones | f5ed511c4e | |
Tony Garnock-Jones | 61997473a3 | |
Tony Garnock-Jones | 502c0fd286 | |
Tony Garnock-Jones | be74496012 | |
Tony Garnock-Jones | 888b3be291 | |
Tony Garnock-Jones | ce598e6954 | |
Tony Garnock-Jones | f31262a805 | |
Tony Garnock-Jones | 4a49c0e6e8 | |
Tony Garnock-Jones | 5773918b71 | |
Tony Garnock-Jones | 881b92b8aa | |
Tony Garnock-Jones | 23dde45295 | |
Tony Garnock-Jones | de282f539a | |
Tony Garnock-Jones | 60a5c2fdee | |
Tony Garnock-Jones | 31f11d2389 | |
Tony Garnock-Jones | 2bcffd3bab | |
Tony Garnock-Jones | b4d728ca7a | |
Tony Garnock-Jones | 644891ce76 | |
Tony Garnock-Jones | 4843c76784 | |
Tony Garnock-Jones | 4c8796b6c9 | |
Tony Garnock-Jones | 306d542600 | |
Tony Garnock-Jones | 2f4f2e4708 | |
Tony Garnock-Jones | d79dd51d14 | |
Tony Garnock-Jones | ab353b525b | |
Tony Garnock-Jones | 1dab59bef4 | |
Tony Garnock-Jones | c73d4df2f2 | |
Tony Garnock-Jones | 0a0e8050cb | |
Tony Garnock-Jones | 7eecee1122 | |
Tony Garnock-Jones | 7e0b6dc33a | |
Tony Garnock-Jones | cdbb1b4c24 | |
Tony Garnock-Jones | 87c3b211d8 | |
Tony Garnock-Jones | 9864ce0ec8 | |
Tony Garnock-Jones | 501d5e578e | |
Tony Garnock-Jones | c9a52ebe39 | |
Tony Garnock-Jones | 85cfabf63d | |
Tony Garnock-Jones | 2af79302c7 | |
Tony Garnock-Jones | 5dd68e87c1 | |
Tony Garnock-Jones | 794837f403 | |
Tony Garnock-Jones | 10cb9c1b34 | |
Tony Garnock-Jones | c9aab425fe | |
Tony Garnock-Jones | 46bafa9501 | |
Tony Garnock-Jones | 3904c626c9 | |
Tony Garnock-Jones | e2e72467cd | |
Tony Garnock-Jones | 4e1475a176 | |
Tony Garnock-Jones | 0a8975a2f6 | |
Tony Garnock-Jones | 044ccad37c | |
Tony Garnock-Jones | 8b5486abd8 | |
Tony Garnock-Jones | 86066a0cd8 | |
Tony Garnock-Jones | ccb939be19 | |
Tony Garnock-Jones | 672c82ac64 | |
Tony Garnock-Jones | 814e78727e | |
Tony Garnock-Jones | 3b970e058c | |
Tony Garnock-Jones | 0422cafc11 | |
Tony Garnock-Jones | cc0a023751 | |
Tony Garnock-Jones | aeaacbafab | |
Tony Garnock-Jones | 8b2434a3bf | |
Tony Garnock-Jones | f2f3220229 | |
Tony Garnock-Jones | 9859daee9b | |
Tony Garnock-Jones | 97876335ba | |
Tony Garnock-Jones | 4d0cc4b2f7 | |
Tony Garnock-Jones | 3617582d37 | |
Tony Garnock-Jones | 1c3df03153 | |
Tony Garnock-Jones | 56ac38f7e4 | |
Tony Garnock-Jones | 919ee891f6 | |
Tony Garnock-Jones | 34f1617a62 | |
Tony Garnock-Jones | 83c81f894a | |
Tony Garnock-Jones | 062046c2b7 | |
Tony Garnock-Jones | d60e923abe | |
Tony Garnock-Jones | 61094bc0e1 | |
Tony Garnock-Jones | d7b330e6dd | |
Tony Garnock-Jones | be6dbd2782 | |
Tony Garnock-Jones | 0e26a8cd9f | |
Tony Garnock-Jones | b336faff25 | |
Tony Garnock-Jones | a9ea553ca1 | |
Tony Garnock-Jones | 208af3ebb6 | |
Tony Garnock-Jones | 2f34cfa588 | |
Tony Garnock-Jones | 4903bc5149 | |
Tony Garnock-Jones | 9197d7ef3a | |
Tony Garnock-Jones | 24a75e935a | |
Tony Garnock-Jones | ae2c113325 | |
Tony Garnock-Jones | cfd2b69943 | |
Tony Garnock-Jones | 3445f3f014 | |
Tony Garnock-Jones | b013dd1979 | |
Tony Garnock-Jones | f83dddd4fd | |
Tony Garnock-Jones | cb0c45a45b | |
Tony Garnock-Jones | ed605718e5 | |
Tony Garnock-Jones | 1979a439f8 | |
Tony Garnock-Jones | 2671033b07 | |
Tony Garnock-Jones | c6eef34736 | |
Tony Garnock-Jones | 5ffc647997 | |
Tony Garnock-Jones | 6ded2c2050 | |
Tony Garnock-Jones | f0026d9688 | |
Tony Garnock-Jones | 939004264a | |
Tony Garnock-Jones | 0f9c200583 | |
Tony Garnock-Jones | a7f21f140e | |
Tony Garnock-Jones | 2068531000 | |
Tony Garnock-Jones | 2c065b6a50 | |
Tony Garnock-Jones | 36202092ca | |
Tony Garnock-Jones | f58dce5bdc | |
Tony Garnock-Jones | 6ab19dcc6e | |
Tony Garnock-Jones | 2c69e270db | |
Tony Garnock-Jones | bd5af85c78 | |
Tony Garnock-Jones | 00727cb65a | |
Tony Garnock-Jones | 1955298ba0 | |
Tony Garnock-Jones | 8f30b198a7 | |
Tony Garnock-Jones | c488d6d75a | |
Tony Garnock-Jones | e026f42452 | |
Tony Garnock-Jones | fe9ceaf65c | |
Tony Garnock-Jones | 0dfa34f209 | |
Tony Garnock-Jones | 8bc7285747 | |
Tony Garnock-Jones | 3d695954b7 | |
Tony Garnock-Jones | 4c2f7e01c6 | |
Tony Garnock-Jones | 98fb03bc79 | |
Tony Garnock-Jones | 6caf35f20e | |
Tony Garnock-Jones | f6a35a6d4d | |
Tony Garnock-Jones | a2f36d94d0 | |
Tony Garnock-Jones | d076761f87 | |
Tony Garnock-Jones | 836d06aca2 | |
Tony Garnock-Jones | f698b8cdb3 | |
Tony Garnock-Jones | 72566ac223 | |
Tony Garnock-Jones | cd2d710692 | |
Tony Garnock-Jones | c8fc52a685 | |
Tony Garnock-Jones | 5338890e76 | |
Tony Garnock-Jones | 93bc596f37 | |
Tony Garnock-Jones | bfd1f13c19 | |
Tony Garnock-Jones | 54e9633791 | |
Tony Garnock-Jones | 06bf888bd8 | |
Tony Garnock-Jones | 2dc7fc3e9c | |
Tony Garnock-Jones | 28dee5f098 | |
Tony Garnock-Jones | da29412e91 | |
Tony Garnock-Jones | 6afa4ba87f | |
Tony Garnock-Jones | b4a54d6f94 | |
Tony Garnock-Jones | 0533b3fd0f | |
Tony Garnock-Jones | 1de1e9d382 | |
Tony Garnock-Jones | 7b8526dfcf | |
Tony Garnock-Jones | 2a2b7da4bc | |
Tony Garnock-Jones | 021fdf06bb | |
Tony Garnock-Jones | 39fb9cb92e | |
Tony Garnock-Jones | d55e322a0e | |
Tony Garnock-Jones | 818f35c471 | |
Tony Garnock-Jones | 70f1289057 | |
Tony Garnock-Jones | 7b2ea2aae9 | |
Tony Garnock-Jones | 3a78f6c46c | |
Tony Garnock-Jones | aafb654687 | |
Tony Garnock-Jones | 1f72baf3ad | |
Tony Garnock-Jones | 9cf00720f8 | |
Tony Garnock-Jones | b2084c4d1d | |
Tony Garnock-Jones | 998c4442c9 | |
Tony Garnock-Jones | a0f87bf687 | |
Tony Garnock-Jones | 2eb7045b5c | |
Tony Garnock-Jones | 1008d6acca | |
Tony Garnock-Jones | 075893fc85 | |
Tony Garnock-Jones | 3384acbd62 | |
Tony Garnock-Jones | abaf23920b | |
Tony Garnock-Jones | 40844d2806 | |
Tony Garnock-Jones | cbcb692db8 | |
Tony Garnock-Jones | 545282be32 | |
Tony Garnock-Jones | 44d7d16a82 | |
Tony Garnock-Jones | 0962c5e41a | |
Tony Garnock-Jones | 8a51e87f38 | |
Tony Garnock-Jones | a761e7a5b7 | |
Tony Garnock-Jones | fe78147cb8 | |
Tony Garnock-Jones | fec72f1269 | |
Tony Garnock-Jones | 14702c66b9 | |
Tony Garnock-Jones | 958cbae171 | |
Tony Garnock-Jones | ef665c0998 | |
Tony Garnock-Jones | a51851283f | |
Tony Garnock-Jones | 7a09be7141 | |
Tony Garnock-Jones | d8a139b23a | |
Tony Garnock-Jones | 9b109023d3 | |
Tony Garnock-Jones | d6c4db6a09 | |
Tony Garnock-Jones | 04ebe2b8e6 | |
Tony Garnock-Jones | 18a4690609 | |
Tony Garnock-Jones | 46fd2dec3b | |
Tony Garnock-Jones | 38dad13f33 | |
Tony Garnock-Jones | ea212ade8c | |
Tony Garnock-Jones | 1f9ee7a745 | |
Tony Garnock-Jones | 1ae2583414 | |
Tony Garnock-Jones | cd5452b624 | |
Tony Garnock-Jones | f4c0c826df | |
Tony Garnock-Jones | f3c9662607 | |
Tony Garnock-Jones | 82624d3007 | |
Tony Garnock-Jones | 8b690b9103 | |
Tony Garnock-Jones | 5a52f243e5 | |
Tony Garnock-Jones | 6224baa2b6 | |
Tony Garnock-Jones | 5111a0c141 | |
Tony Garnock-Jones | 8619342e5e | |
Tony Garnock-Jones | 32428e9e67 | |
Tony Garnock-Jones | 5bcb268ff8 | |
Tony Garnock-Jones | d32805e1fb | |
Tony Garnock-Jones | ce56a67377 | |
Tony Garnock-Jones | 9cd2e6776c | |
Tony Garnock-Jones | a086c1d721 | |
Tony Garnock-Jones | bc41182533 | |
Tony Garnock-Jones | 2ad99b56b8 | |
Tony Garnock-Jones | ce7b18a2de | |
Tony Garnock-Jones | 31d2eba8b6 | |
Tony Garnock-Jones | b361f3a40e | |
Tony Garnock-Jones | ce56ffb634 | |
Tony Garnock-Jones | 32a5de939f | |
Tony Garnock-Jones | 8bc7dcf1d6 | |
Tony Garnock-Jones | 7478a63a55 | |
Tony Garnock-Jones | 0c002036a4 | |
Tony Garnock-Jones | 53b84db98e | |
Tony Garnock-Jones | f6b88ee3fb | |
Tony Garnock-Jones | 32d4da6f86 | |
Tony Garnock-Jones | 7fdb251c4a | |
Tony Garnock-Jones | ee8a23aa2e | |
Tony Garnock-Jones | 5030130aef | |
Tony Garnock-Jones | 93fcebc4ce | |
Tony Garnock-Jones | 5cd0335a79 | |
Tony Garnock-Jones | b52da09081 | |
Tony Garnock-Jones | 9ca618268e | |
Tony Garnock-Jones | adc44a0d8c | |
Tony Garnock-Jones | 9f1f76d0ca | |
Tony Garnock-Jones | f4078aabaa | |
Tony Garnock-Jones | 557a36756f | |
Tony Garnock-Jones | 6c8dcce135 | |
Tony Garnock-Jones | c025456bdd | |
Tony Garnock-Jones | cb64bc3213 | |
Tony Garnock-Jones | 4be9d1a8bc | |
Tony Garnock-Jones | 2218702cf2 | |
Tony Garnock-Jones | 9c0ff4f756 | |
Tony Garnock-Jones | 1ce2a0a1bd | |
Tony Garnock-Jones | ca2d3a32b8 | |
Tony Garnock-Jones | e98782fbe0 | |
Tony Garnock-Jones | 54c2ddfd99 | |
Tony Garnock-Jones | 60ecab200c | |
Tony Garnock-Jones | 2608e259ba | |
Tony Garnock-Jones | c60bd13cdc | |
Tony Garnock-Jones | 31e34039dc | |
Tony Garnock-Jones | 0922c6e9b1 | |
Tony Garnock-Jones | 07a5f688be | |
Tony Garnock-Jones | 962d6f0038 | |
Tony Garnock-Jones | fff84d4c2a | |
Tony Garnock-Jones | 5983cd01f1 | |
Tony Garnock-Jones | e8881f5980 | |
Tony Garnock-Jones | 4adcfdd0ab | |
Tony Garnock-Jones | 0b9cc12c5b | |
Tony Garnock-Jones | bd58e87de1 | |
Tony Garnock-Jones | 40b4681a6e | |
Tony Garnock-Jones | 0f5e033174 | |
Tony Garnock-Jones | aae53b5525 | |
Tony Garnock-Jones | 00ec198908 | |
Tony Garnock-Jones | fe427a67be | |
Tony Garnock-Jones | 4c03646567 | |
Tony Garnock-Jones | eaa7268c9b | |
Tony Garnock-Jones | bdb1c2a238 | |
Tony Garnock-Jones | 576023fb8a | |
Tony Garnock-Jones | 9cb312ddd3 | |
Tony Garnock-Jones | ef88fa5aec | |
Tony Garnock-Jones | d57bcd06c4 | |
Tony Garnock-Jones | 886f8bff6d | |
Tony Garnock-Jones | 61e8f38815 | |
Tony Garnock-Jones | 6d85d220f7 | |
Tony Garnock-Jones | d08cd095fc | |
Tony Garnock-Jones | ef4cbe0a06 | |
Tony Garnock-Jones | 5b835dc13a | |
Tony Garnock-Jones | 7668dbb401 | |
Tony Garnock-Jones | 9d54abe6f5 | |
Tony Garnock-Jones | b41afe94ae | |
Tony Garnock-Jones | 0e97da1377 | |
Tony Garnock-Jones | 148868da83 | |
Tony Garnock-Jones | 8052ee00b5 | |
Tony Garnock-Jones | c7fb679987 | |
Tony Garnock-Jones | 4a49e6a314 | |
Tony Garnock-Jones | dae63d6961 | |
Tony Garnock-Jones | ffb5402148 | |
Tony Garnock-Jones | 6a0ecb0caa | |
Tony Garnock-Jones | 4d0febe833 | |
Tony Garnock-Jones | f4b5eaed39 | |
Tony Garnock-Jones | c25f42b30c | |
Tony Garnock-Jones | 6cb509ff2e | |
Tony Garnock-Jones | de0cfbcb85 | |
Tony Garnock-Jones | 38f3d05fe0 | |
Tony Garnock-Jones | 9c4e96d585 | |
Tony Garnock-Jones | c66168206b | |
Tony Garnock-Jones | 074568bb91 | |
Tony Garnock-Jones | 290419b805 | |
Tony Garnock-Jones | ca92d99c52 | |
Tony Garnock-Jones | 19c96bdef2 | |
Tony Garnock-Jones | b0db047c16 | |
Tony Garnock-Jones | d6b89e466d | |
Tony Garnock-Jones | 2953a9caf5 | |
Tony Garnock-Jones | 8d16071f90 | |
Tony Garnock-Jones | 93171b9717 | |
Tony Garnock-Jones | 6be4f9742b | |
Tony Garnock-Jones | 974d74023c | |
Tony Garnock-Jones | 49d88da7cd | |
Tony Garnock-Jones | cfed352f40 | |
Tony Garnock-Jones | cdd1c2393d | |
Tony Garnock-Jones | 4e5f7136ad | |
Tony Garnock-Jones | c3dfd42a58 | |
Tony Garnock-Jones | 369168311b | |
Tony Garnock-Jones | b53d606705 | |
Tony Garnock-Jones | 781dc406c5 | |
Tony Garnock-Jones | 4b536392d7 | |
Tony Garnock-Jones | 6d58bcabe4 | |
Tony Garnock-Jones | 8746694777 | |
Tony Garnock-Jones | 5560ce5aa1 | |
Tony Garnock-Jones | c5f69295a2 | |
Tony Garnock-Jones | 431a7f49b0 | |
Tony Garnock-Jones | fb83b0e524 | |
Tony Garnock-Jones | ff75fc7107 | |
Tony Garnock-Jones | b4d0559fe2 | |
Tony Garnock-Jones | faca72d6b3 | |
Tony Garnock-Jones | 6f07bfafae | |
Tony Garnock-Jones | 83cc561cce | |
Tony Garnock-Jones | c20cab0bba | |
Tony Garnock-Jones | 26eba6b492 | |
Tony Garnock-Jones | ab34b62cf1 | |
Tony Garnock-Jones | 5a65256cf3 | |
Tony Garnock-Jones | 0291c43730 | |
Tony Garnock-Jones | 257c604e2b | |
Tony Garnock-Jones | 66ee5b7427 | |
Tony Garnock-Jones | a06d532006 | |
Tony Garnock-Jones | d9e5d8d29c | |
Tony Garnock-Jones | f8b06ff02a | |
Tony Garnock-Jones | 4265343cc8 | |
Tony Garnock-Jones | cc3fac620c | |
Tony Garnock-Jones | 419adba79b | |
Tony Garnock-Jones | 08197626a6 | |
Tony Garnock-Jones | e04b898c7f | |
Tony Garnock-Jones | 3823d3172c | |
Tony Garnock-Jones | ed8adae3f2 | |
Tony Garnock-Jones | 8f2d598201 | |
Tony Garnock-Jones | 665d5ab219 | |
Tony Garnock-Jones | 9369bb56cd | |
Tony Garnock-Jones | a11b755528 | |
Tony Garnock-Jones | b92bbb9741 | |
Tony Garnock-Jones | 90a6e2f41a | |
Tony Garnock-Jones | d737b96465 | |
Tony Garnock-Jones | 5f60c22e49 | |
Tony Garnock-Jones | 49075e7e84 | |
Tony Garnock-Jones | b3e24d819c | |
Tony Garnock-Jones | b2df99cbc0 | |
Tony Garnock-Jones | 17c1319d01 | |
Tony Garnock-Jones | a3de480748 | |
Tony Garnock-Jones | a51054d455 | |
Tony Garnock-Jones | 85f123c777 | |
Tony Garnock-Jones | 49283cb4ca | |
Tony Garnock-Jones | ebf578503c | |
Tony Garnock-Jones | 3fe2af848b | |
Tony Garnock-Jones | 09ae5ddb5b | |
Tony Garnock-Jones | 4d42968cd6 | |
Tony Garnock-Jones | 5cc9fa29ed | |
Tony Garnock-Jones | fca27dda30 | |
Tony Garnock-Jones | ecacddc328 | |
Tony Garnock-Jones | 11fc55ee7d | |
Tony Garnock-Jones | f24dfb53d5 | |
Tony Garnock-Jones | a9a3a8a66d | |
Tony Garnock-Jones | 2940b80563 | |
Tony Garnock-Jones | 04bbcd25ab | |
Tony Garnock-Jones | 33ac308564 | |
Tony Garnock-Jones | 951598b7d0 | |
Tony Garnock-Jones | 364c97f357 | |
Tony Garnock-Jones | 414b971cee | |
Tony Garnock-Jones | 936cdbd3c5 | |
Tony Garnock-Jones | a0dc76e4e2 | |
Tony Garnock-Jones | 101ba0dc4a | |
Tony Garnock-Jones | 5bce99f7fa | |
Tony Garnock-Jones | 9c8436af1f | |
Tony Garnock-Jones | 89d340cfc8 | |
Tony Garnock-Jones | a8e542a394 | |
Tony Garnock-Jones | a3484d4a07 | |
Tony Garnock-Jones | 672be25211 | |
Tony Garnock-Jones | 666a3daac3 | |
Tony Garnock-Jones | 92fa548109 | |
Tony Garnock-Jones | c9272ddcc9 | |
Tony Garnock-Jones | 3edb680c19 | |
Tony Garnock-Jones | 8888ac3fe9 | |
Tony Garnock-Jones | f540b41d73 | |
Tony Garnock-Jones | 97cfb19852 | |
Tony Garnock-Jones | 56233687db | |
Tony Garnock-Jones | a035fbf73b | |
Tony Garnock-Jones | df7f1c3dd7 | |
Tony Garnock-Jones | 1a365f42be | |
Tony Garnock-Jones | 3f0bfadc2b | |
Tony Garnock-Jones | e001f94757 | |
Tony Garnock-Jones | 73dd39ff85 | |
Tony Garnock-Jones | 74377b87f6 | |
Tony Garnock-Jones | 7a7ad76036 | |
Tony Garnock-Jones | 4db3f45d67 | |
Tony Garnock-Jones | 32f7a8f5c0 | |
Tony Garnock-Jones | e0d76f8dd3 | |
Tony Garnock-Jones | 6d7dbaf3b3 | |
Tony Garnock-Jones | 1c1decdb7d | |
Tony Garnock-Jones | dd4af85296 | |
Tony Garnock-Jones | 50eaec69ef | |
Tony Garnock-Jones | a37879695e | |
Tony Garnock-Jones | f81cf11ebd | |
Tony Garnock-Jones | d1c79973c5 | |
Tony Garnock-Jones | 4ec02591c0 | |
Tony Garnock-Jones | a1c8203b5d | |
Tony Garnock-Jones | fdf765557e | |
Tony Garnock-Jones | 58daa8c981 | |
Tony Garnock-Jones | 20b83aa5a5 | |
Tony Garnock-Jones | 5455392efc | |
Tony Garnock-Jones | b5e82cba9b | |
Tony Garnock-Jones | ffee492fec | |
Tony Garnock-Jones | c9da4fcf26 | |
Tony Garnock-Jones | e17fd13442 | |
Tony Garnock-Jones | 7b137bea06 | |
Tony Garnock-Jones | 4ad2dd69a6 | |
Tony Garnock-Jones | edbe7bcdac | |
Tony Garnock-Jones | 78834dfb07 | |
Tony Garnock-Jones | 3486ec928e | |
Tony Garnock-Jones | d8b60ccf76 | |
Tony Garnock-Jones | 7b9f035fa8 | |
Tony Garnock-Jones | fb420855e9 | |
Tony Garnock-Jones | 33948be6b1 | |
Tony Garnock-Jones | dd14c8471d | |
Tony Garnock-Jones | f9d1e694e0 | |
Tony Garnock-Jones | 0b746764dd | |
Tony Garnock-Jones | d51af436f5 | |
Tony Garnock-Jones | d2f5c947ac | |
Tony Garnock-Jones | 1563398dd8 | |
Tony Garnock-Jones | d9bd57d643 | |
Tony Garnock-Jones | c6fff70bae | |
Tony Garnock-Jones | b42230b96a | |
Tony Garnock-Jones | 239b1b15cc | |
Tony Garnock-Jones | 9078267e76 | |
Tony Garnock-Jones | 955177b7db | |
Tony Garnock-Jones | b4b4995d84 | |
Tony Garnock-Jones | 422904010b | |
Tony Garnock-Jones | 6cfd97c91a | |
Tony Garnock-Jones | 770fb79882 | |
Tony Garnock-Jones | 0ff8c2c872 | |
Tony Garnock-Jones | c2de82a2b7 | |
Tony Garnock-Jones | 9445a71b53 | |
Tony Garnock-Jones | 8cd601a777 | |
Tony Garnock-Jones | 0b2c7ecfe1 | |
Tony Garnock-Jones | be6b30bba6 | |
Tony Garnock-Jones | 993cf78a38 | |
Tony Garnock-Jones | f7c6e7d164 | |
Tony Garnock-Jones | e7ddfdf311 | |
Tony Garnock-Jones | dab79020f4 | |
Tony Garnock-Jones | a6639b5380 | |
Tony Garnock-Jones | 06e922c511 | |
Tony Garnock-Jones | 93c196acaa | |
Tony Garnock-Jones | e034486aaa | |
Tony Garnock-Jones | e0957dc25d | |
Tony Garnock-Jones | 824b078eac | |
Tony Garnock-Jones | cf93327ed6 | |
Tony Garnock-Jones | 6cfe8c2ba4 | |
Tony Garnock-Jones | b6bc816daf | |
Tony Garnock-Jones | a73b6a9f4a | |
Tony Garnock-Jones | f6cb595709 | |
Tony Garnock-Jones | afe36c630d | |
Tony Garnock-Jones | 5850c5b06d | |
Tony Garnock-Jones | b0d0eb3a11 | |
Tony Garnock-Jones | 21d09f81e5 | |
Tony Garnock-Jones | 8b5e74048e | |
Tony Garnock-Jones | 201f5433e1 | |
Tony Garnock-Jones | 8cbe2475e3 | |
Tony Garnock-Jones | 930f7eda00 | |
Tony Garnock-Jones | a932fa1428 | |
Tony Garnock-Jones | 3412eabcff | |
Tony Garnock-Jones | e47a37e3f0 | |
Tony Garnock-Jones | 27403776dc | |
Tony Garnock-Jones | 25698ce4b0 | |
Tony Garnock-Jones | ca8f343a44 | |
Tony Garnock-Jones | dc5c97b027 | |
Tony Garnock-Jones | 35c965b85d | |
Tony Garnock-Jones | 02d0447ea6 | |
Tony Garnock-Jones | 66aed5c882 | |
Tony Garnock-Jones | 6bec672087 | |
Tony Garnock-Jones | f338373ac5 | |
Tony Garnock-Jones | ccd87c09f1 | |
Tony Garnock-Jones | dd281366c4 | |
Tony Garnock-Jones | 608bdde8c8 | |
Tony Garnock-Jones | 730d40b90b | |
Tony Garnock-Jones | 80b5d2977c | |
Tony Garnock-Jones | 63a2146f87 | |
Tony Garnock-Jones | 65bae07fc1 | |
Tony Garnock-Jones | b5a4a150ac | |
Tony Garnock-Jones | b0fe7baf25 | |
Tony Garnock-Jones | 16cacc16db | |
Tony Garnock-Jones | 9e80ba45b8 | |
Tony Garnock-Jones | 5d2e776ecf | |
Tony Garnock-Jones | a64a8177eb | |
Tony Garnock-Jones | 7423479de3 | |
Tony Garnock-Jones | 82e9457359 | |
Tony Garnock-Jones | 18f087d18e | |
Tony Garnock-Jones | 690ac12cc0 | |
Tony Garnock-Jones | 9e322c4cfb | |
Tony Garnock-Jones | 7332096828 | |
Tony Garnock-Jones | c82918d9a0 | |
Tony Garnock-Jones | 0b1208d2fd | |
Tony Garnock-Jones | 49a036376a | |
Tony Garnock-Jones | 5cbcba4f4a | |
Tony Garnock-Jones | 8c80df1922 | |
Tony Garnock-Jones | 6b72bf9d78 | |
Tony Garnock-Jones | 2f8e1fb1ca | |
Tony Garnock-Jones | 8259c15a7d | |
Tony Garnock-Jones | 99a87be883 | |
Tony Garnock-Jones | 3908f2ff26 | |
Tony Garnock-Jones | 45e8ebef12 | |
Tony Garnock-Jones | b8179cfbc1 | |
Tony Garnock-Jones | ea0ef03329 | |
Tony Garnock-Jones | 0842c93994 | |
Tony Garnock-Jones | 7d8ea3c0d1 | |
Tony Garnock-Jones | 94d05a37ca | |
Tony Garnock-Jones | d8099fa07a | |
Tony Garnock-Jones | 5b1b535644 | |
Tony Garnock-Jones | 63c52d6b46 | |
Tony Garnock-Jones | 97aaa5ef5d | |
Tony Garnock-Jones | a374cbfdf9 | |
Tony Garnock-Jones | 7be246a400 | |
Tony Garnock-Jones | 8c2729e3d8 | |
Tony Garnock-Jones | 3465f6b322 | |
Tony Garnock-Jones | 606daa625b | |
Tony Garnock-Jones | eaeb4b7df8 | |
Tony Garnock-Jones | a0712af032 | |
Tony Garnock-Jones | f46276cf05 | |
Tony Garnock-Jones | 2ff3067fad | |
Tony Garnock-Jones | 6408493ea3 | |
Tony Garnock-Jones | fc23d1b779 | |
Tony Garnock-Jones | ed12c1c69c | |
Tony Garnock-Jones | 71cde3daba | |
Tony Garnock-Jones | 0f6059cd59 | |
Tony Garnock-Jones | 595a13dfd6 | |
Tony Garnock-Jones | b60551a52b | |
Tony Garnock-Jones | c5efff9a0f | |
Tony Garnock-Jones | 2105886c5e | |
Tony Garnock-Jones | bed03edcd3 | |
Tony Garnock-Jones | 5a412a5d9b | |
Tony Garnock-Jones | 1501a719e4 | |
Tony Garnock-Jones | 58e190e419 |
|
@ -9,3 +9,7 @@ scratch/
|
|||
*.did
|
||||
.do_built
|
||||
.do_built.dir/
|
||||
|
||||
tsconfig.tsbuildinfo
|
||||
|
||||
deps.mk
|
||||
|
|
|
@ -0,0 +1,674 @@
|
|||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<https://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
|
@ -0,0 +1,40 @@
|
|||
__ignored__ := $(shell ./setup.sh)
|
||||
|
||||
LERNA=./node_modules/.bin/lerna
|
||||
|
||||
bootstrap: node_modules/lerna
|
||||
|
||||
node_modules/lerna:
|
||||
yarn install
|
||||
$(MAKE) clean
|
||||
+$(MAKE) -j$$(nproc) all
|
||||
|
||||
clean.local:
|
||||
|
||||
clean: clean.local
|
||||
$(LERNA) exec 'yarn clean || true'
|
||||
|
||||
veryclean: clean.local
|
||||
$(LERNA) exec 'yarn veryclean || true'
|
||||
rm -rf node_modules
|
||||
|
||||
all:
|
||||
$(LERNA) exec yarn prepare
|
||||
|
||||
watch:
|
||||
inotifytest make -j$$(nproc) all
|
||||
|
||||
PROTOCOLS_BRANCH=main
|
||||
pull-protocols:
|
||||
git subtree pull -P packages/core/protocols \
|
||||
-m 'Merge latest changes from the syndicate-protocols repository' \
|
||||
git@git.syndicate-lang.org:syndicate-lang/syndicate-protocols \
|
||||
$(PROTOCOLS_BRANCH)
|
||||
push-protocols:
|
||||
git subtree push -P packages/core/protocols \
|
||||
git@git.syndicate-lang.org:syndicate-lang/syndicate-protocols \
|
||||
$(PROTOCOLS_BRANCH)
|
||||
|
||||
fixcopyright:
|
||||
-fixcopyright.rkt --preset-typescript --file-pattern 'packages/**.ts' GPL-3.0-or-later
|
||||
-fixcopyright.rkt --preset-javascript --file-pattern 'packages/**.js' GPL-3.0-or-later
|
244
README.md
|
@ -1,116 +1,47 @@
|
|||
# Syndicate/js
|
||||
|
||||
A new, efficient implementation of Syndicate for JavaScript in both
|
||||
node.js and the browser. The implementation techniques herein are the
|
||||
subject of a forthcoming paper.
|
||||
A fourth-generation implementation of Dataspaces and Syndicate for
|
||||
TypeScript and JavaScript, in both node.js and the browser. The
|
||||
implementation techniques herein are the subject of a forthcoming
|
||||
paper.
|
||||
|
||||
## Quickstart
|
||||
## Branches
|
||||
|
||||
### Option 1. Create a new program/library using Syndicate/js.
|
||||
The `main` branch is where active development happens:
|
||||
|
||||
Use `npx @syndicate-lang/create DIRECTORY` or `npm init
|
||||
@syndicate-lang DIRECTORY`:
|
||||
git clone -b main https://git.syndicate-lang.org/syndicate-lang/syndicate-js
|
||||
|
||||
npm init @syndicate-lang myprogram
|
||||
cd myprogram
|
||||
npm i .
|
||||
npm run build
|
||||
node lib/index.js
|
||||
## Building
|
||||
|
||||
### Option 2. Add Syndicate/js to an existing program/library.
|
||||
This project uses [`yarn`](https://yarnpkg.com/), not `npm`.
|
||||
|
||||
Install a few packages from the
|
||||
[@syndicate-lang](https://www.npmjs.com/org/syndicate-lang) scope on
|
||||
npmjs.com:
|
||||
The repository is a monorepo, using
|
||||
[yarn workspaces](https://classic.yarnpkg.com/en/docs/workspaces/).
|
||||
[Lerna](https://lerna.js.org/) is used as a thin
|
||||
[veneer atop yarn workspaces](https://medium.com/@jsilvax/a-workflow-guide-for-lerna-with-yarn-workspaces-60f97481149d),
|
||||
providing convenient automation for package version management and
|
||||
publication.
|
||||
|
||||
npm i --save-dev @syndicate-lang/syntax @babel/preset-env
|
||||
npm i --save @syndicate-lang/core
|
||||
After a checkout, run:
|
||||
|
||||
Then, add the `@syndicate-lang/syntax/plugin` to your `.babelrc`. Use
|
||||
`npx syndicate-babel` in place of `npx babel` to compile your code.
|
||||
|
||||
## Creating a new Syndicate/js project
|
||||
|
||||
Create a skeletal `package.json`:
|
||||
|
||||
{
|
||||
"main": "lib/index.js",
|
||||
"scripts": {
|
||||
"build": "npx syndicate-babel src --out-dir lib",
|
||||
"clean": "rm -rf lib"
|
||||
}
|
||||
}
|
||||
|
||||
The entry point will be `lib/index.js`; the corresponding *source*
|
||||
file will be `src/index.js`.
|
||||
|
||||
Two `npm run` scripts are defined: one which compiles Syndicate/js
|
||||
source files in `src` to plain JavaScript in `lib`. The compiler uses
|
||||
Babel; we will configure Babel next.
|
||||
|
||||
Create a `.babelrc` file:
|
||||
|
||||
{
|
||||
"presets": [ "@babel/preset-env" ],
|
||||
"plugins": [ "@syndicate-lang/syntax/plugin" ]
|
||||
}
|
||||
|
||||
Now, install the necessary dependencies. Babel and the Syndicate/js
|
||||
extensions are needed at build-time:
|
||||
|
||||
npm i --save-dev @syndicate-lang/syntax @babel/preset-env
|
||||
|
||||
The Syndicate/js runtime and as many drivers as you would like to use
|
||||
are needed at run-time:
|
||||
|
||||
npm i --save @syndicate-lang/core
|
||||
npm i --save @syndicate-lang/driver-timer
|
||||
|
||||
Finally, create the main program file. Create a directory `src`, and
|
||||
then a file `src/index.js`:
|
||||
|
||||
```javascript
|
||||
const { TimeLaterThan } = activate require("@syndicate-lang/driver-timer");
|
||||
|
||||
spawn named 'ticker' {
|
||||
field this.counter = 0;
|
||||
field this.deadline = +(new Date());
|
||||
|
||||
on start { console.log('ticker starting'); }
|
||||
on stop { console.log('ticker stopping'); }
|
||||
|
||||
on asserted TimeLaterThan(this.deadline) {
|
||||
this.counter++;
|
||||
console.log('tick', new Date(), this.counter);
|
||||
this.deadline += 1000;
|
||||
}
|
||||
|
||||
stop on (this.counter == 5);
|
||||
}
|
||||
```shell
|
||||
make bootstrap
|
||||
```
|
||||
|
||||
Now, compile the project:
|
||||
Alternatively, running:
|
||||
|
||||
npm run build
|
||||
```shell
|
||||
yarn install
|
||||
./node_modules/.bin/lerna exec yarn prepare
|
||||
```
|
||||
|
||||
Finally, run the program:
|
||||
|
||||
node lib/index.js
|
||||
|
||||
The output should be something like:
|
||||
|
||||
ticker starting
|
||||
tick 2018-11-05T14:23:27.713Z 1
|
||||
tick 2018-11-05T14:23:28.705Z 2
|
||||
tick 2018-11-05T14:23:29.706Z 3
|
||||
tick 2018-11-05T14:23:30.706Z 4
|
||||
tick 2018-11-05T14:23:31.707Z 5
|
||||
ticker stopping
|
||||
will download and install all dependencies and then build all the
|
||||
packages.
|
||||
|
||||
## Licence
|
||||
|
||||
@syndicate-lang, an implementation of Syndicate for JS.
|
||||
Copyright (C) 2016-2018 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
||||
@syndicate-lang, an implementation of Syndicate for TypeScript and JavaScript.
|
||||
Copyright (C) 2016-2021 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -124,3 +55,124 @@ GNU General Public License for more details.
|
|||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
<!-- ## Quickstart -->
|
||||
|
||||
<!-- ### Option 1. Create a new program/library using Syndicate/js. -->
|
||||
|
||||
<!-- Use `npx @syndicate-lang/create DIRECTORY` or `npm init -->
|
||||
<!-- @syndicate-lang DIRECTORY`: -->
|
||||
|
||||
<!-- npm init @syndicate-lang myprogram -->
|
||||
<!-- cd myprogram -->
|
||||
<!-- npm i . -->
|
||||
<!-- npm run build -->
|
||||
<!-- node lib/index.js -->
|
||||
|
||||
<!-- ### Option 2. Add Syndicate/js to an existing program/library. -->
|
||||
|
||||
<!-- Install a few packages from the -->
|
||||
<!-- [@syndicate-lang](https://www.npmjs.com/org/syndicate-lang) scope on -->
|
||||
<!-- npmjs.com: -->
|
||||
|
||||
<!-- npm i --save-dev @syndicate-lang/syntax @babel/preset-env -->
|
||||
<!-- npm i --save @syndicate-lang/core -->
|
||||
|
||||
<!-- Then, add the `@syndicate-lang/syntax/plugin` to your `.babelrc`. Use -->
|
||||
<!-- `npx syndicate-babel` in place of `npx babel` to compile your code. -->
|
||||
|
||||
<!-- ## Creating a new Syndicate/js project -->
|
||||
|
||||
<!-- Create a skeletal `package.json`: -->
|
||||
|
||||
<!-- { -->
|
||||
<!-- "main": "lib/index.js", -->
|
||||
<!-- "scripts": { -->
|
||||
<!-- "build": "npx syndicate-babel src --out-dir lib", -->
|
||||
<!-- "clean": "rm -rf lib" -->
|
||||
<!-- } -->
|
||||
<!-- } -->
|
||||
|
||||
<!-- The entry point will be `lib/index.js`; the corresponding *source* -->
|
||||
<!-- file will be `src/index.js`. -->
|
||||
|
||||
<!-- Two `npm run` scripts are defined: one which compiles Syndicate/js -->
|
||||
<!-- source files in `src` to plain JavaScript in `lib`. The compiler uses -->
|
||||
<!-- Babel; we will configure Babel next. -->
|
||||
|
||||
<!-- Create a `.babelrc` file: -->
|
||||
|
||||
<!-- { -->
|
||||
<!-- "presets": [ "@babel/preset-env" ], -->
|
||||
<!-- "plugins": [ "@syndicate-lang/syntax/plugin" ] -->
|
||||
<!-- } -->
|
||||
|
||||
<!-- Now, install the necessary dependencies. Babel and the Syndicate/js -->
|
||||
<!-- extensions are needed at build-time: -->
|
||||
|
||||
<!-- npm i --save-dev @syndicate-lang/syntax @babel/preset-env -->
|
||||
|
||||
<!-- The Syndicate/js runtime and as many drivers as you would like to use -->
|
||||
<!-- are needed at run-time: -->
|
||||
|
||||
<!-- npm i --save @syndicate-lang/core -->
|
||||
<!-- npm i --save @syndicate-lang/driver-timer -->
|
||||
|
||||
<!-- Finally, create the main program file. Create a directory `src`, and -->
|
||||
<!-- then a file `src/index.js`: -->
|
||||
|
||||
<!-- ```javascript -->
|
||||
<!-- const { LaterThan } = activate require("@syndicate-lang/driver-timer"); -->
|
||||
|
||||
<!-- spawn named 'ticker' { -->
|
||||
<!-- field this.counter = 0; -->
|
||||
<!-- field this.deadline = +(new Date()) / 1000.0; -->
|
||||
|
||||
<!-- on start { console.log('ticker starting'); } -->
|
||||
<!-- on stop { console.log('ticker stopping'); } -->
|
||||
|
||||
<!-- on asserted LaterThan(this.deadline) { -->
|
||||
<!-- this.counter++; -->
|
||||
<!-- console.log('tick', new Date(), this.counter); -->
|
||||
<!-- this.deadline += 1; -->
|
||||
<!-- } -->
|
||||
|
||||
<!-- stop on (this.counter == 5); -->
|
||||
<!-- } -->
|
||||
<!-- ``` -->
|
||||
|
||||
<!-- Now, compile the project: -->
|
||||
|
||||
<!-- npm run build -->
|
||||
|
||||
<!-- Finally, run the program: -->
|
||||
|
||||
<!-- node lib/index.js -->
|
||||
|
||||
<!-- The output should be something like: -->
|
||||
|
||||
<!-- ticker starting -->
|
||||
<!-- tick 2018-11-05T14:23:27.713Z 1 -->
|
||||
<!-- tick 2018-11-05T14:23:28.705Z 2 -->
|
||||
<!-- tick 2018-11-05T14:23:29.706Z 3 -->
|
||||
<!-- tick 2018-11-05T14:23:30.706Z 4 -->
|
||||
<!-- tick 2018-11-05T14:23:31.707Z 5 -->
|
||||
<!-- ticker stopping -->
|
||||
|
||||
## Older versions
|
||||
|
||||
An earlier TypeScript+JavaScript implementation from early 2021 (the
|
||||
primary difference to `main` being a lack of object-capability
|
||||
support) can be found on the `typescript1` branch:
|
||||
|
||||
git clone -b typescript1 https://git.syndicate-lang.org/syndicate-lang/syndicate-js
|
||||
|
||||
Finally, the `babel-based` branch is from 2018, and is an
|
||||
implementation for JavaScript only. It extends babel with new syntax
|
||||
and new plugins (rather than implementing its own error-tolerant
|
||||
parser, like `typescript1` and `main`):
|
||||
|
||||
git clone -b babel-based https://git.syndicate-lang.org/syndicate-lang/syndicate-js
|
||||
|
||||
|
|
24
TODO.md
|
@ -1,6 +1,28 @@
|
|||
|
||||
// // v Ideally, this would be of type "Sturdy.SturdyRef | null", but (1) the
|
||||
// // current Dataflow implementation isn't bright enough to mark valuesas being
|
||||
// // convertible to preserves values on demand, and (2) null isn't preservesable
|
||||
// // in any case. If preserves were improved to be able to convert schema-parsed
|
||||
// // values to preserves on demand, and to know it could do that at the type
|
||||
// // level, then I could change Dataflow to support any value that could be
|
||||
// // converted to preserves on demand, and I could special-case null and
|
||||
// // undefined for the ergonomics.
|
||||
// field servercap: AnyValue = false;
|
||||
// on asserted InputValue('#servercap', $v: string) => {
|
||||
// servercap.value = false;
|
||||
// try {
|
||||
// const a = new Reader<Ref>(v).next();
|
||||
// if (Sturdy.toSturdyRef(a) !== void 0) servercap.value = a;
|
||||
// } catch (e) {
|
||||
// console.error(e);
|
||||
// }
|
||||
// }
|
||||
// assert UIAttribute('#servercap', 'class', 'invalid') when (!servercap.value);
|
||||
|
||||
|
||||
- [DONE] `during/spawn`
|
||||
- [DONE] `during`
|
||||
- [DONE] `let { TimeLaterThan } = activate require("@syndicate-lang/driver-timer");`
|
||||
- [DONE] `let { LaterThan } = activate require("@syndicate-lang/driver-timer");`
|
||||
- [DONE] `react`
|
||||
- [DONE] `spawn*` or similar - looks like `spawn on start { ... }` will do the trick
|
||||
- [DONE] activation
|
||||
|
|
1
all.do
|
@ -1 +0,0 @@
|
|||
(for p in packages/*/; do echo $p/all; done | xargs redo-ifchange) && (echo Done. >&2)
|
|
@ -1,4 +0,0 @@
|
|||
#!/bin/sh
|
||||
[ -d node_modules/lerna ] || npm i .
|
||||
redo clean
|
||||
redo -j$(nproc) all
|
368
do
|
@ -1,368 +0,0 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# A minimal alternative to djb redo that doesn't support incremental builds.
|
||||
# For the full version, visit http://github.com/apenwarr/redo
|
||||
#
|
||||
# The author disclaims copyright to this source file and hereby places it in
|
||||
# the public domain. (2010 12 14; updated 2018 10 31)
|
||||
#
|
||||
USAGE="
|
||||
usage: $0 [-d] [-x] [-v] [-c] <targets...>
|
||||
-d print extra debug messages (mostly about dependency checks)
|
||||
-v run .do files with 'set -v'
|
||||
-x run .do files with 'set -x'
|
||||
-c clean up all old targets before starting
|
||||
|
||||
Note: $0 is an implementation of redo that does *not* check dependencies.
|
||||
It will never rebuild a target it has already built, unless you use -c.
|
||||
"
|
||||
|
||||
# By default, no output coloring.
|
||||
green=""
|
||||
bold=""
|
||||
plain=""
|
||||
|
||||
if [ -n "$TERM" -a "$TERM" != "dumb" ] && tty <&2 >/dev/null 2>&1; then
|
||||
green="$(printf '\033[32m')"
|
||||
bold="$(printf '\033[1m')"
|
||||
plain="$(printf '\033[m')"
|
||||
fi
|
||||
|
||||
# Split $1 into a dir part ($_dirsplit_dir) and base filename ($_dirsplit_base)
|
||||
_dirsplit()
|
||||
{
|
||||
_dirsplit_base=${1##*/}
|
||||
_dirsplit_dir=${1%$_dirsplit_base}
|
||||
}
|
||||
|
||||
# Like /usr/bin/dirname, but avoids a fork and uses _dirsplit semantics.
|
||||
dirname()
|
||||
(
|
||||
_dirsplit "$1"
|
||||
dir=${_dirsplit_dir%/}
|
||||
echo "${dir:-.}"
|
||||
)
|
||||
|
||||
_dirsplit "$0"
|
||||
export REDO=$(cd "${_dirsplit_dir:-.}" && echo "$PWD/$_dirsplit_base")
|
||||
_cmd=$_dirsplit_base
|
||||
|
||||
DO_TOP=
|
||||
if [ -z "$DO_BUILT" ]; then
|
||||
export _do_opt_debug=
|
||||
export _do_opt_exec=
|
||||
export _do_opt_verbose=
|
||||
export _do_opt_clean=
|
||||
fi
|
||||
while getopts 'dxvch?' _opt; do
|
||||
case $_opt in
|
||||
d) _do_opt_debug=1 ;;
|
||||
x) _do_opt_exec=x ;;
|
||||
v) _do_opt_verbose=v ;;
|
||||
c) _do_opt_clean=1 ;;
|
||||
\?|h|*) printf "%s" "$USAGE" >&2
|
||||
exit 99
|
||||
;;
|
||||
esac
|
||||
done
|
||||
shift "$((OPTIND - 1))"
|
||||
_debug() {
|
||||
[ -z "$_do_opt_debug" ] || echo "$@" >&2
|
||||
}
|
||||
|
||||
if [ -z "$DO_BUILT" -a "$_cmd" != "redo-whichdo" ]; then
|
||||
DO_TOP=1
|
||||
if [ "$#" -eq 0 ] && [ "$_cmd" = "do" -o "$_cmd" = "redo" ]; then
|
||||
set all # only toplevel redo has a default target
|
||||
fi
|
||||
export DO_BUILT=$PWD/.do_built
|
||||
: >>"$DO_BUILT"
|
||||
sort -u "$DO_BUILT" >"$DO_BUILT.new"
|
||||
echo "Cleaning up from previous run..." >&2
|
||||
while read f; do
|
||||
[ -n "$_do_opt_clean" ] && printf "%s\0%s.did\0" "$f" "$f"
|
||||
printf "%s.did.tmp\0" "$f"
|
||||
done <"$DO_BUILT.new" |
|
||||
xargs -0 rm -f 2>/dev/null
|
||||
mv "$DO_BUILT.new" "$DO_BUILT"
|
||||
DO_PATH=$DO_BUILT.dir
|
||||
export PATH=$DO_PATH:$PATH
|
||||
rm -rf "$DO_PATH"
|
||||
mkdir "$DO_PATH"
|
||||
for d in redo redo-ifchange redo-whichdo; do
|
||||
ln -s "$REDO" "$DO_PATH/$d"
|
||||
done
|
||||
[ -e /bin/true ] && TRUE=/bin/true || TRUE=/usr/bin/true
|
||||
for d in redo-ifcreate redo-stamp redo-always redo-ood \
|
||||
redo-targets redo-sources; do
|
||||
ln -s $TRUE "$DO_PATH/$d"
|
||||
done
|
||||
fi
|
||||
|
||||
|
||||
# Chop the "file" part off a /path/to/file pathname.
|
||||
# Note that if the filename already ends in a /, we just remove the slash.
|
||||
_updir()
|
||||
{
|
||||
local v="${1%/*}"
|
||||
[ "$v" != "$1" ] && echo "$v"
|
||||
# else "empty" which means we went past the root
|
||||
}
|
||||
|
||||
|
||||
# Returns true if $1 starts with $2.
|
||||
_startswith()
|
||||
{
|
||||
[ "${1#"$2"}" != "$1" ]
|
||||
}
|
||||
|
||||
|
||||
# Returns true if $1 ends with $2.
|
||||
_endswith()
|
||||
{
|
||||
[ "${1%"$2"}" != "$1" ]
|
||||
}
|
||||
|
||||
|
||||
# Prints $1 as a path relative to $PWD (not starting with /).
|
||||
# If it already doesn't start with a /, doesn't change the string.
|
||||
_relpath()
|
||||
{
|
||||
local here="$(command pwd)" there="$1" out= hadslash=
|
||||
#echo "RP start '$there' hs='$hadslash'" >&2
|
||||
_startswith "$there" "/" || { echo "$there" && return; }
|
||||
[ "$there" != "/" ] && _endswith "$there" "/" && hadslash=/
|
||||
here=${here%/}/
|
||||
while [ -n "$here" ]; do
|
||||
#echo "RP out='$out' here='$here' there='$there'" >&2
|
||||
[ "${here%/}" = "${there%/}" ] && there= && break;
|
||||
[ "${there#$here}" != "$there" ] && break
|
||||
out=../$out
|
||||
_dirsplit "${here%/}"
|
||||
here=$_dirsplit_dir
|
||||
done
|
||||
there=${there#$here}
|
||||
if [ -n "$there" ]; then
|
||||
echo "$out${there%/}$hadslash"
|
||||
else
|
||||
echo "${out%/}$hadslash"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
# Prints a "normalized relative" path, with ".." resolved where possible.
|
||||
# For example, a/b/../c will be reduced to just a/c.
|
||||
_normpath()
|
||||
(
|
||||
local path="$1" out= isabs=
|
||||
#echo "NP start '$path'" >&2
|
||||
if _startswith "$path" "/"; then
|
||||
isabs=1
|
||||
else
|
||||
path="${PWD%/}/$path"
|
||||
fi
|
||||
set -f
|
||||
IFS=/
|
||||
for d in $path; do
|
||||
#echo "NP out='$out' d='$d'" >&2
|
||||
if [ "$d" = ".." ]; then
|
||||
out=$(_updir "${out%/}")/
|
||||
else
|
||||
out=$out$d/
|
||||
fi
|
||||
done
|
||||
#echo "NP out='$out' (done)" >&2
|
||||
out=${out%/}
|
||||
if [ -n "$isabs" ]; then
|
||||
echo "${out:-/}"
|
||||
else
|
||||
_relpath "${out:-/}"
|
||||
fi
|
||||
)
|
||||
|
||||
|
||||
# List the possible names for default*.do files in dir $1 matching the target
|
||||
# pattern in $2. We stop searching when we find the first one that exists.
|
||||
_find_dofiles_pwd()
|
||||
{
|
||||
local dodir="$1" dofile="$2"
|
||||
_startswith "$dofile" "default." || dofile=${dofile#*.}
|
||||
while :; do
|
||||
dofile=default.${dofile#default.*.}
|
||||
echo "$dodir$dofile"
|
||||
[ -e "$dodir$dofile" ] && return 0
|
||||
[ "$dofile" = default.do ] && break
|
||||
done
|
||||
return 1
|
||||
}
|
||||
|
||||
|
||||
# List the possible names for default*.do files in $PWD matching the target
|
||||
# pattern in $1. We stop searching when we find the first name that works.
|
||||
# If there are no matches in $PWD, we'll search in .., and so on, to the root.
|
||||
_find_dofiles()
|
||||
{
|
||||
local target="$1" dodir= dofile= newdir=
|
||||
_debug "find_dofile: '$PWD' '$target'"
|
||||
dofile="$target.do"
|
||||
echo "$dofile"
|
||||
[ -e "$dofile" ] && return 0
|
||||
|
||||
# Try default.*.do files, walking up the tree
|
||||
_dirsplit "$dofile"
|
||||
dodir=$_dirsplit_dir
|
||||
dofile=$_dirsplit_base
|
||||
[ -n "$dodir" ] && dodir=${dodir%/}/
|
||||
[ -e "$dodir$dofile" ] && return 0
|
||||
for i in $(seq 100); do
|
||||
[ -n "$dodir" ] && dodir=${dodir%/}/
|
||||
#echo "_find_dofiles: '$dodir' '$dofile'" >&2
|
||||
_find_dofiles_pwd "$dodir" "$dofile" && return 0
|
||||
newdir=$(_normpath "${dodir}..")
|
||||
[ "$newdir" = "$dodir" ] && break
|
||||
dodir=$newdir
|
||||
done
|
||||
return 1
|
||||
}
|
||||
|
||||
|
||||
# Print the last .do file returned by _find_dofiles.
|
||||
# If that file exists, returns 0, else 1.
|
||||
_find_dofile()
|
||||
{
|
||||
local files="$(_find_dofiles "$1")"
|
||||
rv=$?
|
||||
#echo "files='$files'" >&2
|
||||
[ "$rv" -ne 0 ] && return $rv
|
||||
echo "$files" | {
|
||||
while read -r linex; do line=$linex; done
|
||||
printf "%s\n" "$line"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# Actually run the given $dofile with the arguments in $@.
|
||||
# Note: you should always run this in a subshell.
|
||||
_run_dofile()
|
||||
{
|
||||
export DO_DEPTH="$DO_DEPTH "
|
||||
export REDO_TARGET="$PWD/$target"
|
||||
local line1
|
||||
set -e
|
||||
read line1 <"$PWD/$dofile" || true
|
||||
cmd=${line1#"#!/"}
|
||||
if [ "$cmd" != "$line1" ]; then
|
||||
set -$_do_opt_verbose$_do_opt_exec
|
||||
exec /$cmd "$PWD/$dofile" "$@" >"$tmp.tmp2"
|
||||
else
|
||||
set -$_do_opt_verbose$_do_opt_exec
|
||||
:; . "$PWD/$dofile" >"$tmp.tmp2"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
# Find and run the right .do file, starting in dir $1, for target $2, using
|
||||
# filename $3 as the temporary output file. Renames the temp file to $2 when
|
||||
# done.
|
||||
_do()
|
||||
{
|
||||
local dir="$1" target="$2" tmp="$3" dopath= dodir= dofile= ext=
|
||||
if [ "$_cmd" = "redo" ] ||
|
||||
( [ ! -e "$target" -o -d "$target" ] &&
|
||||
[ ! -e "$target.did" ] ); then
|
||||
printf '%sdo %s%s%s%s\n' \
|
||||
"$green" "$DO_DEPTH" "$bold" "$dir$target" "$plain" >&2
|
||||
dopath=$(_find_dofile "$target")
|
||||
if [ ! -e "$dopath" ]; then
|
||||
echo "do: $target: no .do file ($PWD)" >&2
|
||||
return 1
|
||||
fi
|
||||
_dirsplit "$dopath"
|
||||
dodir=$_dirsplit_dir dofile=$_dirsplit_base
|
||||
if _startswith "$dofile" "default."; then
|
||||
ext=${dofile#default}
|
||||
ext=${ext%.do}
|
||||
else
|
||||
ext=
|
||||
fi
|
||||
target=$PWD/$target
|
||||
tmp=$PWD/$tmp
|
||||
cd "$dodir" || return 99
|
||||
target=$(_relpath "$target") || return 98
|
||||
tmp=$(_relpath "$tmp") || return 97
|
||||
base=${target%$ext}
|
||||
[ ! -e "$DO_BUILT" ] || [ ! -d "$(dirname "$target")" ] ||
|
||||
: >>"$target.did.tmp"
|
||||
( _run_dofile "$target" "$base" "$tmp.tmp" )
|
||||
rv=$?
|
||||
if [ $rv != 0 ]; then
|
||||
printf "do: %s%s\n" "$DO_DEPTH" \
|
||||
"$dir$target: got exit code $rv" >&2
|
||||
rm -f "$tmp.tmp" "$tmp.tmp2" "$target.did"
|
||||
return $rv
|
||||
fi
|
||||
echo "$PWD/$target" >>"$DO_BUILT"
|
||||
mv "$tmp.tmp" "$target" 2>/dev/null ||
|
||||
! test -s "$tmp.tmp2" ||
|
||||
mv "$tmp.tmp2" "$target" 2>/dev/null
|
||||
[ -e "$target.did.tmp" ] &&
|
||||
mv "$target.did.tmp" "$target.did" ||
|
||||
: >>"$target.did"
|
||||
rm -f "$tmp.tmp2"
|
||||
else
|
||||
_debug "do $DO_DEPTH$target exists." >&2
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
# Make corrections for directories that don't actually exist yet.
|
||||
_dir_shovel()
|
||||
{
|
||||
local dir base
|
||||
xdir=$1 xbase=$2 xbasetmp=$2
|
||||
while [ ! -d "$xdir" -a -n "$xdir" ]; do
|
||||
_dirsplit "${xdir%/}"
|
||||
xbasetmp=${_dirsplit_base}__$xbasetmp
|
||||
xdir=$_dirsplit_dir xbase=$_dirsplit_base/$xbase
|
||||
done
|
||||
_debug "xbasetmp='$xbasetmp'" >&2
|
||||
}
|
||||
|
||||
|
||||
# Implementation of the "redo" command.
|
||||
_redo()
|
||||
{
|
||||
set +e
|
||||
for i in "$@"; do
|
||||
_dirsplit "$i"
|
||||
_dir_shovel "$_dirsplit_dir" "$_dirsplit_base"
|
||||
dir=$xdir base=$xbase basetmp=$xbasetmp
|
||||
( cd "$dir" && _do "$dir" "$base" "$basetmp" )
|
||||
[ "$?" = 0 ] || return 1
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
# Implementation of the "redo-whichdo" command.
|
||||
_whichdo()
|
||||
{
|
||||
_find_dofiles "$1"
|
||||
}
|
||||
|
||||
|
||||
case $_cmd in
|
||||
do|redo|redo-ifchange) _redo "$@" ;;
|
||||
redo-whichdo) _whichdo "$1" ;;
|
||||
do.test) ;;
|
||||
*) printf "$0: '%s': unexpected redo command" "$_cmd" >&2; exit 99 ;;
|
||||
esac
|
||||
[ "$?" = 0 ] || exit 1
|
||||
|
||||
if [ -n "$DO_TOP" ]; then
|
||||
if [ -n "$_do_opt_clean" ]; then
|
||||
echo "Removing stamp files..." >&2
|
||||
[ ! -e "$DO_BUILT" ] ||
|
||||
while read f; do printf "%s.did\0" "$f"; done <"$DO_BUILT" |
|
||||
xargs -0 rm -f 2>/dev/null
|
||||
fi
|
||||
fi
|
|
@ -0,0 +1,3 @@
|
|||
index.js
|
||||
index.js.map
|
||||
src/gen/
|
|
@ -0,0 +1,49 @@
|
|||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Syndicate: Chat</title>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link href="style.css" rel="stylesheet">
|
||||
<script src="node_modules/@preserves/core/dist/preserves.js"></script>
|
||||
<script src="node_modules/@syndicate-lang/core/dist/syndicate.js"></script>
|
||||
<script src="node_modules/@syndicate-lang/html/dist/syndicate-html.js"></script>
|
||||
<script src="node_modules/@syndicate-lang/ws-relay/dist/syndicate-ws-relay.js"></script>
|
||||
<script src="index.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<section>
|
||||
<form id="nym_form" name="nym_form">
|
||||
<fieldset>
|
||||
<label class="control-label" for="route">Dataspace address:</label>
|
||||
<input type="text" id="route" name="route" value="">
|
||||
|
||||
<label class="control-label" for="nym">Nym:</label>
|
||||
<input type="text" id="nym" name="nym" value="">
|
||||
</fieldset>
|
||||
</form>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<section id="messages">
|
||||
<h1>Messages</h1>
|
||||
<div id="chat_output"></div>
|
||||
</section>
|
||||
<section id="active_users">
|
||||
<h1>Active Users</h1>
|
||||
<ul id="nymlist"></ul>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<form id="chat_form" name="chat_form">
|
||||
<fieldset>
|
||||
<input type="text" id="chat_input" name="chat_input" value="" autocomplete="off">
|
||||
<button id="send_chat">Send</button>
|
||||
</fieldset>
|
||||
</form>
|
||||
</section>
|
||||
|
||||
<script>Main.main();</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,32 @@
|
|||
{
|
||||
"name": "@syndicate-lang/example-simple-chat",
|
||||
"private": true,
|
||||
"description": "Simple chat in the browser",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"prepare": "yarn regenerate && yarn compile && yarn rollup",
|
||||
"regenerate": "rm -rf ./src/gen && preserves-schema-ts --output ./src/gen ./protocols/schemas",
|
||||
"regenerate:watch": "yarn regenerate --watch",
|
||||
"compile": "syndicate-tsc",
|
||||
"compile:watch": "syndicate-tsc -w --verbose --intermediate-directory src.ts",
|
||||
"rollup": "rollup -c",
|
||||
"rollup:watch": "rollup -c -w",
|
||||
"clean": "rm -rf lib/ index.js index.js.map"
|
||||
},
|
||||
"author": "Tony Garnock-Jones <tonyg@leastfixedpoint.com>",
|
||||
"license": "GPL-3.0+",
|
||||
"dependencies": {
|
||||
"@preserves/core": "^0.995.200",
|
||||
"@syndicate-lang/core": "*",
|
||||
"@syndicate-lang/html": "*",
|
||||
"@syndicate-lang/ws-relay": "*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@preserves/schema-cli": ">=0.995.201",
|
||||
"@syndicate-lang/ts-plugin": "*",
|
||||
"@syndicate-lang/tsc": "*",
|
||||
"rollup": "^2.60",
|
||||
"rollup-plugin-sourcemaps": "^0.6",
|
||||
"typescript": "^4.9"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
version 1 .
|
||||
|
||||
Present = <Present @username string>.
|
||||
Says = <Says @who string @what string>.
|
|
@ -0,0 +1,21 @@
|
|||
/// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
||||
|
||||
import sourcemaps from 'rollup-plugin-sourcemaps';
|
||||
|
||||
export default {
|
||||
input: 'lib/index.js',
|
||||
plugins: [sourcemaps()],
|
||||
output: {
|
||||
file: 'index.js',
|
||||
format: 'umd',
|
||||
name: 'Main',
|
||||
sourcemap: true,
|
||||
globals: {
|
||||
'@preserves/core': 'Preserves',
|
||||
'@syndicate-lang/core': 'Syndicate',
|
||||
'@syndicate-lang/html': 'SyndicateHtml',
|
||||
'@syndicate-lang/ws-relay': 'SyndicateWsRelay',
|
||||
},
|
||||
},
|
||||
};
|
|
@ -0,0 +1 @@
|
|||
<require-service <relay-listener <tcp "0.0.0.0" 9001> $gatekeeper>>
|
|
@ -0,0 +1,9 @@
|
|||
let ?ds = dataspace
|
||||
|
||||
# Connect using <route [<ws "...">] <ref {oid: "syndicate" sig: #[acowDB2/oI+6aSEC3YIxGg]}>
|
||||
<bind <ref {oid: "syndicate" key: #x""}> $ds #f>
|
||||
|
||||
# Connect using <route [<ws "...">] <noise { service: "syndicate", key: #x"21f6cd4e11e7e37711d6b3084ff18cded8fc8abf293aa47d43e8bb86dda65516" }>>
|
||||
let ?sk = #x"7626eb6c0ee79cb928a0c3f6e29621e9119da6735859f1425956a49fd937e586"
|
||||
let ?pk = #x"21f6cd4e11e7e37711d6b3084ff18cded8fc8abf293aa47d43e8bb86dda65516"
|
||||
<bind <noise { service: "syndicate", key: $pk, secretKey: $sk }> $ds #f>
|
|
@ -0,0 +1,148 @@
|
|||
/// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
||||
|
||||
import { fromJS, Bytes, Dataspace, Ref, AnyValue, Reader, Schemas, stringify } from "@syndicate-lang/core";
|
||||
import { boot as bootHtml, Anchor, template as html, HtmlFragments, GlobalEvent, UIAttribute, UIChangeableProperty } from "@syndicate-lang/html";
|
||||
import { boot as bootWakeDetector, WakeEvent } from "./wake-detector";
|
||||
import { boot as bootWsRelay, contactRemote } from "@syndicate-lang/ws-relay";
|
||||
import { Present, Says } from './gen/simpleChatProtocol';
|
||||
import G = Schemas.gatekeeper;
|
||||
import N = Schemas.noise;
|
||||
|
||||
export function main() {
|
||||
document.getElementById('chat_form')!.onsubmit = e => { e.preventDefault(); return false; };
|
||||
document.getElementById('nym_form')!.onsubmit = e => { e.preventDefault(); return false; };
|
||||
setDataspaceAddress();
|
||||
setUsernameIfUnset();
|
||||
document.getElementById('chat_input')!.focus();
|
||||
|
||||
Dataspace.boot(ds => {
|
||||
bootHtml(ds);
|
||||
bootWakeDetector(ds);
|
||||
bootWsRelay(ds, true);
|
||||
bootChat(ds);
|
||||
});
|
||||
}
|
||||
|
||||
function bootChat(ds: Ref) {
|
||||
spawn named 'chat' {
|
||||
at ds {
|
||||
field nym: string = '';
|
||||
on asserted UIChangeableProperty('#nym', 'value', $v: string) => nym.value = v;
|
||||
|
||||
during UIChangeableProperty('#route', 'value', $routeText: string) => {
|
||||
let route: G.Route<Ref> | null = null;
|
||||
try {
|
||||
route = G.asRoute(new Reader<Ref>(routeText).next());
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
assert UIAttribute('#route', 'class', 'invalid') when (!route);
|
||||
if (route) {
|
||||
console.log('contactRemote', route);
|
||||
contactRemote(route, (remoteDs, control, addr) => {
|
||||
on message WakeEvent() => at control {
|
||||
send message G.ForceDisconnect();
|
||||
}
|
||||
|
||||
outputState('connected', 'connected to ' + stringify(addr));
|
||||
on stop outputState('disconnected', 'disconnected from ' + stringify(addr));
|
||||
|
||||
on message GlobalEvent('#send_chat', 'click', _) => {
|
||||
const inp = document.getElementById("chat_input") as HTMLInputElement;
|
||||
var utterance = inp.value;
|
||||
inp.value = '';
|
||||
if (utterance) {
|
||||
at remoteDs {
|
||||
send message Says({ who: nym.value, what: utterance });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
at remoteDs {
|
||||
assert Present(nym.value);
|
||||
|
||||
const ui = new Anchor();
|
||||
during Present($who: string) => at ds {
|
||||
assert ui.context(who).html('#nymlist', html`<li>${who}</li>`);
|
||||
}
|
||||
|
||||
on message Says({ "who": $who: string, "what": $what: string }) => {
|
||||
outputUtterance(who, what);
|
||||
}
|
||||
}
|
||||
}, ds);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function setDataspaceAddress() {
|
||||
const route = document.getElementById('route')! as HTMLInputElement;
|
||||
if (route.value === '') {
|
||||
const isSecure = (document.location.protocol ?? '').toLowerCase().endsWith('s:');
|
||||
const localWs = isSecure ? 'wss' : 'ws';
|
||||
const wsurls = [
|
||||
`wss://generic-dataspace.demo.leastfixedpoint.com/`,
|
||||
`${localWs}://${document.location.hostname}:9001/`,
|
||||
];
|
||||
const transports: AnyValue[] =
|
||||
wsurls.map(u => fromJS(Schemas.transportAddress.WebSocket(u)));
|
||||
|
||||
route.value = stringify(G.Route<Ref>({
|
||||
"transports": transports,
|
||||
"pathSteps": [G.PathStep({
|
||||
"stepType": N.$noise,
|
||||
"detail": fromJS(N.NoiseSpec({
|
||||
"service": "syndicate",
|
||||
"key": Bytes.fromHex("21f6cd4e11e7e37711d6b3084ff18cded8fc8abf293aa47d43e8bb86dda65516"),
|
||||
"protocol": N.NoiseProtocol.absent(),
|
||||
"preSharedKeys": N.NoisePreSharedKeys.absent(),
|
||||
})),
|
||||
})],
|
||||
}));
|
||||
|
||||
// To use a sturdyref instead:
|
||||
//
|
||||
// route.value = stringify(G.Route<Ref>({
|
||||
// "transports": transports,
|
||||
// "pathSteps": [G.PathStep({
|
||||
// "stepType": Sturdy.$ref,
|
||||
// "detail": fromJS(Sturdy.Parameters({
|
||||
// "oid": "syndicate",
|
||||
// "sig": Bytes.fromHex('69ca300c1dbfa08fba692102dd82311a'),
|
||||
// "caveats": Sturdy.CaveatsField.absent(),
|
||||
// })),
|
||||
// })],
|
||||
// }));
|
||||
//
|
||||
// ... and of course you can chain these things, depending on server setup.
|
||||
}
|
||||
}
|
||||
|
||||
function setUsernameIfUnset() {
|
||||
const nym = document.getElementById('nym')! as HTMLInputElement;
|
||||
if (nym.value === '') {
|
||||
nym.value = "nym" + Math.floor(Math.random() * 65536);
|
||||
}
|
||||
}
|
||||
|
||||
function outputItem(cls: string, item0: HtmlFragments): ChildNode {
|
||||
const stamp = html`<span class="timestamp">${(new Date()).toUTCString()}</span>`;
|
||||
const item = html`<div class="${cls}">${stamp}${item0}</div>`;
|
||||
const n = item.node();
|
||||
const o = document.getElementById('chat_output')!;
|
||||
o.appendChild(n);
|
||||
o.scrollTop = o.scrollHeight;
|
||||
return n;
|
||||
}
|
||||
|
||||
function outputState(cls: string, state: string) {
|
||||
outputItem(`state_${cls}`, html`<span class="state ${cls}">${state}</span>`)
|
||||
}
|
||||
|
||||
function outputUtterance(who: string, what: string) {
|
||||
outputItem('utterance',
|
||||
html`<span class="nym">${who}</span><span class="utterance">${what}</span>`);
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
/// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
||||
|
||||
// Wake detector - notices when something (such as
|
||||
// suspension/sleeping!) has caused periodic activities to be
|
||||
// interrupted, and warns others about it. Inspired by
|
||||
// http://blog.alexmaccaw.com/javascript-wake-event
|
||||
|
||||
import { Ref, Turn, Observe } from "@syndicate-lang/core";
|
||||
|
||||
export message type WakeEvent();
|
||||
|
||||
export function boot(ds: Ref, period0?: number) {
|
||||
const period = period0 ?? 10000;
|
||||
at ds {
|
||||
during Observe({ "pattern": :pattern WakeEvent() }) => spawn named 'WakeDetector' {
|
||||
const facet = Turn.activeFacet;
|
||||
let mostRecentTrigger = +(new Date());
|
||||
const timerId = setInterval(() => facet.turn(() => {
|
||||
const now = +(new Date());
|
||||
if (now - mostRecentTrigger > period * 1.5) {
|
||||
send message WakeEvent();
|
||||
}
|
||||
mostRecentTrigger = now;
|
||||
}), period);
|
||||
on stop clearInterval(timerId);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,109 @@
|
|||
template {
|
||||
display: none;
|
||||
}
|
||||
|
||||
h1 {
|
||||
background: lightgrey;
|
||||
}
|
||||
|
||||
body > section {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
body > section > section {
|
||||
margin: 1em;
|
||||
}
|
||||
|
||||
section#messages {
|
||||
flex-grow: 3;
|
||||
}
|
||||
|
||||
section#active_users {
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
form#chat_form {
|
||||
flex: 1 100%;
|
||||
}
|
||||
|
||||
span.timestamp {
|
||||
color: #d0d0d0;
|
||||
}
|
||||
|
||||
span.timestamp:after {
|
||||
content: " ";
|
||||
}
|
||||
|
||||
.utterance span.nym:after {
|
||||
content: ": ";
|
||||
}
|
||||
|
||||
span.arrived:after {
|
||||
content: " arrived";
|
||||
}
|
||||
|
||||
span.departed:after {
|
||||
content: " departed";
|
||||
}
|
||||
|
||||
div.notification {
|
||||
background-color: #eeeeff;
|
||||
}
|
||||
|
||||
span.state.connected, span.arrived {
|
||||
color: #00c000;
|
||||
}
|
||||
|
||||
span.state.disconnected, span.departed {
|
||||
color: #c00000;
|
||||
}
|
||||
|
||||
span.state.crashed {
|
||||
color: white;
|
||||
background: red;
|
||||
}
|
||||
|
||||
span.state.crashed:after {
|
||||
content: "; please reload the page";
|
||||
}
|
||||
|
||||
div.state_disconnected {
|
||||
background-color: #ffeeee;
|
||||
}
|
||||
|
||||
div.state_connected {
|
||||
background-color: #eeffee;
|
||||
}
|
||||
|
||||
#chat_output {
|
||||
height: 15em;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
#chat_input {
|
||||
width: 80%;
|
||||
}
|
||||
|
||||
.nym {
|
||||
color: #00c000;
|
||||
}
|
||||
|
||||
.nym_status:before {
|
||||
content: " (";
|
||||
}
|
||||
|
||||
.nym_status:after {
|
||||
content: ")";
|
||||
}
|
||||
|
||||
.nym_status {
|
||||
font-size: smaller;
|
||||
}
|
||||
|
||||
#route.invalid {
|
||||
background: red;
|
||||
}
|
||||
|
||||
#route {
|
||||
min-width: 30em;
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"target": "ES2017",
|
||||
"lib": ["ES2017", "DOM"],
|
||||
"declaration": true,
|
||||
"baseUrl": "./src",
|
||||
"rootDir": "./src",
|
||||
"outDir": "./lib",
|
||||
"declarationDir": "./lib",
|
||||
"esModuleInterop": true,
|
||||
"moduleResolution": "node",
|
||||
"module": "es6",
|
||||
"sourceMap": true,
|
||||
"strict": true,
|
||||
"plugins": [
|
||||
{ "name": "@syndicate-lang/ts-plugin" }
|
||||
]
|
||||
},
|
||||
"include": ["src/**/*"]
|
||||
}
|
|
@ -0,0 +1,439 @@
|
|||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
||||
# yarn lockfile v1
|
||||
|
||||
|
||||
"@preserves/core@^0.995.200", "@preserves/core@^0.995.206":
|
||||
version "0.995.206"
|
||||
resolved "https://registry.yarnpkg.com/@preserves/core/-/core-0.995.206.tgz#f13507aa39dbc8cbd5d10ac18d107c06e92bf519"
|
||||
integrity sha512-Uc4SSSXHQG6xYER9cCc0bkbLYM8fGVbO4kXw3DI8BaQjeUFPOX3yYNYPAvRNzmaF4MuMOZY+jSJpjJ9o5g6A0w==
|
||||
|
||||
"@preserves/schema-cli@>=0.995.201":
|
||||
version "0.995.206"
|
||||
resolved "https://registry.yarnpkg.com/@preserves/schema-cli/-/schema-cli-0.995.206.tgz#709c96d938dce3bf5b132a3da1304ca3c84bbe2e"
|
||||
integrity sha512-870rwjKtQHA8huwt8MpMImnKC2cBHKYzcJi4811k5RuYs/HdbT9B81NMSiSn+Hq19/v9fEBicwwEmao3oM7hJw==
|
||||
dependencies:
|
||||
"@preserves/core" "^0.995.206"
|
||||
"@preserves/schema" "^0.995.206"
|
||||
chalk "^4.1"
|
||||
chokidar "^3.5"
|
||||
commander "^7.2"
|
||||
glob "^7.1"
|
||||
minimatch "^3.0"
|
||||
|
||||
"@preserves/schema@^0.995.206":
|
||||
version "0.995.206"
|
||||
resolved "https://registry.yarnpkg.com/@preserves/schema/-/schema-0.995.206.tgz#8e35a7db5363374f6794009d394510871f86746e"
|
||||
integrity sha512-JmXGxSqsNSEzZNpvOYPupSZhffvMIvgnUmKE+Yt5oiPiD/8H52EbKRrqBUQuVpvI4hvwgThWAtNIg3+q42vI2w==
|
||||
dependencies:
|
||||
"@preserves/core" "^0.995.206"
|
||||
|
||||
"@rollup/pluginutils@^3.0.9":
|
||||
version "3.1.0"
|
||||
resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-3.1.0.tgz#706b4524ee6dc8b103b3c995533e5ad680c02b9b"
|
||||
integrity sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==
|
||||
dependencies:
|
||||
"@types/estree" "0.0.39"
|
||||
estree-walker "^1.0.1"
|
||||
picomatch "^2.2.2"
|
||||
|
||||
"@syndicate-lang/compiler@^0.22.3":
|
||||
version "0.22.3"
|
||||
resolved "https://registry.yarnpkg.com/@syndicate-lang/compiler/-/compiler-0.22.3.tgz#05430d2e807aec547d910211ae8580e7d7f32401"
|
||||
integrity sha512-x8zys6Y5NGto72muWVQakE+sPVcweaFLARNg4MWvQj3ZmBv49osvEHxvsyr1fIW610HLbi33zInUGF7KDH8dUQ==
|
||||
|
||||
"@syndicate-lang/core@*", "@syndicate-lang/core@^0.35.0":
|
||||
version "0.35.0"
|
||||
resolved "https://registry.yarnpkg.com/@syndicate-lang/core/-/core-0.35.0.tgz#6eadbea6acfc412092c8bb833a23a42de6adb73e"
|
||||
integrity sha512-Wz//RcbxdaQBGI2BYq2DaY35m8R9FM+Ae7eyFXRRANtO6ifSh6iLSz/XtE4ziyqaerO3rrG8+/7xId3/MviZzw==
|
||||
dependencies:
|
||||
salty-crypto "^0.3.1"
|
||||
|
||||
"@syndicate-lang/html@*":
|
||||
version "0.36.0"
|
||||
resolved "https://registry.yarnpkg.com/@syndicate-lang/html/-/html-0.36.0.tgz#e2c59eda24c8678cf05b9f11192a78b050ccbd7d"
|
||||
integrity sha512-DYxkJSomAmD4tt8RPv4hI9k/IBFrGzEjSJP0LtT/259Jo9KAphEN/T+K+0v4Bxhqk6Mho86q+2M04MFG64uWnA==
|
||||
dependencies:
|
||||
"@syndicate-lang/core" "^0.35.0"
|
||||
|
||||
"@syndicate-lang/ts-plugin@*":
|
||||
version "0.37.0"
|
||||
resolved "https://registry.yarnpkg.com/@syndicate-lang/ts-plugin/-/ts-plugin-0.37.0.tgz#7764a9f94e8cf54d3d3c43e49b0928f851b2f6b3"
|
||||
integrity sha512-rp9QmBrGbs6ABPAmgZkmWumkk5URVHF8Q62/va9lm457QPWce3JoYoDi2/qSzcMdYUM/JjBxK0vhYsdw3GemkA==
|
||||
dependencies:
|
||||
"@syndicate-lang/compiler" "^0.22.3"
|
||||
"@syndicate-lang/core" "^0.35.0"
|
||||
|
||||
"@syndicate-lang/tsc@*":
|
||||
version "0.37.0"
|
||||
resolved "https://registry.yarnpkg.com/@syndicate-lang/tsc/-/tsc-0.37.0.tgz#30ef6704c37ceb10d23cc688fbd2a2436a593cd4"
|
||||
integrity sha512-54wUyu392eIa9n4K8CV6qxz+GcRUmrmBZW+hU+pMcApKkIYyiXmg09MrOXrLYcVtHowYVWRXb7d8Cpui3vaGCQ==
|
||||
dependencies:
|
||||
"@syndicate-lang/compiler" "^0.22.3"
|
||||
"@syndicate-lang/core" "^0.35.0"
|
||||
glob "^7.1.6"
|
||||
yargs "^16.2.0"
|
||||
|
||||
"@syndicate-lang/ws-relay@*":
|
||||
version "0.37.1"
|
||||
resolved "https://registry.yarnpkg.com/@syndicate-lang/ws-relay/-/ws-relay-0.37.1.tgz#196982bd91c7ebe1e5bdb049d23a04d92475f668"
|
||||
integrity sha512-DZLFYSeAzxuBtcA9ER2+o78KGKiHr7/ofP/YTtlNfwTGdIJ0xbxAsXVSzYwSvtlHNk1ZcriZOOHFf1ZWpnjMiA==
|
||||
dependencies:
|
||||
"@syndicate-lang/core" "^0.35.0"
|
||||
|
||||
"@types/estree@0.0.39":
|
||||
version "0.0.39"
|
||||
resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.39.tgz#e177e699ee1b8c22d23174caaa7422644389509f"
|
||||
integrity sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==
|
||||
|
||||
ansi-regex@^5.0.1:
|
||||
version "5.0.1"
|
||||
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304"
|
||||
integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==
|
||||
|
||||
ansi-styles@^4.0.0, ansi-styles@^4.1.0:
|
||||
version "4.3.0"
|
||||
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937"
|
||||
integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==
|
||||
dependencies:
|
||||
color-convert "^2.0.1"
|
||||
|
||||
anymatch@~3.1.2:
|
||||
version "3.1.3"
|
||||
resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e"
|
||||
integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==
|
||||
dependencies:
|
||||
normalize-path "^3.0.0"
|
||||
picomatch "^2.0.4"
|
||||
|
||||
atob@^2.1.2:
|
||||
version "2.1.2"
|
||||
resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9"
|
||||
integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==
|
||||
|
||||
balanced-match@^1.0.0:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee"
|
||||
integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==
|
||||
|
||||
binary-extensions@^2.0.0:
|
||||
version "2.3.0"
|
||||
resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.3.0.tgz#f6e14a97858d327252200242d4ccfe522c445522"
|
||||
integrity sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==
|
||||
|
||||
brace-expansion@^1.1.7:
|
||||
version "1.1.11"
|
||||
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd"
|
||||
integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==
|
||||
dependencies:
|
||||
balanced-match "^1.0.0"
|
||||
concat-map "0.0.1"
|
||||
|
||||
braces@~3.0.2:
|
||||
version "3.0.3"
|
||||
resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.3.tgz#490332f40919452272d55a8480adc0c441358789"
|
||||
integrity sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==
|
||||
dependencies:
|
||||
fill-range "^7.1.1"
|
||||
|
||||
chalk@^4.1:
|
||||
version "4.1.2"
|
||||
resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01"
|
||||
integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==
|
||||
dependencies:
|
||||
ansi-styles "^4.1.0"
|
||||
supports-color "^7.1.0"
|
||||
|
||||
chokidar@^3.5:
|
||||
version "3.6.0"
|
||||
resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.6.0.tgz#197c6cc669ef2a8dc5e7b4d97ee4e092c3eb0d5b"
|
||||
integrity sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==
|
||||
dependencies:
|
||||
anymatch "~3.1.2"
|
||||
braces "~3.0.2"
|
||||
glob-parent "~5.1.2"
|
||||
is-binary-path "~2.1.0"
|
||||
is-glob "~4.0.1"
|
||||
normalize-path "~3.0.0"
|
||||
readdirp "~3.6.0"
|
||||
optionalDependencies:
|
||||
fsevents "~2.3.2"
|
||||
|
||||
cliui@^7.0.2:
|
||||
version "7.0.4"
|
||||
resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f"
|
||||
integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==
|
||||
dependencies:
|
||||
string-width "^4.2.0"
|
||||
strip-ansi "^6.0.0"
|
||||
wrap-ansi "^7.0.0"
|
||||
|
||||
color-convert@^2.0.1:
|
||||
version "2.0.1"
|
||||
resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3"
|
||||
integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==
|
||||
dependencies:
|
||||
color-name "~1.1.4"
|
||||
|
||||
color-name@~1.1.4:
|
||||
version "1.1.4"
|
||||
resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2"
|
||||
integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==
|
||||
|
||||
commander@^7.2:
|
||||
version "7.2.0"
|
||||
resolved "https://registry.yarnpkg.com/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7"
|
||||
integrity sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==
|
||||
|
||||
concat-map@0.0.1:
|
||||
version "0.0.1"
|
||||
resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
|
||||
integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==
|
||||
|
||||
decode-uri-component@^0.2.0:
|
||||
version "0.2.2"
|
||||
resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.2.tgz#e69dbe25d37941171dd540e024c444cd5188e1e9"
|
||||
integrity sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==
|
||||
|
||||
emoji-regex@^8.0.0:
|
||||
version "8.0.0"
|
||||
resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37"
|
||||
integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==
|
||||
|
||||
escalade@^3.1.1:
|
||||
version "3.1.2"
|
||||
resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.2.tgz#54076e9ab29ea5bf3d8f1ed62acffbb88272df27"
|
||||
integrity sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==
|
||||
|
||||
estree-walker@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-1.0.1.tgz#31bc5d612c96b704106b477e6dd5d8aa138cb700"
|
||||
integrity sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==
|
||||
|
||||
fill-range@^7.1.1:
|
||||
version "7.1.1"
|
||||
resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.1.1.tgz#44265d3cac07e3ea7dc247516380643754a05292"
|
||||
integrity sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==
|
||||
dependencies:
|
||||
to-regex-range "^5.0.1"
|
||||
|
||||
fs.realpath@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
|
||||
integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==
|
||||
|
||||
fsevents@~2.3.2:
|
||||
version "2.3.3"
|
||||
resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6"
|
||||
integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==
|
||||
|
||||
get-caller-file@^2.0.5:
|
||||
version "2.0.5"
|
||||
resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e"
|
||||
integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==
|
||||
|
||||
glob-parent@~5.1.2:
|
||||
version "5.1.2"
|
||||
resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4"
|
||||
integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==
|
||||
dependencies:
|
||||
is-glob "^4.0.1"
|
||||
|
||||
glob@^7.1, glob@^7.1.6:
|
||||
version "7.2.3"
|
||||
resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b"
|
||||
integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==
|
||||
dependencies:
|
||||
fs.realpath "^1.0.0"
|
||||
inflight "^1.0.4"
|
||||
inherits "2"
|
||||
minimatch "^3.1.1"
|
||||
once "^1.3.0"
|
||||
path-is-absolute "^1.0.0"
|
||||
|
||||
has-flag@^4.0.0:
|
||||
version "4.0.0"
|
||||
resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b"
|
||||
integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==
|
||||
|
||||
inflight@^1.0.4:
|
||||
version "1.0.6"
|
||||
resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
|
||||
integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==
|
||||
dependencies:
|
||||
once "^1.3.0"
|
||||
wrappy "1"
|
||||
|
||||
inherits@2:
|
||||
version "2.0.4"
|
||||
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c"
|
||||
integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==
|
||||
|
||||
is-binary-path@~2.1.0:
|
||||
version "2.1.0"
|
||||
resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09"
|
||||
integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==
|
||||
dependencies:
|
||||
binary-extensions "^2.0.0"
|
||||
|
||||
is-extglob@^2.1.1:
|
||||
version "2.1.1"
|
||||
resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2"
|
||||
integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==
|
||||
|
||||
is-fullwidth-code-point@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d"
|
||||
integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==
|
||||
|
||||
is-glob@^4.0.1, is-glob@~4.0.1:
|
||||
version "4.0.3"
|
||||
resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084"
|
||||
integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==
|
||||
dependencies:
|
||||
is-extglob "^2.1.1"
|
||||
|
||||
is-number@^7.0.0:
|
||||
version "7.0.0"
|
||||
resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b"
|
||||
integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==
|
||||
|
||||
minimatch@^3.0, minimatch@^3.1.1:
|
||||
version "3.1.2"
|
||||
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b"
|
||||
integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==
|
||||
dependencies:
|
||||
brace-expansion "^1.1.7"
|
||||
|
||||
normalize-path@^3.0.0, normalize-path@~3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65"
|
||||
integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==
|
||||
|
||||
once@^1.3.0:
|
||||
version "1.4.0"
|
||||
resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
|
||||
integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==
|
||||
dependencies:
|
||||
wrappy "1"
|
||||
|
||||
path-is-absolute@^1.0.0:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
|
||||
integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==
|
||||
|
||||
picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.2:
|
||||
version "2.3.1"
|
||||
resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42"
|
||||
integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==
|
||||
|
||||
readdirp@~3.6.0:
|
||||
version "3.6.0"
|
||||
resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7"
|
||||
integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==
|
||||
dependencies:
|
||||
picomatch "^2.2.1"
|
||||
|
||||
require-directory@^2.1.1:
|
||||
version "2.1.1"
|
||||
resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42"
|
||||
integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==
|
||||
|
||||
rollup-plugin-sourcemaps@^0.6:
|
||||
version "0.6.3"
|
||||
resolved "https://registry.yarnpkg.com/rollup-plugin-sourcemaps/-/rollup-plugin-sourcemaps-0.6.3.tgz#bf93913ffe056e414419607f1d02780d7ece84ed"
|
||||
integrity sha512-paFu+nT1xvuO1tPFYXGe+XnQvg4Hjqv/eIhG8i5EspfYYPBKL57X7iVbfv55aNVASg3dzWvES9dmWsL2KhfByw==
|
||||
dependencies:
|
||||
"@rollup/pluginutils" "^3.0.9"
|
||||
source-map-resolve "^0.6.0"
|
||||
|
||||
rollup@^2.60:
|
||||
version "2.79.1"
|
||||
resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.79.1.tgz#bedee8faef7c9f93a2647ac0108748f497f081c7"
|
||||
integrity sha512-uKxbd0IhMZOhjAiD5oAFp7BqvkA4Dv47qpOCtaNvng4HBwdbWtdOh8f5nZNuk2rp51PMGk3bzfWu5oayNEuYnw==
|
||||
optionalDependencies:
|
||||
fsevents "~2.3.2"
|
||||
|
||||
salty-crypto@^0.3.1:
|
||||
version "0.3.1"
|
||||
resolved "https://registry.yarnpkg.com/salty-crypto/-/salty-crypto-0.3.1.tgz#1242cd948d8152aff104d0945980996b1602ba0e"
|
||||
integrity sha512-dCbF8/UzMV8oXPmMCHWzSp7u8G6NA+pHbaFBVqVgLVBiyxuwVn9iPbyt9WXT0EoXfL9sKt7U1mV+bgsGw5cV7A==
|
||||
|
||||
source-map-resolve@^0.6.0:
|
||||
version "0.6.0"
|
||||
resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.6.0.tgz#3d9df87e236b53f16d01e58150fc7711138e5ed2"
|
||||
integrity sha512-KXBr9d/fO/bWo97NXsPIAW1bFSBOuCnjbNTBMO7N59hsv5i9yzRDfcYwwt0l04+VqnKC+EwzvJZIP/qkuMgR/w==
|
||||
dependencies:
|
||||
atob "^2.1.2"
|
||||
decode-uri-component "^0.2.0"
|
||||
|
||||
string-width@^4.1.0, string-width@^4.2.0:
|
||||
version "4.2.3"
|
||||
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
|
||||
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
|
||||
dependencies:
|
||||
emoji-regex "^8.0.0"
|
||||
is-fullwidth-code-point "^3.0.0"
|
||||
strip-ansi "^6.0.1"
|
||||
|
||||
strip-ansi@^6.0.0, strip-ansi@^6.0.1:
|
||||
version "6.0.1"
|
||||
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
|
||||
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
|
||||
dependencies:
|
||||
ansi-regex "^5.0.1"
|
||||
|
||||
supports-color@^7.1.0:
|
||||
version "7.2.0"
|
||||
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da"
|
||||
integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==
|
||||
dependencies:
|
||||
has-flag "^4.0.0"
|
||||
|
||||
to-regex-range@^5.0.1:
|
||||
version "5.0.1"
|
||||
resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4"
|
||||
integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==
|
||||
dependencies:
|
||||
is-number "^7.0.0"
|
||||
|
||||
typescript@^4.9:
|
||||
version "4.9.5"
|
||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a"
|
||||
integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==
|
||||
|
||||
wrap-ansi@^7.0.0:
|
||||
version "7.0.0"
|
||||
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
|
||||
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
|
||||
dependencies:
|
||||
ansi-styles "^4.0.0"
|
||||
string-width "^4.1.0"
|
||||
strip-ansi "^6.0.0"
|
||||
|
||||
wrappy@1:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
|
||||
integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==
|
||||
|
||||
y18n@^5.0.5:
|
||||
version "5.0.8"
|
||||
resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55"
|
||||
integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==
|
||||
|
||||
yargs-parser@^20.2.2:
|
||||
version "20.2.9"
|
||||
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee"
|
||||
integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==
|
||||
|
||||
yargs@^16.2.0:
|
||||
version "16.2.0"
|
||||
resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66"
|
||||
integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==
|
||||
dependencies:
|
||||
cliui "^7.0.2"
|
||||
escalade "^3.1.1"
|
||||
get-caller-file "^2.0.5"
|
||||
require-directory "^2.1.1"
|
||||
string-width "^4.2.0"
|
||||
y18n "^5.0.5"
|
||||
yargs-parser "^20.2.2"
|
|
@ -0,0 +1,13 @@
|
|||
# How to use @syndicate-lang/loader
|
||||
|
||||
Running a module:
|
||||
|
||||
```shell
|
||||
node -r @syndicate-lang/loader index.js
|
||||
```
|
||||
|
||||
Running a standalone script:
|
||||
|
||||
```shell
|
||||
./standalone.js
|
||||
```
|
|
@ -0,0 +1,19 @@
|
|||
/// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
/// SPDX-FileCopyrightText: Copyright © 2016-2023 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
||||
|
||||
const { BoxState, SetBox, N } = require('./protocol.js');
|
||||
|
||||
function boot() {
|
||||
spawn named 'box' {
|
||||
field boxValue = 0;
|
||||
|
||||
assert BoxState(boxValue.value);
|
||||
on message SetBox($v) => boxValue.value = v;
|
||||
|
||||
stop on (boxValue.value === N) {
|
||||
console.log('terminated box root facet');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
exports.boot = boot;
|
|
@ -0,0 +1,16 @@
|
|||
/// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
/// SPDX-FileCopyrightText: Copyright © 2016-2023 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
||||
|
||||
const { BoxState, SetBox } = require('./protocol.js');
|
||||
|
||||
function boot(doneCallback) {
|
||||
spawn named 'client' {
|
||||
on asserted BoxState($v) => send message SetBox(v + 1);
|
||||
on retracted BoxState(_) => {
|
||||
console.log('box gone');
|
||||
doneCallback();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
exports.boot = boot;
|
|
@ -0,0 +1,10 @@
|
|||
/// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
/// SPDX-FileCopyrightText: Copyright © 2016-2023 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
||||
|
||||
const { N } = require('./protocol.js');
|
||||
const Box = require('./box.js');
|
||||
const Client = require('./client.js');
|
||||
|
||||
console.time('box-and-client-' + N.toString());
|
||||
Box.boot();
|
||||
Client.boot(() => console.timeEnd('box-and-client-' + N.toString()));
|
|
@ -0,0 +1,11 @@
|
|||
/// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
/// SPDX-FileCopyrightText: Copyright © 2016-2023 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
||||
|
||||
assertion type BoxState(value);
|
||||
message type SetBox(newValue);
|
||||
|
||||
const N = 100000;
|
||||
|
||||
exports.BoxState = BoxState;
|
||||
exports.SetBox = SetBox;
|
||||
exports.N = N;
|
|
@ -0,0 +1,2 @@
|
|||
#!/bin/sh
|
||||
exec node -r @syndicate-lang/loader index.js
|
|
@ -0,0 +1,28 @@
|
|||
#!/usr/bin/env -S node -r @syndicate-lang/loader
|
||||
/// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
/// SPDX-FileCopyrightText: Copyright © 2016-2023 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
||||
|
||||
assertion type BoxState(value);
|
||||
message type SetBox(newValue);
|
||||
|
||||
const N = 100000;
|
||||
|
||||
spawn named 'box' {
|
||||
field boxValue = 0;
|
||||
|
||||
assert BoxState(boxValue.value);
|
||||
on message SetBox($v) => boxValue.value = v;
|
||||
|
||||
stop on (boxValue.value === N) {
|
||||
console.log('terminated box root facet');
|
||||
}
|
||||
}
|
||||
|
||||
console.time('box-and-client-' + N.toString());
|
||||
spawn named 'client' {
|
||||
on asserted BoxState($v) => send message SetBox(v + 1);
|
||||
on retracted BoxState(_) => {
|
||||
console.log('box gone');
|
||||
console.timeEnd('box-and-client-' + N.toString())
|
||||
}
|
||||
}
|
|
@ -0,0 +1,2 @@
|
|||
index.js
|
||||
index.js.map
|
|
@ -0,0 +1,10 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<meta charset=utf-8>
|
||||
<title>Demo</title>
|
||||
<script src="node_modules/@syndicate-lang/core/dist/syndicate.js"></script>
|
||||
<script src="index.js"></script>
|
||||
<h1>Look in the JavaScript console for output.</h1>
|
||||
<main id="main">
|
||||
</main>
|
||||
</html>
|
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
"name": "@syndicate-lang/how-to-use-syndicate-ts-plugin",
|
||||
"private": true,
|
||||
"description": "Simple syndicatec example in TypeScript",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"prepare": "yarn compile && yarn rollup",
|
||||
"compile": "syndicate-tsc",
|
||||
"rollup": "rollup -c",
|
||||
"clean": "rm -rf lib/ index.js index.js.map"
|
||||
},
|
||||
"author": "Tony Garnock-Jones <tonyg@leastfixedpoint.com>",
|
||||
"license": "GPL-3.0+",
|
||||
"dependencies": {
|
||||
"@preserves/core": "^0.995.200",
|
||||
"@preserves/schema": "^0.995.201",
|
||||
"@syndicate-lang/core": "*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@syndicate-lang/syndicatec": "*",
|
||||
"@syndicate-lang/ts-plugin": "*",
|
||||
"@syndicate-lang/tsc": "*",
|
||||
"rollup": "^2.60",
|
||||
"rollup-plugin-sourcemaps": "^0.6",
|
||||
"typescript": "^4.9"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
/// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
||||
|
||||
import sourcemaps from 'rollup-plugin-sourcemaps';
|
||||
|
||||
export default {
|
||||
input: 'lib/index.js',
|
||||
plugins: [sourcemaps()],
|
||||
external: ['@syndicate-lang/core'],
|
||||
output: {
|
||||
file: 'index.js',
|
||||
format: 'umd',
|
||||
name: 'Main',
|
||||
sourcemap: true,
|
||||
globals: {
|
||||
'@syndicate-lang/core': 'Syndicate',
|
||||
},
|
||||
},
|
||||
};
|
|
@ -0,0 +1,18 @@
|
|||
/// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
||||
|
||||
import { BoxState, SetBox, N } from './protocol.js';
|
||||
import { Ref } from '@syndicate-lang/core';
|
||||
|
||||
export function boot(ds: Ref) {
|
||||
spawn named 'box' {
|
||||
field boxValue: number = 0;
|
||||
at ds {
|
||||
assert BoxState(boxValue.value);
|
||||
on message SetBox($v: number) => boxValue.value = v;
|
||||
}
|
||||
stop on (boxValue.value === N) {
|
||||
console.log('terminated box root facet');
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
/// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
||||
|
||||
import { BoxState, SetBox } from './protocol.js';
|
||||
import { Ref } from '@syndicate-lang/core';
|
||||
|
||||
export function boot(ds: Ref, doneCallback: () => void) {
|
||||
spawn named 'client' {
|
||||
at ds {
|
||||
on asserted BoxState($v: number) => send message SetBox(v + 1);
|
||||
on retracted BoxState(_) => {
|
||||
console.log('box gone');
|
||||
doneCallback();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
/// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
||||
|
||||
import { N } from './protocol.js';
|
||||
import * as Box from './box.js';
|
||||
import * as Client from './client.js';
|
||||
import { Dataspace } from '@syndicate-lang/core';
|
||||
|
||||
console.time('box-and-client-' + N.toString());
|
||||
Dataspace.boot(ds => {
|
||||
Box.boot(ds);
|
||||
Client.boot(ds, () => console.timeEnd('box-and-client-' + N.toString()));
|
||||
});
|
|
@ -0,0 +1,7 @@
|
|||
/// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
||||
|
||||
export assertion type BoxState(value: number);
|
||||
export message type SetBox(newValue: number);
|
||||
|
||||
export const N = 100000;
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"target": "ES2017",
|
||||
"lib": ["ES2017", "DOM"],
|
||||
"declaration": true,
|
||||
"baseUrl": "./src",
|
||||
"rootDir": "./src",
|
||||
"outDir": "./lib",
|
||||
"declarationDir": "./lib",
|
||||
"esModuleInterop": true,
|
||||
"moduleResolution": "node",
|
||||
"module": "es6",
|
||||
"sourceMap": true,
|
||||
"strict": true,
|
||||
"plugins": [
|
||||
{ "name": "@syndicate-lang/ts-plugin" }
|
||||
]
|
||||
},
|
||||
"include": ["src/**/*"]
|
||||
}
|
|
@ -0,0 +1,305 @@
|
|||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
||||
# yarn lockfile v1
|
||||
|
||||
|
||||
"@preserves/core@0.995.200", "@preserves/core@^0.995.200":
|
||||
version "0.995.200"
|
||||
resolved "https://registry.yarnpkg.com/@preserves/core/-/core-0.995.200.tgz#65575cf8f9320e73b5d37fa9ac9d6881a33fd3a6"
|
||||
integrity sha512-htZ2x+hltUpKoPsviWSuelzZW96po9zVSsN0RZEih60FahNX0R2LCqFJ6v5lyATuQ9oHALVi0w8w4rtf8oiAJw==
|
||||
|
||||
"@preserves/schema@0.995.201":
|
||||
version "0.995.201"
|
||||
resolved "https://registry.yarnpkg.com/@preserves/schema/-/schema-0.995.201.tgz#827ad539afb0fdf68ba885ee3ff43db0fd473aa5"
|
||||
integrity sha512-0SuhwOEAfxtrAeOTZ8V1yNEcHHHEbfUmoFawrF+vzTQFNZRz/X3LF1FM6wOiJlHtb7tBr4B+rHXX8jfNrqrdkA==
|
||||
dependencies:
|
||||
"@preserves/core" "^0.995.200"
|
||||
|
||||
"@rollup/pluginutils@^3.0.9":
|
||||
version "3.1.0"
|
||||
resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-3.1.0.tgz#706b4524ee6dc8b103b3c995533e5ad680c02b9b"
|
||||
integrity sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==
|
||||
dependencies:
|
||||
"@types/estree" "0.0.39"
|
||||
estree-walker "^1.0.1"
|
||||
picomatch "^2.2.2"
|
||||
|
||||
"@syndicate-lang/compiler@^0.21.1":
|
||||
version "0.21.1"
|
||||
resolved "https://registry.yarnpkg.com/@syndicate-lang/compiler/-/compiler-0.21.1.tgz#b6316bac14d053c313b3442be68f532a60c47cb3"
|
||||
integrity sha512-daaYh1i0XmoHt6eTtO4gWblfVKMjp9trwxqR62wUSONY3gtJ5Bn4hG3dMgfoMz2NvOWbJHaGz/95J0jRubITxA==
|
||||
|
||||
"@syndicate-lang/core@*", "@syndicate-lang/core@^0.32.0":
|
||||
version "0.32.0"
|
||||
resolved "https://registry.yarnpkg.com/@syndicate-lang/core/-/core-0.32.0.tgz#0efbbff176cac2969c2b6ba70a19965add3a2c61"
|
||||
integrity sha512-ERVXk0W1xLaKvUa79Ek74YvqfBU543cUTb2GJvp76TP5k1jA97q9GzhddicS/s8lqu8SUC1+IXmKiJk0NX2TWQ==
|
||||
dependencies:
|
||||
salty-crypto "0.3.1"
|
||||
|
||||
"@syndicate-lang/syndicatec@*":
|
||||
version "0.34.0"
|
||||
resolved "https://registry.yarnpkg.com/@syndicate-lang/syndicatec/-/syndicatec-0.34.0.tgz#f3b88507b633552fe1f41f24def5121c0cafeaeb"
|
||||
integrity sha512-h3MPifJdXZTS3JVcvRG8GXMJMPBH4RYmJ3B7c2sjM826Pf6O8zT47Vuv1y2WyD9PS8BiSCI01uOR0W5AVJJT5w==
|
||||
dependencies:
|
||||
"@syndicate-lang/compiler" "^0.21.1"
|
||||
"@syndicate-lang/core" "^0.32.0"
|
||||
glob "^7.1.6"
|
||||
yargs "^16.2.0"
|
||||
|
||||
"@syndicate-lang/ts-plugin@*":
|
||||
version "0.34.0"
|
||||
resolved "https://registry.yarnpkg.com/@syndicate-lang/ts-plugin/-/ts-plugin-0.34.0.tgz#df92f9044eeba528c80c41c5c9df49ee28902411"
|
||||
integrity sha512-OCO6Hm0euz2hZk6tYTrJQNEM8iDBeQ/dgpW2a/UP52XSP6fYj0OvUVfn+35ZkIL64S+zDsJjL/6XFN05UZyRGA==
|
||||
dependencies:
|
||||
"@syndicate-lang/compiler" "^0.21.1"
|
||||
"@syndicate-lang/core" "^0.32.0"
|
||||
|
||||
"@syndicate-lang/tsc@*":
|
||||
version "0.34.0"
|
||||
resolved "https://registry.yarnpkg.com/@syndicate-lang/tsc/-/tsc-0.34.0.tgz#1056fba7f639bbf436d0c2ecd2717edc4c1e612a"
|
||||
integrity sha512-Ufj3xsdXMbMCavWsEkX/pFyXRpNIWRW+LFew1icD14DoSLqyBcoUEvskolOSgkSzC53tDjbd4/LXDVofIjIyUA==
|
||||
dependencies:
|
||||
"@syndicate-lang/compiler" "^0.21.1"
|
||||
"@syndicate-lang/core" "^0.32.0"
|
||||
glob "^7.1.6"
|
||||
yargs "^16.2.0"
|
||||
|
||||
"@types/estree@0.0.39":
|
||||
version "0.0.39"
|
||||
resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.39.tgz#e177e699ee1b8c22d23174caaa7422644389509f"
|
||||
integrity sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==
|
||||
|
||||
ansi-regex@^5.0.1:
|
||||
version "5.0.1"
|
||||
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304"
|
||||
integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==
|
||||
|
||||
ansi-styles@^4.0.0:
|
||||
version "4.3.0"
|
||||
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937"
|
||||
integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==
|
||||
dependencies:
|
||||
color-convert "^2.0.1"
|
||||
|
||||
atob@^2.1.2:
|
||||
version "2.1.2"
|
||||
resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9"
|
||||
integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==
|
||||
|
||||
balanced-match@^1.0.0:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee"
|
||||
integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==
|
||||
|
||||
brace-expansion@^1.1.7:
|
||||
version "1.1.11"
|
||||
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd"
|
||||
integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==
|
||||
dependencies:
|
||||
balanced-match "^1.0.0"
|
||||
concat-map "0.0.1"
|
||||
|
||||
cliui@^7.0.2:
|
||||
version "7.0.4"
|
||||
resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f"
|
||||
integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==
|
||||
dependencies:
|
||||
string-width "^4.2.0"
|
||||
strip-ansi "^6.0.0"
|
||||
wrap-ansi "^7.0.0"
|
||||
|
||||
color-convert@^2.0.1:
|
||||
version "2.0.1"
|
||||
resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3"
|
||||
integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==
|
||||
dependencies:
|
||||
color-name "~1.1.4"
|
||||
|
||||
color-name@~1.1.4:
|
||||
version "1.1.4"
|
||||
resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2"
|
||||
integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==
|
||||
|
||||
concat-map@0.0.1:
|
||||
version "0.0.1"
|
||||
resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
|
||||
integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==
|
||||
|
||||
decode-uri-component@^0.2.0:
|
||||
version "0.2.2"
|
||||
resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.2.tgz#e69dbe25d37941171dd540e024c444cd5188e1e9"
|
||||
integrity sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==
|
||||
|
||||
emoji-regex@^8.0.0:
|
||||
version "8.0.0"
|
||||
resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37"
|
||||
integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==
|
||||
|
||||
escalade@^3.1.1:
|
||||
version "3.1.2"
|
||||
resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.2.tgz#54076e9ab29ea5bf3d8f1ed62acffbb88272df27"
|
||||
integrity sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==
|
||||
|
||||
estree-walker@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-1.0.1.tgz#31bc5d612c96b704106b477e6dd5d8aa138cb700"
|
||||
integrity sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==
|
||||
|
||||
fs.realpath@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
|
||||
integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==
|
||||
|
||||
fsevents@~2.3.2:
|
||||
version "2.3.3"
|
||||
resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6"
|
||||
integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==
|
||||
|
||||
get-caller-file@^2.0.5:
|
||||
version "2.0.5"
|
||||
resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e"
|
||||
integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==
|
||||
|
||||
glob@^7.1.6:
|
||||
version "7.2.3"
|
||||
resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b"
|
||||
integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==
|
||||
dependencies:
|
||||
fs.realpath "^1.0.0"
|
||||
inflight "^1.0.4"
|
||||
inherits "2"
|
||||
minimatch "^3.1.1"
|
||||
once "^1.3.0"
|
||||
path-is-absolute "^1.0.0"
|
||||
|
||||
inflight@^1.0.4:
|
||||
version "1.0.6"
|
||||
resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
|
||||
integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==
|
||||
dependencies:
|
||||
once "^1.3.0"
|
||||
wrappy "1"
|
||||
|
||||
inherits@2:
|
||||
version "2.0.4"
|
||||
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c"
|
||||
integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==
|
||||
|
||||
is-fullwidth-code-point@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d"
|
||||
integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==
|
||||
|
||||
minimatch@^3.1.1:
|
||||
version "3.1.2"
|
||||
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b"
|
||||
integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==
|
||||
dependencies:
|
||||
brace-expansion "^1.1.7"
|
||||
|
||||
once@^1.3.0:
|
||||
version "1.4.0"
|
||||
resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
|
||||
integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==
|
||||
dependencies:
|
||||
wrappy "1"
|
||||
|
||||
path-is-absolute@^1.0.0:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
|
||||
integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==
|
||||
|
||||
picomatch@^2.2.2:
|
||||
version "2.3.1"
|
||||
resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42"
|
||||
integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==
|
||||
|
||||
require-directory@^2.1.1:
|
||||
version "2.1.1"
|
||||
resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42"
|
||||
integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==
|
||||
|
||||
rollup-plugin-sourcemaps@^0.6:
|
||||
version "0.6.3"
|
||||
resolved "https://registry.yarnpkg.com/rollup-plugin-sourcemaps/-/rollup-plugin-sourcemaps-0.6.3.tgz#bf93913ffe056e414419607f1d02780d7ece84ed"
|
||||
integrity sha512-paFu+nT1xvuO1tPFYXGe+XnQvg4Hjqv/eIhG8i5EspfYYPBKL57X7iVbfv55aNVASg3dzWvES9dmWsL2KhfByw==
|
||||
dependencies:
|
||||
"@rollup/pluginutils" "^3.0.9"
|
||||
source-map-resolve "^0.6.0"
|
||||
|
||||
rollup@^2.60:
|
||||
version "2.79.1"
|
||||
resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.79.1.tgz#bedee8faef7c9f93a2647ac0108748f497f081c7"
|
||||
integrity sha512-uKxbd0IhMZOhjAiD5oAFp7BqvkA4Dv47qpOCtaNvng4HBwdbWtdOh8f5nZNuk2rp51PMGk3bzfWu5oayNEuYnw==
|
||||
optionalDependencies:
|
||||
fsevents "~2.3.2"
|
||||
|
||||
salty-crypto@0.3.1:
|
||||
version "0.3.1"
|
||||
resolved "https://registry.yarnpkg.com/salty-crypto/-/salty-crypto-0.3.1.tgz#1242cd948d8152aff104d0945980996b1602ba0e"
|
||||
integrity sha512-dCbF8/UzMV8oXPmMCHWzSp7u8G6NA+pHbaFBVqVgLVBiyxuwVn9iPbyt9WXT0EoXfL9sKt7U1mV+bgsGw5cV7A==
|
||||
|
||||
source-map-resolve@^0.6.0:
|
||||
version "0.6.0"
|
||||
resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.6.0.tgz#3d9df87e236b53f16d01e58150fc7711138e5ed2"
|
||||
integrity sha512-KXBr9d/fO/bWo97NXsPIAW1bFSBOuCnjbNTBMO7N59hsv5i9yzRDfcYwwt0l04+VqnKC+EwzvJZIP/qkuMgR/w==
|
||||
dependencies:
|
||||
atob "^2.1.2"
|
||||
decode-uri-component "^0.2.0"
|
||||
|
||||
string-width@^4.1.0, string-width@^4.2.0:
|
||||
version "4.2.3"
|
||||
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
|
||||
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
|
||||
dependencies:
|
||||
emoji-regex "^8.0.0"
|
||||
is-fullwidth-code-point "^3.0.0"
|
||||
strip-ansi "^6.0.1"
|
||||
|
||||
strip-ansi@^6.0.0, strip-ansi@^6.0.1:
|
||||
version "6.0.1"
|
||||
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
|
||||
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
|
||||
dependencies:
|
||||
ansi-regex "^5.0.1"
|
||||
|
||||
typescript@^4.9:
|
||||
version "4.9.5"
|
||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a"
|
||||
integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==
|
||||
|
||||
wrap-ansi@^7.0.0:
|
||||
version "7.0.0"
|
||||
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
|
||||
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
|
||||
dependencies:
|
||||
ansi-styles "^4.0.0"
|
||||
string-width "^4.1.0"
|
||||
strip-ansi "^6.0.0"
|
||||
|
||||
wrappy@1:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
|
||||
integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==
|
||||
|
||||
y18n@^5.0.5:
|
||||
version "5.0.8"
|
||||
resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55"
|
||||
integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==
|
||||
|
||||
yargs-parser@^20.2.2:
|
||||
version "20.2.9"
|
||||
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee"
|
||||
integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==
|
||||
|
||||
yargs@^16.2.0:
|
||||
version "16.2.0"
|
||||
resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66"
|
||||
integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==
|
||||
dependencies:
|
||||
cliui "^7.0.2"
|
||||
escalade "^3.1.1"
|
||||
get-caller-file "^2.0.5"
|
||||
require-directory "^2.1.1"
|
||||
string-width "^4.2.0"
|
||||
y18n "^5.0.5"
|
||||
yargs-parser "^20.2.2"
|
|
@ -0,0 +1,2 @@
|
|||
index.js
|
||||
index.js.map
|
|
@ -0,0 +1,10 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<meta charset=utf-8>
|
||||
<title>Demo</title>
|
||||
<script src="node_modules/@syndicate-lang/core/dist/syndicate.js"></script>
|
||||
<script src="index.js"></script>
|
||||
<h1>Look in the JavaScript console for output.</h1>
|
||||
<main id="main">
|
||||
</main>
|
||||
</html>
|
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
"name": "@syndicate-lang/how-to-use-syndicate-tsc",
|
||||
"private": true,
|
||||
"description": "Simple syndicate-tsc example in TypeScript",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"prepare": "yarn compile && yarn rollup",
|
||||
"compile": "syndicate-tsc",
|
||||
"rollup": "rollup -c",
|
||||
"clean": "rm -rf lib/ index.js index.js.map"
|
||||
},
|
||||
"author": "Tony Garnock-Jones <tonyg@leastfixedpoint.com>",
|
||||
"license": "GPL-3.0+",
|
||||
"dependencies": {
|
||||
"@preserves/core": "^0.995.200",
|
||||
"@preserves/schema": "^0.995.201",
|
||||
"@syndicate-lang/core": "*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@syndicate-lang/tsc": "*",
|
||||
"rollup": "^2.60",
|
||||
"rollup-plugin-sourcemaps": "^0.6",
|
||||
"typescript": "^4.9"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
/// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
||||
|
||||
import sourcemaps from 'rollup-plugin-sourcemaps';
|
||||
|
||||
export default {
|
||||
input: 'lib/index.js',
|
||||
plugins: [sourcemaps()],
|
||||
output: {
|
||||
file: 'index.js',
|
||||
format: 'umd',
|
||||
name: 'Main',
|
||||
sourcemap: true,
|
||||
globals: {
|
||||
'@syndicate-lang/core': 'Syndicate',
|
||||
},
|
||||
},
|
||||
};
|
|
@ -0,0 +1,18 @@
|
|||
/// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
||||
|
||||
import { BoxState, SetBox, N } from './protocol.js';
|
||||
import { Ref } from '@syndicate-lang/core';
|
||||
|
||||
export function boot(ds: Ref) {
|
||||
spawn named 'box' {
|
||||
field boxValue: number = 0;
|
||||
at ds {
|
||||
assert BoxState(boxValue.value);
|
||||
on message SetBox($v: number) => boxValue.value = v;
|
||||
}
|
||||
stop on (boxValue.value === N) {
|
||||
console.log('terminated box root facet');
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
/// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
||||
|
||||
import { BoxState, SetBox } from './protocol.js';
|
||||
import { Ref } from '@syndicate-lang/core';
|
||||
|
||||
export function boot(ds: Ref, doneCallback: () => void) {
|
||||
spawn named 'client' {
|
||||
at ds {
|
||||
on asserted BoxState($v: number) => send message SetBox(v + 1);
|
||||
on retracted BoxState(_) => {
|
||||
console.log('box gone');
|
||||
doneCallback();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
/// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
||||
|
||||
import { N } from './protocol.js';
|
||||
import * as Box from './box.js';
|
||||
import * as Client from './client.js';
|
||||
import { Dataspace } from '@syndicate-lang/core';
|
||||
|
||||
console.time('box-and-client-' + N.toString());
|
||||
Dataspace.boot(ds => {
|
||||
Box.boot(ds);
|
||||
Client.boot(ds, () => console.timeEnd('box-and-client-' + N.toString()));
|
||||
});
|
|
@ -0,0 +1,7 @@
|
|||
/// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
||||
|
||||
export assertion type BoxState(value: number);
|
||||
export message type SetBox(newValue: number);
|
||||
|
||||
export const N = 100000;
|
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"target": "ES2017",
|
||||
"lib": ["ES2017", "DOM"],
|
||||
"declaration": true,
|
||||
"baseUrl": "./src",
|
||||
"rootDir": "./src",
|
||||
"outDir": "./lib",
|
||||
"declarationDir": "./lib",
|
||||
"esModuleInterop": true,
|
||||
"moduleResolution": "node",
|
||||
"module": "es6",
|
||||
"sourceMap": true,
|
||||
"strict": true
|
||||
},
|
||||
"include": ["src/**/*"]
|
||||
}
|
|
@ -0,0 +1,287 @@
|
|||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
||||
# yarn lockfile v1
|
||||
|
||||
|
||||
"@preserves/core@0.995.200", "@preserves/core@^0.995.200":
|
||||
version "0.995.200"
|
||||
resolved "https://registry.yarnpkg.com/@preserves/core/-/core-0.995.200.tgz#65575cf8f9320e73b5d37fa9ac9d6881a33fd3a6"
|
||||
integrity sha512-htZ2x+hltUpKoPsviWSuelzZW96po9zVSsN0RZEih60FahNX0R2LCqFJ6v5lyATuQ9oHALVi0w8w4rtf8oiAJw==
|
||||
|
||||
"@preserves/schema@0.995.201":
|
||||
version "0.995.201"
|
||||
resolved "https://registry.yarnpkg.com/@preserves/schema/-/schema-0.995.201.tgz#827ad539afb0fdf68ba885ee3ff43db0fd473aa5"
|
||||
integrity sha512-0SuhwOEAfxtrAeOTZ8V1yNEcHHHEbfUmoFawrF+vzTQFNZRz/X3LF1FM6wOiJlHtb7tBr4B+rHXX8jfNrqrdkA==
|
||||
dependencies:
|
||||
"@preserves/core" "^0.995.200"
|
||||
|
||||
"@rollup/pluginutils@^3.0.9":
|
||||
version "3.1.0"
|
||||
resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-3.1.0.tgz#706b4524ee6dc8b103b3c995533e5ad680c02b9b"
|
||||
integrity sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==
|
||||
dependencies:
|
||||
"@types/estree" "0.0.39"
|
||||
estree-walker "^1.0.1"
|
||||
picomatch "^2.2.2"
|
||||
|
||||
"@syndicate-lang/compiler@^0.21.1":
|
||||
version "0.21.1"
|
||||
resolved "https://registry.yarnpkg.com/@syndicate-lang/compiler/-/compiler-0.21.1.tgz#b6316bac14d053c313b3442be68f532a60c47cb3"
|
||||
integrity sha512-daaYh1i0XmoHt6eTtO4gWblfVKMjp9trwxqR62wUSONY3gtJ5Bn4hG3dMgfoMz2NvOWbJHaGz/95J0jRubITxA==
|
||||
|
||||
"@syndicate-lang/core@*", "@syndicate-lang/core@^0.32.0":
|
||||
version "0.32.0"
|
||||
resolved "https://registry.yarnpkg.com/@syndicate-lang/core/-/core-0.32.0.tgz#0efbbff176cac2969c2b6ba70a19965add3a2c61"
|
||||
integrity sha512-ERVXk0W1xLaKvUa79Ek74YvqfBU543cUTb2GJvp76TP5k1jA97q9GzhddicS/s8lqu8SUC1+IXmKiJk0NX2TWQ==
|
||||
dependencies:
|
||||
salty-crypto "0.3.1"
|
||||
|
||||
"@syndicate-lang/tsc@*":
|
||||
version "0.34.0"
|
||||
resolved "https://registry.yarnpkg.com/@syndicate-lang/tsc/-/tsc-0.34.0.tgz#1056fba7f639bbf436d0c2ecd2717edc4c1e612a"
|
||||
integrity sha512-Ufj3xsdXMbMCavWsEkX/pFyXRpNIWRW+LFew1icD14DoSLqyBcoUEvskolOSgkSzC53tDjbd4/LXDVofIjIyUA==
|
||||
dependencies:
|
||||
"@syndicate-lang/compiler" "^0.21.1"
|
||||
"@syndicate-lang/core" "^0.32.0"
|
||||
glob "^7.1.6"
|
||||
yargs "^16.2.0"
|
||||
|
||||
"@types/estree@0.0.39":
|
||||
version "0.0.39"
|
||||
resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.39.tgz#e177e699ee1b8c22d23174caaa7422644389509f"
|
||||
integrity sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==
|
||||
|
||||
ansi-regex@^5.0.1:
|
||||
version "5.0.1"
|
||||
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304"
|
||||
integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==
|
||||
|
||||
ansi-styles@^4.0.0:
|
||||
version "4.3.0"
|
||||
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937"
|
||||
integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==
|
||||
dependencies:
|
||||
color-convert "^2.0.1"
|
||||
|
||||
atob@^2.1.2:
|
||||
version "2.1.2"
|
||||
resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9"
|
||||
integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==
|
||||
|
||||
balanced-match@^1.0.0:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee"
|
||||
integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==
|
||||
|
||||
brace-expansion@^1.1.7:
|
||||
version "1.1.11"
|
||||
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd"
|
||||
integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==
|
||||
dependencies:
|
||||
balanced-match "^1.0.0"
|
||||
concat-map "0.0.1"
|
||||
|
||||
cliui@^7.0.2:
|
||||
version "7.0.4"
|
||||
resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f"
|
||||
integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==
|
||||
dependencies:
|
||||
string-width "^4.2.0"
|
||||
strip-ansi "^6.0.0"
|
||||
wrap-ansi "^7.0.0"
|
||||
|
||||
color-convert@^2.0.1:
|
||||
version "2.0.1"
|
||||
resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3"
|
||||
integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==
|
||||
dependencies:
|
||||
color-name "~1.1.4"
|
||||
|
||||
color-name@~1.1.4:
|
||||
version "1.1.4"
|
||||
resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2"
|
||||
integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==
|
||||
|
||||
concat-map@0.0.1:
|
||||
version "0.0.1"
|
||||
resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
|
||||
integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==
|
||||
|
||||
decode-uri-component@^0.2.0:
|
||||
version "0.2.2"
|
||||
resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.2.tgz#e69dbe25d37941171dd540e024c444cd5188e1e9"
|
||||
integrity sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==
|
||||
|
||||
emoji-regex@^8.0.0:
|
||||
version "8.0.0"
|
||||
resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37"
|
||||
integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==
|
||||
|
||||
escalade@^3.1.1:
|
||||
version "3.1.2"
|
||||
resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.2.tgz#54076e9ab29ea5bf3d8f1ed62acffbb88272df27"
|
||||
integrity sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==
|
||||
|
||||
estree-walker@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-1.0.1.tgz#31bc5d612c96b704106b477e6dd5d8aa138cb700"
|
||||
integrity sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==
|
||||
|
||||
fs.realpath@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
|
||||
integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==
|
||||
|
||||
fsevents@~2.3.2:
|
||||
version "2.3.3"
|
||||
resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6"
|
||||
integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==
|
||||
|
||||
get-caller-file@^2.0.5:
|
||||
version "2.0.5"
|
||||
resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e"
|
||||
integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==
|
||||
|
||||
glob@^7.1.6:
|
||||
version "7.2.3"
|
||||
resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b"
|
||||
integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==
|
||||
dependencies:
|
||||
fs.realpath "^1.0.0"
|
||||
inflight "^1.0.4"
|
||||
inherits "2"
|
||||
minimatch "^3.1.1"
|
||||
once "^1.3.0"
|
||||
path-is-absolute "^1.0.0"
|
||||
|
||||
inflight@^1.0.4:
|
||||
version "1.0.6"
|
||||
resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
|
||||
integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==
|
||||
dependencies:
|
||||
once "^1.3.0"
|
||||
wrappy "1"
|
||||
|
||||
inherits@2:
|
||||
version "2.0.4"
|
||||
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c"
|
||||
integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==
|
||||
|
||||
is-fullwidth-code-point@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d"
|
||||
integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==
|
||||
|
||||
minimatch@^3.1.1:
|
||||
version "3.1.2"
|
||||
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b"
|
||||
integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==
|
||||
dependencies:
|
||||
brace-expansion "^1.1.7"
|
||||
|
||||
once@^1.3.0:
|
||||
version "1.4.0"
|
||||
resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
|
||||
integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==
|
||||
dependencies:
|
||||
wrappy "1"
|
||||
|
||||
path-is-absolute@^1.0.0:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
|
||||
integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==
|
||||
|
||||
picomatch@^2.2.2:
|
||||
version "2.3.1"
|
||||
resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42"
|
||||
integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==
|
||||
|
||||
require-directory@^2.1.1:
|
||||
version "2.1.1"
|
||||
resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42"
|
||||
integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==
|
||||
|
||||
rollup-plugin-sourcemaps@^0.6:
|
||||
version "0.6.3"
|
||||
resolved "https://registry.yarnpkg.com/rollup-plugin-sourcemaps/-/rollup-plugin-sourcemaps-0.6.3.tgz#bf93913ffe056e414419607f1d02780d7ece84ed"
|
||||
integrity sha512-paFu+nT1xvuO1tPFYXGe+XnQvg4Hjqv/eIhG8i5EspfYYPBKL57X7iVbfv55aNVASg3dzWvES9dmWsL2KhfByw==
|
||||
dependencies:
|
||||
"@rollup/pluginutils" "^3.0.9"
|
||||
source-map-resolve "^0.6.0"
|
||||
|
||||
rollup@^2.60:
|
||||
version "2.79.1"
|
||||
resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.79.1.tgz#bedee8faef7c9f93a2647ac0108748f497f081c7"
|
||||
integrity sha512-uKxbd0IhMZOhjAiD5oAFp7BqvkA4Dv47qpOCtaNvng4HBwdbWtdOh8f5nZNuk2rp51PMGk3bzfWu5oayNEuYnw==
|
||||
optionalDependencies:
|
||||
fsevents "~2.3.2"
|
||||
|
||||
salty-crypto@0.3.1:
|
||||
version "0.3.1"
|
||||
resolved "https://registry.yarnpkg.com/salty-crypto/-/salty-crypto-0.3.1.tgz#1242cd948d8152aff104d0945980996b1602ba0e"
|
||||
integrity sha512-dCbF8/UzMV8oXPmMCHWzSp7u8G6NA+pHbaFBVqVgLVBiyxuwVn9iPbyt9WXT0EoXfL9sKt7U1mV+bgsGw5cV7A==
|
||||
|
||||
source-map-resolve@^0.6.0:
|
||||
version "0.6.0"
|
||||
resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.6.0.tgz#3d9df87e236b53f16d01e58150fc7711138e5ed2"
|
||||
integrity sha512-KXBr9d/fO/bWo97NXsPIAW1bFSBOuCnjbNTBMO7N59hsv5i9yzRDfcYwwt0l04+VqnKC+EwzvJZIP/qkuMgR/w==
|
||||
dependencies:
|
||||
atob "^2.1.2"
|
||||
decode-uri-component "^0.2.0"
|
||||
|
||||
string-width@^4.1.0, string-width@^4.2.0:
|
||||
version "4.2.3"
|
||||
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
|
||||
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
|
||||
dependencies:
|
||||
emoji-regex "^8.0.0"
|
||||
is-fullwidth-code-point "^3.0.0"
|
||||
strip-ansi "^6.0.1"
|
||||
|
||||
strip-ansi@^6.0.0, strip-ansi@^6.0.1:
|
||||
version "6.0.1"
|
||||
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
|
||||
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
|
||||
dependencies:
|
||||
ansi-regex "^5.0.1"
|
||||
|
||||
typescript@^4.9:
|
||||
version "4.9.5"
|
||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a"
|
||||
integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==
|
||||
|
||||
wrap-ansi@^7.0.0:
|
||||
version "7.0.0"
|
||||
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
|
||||
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
|
||||
dependencies:
|
||||
ansi-styles "^4.0.0"
|
||||
string-width "^4.1.0"
|
||||
strip-ansi "^6.0.0"
|
||||
|
||||
wrappy@1:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
|
||||
integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==
|
||||
|
||||
y18n@^5.0.5:
|
||||
version "5.0.8"
|
||||
resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55"
|
||||
integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==
|
||||
|
||||
yargs-parser@^20.2.2:
|
||||
version "20.2.9"
|
||||
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee"
|
||||
integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==
|
||||
|
||||
yargs@^16.2.0:
|
||||
version "16.2.0"
|
||||
resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66"
|
||||
integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==
|
||||
dependencies:
|
||||
cliui "^7.0.2"
|
||||
escalade "^3.1.1"
|
||||
get-caller-file "^2.0.5"
|
||||
require-directory "^2.1.1"
|
||||
string-width "^4.2.0"
|
||||
y18n "^5.0.5"
|
||||
yargs-parser "^20.2.2"
|
|
@ -0,0 +1,2 @@
|
|||
index.js
|
||||
index.js.map
|
|
@ -0,0 +1,10 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<meta charset=utf-8>
|
||||
<title>Demo</title>
|
||||
<script src="node_modules/@syndicate-lang/core/dist/syndicate.js"></script>
|
||||
<script src="index.js"></script>
|
||||
<h1>Look in the JavaScript console for output.</h1>
|
||||
<main id="main">
|
||||
</main>
|
||||
</html>
|
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"name": "@syndicate-lang/how-to-use-syndicatec-javascript",
|
||||
"private": true,
|
||||
"description": "Simple syndicatec example in JavaScript",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"prepare": "yarn compile && yarn rollup",
|
||||
"compile": "syndicatec -d lib -b src 'src/**/*.js'",
|
||||
"rollup": "rollup -c",
|
||||
"clean": "rm -rf lib/ index.js index.js.map"
|
||||
},
|
||||
"author": "Tony Garnock-Jones <tonyg@leastfixedpoint.com>",
|
||||
"license": "GPL-3.0+",
|
||||
"dependencies": {
|
||||
"@preserves/core": "^0.995.200",
|
||||
"@syndicate-lang/core": "*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@syndicate-lang/syndicatec": "*",
|
||||
"rollup": "^2.60",
|
||||
"rollup-plugin-sourcemaps": "^0.6"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
/// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
||||
|
||||
import sourcemaps from 'rollup-plugin-sourcemaps';
|
||||
|
||||
export default {
|
||||
input: 'lib/index.js',
|
||||
plugins: [sourcemaps()],
|
||||
output: {
|
||||
file: 'index.js',
|
||||
format: 'umd',
|
||||
name: 'Main',
|
||||
sourcemap: true,
|
||||
globals: {
|
||||
'@syndicate-lang/core': 'Syndicate',
|
||||
},
|
||||
},
|
||||
};
|
|
@ -0,0 +1,17 @@
|
|||
/// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
||||
|
||||
import { BoxState, SetBox, N } from './protocol.js';
|
||||
|
||||
export function boot(ds) {
|
||||
spawn named 'box' {
|
||||
field boxValue = 0;
|
||||
at ds {
|
||||
assert BoxState(boxValue.value);
|
||||
on message SetBox($v) => boxValue.value = v;
|
||||
}
|
||||
stop on (boxValue.value === N) {
|
||||
console.log('terminated box root facet');
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
/// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
||||
|
||||
import { BoxState, SetBox } from './protocol.js';
|
||||
|
||||
export function boot(ds, doneCallback) {
|
||||
spawn named 'client' {
|
||||
at ds {
|
||||
on asserted BoxState($v) => send message SetBox(v + 1);
|
||||
on retracted BoxState(_) => {
|
||||
console.log('box gone');
|
||||
doneCallback();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
/// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
||||
|
||||
import { N } from './protocol.js';
|
||||
import * as Box from './box.js';
|
||||
import * as Client from './client.js';
|
||||
import { Dataspace } from '@syndicate-lang/core';
|
||||
|
||||
console.time('box-and-client-' + N.toString());
|
||||
Dataspace.boot(ds => {
|
||||
Box.boot(ds);
|
||||
Client.boot(ds, () => console.timeEnd('box-and-client-' + N.toString()));
|
||||
});
|
|
@ -0,0 +1,7 @@
|
|||
/// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
||||
|
||||
export assertion type BoxState(value);
|
||||
export message type SetBox(newValue);
|
||||
|
||||
export const N = 100000;
|
|
@ -0,0 +1,275 @@
|
|||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
||||
# yarn lockfile v1
|
||||
|
||||
|
||||
"@preserves/core@0.995.200":
|
||||
version "0.995.200"
|
||||
resolved "https://registry.yarnpkg.com/@preserves/core/-/core-0.995.200.tgz#65575cf8f9320e73b5d37fa9ac9d6881a33fd3a6"
|
||||
integrity sha512-htZ2x+hltUpKoPsviWSuelzZW96po9zVSsN0RZEih60FahNX0R2LCqFJ6v5lyATuQ9oHALVi0w8w4rtf8oiAJw==
|
||||
|
||||
"@rollup/pluginutils@^3.0.9":
|
||||
version "3.1.0"
|
||||
resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-3.1.0.tgz#706b4524ee6dc8b103b3c995533e5ad680c02b9b"
|
||||
integrity sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==
|
||||
dependencies:
|
||||
"@types/estree" "0.0.39"
|
||||
estree-walker "^1.0.1"
|
||||
picomatch "^2.2.2"
|
||||
|
||||
"@syndicate-lang/compiler@^0.21.1":
|
||||
version "0.21.1"
|
||||
resolved "https://registry.yarnpkg.com/@syndicate-lang/compiler/-/compiler-0.21.1.tgz#b6316bac14d053c313b3442be68f532a60c47cb3"
|
||||
integrity sha512-daaYh1i0XmoHt6eTtO4gWblfVKMjp9trwxqR62wUSONY3gtJ5Bn4hG3dMgfoMz2NvOWbJHaGz/95J0jRubITxA==
|
||||
|
||||
"@syndicate-lang/core@*", "@syndicate-lang/core@^0.32.0":
|
||||
version "0.32.0"
|
||||
resolved "https://registry.yarnpkg.com/@syndicate-lang/core/-/core-0.32.0.tgz#0efbbff176cac2969c2b6ba70a19965add3a2c61"
|
||||
integrity sha512-ERVXk0W1xLaKvUa79Ek74YvqfBU543cUTb2GJvp76TP5k1jA97q9GzhddicS/s8lqu8SUC1+IXmKiJk0NX2TWQ==
|
||||
dependencies:
|
||||
salty-crypto "0.3.1"
|
||||
|
||||
"@syndicate-lang/syndicatec@*":
|
||||
version "0.34.0"
|
||||
resolved "https://registry.yarnpkg.com/@syndicate-lang/syndicatec/-/syndicatec-0.34.0.tgz#f3b88507b633552fe1f41f24def5121c0cafeaeb"
|
||||
integrity sha512-h3MPifJdXZTS3JVcvRG8GXMJMPBH4RYmJ3B7c2sjM826Pf6O8zT47Vuv1y2WyD9PS8BiSCI01uOR0W5AVJJT5w==
|
||||
dependencies:
|
||||
"@syndicate-lang/compiler" "^0.21.1"
|
||||
"@syndicate-lang/core" "^0.32.0"
|
||||
glob "^7.1.6"
|
||||
yargs "^16.2.0"
|
||||
|
||||
"@types/estree@0.0.39":
|
||||
version "0.0.39"
|
||||
resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.39.tgz#e177e699ee1b8c22d23174caaa7422644389509f"
|
||||
integrity sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==
|
||||
|
||||
ansi-regex@^5.0.1:
|
||||
version "5.0.1"
|
||||
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304"
|
||||
integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==
|
||||
|
||||
ansi-styles@^4.0.0:
|
||||
version "4.3.0"
|
||||
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937"
|
||||
integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==
|
||||
dependencies:
|
||||
color-convert "^2.0.1"
|
||||
|
||||
atob@^2.1.2:
|
||||
version "2.1.2"
|
||||
resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9"
|
||||
integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==
|
||||
|
||||
balanced-match@^1.0.0:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee"
|
||||
integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==
|
||||
|
||||
brace-expansion@^1.1.7:
|
||||
version "1.1.11"
|
||||
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd"
|
||||
integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==
|
||||
dependencies:
|
||||
balanced-match "^1.0.0"
|
||||
concat-map "0.0.1"
|
||||
|
||||
cliui@^7.0.2:
|
||||
version "7.0.4"
|
||||
resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f"
|
||||
integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==
|
||||
dependencies:
|
||||
string-width "^4.2.0"
|
||||
strip-ansi "^6.0.0"
|
||||
wrap-ansi "^7.0.0"
|
||||
|
||||
color-convert@^2.0.1:
|
||||
version "2.0.1"
|
||||
resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3"
|
||||
integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==
|
||||
dependencies:
|
||||
color-name "~1.1.4"
|
||||
|
||||
color-name@~1.1.4:
|
||||
version "1.1.4"
|
||||
resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2"
|
||||
integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==
|
||||
|
||||
concat-map@0.0.1:
|
||||
version "0.0.1"
|
||||
resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
|
||||
integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==
|
||||
|
||||
decode-uri-component@^0.2.0:
|
||||
version "0.2.2"
|
||||
resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.2.tgz#e69dbe25d37941171dd540e024c444cd5188e1e9"
|
||||
integrity sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==
|
||||
|
||||
emoji-regex@^8.0.0:
|
||||
version "8.0.0"
|
||||
resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37"
|
||||
integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==
|
||||
|
||||
escalade@^3.1.1:
|
||||
version "3.1.2"
|
||||
resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.2.tgz#54076e9ab29ea5bf3d8f1ed62acffbb88272df27"
|
||||
integrity sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==
|
||||
|
||||
estree-walker@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-1.0.1.tgz#31bc5d612c96b704106b477e6dd5d8aa138cb700"
|
||||
integrity sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==
|
||||
|
||||
fs.realpath@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
|
||||
integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==
|
||||
|
||||
fsevents@~2.3.2:
|
||||
version "2.3.3"
|
||||
resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6"
|
||||
integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==
|
||||
|
||||
get-caller-file@^2.0.5:
|
||||
version "2.0.5"
|
||||
resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e"
|
||||
integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==
|
||||
|
||||
glob@^7.1.6:
|
||||
version "7.2.3"
|
||||
resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b"
|
||||
integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==
|
||||
dependencies:
|
||||
fs.realpath "^1.0.0"
|
||||
inflight "^1.0.4"
|
||||
inherits "2"
|
||||
minimatch "^3.1.1"
|
||||
once "^1.3.0"
|
||||
path-is-absolute "^1.0.0"
|
||||
|
||||
inflight@^1.0.4:
|
||||
version "1.0.6"
|
||||
resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
|
||||
integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==
|
||||
dependencies:
|
||||
once "^1.3.0"
|
||||
wrappy "1"
|
||||
|
||||
inherits@2:
|
||||
version "2.0.4"
|
||||
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c"
|
||||
integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==
|
||||
|
||||
is-fullwidth-code-point@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d"
|
||||
integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==
|
||||
|
||||
minimatch@^3.1.1:
|
||||
version "3.1.2"
|
||||
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b"
|
||||
integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==
|
||||
dependencies:
|
||||
brace-expansion "^1.1.7"
|
||||
|
||||
once@^1.3.0:
|
||||
version "1.4.0"
|
||||
resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
|
||||
integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==
|
||||
dependencies:
|
||||
wrappy "1"
|
||||
|
||||
path-is-absolute@^1.0.0:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
|
||||
integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==
|
||||
|
||||
picomatch@^2.2.2:
|
||||
version "2.3.1"
|
||||
resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42"
|
||||
integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==
|
||||
|
||||
require-directory@^2.1.1:
|
||||
version "2.1.1"
|
||||
resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42"
|
||||
integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==
|
||||
|
||||
rollup-plugin-sourcemaps@^0.6:
|
||||
version "0.6.3"
|
||||
resolved "https://registry.yarnpkg.com/rollup-plugin-sourcemaps/-/rollup-plugin-sourcemaps-0.6.3.tgz#bf93913ffe056e414419607f1d02780d7ece84ed"
|
||||
integrity sha512-paFu+nT1xvuO1tPFYXGe+XnQvg4Hjqv/eIhG8i5EspfYYPBKL57X7iVbfv55aNVASg3dzWvES9dmWsL2KhfByw==
|
||||
dependencies:
|
||||
"@rollup/pluginutils" "^3.0.9"
|
||||
source-map-resolve "^0.6.0"
|
||||
|
||||
rollup@^2.60:
|
||||
version "2.79.1"
|
||||
resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.79.1.tgz#bedee8faef7c9f93a2647ac0108748f497f081c7"
|
||||
integrity sha512-uKxbd0IhMZOhjAiD5oAFp7BqvkA4Dv47qpOCtaNvng4HBwdbWtdOh8f5nZNuk2rp51PMGk3bzfWu5oayNEuYnw==
|
||||
optionalDependencies:
|
||||
fsevents "~2.3.2"
|
||||
|
||||
salty-crypto@0.3.1:
|
||||
version "0.3.1"
|
||||
resolved "https://registry.yarnpkg.com/salty-crypto/-/salty-crypto-0.3.1.tgz#1242cd948d8152aff104d0945980996b1602ba0e"
|
||||
integrity sha512-dCbF8/UzMV8oXPmMCHWzSp7u8G6NA+pHbaFBVqVgLVBiyxuwVn9iPbyt9WXT0EoXfL9sKt7U1mV+bgsGw5cV7A==
|
||||
|
||||
source-map-resolve@^0.6.0:
|
||||
version "0.6.0"
|
||||
resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.6.0.tgz#3d9df87e236b53f16d01e58150fc7711138e5ed2"
|
||||
integrity sha512-KXBr9d/fO/bWo97NXsPIAW1bFSBOuCnjbNTBMO7N59hsv5i9yzRDfcYwwt0l04+VqnKC+EwzvJZIP/qkuMgR/w==
|
||||
dependencies:
|
||||
atob "^2.1.2"
|
||||
decode-uri-component "^0.2.0"
|
||||
|
||||
string-width@^4.1.0, string-width@^4.2.0:
|
||||
version "4.2.3"
|
||||
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
|
||||
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
|
||||
dependencies:
|
||||
emoji-regex "^8.0.0"
|
||||
is-fullwidth-code-point "^3.0.0"
|
||||
strip-ansi "^6.0.1"
|
||||
|
||||
strip-ansi@^6.0.0, strip-ansi@^6.0.1:
|
||||
version "6.0.1"
|
||||
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
|
||||
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
|
||||
dependencies:
|
||||
ansi-regex "^5.0.1"
|
||||
|
||||
wrap-ansi@^7.0.0:
|
||||
version "7.0.0"
|
||||
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
|
||||
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
|
||||
dependencies:
|
||||
ansi-styles "^4.0.0"
|
||||
string-width "^4.1.0"
|
||||
strip-ansi "^6.0.0"
|
||||
|
||||
wrappy@1:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
|
||||
integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==
|
||||
|
||||
y18n@^5.0.5:
|
||||
version "5.0.8"
|
||||
resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55"
|
||||
integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==
|
||||
|
||||
yargs-parser@^20.2.2:
|
||||
version "20.2.9"
|
||||
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee"
|
||||
integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==
|
||||
|
||||
yargs@^16.2.0:
|
||||
version "16.2.0"
|
||||
resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66"
|
||||
integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==
|
||||
dependencies:
|
||||
cliui "^7.0.2"
|
||||
escalade "^3.1.1"
|
||||
get-caller-file "^2.0.5"
|
||||
require-directory "^2.1.1"
|
||||
string-width "^4.2.0"
|
||||
y18n "^5.0.5"
|
||||
yargs-parser "^20.2.2"
|
|
@ -0,0 +1,3 @@
|
|||
index.js
|
||||
index.js.map
|
||||
src.ts/
|
|
@ -0,0 +1,10 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<meta charset=utf-8>
|
||||
<title>Demo</title>
|
||||
<script src="node_modules/@syndicate-lang/core/dist/syndicate.js"></script>
|
||||
<script src="index.js"></script>
|
||||
<h1>Look in the JavaScript console for output.</h1>
|
||||
<main id="main">
|
||||
</main>
|
||||
</html>
|
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
"name": "@syndicate-lang/how-to-use-syndicatec-typescript",
|
||||
"private": true,
|
||||
"description": "Simple syndicatec example in TypeScript",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"prepare": "yarn compile && yarn rollup",
|
||||
"compile": "syndicatec -t -d src.ts -b src 'src/**/*.ts' && tsc",
|
||||
"rollup": "rollup -c",
|
||||
"clean": "rm -rf lib/ src.ts/ index.js index.js.map"
|
||||
},
|
||||
"author": "Tony Garnock-Jones <tonyg@leastfixedpoint.com>",
|
||||
"license": "GPL-3.0+",
|
||||
"dependencies": {
|
||||
"@preserves/core": "^0.995.200",
|
||||
"@preserves/schema": "^0.995.201",
|
||||
"@syndicate-lang/core": "*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@syndicate-lang/syndicatec": "*",
|
||||
"rollup": "^2.60",
|
||||
"rollup-plugin-sourcemaps": "^0.6",
|
||||
"typescript": "^4.9"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
/// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
||||
|
||||
import sourcemaps from 'rollup-plugin-sourcemaps';
|
||||
|
||||
export default {
|
||||
input: 'lib/index.js',
|
||||
plugins: [sourcemaps()],
|
||||
output: {
|
||||
file: 'index.js',
|
||||
format: 'umd',
|
||||
name: 'Main',
|
||||
sourcemap: true,
|
||||
globals: {
|
||||
'@syndicate-lang/core': 'Syndicate',
|
||||
},
|
||||
},
|
||||
};
|
|
@ -0,0 +1,18 @@
|
|||
/// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
||||
|
||||
import { BoxState, SetBox, N } from './protocol.js';
|
||||
import { Ref } from '@syndicate-lang/core';
|
||||
|
||||
export function boot(ds: Ref) {
|
||||
spawn named 'box' {
|
||||
field boxValue: number = 0;
|
||||
at ds {
|
||||
assert BoxState(boxValue.value);
|
||||
on message SetBox($v: number) => boxValue.value = v;
|
||||
}
|
||||
stop on (boxValue.value === N) {
|
||||
console.log('terminated box root facet');
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
/// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
||||
|
||||
import { BoxState, SetBox } from './protocol.js';
|
||||
import { Ref } from '@syndicate-lang/core';
|
||||
|
||||
export function boot(ds: Ref, doneCallback: () => void) {
|
||||
spawn named 'client' {
|
||||
at ds {
|
||||
on asserted BoxState($v: number) => send message SetBox(v + 1);
|
||||
on retracted BoxState(_) => {
|
||||
console.log('box gone');
|
||||
doneCallback();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
/// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
||||
|
||||
import { N } from './protocol.js';
|
||||
import * as Box from './box.js';
|
||||
import * as Client from './client.js';
|
||||
import { Dataspace } from '@syndicate-lang/core';
|
||||
|
||||
console.time('box-and-client-' + N.toString());
|
||||
Dataspace.boot(ds => {
|
||||
Box.boot(ds);
|
||||
Client.boot(ds, () => console.timeEnd('box-and-client-' + N.toString()));
|
||||
});
|
|
@ -0,0 +1,7 @@
|
|||
/// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
||||
|
||||
export assertion type BoxState(value: number);
|
||||
export message type SetBox(newValue: number);
|
||||
|
||||
export const N = 100000;
|
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"target": "ES2017",
|
||||
"lib": ["ES2017", "DOM"],
|
||||
"declaration": true,
|
||||
"baseUrl": "./src.ts",
|
||||
"rootDir": "./src.ts",
|
||||
"outDir": "./lib",
|
||||
"declarationDir": "./lib",
|
||||
"esModuleInterop": true,
|
||||
"moduleResolution": "node",
|
||||
"module": "es6",
|
||||
"sourceMap": true,
|
||||
"strict": true
|
||||
},
|
||||
"include": ["src.ts/**/*"]
|
||||
}
|
|
@ -0,0 +1,287 @@
|
|||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
||||
# yarn lockfile v1
|
||||
|
||||
|
||||
"@preserves/core@0.995.200", "@preserves/core@^0.995.200":
|
||||
version "0.995.200"
|
||||
resolved "https://registry.yarnpkg.com/@preserves/core/-/core-0.995.200.tgz#65575cf8f9320e73b5d37fa9ac9d6881a33fd3a6"
|
||||
integrity sha512-htZ2x+hltUpKoPsviWSuelzZW96po9zVSsN0RZEih60FahNX0R2LCqFJ6v5lyATuQ9oHALVi0w8w4rtf8oiAJw==
|
||||
|
||||
"@preserves/schema@0.995.201":
|
||||
version "0.995.201"
|
||||
resolved "https://registry.yarnpkg.com/@preserves/schema/-/schema-0.995.201.tgz#827ad539afb0fdf68ba885ee3ff43db0fd473aa5"
|
||||
integrity sha512-0SuhwOEAfxtrAeOTZ8V1yNEcHHHEbfUmoFawrF+vzTQFNZRz/X3LF1FM6wOiJlHtb7tBr4B+rHXX8jfNrqrdkA==
|
||||
dependencies:
|
||||
"@preserves/core" "^0.995.200"
|
||||
|
||||
"@rollup/pluginutils@^3.0.9":
|
||||
version "3.1.0"
|
||||
resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-3.1.0.tgz#706b4524ee6dc8b103b3c995533e5ad680c02b9b"
|
||||
integrity sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==
|
||||
dependencies:
|
||||
"@types/estree" "0.0.39"
|
||||
estree-walker "^1.0.1"
|
||||
picomatch "^2.2.2"
|
||||
|
||||
"@syndicate-lang/compiler@^0.21.1":
|
||||
version "0.21.1"
|
||||
resolved "https://registry.yarnpkg.com/@syndicate-lang/compiler/-/compiler-0.21.1.tgz#b6316bac14d053c313b3442be68f532a60c47cb3"
|
||||
integrity sha512-daaYh1i0XmoHt6eTtO4gWblfVKMjp9trwxqR62wUSONY3gtJ5Bn4hG3dMgfoMz2NvOWbJHaGz/95J0jRubITxA==
|
||||
|
||||
"@syndicate-lang/core@*", "@syndicate-lang/core@^0.32.0":
|
||||
version "0.32.0"
|
||||
resolved "https://registry.yarnpkg.com/@syndicate-lang/core/-/core-0.32.0.tgz#0efbbff176cac2969c2b6ba70a19965add3a2c61"
|
||||
integrity sha512-ERVXk0W1xLaKvUa79Ek74YvqfBU543cUTb2GJvp76TP5k1jA97q9GzhddicS/s8lqu8SUC1+IXmKiJk0NX2TWQ==
|
||||
dependencies:
|
||||
salty-crypto "0.3.1"
|
||||
|
||||
"@syndicate-lang/syndicatec@*":
|
||||
version "0.34.0"
|
||||
resolved "https://registry.yarnpkg.com/@syndicate-lang/syndicatec/-/syndicatec-0.34.0.tgz#f3b88507b633552fe1f41f24def5121c0cafeaeb"
|
||||
integrity sha512-h3MPifJdXZTS3JVcvRG8GXMJMPBH4RYmJ3B7c2sjM826Pf6O8zT47Vuv1y2WyD9PS8BiSCI01uOR0W5AVJJT5w==
|
||||
dependencies:
|
||||
"@syndicate-lang/compiler" "^0.21.1"
|
||||
"@syndicate-lang/core" "^0.32.0"
|
||||
glob "^7.1.6"
|
||||
yargs "^16.2.0"
|
||||
|
||||
"@types/estree@0.0.39":
|
||||
version "0.0.39"
|
||||
resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.39.tgz#e177e699ee1b8c22d23174caaa7422644389509f"
|
||||
integrity sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==
|
||||
|
||||
ansi-regex@^5.0.1:
|
||||
version "5.0.1"
|
||||
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304"
|
||||
integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==
|
||||
|
||||
ansi-styles@^4.0.0:
|
||||
version "4.3.0"
|
||||
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937"
|
||||
integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==
|
||||
dependencies:
|
||||
color-convert "^2.0.1"
|
||||
|
||||
atob@^2.1.2:
|
||||
version "2.1.2"
|
||||
resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9"
|
||||
integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==
|
||||
|
||||
balanced-match@^1.0.0:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee"
|
||||
integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==
|
||||
|
||||
brace-expansion@^1.1.7:
|
||||
version "1.1.11"
|
||||
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd"
|
||||
integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==
|
||||
dependencies:
|
||||
balanced-match "^1.0.0"
|
||||
concat-map "0.0.1"
|
||||
|
||||
cliui@^7.0.2:
|
||||
version "7.0.4"
|
||||
resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f"
|
||||
integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==
|
||||
dependencies:
|
||||
string-width "^4.2.0"
|
||||
strip-ansi "^6.0.0"
|
||||
wrap-ansi "^7.0.0"
|
||||
|
||||
color-convert@^2.0.1:
|
||||
version "2.0.1"
|
||||
resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3"
|
||||
integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==
|
||||
dependencies:
|
||||
color-name "~1.1.4"
|
||||
|
||||
color-name@~1.1.4:
|
||||
version "1.1.4"
|
||||
resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2"
|
||||
integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==
|
||||
|
||||
concat-map@0.0.1:
|
||||
version "0.0.1"
|
||||
resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
|
||||
integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==
|
||||
|
||||
decode-uri-component@^0.2.0:
|
||||
version "0.2.2"
|
||||
resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.2.tgz#e69dbe25d37941171dd540e024c444cd5188e1e9"
|
||||
integrity sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==
|
||||
|
||||
emoji-regex@^8.0.0:
|
||||
version "8.0.0"
|
||||
resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37"
|
||||
integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==
|
||||
|
||||
escalade@^3.1.1:
|
||||
version "3.1.2"
|
||||
resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.2.tgz#54076e9ab29ea5bf3d8f1ed62acffbb88272df27"
|
||||
integrity sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==
|
||||
|
||||
estree-walker@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-1.0.1.tgz#31bc5d612c96b704106b477e6dd5d8aa138cb700"
|
||||
integrity sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==
|
||||
|
||||
fs.realpath@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
|
||||
integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==
|
||||
|
||||
fsevents@~2.3.2:
|
||||
version "2.3.3"
|
||||
resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6"
|
||||
integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==
|
||||
|
||||
get-caller-file@^2.0.5:
|
||||
version "2.0.5"
|
||||
resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e"
|
||||
integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==
|
||||
|
||||
glob@^7.1.6:
|
||||
version "7.2.3"
|
||||
resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b"
|
||||
integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==
|
||||
dependencies:
|
||||
fs.realpath "^1.0.0"
|
||||
inflight "^1.0.4"
|
||||
inherits "2"
|
||||
minimatch "^3.1.1"
|
||||
once "^1.3.0"
|
||||
path-is-absolute "^1.0.0"
|
||||
|
||||
inflight@^1.0.4:
|
||||
version "1.0.6"
|
||||
resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
|
||||
integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==
|
||||
dependencies:
|
||||
once "^1.3.0"
|
||||
wrappy "1"
|
||||
|
||||
inherits@2:
|
||||
version "2.0.4"
|
||||
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c"
|
||||
integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==
|
||||
|
||||
is-fullwidth-code-point@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d"
|
||||
integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==
|
||||
|
||||
minimatch@^3.1.1:
|
||||
version "3.1.2"
|
||||
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b"
|
||||
integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==
|
||||
dependencies:
|
||||
brace-expansion "^1.1.7"
|
||||
|
||||
once@^1.3.0:
|
||||
version "1.4.0"
|
||||
resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
|
||||
integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==
|
||||
dependencies:
|
||||
wrappy "1"
|
||||
|
||||
path-is-absolute@^1.0.0:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
|
||||
integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==
|
||||
|
||||
picomatch@^2.2.2:
|
||||
version "2.3.1"
|
||||
resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42"
|
||||
integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==
|
||||
|
||||
require-directory@^2.1.1:
|
||||
version "2.1.1"
|
||||
resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42"
|
||||
integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==
|
||||
|
||||
rollup-plugin-sourcemaps@^0.6:
|
||||
version "0.6.3"
|
||||
resolved "https://registry.yarnpkg.com/rollup-plugin-sourcemaps/-/rollup-plugin-sourcemaps-0.6.3.tgz#bf93913ffe056e414419607f1d02780d7ece84ed"
|
||||
integrity sha512-paFu+nT1xvuO1tPFYXGe+XnQvg4Hjqv/eIhG8i5EspfYYPBKL57X7iVbfv55aNVASg3dzWvES9dmWsL2KhfByw==
|
||||
dependencies:
|
||||
"@rollup/pluginutils" "^3.0.9"
|
||||
source-map-resolve "^0.6.0"
|
||||
|
||||
rollup@^2.60:
|
||||
version "2.79.1"
|
||||
resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.79.1.tgz#bedee8faef7c9f93a2647ac0108748f497f081c7"
|
||||
integrity sha512-uKxbd0IhMZOhjAiD5oAFp7BqvkA4Dv47qpOCtaNvng4HBwdbWtdOh8f5nZNuk2rp51PMGk3bzfWu5oayNEuYnw==
|
||||
optionalDependencies:
|
||||
fsevents "~2.3.2"
|
||||
|
||||
salty-crypto@0.3.1:
|
||||
version "0.3.1"
|
||||
resolved "https://registry.yarnpkg.com/salty-crypto/-/salty-crypto-0.3.1.tgz#1242cd948d8152aff104d0945980996b1602ba0e"
|
||||
integrity sha512-dCbF8/UzMV8oXPmMCHWzSp7u8G6NA+pHbaFBVqVgLVBiyxuwVn9iPbyt9WXT0EoXfL9sKt7U1mV+bgsGw5cV7A==
|
||||
|
||||
source-map-resolve@^0.6.0:
|
||||
version "0.6.0"
|
||||
resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.6.0.tgz#3d9df87e236b53f16d01e58150fc7711138e5ed2"
|
||||
integrity sha512-KXBr9d/fO/bWo97NXsPIAW1bFSBOuCnjbNTBMO7N59hsv5i9yzRDfcYwwt0l04+VqnKC+EwzvJZIP/qkuMgR/w==
|
||||
dependencies:
|
||||
atob "^2.1.2"
|
||||
decode-uri-component "^0.2.0"
|
||||
|
||||
string-width@^4.1.0, string-width@^4.2.0:
|
||||
version "4.2.3"
|
||||
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
|
||||
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
|
||||
dependencies:
|
||||
emoji-regex "^8.0.0"
|
||||
is-fullwidth-code-point "^3.0.0"
|
||||
strip-ansi "^6.0.1"
|
||||
|
||||
strip-ansi@^6.0.0, strip-ansi@^6.0.1:
|
||||
version "6.0.1"
|
||||
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
|
||||
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
|
||||
dependencies:
|
||||
ansi-regex "^5.0.1"
|
||||
|
||||
typescript@^4.9:
|
||||
version "4.9.5"
|
||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a"
|
||||
integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==
|
||||
|
||||
wrap-ansi@^7.0.0:
|
||||
version "7.0.0"
|
||||
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
|
||||
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
|
||||
dependencies:
|
||||
ansi-styles "^4.0.0"
|
||||
string-width "^4.1.0"
|
||||
strip-ansi "^6.0.0"
|
||||
|
||||
wrappy@1:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
|
||||
integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==
|
||||
|
||||
y18n@^5.0.5:
|
||||
version "5.0.8"
|
||||
resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55"
|
||||
integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==
|
||||
|
||||
yargs-parser@^20.2.2:
|
||||
version "20.2.9"
|
||||
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee"
|
||||
integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==
|
||||
|
||||
yargs@^16.2.0:
|
||||
version "16.2.0"
|
||||
resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66"
|
||||
integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==
|
||||
dependencies:
|
||||
cliui "^7.0.2"
|
||||
escalade "^3.1.1"
|
||||
get-caller-file "^2.0.5"
|
||||
require-directory "^2.1.1"
|
||||
string-width "^4.2.0"
|
||||
y18n "^5.0.5"
|
||||
yargs-parser "^20.2.2"
|
|
@ -0,0 +1,11 @@
|
|||
#!/usr/bin/env -S node -r @syndicate-lang/loader
|
||||
/// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
/// SPDX-FileCopyrightText: Copyright © 2023 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
||||
|
||||
const { stringify } = require('@syndicate-lang/core');
|
||||
const { service } = require('@syndicate-lang/service');
|
||||
|
||||
service(args => {
|
||||
console.log('+', stringify(args));
|
||||
on stop { console.log('-', stringify(args)); }
|
||||
});
|
|
@ -0,0 +1,9 @@
|
|||
<require-service <daemon example>>
|
||||
<daemon example {
|
||||
argv: "./example.js"
|
||||
protocol: application/syndicate
|
||||
}>
|
||||
? <service-object <daemon example> ?cap> [
|
||||
$cap += =here-is-your-configuration!
|
||||
$cap += =here-is-another-configuration!
|
||||
]
|
|
@ -0,0 +1,2 @@
|
|||
index.js
|
||||
index.js.map
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 7.9 KiB After Width: | Height: | Size: 7.9 KiB |
Before Width: | Height: | Size: 7.6 KiB After Width: | Height: | Size: 7.6 KiB |
Before Width: | Height: | Size: 6.8 KiB After Width: | Height: | Size: 6.8 KiB |
Before Width: | Height: | Size: 6.8 KiB After Width: | Height: | Size: 6.8 KiB |
Before Width: | Height: | Size: 7.7 KiB After Width: | Height: | Size: 7.7 KiB |
|
@ -0,0 +1,18 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<meta charset=utf-8>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=0.67, maximum-scale=0.67, user-scalable=no">
|
||||
<link href="css/style.css" rel="stylesheet" type="text/css">
|
||||
<script src="node_modules/@preserves/core/dist/preserves.js"></script>
|
||||
<script src="node_modules/@syndicate-lang/core/dist/syndicate.js"></script>
|
||||
<script src="node_modules/@syndicate-lang/html/dist/syndicate-html.js"></script>
|
||||
<script src="node_modules/@syndicate-lang/timer/dist/syndicate-timer.js"></script>
|
||||
<body>
|
||||
<div class="container">
|
||||
<div id="board-area" class="board">
|
||||
</div>
|
||||
</div>
|
||||
<script src="index.js"></script>
|
||||
<script>Main.main();</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,28 @@
|
|||
{
|
||||
"name": "@syndicate-lang/syndicate-html-example-flappy-bird",
|
||||
"private": true,
|
||||
"description": "HTML UI Flappy Bird Syndicate example",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"prepare": "yarn compile && yarn rollup",
|
||||
"compile": "syndicate-tsc",
|
||||
"rollup": "rollup -c",
|
||||
"clean": "rm -rf lib/ index.js index.js.map"
|
||||
},
|
||||
"author": "Tony Garnock-Jones <tonyg@leastfixedpoint.com>",
|
||||
"license": "GPL-3.0+",
|
||||
"dependencies": {
|
||||
"@preserves/core": "^0.995.200",
|
||||
"@preserves/schema": "^0.995.201",
|
||||
"@syndicate-lang/core": "*",
|
||||
"@syndicate-lang/html": "*",
|
||||
"@syndicate-lang/timer": "*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@syndicate-lang/ts-plugin": "*",
|
||||
"@syndicate-lang/tsc": "*",
|
||||
"rollup": "^2.60",
|
||||
"rollup-plugin-sourcemaps": "^0.6",
|
||||
"typescript": "^4.9"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
/// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
||||
|
||||
import sourcemaps from 'rollup-plugin-sourcemaps';
|
||||
|
||||
export default {
|
||||
input: 'lib/index.js',
|
||||
plugins: [sourcemaps()],
|
||||
output: {
|
||||
file: 'index.js',
|
||||
format: 'umd',
|
||||
name: 'Main',
|
||||
sourcemap: true,
|
||||
globals: {
|
||||
'@syndicate-lang/core': 'Syndicate',
|
||||
'@syndicate-lang/html': 'SyndicateHtml',
|
||||
'@syndicate-lang/timer': 'SyndicateTimer',
|
||||
},
|
||||
},
|
||||
};
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
|
@ -0,0 +1,195 @@
|
|||
/// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
||||
|
||||
import { Turn, Dataspace, Double, floatValue, Ref, Facet } from '@syndicate-lang/core';
|
||||
import { boot as bootHtml, WindowEvent, template, Anchor } from '@syndicate-lang/html';
|
||||
import { boot as bootTimer, PeriodicTick } from '@syndicate-lang/timer';
|
||||
|
||||
assertion type Position(x, y);
|
||||
assertion type GameOver();
|
||||
assertion type Score(count);
|
||||
message type IncreaseScore();
|
||||
message type Reset();
|
||||
|
||||
const BOARD_HEIGHT = 567;
|
||||
const FLAPPY_WIDTH = 57;
|
||||
const FLAPPY_HEIGHT = 41;
|
||||
const FLAPPY_XPOS = 212;
|
||||
const PILLAR_WIDTH = 86;
|
||||
const PILLAR_GAP = 158;
|
||||
const FIELD_HEIGHT = 561;
|
||||
const PILLAR_HEAD_HEIGHT = 40;
|
||||
|
||||
export function main() {
|
||||
Dataspace.boot(mainDs => {
|
||||
bootHtml(mainDs);
|
||||
bootTimer(mainDs);
|
||||
spawn named 'game-factory' {
|
||||
spawnGame(mainDs);
|
||||
at mainDs {
|
||||
during GameOver() => {
|
||||
on stop spawnGame(mainDs);
|
||||
on message WindowEvent('+keypress', $_e) => send message Reset();
|
||||
on message WindowEvent('+click', $_e) => send message Reset();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function spawnGame(mainDs: Ref) {
|
||||
spawn named 'GameInstance' {
|
||||
const gameDs = create new Dataspace();
|
||||
|
||||
at gameDs {
|
||||
during GameOver() => at mainDs {
|
||||
assert GameOver();
|
||||
}
|
||||
}
|
||||
at mainDs {
|
||||
stop on message Reset();
|
||||
}
|
||||
|
||||
spawn linked named 'score' {
|
||||
let ui = new Anchor();
|
||||
field score: number = 0;
|
||||
|
||||
at gameDs {
|
||||
assert Score(score.value);
|
||||
on message IncreaseScore() => score.value++;
|
||||
}
|
||||
|
||||
react {
|
||||
at mainDs {
|
||||
assert ui.html('#board-area', template`<h1 class="score">${score.value}</h1>`);
|
||||
}
|
||||
at gameDs {
|
||||
stop on asserted GameOver() => react {
|
||||
at mainDs {
|
||||
assert ui.html(
|
||||
'#board-area',
|
||||
template`<h1 class="score">${score.value}<br/>GAME OVER</h1>`);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
spawn linked named 'flappy' {
|
||||
let ui = new Anchor();
|
||||
field xpos: number = 0;
|
||||
field ypos: number = 312;
|
||||
field yvel: number = 0;
|
||||
|
||||
at gameDs {
|
||||
assert Position(Double(xpos.value), Double(ypos.value));
|
||||
|
||||
on (ypos.value > BOARD_HEIGHT - FLAPPY_HEIGHT) {
|
||||
ypos.value = BOARD_HEIGHT - FLAPPY_HEIGHT;
|
||||
assert GameOver();
|
||||
}
|
||||
}
|
||||
|
||||
at mainDs {
|
||||
assert ui.html(
|
||||
'#board-area',
|
||||
template`<div class="flappy"
|
||||
style="${`transform: rotate(${2 * yvel.value}deg);
|
||||
top: ${ypos.value}px`}"></div>`);
|
||||
}
|
||||
|
||||
react {
|
||||
at gameDs {
|
||||
stop on asserted GameOver();
|
||||
}
|
||||
|
||||
at mainDs {
|
||||
on message WindowEvent('+keypress', $_e) => yvel.value = -10;
|
||||
on message WindowEvent('+click', $_e) => yvel.value = -10;
|
||||
|
||||
const seconds_per_tick = 1 / 60;
|
||||
const seconds_per_tick_d = Double(seconds_per_tick);
|
||||
on message PeriodicTick(seconds_per_tick_d) => {
|
||||
xpos.value += 150 * seconds_per_tick;
|
||||
ypos.value = (ypos.value + yvel.value);
|
||||
yvel.value += seconds_per_tick * 50;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
spawn linked named 'border-scroll' {
|
||||
let ui = new Anchor();
|
||||
field pos: number = 0;
|
||||
at gameDs {
|
||||
on asserted Position($xpos, _) => pos.value = floatValue(xpos) % 23;
|
||||
}
|
||||
at mainDs {
|
||||
assert ui.html(
|
||||
'#board-area',
|
||||
template`<div class="scrolling-border" style="${`background-position-x: ${-pos.value}px`}"></div>`,
|
||||
0);
|
||||
}
|
||||
}
|
||||
|
||||
spawn linked named 'pipe-factory' {
|
||||
field nextPipe: number = 0;
|
||||
at gameDs {
|
||||
on asserted Score(nextPipe.value) => {
|
||||
react {
|
||||
const pipeNumber = nextPipe.value++;
|
||||
spawn linked named ['pipe', pipeNumber] {
|
||||
runPipe(pipeNumber, Turn.activeFacet);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function runPipe(i: number, mainPipeFacet: Facet) {
|
||||
const xlocation = (i + 1) * 324;
|
||||
|
||||
let ui = new Anchor();
|
||||
field xpos: number = xlocation;
|
||||
|
||||
const upperHeight =
|
||||
Math.random() * (FIELD_HEIGHT - PILLAR_GAP - PILLAR_HEAD_HEIGHT * 6)
|
||||
+ PILLAR_HEAD_HEIGHT * 3;
|
||||
const lowerHeight = FIELD_HEIGHT - upperHeight - PILLAR_GAP;
|
||||
|
||||
stop mainPipeFacet on (xpos.value < -(PILLAR_WIDTH + FLAPPY_XPOS));
|
||||
|
||||
at gameDs {
|
||||
once (xpos.value <= 0) send message IncreaseScore();
|
||||
|
||||
on asserted Position($flappyXpos, _) =>
|
||||
xpos.value = xlocation - floatValue(flappyXpos);
|
||||
|
||||
on asserted Position($xpos, $ypos) => {
|
||||
if (touchingPillar(floatValue(xpos), floatValue(ypos))) {
|
||||
assert GameOver();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
at mainDs {
|
||||
assert ui.html(
|
||||
'#board-area',
|
||||
template`<div class="pillars">
|
||||
<div class="pillar pillar-upper"
|
||||
style="${`left: ${xpos.value + FLAPPY_XPOS}px; height: ${upperHeight}px;`}"></div>
|
||||
<div class="pillar pillar-lower"
|
||||
style="${`left: ${xpos.value + FLAPPY_XPOS}px; height: ${lowerHeight}px;`}"></div>
|
||||
</div>`);
|
||||
}
|
||||
|
||||
function touchingPillar(xpos: number, ypos: number): boolean {
|
||||
const inHorizontalRange =
|
||||
(xpos + FLAPPY_WIDTH >= xlocation) && (xpos <= xlocation + PILLAR_WIDTH);
|
||||
const aboveGapTop = (ypos <= upperHeight);
|
||||
const belowGapBottom = (ypos + FLAPPY_HEIGHT >= upperHeight + PILLAR_GAP);
|
||||
return inHorizontalRange && (aboveGapTop || belowGapBottom);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"target": "ES2017",
|
||||
"lib": ["ES2017", "DOM"],
|
||||
"declaration": true,
|
||||
"baseUrl": "./src",
|
||||
"rootDir": "./src",
|
||||
"outDir": "./lib",
|
||||
"declarationDir": "./lib",
|
||||
"esModuleInterop": true,
|
||||
"moduleResolution": "node",
|
||||
"module": "es6",
|
||||
"sourceMap": true,
|
||||
"strict": true,
|
||||
"plugins": [
|
||||
{ "name": "@syndicate-lang/ts-plugin" }
|
||||
]
|
||||
},
|
||||
"include": ["src/**/*"]
|
||||
}
|
|
@ -0,0 +1,309 @@
|
|||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
||||
# yarn lockfile v1
|
||||
|
||||
|
||||
"@preserves/core@0.995.200", "@preserves/core@^0.995.200":
|
||||
version "0.995.200"
|
||||
resolved "https://registry.yarnpkg.com/@preserves/core/-/core-0.995.200.tgz#65575cf8f9320e73b5d37fa9ac9d6881a33fd3a6"
|
||||
integrity sha512-htZ2x+hltUpKoPsviWSuelzZW96po9zVSsN0RZEih60FahNX0R2LCqFJ6v5lyATuQ9oHALVi0w8w4rtf8oiAJw==
|
||||
|
||||
"@preserves/schema@0.995.201":
|
||||
version "0.995.201"
|
||||
resolved "https://registry.yarnpkg.com/@preserves/schema/-/schema-0.995.201.tgz#827ad539afb0fdf68ba885ee3ff43db0fd473aa5"
|
||||
integrity sha512-0SuhwOEAfxtrAeOTZ8V1yNEcHHHEbfUmoFawrF+vzTQFNZRz/X3LF1FM6wOiJlHtb7tBr4B+rHXX8jfNrqrdkA==
|
||||
dependencies:
|
||||
"@preserves/core" "^0.995.200"
|
||||
|
||||
"@rollup/pluginutils@^3.0.9":
|
||||
version "3.1.0"
|
||||
resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-3.1.0.tgz#706b4524ee6dc8b103b3c995533e5ad680c02b9b"
|
||||
integrity sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==
|
||||
dependencies:
|
||||
"@types/estree" "0.0.39"
|
||||
estree-walker "^1.0.1"
|
||||
picomatch "^2.2.2"
|
||||
|
||||
"@syndicate-lang/compiler@^0.21.1":
|
||||
version "0.21.1"
|
||||
resolved "https://registry.yarnpkg.com/@syndicate-lang/compiler/-/compiler-0.21.1.tgz#b6316bac14d053c313b3442be68f532a60c47cb3"
|
||||
integrity sha512-daaYh1i0XmoHt6eTtO4gWblfVKMjp9trwxqR62wUSONY3gtJ5Bn4hG3dMgfoMz2NvOWbJHaGz/95J0jRubITxA==
|
||||
|
||||
"@syndicate-lang/core@*", "@syndicate-lang/core@^0.32.0":
|
||||
version "0.32.0"
|
||||
resolved "https://registry.yarnpkg.com/@syndicate-lang/core/-/core-0.32.0.tgz#0efbbff176cac2969c2b6ba70a19965add3a2c61"
|
||||
integrity sha512-ERVXk0W1xLaKvUa79Ek74YvqfBU543cUTb2GJvp76TP5k1jA97q9GzhddicS/s8lqu8SUC1+IXmKiJk0NX2TWQ==
|
||||
dependencies:
|
||||
salty-crypto "0.3.1"
|
||||
|
||||
"@syndicate-lang/html@*":
|
||||
version "0.33.0"
|
||||
resolved "https://registry.yarnpkg.com/@syndicate-lang/html/-/html-0.33.0.tgz#c53e6bf8a52b17c3747f4270713a8c9234f984af"
|
||||
integrity sha512-xhN6NZOgLxlAQOyWG0JAgtyF1e1yQvrpNh5RBAPnucFYC024yo1ggZ08+KiaulhsoIKvRbBE6FU6p9dDm4/tpQ==
|
||||
dependencies:
|
||||
"@syndicate-lang/core" "^0.32.0"
|
||||
|
||||
"@syndicate-lang/timer@*":
|
||||
version "0.33.0"
|
||||
resolved "https://registry.yarnpkg.com/@syndicate-lang/timer/-/timer-0.33.0.tgz#cdb38ebe777332ec58a5b0b9483db809275a61de"
|
||||
integrity sha512-cBon+nk8zvNeU4zC6tg7nhgJnmrRoXHYE140UK3gscNFcg1LZ1d7q9WxfVTzFtRocRBslv6pworSwCDn3Go7TQ==
|
||||
dependencies:
|
||||
"@syndicate-lang/core" "^0.32.0"
|
||||
|
||||
"@syndicate-lang/ts-plugin@*":
|
||||
version "0.34.0"
|
||||
resolved "https://registry.yarnpkg.com/@syndicate-lang/ts-plugin/-/ts-plugin-0.34.0.tgz#df92f9044eeba528c80c41c5c9df49ee28902411"
|
||||
integrity sha512-OCO6Hm0euz2hZk6tYTrJQNEM8iDBeQ/dgpW2a/UP52XSP6fYj0OvUVfn+35ZkIL64S+zDsJjL/6XFN05UZyRGA==
|
||||
dependencies:
|
||||
"@syndicate-lang/compiler" "^0.21.1"
|
||||
"@syndicate-lang/core" "^0.32.0"
|
||||
|
||||
"@syndicate-lang/tsc@*":
|
||||
version "0.34.0"
|
||||
resolved "https://registry.yarnpkg.com/@syndicate-lang/tsc/-/tsc-0.34.0.tgz#1056fba7f639bbf436d0c2ecd2717edc4c1e612a"
|
||||
integrity sha512-Ufj3xsdXMbMCavWsEkX/pFyXRpNIWRW+LFew1icD14DoSLqyBcoUEvskolOSgkSzC53tDjbd4/LXDVofIjIyUA==
|
||||
dependencies:
|
||||
"@syndicate-lang/compiler" "^0.21.1"
|
||||
"@syndicate-lang/core" "^0.32.0"
|
||||
glob "^7.1.6"
|
||||
yargs "^16.2.0"
|
||||
|
||||
"@types/estree@0.0.39":
|
||||
version "0.0.39"
|
||||
resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.39.tgz#e177e699ee1b8c22d23174caaa7422644389509f"
|
||||
integrity sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==
|
||||
|
||||
ansi-regex@^5.0.1:
|
||||
version "5.0.1"
|
||||
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304"
|
||||
integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==
|
||||
|
||||
ansi-styles@^4.0.0:
|
||||
version "4.3.0"
|
||||
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937"
|
||||
integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==
|
||||
dependencies:
|
||||
color-convert "^2.0.1"
|
||||
|
||||
atob@^2.1.2:
|
||||
version "2.1.2"
|
||||
resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9"
|
||||
integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==
|
||||
|
||||
balanced-match@^1.0.0:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee"
|
||||
integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==
|
||||
|
||||
brace-expansion@^1.1.7:
|
||||
version "1.1.11"
|
||||
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd"
|
||||
integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==
|
||||
dependencies:
|
||||
balanced-match "^1.0.0"
|
||||
concat-map "0.0.1"
|
||||
|
||||
cliui@^7.0.2:
|
||||
version "7.0.4"
|
||||
resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f"
|
||||
integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==
|
||||
dependencies:
|
||||
string-width "^4.2.0"
|
||||
strip-ansi "^6.0.0"
|
||||
wrap-ansi "^7.0.0"
|
||||
|
||||
color-convert@^2.0.1:
|
||||
version "2.0.1"
|
||||
resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3"
|
||||
integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==
|
||||
dependencies:
|
||||
color-name "~1.1.4"
|
||||
|
||||
color-name@~1.1.4:
|
||||
version "1.1.4"
|
||||
resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2"
|
||||
integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==
|
||||
|
||||
concat-map@0.0.1:
|
||||
version "0.0.1"
|
||||
resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
|
||||
integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==
|
||||
|
||||
decode-uri-component@^0.2.0:
|
||||
version "0.2.2"
|
||||
resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.2.tgz#e69dbe25d37941171dd540e024c444cd5188e1e9"
|
||||
integrity sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==
|
||||
|
||||
emoji-regex@^8.0.0:
|
||||
version "8.0.0"
|
||||
resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37"
|
||||
integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==
|
||||
|
||||
escalade@^3.1.1:
|
||||
version "3.1.2"
|
||||
resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.2.tgz#54076e9ab29ea5bf3d8f1ed62acffbb88272df27"
|
||||
integrity sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==
|
||||
|
||||
estree-walker@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-1.0.1.tgz#31bc5d612c96b704106b477e6dd5d8aa138cb700"
|
||||
integrity sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==
|
||||
|
||||
fs.realpath@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
|
||||
integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==
|
||||
|
||||
fsevents@~2.3.2:
|
||||
version "2.3.3"
|
||||
resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6"
|
||||
integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==
|
||||
|
||||
get-caller-file@^2.0.5:
|
||||
version "2.0.5"
|
||||
resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e"
|
||||
integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==
|
||||
|
||||
glob@^7.1.6:
|
||||
version "7.2.3"
|
||||
resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b"
|
||||
integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==
|
||||
dependencies:
|
||||
fs.realpath "^1.0.0"
|
||||
inflight "^1.0.4"
|
||||
inherits "2"
|
||||
minimatch "^3.1.1"
|
||||
once "^1.3.0"
|
||||
path-is-absolute "^1.0.0"
|
||||
|
||||
inflight@^1.0.4:
|
||||
version "1.0.6"
|
||||
resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
|
||||
integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==
|
||||
dependencies:
|
||||
once "^1.3.0"
|
||||
wrappy "1"
|
||||
|
||||
inherits@2:
|
||||
version "2.0.4"
|
||||
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c"
|
||||
integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==
|
||||
|
||||
is-fullwidth-code-point@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d"
|
||||
integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==
|
||||
|
||||
minimatch@^3.1.1:
|
||||
version "3.1.2"
|
||||
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b"
|
||||
integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==
|
||||
dependencies:
|
||||
brace-expansion "^1.1.7"
|
||||
|
||||
once@^1.3.0:
|
||||
version "1.4.0"
|
||||
resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
|
||||
integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==
|
||||
dependencies:
|
||||
wrappy "1"
|
||||
|
||||
path-is-absolute@^1.0.0:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
|
||||
integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==
|
||||
|
||||
picomatch@^2.2.2:
|
||||
version "2.3.1"
|
||||
resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42"
|
||||
integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==
|
||||
|
||||
require-directory@^2.1.1:
|
||||
version "2.1.1"
|
||||
resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42"
|
||||
integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==
|
||||
|
||||
rollup-plugin-sourcemaps@^0.6:
|
||||
version "0.6.3"
|
||||
resolved "https://registry.yarnpkg.com/rollup-plugin-sourcemaps/-/rollup-plugin-sourcemaps-0.6.3.tgz#bf93913ffe056e414419607f1d02780d7ece84ed"
|
||||
integrity sha512-paFu+nT1xvuO1tPFYXGe+XnQvg4Hjqv/eIhG8i5EspfYYPBKL57X7iVbfv55aNVASg3dzWvES9dmWsL2KhfByw==
|
||||
dependencies:
|
||||
"@rollup/pluginutils" "^3.0.9"
|
||||
source-map-resolve "^0.6.0"
|
||||
|
||||
rollup@^2.60:
|
||||
version "2.79.1"
|
||||
resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.79.1.tgz#bedee8faef7c9f93a2647ac0108748f497f081c7"
|
||||
integrity sha512-uKxbd0IhMZOhjAiD5oAFp7BqvkA4Dv47qpOCtaNvng4HBwdbWtdOh8f5nZNuk2rp51PMGk3bzfWu5oayNEuYnw==
|
||||
optionalDependencies:
|
||||
fsevents "~2.3.2"
|
||||
|
||||
salty-crypto@0.3.1:
|
||||
version "0.3.1"
|
||||
resolved "https://registry.yarnpkg.com/salty-crypto/-/salty-crypto-0.3.1.tgz#1242cd948d8152aff104d0945980996b1602ba0e"
|
||||
integrity sha512-dCbF8/UzMV8oXPmMCHWzSp7u8G6NA+pHbaFBVqVgLVBiyxuwVn9iPbyt9WXT0EoXfL9sKt7U1mV+bgsGw5cV7A==
|
||||
|
||||
source-map-resolve@^0.6.0:
|
||||
version "0.6.0"
|
||||
resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.6.0.tgz#3d9df87e236b53f16d01e58150fc7711138e5ed2"
|
||||
integrity sha512-KXBr9d/fO/bWo97NXsPIAW1bFSBOuCnjbNTBMO7N59hsv5i9yzRDfcYwwt0l04+VqnKC+EwzvJZIP/qkuMgR/w==
|
||||
dependencies:
|
||||
atob "^2.1.2"
|
||||
decode-uri-component "^0.2.0"
|
||||
|
||||
string-width@^4.1.0, string-width@^4.2.0:
|
||||
version "4.2.3"
|
||||
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
|
||||
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
|
||||
dependencies:
|
||||
emoji-regex "^8.0.0"
|
||||
is-fullwidth-code-point "^3.0.0"
|
||||
strip-ansi "^6.0.1"
|
||||
|
||||
strip-ansi@^6.0.0, strip-ansi@^6.0.1:
|
||||
version "6.0.1"
|
||||
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
|
||||
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
|
||||
dependencies:
|
||||
ansi-regex "^5.0.1"
|
||||
|
||||
typescript@^4.9:
|
||||
version "4.9.5"
|
||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a"
|
||||
integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==
|
||||
|
||||
wrap-ansi@^7.0.0:
|
||||
version "7.0.0"
|
||||
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
|
||||
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
|
||||
dependencies:
|
||||
ansi-styles "^4.0.0"
|
||||
string-width "^4.1.0"
|
||||
strip-ansi "^6.0.0"
|
||||
|
||||
wrappy@1:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
|
||||
integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==
|
||||
|
||||
y18n@^5.0.5:
|
||||
version "5.0.8"
|
||||
resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55"
|
||||
integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==
|
||||
|
||||
yargs-parser@^20.2.2:
|
||||
version "20.2.9"
|
||||
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee"
|
||||
integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==
|
||||
|
||||
yargs@^16.2.0:
|
||||
version "16.2.0"
|
||||
resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66"
|
||||
integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==
|
||||
dependencies:
|
||||
cliui "^7.0.2"
|
||||
escalade "^3.1.1"
|
||||
get-caller-file "^2.0.5"
|
||||
require-directory "^2.1.1"
|
||||
string-width "^4.2.0"
|
||||
y18n "^5.0.5"
|
||||
yargs-parser "^20.2.2"
|
|
@ -0,0 +1,2 @@
|
|||
index.js
|
||||
index.js.map
|
|
@ -0,0 +1,32 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Syndicate: Table Example</title>
|
||||
<meta charset="utf-8">
|
||||
<script src="node_modules/@preserves/core/dist/preserves.js"></script>
|
||||
<script src="node_modules/@syndicate-lang/core/dist/syndicate.js"></script>
|
||||
<script src="node_modules/@syndicate-lang/html/dist/syndicate-html.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Table Example</h1>
|
||||
<table id="the-table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th data-column="0">ID</th>
|
||||
<th data-column="1">First Name</th>
|
||||
<th data-column="2">Last Name</th>
|
||||
<th data-column="3">Address</th>
|
||||
<th data-column="4">Age</th>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>
|
||||
Click on column headings to sort data rows.
|
||||
</p>
|
||||
<p>
|
||||
Source code: <a href="src/index.ts">index.ts</a>
|
||||
</p>
|
||||
<div id="extra"></div>
|
||||
<script src="index.js"></script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,29 @@
|
|||
{
|
||||
"name": "@syndicate-lang/syndicate-html-example-table",
|
||||
"private": true,
|
||||
"description": "Simple HTML UI Syndicate example",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"prepare": "yarn compile && yarn rollup",
|
||||
"compile": "syndicate-tsc",
|
||||
"compile:watch": "syndicate-tsc -w --verbose --intermediate-directory src.ts",
|
||||
"rollup": "rollup -c",
|
||||
"rollup:watch": "rollup -c -w",
|
||||
"clean": "rm -rf lib/ index.js index.js.map"
|
||||
},
|
||||
"author": "Tony Garnock-Jones <tonyg@leastfixedpoint.com>",
|
||||
"license": "GPL-3.0+",
|
||||
"dependencies": {
|
||||
"@preserves/core": "^0.995.200",
|
||||
"@preserves/schema": "^0.995.201",
|
||||
"@syndicate-lang/core": "*",
|
||||
"@syndicate-lang/html": "*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@syndicate-lang/ts-plugin": "*",
|
||||
"@syndicate-lang/tsc": "*",
|
||||
"rollup": "^2.60",
|
||||
"rollup-plugin-sourcemaps": "^0.6",
|
||||
"typescript": "^4.9"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
/// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
||||
|
||||
import sourcemaps from 'rollup-plugin-sourcemaps';
|
||||
|
||||
export default {
|
||||
input: 'lib/index.js',
|
||||
plugins: [sourcemaps()],
|
||||
output: {
|
||||
file: 'index.js',
|
||||
format: 'umd',
|
||||
name: 'Main',
|
||||
sourcemap: true,
|
||||
globals: {
|
||||
'@syndicate-lang/core': 'Syndicate',
|
||||
'@syndicate-lang/html': 'SyndicateHtml',
|
||||
},
|
||||
},
|
||||
};
|
|
@ -0,0 +1,60 @@
|
|||
/// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
||||
|
||||
import { Dataspace, Value, Ref } from '@syndicate-lang/core';
|
||||
import { boot as bootHtml, UIEvent, GlobalEvent, HtmlFragments, template, Anchor } from '@syndicate-lang/html';
|
||||
|
||||
assertion type Person(id, firstName, lastName, address, age);
|
||||
message type SetSortColumn(number);
|
||||
|
||||
Dataspace.boot(ds => {
|
||||
bootHtml(ds);
|
||||
at ds {
|
||||
function newRow(id: number, firstName: string, lastName: string, address: string, age: number) {
|
||||
spawn named ('model' + id) {
|
||||
assert Person(id, firstName, lastName, address, age);
|
||||
}
|
||||
}
|
||||
|
||||
newRow(1, 'Keith', 'Example', '94 Main St.', 44);
|
||||
newRow(2, 'Karen', 'Fakeperson', '5504 Long Dr.', 34);
|
||||
newRow(3, 'Angus', 'McFictional', '2B Pioneer Heights', 39);
|
||||
newRow(4, 'Sue', 'Donnem', '1 Infinite Loop', 104);
|
||||
newRow(5, 'Boaty', 'McBoatface', 'Arctic Ocean', 1);
|
||||
|
||||
spawn named 'view' {
|
||||
let ui = new Anchor();
|
||||
field orderColumn: number = 2;
|
||||
|
||||
function cell(text: Value): HtmlFragments {
|
||||
return template`<td>${text.toString()}</td>`;
|
||||
}
|
||||
|
||||
on message SetSortColumn($c: number) => orderColumn.value = c;
|
||||
|
||||
during Person($id: number, $firstName: string, $lastName: string, $address: string, $age: number) => {
|
||||
assert ui.context(id).html(
|
||||
'table#the-table tbody',
|
||||
template`<tr>${[id, firstName, lastName, address, age].map(cell)}</tr>`,
|
||||
[id, firstName, lastName, address, age][orderColumn.value]);
|
||||
}
|
||||
}
|
||||
|
||||
spawn named 'controller' {
|
||||
on message GlobalEvent('table#the-table th', 'click', $e) => {
|
||||
const event = (e as Ref).target.data as Event;
|
||||
send message SetSortColumn(JSON.parse((event.target as HTMLElement).dataset.column!));
|
||||
}
|
||||
}
|
||||
|
||||
spawn named 'alerter' {
|
||||
let ui = new Anchor();
|
||||
assert ui.html('#extra', template`<button>Click me</button>`);
|
||||
|
||||
on message UIEvent(ui.fragmentId, '.', 'click', $_e) => {
|
||||
alert("Hello!");
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"target": "ES2017",
|
||||
"lib": ["ES2017", "DOM"],
|
||||
"declaration": true,
|
||||
"baseUrl": "./src",
|
||||
"rootDir": "./src",
|
||||
"outDir": "./lib",
|
||||
"declarationDir": "./lib",
|
||||
"esModuleInterop": true,
|
||||
"moduleResolution": "node",
|
||||
"module": "es6",
|
||||
"sourceMap": true,
|
||||
"strict": true,
|
||||
"plugins": [
|
||||
{ "name": "@syndicate-lang/ts-plugin" }
|
||||
]
|
||||
},
|
||||
"include": ["src/**/*"]
|
||||
}
|