@bluelibs/runner - v6.3.1
    Preparing search index...

    Function scope

    • Creates a scoped isolation entry with channel-level precision.

      When used inside .isolate({ deny: [...] }) or .isolate({ only: [...] }), controls which interaction types the rule applies to. Channels default to true (all blocked) — pass false to opt-out of specific channels.

      Parameters

      • target: IsolationScopeTarget | readonly IsolationScopeTarget[]
      • Optionalchannels: IsolationChannels

      Returns IsolationScope

      import { r, scope, subtreeOf } from "@bluelibs/runner";

      const app = r.resource("app")
      .isolate({
      deny: [
      scope(dangerousTask), // block all channels
      scope(userCreated, { listening: false }), // block emit, allow listen
      scope([subtreeOf(lib), subtreeOf(agent)], { tagging: false }), // block deps/listen/mw
      scope(subtreeOf(internalModule), { dependencies: false }), // block listen/tag/mw only
      ],
      })
      .build();