Compare commits

...

567 Commits
pr/2 ... main

Author SHA1 Message Date
Tony Garnock-Jones cbcd4b9ad9 Repair noise session introduction 2024-03-28 16:30:27 +01:00
Tony Garnock-Jones bfef60eaa9 Merge latest changes from the syndicate-protocols repository 2024-03-28 16:14:11 +01:00
Tony Garnock-Jones c59e044695 Set embeddedType for noise 2024-03-28 15:49:48 +01:00
Tony Garnock-Jones bf0d47f1b7 Repair noise protocol 2024-03-28 15:17:28 +01:00
Tony Garnock-Jones 85b2299061 Use constructor instead of ad-hoc objects for various `Ref`s 2024-03-28 12:40:25 +01:00
Tony Garnock-Jones 90aa9656ca Repair bogus ref syntax 2024-03-28 12:36:45 +01:00
Tony Garnock-Jones de596ae408 location.hash is URI-encoded 2024-03-28 12:36:28 +01:00
Tony Garnock-Jones 8ce11ddb12 More flexible `decodeStandardRoute` 2024-03-28 12:36:13 +01:00
Tony Garnock-Jones f105736694 html2 templateGenerator 2024-03-28 10:22:21 +01:00
Tony Garnock-Jones 8031eb1a17 Publish
- @syndicate-lang/browser-stdenv@0.31.2
 - @syndicate-lang/core@0.30.1
 - @syndicate-lang/create@0.23.2
 - @syndicate-lang/fs@0.31.2
 - @syndicate-lang/html@0.31.2
 - @syndicate-lang/html2@0.31.2
 - @syndicate-lang/loader@0.31.2
 - @syndicate-lang/service@0.31.2
 - @syndicate-lang/syndicatec@0.32.2
 - @syndicate-lang/timer@0.31.2
 - @syndicate-lang/ts-plugin@0.32.2
 - @syndicate-lang/tsc@0.32.2
 - @syndicate-lang/ws-relay@0.32.2
2024-03-23 11:19:07 +01:00
Tony Garnock-Jones 906717121a Bump preserves and other deps 2024-03-23 11:18:53 +01:00
Tony Garnock-Jones e0d5e86da8 Publish
- @syndicate-lang/browser-stdenv@0.31.1
 - @syndicate-lang/compiler@0.21.1
 - @syndicate-lang/fs@0.31.1
 - @syndicate-lang/html@0.31.1
 - @syndicate-lang/html2@0.31.1
 - @syndicate-lang/loader@0.31.1
 - @syndicate-lang/service@0.31.1
 - @syndicate-lang/syndicatec@0.32.1
 - @syndicate-lang/timer@0.31.1
 - @syndicate-lang/ts-plugin@0.32.1
 - @syndicate-lang/tsc@0.32.1
 - @syndicate-lang/ws-relay@0.32.1
2024-03-23 10:44:16 +01:00
Tony Garnock-Jones 2dca2c2d77 Repair span of identifier after `$` 2024-03-23 10:43:42 +01:00
Tony Garnock-Jones da97db8548 Publish
- @syndicate-lang/browser-stdenv@0.31.0
 - @syndicate-lang/core@0.30.0
 - @syndicate-lang/fs@0.31.0
 - @syndicate-lang/html@0.31.0
 - @syndicate-lang/html2@0.31.0
 - @syndicate-lang/loader@0.31.0
 - @syndicate-lang/service@0.31.0
 - @syndicate-lang/syndicatec@0.32.0
 - @syndicate-lang/timer@0.31.0
 - @syndicate-lang/ts-plugin@0.32.0
 - @syndicate-lang/tsc@0.32.0
 - @syndicate-lang/ws-relay@0.32.0
2024-03-22 20:50:07 +01:00
Tony Garnock-Jones 63b5d23391 Repair rewrite.ts attenuate() 2024-03-22 20:49:05 +01:00
Tony Garnock-Jones 036c342264 Template and rewrite-building routines in rewrite.ts 2024-03-22 12:19:02 +01:00
Tony Garnock-Jones 7797a3cd09 Updated description of gatekeeper protocol 2024-03-22 10:11:57 +01:00
Tony Garnock-Jones f5501ccb64 Publish
- @syndicate-lang/browser-stdenv@0.30.1
 - @syndicate-lang/core@0.29.1
 - @syndicate-lang/fs@0.30.1
 - @syndicate-lang/html@0.30.1
 - @syndicate-lang/html2@0.30.1
 - @syndicate-lang/loader@0.30.1
 - @syndicate-lang/service@0.30.1
 - @syndicate-lang/syndicatec@0.31.1
 - @syndicate-lang/timer@0.30.1
 - @syndicate-lang/ts-plugin@0.31.1
 - @syndicate-lang/tsc@0.31.1
 - @syndicate-lang/ws-relay@0.31.1
2024-03-21 21:58:52 +01:00
Tony Garnock-Jones 3b7543845a Repair mac() function to produce correct output width 2024-03-21 21:58:32 +01:00
Tony Garnock-Jones a25cafdabb Publish
- @syndicate-lang/browser-stdenv@0.30.0
 - @syndicate-lang/core@0.29.0
 - @syndicate-lang/fs@0.30.0
 - @syndicate-lang/html@0.30.0
 - @syndicate-lang/html2@0.30.0
 - @syndicate-lang/loader@0.30.0
 - @syndicate-lang/service@0.30.0
 - @syndicate-lang/syndicatec@0.31.0
 - @syndicate-lang/timer@0.30.0
 - @syndicate-lang/ts-plugin@0.31.0
 - @syndicate-lang/tsc@0.31.0
 - @syndicate-lang/ws-relay@0.31.0
2024-03-21 21:28:08 +01:00
Tony Garnock-Jones 291ec1805b Synchronous cryptography; convenient `mint` overload for producing a ref and a bind at once 2024-03-21 21:27:23 +01:00
Tony Garnock-Jones de2a163dee Publish
- @syndicate-lang/browser-stdenv@0.29.0
 - @syndicate-lang/compiler@0.21.0
 - @syndicate-lang/fs@0.29.3
 - @syndicate-lang/html@0.29.3
 - @syndicate-lang/html2@0.29.3
 - @syndicate-lang/loader@0.29.0
 - @syndicate-lang/service@0.29.3
 - @syndicate-lang/syndicatec@0.30.0
 - @syndicate-lang/timer@0.29.3
 - @syndicate-lang/ts-plugin@0.30.0
 - @syndicate-lang/tsc@0.30.0
 - @syndicate-lang/ws-relay@0.30.3
2024-03-21 16:08:15 +01:00
Tony Garnock-Jones 227b3e5062 Bump deps 2024-03-21 16:05:34 +01:00
Tony Garnock-Jones 1e29d528d7 Support toplevel typed binders in patterns 2024-03-21 16:04:30 +01:00
Tony Garnock-Jones 73b7759816 Allow statement boundary to include end-of-group, so long as the group is toplevel or braces 2024-03-21 16:04:03 +01:00
Tony Garnock-Jones 658f324e76 Publish
- @syndicate-lang/browser-stdenv@0.28.2
 - @syndicate-lang/core@0.28.2
 - @syndicate-lang/fs@0.29.2
 - @syndicate-lang/html@0.29.2
 - @syndicate-lang/html2@0.29.2
 - @syndicate-lang/loader@0.28.2
 - @syndicate-lang/service@0.29.2
 - @syndicate-lang/syndicatec@0.29.2
 - @syndicate-lang/timer@0.29.2
 - @syndicate-lang/ts-plugin@0.29.2
 - @syndicate-lang/tsc@0.29.2
 - @syndicate-lang/ws-relay@0.30.2
2024-03-19 20:36:29 +01:00
Tony Garnock-Jones 0f13f2b238 Reset noise state when server retracts and reasserts session 2024-03-19 20:35:54 +01:00
Tony Garnock-Jones 140dc240c8 Export Field from @syndicate-lang/core 2024-03-19 20:35:20 +01:00
Tony Garnock-Jones 2abb541aba Publish
- @syndicate-lang/browser-stdenv@0.28.1
 - @syndicate-lang/core@0.28.1
 - @syndicate-lang/create@0.23.1
 - @syndicate-lang/fs@0.29.1
 - @syndicate-lang/html@0.29.1
 - @syndicate-lang/html2@0.29.1
 - @syndicate-lang/loader@0.28.1
 - @syndicate-lang/service@0.29.1
 - @syndicate-lang/syndicatec@0.29.1
 - @syndicate-lang/timer@0.29.1
 - @syndicate-lang/ts-plugin@0.29.1
 - @syndicate-lang/tsc@0.29.1
 - @syndicate-lang/ws-relay@0.30.1
2024-03-16 17:49:05 +01:00
Tony Garnock-Jones 44d0d030cc Fix preserves dep 2024-03-16 17:48:46 +01:00
Tony Garnock-Jones 772a46b093 Publish
- @syndicate-lang/browser-stdenv@0.28.0
 - @syndicate-lang/core@0.28.0
 - @syndicate-lang/fs@0.29.0
 - @syndicate-lang/html@0.29.0
 - @syndicate-lang/html2@0.29.0
 - @syndicate-lang/loader@0.28.0
 - @syndicate-lang/service@0.29.0
 - @syndicate-lang/syndicatec@0.29.0
 - @syndicate-lang/timer@0.29.0
 - @syndicate-lang/ts-plugin@0.29.0
 - @syndicate-lang/tsc@0.29.0
 - @syndicate-lang/ws-relay@0.30.0
2024-03-16 17:44:04 +01:00
Tony Garnock-Jones 1958e4ec49 Refactor Relay while puzzling over sessions 2024-03-16 17:42:54 +01:00
Tony Garnock-Jones 300e15b674 Cosmetic 2024-03-16 17:41:45 +01:00
Tony Garnock-Jones 40f5ef4085 Replace boundary structure to preserve embedded value separation 2024-03-12 22:56:01 +01:00
Tony Garnock-Jones 9521fc3dcc Switch to directly-represented embedded values 2024-03-12 21:38:49 +01:00
Tony Garnock-Jones f5ed511c4e Publish
- @syndicate-lang/create@0.23.0
2024-03-10 14:51:02 +01:00
Tony Garnock-Jones 61997473a3 Dust off the @syndicate-lang/create template 2024-03-10 14:50:28 +01:00
Tony Garnock-Jones 502c0fd286 Publish
- @syndicate-lang/browser-stdenv@0.27.1
 - @syndicate-lang/compiler@0.20.1
 - @syndicate-lang/core@0.27.1
 - @syndicate-lang/fs@0.28.1
 - @syndicate-lang/html@0.28.1
 - @syndicate-lang/html2@0.28.1
 - @syndicate-lang/loader@0.27.1
 - @syndicate-lang/service@0.28.1
 - @syndicate-lang/syndicatec@0.28.1
 - @syndicate-lang/timer@0.28.1
 - @syndicate-lang/ts-plugin@0.28.1
 - @syndicate-lang/tsc@0.28.1
 - @syndicate-lang/ws-relay@0.29.1
2024-03-10 14:26:48 +01:00
Tony Garnock-Jones be74496012 Prettifier to make compiler tests easier to read and write 2024-03-10 14:26:04 +01:00
Tony Garnock-Jones 888b3be291 Check for and prevent cross-actor facet termination 2024-03-10 12:47:05 +01:00
Tony Garnock-Jones ce598e6954 The typescript code compilation process depends on @preserves/schema. 2024-03-09 23:50:05 +01:00
Tony Garnock-Jones f31262a805 Bump deps for remaining examples 2024-03-09 23:35:32 +01:00
Tony Garnock-Jones 4a49c0e6e8 Bump deps of example-simple-chat 2024-03-09 23:31:12 +01:00
Tony Garnock-Jones 5773918b71 Bump deps of syndicate-html-example-table 2024-03-09 23:26:47 +01:00
Tony Garnock-Jones 881b92b8aa Bump deps of flappy-bird example 2024-03-09 23:24:38 +01:00
Tony Garnock-Jones 23dde45295 Publish
- @syndicate-lang/browser-stdenv@0.27.0
 - @syndicate-lang/compiler@0.20.0
 - @syndicate-lang/core@0.27.0
 - @syndicate-lang/fs@0.28.0
 - @syndicate-lang/html@0.28.0
 - @syndicate-lang/html2@0.28.0
 - @syndicate-lang/loader@0.27.0
 - @syndicate-lang/service@0.28.0
 - @syndicate-lang/syndicatec@0.28.0
 - @syndicate-lang/timer@0.28.0
 - @syndicate-lang/ts-plugin@0.28.0
 - @syndicate-lang/tsc@0.28.0
 - @syndicate-lang/ws-relay@0.29.0
2024-03-09 23:15:06 +01:00
Tony Garnock-Jones de282f539a Repair clean targets 2024-03-09 23:12:27 +01:00
Tony Garnock-Jones 60a5c2fdee Update flappy-bird example 2024-03-09 23:06:43 +01:00
Tony Garnock-Jones 31f11d2389 Correct usages of `stop` to conform to new semantics 2024-03-09 23:06:00 +01:00
Tony Garnock-Jones 2bcffd3bab Require explicit facet in Turn.stop 2024-03-09 23:05:40 +01:00
Tony Garnock-Jones b4d728ca7a Change `stop` to refer to a lexical facet, not a dynamic facet.
The previous behaviour of `stop` was inappropriate: it always stopped
`Syndicate.Turn.activeFacet`, which is an instance of dynamic binding.

Now, it instead stops the unique lexically-innermost lexically-apparent
facet - the special name `currentSyndicateFacet` - by default. It is an
error if no such facet is lexically apparent (if `currentSyndicateFacet` is
unbound). This makes it similar to `break` and `continue` in structured
programming.

In addition, an expression denoting a facet can now be used with `stop` to
override this default - again, like `break` and `continue` in some
languages.

Finally, `react` can now be preceded by a label, which binds the label as a
variable denoting the newly-created facet (inside the facet's scope).
2024-03-09 23:04:29 +01:00
Tony Garnock-Jones 644891ce76 Compiler test infrastructure 2024-03-09 22:52:09 +01:00
Tony Garnock-Jones 4843c76784 Remove unused import 2024-03-09 11:23:37 +01:00
Tony Garnock-Jones 4c8796b6c9 Allow use of `id` attribute on in-browser script tags to propagate to compilation output 2024-03-09 11:22:10 +01:00
Tony Garnock-Jones 306d542600 Publish
- @syndicate-lang/browser-stdenv@0.26.3
 - @syndicate-lang/core@0.26.2
 - @syndicate-lang/create@0.22.1
 - @syndicate-lang/fs@0.27.2
 - @syndicate-lang/html@0.27.2
 - @syndicate-lang/html2@0.27.3
 - @syndicate-lang/loader@0.26.2
 - @syndicate-lang/service@0.27.2
 - @syndicate-lang/syndicatec@0.27.2
 - @syndicate-lang/timer@0.27.2
 - @syndicate-lang/ts-plugin@0.27.2
 - @syndicate-lang/tsc@0.27.2
 - @syndicate-lang/ws-relay@0.28.2
2024-03-08 15:48:36 +01:00
Tony Garnock-Jones 2f4f2e4708 Bump preserves-schema to 0.995.1 2024-03-08 15:48:11 +01:00
Tony Garnock-Jones d79dd51d14 Publish
- @syndicate-lang/browser-stdenv@0.26.2
 - @syndicate-lang/html2@0.27.2
2024-03-08 12:12:06 +01:00
Tony Garnock-Jones ab353b525b Remove node on actor crashes 2024-03-08 12:11:45 +01:00
Tony Garnock-Jones 1dab59bef4 Publish
- @syndicate-lang/browser-stdenv@0.26.1
 - @syndicate-lang/core@0.26.1
 - @syndicate-lang/fs@0.27.1
 - @syndicate-lang/html@0.27.1
 - @syndicate-lang/html2@0.27.1
 - @syndicate-lang/loader@0.26.1
 - @syndicate-lang/service@0.27.1
 - @syndicate-lang/syndicatec@0.27.1
 - @syndicate-lang/timer@0.27.1
 - @syndicate-lang/ts-plugin@0.27.1
 - @syndicate-lang/tsc@0.27.1
 - @syndicate-lang/ws-relay@0.28.1
2024-03-08 12:06:01 +01:00
Tony Garnock-Jones c73d4df2f2 Alter atExit to yield callback for removing the hook 2024-03-08 12:05:17 +01:00
Tony Garnock-Jones 0a0e8050cb Publish
- @syndicate-lang/browser-stdenv@0.26.0
 - @syndicate-lang/core@0.26.0
 - @syndicate-lang/create@0.22.0
 - @syndicate-lang/fs@0.27.0
 - @syndicate-lang/html@0.27.0
 - @syndicate-lang/html2@0.27.0
 - @syndicate-lang/loader@0.26.0
 - @syndicate-lang/service@0.27.0
 - @syndicate-lang/syndicatec@0.27.0
 - @syndicate-lang/timer@0.27.0
 - @syndicate-lang/ts-plugin@0.27.0
 - @syndicate-lang/tsc@0.27.0
 - @syndicate-lang/ws-relay@0.28.0
2024-03-08 10:27:19 +01:00
Tony Garnock-Jones 7eecee1122 Bump preserves 2024-03-08 10:26:13 +01:00
Tony Garnock-Jones 7e0b6dc33a Publish
- @syndicate-lang/browser-stdenv@0.25.0
 - @syndicate-lang/core@0.25.0
 - @syndicate-lang/create@0.21.0
 - @syndicate-lang/fs@0.26.0
 - @syndicate-lang/html@0.26.0
 - @syndicate-lang/html2@0.26.0
 - @syndicate-lang/loader@0.25.0
 - @syndicate-lang/service@0.26.0
 - @syndicate-lang/syndicatec@0.26.0
 - @syndicate-lang/timer@0.26.0
 - @syndicate-lang/ts-plugin@0.26.0
 - @syndicate-lang/tsc@0.26.0
 - @syndicate-lang/ws-relay@0.27.0
2024-02-05 23:24:53 +01:00
Tony Garnock-Jones cdbb1b4c24 Update to Preserves 0.994 2024-02-05 23:24:14 +01:00
Tony Garnock-Jones 87c3b211d8 Merge latest changes from the syndicate-protocols repository 2024-02-05 23:14:41 +01:00
Tony Garnock-Jones 9864ce0ec8 Switch `#!` to `#:` 2024-02-05 23:14:19 +01:00
Tony Garnock-Jones 501d5e578e Publish
- @syndicate-lang/browser-stdenv@0.24.0
 - @syndicate-lang/compiler@0.19.0
 - @syndicate-lang/core@0.24.0
 - @syndicate-lang/create@0.20.0
 - @syndicate-lang/fs@0.25.0
 - @syndicate-lang/html@0.25.0
 - @syndicate-lang/html2@0.25.0
 - @syndicate-lang/loader@0.24.0
 - @syndicate-lang/service@0.25.0
 - @syndicate-lang/syndicatec@0.25.0
 - @syndicate-lang/timer@0.25.0
 - @syndicate-lang/ts-plugin@0.25.0
 - @syndicate-lang/tsc@0.25.0
 - @syndicate-lang/ws-relay@0.26.0
2024-02-03 16:00:24 +01:00
Tony Garnock-Jones c9a52ebe39 New year 2024-02-03 15:59:22 +01:00
Tony Garnock-Jones 85cfabf63d Integrate preserves 0.993 2024-02-03 15:58:35 +01:00
Tony Garnock-Jones 2af79302c7 Merge latest changes from the syndicate-protocols repository 2024-02-03 15:54:11 +01:00
Tony Garnock-Jones 5dd68e87c1 Preserves 0.993 lacks float 2024-02-03 15:16:23 +01:00
Tony Garnock-Jones 794837f403 Allow trigger on input as well as change events 2024-01-07 13:02:45 +01:00
Tony Garnock-Jones 10cb9c1b34 Support use with existing nodes 2024-01-07 13:02:30 +01:00
Tony Garnock-Jones c9aab425fe Facet.wrap 2024-01-07 13:02:01 +01:00
Tony Garnock-Jones 46bafa9501 Remove sometimes-inappropriate error recovery on unexpected semicolon. Closes #5 2023-12-31 18:14:14 +01:00
Tony Garnock-Jones 3904c626c9 Repair Dataspace.retract() cleanup of handleMap (!) 2023-12-28 17:45:36 +13:00
Tony Garnock-Jones e2e72467cd Don't run external turns when space is paused 2023-12-21 14:13:45 +13:00
Tony Garnock-Jones 4e1475a176 SyndicateBrowserStdenv.autoboot_options 2023-12-21 12:03:49 +13:00
Tony Garnock-Jones 0a8975a2f6 once asserted ..., once message ..., etc 2023-12-21 10:30:23 +13:00
Tony Garnock-Jones 044ccad37c Export SaltyCrypto 2023-12-21 09:44:16 +13:00
Tony Garnock-Jones 8b5486abd8 Give the global dataspace actor a reasonable name 2023-12-20 21:39:07 +13:00
Tony Garnock-Jones 86066a0cd8 Publish
- @syndicate-lang/browser-stdenv@0.23.3
 - @syndicate-lang/html2@0.24.2
2023-12-20 21:31:02 +13:00
Tony Garnock-Jones ccb939be19 Repair multi-attribute template position 2023-12-20 21:29:42 +13:00
Tony Garnock-Jones 672c82ac64 Publish
- @syndicate-lang/browser-stdenv@0.23.2
2023-12-20 20:51:55 +13:00
Tony Garnock-Jones 814e78727e main entry 2023-12-20 20:51:20 +13:00
Tony Garnock-Jones 3b970e058c Publish
- @syndicate-lang/browser-stdenv@0.23.1
 - @syndicate-lang/html2@0.24.1
2023-12-20 20:44:01 +13:00
Tony Garnock-Jones 0422cafc11 Tweaks for stdenv 2023-12-20 20:41:54 +13:00
Tony Garnock-Jones cc0a023751 Publish
- @syndicate-lang/browser-stdenv@0.23.0
 - @syndicate-lang/compiler@0.18.0
 - @syndicate-lang/core@0.23.0
 - @syndicate-lang/create@0.19.0
 - @syndicate-lang/fs@0.24.0
 - @syndicate-lang/html@0.24.0
 - @syndicate-lang/html2@0.24.0
 - @syndicate-lang/loader@0.23.0
 - @syndicate-lang/service@0.24.0
 - @syndicate-lang/syndicatec@0.24.0
 - @syndicate-lang/timer@0.24.0
 - @syndicate-lang/ts-plugin@0.24.0
 - @syndicate-lang/tsc@0.24.0
 - @syndicate-lang/ws-relay@0.25.0
2023-12-20 20:12:32 +13:00
Tony Garnock-Jones aeaacbafab @syndicate-lang/browser-stdenv 2023-12-20 20:08:10 +13:00
Tony Garnock-Jones 8b2434a3bf Bump 2023-12-20 20:02:16 +13:00
Tony Garnock-Jones f2f3220229 Include service in loader. Closes #4 2023-12-20 19:42:29 +13:00
Tony Garnock-Jones 9859daee9b Merge latest changes from the syndicate-protocols repository 2023-12-19 21:44:48 +13:00
Tony Garnock-Jones 97876335ba Save a few bytes on the wire. If not now, never I guess 2023-12-19 21:37:41 +13:00
Tony Garnock-Jones 4d0cc4b2f7 Deduplicate subject updates. Fixes #3. 2023-12-18 10:32:37 +13:00
Tony Garnock-Jones 3617582d37 Quasi-cosmetic: update imports (e.g. to allow jest to run) 2023-12-18 10:31:56 +13:00
Tony Garnock-Jones 1c3df03153 Use new fixcopyright ignore feature 2023-12-18 10:30:38 +13:00
Tony Garnock-Jones 56ac38f7e4 Dust off (some of) the core tests 2023-12-18 10:07:46 +13:00
Tony Garnock-Jones 919ee891f6 Ergonomics: admit JS property-name syntax in PDict patterns 2023-12-17 22:12:27 +13:00
Tony Garnock-Jones 34f1617a62 Cosmetic 2023-12-17 08:39:28 +01:00
Tony Garnock-Jones 83c81f894a Upgrade preserves to 0.992.4 2023-12-17 08:27:09 +01:00
Tony Garnock-Jones 062046c2b7 @syndicate-lang/loader 2023-12-11 06:54:01 +13:00
Tony Garnock-Jones d60e923abe stdenv support 2023-12-04 23:10:00 +01:00
Tony Garnock-Jones 61094bc0e1 Merge latest changes from the syndicate-protocols repository 2023-12-04 22:25:53 +01:00
Tony Garnock-Jones d7b330e6dd stdenv.prs 2023-12-04 22:25:40 +01:00
Tony Garnock-Jones be6dbd2782 Quasi-cosmetic 2023-12-03 23:40:36 +01:00
Tony Garnock-Jones 0e26a8cd9f Hoist actions 2023-12-03 23:30:52 +01:00
Tony Garnock-Jones b336faff25 Tidy up 2023-12-03 23:22:51 +01:00
Tony Garnock-Jones a9ea553ca1 Improved DOM node damage repair 2023-12-03 23:09:18 +01:00
Tony Garnock-Jones 208af3ebb6 Terser 2023-12-03 23:06:54 +01:00
Tony Garnock-Jones 2f34cfa588 suppressCycleWarning 2023-12-03 23:05:49 +01:00
Tony Garnock-Jones 4903bc5149 Allow prettier display of dataflow cyclic dependencies 2023-12-03 22:35:47 +01:00
Tony Garnock-Jones 9197d7ef3a Experimental ValueWidget 2023-12-03 12:29:17 +01:00
Tony Garnock-Jones 24a75e935a Allow specification of base for selector 2023-12-02 19:35:47 +01:00
Tony Garnock-Jones ae2c113325 Error check in case of multiple nodes generated 2023-12-02 19:35:36 +01:00
Tony Garnock-Jones cfd2b69943 Publish
- @syndicate-lang/html2@0.23.1
2023-12-01 23:56:54 +01:00
Tony Garnock-Jones 3445f3f014 Preserve focus across node replacements 2023-12-01 23:56:32 +01:00
Tony Garnock-Jones b013dd1979 @syndicate-lang/html2 2023-12-01 23:30:50 +01:00
Tony Garnock-Jones f83dddd4fd Publish
- @syndicate-lang/compiler@0.17.0
 - @syndicate-lang/core@0.22.0
 - @syndicate-lang/fs@0.23.0
 - @syndicate-lang/html@0.23.0
 - @syndicate-lang/service@0.23.0
 - @syndicate-lang/syndicatec@0.23.0
 - @syndicate-lang/timer@0.23.0
 - @syndicate-lang/ts-plugin@0.23.0
 - @syndicate-lang/tsc@0.23.0
 - @syndicate-lang/ws-relay@0.24.0
2023-12-01 21:09:40 +01:00
Tony Garnock-Jones cb0c45a45b Default to global dataspace as target when using browser-compiler 2023-12-01 21:08:17 +01:00
Tony Garnock-Jones ed605718e5 Global Dataspace and ActorSpace available 2023-12-01 20:53:18 +01:00
Tony Garnock-Jones 1979a439f8 Publish
- @syndicate-lang/compiler@0.16.0
 - @syndicate-lang/core@0.21.0
 - @syndicate-lang/fs@0.22.0
 - @syndicate-lang/html@0.22.0
 - @syndicate-lang/service@0.22.0
 - @syndicate-lang/syndicatec@0.22.0
 - @syndicate-lang/timer@0.22.0
 - @syndicate-lang/ts-plugin@0.22.0
 - @syndicate-lang/tsc@0.22.0
 - @syndicate-lang/ws-relay@0.23.0
2023-12-01 15:06:23 +01:00
Tony Garnock-Jones 2671033b07 Allow booting an actor into an existing ActorSpace 2023-12-01 15:03:32 +01:00
Tony Garnock-Jones c6eef34736 ES6 modules in the browser 2023-12-01 15:02:35 +01:00
Tony Garnock-Jones 5ffc647997 Publish
- @syndicate-lang/compiler@0.15.0
 - @syndicate-lang/fs@0.21.1
 - @syndicate-lang/html@0.21.1
 - @syndicate-lang/service@0.21.1
 - @syndicate-lang/syndicatec@0.21.1
 - @syndicate-lang/timer@0.21.1
 - @syndicate-lang/ts-plugin@0.21.1
 - @syndicate-lang/tsc@0.21.1
 - @syndicate-lang/ws-relay@0.22.1
2023-12-01 12:42:37 +01:00
Tony Garnock-Jones 6ded2c2050 syndicate-browser-compiler.js 2023-12-01 12:42:17 +01:00
Tony Garnock-Jones f0026d9688 Publish
- @syndicate-lang/compiler@0.14.0
 - @syndicate-lang/fs@0.21.0
 - @syndicate-lang/html@0.21.0
 - @syndicate-lang/service@0.21.0
 - @syndicate-lang/syndicatec@0.21.0
 - @syndicate-lang/timer@0.21.0
 - @syndicate-lang/ts-plugin@0.21.0
 - @syndicate-lang/tsc@0.21.0
 - @syndicate-lang/ws-relay@0.22.0
2023-12-01 12:24:09 +01:00
Tony Garnock-Jones 939004264a Add ModuleType `none` 2023-12-01 12:23:35 +01:00
Tony Garnock-Jones 0f9c200583 Publish
- @syndicate-lang/core@0.20.1
 - @syndicate-lang/fs@0.20.1
 - @syndicate-lang/html@0.20.1
 - @syndicate-lang/service@0.20.1
 - @syndicate-lang/syndicatec@0.20.1
 - @syndicate-lang/timer@0.20.1
 - @syndicate-lang/ts-plugin@0.20.1
 - @syndicate-lang/tsc@0.20.1
 - @syndicate-lang/ws-relay@0.21.1
2023-12-01 11:45:17 +01:00
Tony Garnock-Jones a7f21f140e Adjust rollup config for peer dep on preserves 2023-12-01 11:44:01 +01:00
Tony Garnock-Jones 2068531000 Publish
- @syndicate-lang/core@0.20.0
 - @syndicate-lang/create@0.18.0
 - @syndicate-lang/fs@0.20.0
 - @syndicate-lang/html@0.20.0
 - @syndicate-lang/service@0.20.0
 - @syndicate-lang/syndicatec@0.20.0
 - @syndicate-lang/timer@0.20.0
 - @syndicate-lang/ts-plugin@0.20.0
 - @syndicate-lang/tsc@0.20.0
 - @syndicate-lang/ws-relay@0.21.0
2023-12-01 09:23:17 +01:00
Tony Garnock-Jones 2c065b6a50 Switch to peer dependency on @preserves/core 2023-12-01 09:20:20 +01:00
Tony Garnock-Jones 36202092ca Bump deps 2023-11-26 00:05:58 +01:00
Tony Garnock-Jones f58dce5bdc Fix comment syntax 2023-11-24 13:08:24 +01:00
Tony Garnock-Jones 6ab19dcc6e Bump deps 2023-11-24 12:58:21 +01:00
Tony Garnock-Jones 2c69e270db Publish
- @syndicate-lang/core@0.19.1
 - @syndicate-lang/create@0.17.1
 - @syndicate-lang/fs@0.19.1
 - @syndicate-lang/html@0.19.1
 - @syndicate-lang/service@0.19.1
 - @syndicate-lang/syndicatec@0.19.1
 - @syndicate-lang/timer@0.19.1
 - @syndicate-lang/ts-plugin@0.19.1
 - @syndicate-lang/tsc@0.19.1
 - @syndicate-lang/ws-relay@0.20.1
2023-11-19 21:35:41 +01:00
Tony Garnock-Jones bd5af85c78 Cosmetic: remove unneeded import 2023-11-19 21:35:02 +01:00
Tony Garnock-Jones 00727cb65a Upgrade preserves dep 2023-11-19 21:27:17 +01:00
Tony Garnock-Jones 1955298ba0 Improve README slightly 2023-11-17 14:12:14 +01:00
Tony Garnock-Jones 8f30b198a7 Publish
- @syndicate-lang/core@0.19.0
 - @syndicate-lang/create@0.17.0
 - @syndicate-lang/fs@0.19.0
 - @syndicate-lang/html@0.19.0
 - @syndicate-lang/service@0.19.0
 - @syndicate-lang/syndicatec@0.19.0
 - @syndicate-lang/timer@0.19.0
 - @syndicate-lang/ts-plugin@0.19.0
 - @syndicate-lang/tsc@0.19.0
 - @syndicate-lang/ws-relay@0.20.0
2023-10-31 22:06:59 +01:00
Tony Garnock-Jones c488d6d75a Update preserves dependency to 0.991 2023-10-31 22:06:08 +01:00
Tony Garnock-Jones e026f42452 Merge latest changes from the syndicate-protocols repository 2023-10-31 21:57:25 +01:00
Tony Garnock-Jones fe9ceaf65c Update comment syntax for Preserves 0.991 2023-10-31 21:56:44 +01:00
Tony Garnock-Jones 0dfa34f209 Update examples 2023-10-19 02:56:27 +02:00
Tony Garnock-Jones 8bc7285747 Publish
- @syndicate-lang/html@0.18.2
 - @syndicate-lang/syndicatec@0.18.2
2023-10-19 02:43:19 +02:00
Tony Garnock-Jones 3d695954b7 Remove unneeded dependency 2023-10-19 02:43:06 +02:00
Tony Garnock-Jones 4c2f7e01c6 Repair syndicatec compilation 2023-10-19 02:40:35 +02:00
Tony Garnock-Jones 98fb03bc79 Publish
- @syndicate-lang/core@0.18.1
 - @syndicate-lang/create@0.16.1
 - @syndicate-lang/fs@0.18.1
 - @syndicate-lang/html@0.18.1
 - @syndicate-lang/service@0.18.1
 - @syndicate-lang/syndicatec@0.18.1
 - @syndicate-lang/timer@0.18.1
 - @syndicate-lang/ts-plugin@0.18.1
 - @syndicate-lang/tsc@0.18.1
 - @syndicate-lang/ws-relay@0.19.1
2023-10-19 02:33:52 +02:00
Tony Garnock-Jones 6caf35f20e Update to @preserves/schema and @preserves/schema-cli 2023-10-19 02:33:00 +02:00
Tony Garnock-Jones f6a35a6d4d Update examples 2023-10-18 14:55:57 +02:00
Tony Garnock-Jones a2f36d94d0 Publish
- @syndicate-lang/core@0.18.0
 - @syndicate-lang/create@0.16.0
 - @syndicate-lang/fs@0.18.0
 - @syndicate-lang/html@0.18.0
 - @syndicate-lang/service@0.18.0
 - @syndicate-lang/syndicatec@0.18.0
 - @syndicate-lang/timer@0.18.0
 - @syndicate-lang/ts-plugin@0.18.0
 - @syndicate-lang/tsc@0.18.0
 - @syndicate-lang/ws-relay@0.19.0
2023-10-18 14:16:35 +02:00
Tony Garnock-Jones d076761f87 How did these sneak in? 2023-10-18 14:15:41 +02:00
Tony Garnock-Jones 836d06aca2 Update preserves 2023-10-18 14:14:40 +02:00
Tony Garnock-Jones f698b8cdb3 Merge latest changes from the syndicate-protocols repository 2023-10-18 14:04:31 +02:00
Tony Garnock-Jones 72566ac223 Update for Preserves 0.990 2023-10-18 14:02:28 +02:00
Tony Garnock-Jones cd2d710692 Repair resolving of longer chains when reconnects happen 2023-10-11 21:03:43 +02:00
Tony Garnock-Jones c8fc52a685 Terser logging 2023-10-11 21:03:21 +02:00
Tony Garnock-Jones 5338890e76 Publish
- @syndicate-lang/core@0.17.1
 - @syndicate-lang/create@0.15.1
 - @syndicate-lang/fs@0.17.1
 - @syndicate-lang/html@0.17.1
 - @syndicate-lang/service@0.17.1
 - @syndicate-lang/syndicatec@0.17.1
 - @syndicate-lang/timer@0.17.1
 - @syndicate-lang/ts-plugin@0.17.2
 - @syndicate-lang/tsc@0.17.2
 - @syndicate-lang/ws-relay@0.18.1
2023-10-02 21:07:55 +02:00
Tony Garnock-Jones 93bc596f37 Remove unused import 2023-10-02 21:05:36 +02:00
Tony Garnock-Jones bfd1f13c19 Bump preserves dep 2023-10-02 21:05:27 +02:00
Tony Garnock-Jones 54e9633791 Publish
- @syndicate-lang/ws-relay@0.18.0
2023-09-29 19:38:52 +02:00
Tony Garnock-Jones 06bf888bd8 Allow supply of WebSocket constructor 2023-09-29 19:31:43 +02:00
Tony Garnock-Jones 2dc7fc3e9c Publish
- @syndicate-lang/core@0.17.0
 - @syndicate-lang/fs@0.17.0
 - @syndicate-lang/html@0.17.0
 - @syndicate-lang/service@0.17.0
 - @syndicate-lang/syndicatec@0.17.0
 - @syndicate-lang/timer@0.17.0
 - @syndicate-lang/ts-plugin@0.17.1
 - @syndicate-lang/tsc@0.17.1
 - @syndicate-lang/ws-relay@0.17.0
2023-06-16 21:32:46 +02:00
Tony Garnock-Jones 28dee5f098 Store the whole assertion when crossSpace 2023-06-16 21:31:51 +02:00
Tony Garnock-Jones da29412e91 Update example-simple-chat 2023-06-16 13:10:58 +02:00
Tony Garnock-Jones 6afa4ba87f Publish
- @syndicate-lang/core@0.16.0
 - @syndicate-lang/create@0.15.0
 - @syndicate-lang/fs@0.16.0
 - @syndicate-lang/html@0.16.0
 - @syndicate-lang/service@0.16.0
 - @syndicate-lang/syndicatec@0.16.0
 - @syndicate-lang/timer@0.16.0
 - @syndicate-lang/ts-plugin@0.17.0
 - @syndicate-lang/tsc@0.17.0
 - @syndicate-lang/ws-relay@0.16.0
2023-06-16 13:05:41 +02:00
Tony Garnock-Jones b4a54d6f94 Track inbound/outbound assertions across spaces 2023-06-16 13:02:34 +02:00
Tony Garnock-Jones 0533b3fd0f Expose queuedTasks 2023-06-01 23:27:44 +02:00
Tony Garnock-Jones 1de1e9d382 DataspaceObserver, for reflection 2023-05-28 12:25:44 +02:00
Tony Garnock-Jones 7b8526dfcf Facet.idChainValues 2023-05-28 12:24:28 +02:00
Tony Garnock-Jones 2a2b7da4bc Switch to proper schema 2023-05-28 12:03:45 +02:00
Tony Garnock-Jones 021fdf06bb Remove unneeded spawningFacet field; mark StopOnRetract entities 2023-05-28 11:38:05 +02:00
Tony Garnock-Jones 39fb9cb92e Task descriptions 2023-05-28 11:18:29 +02:00
Tony Garnock-Jones d55e322a0e Expose Dataspace value in Entity's data field 2023-05-25 23:46:29 +02:00
Tony Garnock-Jones 818f35c471 Introduce ActorSpace 2023-05-19 14:58:42 +02:00
Tony Garnock-Jones 70f1289057 Publish
- @syndicate-lang/core@0.15.1
 - @syndicate-lang/create@0.14.2
 - @syndicate-lang/fs@0.15.2
 - @syndicate-lang/html@0.15.2
 - @syndicate-lang/service@0.15.2
 - @syndicate-lang/syndicatec@0.15.1
 - @syndicate-lang/timer@0.15.2
 - @syndicate-lang/ts-plugin@0.16.2
 - @syndicate-lang/tsc@0.16.1
 - @syndicate-lang/ws-relay@0.15.2
2023-05-12 11:33:15 +02:00
Tony Garnock-Jones 7b2ea2aae9 Bump preserves version, other deps 2023-05-12 11:32:17 +02:00
Tony Garnock-Jones 3a78f6c46c Publish
- @syndicate-lang/fs@0.15.1
 - @syndicate-lang/html@0.15.1
 - @syndicate-lang/service@0.15.1
 - @syndicate-lang/timer@0.15.1
 - @syndicate-lang/ts-plugin@0.16.1
 - @syndicate-lang/ws-relay@0.15.1
2023-05-05 13:56:27 +02:00
Tony Garnock-Jones aafb654687 Try harder to be incremental in editContent 2023-05-03 18:20:26 +03:00
Tony Garnock-Jones 1f72baf3ad Log expansion delay 2023-05-03 18:19:48 +03:00
Tony Garnock-Jones 9cf00720f8 Publish
- @syndicate-lang/core@0.15.0
 - @syndicate-lang/fs@0.15.0
 - @syndicate-lang/html@0.15.0
 - @syndicate-lang/service@0.15.0
 - @syndicate-lang/syndicatec@0.15.0
 - @syndicate-lang/timer@0.15.0
 - @syndicate-lang/ts-plugin@0.16.0
 - @syndicate-lang/tsc@0.16.0
 - @syndicate-lang/ws-relay@0.15.0
2023-05-02 16:26:30 +03:00
Tony Garnock-Jones b2084c4d1d Factor out different kinds of IndexObserver 2023-05-02 16:19:38 +03:00
Tony Garnock-Jones 998c4442c9 Publish
- @syndicate-lang/fs@0.14.7
 - @syndicate-lang/html@0.14.7
 - @syndicate-lang/service@0.14.7
 - @syndicate-lang/timer@0.14.7
 - @syndicate-lang/ts-plugin@0.15.3
 - @syndicate-lang/ws-relay@0.14.7
2023-05-02 13:10:59 +03:00
Tony Garnock-Jones a0f87bf687 Monkeypatch ScriptInfo instead of subclassing-and-replacing.
This means we can ditch the whole approach of trying to remove
stale ScriptInfo instances at plugin startup, instead just
endowing existing ones with new behaviour.

This repairs an error where renaming an identifer would perform
spurious edits.
2023-05-02 12:57:22 +03:00
Tony Garnock-Jones 2eb7045b5c Publish
- @syndicate-lang/fs@0.14.6
 - @syndicate-lang/html@0.14.6
 - @syndicate-lang/service@0.14.6
 - @syndicate-lang/timer@0.14.6
 - @syndicate-lang/ts-plugin@0.15.2
 - @syndicate-lang/ws-relay@0.14.6
2023-04-29 09:42:12 +02:00
Tony Garnock-Jones 1008d6acca Update ts-plugin README 2023-04-28 10:38:35 +02:00
Tony Garnock-Jones 075893fc85 Fix up a few of the more egregious problems with the plugin.
TypeScript has been moving on while the plugin has been staying still, and
that has caused the plugin to stop working well. This patch gets things
back into somewhat workable state, but I'm sure more will be required.

Changes include:

 - `hookHost` is no longer required: instead, we hook ts.createSourceFile.

 - `shouldExpand` abstracts away details of whether a file is considered
   Syndicateish or not.

 - The code that does the Syndicate expansion has been abstracted out of
   the detail of how expansion is invoked by the language server.

 - I've had to monkey-patch ScriptInfo in order to get access to the
   `editContent` method.

 - As a consequence, at plugin startup, we invalidate existing ScriptInfo
   instances so they are rebuilt with our SyndicateScriptInfo constructor.
2023-04-28 10:32:49 +02:00
Tony Garnock-Jones 3384acbd62 Cosmetic 2023-04-28 10:23:57 +02:00
Tony Garnock-Jones abaf23920b Upgrade typescript-language-server to 3.3.2 2023-04-28 10:20:10 +02:00
Tony Garnock-Jones 40844d2806 Publish
- @syndicate-lang/compiler@0.13.2
 - @syndicate-lang/core@0.14.2
 - @syndicate-lang/fs@0.14.5
 - @syndicate-lang/html@0.14.5
 - @syndicate-lang/service@0.14.5
 - @syndicate-lang/syndicatec@0.14.2
 - @syndicate-lang/timer@0.14.5
 - @syndicate-lang/ts-plugin@0.15.1
 - @syndicate-lang/tsc@0.15.2
 - @syndicate-lang/ws-relay@0.14.5
2023-03-06 23:27:14 +01:00
Tony Garnock-Jones cbcb692db8 Allow fully-discard constructor parameter dicts 2023-03-06 23:26:34 +01:00
Tony Garnock-Jones 545282be32 Repair nested-binder-patterns 2023-03-06 23:26:15 +01:00
Tony Garnock-Jones 44d7d16a82 Publish
- @syndicate-lang/fs@0.14.4
 - @syndicate-lang/html@0.14.4
 - @syndicate-lang/service@0.14.4
 - @syndicate-lang/timer@0.14.4
 - @syndicate-lang/ts-plugin@0.15.0
 - @syndicate-lang/ws-relay@0.14.4
2023-02-14 12:08:24 +01:00
Tony Garnock-Jones 0962c5e41a Implement getDefinitionAndBoundSpan 2023-02-14 12:06:31 +01:00
Tony Garnock-Jones 8a51e87f38 Avoid double-translation of positions (?) 2023-02-14 12:06:19 +01:00
Tony Garnock-Jones a761e7a5b7 Publish
- @syndicate-lang/fs@0.14.3
 - @syndicate-lang/html@0.14.3
 - @syndicate-lang/service@0.14.3
 - @syndicate-lang/timer@0.14.3
 - @syndicate-lang/tsc@0.15.1
 - @syndicate-lang/ws-relay@0.14.3
2023-02-14 11:44:04 +01:00
Tony Garnock-Jones fe78147cb8 Another repair to diagnostic fixup 2023-02-14 11:43:05 +01:00
Tony Garnock-Jones fec72f1269 Publish
- @syndicate-lang/fs@0.14.2
 - @syndicate-lang/html@0.14.2
 - @syndicate-lang/service@0.14.2
 - @syndicate-lang/timer@0.14.2
 - @syndicate-lang/tsc@0.15.0
 - @syndicate-lang/ws-relay@0.14.2
2023-02-14 11:32:52 +01:00
Tony Garnock-Jones 14702c66b9 Dramatic simplifications from using TypeScript-provided machinery which appeared sometime between when this code was originally written and now 2023-02-14 11:32:21 +01:00
Tony Garnock-Jones 958cbae171 Update example lockfiles 2023-02-11 22:10:38 +01:00
Tony Garnock-Jones ef665c0998 Publish
- @syndicate-lang/core@0.14.1
 - @syndicate-lang/create@0.14.1
 - @syndicate-lang/fs@0.14.1
 - @syndicate-lang/html@0.14.1
 - @syndicate-lang/service@0.14.1
 - @syndicate-lang/syndicatec@0.14.1
 - @syndicate-lang/timer@0.14.1
 - @syndicate-lang/ts-plugin@0.14.1
 - @syndicate-lang/tsc@0.14.1
 - @syndicate-lang/ws-relay@0.14.1
2023-02-11 22:06:28 +01:00
Tony Garnock-Jones a51851283f Repair route with no steps 2023-02-11 22:01:19 +01:00
Tony Garnock-Jones 7a09be7141 Merge latest changes from the syndicate-protocols repository 2023-02-11 21:54:43 +01:00
Tony Garnock-Jones d8a139b23a Switch back to transport sequence representation 2023-02-11 21:49:49 +01:00
Tony Garnock-Jones 9b109023d3 Update lockfile 2023-02-11 20:30:34 +01:00
Tony Garnock-Jones d6c4db6a09 Bump again 2023-02-11 18:12:42 +01:00
Tony Garnock-Jones 04ebe2b8e6 Bump required deps 2023-02-11 18:00:41 +01:00
Tony Garnock-Jones 18a4690609 Merge latest changes from the syndicate-protocols repository 2023-02-11 17:48:32 +01:00
Tony Garnock-Jones 46fd2dec3b Set of any for transports in gatekeeper.Route 2023-02-11 17:43:42 +01:00
Tony Garnock-Jones 38dad13f33 Update example lockfiles 2023-02-10 16:55:20 +01:00
Tony Garnock-Jones ea212ade8c Publish
- @syndicate-lang/core@0.14.0
 - @syndicate-lang/create@0.14.0
 - @syndicate-lang/fs@0.14.0
 - @syndicate-lang/html@0.14.0
 - @syndicate-lang/service@0.14.0
 - @syndicate-lang/syndicatec@0.14.0
 - @syndicate-lang/timer@0.14.0
 - @syndicate-lang/ts-plugin@0.14.0
 - @syndicate-lang/tsc@0.14.0
 - @syndicate-lang/ws-relay@0.14.0
2023-02-10 16:49:37 +01:00
Tony Garnock-Jones 1f9ee7a745 Merge latest changes from the syndicate-protocols repository 2023-02-09 23:08:23 +01:00
Tony Garnock-Jones 1ae2583414 Remove accidental self-qualification 2023-02-09 23:07:43 +01:00
Tony Garnock-Jones cd5452b624 Implement new gatekeeper protocol for syndicate-js 2023-02-09 22:41:43 +01:00
Tony Garnock-Jones f4c0c826df Merge latest changes from the syndicate-protocols repository 2023-02-09 00:17:37 +01:00
Tony Garnock-Jones f3c9662607 Another small error 2023-02-08 23:43:51 +01:00
Tony Garnock-Jones 82624d3007 Another small error 2023-02-08 23:39:42 +01:00
Tony Garnock-Jones 8b690b9103 Repair minor error 2023-02-08 23:36:21 +01:00
Tony Garnock-Jones 5a52f243e5 Adjust steps in noise and sturdy 2023-02-08 23:11:05 +01:00
Tony Garnock-Jones 6224baa2b6 Avoid variable-arity steps 2023-02-08 23:04:42 +01:00
Tony Garnock-Jones 5111a0c141 Merge latest changes from the syndicate-protocols repository 2023-02-08 22:28:19 +01:00
Tony Garnock-Jones 8619342e5e Refinements 2023-02-08 22:11:45 +01:00
Tony Garnock-Jones 32428e9e67 Merge latest changes from the syndicate-protocols repository 2023-02-08 20:36:50 +01:00
Tony Garnock-Jones 5bcb268ff8 Adjust ResolvePath/TransportConnection/PathStep 2023-02-08 20:36:14 +01:00
Tony Garnock-Jones d32805e1fb Merge latest changes from the syndicate-protocols repository 2023-02-08 19:39:58 +01:00
Tony Garnock-Jones ce56a67377 PROTOCOLS_BRANCH 2023-02-08 19:39:14 +01:00
Tony Garnock-Jones 9cd2e6776c Refactor gatekeeper protocols. 2023-02-08 17:46:47 +01:00
Tony Garnock-Jones a086c1d721 Repair typo 2023-02-07 13:18:18 +01:00
Tony Garnock-Jones bc41182533 Another small repair 2023-02-07 13:11:14 +01:00
Tony Garnock-Jones 2ad99b56b8 Be more precise about HMAC-BLAKE2s-256 and the key length 2023-02-07 12:44:47 +01:00
Tony Garnock-Jones ce7b18a2de Bring examples up-to-date 2023-02-06 23:29:35 +01:00
Tony Garnock-Jones 31d2eba8b6 Publish
- @syndicate-lang/compiler@0.13.1
 - @syndicate-lang/core@0.13.1
 - @syndicate-lang/fs@0.13.2
 - @syndicate-lang/html@0.13.2
 - @syndicate-lang/service@0.13.2
 - @syndicate-lang/syndicatec@0.13.2
 - @syndicate-lang/timer@0.13.2
 - @syndicate-lang/ts-plugin@0.13.2
 - @syndicate-lang/tsc@0.13.2
 - @syndicate-lang/ws-relay@0.13.2
2023-02-06 23:14:09 +01:00
Tony Garnock-Jones b361f3a40e Require fixed salty-crypto package 2023-02-06 23:13:14 +01:00
Tony Garnock-Jones ce56ffb634 Bump compiler package 2023-02-06 18:12:18 +01:00
Tony Garnock-Jones 32a5de939f Publish
- @syndicate-lang/fs@0.13.1
 - @syndicate-lang/html@0.13.1
 - @syndicate-lang/service@0.13.1
 - @syndicate-lang/syndicatec@0.13.1
 - @syndicate-lang/timer@0.13.1
 - @syndicate-lang/ts-plugin@0.13.1
 - @syndicate-lang/tsc@0.13.1
 - @syndicate-lang/ws-relay@0.13.1
2023-02-06 18:09:47 +01:00
Tony Garnock-Jones 8bc7dcf1d6 Correct deps 2023-02-06 18:09:09 +01:00
Tony Garnock-Jones 7478a63a55 Publish
- @syndicate-lang/core@0.13.0
 - @syndicate-lang/create@0.13.0
 - @syndicate-lang/fs@0.13.0
 - @syndicate-lang/html@0.13.0
 - @syndicate-lang/service@0.13.0
 - @syndicate-lang/syndicatec@0.13.0
 - @syndicate-lang/timer@0.13.0
 - @syndicate-lang/ts-plugin@0.13.0
 - @syndicate-lang/tsc@0.13.0
 - @syndicate-lang/ws-relay@0.13.0
2023-02-06 17:40:25 +01:00
Tony Garnock-Jones 0c002036a4 Switch to HMAC-BLAKE2s 2023-02-06 17:34:15 +01:00
Tony Garnock-Jones 53b84db98e Merge latest changes from the syndicate-protocols repository 2023-02-06 17:09:35 +01:00
Tony Garnock-Jones f6b88ee3fb Switch to HMAC-BLAKE2s 2023-02-06 16:19:03 +01:00
Tony Garnock-Jones 32d4da6f86 Seconds-based timer protocols 2023-02-06 16:08:12 +01:00
Tony Garnock-Jones 7fdb251c4a Merge latest changes from the syndicate-protocols repository 2023-02-06 15:42:46 +01:00
Tony Garnock-Jones ee8a23aa2e Switch from milliseconds to seconds. Fixes #1 2023-02-06 15:36:17 +01:00
Tony Garnock-Jones 5030130aef Update attenuations 2023-02-06 15:16:57 +01:00
Tony Garnock-Jones 93fcebc4ce Merge latest changes from the syndicate-protocols repository 2023-02-06 14:48:40 +01:00
Tony Garnock-Jones 5cd0335a79 Argh, previous commit won't work 2023-02-06 11:06:02 +01:00
Tony Garnock-Jones b52da09081 More usable (?) rewrite language 2023-02-06 10:58:16 +01:00
Tony Garnock-Jones 9ca618268e Simplify attenuations 2023-02-06 10:45:41 +01:00
Tony Garnock-Jones adc44a0d8c Merge latest changes from the syndicate-protocols repository 2023-02-04 16:32:22 +01:00
Tony Garnock-Jones 9f1f76d0ca Remove racketEvent.prs 2023-02-04 16:30:27 +01:00
Tony Garnock-Jones f4078aabaa Update binary bundle 2023-02-04 13:46:49 +01:00
Tony Garnock-Jones 557a36756f First step of cleanup of protocols 2023-02-04 13:46:34 +01:00
Tony Garnock-Jones 6c8dcce135 Publish
- @syndicate-lang/ws-relay@0.12.3
2023-02-04 12:38:55 +01:00
Tony Garnock-Jones c025456bdd Clean up logging 2023-02-04 12:38:37 +01:00
Tony Garnock-Jones cb64bc3213 Publish
- @syndicate-lang/create@0.12.1
2023-02-04 12:32:39 +01:00
Tony Garnock-Jones 4be9d1a8bc Update template to new ws-relay API 2023-02-04 12:32:00 +01:00
Tony Garnock-Jones 2218702cf2 Publish
- @syndicate-lang/create@0.12.0
 - @syndicate-lang/fs@0.11.8
 - @syndicate-lang/html@0.11.14
 - @syndicate-lang/service@0.11.7
 - @syndicate-lang/timer@0.11.12
 - @syndicate-lang/ts-plugin@0.11.12
 - @syndicate-lang/tsc@0.11.12
 - @syndicate-lang/ws-relay@0.12.2
2023-02-04 12:20:12 +01:00
Tony Garnock-Jones 9c0ff4f756 Bump deps, upgrade typescript 2023-02-04 12:17:20 +01:00
Tony Garnock-Jones 1ce2a0a1bd Note re cli.mjs 2023-02-04 11:11:15 +01:00
Tony Garnock-Jones ca2d3a32b8 Make use of new noise protocol support 2023-01-31 16:26:43 +01:00
Tony Garnock-Jones e98782fbe0 Publish
- @syndicate-lang/ws-relay@0.12.1
2023-01-31 16:23:40 +01:00
Tony Garnock-Jones 54c2ddfd99 Try multiple transports in order 2023-01-31 16:22:09 +01:00
Tony Garnock-Jones 60ecab200c Publish
- @syndicate-lang/compiler@0.11.6
 - @syndicate-lang/core@0.12.0
 - @syndicate-lang/create@0.11.5
 - @syndicate-lang/fs@0.11.7
 - @syndicate-lang/html@0.11.13
 - @syndicate-lang/service@0.11.6
 - @syndicate-lang/syndicatec@0.11.11
 - @syndicate-lang/timer@0.11.11
 - @syndicate-lang/ts-plugin@0.11.11
 - @syndicate-lang/tsc@0.11.11
 - @syndicate-lang/ws-relay@0.12.0
2023-01-31 15:21:26 +01:00
Tony Garnock-Jones 2608e259ba Noise protocol initiator 2023-01-31 15:19:29 +01:00
Tony Garnock-Jones c60bd13cdc Expose noise schema 2023-01-30 22:36:40 +01:00
Tony Garnock-Jones 31e34039dc Cope with teardown of supervisor 2023-01-30 22:35:54 +01:00
Tony Garnock-Jones 0922c6e9b1 Merge latest changes from the syndicate-protocols repository 2023-01-27 12:52:37 +01:00
Tony Garnock-Jones 07a5f688be Repair binary bundle 2023-01-27 12:52:07 +01:00
Tony Garnock-Jones 962d6f0038 Merge latest changes from the syndicate-protocols repository 2023-01-27 12:47:05 +01:00
Tony Garnock-Jones fff84d4c2a Update noise mapping 2023-01-27 12:45:02 +01:00
Tony Garnock-Jones 5983cd01f1 Another note re noise 2023-01-23 13:08:12 +01:00
Tony Garnock-Jones e8881f5980 Now I have actually implemented Noise, revise the schema 2023-01-19 12:18:58 +01:00
Tony Garnock-Jones 4adcfdd0ab Update copyrights 2023-01-17 11:44:05 +01:00
Tony Garnock-Jones 0b9cc12c5b Ignore exit code from fixcopyright 2023-01-17 11:42:55 +01:00
Tony Garnock-Jones bd58e87de1 Switch to Racket fixcopyright package 2023-01-17 11:40:29 +01:00
Tony Garnock-Jones 40b4681a6e Ugh, xsalsa20poly1305 as an AEAD isn't a thing 2023-01-16 16:21:12 +01:00
Tony Garnock-Jones 0f5e033174 noise 2023-01-16 15:52:46 +01:00
Tony Garnock-Jones aae53b5525 Update precompiled form 2023-01-16 15:51:57 +01:00
Tony Garnock-Jones 00ec198908 Publish
- @syndicate-lang/core@0.11.9
 - @syndicate-lang/fs@0.11.6
 - @syndicate-lang/html@0.11.12
 - @syndicate-lang/service@0.11.5
 - @syndicate-lang/syndicatec@0.11.10
 - @syndicate-lang/timer@0.11.10
 - @syndicate-lang/ts-plugin@0.11.10
 - @syndicate-lang/tsc@0.11.10
 - @syndicate-lang/ws-relay@0.11.10
2023-01-11 11:50:52 +01:00
Tony Garnock-Jones fe427a67be Repair relay pins, to pin target refs too 2023-01-11 11:49:35 +01:00
Tony Garnock-Jones 4c03646567 HTTP 2022-12-13 18:08:34 +13:00
Tony Garnock-Jones eaa7268c9b Publish
- @syndicate-lang/compiler@0.11.5
 - @syndicate-lang/core@0.11.8
 - @syndicate-lang/fs@0.11.5
 - @syndicate-lang/html@0.11.11
 - @syndicate-lang/service@0.11.4
 - @syndicate-lang/syndicatec@0.11.9
 - @syndicate-lang/timer@0.11.9
 - @syndicate-lang/ts-plugin@0.11.9
 - @syndicate-lang/tsc@0.11.9
 - @syndicate-lang/ws-relay@0.11.9
2022-10-18 21:39:51 +02:00
Tony Garnock-Jones bdb1c2a238 Remove obsolete subpackage makefile 2022-10-18 21:37:13 +02:00
Tony Garnock-Jones 576023fb8a Publish
- @syndicate-lang/create@0.11.4
 - @syndicate-lang/html@0.11.10
2022-10-18 21:28:50 +02:00
Tony Garnock-Jones 9cb312ddd3 Fix up types 2022-10-18 21:27:27 +02:00
Tony Garnock-Jones ef88fa5aec Avoid crypto.randomUUID because it is only available in "secure" contexts 2022-10-18 21:01:47 +02:00
Tony Garnock-Jones d57bcd06c4 preserves.dev 2022-05-24 13:53:18 +02:00
Tony Garnock-Jones 886f8bff6d Publish
- @syndicate-lang/html@0.11.9
2022-05-03 16:23:29 +02:00
Tony Garnock-Jones 61e8f38815 Add UIFragmentRecord type 2022-05-03 16:23:12 +02:00
Tony Garnock-Jones 6d85d220f7 Publish
- @syndicate-lang/fs@0.11.4
2022-05-03 10:38:03 +02:00
Tony Garnock-Jones d08cd095fc Expose awaitWriteFinish configuration 2022-05-03 10:37:51 +02:00
Tony Garnock-Jones ef4cbe0a06 Publish
- @syndicate-lang/core@0.11.7
 - @syndicate-lang/fs@0.11.3
 - @syndicate-lang/html@0.11.8
 - @syndicate-lang/service@0.11.3
 - @syndicate-lang/syndicatec@0.11.8
 - @syndicate-lang/timer@0.11.8
 - @syndicate-lang/ts-plugin@0.11.8
 - @syndicate-lang/tsc@0.11.8
 - @syndicate-lang/ws-relay@0.11.8
2022-04-30 14:57:19 +03:00
Tony Garnock-Jones 5b835dc13a Repair quasipattern parameter passing for union types 2022-04-30 14:54:56 +03:00
Tony Garnock-Jones 7668dbb401 Support selection of a particular variant in quasipatterns 2022-04-30 14:24:07 +03:00
Tony Garnock-Jones 9d54abe6f5 Publish
- @syndicate-lang/fs@0.11.2
2022-04-28 23:33:15 +03:00
Tony Garnock-Jones b41afe94ae Expose syndicate-fs script 2022-04-28 23:33:00 +03:00
Tony Garnock-Jones 0e97da1377 Publish
- @syndicate-lang/core@0.11.6
 - @syndicate-lang/fs@0.11.1
 - @syndicate-lang/html@0.11.7
 - @syndicate-lang/service@0.11.2
 - @syndicate-lang/syndicatec@0.11.7
 - @syndicate-lang/timer@0.11.7
 - @syndicate-lang/ts-plugin@0.11.7
 - @syndicate-lang/tsc@0.11.7
 - @syndicate-lang/ws-relay@0.11.7
2022-04-28 23:17:57 +03:00
Tony Garnock-Jones 148868da83 Split out serve function in @syndicate-lang/fs 2022-04-28 23:14:59 +03:00
Tony Garnock-Jones 8052ee00b5 @syndicate-lang/fs 2022-04-28 23:06:08 +03:00
Tony Garnock-Jones c7fb679987 Specify main module for @syndicate-lang/service 2022-04-28 23:03:44 +03:00
Tony Garnock-Jones 4a49e6a314 Generalize fields to all is()ables 2022-04-28 23:03:30 +03:00
Tony Garnock-Jones dae63d6961 Publish
- @syndicate-lang/service@0.11.1
2022-04-27 22:20:15 +03:00
Tony Garnock-Jones ffb5402148 @syndicate-lang/service 2022-04-27 22:19:10 +03:00
Tony Garnock-Jones 6a0ecb0caa Publish
- @syndicate-lang/create@0.11.3
2022-04-22 14:46:46 +02:00
Tony Garnock-Jones 4d0febe833 Add typescript-language-server 2022-04-22 14:46:35 +02:00
Tony Garnock-Jones f4b5eaed39 Publish
- @syndicate-lang/create@0.11.2
2022-04-22 14:16:31 +02:00
Tony Garnock-Jones c25f42b30c Update README 2022-04-22 14:15:09 +02:00
Tony Garnock-Jones 6cb509ff2e Publish
- @syndicate-lang/create@0.11.1
2022-04-22 14:05:23 +02:00
Tony Garnock-Jones de0cfbcb85 Minor fixes to template 2022-04-22 14:05:10 +02:00
Tony Garnock-Jones 38f3d05fe0 Publish
- @syndicate-lang/compiler@0.11.4
 - @syndicate-lang/core@0.11.5
 - @syndicate-lang/create@0.11.0
 - @syndicate-lang/html@0.11.6
 - @syndicate-lang/syndicatec@0.11.6
 - @syndicate-lang/timer@0.11.6
 - @syndicate-lang/ts-plugin@0.11.6
 - @syndicate-lang/tsc@0.11.6
 - @syndicate-lang/ws-relay@0.11.6
2022-04-22 13:56:36 +02:00
Tony Garnock-Jones 9c4e96d585 @syndicate-lang/create package 2022-04-22 13:54:49 +02:00
Tony Garnock-Jones c66168206b Accept literal values able to __as_preserve__ themselves 2022-04-22 13:49:15 +02:00
Tony Garnock-Jones 074568bb91 Update package.json repository fields 2022-04-22 11:49:27 +02:00
Tony Garnock-Jones 290419b805 Merge latest changes from the syndicate-protocols repository 2022-02-04 20:50:51 +01:00
Tony Garnock-Jones ca92d99c52 Remove notion of "system-layer-service" from core protocols 2022-02-04 14:26:50 +01:00
Tony Garnock-Jones 19c96bdef2 Allow userDefined states 2022-02-03 22:55:06 +01:00
Tony Garnock-Jones b0db047c16 Bump preserves/syndicate deps in examples 2022-01-26 17:13:19 +01:00
Tony Garnock-Jones d6b89e466d Publish
- @syndicate-lang/compiler@0.11.3
 - @syndicate-lang/core@0.11.4
 - @syndicate-lang/html@0.11.5
 - @syndicate-lang/syndicatec@0.11.5
 - @syndicate-lang/timer@0.11.5
 - @syndicate-lang/ts-plugin@0.11.5
 - @syndicate-lang/tsc@0.11.5
 - @syndicate-lang/ws-relay@0.11.5
2022-01-26 17:08:32 +01:00
Tony Garnock-Jones 2953a9caf5 Bump required versions, adding patchlevels because of the recent stringify fixes 2022-01-26 17:05:58 +01:00
Tony Garnock-Jones 8d16071f90 Add clean/veryclean targets 2022-01-26 17:05:40 +01:00
Tony Garnock-Jones 93171b9717 Bump 2022-01-26 16:36:36 +01:00
Tony Garnock-Jones 6be4f9742b Publish
- @syndicate-lang/core@0.11.3
 - @syndicate-lang/html@0.11.4
 - @syndicate-lang/syndicatec@0.11.4
 - @syndicate-lang/timer@0.11.4
 - @syndicate-lang/ts-plugin@0.11.4
 - @syndicate-lang/tsc@0.11.4
 - @syndicate-lang/ws-relay@0.11.4
2022-01-26 16:26:44 +01:00
Tony Garnock-Jones 974d74023c Fixup wrt new preserves interfaces 2022-01-26 16:26:35 +01:00
Tony Garnock-Jones 49d88da7cd Bump 2022-01-26 16:09:00 +01:00
Tony Garnock-Jones cfed352f40 Publish
- @syndicate-lang/compiler@0.11.2
 - @syndicate-lang/core@0.11.2
 - @syndicate-lang/html@0.11.3
 - @syndicate-lang/syndicatec@0.11.3
 - @syndicate-lang/timer@0.11.3
 - @syndicate-lang/ts-plugin@0.11.3
 - @syndicate-lang/tsc@0.11.3
 - @syndicate-lang/ws-relay@0.11.3
2022-01-26 14:44:59 +01:00
Tony Garnock-Jones cdd1c2393d Bump preserves dep 2022-01-26 14:44:35 +01:00
Tony Garnock-Jones 4e5f7136ad Bump preserves dep 2022-01-26 14:44:13 +01:00
Tony Garnock-Jones c3dfd42a58 Bump copyright years 2022-01-26 14:38:38 +01:00
Tony Garnock-Jones 369168311b Fix dependencies 2022-01-24 14:45:07 +01:00
Tony Garnock-Jones b53d606705 Publish
- @syndicate-lang/html@0.11.2
 - @syndicate-lang/syndicatec@0.11.2
 - @syndicate-lang/timer@0.11.2
 - @syndicate-lang/ts-plugin@0.11.2
 - @syndicate-lang/tsc@0.11.2
 - @syndicate-lang/ws-relay@0.11.2
2022-01-24 14:43:23 +01:00
Tony Garnock-Jones 781dc406c5 Fix dependency error 2022-01-24 14:43:15 +01:00
Tony Garnock-Jones 4b536392d7 Bump deps 2022-01-24 14:34:52 +01:00
Tony Garnock-Jones 6d58bcabe4 Publish
- @syndicate-lang/compiler@0.11.1
 - @syndicate-lang/core@0.11.1
 - @syndicate-lang/html@0.11.1
 - @syndicate-lang/syndicatec@0.11.1
 - @syndicate-lang/timer@0.11.1
 - @syndicate-lang/ts-plugin@0.11.1
 - @syndicate-lang/tsc@0.11.1
 - @syndicate-lang/ws-relay@0.11.1
2022-01-24 14:16:58 +01:00
Tony Garnock-Jones 8746694777 Bring compiler's version number in line with the rest 2022-01-24 14:16:38 +01:00
Tony Garnock-Jones 5560ce5aa1 Upgrade Preserves, allowing automatic conversion to Preserves values in many cases 2022-01-24 14:13:46 +01:00
Tony Garnock-Jones c5f69295a2 Somewhat-typed templating for fragments of HTML/SVG/etc 2022-01-24 09:10:43 +01:00
Tony Garnock-Jones 431a7f49b0 Allow passing of nodes directly to UIFragment.html 2022-01-24 09:10:20 +01:00
Tony Garnock-Jones fb83b0e524 Repair placeholder replacement in non-HTML settings 2022-01-24 09:09:58 +01:00
Tony Garnock-Jones ff75fc7107 Expose trace schema (!) 2022-01-24 09:09:25 +01:00
Tony Garnock-Jones b4d0559fe2 Avoid stompling on `this` binding 2022-01-24 09:09:10 +01:00
Tony Garnock-Jones faca72d6b3 Take advantage of new static info propagated by schema compiler 2022-01-24 09:08:56 +01:00
Tony Garnock-Jones 6f07bfafae Ability to generate non-HTML sublanguages, e.g. SVG 2022-01-20 20:48:53 +01:00
Tony Garnock-Jones 83cc561cce Turn.every 2022-01-20 20:48:30 +01:00
Tony Garnock-Jones c20cab0bba Publish
- @syndicate-lang/core@0.11.0
 - @syndicate-lang/html@0.11.0
 - @syndicate-lang/syndicatec@0.11.0
 - @syndicate-lang/timer@0.11.0
 - @syndicate-lang/ts-plugin@0.11.0
 - @syndicate-lang/tsc@0.11.0
 - @syndicate-lang/ws-relay@0.11.0
2022-01-20 15:28:41 +01:00
Tony Garnock-Jones 26eba6b492 Merge latest changes from the syndicate-protocols repository 2022-01-20 15:23:46 +01:00
Tony Garnock-Jones ab34b62cf1 Refine the trace protocol a bit 2022-01-20 09:40:53 +01:00
Tony Garnock-Jones 5a65256cf3 Syndicate traces 2022-01-19 14:24:21 +01:00
Tony Garnock-Jones 0291c43730 Merge latest changes from the syndicate-protocols repository 2022-01-17 00:23:18 +01:00
Tony Garnock-Jones 257c604e2b Repair bad record pattern 2022-01-17 00:22:10 +01:00
Tony Garnock-Jones 66ee5b7427 Merge latest changes from the syndicate-protocols repository 2022-01-17 00:20:45 +01:00
Tony Garnock-Jones a06d532006 Extension point. Closes #2 2022-01-16 21:17:36 +01:00
Tony Garnock-Jones d9e5d8d29c Publish
- @syndicate-lang/core@0.10.7
 - @syndicate-lang/html@0.10.9
 - @syndicate-lang/syndicatec@0.10.8
 - @syndicate-lang/timer@0.10.8
 - @syndicate-lang/ts-plugin@0.10.8
 - @syndicate-lang/tsc@0.10.8
 - @syndicate-lang/ws-relay@0.10.4
2022-01-16 15:23:54 +01:00
Tony Garnock-Jones f8b06ff02a Repair behaviour of (during $x => assert x). 2022-01-16 15:11:01 +01:00
Tony Garnock-Jones 4265343cc8 Publish
- @syndicate-lang/html@0.10.8
2022-01-12 15:44:19 +01:00
Tony Garnock-Jones cc3fac620c Rescan when a fragment changes, to keep property monitor event handlers installed 2022-01-12 15:44:06 +01:00
Tony Garnock-Jones 419adba79b Publish
- @syndicate-lang/core@0.10.6
 - @syndicate-lang/html@0.10.7
 - @syndicate-lang/syndicatec@0.10.7
 - @syndicate-lang/timer@0.10.7
 - @syndicate-lang/ts-plugin@0.10.7
 - @syndicate-lang/tsc@0.10.7
 - @syndicate-lang/ws-relay@0.10.3
2022-01-12 10:51:57 +01:00
Tony Garnock-Jones 08197626a6 Simplify. Why didn't I do it like this before? 2022-01-08 13:38:10 +01:00
Tony Garnock-Jones e04b898c7f Adjustments to service.prs 2022-01-07 15:29:20 +01:00
Tony Garnock-Jones 3823d3172c Publish
- @syndicate-lang/core@0.10.5
 - @syndicate-lang/html@0.10.6
 - @syndicate-lang/syndicatec@0.10.6
 - @syndicate-lang/timer@0.10.6
 - @syndicate-lang/ts-plugin@0.10.6
 - @syndicate-lang/tsc@0.10.6
 - @syndicate-lang/ws-relay@0.10.2
2021-12-24 20:58:04 -05:00
Tony Garnock-Jones ed8adae3f2 Experiment: run facet teardown in the current turn, immediately, instead of delayed 2021-12-24 17:29:26 -05:00
Tony Garnock-Jones 8f2d598201 Fix wsurl construction 2021-12-24 17:28:55 -05:00
Tony Garnock-Jones 665d5ab219 Fix (?) LSP config 2021-12-24 15:28:05 -05:00
Tony Garnock-Jones 9369bb56cd Bump example versions 2021-12-13 20:30:03 +01:00
Tony Garnock-Jones a11b755528 Publish
- @syndicate-lang/core@0.10.4
 - @syndicate-lang/html@0.10.5
 - @syndicate-lang/syndicatec@0.10.5
 - @syndicate-lang/timer@0.10.5
 - @syndicate-lang/ts-plugin@0.10.5
 - @syndicate-lang/tsc@0.10.5
 - @syndicate-lang/ws-relay@0.10.1
2021-12-13 20:23:10 +01:00
Tony Garnock-Jones b92bbb9741 Run pipes as linked actors in their own subfacets, to prevent a vanishing pipe from killing the game 2021-12-13 20:21:21 +01:00
Tony Garnock-Jones 90a6e2f41a Adapt to syndicate-protocols changes 2021-12-13 20:20:31 +01:00
Tony Garnock-Jones d737b96465 Merge latest changes from the syndicate-protocols repository 2021-12-13 16:00:35 +01:00
Tony Garnock-Jones 5f60c22e49 More simplifications, to sturdy this time 2021-12-13 15:43:01 +01:00
Tony Garnock-Jones 49075e7e84 Embedded values count as atoms here 2021-12-13 14:22:32 +01:00
Tony Garnock-Jones b3e24d819c Experiment: stricter, simpler dataspacePatterns 2021-12-13 13:49:58 +01:00
Tony Garnock-Jones b2df99cbc0 New preserves-schemac invocation style 2021-12-13 13:44:02 +01:00
Tony Garnock-Jones 17c1319d01 Upgrade preserves dep 2021-12-13 13:42:32 +01:00
Tony Garnock-Jones a3de480748 Publish
- @syndicate-lang/compiler@0.10.3
 - @syndicate-lang/core@0.10.3
 - @syndicate-lang/html@0.10.4
 - @syndicate-lang/syndicatec@0.10.4
 - @syndicate-lang/timer@0.10.4
 - @syndicate-lang/ts-plugin@0.10.4
 - @syndicate-lang/tsc@0.10.4
 - @syndicate-lang/ws-relay@0.10.0
2021-12-13 13:40:42 +01:00
Tony Garnock-Jones a51054d455 Clean up deps 2021-12-13 13:38:52 +01:00
Tony Garnock-Jones 85f123c777 New preserves-schema-ts invocation style 2021-12-13 13:38:46 +01:00
Tony Garnock-Jones 49283cb4ca Fix repository URLs. 2021-12-13 13:38:28 +01:00
Tony Garnock-Jones ebf578503c Split out @syndicate-lang/ws-relay module 2021-12-13 13:36:38 +01:00
Tony Garnock-Jones 3fe2af848b Improve wsRelay 2021-12-13 12:21:29 +01:00
Tony Garnock-Jones 09ae5ddb5b Support optional "when" in "during" 2021-12-13 12:21:11 +01:00
Tony Garnock-Jones 4d42968cd6 Repair an error and a couple of infelicities in quasivalue.ts 2021-12-13 12:20:51 +01:00
Tony Garnock-Jones 5cc9fa29ed yarn.lock for example-simple-chat 2021-12-13 00:03:57 +01:00
Tony Garnock-Jones fca27dda30 Publish
- @syndicate-lang/core@0.10.2
 - @syndicate-lang/html@0.10.3
 - @syndicate-lang/syndicatec@0.10.3
 - @syndicate-lang/timer@0.10.3
 - @syndicate-lang/ts-plugin@0.10.3
 - @syndicate-lang/tsc@0.10.3
2021-12-13 00:00:24 +01:00
Tony Garnock-Jones ecacddc328 Chat example 2021-12-12 23:59:49 +01:00
Tony Garnock-Jones 11fc55ee7d Use newer preserves versions 2021-12-12 23:58:06 +01:00
Tony Garnock-Jones f24dfb53d5 No need to spawn a relay 2021-12-12 23:54:35 +01:00
Tony Garnock-Jones a9a3a8a66d Bring quasipattern syntax into line with constructor syntax for unary records 2021-12-12 23:54:22 +01:00
Tony Garnock-Jones 2940b80563 Supervision 2021-12-12 23:03:22 +01:00
Tony Garnock-Jones 04bbcd25ab Turn.after 2021-12-12 23:02:58 +01:00
Tony Garnock-Jones 33ac308564 Allow access to new Actor handle on spawn (is this safe?) 2021-12-12 23:02:51 +01:00
Tony Garnock-Jones 951598b7d0 Commit to having onStop shutdownActions run in parent facet context 2021-12-12 23:02:25 +01:00
Tony Garnock-Jones 364c97f357 Repair error in halfLink accounting during facet termination 2021-12-12 23:01:53 +01:00
Tony Garnock-Jones 414b971cee Publish
- @syndicate-lang/compiler@0.10.2
 - @syndicate-lang/core@0.10.1
 - @syndicate-lang/html@0.10.2
 - @syndicate-lang/syndicatec@0.10.2
 - @syndicate-lang/timer@0.10.2
 - @syndicate-lang/ts-plugin@0.10.2
 - @syndicate-lang/tsc@0.10.2
2021-12-11 19:42:50 +01:00
Tony Garnock-Jones 936cdbd3c5 Make during...spawn linked actors always exempt from root facet inert check 2021-12-11 19:42:18 +01:00
Tony Garnock-Jones a0dc76e4e2 Fix copyright headers 2021-12-11 17:23:48 +01:00
Tony Garnock-Jones 101ba0dc4a Bump versions 2021-12-11 17:13:35 +01:00
Tony Garnock-Jones 5bce99f7fa Publish
- @syndicate-lang/compiler@0.10.1
 - @syndicate-lang/html@0.10.1
 - @syndicate-lang/syndicatec@0.10.1
 - @syndicate-lang/timer@0.10.1
 - @syndicate-lang/ts-plugin@0.10.1
 - @syndicate-lang/tsc@0.10.1
2021-12-11 17:07:02 +01:00
Tony Garnock-Jones 9c8436af1f Repair silly mistake in codegen 2021-12-11 17:06:50 +01:00
Tony Garnock-Jones 89d340cfc8 Publish
- @syndicate-lang/compiler@0.10.0
 - @syndicate-lang/core@0.10.0
 - @syndicate-lang/html@0.10.0
 - @syndicate-lang/syndicatec@0.10.0
 - @syndicate-lang/timer@0.10.0
 - @syndicate-lang/ts-plugin@0.10.0
 - @syndicate-lang/tsc@0.10.0
2021-12-11 17:03:07 +01:00
Tony Garnock-Jones a8e542a394 Bring the flappy-bird example up to date 2021-12-11 16:59:38 +01:00
Tony Garnock-Jones a3484d4a07 Repair paths in example HTML 2021-12-11 16:56:45 +01:00
Tony Garnock-Jones 672be25211 Autolink during...spawn 2021-12-11 16:54:47 +01:00
Tony Garnock-Jones 666a3daac3 More or less cosmetic 2021-12-11 16:54:21 +01:00
Tony Garnock-Jones 92fa548109 Add necessary preventInertCheck calls in the DOM driver 2021-12-11 16:51:02 +01:00
Tony Garnock-Jones c9272ddcc9 Repair typo 2021-12-11 16:49:24 +01:00
Tony Garnock-Jones 3edb680c19 Improve preprocessor error reporting 2021-12-11 16:49:12 +01:00
Tony Garnock-Jones 8888ac3fe9 Dataflow blocks should contribute to facet liveness I guess, since they aren't removable 2021-12-11 15:43:56 +01:00
Tony Garnock-Jones f540b41d73 Optional tracing/dumping for Dataspace 2021-12-11 15:43:32 +01:00
Tony Garnock-Jones 97cfb19852 Move stop continuation *before* a stopping facet's assertions are retracted.
This is a kind of ad-hocish response to an interesting problem. In
previous Syndicates, assertion changes were gathered into *patches*
which *netted out* intra-turn changes. In this implementation, each
change is relayed unchanged, so there is *no netting* going on. The
closest we get is a convention that when things are being replaced,
incoming assertions should be made before outgoing ones are retracted,
so that the kind of glitch that's seen is a double-up of records,
rather than a brief window where no records are present.

So here, by moving the stop continuation into an onStop for the
stopping facet (that nonetheless *executes* in that facet's parent's
context), we allow the following pattern to run without problem
glitching:

    react {
      assert Something(1);
      stop on asserted Condition() => react {
        assert Something(2);
      }
    }

Observers like this...

    during Something(_) => { // **A**
      ...
      during Something($specific) => { // **B**
      }
    }

will see

    + Something(1)
    + Something(2)
    - Something(1)

rather than what they saw before this change,

    + Something(1)
    - Something(1)
    + Something(2)

The consequence is that the line marked **A** above will *remain
active* after this change, with the facet at **B** being replaced,
rather than briefly tearing down the **A** facet when `- Something(1)`
and then creating a fresh one when `+ Something(2)`.

This came up in flappy bird, where I had

    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>`);
                }
            }
        }
    }

which, in combination with the particular implementation of index.ts
in the html package, caused the UIFragment responder to get confused
and to not show the GAME OVER message - the previous score message was
removed, but the new one wasn't manifested in the DOM. Changing the
last `ui.html` above to `ui.context('foo').html` caused the problem to
go away (by making it effectively two unrelated fragments, rather than
a replacement of the content of a single fragment).
2021-12-11 14:04:31 +01:00
Tony Garnock-Jones 56233687db Fixup after move 2021-12-10 14:40:03 +01:00
Tony Garnock-Jones a035fbf73b Move examples out 2021-12-10 14:25:23 +01:00
Tony Garnock-Jones df7f1c3dd7 Publish
- @syndicate-lang/compiler@0.9.1
 - @syndicate-lang/core@0.9.1
 - @syndicate-lang/html@0.9.1
 - @syndicate-lang/syndicatec@0.9.1
 - @syndicate-lang/timer@0.9.1
 - @syndicate-lang/ts-plugin@0.9.1
 - @syndicate-lang/tsc@0.9.1
2021-12-10 14:03:11 +01:00
Tony Garnock-Jones 1a365f42be Put licences in the place that lerna expects them (?) 2021-12-10 14:02:58 +01:00
Tony Garnock-Jones 3f0bfadc2b Publish
- @syndicate-lang/compiler@0.9.0
 - @syndicate-lang/core@0.9.0
 - @syndicate-lang/html@0.9.0
 - @syndicate-lang/syndicatec@0.9.0
 - @syndicate-lang/timer@0.9.0
 - @syndicate-lang/ts-plugin@0.9.0
 - @syndicate-lang/tsc@0.9.0
2021-12-10 13:35:30 +01:00
Tony Garnock-Jones e001f94757 Update yarn.lock; add yarn prefix to example build commands 2021-12-09 22:33:03 +01:00
Tony Garnock-Jones 73dd39ff85 Oops. Omitted these 2021-12-09 22:28:59 +01:00
Tony Garnock-Jones 74377b87f6 Port html package (and one example) 2021-12-09 22:15:47 +01:00
Tony Garnock-Jones 7a7ad76036 oops - absent pattern name 2021-12-09 22:14:20 +01:00
Tony Garnock-Jones 4db3f45d67 oops - dataspace.boot 2021-12-09 22:14:07 +01:00
Tony Garnock-Jones 32f7a8f5c0 Absent named parameters in quasipatterns are treated as implicit discards 2021-12-09 22:13:05 +01:00
Tony Garnock-Jones e0d76f8dd3 Dataspace.boot 2021-12-09 22:12:41 +01:00
Tony Garnock-Jones 6d7dbaf3b3 Bump to get encoder bugfix 2021-12-09 22:12:14 +01:00
Tony Garnock-Jones 1c1decdb7d Repair type error for dataflow assertions 2021-12-09 22:12:02 +01:00
Tony Garnock-Jones dd4af85296 Allow ancillary data as a side-channel for intra-image value passing 2021-12-09 22:11:46 +01:00
Tony Garnock-Jones 50eaec69ef Repair (?) error when searching for the very last position in a file, such as for a missing close parenthesis 2021-12-09 22:11:11 +01:00
Tony Garnock-Jones a37879695e Use the new pattern quasiquotation support 2021-12-09 18:55:53 +01:00
Tony Garnock-Jones f81cf11ebd Pattern (quasi)quotation 2021-12-09 18:55:18 +01:00
Tony Garnock-Jones d1c79973c5 Repair code generation error for "stop on (...)" handlers 2021-12-09 18:54:43 +01:00
Tony Garnock-Jones 4ec02591c0 Initial QuasiValue support 2021-12-09 18:53:41 +01:00
Tony Garnock-Jones a1c8203b5d Use ES2019 dialect in TypeScript (for Symbol.description) 2021-12-09 18:53:17 +01:00
Tony Garnock-Jones fdf765557e Repair serious error in skeleton indexing (double pop) 2021-12-09 18:52:58 +01:00
Tony Garnock-Jones 58daa8c981 Drop discards in smart pattern constructors 2021-12-09 18:52:42 +01:00
Tony Garnock-Jones 20b83aa5a5 Support stopping a root facet, such as happens when a link between actors is broken 2021-12-09 18:52:22 +01:00
Tony Garnock-Jones 5455392efc Repair typo 2021-12-09 18:51:57 +01:00
Tony Garnock-Jones b5e82cba9b Better Ref printing 2021-12-09 18:51:41 +01:00
Tony Garnock-Jones ffee492fec Debug-dumping of skeleton structure 2021-12-09 18:50:46 +01:00
Tony Garnock-Jones c9da4fcf26 Stack utilities 2021-12-09 18:47:43 +01:00
Tony Garnock-Jones e17fd13442 Bump preserves version 2021-12-09 18:41:42 +01:00
Tony Garnock-Jones 7b137bea06 At least *propagate* unhandlable-binder-guard errors 2021-12-08 14:29:28 +01:00
Tony Garnock-Jones 4ad2dd69a6 Update timer driver. This has exposed problems with pattern quoting and schema support. 2021-12-03 15:38:02 +01:00
Tony Garnock-Jones edbe7bcdac Get ts-plugin working with Emacs and LSP 2021-12-03 15:37:41 +01:00
Tony Garnock-Jones 78834dfb07 Make "at <target> { ... }" require the braces 2021-12-03 15:29:57 +01:00
Tony Garnock-Jones 3486ec928e Comment 2021-12-03 15:29:20 +01:00
Tony Garnock-Jones d8b60ccf76 ts-plugin. Works in VS Code, haven't managed to configure Emacs to work with it yet. 2021-12-03 02:06:17 +01:00
Tony Garnock-Jones 7b9f035fa8 tsc package 2021-12-03 01:52:46 +01:00
Tony Garnock-Jones fb420855e9 Use a global variable instead of threading thisTurn through everywhere. Should improve ergonomics a little. 2021-12-03 01:46:41 +01:00
Tony Garnock-Jones 33948be6b1 Get the JS target basics working 2021-12-03 01:00:47 +01:00
Tony Garnock-Jones dd14c8471d Update compiler 2021-12-03 00:55:42 +01:00
Tony Garnock-Jones f9d1e694e0 Examples and bug-fixes 2021-12-02 16:04:07 +01:00
Tony Garnock-Jones 0b746764dd Update README.md 2021-12-02 14:42:23 +01:00
Tony Garnock-Jones d51af436f5 Much progress 2021-12-02 14:40:24 +01:00
Tony Garnock-Jones d2f5c947ac Bulk copyright notice repair 2021-12-01 17:24:29 +01:00
Tony Garnock-Jones 1563398dd8 More WIP novy 2021-12-01 17:13:00 +01:00
Tony Garnock-Jones d9bd57d643 Add 'packages/core/protocols/' from commit 'b42230b96a6f8665fdd8e56a52a5e76072a6d182'
git-subtree-dir: packages/core/protocols
git-subtree-mainline: c6fff70bae
git-subtree-split: b42230b96a
2021-12-01 16:27:11 +01:00
Tony Garnock-Jones c6fff70bae WIP moving to novy 2021-12-01 16:27:06 +01:00
Tony Garnock-Jones b42230b96a ServiceObject 2021-10-06 21:51:08 +02:00
Tony Garnock-Jones 239b1b15cc Repair incorrect definition name 2021-09-27 13:57:12 +02:00
Tony Garnock-Jones 9078267e76 Fix typo 2021-09-27 13:56:12 +02:00
Tony Garnock-Jones 955177b7db Clarify action of `core-service` 2021-09-27 13:53:54 +02:00
Tony Garnock-Jones b4b4995d84 Oops - wanted literals, but had refs instead 2021-09-27 13:50:29 +02:00
Tony Garnock-Jones 422904010b Refine approach to services 2021-09-27 13:48:26 +02:00
Tony Garnock-Jones 6cfd97c91a Remove protocol variant complication (experimental) 2021-09-24 12:57:05 +02:00
Tony Garnock-Jones 770fb79882 Develop service model 2021-09-24 12:56:30 +02:00
Tony Garnock-Jones 0ff8c2c872 Stdio transport 2021-08-19 18:17:51 -04:00
Tony Garnock-Jones c2de82a2b7 schemas/transportAddress.prs 2021-08-18 22:59:59 -04:00
Tony Garnock-Jones 9445a71b53 Use correct latest version of preserves-schemac 2021-08-11 16:05:36 -04:00
Tony Garnock-Jones 8cd601a777 Remove name field from DBind 2021-08-11 15:43:29 -04:00
Tony Garnock-Jones 0b2c7ecfe1 Rename RefAny -> Cap 2021-07-22 14:12:53 +02:00
Tony Garnock-Jones be6b30bba6 Switch Ref -> RefAny 2021-07-22 13:43:14 +02:00
Tony Garnock-Jones 993cf78a38 DeBruijn-like binding in patterns 2021-07-12 21:10:19 +02:00
Tony Garnock-Jones f7c6e7d164 Specify embedded type for sturdy.prs 2021-07-03 09:00:58 +02:00
Tony Garnock-Jones e7ddfdf311 EntityRef.Ref in dataspacePatterns 2021-07-02 16:51:21 +02:00
Tony Garnock-Jones dab79020f4 Variations on protocol for internal and external use 2021-07-02 16:48:15 +02:00
Tony Garnock-Jones a6639b5380 Error packets 2021-07-02 10:11:53 +02:00
Tony Garnock-Jones 06e922c511 Compiled schema bundle 2021-07-01 10:04:26 +02:00
Tony Garnock-Jones 93c196acaa Move schemas into subdirectory after subtree split 2021-07-01 09:51:53 +02:00
Tony Garnock-Jones e034486aaa Update schemas to match new identifier restrictions. 2021-06-25 09:45:38 +02:00
Tony Garnock-Jones e0957dc25d Correct package dependencies in examples 2021-06-23 15:45:25 +02:00
Tony Garnock-Jones 824b078eac Simpler stream connection protocol. 2021-06-18 13:48:12 +02:00
Tony Garnock-Jones cf93327ed6 Services and service activation 2021-06-17 14:57:06 +02:00
Tony Garnock-Jones 6cfe8c2ba4 `when` -> `on`; StreamConnection API; better `this-target`; tcp-listen errors
- spec-generic StreamConnection translators, for simple TCP API
 - `when` -> `on`, better use for event-expanders
 - Removal of special processing of `at`, making `this-target` properly lexically scopeable
 - TcpListenError and handling of tcp-listen errors
 - SYNDICATE_COLUMNS for pretty-printing of dataspace traces
 - Repair driver-support.rkt thread shutdown turn-taking
 - Refinements to stream protocols and implementation
 - Improvements to syntax location preservation in syntax.rkt
2021-06-17 13:38:30 +02:00
Tony Garnock-Jones b6bc816daf Split out experimental "stream" protocols; make tcp.rkt use them; more inertness checks
Also, a few other important changes:
 - Better printing of entity-ref structs
 - Inertness checks on assertion retraction (!) and preventer-disarm
 - Correct selection of active facet during dataflow recomputations
 - Repair silly omission in turn-assert/dataflow!
2021-06-16 21:44:07 +02:00
Tony Garnock-Jones a73b6a9f4a Whole-packet flow credit 2021-06-15 12:46:09 +02:00
Tony Garnock-Jones f6cb595709 Add ConnectionPeer assertions; rename TcpOutbound -> TcpRemote and TcpInbound -> TcpLocal 2021-06-15 12:37:14 +02:00
Tony Garnock-Jones afe36c630d Refactor/repair tcp.prs and tcp.rkt 2021-06-11 15:29:12 +02:00
Tony Garnock-Jones 5850c5b06d Credit-based flow control on tcp driver; line mode 2021-06-11 14:18:53 +02:00
Tony Garnock-Jones b0d0eb3a11 drivers/racket-event.rkt 2021-06-10 13:34:18 +02:00
Tony Garnock-Jones 21d09f81e5 ActiveSocket-close now gets a string, not an embedded exn 2021-06-10 13:33:16 +02:00
Tony Garnock-Jones 8b5e74048e Beginnings of a TCP driver 2021-06-10 10:00:43 +02:00
Tony Garnock-Jones 201f5433e1 Port timer driver from older syndicate/rkt implementation 2021-06-09 23:08:06 +02:00
Tony Garnock-Jones 8cbe2475e3 TAttenuate 2021-06-09 15:06:58 +02:00
Tony Garnock-Jones 930f7eda00 Move box-protocol to a #lang preserves-schema module 2021-06-03 23:22:46 +02:00
Tony Garnock-Jones a932fa1428 Pattern decomposition 2021-06-03 15:58:48 +02:00
Tony Garnock-Jones 3412eabcff Update schemas for new embedded syntax; steps toward pattern support 2021-06-02 06:57:48 +02:00
Tony Garnock-Jones e47a37e3f0 First steps to an actual novy implementation 2021-05-27 10:36:35 +02:00
Tony Garnock-Jones 27403776dc Update README 2021-05-17 16:33:48 +02:00
Tony Garnock-Jones 25698ce4b0 Publish
- @syndicate-lang/compiler@0.2.0
 - @syndicate-lang/core@0.6.0
 - @syndicate-lang/html@0.1.0
 - @syndicate-lang/syndicatec@0.2.0
 - @syndicate-lang/timer@0.1.0
 - @syndicate-lang/ts-plugin@0.2.0
 - @syndicate-lang/tsc@0.2.0
2021-05-17 16:32:39 +02:00
Tony Garnock-Jones ca8f343a44 Mark example packages as private 2021-05-17 16:32:20 +02:00
Tony Garnock-Jones dc5c97b027 Major update to @preserves/core from old preserves package. 2021-05-17 16:26:01 +02:00
Tony Garnock-Jones 35c965b85d Tweak README 2021-05-12 13:53:41 +00:00
Tony Garnock-Jones 02d0447ea6 Note re: legacy branch 2021-05-12 15:18:49 +02:00
Tony Garnock-Jones 66aed5c882 Updates to ts-plugin README, and a .dir-locals.el 2021-04-26 16:09:29 +02:00
Tony Garnock-Jones 6bec672087 Switch to yarn workspaces 2021-04-26 15:13:30 +02:00
Tony Garnock-Jones f338373ac5 README for ts-plugin 2021-04-26 14:21:48 +02:00
Tony Garnock-Jones ccd87c09f1 Adapt to latest Preserves changes 2021-03-03 10:28:10 +01:00
Tony Garnock-Jones dd281366c4 Bump preserves 2021-03-02 22:58:31 +01:00
Tony Garnock-Jones 608bdde8c8 New Preserves float interface 2021-02-17 15:36:43 +01:00
Tony Garnock-Jones 730d40b90b Avoid rollup warning 2021-02-15 20:08:58 +01:00
Tony Garnock-Jones 80b5d2977c Remove unwanted package-lock.json 2021-01-29 19:59:27 +01:00
Tony Garnock-Jones 63a2146f87 Fix handling of template string substitutions in scanner/reader; timer driver; flappy bird demo; associated repairs 2021-01-29 19:56:12 +01:00
Tony Garnock-Jones 65bae07fc1 Repair dumb logic bugs introduced during port to TypeScript 2021-01-29 15:41:11 +01:00
Tony Garnock-Jones b5a4a150ac Transmit actual Nodes across Syndicate bus, rather than HTML string 2021-01-29 15:40:56 +01:00
Tony Garnock-Jones b0fe7baf25 Remove unwanted debug output 2021-01-29 15:40:30 +01:00
Tony Garnock-Jones 16cacc16db Repair template instantiation 2021-01-29 15:39:32 +01:00
Tony Garnock-Jones 9e80ba45b8 Bump preserves version 2021-01-29 15:37:40 +01:00
Tony Garnock-Jones 5d2e776ecf Repair error caused by mutation of a set mid-iteration 2021-01-29 15:37:27 +01:00
Tony Garnock-Jones a64a8177eb Repair error caused by collecting fields too early in during 2021-01-29 15:36:53 +01:00
Tony Garnock-Jones 7423479de3 HTML example 2021-01-26 22:10:41 +01:00
Tony Garnock-Jones 82e9457359 More fixes 2021-01-26 22:09:21 +01:00
Tony Garnock-Jones 18f087d18e Port Syndicate HTML library 2021-01-25 22:19:41 +01:00
Tony Garnock-Jones 690ac12cc0 Many fixes to compiler; watchable syndicate-tsc 2021-01-25 22:16:52 +01:00
Tony Garnock-Jones 9e322c4cfb Refactor rollup configuration 2021-01-25 22:15:02 +01:00
Tony Garnock-Jones 7332096828 Watchable builds 2021-01-25 22:14:15 +01:00
Tony Garnock-Jones c82918d9a0 Publish
- @syndicate-lang/ts-plugin@0.1.1
2021-01-24 00:17:54 +01:00
Tony Garnock-Jones 0b1208d2fd Add cwd if no rootDir or rootDirs configured 2021-01-24 00:17:40 +01:00
Tony Garnock-Jones 49a036376a Publish
- @syndicate-lang/compiler@0.1.0
 - @syndicate-lang/core@0.5.0
 - @syndicate-lang/syndicatec@0.1.0
 - @syndicate-lang/ts-plugin@0.1.0
 - @syndicate-lang/tsc@0.1.0
2021-01-23 23:55:47 +01:00
Tony Garnock-Jones 5cbcba4f4a Lerna wants us to not ignore package-lock.json 2021-01-23 23:55:30 +01:00
Tony Garnock-Jones 8c80df1922 Move docker to todo 2021-01-23 23:54:38 +01:00
Tony Garnock-Jones 6b72bf9d78 watchall 2021-01-23 23:38:55 +01:00
Tony Garnock-Jones 2f8e1fb1ca Split up compiler into more packages 2021-01-23 23:38:00 +01:00
Tony Garnock-Jones 8259c15a7d Fixup log message locations in syndicate-tsc 2021-01-23 18:20:27 +01:00
Tony Garnock-Jones 99a87be883 tsserver plugin 2021-01-23 00:12:11 +01:00
Tony Garnock-Jones 3908f2ff26 Better source tracking through syndicate/ts 2021-01-20 21:56:01 +01:00
Tony Garnock-Jones 45e8ebef12 Convenience Makefile in example packages 2021-01-20 01:14:33 +01:00
Tony Garnock-Jones b8179cfbc1 Fix all target 2021-01-20 01:12:08 +01:00
Tony Garnock-Jones ea0ef03329 Toplevel veryclean target 2021-01-20 01:09:22 +01:00
Tony Garnock-Jones 0842c93994 Remove unwanted package-lock.json 2021-01-20 01:08:39 +01:00
Tony Garnock-Jones 7d8ea3c0d1 npmignore for syndicatec 2021-01-20 01:06:53 +01:00
Tony Garnock-Jones 94d05a37ca Repair package.json npx invocation 2021-01-20 00:55:52 +01:00
Tony Garnock-Jones d8099fa07a Ignore package-lock.json 2021-01-20 00:52:51 +01:00
Tony Garnock-Jones 5b1b535644 Typescript support 2021-01-20 00:52:40 +01:00
Tony Garnock-Jones 63c52d6b46 Dependencies among packages 2021-01-20 00:49:26 +01:00
Tony Garnock-Jones 97aaa5ef5d Better field typing 2021-01-19 21:05:04 +01:00
Tony Garnock-Jones a374cbfdf9 WIP adding typescript support to compiler; cleanups and fixes 2021-01-19 19:54:48 +01:00
Tony Garnock-Jones 7be246a400 Module activation; batch compilation 2021-01-19 15:13:42 +01:00
Tony Garnock-Jones 8c2729e3d8 Tweaks for in-browser use 2021-01-18 23:36:22 +01:00
Tony Garnock-Jones 3465f6b322 Repair use of global module type option 2021-01-18 23:36:05 +01:00
Tony Garnock-Jones 606daa625b Refactor, improve, and repair 2021-01-18 23:11:53 +01:00
Tony Garnock-Jones eaeb4b7df8 Use source position within templates, now that StringScanner is fixed 2021-01-18 15:32:51 +01:00
Tony Garnock-Jones a0712af032 Remove unused imports/variables 2021-01-18 15:32:38 +01:00
Tony Garnock-Jones f46276cf05 Repair indexing calculation in StringScanner to support nontrivial use of source positions 2021-01-18 15:32:21 +01:00
Tony Garnock-Jones 2ff3067fad Reusable compiler 2021-01-17 22:27:04 +01:00
Tony Garnock-Jones 6408493ea3 Better packaging 2021-01-17 14:14:02 +01:00
Tony Garnock-Jones fc23d1b779 First run of new compiler output! 2021-01-16 17:46:18 +01:00
Tony Garnock-Jones ed12c1c69c Improved field declaration parsing 2021-01-15 14:22:44 +01:00
Tony Garnock-Jones 71cde3daba Follow preserves changes for strict mode 2021-01-15 14:11:12 +01:00
Tony Garnock-Jones 0f6059cd59 Strict tsconfig; more major steps toward ocap style 2021-01-15 13:38:15 +01:00
Tony Garnock-Jones 595a13dfd6 Approach new syntax 2021-01-14 15:27:43 +01:00
Tony Garnock-Jones b60551a52b Major step toward eliminating ambient authority 2021-01-14 14:42:30 +01:00
Tony Garnock-Jones c5efff9a0f Limit pass count 2021-01-14 13:15:23 +01:00
Tony Garnock-Jones 2105886c5e WIP lax parser, matcher, rewriter and compiler 2021-01-14 13:09:53 +01:00
Tony Garnock-Jones bed03edcd3 Comment out debug printing 2021-01-12 14:34:45 +01:00
Tony Garnock-Jones 5a412a5d9b Repair silly mistake: republish on *change*, not on *same*! 2021-01-12 14:34:33 +01:00
Tony Garnock-Jones 1501a719e4 Use differently-named Preserves canonicalString function 2021-01-12 14:34:06 +01:00
Tony Garnock-Jones 58e190e419 Initial port to typescript/es6/babel-free. Far from working or complete 2021-01-11 23:35:36 +01:00
Tony Garnock-Jones bdc3dcc1d5 Don't automatically remove package-lock.json 2020-12-28 09:24:08 +01:00
dependabot[bot] 5d9e6dd6ab
Bump bl from 1.2.2 to 1.2.3
Bumps [bl](https://github.com/rvagg/bl) from 1.2.2 to 1.2.3.
- [Release notes](https://github.com/rvagg/bl/releases)
- [Commits](https://github.com/rvagg/bl/compare/v1.2.2...v1.2.3)

Signed-off-by: dependabot[bot] <support@github.com>
2020-12-28 08:21:53 +00:00
dependabot[bot] d69cc2c331 Bump ini from 1.3.5 to 1.3.8
Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.8.
- [Release notes](https://github.com/isaacs/ini/releases)
- [Commits](https://github.com/isaacs/ini/compare/v1.3.5...v1.3.8)

Signed-off-by: dependabot[bot] <support@github.com>
2020-12-28 09:19:06 +01:00
dependabot[bot] 1ce6865e3c
Bump node-fetch from 2.6.0 to 2.6.1
Bumps [node-fetch](https://github.com/bitinn/node-fetch) from 2.6.0 to 2.6.1.
- [Release notes](https://github.com/bitinn/node-fetch/releases)
- [Changelog](https://github.com/node-fetch/node-fetch/blob/master/docs/CHANGELOG.md)
- [Commits](https://github.com/bitinn/node-fetch/compare/v2.6.0...v2.6.1)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-13 04:08:57 +00:00
441 changed files with 34208 additions and 16070 deletions

4
.gitignore vendored
View File

@ -9,3 +9,7 @@ scratch/
*.did
.do_built
.do_built.dir/
tsconfig.tsbuildinfo
deps.mk

View File

@ -1 +0,0 @@
gpl-3.0.txt

674
LICENCE Normal file
View File

@ -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>.

36
Makefile Normal file
View File

@ -0,0 +1,36 @@
__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)
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
View File

@ -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
View File

@ -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
View File

@ -1 +0,0 @@
(for p in packages/*/; do echo $p/all; done | xargs redo-ifchange) && (echo Done. >&2)

View File

@ -1,4 +0,0 @@
#!/bin/sh
[ -d node_modules/lerna ] || npm i .
redo clean
redo -j$(nproc) all

View File

@ -1 +0,0 @@
for p in packages/*/; do echo $p/clean; done | xargs redo

368
do
View File

@ -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

View File

@ -0,0 +1,3 @@
index.js
index.js.map
src/gen/

View File

@ -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>

View File

@ -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",
"@syndicate-lang/core": "*",
"@syndicate-lang/html": "*",
"@syndicate-lang/ws-relay": "*"
},
"devDependencies": {
"@preserves/schema-cli": "0.995",
"@syndicate-lang/ts-plugin": "*",
"@syndicate-lang/tsc": "*",
"rollup": "^2.60",
"rollup-plugin-sourcemaps": "^0.6",
"typescript": "^4.9"
}
}

View File

@ -0,0 +1,4 @@
version 1 .
Present = <Present @username string>.
Says = <Says @who string @what string>.

View File

@ -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',
},
},
};

View File

@ -0,0 +1 @@
<require-service <relay-listener <tcp "0.0.0.0" 9001> $gatekeeper>>

View File

@ -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>

View File

@ -0,0 +1,158 @@
/// SPDX-License-Identifier: GPL-3.0-or-later
/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
import { fromJS, Bytes, Dataspace, Ref, Sturdy, AnyValue, Reader, Schemas, Embedded, 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 } 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) contactRemote(route);
}
function contactRemote(route: G.Route<Ref>) {
console.log('contactRemote', route);
during G.ResolvePath({
"route": route,
"addr": $addr,
"control": $control_e: Embedded,
"resolved": G.Resolved.accepted($remoteDs_e: Embedded),
}) => {
const remoteDs = remoteDs_e.embeddedValue;
const control = control_e.embeddedValue;
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);
}
}
}
}
}
}
}
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>`);
}

View File

@ -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);
}
}
}

View File

@ -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;
}

View File

@ -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/**/*"]
}

View File

@ -0,0 +1,440 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
"@preserves/core@0.995", "@preserves/core@^0.995.0":
version "0.995.0"
resolved "https://registry.yarnpkg.com/@preserves/core/-/core-0.995.0.tgz#d6badccd1fe56e45f23e01b4c8a33f421749e76b"
integrity sha512-0ICNcZ7HkBal1OJwoUuc1+KqoTQNJl2kYI3/nMtfrtNMem908unpydLo20k44Fgh/SRJekWaiRYSzKTcOo0+Tg==
"@preserves/schema-cli@0.995":
version "0.995.1"
resolved "https://registry.yarnpkg.com/@preserves/schema-cli/-/schema-cli-0.995.1.tgz#056027c76c54ef3395c787a58def12b17dcbd79c"
integrity sha512-9LSb5P+00P1ocx/saXy5d31bRastSJT7VQmrAltMgcx3BI5f/ChVVhBdn8P4+tRLUo02pTbGy4wBceHsyqCSZQ==
dependencies:
"@preserves/core" "^0.995.0"
"@preserves/schema" "^0.995.1"
chalk "^4.1"
chokidar "^3.5"
commander "^7.2"
glob "^7.1"
minimatch "^3.0"
"@preserves/schema@^0.995.1":
version "0.995.1"
resolved "https://registry.yarnpkg.com/@preserves/schema/-/schema-0.995.1.tgz#e218a4257171f1c3c6e7a2f4d7e1b88ce3ae998e"
integrity sha512-oh3SHMVOhqwFFZrzxnrAacBdUpdXtOyAoGyEOm9x0xehQ5NpYEnz/DdjXmW6iKeQ7Igoa1rSyibWbYfHV6fzvg==
dependencies:
"@preserves/core" "^0.995.0"
"@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.20.0":
version "0.20.0"
resolved "https://registry.yarnpkg.com/@syndicate-lang/compiler/-/compiler-0.20.0.tgz#cb0f94a272413c0b982f1009409696c9fdf6f9a9"
integrity sha512-tOZCi/AHD0jbXlIwFEmFmUPRC2rsLNNhwH8BvenwiAAni5SX7chxGYEOnLtCsx0/6pPUbNEKsisgv6eJOprCEA==
"@syndicate-lang/core@*", "@syndicate-lang/core@^0.27.0":
version "0.27.0"
resolved "https://registry.yarnpkg.com/@syndicate-lang/core/-/core-0.27.0.tgz#e62a85925663cc478be7ef8a5264c004df879872"
integrity sha512-1YwT21NEO2ShAP3GXtiUcvok99YISGDR7oq2eNie+Q3F4gKGWD11PaJfgQyK15Fd23wdsoiejb6OtJOPvolfHA==
dependencies:
salty-crypto "0.3.1"
"@syndicate-lang/html@*":
version "0.28.0"
resolved "https://registry.yarnpkg.com/@syndicate-lang/html/-/html-0.28.0.tgz#6071997edfd03fe42d28f300394291549a622011"
integrity sha512-yhVwbArxu58wdMUtoQEzVpNc63zRed1YBnXAFND8Q5jfBp2Maefr/FWyRg1VCTOb8yltxBvENwmAL3xNUrqYtg==
dependencies:
"@syndicate-lang/core" "^0.27.0"
"@syndicate-lang/ts-plugin@*":
version "0.28.0"
resolved "https://registry.yarnpkg.com/@syndicate-lang/ts-plugin/-/ts-plugin-0.28.0.tgz#c22cc66b11bca74228f2c5ed10049cf9e347025f"
integrity sha512-ieIlKV8ty2caIy1WlZpfydDYFEYAdHVm+cJxBnVvTRYmQkPjqQa7/2vOTdTHeTXEGabfdtQHwj+RCwCLhRa54g==
dependencies:
"@syndicate-lang/compiler" "^0.20.0"
"@syndicate-lang/core" "^0.27.0"
"@syndicate-lang/tsc@*":
version "0.28.0"
resolved "https://registry.yarnpkg.com/@syndicate-lang/tsc/-/tsc-0.28.0.tgz#17a7fbcb1f76016c9391c269c134edc1ced49747"
integrity sha512-+4rfCvodZ1Lbc6MDjL33JMUQNpffItd5/Ab9toww2DDXlsuLQhPYqwBY3PQfJ5KOneV4uUBPFxfc4LoRNqKGEQ==
dependencies:
"@syndicate-lang/compiler" "^0.20.0"
"@syndicate-lang/core" "^0.27.0"
glob "^7.1.6"
yargs "^16.2.0"
"@syndicate-lang/ws-relay@*":
version "0.29.0"
resolved "https://registry.yarnpkg.com/@syndicate-lang/ws-relay/-/ws-relay-0.29.0.tgz#25d8db2e21a141e0fc0ed3acbe9f55480dc72c56"
integrity sha512-cU1Ktj8uAhH71LpW1Oyb1qLowZLGf4v+cjTZ+ZScIJbgA2eZ4VGYQSqCfeaM+CzVWFDNI2Bpqb8J9uDI9ZDCig==
dependencies:
"@syndicate-lang/core" "^0.27.0"
salty-crypto "0.3"
"@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.2.0"
resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d"
integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==
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.2"
resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107"
integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==
dependencies:
fill-range "^7.0.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.0.1:
version "7.0.1"
resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40"
integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==
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, 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"

View File

@ -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
```

View File

@ -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;

View File

@ -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;

View File

@ -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()));

View File

@ -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;

View File

@ -0,0 +1,2 @@
#!/bin/sh
exec node -r @syndicate-lang/loader index.js

View File

@ -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())
}
}

View File

@ -0,0 +1,2 @@
index.js
index.js.map

View File

@ -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>

View File

@ -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",
"@preserves/schema": "0.995",
"@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"
}
}

View File

@ -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',
},
},
};

View File

@ -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');
}
}
}

View File

@ -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();
}
}
}
}

View File

@ -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()));
});

View File

@ -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;

View File

@ -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/**/*"]
}

View File

@ -0,0 +1,305 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
"@preserves/core@0.995", "@preserves/core@^0.995.0":
version "0.995.0"
resolved "https://registry.yarnpkg.com/@preserves/core/-/core-0.995.0.tgz#d6badccd1fe56e45f23e01b4c8a33f421749e76b"
integrity sha512-0ICNcZ7HkBal1OJwoUuc1+KqoTQNJl2kYI3/nMtfrtNMem908unpydLo20k44Fgh/SRJekWaiRYSzKTcOo0+Tg==
"@preserves/schema@0.995":
version "0.995.1"
resolved "https://registry.yarnpkg.com/@preserves/schema/-/schema-0.995.1.tgz#e218a4257171f1c3c6e7a2f4d7e1b88ce3ae998e"
integrity sha512-oh3SHMVOhqwFFZrzxnrAacBdUpdXtOyAoGyEOm9x0xehQ5NpYEnz/DdjXmW6iKeQ7Igoa1rSyibWbYfHV6fzvg==
dependencies:
"@preserves/core" "^0.995.0"
"@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.20.0":
version "0.20.0"
resolved "https://registry.yarnpkg.com/@syndicate-lang/compiler/-/compiler-0.20.0.tgz#cb0f94a272413c0b982f1009409696c9fdf6f9a9"
integrity sha512-tOZCi/AHD0jbXlIwFEmFmUPRC2rsLNNhwH8BvenwiAAni5SX7chxGYEOnLtCsx0/6pPUbNEKsisgv6eJOprCEA==
"@syndicate-lang/core@*", "@syndicate-lang/core@^0.27.0":
version "0.27.0"
resolved "https://registry.yarnpkg.com/@syndicate-lang/core/-/core-0.27.0.tgz#e62a85925663cc478be7ef8a5264c004df879872"
integrity sha512-1YwT21NEO2ShAP3GXtiUcvok99YISGDR7oq2eNie+Q3F4gKGWD11PaJfgQyK15Fd23wdsoiejb6OtJOPvolfHA==
dependencies:
salty-crypto "0.3.1"
"@syndicate-lang/syndicatec@*":
version "0.28.0"
resolved "https://registry.yarnpkg.com/@syndicate-lang/syndicatec/-/syndicatec-0.28.0.tgz#0d9f27b13971c91ee769e1ce39a9da1936b8b117"
integrity sha512-+pD0qPTX3Ve/AS1yZcSy1RcdYI70S7LzhLQLjpCzmwchvuySUhGHPlWlVHujA4TIrFB9A7+wtxREZ9IyZ6/P8Q==
dependencies:
"@syndicate-lang/compiler" "^0.20.0"
"@syndicate-lang/core" "^0.27.0"
glob "^7.1.6"
yargs "^16.2.0"
"@syndicate-lang/ts-plugin@*":
version "0.28.0"
resolved "https://registry.yarnpkg.com/@syndicate-lang/ts-plugin/-/ts-plugin-0.28.0.tgz#c22cc66b11bca74228f2c5ed10049cf9e347025f"
integrity sha512-ieIlKV8ty2caIy1WlZpfydDYFEYAdHVm+cJxBnVvTRYmQkPjqQa7/2vOTdTHeTXEGabfdtQHwj+RCwCLhRa54g==
dependencies:
"@syndicate-lang/compiler" "^0.20.0"
"@syndicate-lang/core" "^0.27.0"
"@syndicate-lang/tsc@*":
version "0.28.0"
resolved "https://registry.yarnpkg.com/@syndicate-lang/tsc/-/tsc-0.28.0.tgz#17a7fbcb1f76016c9391c269c134edc1ced49747"
integrity sha512-+4rfCvodZ1Lbc6MDjL33JMUQNpffItd5/Ab9toww2DDXlsuLQhPYqwBY3PQfJ5KOneV4uUBPFxfc4LoRNqKGEQ==
dependencies:
"@syndicate-lang/compiler" "^0.20.0"
"@syndicate-lang/core" "^0.27.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"

View File

@ -0,0 +1,2 @@
index.js
index.js.map

View File

@ -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>

View File

@ -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",
"@preserves/schema": "0.995",
"@syndicate-lang/core": "*"
},
"devDependencies": {
"@syndicate-lang/tsc": "*",
"rollup": "^2.60",
"rollup-plugin-sourcemaps": "^0.6",
"typescript": "^4.9"
}
}

View File

@ -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',
},
},
};

View File

@ -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');
}
}
}

View File

@ -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();
}
}
}
}

View File

@ -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()));
});

View File

@ -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;

View File

@ -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/**/*"]
}

View File

@ -0,0 +1,287 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
"@preserves/core@0.995", "@preserves/core@^0.995.0":
version "0.995.0"
resolved "https://registry.yarnpkg.com/@preserves/core/-/core-0.995.0.tgz#d6badccd1fe56e45f23e01b4c8a33f421749e76b"
integrity sha512-0ICNcZ7HkBal1OJwoUuc1+KqoTQNJl2kYI3/nMtfrtNMem908unpydLo20k44Fgh/SRJekWaiRYSzKTcOo0+Tg==
"@preserves/schema@0.995":
version "0.995.1"
resolved "https://registry.yarnpkg.com/@preserves/schema/-/schema-0.995.1.tgz#e218a4257171f1c3c6e7a2f4d7e1b88ce3ae998e"
integrity sha512-oh3SHMVOhqwFFZrzxnrAacBdUpdXtOyAoGyEOm9x0xehQ5NpYEnz/DdjXmW6iKeQ7Igoa1rSyibWbYfHV6fzvg==
dependencies:
"@preserves/core" "^0.995.0"
"@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.20.0":
version "0.20.0"
resolved "https://registry.yarnpkg.com/@syndicate-lang/compiler/-/compiler-0.20.0.tgz#cb0f94a272413c0b982f1009409696c9fdf6f9a9"
integrity sha512-tOZCi/AHD0jbXlIwFEmFmUPRC2rsLNNhwH8BvenwiAAni5SX7chxGYEOnLtCsx0/6pPUbNEKsisgv6eJOprCEA==
"@syndicate-lang/core@*", "@syndicate-lang/core@^0.27.0":
version "0.27.0"
resolved "https://registry.yarnpkg.com/@syndicate-lang/core/-/core-0.27.0.tgz#e62a85925663cc478be7ef8a5264c004df879872"
integrity sha512-1YwT21NEO2ShAP3GXtiUcvok99YISGDR7oq2eNie+Q3F4gKGWD11PaJfgQyK15Fd23wdsoiejb6OtJOPvolfHA==
dependencies:
salty-crypto "0.3.1"
"@syndicate-lang/tsc@*":
version "0.28.0"
resolved "https://registry.yarnpkg.com/@syndicate-lang/tsc/-/tsc-0.28.0.tgz#17a7fbcb1f76016c9391c269c134edc1ced49747"
integrity sha512-+4rfCvodZ1Lbc6MDjL33JMUQNpffItd5/Ab9toww2DDXlsuLQhPYqwBY3PQfJ5KOneV4uUBPFxfc4LoRNqKGEQ==
dependencies:
"@syndicate-lang/compiler" "^0.20.0"
"@syndicate-lang/core" "^0.27.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"

View File

@ -0,0 +1,2 @@
index.js
index.js.map

View File

@ -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>

View File

@ -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",
"@syndicate-lang/core": "*"
},
"devDependencies": {
"@syndicate-lang/syndicatec": "*",
"rollup": "^2.60",
"rollup-plugin-sourcemaps": "^0.6"
}
}

View File

@ -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',
},
},
};

View File

@ -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');
}
}
}

View File

@ -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();
}
}
}
}

View File

@ -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()));
});

View File

@ -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;

View File

@ -0,0 +1,275 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
"@preserves/core@0.995":
version "0.995.0"
resolved "https://registry.yarnpkg.com/@preserves/core/-/core-0.995.0.tgz#d6badccd1fe56e45f23e01b4c8a33f421749e76b"
integrity sha512-0ICNcZ7HkBal1OJwoUuc1+KqoTQNJl2kYI3/nMtfrtNMem908unpydLo20k44Fgh/SRJekWaiRYSzKTcOo0+Tg==
"@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.20.0":
version "0.20.0"
resolved "https://registry.yarnpkg.com/@syndicate-lang/compiler/-/compiler-0.20.0.tgz#cb0f94a272413c0b982f1009409696c9fdf6f9a9"
integrity sha512-tOZCi/AHD0jbXlIwFEmFmUPRC2rsLNNhwH8BvenwiAAni5SX7chxGYEOnLtCsx0/6pPUbNEKsisgv6eJOprCEA==
"@syndicate-lang/core@*", "@syndicate-lang/core@^0.27.0":
version "0.27.0"
resolved "https://registry.yarnpkg.com/@syndicate-lang/core/-/core-0.27.0.tgz#e62a85925663cc478be7ef8a5264c004df879872"
integrity sha512-1YwT21NEO2ShAP3GXtiUcvok99YISGDR7oq2eNie+Q3F4gKGWD11PaJfgQyK15Fd23wdsoiejb6OtJOPvolfHA==
dependencies:
salty-crypto "0.3.1"
"@syndicate-lang/syndicatec@*":
version "0.28.0"
resolved "https://registry.yarnpkg.com/@syndicate-lang/syndicatec/-/syndicatec-0.28.0.tgz#0d9f27b13971c91ee769e1ce39a9da1936b8b117"
integrity sha512-+pD0qPTX3Ve/AS1yZcSy1RcdYI70S7LzhLQLjpCzmwchvuySUhGHPlWlVHujA4TIrFB9A7+wtxREZ9IyZ6/P8Q==
dependencies:
"@syndicate-lang/compiler" "^0.20.0"
"@syndicate-lang/core" "^0.27.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"

View File

@ -0,0 +1,3 @@
index.js
index.js.map
src.ts/

View File

@ -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>

View File

@ -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",
"@preserves/schema": "0.995",
"@syndicate-lang/core": "*"
},
"devDependencies": {
"@syndicate-lang/syndicatec": "*",
"rollup": "^2.60",
"rollup-plugin-sourcemaps": "^0.6",
"typescript": "^4.9"
}
}

View File

@ -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',
},
},
};

View File

@ -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');
}
}
}

View File

@ -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();
}
}
}
}

View File

@ -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()));
});

View File

@ -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;

View File

@ -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/**/*"]
}

View File

@ -0,0 +1,287 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
"@preserves/core@0.995", "@preserves/core@^0.995.0":
version "0.995.0"
resolved "https://registry.yarnpkg.com/@preserves/core/-/core-0.995.0.tgz#d6badccd1fe56e45f23e01b4c8a33f421749e76b"
integrity sha512-0ICNcZ7HkBal1OJwoUuc1+KqoTQNJl2kYI3/nMtfrtNMem908unpydLo20k44Fgh/SRJekWaiRYSzKTcOo0+Tg==
"@preserves/schema@0.995":
version "0.995.1"
resolved "https://registry.yarnpkg.com/@preserves/schema/-/schema-0.995.1.tgz#e218a4257171f1c3c6e7a2f4d7e1b88ce3ae998e"
integrity sha512-oh3SHMVOhqwFFZrzxnrAacBdUpdXtOyAoGyEOm9x0xehQ5NpYEnz/DdjXmW6iKeQ7Igoa1rSyibWbYfHV6fzvg==
dependencies:
"@preserves/core" "^0.995.0"
"@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.20.0":
version "0.20.0"
resolved "https://registry.yarnpkg.com/@syndicate-lang/compiler/-/compiler-0.20.0.tgz#cb0f94a272413c0b982f1009409696c9fdf6f9a9"
integrity sha512-tOZCi/AHD0jbXlIwFEmFmUPRC2rsLNNhwH8BvenwiAAni5SX7chxGYEOnLtCsx0/6pPUbNEKsisgv6eJOprCEA==
"@syndicate-lang/core@*", "@syndicate-lang/core@^0.27.0":
version "0.27.0"
resolved "https://registry.yarnpkg.com/@syndicate-lang/core/-/core-0.27.0.tgz#e62a85925663cc478be7ef8a5264c004df879872"
integrity sha512-1YwT21NEO2ShAP3GXtiUcvok99YISGDR7oq2eNie+Q3F4gKGWD11PaJfgQyK15Fd23wdsoiejb6OtJOPvolfHA==
dependencies:
salty-crypto "0.3.1"
"@syndicate-lang/syndicatec@*":
version "0.28.0"
resolved "https://registry.yarnpkg.com/@syndicate-lang/syndicatec/-/syndicatec-0.28.0.tgz#0d9f27b13971c91ee769e1ce39a9da1936b8b117"
integrity sha512-+pD0qPTX3Ve/AS1yZcSy1RcdYI70S7LzhLQLjpCzmwchvuySUhGHPlWlVHujA4TIrFB9A7+wtxREZ9IyZ6/P8Q==
dependencies:
"@syndicate-lang/compiler" "^0.20.0"
"@syndicate-lang/core" "^0.27.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"

View File

@ -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)); }
});

View File

@ -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!
]

View File

@ -0,0 +1,2 @@
index.js
index.js.map

View File

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

View File

Before

Width:  |  Height:  |  Size: 7.9 KiB

After

Width:  |  Height:  |  Size: 7.9 KiB

View File

Before

Width:  |  Height:  |  Size: 7.6 KiB

After

Width:  |  Height:  |  Size: 7.6 KiB

View File

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 6.8 KiB

View File

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 6.8 KiB

View File

Before

Width:  |  Height:  |  Size: 7.7 KiB

After

Width:  |  Height:  |  Size: 7.7 KiB

View File

@ -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>

View File

@ -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",
"@preserves/schema": "0.995",
"@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"
}
}

View File

@ -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',
},
},
};

View File

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

View File

@ -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);
}
}
}
}

View File

@ -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/**/*"]
}

View File

@ -0,0 +1,309 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
"@preserves/core@0.995", "@preserves/core@^0.995.0":
version "0.995.0"
resolved "https://registry.yarnpkg.com/@preserves/core/-/core-0.995.0.tgz#d6badccd1fe56e45f23e01b4c8a33f421749e76b"
integrity sha512-0ICNcZ7HkBal1OJwoUuc1+KqoTQNJl2kYI3/nMtfrtNMem908unpydLo20k44Fgh/SRJekWaiRYSzKTcOo0+Tg==
"@preserves/schema@0.995":
version "0.995.1"
resolved "https://registry.yarnpkg.com/@preserves/schema/-/schema-0.995.1.tgz#e218a4257171f1c3c6e7a2f4d7e1b88ce3ae998e"
integrity sha512-oh3SHMVOhqwFFZrzxnrAacBdUpdXtOyAoGyEOm9x0xehQ5NpYEnz/DdjXmW6iKeQ7Igoa1rSyibWbYfHV6fzvg==
dependencies:
"@preserves/core" "^0.995.0"
"@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.20.0":
version "0.20.0"
resolved "https://registry.yarnpkg.com/@syndicate-lang/compiler/-/compiler-0.20.0.tgz#cb0f94a272413c0b982f1009409696c9fdf6f9a9"
integrity sha512-tOZCi/AHD0jbXlIwFEmFmUPRC2rsLNNhwH8BvenwiAAni5SX7chxGYEOnLtCsx0/6pPUbNEKsisgv6eJOprCEA==
"@syndicate-lang/core@*", "@syndicate-lang/core@^0.27.0":
version "0.27.0"
resolved "https://registry.yarnpkg.com/@syndicate-lang/core/-/core-0.27.0.tgz#e62a85925663cc478be7ef8a5264c004df879872"
integrity sha512-1YwT21NEO2ShAP3GXtiUcvok99YISGDR7oq2eNie+Q3F4gKGWD11PaJfgQyK15Fd23wdsoiejb6OtJOPvolfHA==
dependencies:
salty-crypto "0.3.1"
"@syndicate-lang/html@*":
version "0.28.0"
resolved "https://registry.yarnpkg.com/@syndicate-lang/html/-/html-0.28.0.tgz#6071997edfd03fe42d28f300394291549a622011"
integrity sha512-yhVwbArxu58wdMUtoQEzVpNc63zRed1YBnXAFND8Q5jfBp2Maefr/FWyRg1VCTOb8yltxBvENwmAL3xNUrqYtg==
dependencies:
"@syndicate-lang/core" "^0.27.0"
"@syndicate-lang/timer@*":
version "0.28.0"
resolved "https://registry.yarnpkg.com/@syndicate-lang/timer/-/timer-0.28.0.tgz#396499a37221d2b9d0a3c6fcb2bb751327d5f08c"
integrity sha512-nJASotUruo2aO7zj7K6oa6dKlCSmBQr57E3fcifaoOOnzVcKiTsTY8irtDP0gYSTSyePh0sdm/y3pH6vErnBwQ==
dependencies:
"@syndicate-lang/core" "^0.27.0"
"@syndicate-lang/ts-plugin@*":
version "0.28.0"
resolved "https://registry.yarnpkg.com/@syndicate-lang/ts-plugin/-/ts-plugin-0.28.0.tgz#c22cc66b11bca74228f2c5ed10049cf9e347025f"
integrity sha512-ieIlKV8ty2caIy1WlZpfydDYFEYAdHVm+cJxBnVvTRYmQkPjqQa7/2vOTdTHeTXEGabfdtQHwj+RCwCLhRa54g==
dependencies:
"@syndicate-lang/compiler" "^0.20.0"
"@syndicate-lang/core" "^0.27.0"
"@syndicate-lang/tsc@*":
version "0.28.0"
resolved "https://registry.yarnpkg.com/@syndicate-lang/tsc/-/tsc-0.28.0.tgz#17a7fbcb1f76016c9391c269c134edc1ced49747"
integrity sha512-+4rfCvodZ1Lbc6MDjL33JMUQNpffItd5/Ab9toww2DDXlsuLQhPYqwBY3PQfJ5KOneV4uUBPFxfc4LoRNqKGEQ==
dependencies:
"@syndicate-lang/compiler" "^0.20.0"
"@syndicate-lang/core" "^0.27.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"

View File

@ -0,0 +1,2 @@
index.js
index.js.map

View File

@ -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>

View File

@ -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",
"@preserves/schema": "0.995",
"@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"
}
}

View File

@ -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',
},
},
};

View File

@ -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, Embedded, 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 Embedded<Ref>).embeddedValue.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!");
}
}
}
});

View File

@ -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/**/*"]
}

Some files were not shown because too many files have changed in this diff Show More