Skip to content

authorizer tagged template generator returns AuthorizerBuilder#54

Merged
divarvel merged 1 commit into
eclipse-biscuit:mainfrom
wereHamster:patch-1
Jun 10, 2025
Merged

authorizer tagged template generator returns AuthorizerBuilder#54
divarvel merged 1 commit into
eclipse-biscuit:mainfrom
wereHamster:patch-1

Conversation

@wereHamster
Copy link
Copy Markdown
Contributor

@wereHamster wereHamster commented Jun 6, 2025

const auth = authorizer`...`
console.log({ auth })

prints

{ auth: AuthorizerBuilder { __wbg_ptr: 1729344 } }

Furthermore, without this change the following code does not type check:

const auth = authorizer`
  allow if operation("read");
`;

const authorizerBuilder = new AuthorizerBuilder();
authorizerBuilder.merge(auth); // <- needs `as any` to pass TypeScript

```js
const auth = authorizer`...`
console.log({ auth })
```

prints 

```
{ auth: AuthorizerBuilder { __wbg_ptr: 1729344 } }
```

Signed-off-by: Tomáš Čarnecký <tomc@caurea.org>
@divarvel
Copy link
Copy Markdown
Contributor

divarvel commented Jun 6, 2025

Thanks! The patch looks good, you'll just need to sign the Eclipse contributor agreement (more details on https://github.com/eclipse-biscuit/biscuit-rust/blob/main/CONTRIBUTING.md#eclipse-contributor-agreement)

This makes me think that CI should run typescript somehow.

@wereHamster
Copy link
Copy Markdown
Contributor Author

I created an eclipse account with the same email, signed the ECA, even linked my github account on the eclipse side. But still somehow it thinks I'm a different person. I don't know what else to do.

@divarvel
Copy link
Copy Markdown
Contributor

Hi, sorry about that, I’ll investigate. Could you give me your eclipse username please? I’ll sort things out on my end and merge your PR when it’s okay.

@wereHamster
Copy link
Copy Markdown
Contributor Author

@divarvel divarvel merged commit 2dc0467 into eclipse-biscuit:main Jun 10, 2025
4 checks passed
@divarvel
Copy link
Copy Markdown
Contributor

Thanks! there was an issue with the eca check service indeed, sorry for the inconvenience.

Don’t hesitate to ask if you have other questions or suggestions regarding the API. My next item here would be to include a ts test suite to make sure the ts type annotations are correctly aligned with the implementation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants