open-index/open-npm huggingface dataset:
npm package: @justwant/user
Description: User entity and identity via defineUser and createUserService.
Latest version: 0.1.0

# @justwant/user

User entity and identity via `defineUser` and `createUserService`.

## Features

- **defineUser** — defines the User identity type (no params, canonical "user")
- **createUserService** — CRUD operations via UsersRepo (findById, findByEmail, create, update, delete)
- **Type safety** — UserRef compatible with permission (defineActor from) and membership (MemberLike)
- **Repo aligned** — UsersRepo follows @justwant/db pattern (findById, findOne, findMany, create, update, delete)

## Installation

```bash
bun add @justwant/user
```

## Usage

```ts
import { defineUser, createUserService } from "@justwant/user";

const userDef = defineUser();
const userRef = userDef("usr_1"); // { type: "user", id: "usr_1" }

const userService = createUserService({
  repo: myUsersRepo, // implementation via @justwant/db
});

await userService.findById("usr_1");
await userService.findByEmail("alice@example.com");
await userService.create({ email: "alice@example.com", name: "Alice" });
await userService.update("usr_1", { name: "Alicia" });
await userService.delete("usr_1");
```

## Integration

- **permission** : `defineActor({ from: defineUser() })` → ActorDef for defineRealm
- **membership** : `createMembershipService({ groups: [defineGroup({ name: "org", member: defineUser() })] })`
- **context** : `defineSlot({ key: "user", resolve: async (ctx) => userService.findById(ctx.initial.userId) })`

## Subpath exports

```ts
import { defineUser, createUserService } from "@justwant/user";
import type { User, UserRef, UsersRepo, CreateInput } from "@justwant/user/types";
import { UserError, UserNotFoundError, DuplicateEmailError } from "@justwant/user/errors";
```

## License

MIT
npm package: @justwant/waitlist
Description: Inscription, referral, position, invitations
Latest version: 0.2.1

# @justwant/waitlist

Waitlist management: subscription, position, FIFO, invitations, referral.

## Install

```bash
bun add @justwant/waitlist
```

## Usage

### Define a list

```ts
import { defineList, createWaitlistService, createMemoryWaitlistAdapter } from "@justwant/waitlist";

// Simple list
const betaList = defineList({ id: "beta" })();

// Parameterized list (e.g. per product)
const launchList = defineList({ id: "launch", params: ["productId"] });
const list = launchList("prod-1"); // listKey: "launch:prod-1"
```

### Create service

```ts
const repo = createMemoryWaitlistAdapter(); // or createWaitlistDbAdapter with @justwant/db
const service = createWaitlistService({ repo });

// Subscribe
await service.subscribe(betaList, { type: "user", id: "u1" });
await service.subscribe(betaList, { type: "user", id: "u1" }, { metadata: { source: "landing" } });

// Check & count
await service.isSubscribed(betaList, { type: "user", id: "u1" }); // true
await service.count(betaList); // 1

// Position
await service.getPosition(betaList, { type: "user", id: "u1" }); // { position: 1, total: 1 }

// FIFO pop
const first = await service.pop(betaList);

// Invite (with referral metadata)
await service.invite(betaList, { type: "user", id: "inviter" }, { type: "user", id: "invitee" });

// Bulk
await service.subscribeMany(betaList, [actor1, actor2]);
await service.unsubscribeMany(betaList, [actor1]);
```

### With referral service

```ts
import { createReferralService } from "@justwant/referral";

const referralService = createReferralService({ repo: referralRepo });
const service = createWaitlistService({
  repo: waitlistRepo,
  referralService,
  offerKeyForList: (listKey) => `waitlist:${listKey}`,
});

await service.invite(list, inviter, invitee, { campaign: "beta" });
```

### Plugins

- **auditPlugin** — log subscribe/unsubscribe/pop
- **cleanupExpired** — remove expired entries (call via cron)
- **invite** — standalone helper when not using createWaitlistService

## API

| Method | Description |
|--------|-------------|
| `defineList(config)` | Define a portable list |
| `createWaitlistService(options)` | Create service with repo |
| `createWaitlistDbAdapter(options)` | DB adapter from table |
| `createMemoryWaitlistAdapter()` | In-memory adapter (testing) |
| `subscribe(list, actor, opts?)` | Add to waitlist |
| `unsubscribe(list, actor)` | Remove from waitlist |
| `isSubscribed(list, actor)` | Check membership |
| `count(list)` | Total subscribers |
| `listSubscribers(list, opts?)` | List with pagination |
| `getPosition(list, actor)` | Position in queue |
| `pop(list)` | Remove and return first (FIFO) |
| `invite(list, inviter, invitee, metadata?)` | Subscribe with referral |
| `subscribeMany` / `unsubscribeMany` | Bulk operations |
npm package: @justway/nuxt
Description: UI library for Nuxt.js
Latest version: 0.0.3

<!--
Get your module up and running quickly.

Find and replace all on all files (CMD+SHIFT+F):
- Name: My Module
- Package name: my-module
- Description: My new Nuxt module
-->

# My Module

[![npm version][npm-version-src]][npm-version-href]
[![npm downloads][npm-downloads-src]][npm-downloads-href]
[![License][license-src]][license-href]
[![Nuxt][nuxt-src]][nuxt-href]

My new Nuxt module for doing amazing things.

- [✨ &nbsp;Release Notes](/CHANGELOG.md)
<!-- - [🏀 Online playground](https://stackblitz.com/github/your-org/my-module?file=playground%2Fapp.vue) -->
<!-- - [📖 &nbsp;Documentation](https://example.com) -->

## Features

<!-- Highlight some of the features your module provide here -->
- ⛰ &nbsp;Foo
- 🚠 &nbsp;Bar
- 🌲 &nbsp;Baz

## Quick Setup

Install the module to your Nuxt application with one command:

```bash
npx nuxi module add my-module
```

That's it! You can now use My Module in your Nuxt app ✨


## Contribution

<details>
  <summary>Local development</summary>
  
  ```bash
  # Install dependencies
  npm install
  
  # Generate type stubs
  npm run dev:prepare
  
  # Develop with the playground
  npm run dev
  
  # Build the playground
  npm run dev:build
  
  # Run ESLint
  npm run lint
  
  # Run Vitest
  npm run test
  npm run test:watch
  
  # Release new version
  npm run release
  ```

</details>


<!-- Badges -->
[npm-version-src]: https://img.shields.io/npm/v/my-module/latest.svg?style=flat&colorA=020420&colorB=00DC82
[npm-version-href]: https://npmjs.com/package/my-module

[npm-downloads-src]: https://img.shields.io/npm/dm/my-module.svg?style=flat&colorA=020420&colorB=00DC82
[npm-downloads-href]: https://npmjs.com/package/my-module

[license-src]: https://img.shields.io/npm/l/my-module.svg?style=flat&colorA=020420&colorB=00DC82
[license-href]: https://npmjs.com/package/my-module

[nuxt-src]: https://img.shields.io/badge/Nuxt-020420?logo=nuxt.js
[nuxt-href]: https://nuxt.com
npm package: @justwe7/cli
Description: 集成本地工具，远端拉取项目模板快速开发的脚手架工具
Author: justwe7
Latest version: 0.0.6

# @justwe7/cli
集成本地工具，远端拉取项目模板快速开发的脚手架工具

### 安装
`sudo npm i @justwe7/cli -g`

### 功能
| 指令                                     | 功能描述                                               | 参数说明                                               |
| ---------------------------------------- | ------------------------------------------------------ | ------------------------------------------------------ |
| `jw create`                              | 快速拉取项目模板                                       | -                                                      |
| `jw zy <chineseStr...>`                  | 将中文翻译为英文                                       | 要翻译的中文字符串，支持空格连接                       |
| `jw yz <englishStr...>`                  | 将英文翻译为中文                                       | 要翻译的英文字符串，支持空格连接                       |
| `jw gflow <demandName> [-s <separator>]` | 基于远端主干拉取dev_userName_demandName_YYYYMMDD的分支 | demandName需求名称，separator为指定的分隔符，默认为`_` |
### 开发

**调试**

- 使用 `npm test [Commands]` 代替 `jw [Commands]`
- 执行 `npm run dev`，执行 `jw [Commands]` 调试

### 发布
`npm run build`
npm package: @justwe7/mp-devtool-plugin
Description: 解决小程序自带vconsole无法查看网络请求，storage等痛点。避免测试过程需要使用抓包工具或者在开发者工具进行。 ![20220915_113250.gif](https://s2.loli.net/2022/09/15/JX9pO6ZotFbSs3k.gif)
Author: justwe7
Latest version: 0.0.3

# 小程序devtool增强工具
解决小程序自带vconsole无法查看网络请求，storage等痛点。避免测试过程需要使用抓包工具或者在开发者工具进行。
![20220915_113250.gif](https://s2.loli.net/2022/09/15/JX9pO6ZotFbSs3k.gif)

## 安装
```bash
npm i @justwe7/mp-devtool-plugin -D
```

## 使用
### uniapp
1. 修改`src/pages.json`，新增全局自定义组件: `"jw-tool": "/wxcomponents/jw-devtool/index"`
```json
{
  "pages": [],
  "globalStyle": {
    "usingComponents": {
      "jw-tool": "/wxcomponents/jw-devtool/index"
    }
  }
}
```

2. vue.config.js:
```js
const { JwDevtoolPlugin } = require('@justwe7/mp-devtool-plugin');
module.exports = {
  chainWebpack: config => {
    // 禁止在生产环境注入!
    // if (process.env.NODE_ENV !== 'production') { // TODO 增加环境变量标识作为判断条件
    config.module
        .rule('mp-devtool-loader')
        .test(/\.vue$/)
        .use('@justwe7/mp-devtool-plugin')
        .loader('@justwe7/mp-devtool-plugin')
        .options({})

    config.plugin('mp-devtool-plugin').use(JwDevtoolPlugin)
    // }
  }
};
```

## 实现思路
1. 通过plugin注入新的entry，劫持network，与后续引入的组件进行数据通信
2. 通过loader，将每个页面template下插入自定义组件名称
3. 通过loader，将自定义组件定义到全局：pages.json->globalStyle->usingComponents （区分uniapp）
4. 上一步的组件定义需要复制组件源码（考虑平台，看是否需要插件处理。使用者自行处理是否更灵活或者需要接收参数进行配置）

## TODO
- [x] network查看
- [x] uniapp兼容
- [ ] storage查看
- [ ] 支持小程序path携带指定参数跳转
- [ ] 原生小程序兼容
npm package: @justwe7/stylelint-order-standard
Description: ```bash npm i @justwe7/stylelint-order-standard -D ```
Author: justwe7
Latest version: 0.0.3

# @justwe7/stylelint-order-standard

## Installation
```bash
npm i @justwe7/stylelint-order-standard -D
```

## Usage
Set your stylelint config to:
```json
{
  extends: [
    '@justwe7/stylelint-order-standard'
  ]
}
```

## Rules
[config](https://github.com/justwe7/npm-pkgs/blob/main/stylelint-order-standard/index.js)

Code source: [https://github.com/ream88/stylelint-config-idiomatic-order](https://github.com/ream88/stylelint-config-idiomatic-order)