diff --git a/src/Tupfile b/src/Tupfile index 0cbc9ac..861ac6e 100644 --- a/src/Tupfile +++ b/src/Tupfile @@ -1,4 +1,5 @@ include_rules : foreach ../*.prs |> !preserves_schema_nim |> | {schema} -: uri_runner.nim | $(SYNDICATE_PROTOCOL) {schema} |> !nim_bin |> -: xdg_open.nim | $(SYNDICATE_PROTOCOL) {schema} |> !nim_bin |> $(BIN_DIR)/xdg-open +: uri_runner.nim | $(SYNDICATE_PROTOCOL) {schema} |> !nim_bin |> {bin} +: xdg_open.nim | $(SYNDICATE_PROTOCOL) {schema} |> !nim_bin |> $(BIN_DIR)/xdg-open {bin} +: foreach {bin} |> !assert_built |> diff --git a/src/uri_runner.nim b/src/uri_runner.nim index 2dae10c..53a8ca1 100644 --- a/src/uri_runner.nim +++ b/src/uri_runner.nim @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: ☭ 2022 Emery Hemingway +# SPDX-FileCopyrightText: ☭ Emery Hemingway # SPDX-License-Identifier: Unlicense import std/[asyncdispatch, re] @@ -13,10 +13,9 @@ proc rewrite(result: var Assertion; uri: string; regex: Regex) = pr.string = replacef(uri, regex, pr.string) apply(result, op) -bootDataspace("main") do (root: Ref; turn: var Turn): - var handlers: seq[RegexAction] - +runActor("main") do (root: Ref; turn: var Turn): connectStdio(root, turn) + var handlers: seq[RegexAction] onPublish(turn, root, ?ActionHandler) do (pat: string; entity: Ref; response: Assertion): handlers.add (re(pat, {reIgnoreCase, reStudy}), entity, response,) @@ -37,5 +36,3 @@ bootDataspace("main") do (root: Ref; turn: var Turn): # The Syndicate server retracts all assertions when # the config is rewritten. handlers.setLen 0 - -runForever() diff --git a/xdg_open_ng.nimble b/xdg_open_ng.nimble index e5ccbcc..7f8df07 100644 --- a/xdg_open_ng.nimble +++ b/xdg_open_ng.nimble @@ -1,6 +1,6 @@ # Package -version = "20230412" +version = "20230506" author = "Emery" description = "A better xdg-open" license = "Unlicense"