open-index/open-npm huggingface dataset:
npm package: @starport/vue
Description: A library of Vue 3 components for building frontends for cosmos-sdk chains
Author: Tendermint, Inc
Latest version: 0.3.10

# `@starport/vue`

A collection of Vue 3 components to help build [Ignite CLI](https://github.com/ignite-hq/cli) front-end applications.

## Install

Assuming you have a Vue 3 project, just run:

```
npm install --save @starport/vue
```

The components also require `@starport/vuex` to be installed that is set as a peer dependency. For more information, see [packages/vuex](https://github.com/ignite-hq/web/tree/develop/packages/vuex).

## Usage

If you want to import the entire library, in your `main.js` file:

```js
import { createApp } from 'vue'
import App from './App.vue'
import store from './store' // See @starport/vuex documentation
import vueLib from '@starport/vue'

const app = createApp(App)
app.use(store).use(vueLib).mount('#app')
```

You can also import only specific components in your `main.js` file:

```js
import { createApp } from 'vue'
import App from './App.vue'
import store from './store' // See @starport/vuex documentation
import { SpTokenTransfer } from '@starport/vue'

const app = createApp(App)
app.use(store).use(SpTokenTransfer).mount('#app')
```

## Components

...
npm package: @starportal/cf-workers-session-store
Description: Provide Rails-like session store for Cloudflare Workers
Author: Aotokitsuruya
Latest version: 0.1.0

Cloudflare Workers Session Store
===

This package provides a Rails-like session store.

## Usage

### createCookieStore

Create a CookieStore middleware to provide `data.session`

```ts
# functions/_middleware.ts
import { createCookieStore } from '@starportal/cf-workers-session-store'

const sessionStore = async(ctx) => createCookieStore({ password: ctx.env.SESSION_PASSWORD })(ctx)
const userFinder = async({ data, next }) => {
  if(!data.session) {
    return next()
  }

  // Read from `Cookie: _user_id=1`
  const userID = await data.session.get('_user_id')

  // Do something...

  return next();
}

export const onRequest = [sessionStore, userFinder];
```

### IStore

The interface implements `put` and `get` which have same interface as `KVNamespace`

```ts
// Write
const store = new CookieStore({ writer: request, reader: tmpResponse })
await store.put('_user_id', 1, ['HttpOnly', 'SameSite=Lax'])

// Read
await store.get('_user_id')
```