hclang 0.43.0 → 0.44.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/esm/cli/hc.js CHANGED
@@ -10,7 +10,7 @@ import { runfile } from "./runfile.js";
10
10
  import { Prompt } from "./prompt.js";
11
11
  import { DenoFileStore } from "./resource-store.js";
12
12
  import { withHCBundle } from "../lib/bundle/hc-bundle.js";
13
- import { CLOCK_SCHEME, ClockHandler, Frame, FrameResource, RealClock, RESOURCE_ROOT_KEY, ResourceHandlers, } from "../lib/frames.js";
13
+ import { CLOCK_SCHEME, ClockHandler, DISPATCH_KEY, dispatchNamespace, Frame, FrameResource, RealClock, RESOURCE_ROOT_KEY, ResourceHandlers, } from "../lib/frames.js";
14
14
  /**
15
15
  * @module hc
16
16
  *
@@ -65,6 +65,8 @@ export function getEval(env, out) {
65
65
  *
66
66
  * The root is a fresh temp directory with the bundled, read-only `hc/` files
67
67
  * laid over it, so a program can import them without reaching anything else.
68
+ * The dispatcher is bound beside it (`$$.dispatch`), so a testdoc can hand
69
+ * its own closures to each dispatch policy (`hc/art-dispatch-vact.hc`).
68
70
  *
69
71
  * Exported so a test can run a source unit under the authority the CLI actually
70
72
  * grants, rather than under an empty namespace that would make the resource
@@ -79,6 +81,7 @@ export function getHost(context = {}) {
79
81
  // and nowhere else.
80
82
  const host = new Frame({ ...context });
81
83
  host.set(RESOURCE_ROOT_KEY, FrameResource.root(withHCBundle(new DenoFileStore()), getHandlers()));
84
+ host.set(DISPATCH_KEY, dispatchNamespace());
82
85
  return host;
83
86
  }
84
87
  /**