open-index/open-npm huggingface dataset:
npm package: @shad-claiborne/basic-oidc
Description: Basic OpenID Connect library
Author: Shad Claiborne
Latest version: 1.1.13

# This package is not intended for production environments.
```ts
const issuer = 'https://id.some-idp.com';
const provider:IdentityProvider = await createIdentityProvider(issuer);
const clientId = 'client-id';
const clientSecret = 'client-secret';
const client:Client = provider.createClient(clientId, clientSecret);
const codeChallenge = 'test123';
const authRequest:AuthorizationRequest = client.newAuthorizationRequest()
        .setRedirectUri('https://this-app.com/basic-oidc/callback')
        .setResponseMode('fragment')
        .setResponseType('code id_token')
        .setScope(['email', 'profile'])
        .setCodeChallenge(codeChallenge)
        .setState('data');
const authURL = authRequest.toURL();
const window.location.replace(authURL.href);
// IdP redirects back to https://this-app.com/basic-oidc/callback - 
// i.e. A user has granted us authorization
const authResponseParams = 
        new URLSearchParams(window.location.hash.substring(1));
const authResponse = 
        Object.fromEntries(authResponseParams) as AuthorizationResponse;
const tokenSet:TokenSet = 
        await client.requestAccess(authResponse, { codeVerifier: codeChallenge });
const id:Identity = await provider.getIdentity(tokenSet);
// await client.revokeAccess(tokenSet);
```
npm package: @shad-claiborne/hono-middleware-oidc
Description: OIDC middleware for Hono
Author: Shad Claiborne
Latest version: 1.1.4

# This package is not intended for production environments.
`wrangler configuration`
```json
"vars": {
        "HONO_OIDC_ISSUER": "https://some-idp",
        "HONO_OIDC_CLIENT_ID": "client-id",
        "HONO_OIDC_CLIENT_SECRET": "client-secret",
        "HONO_OIDC_REDIRECT_URI": "https://your-authenticated-app/auth/callback",
        "HONO_OIDC_COOKIE_SECRET": "cookie-secret",
        "HONO_OIDC_ID_TOKEN_COOKIE": "id-token",
        "HONO_OIDC_REFRESH_TOKEN_COOKIE": "refresh-token",
        "HONO_OIDC_ACCESS_TOKEN_COOKIE": "access-token",
        "HONO_OIDC_CODE_VERIFIER_COOKIE": "code-verifier"
}
```
### Usage
```ts
import {addIdentity, checkIdentity, handleAuth, receiveAuth} from '@shad-claiborne/hono-middleware-oidc'

...

// Add the identity claims to the request for all routes except the redirect URI
app.use('*', except('/auth/callback', addIdentity));
app.use('*', except(['/login', '/auth/callback'], checkIdentity));

// The endpoint to which the authorization server provides the user's authorization
app.use('/auth/callback', receiveAuth);

// Send the browser to this endpoint to begin the authorization flow
// Note this endpoint assumes "addIdentity" precedes it
app.use('/login', handleAuth);

// Example ajax endpoint for getting the identity claims
app.get('/async/api/identity', async (c) => {
    return c.json(c.get('identity'));
});

...
```
npm package: @shad02w/cmz
Description: A helpful commit cli 😂😂😂😂😂😂😂
Author: Alvis Tse
Latest version: 1.0.13

# CMZ

A helpful commit cli 😂😂😂😂😂😂😂

## Installation

### Global

```bash
yarn add global @shad02w/cmz
# or
npm i -g @shad02w/cmz
# then commit using
cmz
```

### Local

```bash
yarn add -D @shad02w/cmz
# then commit using
yarn cmz
```



## Configurations

Add `cmz.config.js` to the root of workspace and repo, add setup as following:

```javascript
const { defineConfig } = require('@shad02w/cmz')

module.exports = defineConfig({
    commitTypes: [
        {
            name: 'Refactor',
            description: 'A code change that neither fixes a bug nor adds a feature',
        },
        {
            name: 'Fix',
            description: 'A bug fix',
        },
        {
            name: 'Upgrade',
            description: 'Dependencies update and change',
        },
        {
            name: 'Publish',
            description: 'Release a new version to npm',
        },
    ],
    scopes: [
        {
            name: 'app',
            description: 'App for native platform',
        },
        {
            name: 'web',
            description: 'Web application',
        },
        {
            name: 'shared',
            description: 'Shared code between web and app',
        },
    ],
    // Final commit message reolve to
    resolve: ({ commitType, message }) => `(${commitType.name}) ${message}`,
})
```

You can also define configuration file in Typescirpt , to do that , create a `cmz.config.ts` file and set it up similar to above

```javascript
import { defineConfig } from '@shad02w/cmz'

export default defineConfig({
    // Your config here
})
```

and also install `ts-node`, without `ts-node` the config file will not able to transpile.

If you do not want to put config file on root of the workspace or want a alternative config file name, you can use 

```shell
cmz -c "your config file path here"
```

to specify a config file.

## Options 

```shell
# cmz -h
A simple git commit tool

USAGE
  $ cmz

OPTIONS
  -c, --config=config  custom config file path
  -h, --help           show CLI help
  -v, --version        show CLI version
```



## Contributors

<a>
  <img src = "https://contrib.rocks/image?repo=Shad02w/cmz"/>
</a>