npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

alemonjs-mhy

v1.0.0-rc.3

Published

mhy-mod

Readme

阿柠檬-米哈游

必要环境 nodejssql(mysql/sqlite)redischrome

该扩展推荐使用alemongoalemondesk作为生产环境

alemongo https://github.com/lemonade-lab/alemongo

alemondesk https://github.com/lemonade-lab/alemondesk

指令一览

README_COMMAND

安装方式1: Git

alemongo/alemondesk

  • 地址
https://github.com/xiuxianjs/alemonjs-mhy.git

若访问受限,可使用如下加速地址

https://ghfast.top/https://github.com/xiuxianjs/alemonjs-mhy.git
  • branch
release

本地

git clone -b release --depth=1 https://github.com/xiuxianjs/alemonjs-mhy.git ./packages/alemonjs-mhy
yarn install #开始模块化
  • alemon.config.yaml
apps:
  alemonjs-mhy: true # 启动扩展

安装方式2: npm

yarn add alemonjs-mhy -W
  • alemon.config.yaml
apps:
  alemonjs-mhy: true # 启动扩展

开发指南

导出 API

import {
  // 类型
  type MihoyoGame,
  type StoredCookieData,
  type StokenData,
  type QueryResult,

  // 游戏检测
  resolveGame,

  // 账号操作
  getUserCookie,
  getUserMainUid,
  bindUserCookie,

  // Stoken
  getUserStoken,
  bindStoken,

  // 签到
  performGameSign,
  performBbsSign,

  // 统一查询(推荐)
  queryMihoyoApi,

  // 底层 API
  mysApiFetch,
  fetchGameRoles
} from 'alemonjs-mhy';

queryMihoyoApi — 统一查询

大多数查询场景推荐使用此方法,自动处理 Cookie 读取、UID 获取、区服识别:

const result = await queryMihoyoApi({
  userId: '用户ID',
  game: 'gs',
  api: 'dailyNote'
});

if (result.success) {
  console.log(result.data); // API 返回数据
  console.log(result.uid); // 使用的 UID
}

mysApiFetch — 底层调用

需要自行传入 Cookie 和 UID,适合定制化场景:

const res = await mysApiFetch({
  uid: '100000001',
  cookie: 'ltoken=xxx;ltuid=xxx;',
  api: 'dailyNote',
  game: 'gs'
});

免责声明

  • 勿用于以盈利为目的的场景

  • 代码开放,无需征得特殊同意,可任意使用。能备注来源最好,但不强求

  • 图片与其他素材均来自于网络,仅供交流学习使用,如有侵权请联系,会立即删除

引用

| Nickname | Contribution | | :--------------------------------------------------------: | -------------------- | | Yunzai | 米游社API来源 | | miao | 米游社API部分来源 | | cvs | 米游社SToken来源 | | Hamster | 模拟抽卡背景素材来源 | | 西风驿站 | 角色攻略图来源 | | 米游社友人A | 角色突破素材图来源 |