async check()

in src/convert.ts [188:206]


  async check(requests: ParsedRequest[]): Promise<boolean> {
    const input = base64url.encode(
      JSON.stringify({ requests: getSlimRequests(requests) }),
    );
    if (execAsync === undefined) {
      throw new Error("Cannot use exec()");
    }
    const { stdout, stderr } = await execAsync(
      `${this.baseCmd} check ${input}`,
    );
    if (stdout) {
      const json = JSON.parse(base64url.decode(stdout));
      if (json.error) {
        throw new Error(json.error);
      }
      return json.return;
    }
    throw new Error(`Could not invoke exporter: ${stderr}`);
  }