Skip to content

Releases: StyraInc/opa-typescript

@styra/[email protected]

05 Jul 07:35
dac958e
Compare
Choose a tag to compare

Patch Changes

  • be7bcb5: AuthzProviderContext is a type now (was interface)

    This was done to remove code duplication. No functional changes. But since the
    interface was exported before, some care might have to be taken when updating.

@styra/[email protected]

03 Jul 09:28
Compare
Choose a tag to compare

Minor Changes

  • d2b2abc: Add fromResults to support unwrapping policy evaluation results

    This allows us to unwrap results returned from OPA to turn them into a boolean.

    Previously, anything different from undefined and false was taken to mean "authorized". Now, we can work with policy evaluation results like

    {
      "result": false,
      "details": "..."
    }

    by providing a fromResults function like

    const fromResults = (r?: Result): boolean =>
      ((r as Record<string, any>)["foobar"] as boolean) ?? false;

    As with input and path, this can (optionally) be set with <AuthzProvider> (property defaultFromResults), and with <Authz> (property fromResult), or passed to useAuthz().

@styra/[email protected]

01 Jul 12:19
Compare
Choose a tag to compare

Patch Changes

  • 6365272: Update README for v0.2.0 change

@styra/[email protected]

01 Jul 12:00
Compare
Choose a tag to compare

Minor Changes

  • aa75275: Remove function support from component

    Allowing a function had unintended consequences for performance, given how
    React works. Now, there is only one way to do it: fallback for non-truthy
    results, and children for truthy results.

@styra/[email protected]

28 Jun 09:12
e1cd63b
Compare
Choose a tag to compare

Minor Changes

  • f7eab9c: Remove default export: It seems simpler to only rely on the three exports we have:

    1. import { AuthzProvider } from "@styra/opa-react";
    2. import { Authz } from "@styra/opa-react";
    3. import { useAuthz } from "@styra/opa-react";

    (Besides types and interfaces.)

@styra/[email protected]

27 Jun 11:56
422b549
Compare
Choose a tag to compare

Patch Changes

  • 906a90c: build packages when publishing

@styra/[email protected]

27 Jun 11:41
a17bd83
Compare
Choose a tag to compare

Patch Changes

  • 770d833: fix dist/ missing in package

@styra/[email protected]

27 Jun 09:24
0d19012
Compare
Choose a tag to compare

Patch Changes

  • ab7c009: Fix package.json (add "browser" next to "main")

    Before, create-react-app (or webpack, rather) failed to resolve @styra/opa-react.

@styra/[email protected]

27 Jun 08:24
c7d1186
Compare
Choose a tag to compare

Patch Changes