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

@liujitcn/kratos-uni-app-core

v0.0.29

Published

Runtime, navigation, authentication, and build foundation for Kratos apps.

Readme

@liujitcn/kratos-uni-app-core

@liujitcn/kratos-uni-app-core 是应用底座包,提供模块协议、启动流程、动态导航、认证与请求、共享状态、基础页面和构建期页面装配能力。业务模块只能通过本包公开 exports 使用这些能力。

目录结构

packages/core
├── src
│   ├── api                    # base、system 基础接口 service
│   ├── components             # 启动状态和自绘 tabBar
│   ├── rpc                    # Buf 生成的 TypeScript 接口类型
│   ├── static                 # 底座图片和 tab 图标
│   ├── stores                 # Pinia 设置与用户状态
│   ├── styles                 # 全局基础样式
│   ├── types                  # uni-app 与第三方类型补充
│   ├── utils                  # HTTP、认证、文件和导航工具
│   ├── views                  # 首页、登录、状态页和 WebView
│   ├── bootstrap.ts           # 应用初始化
│   ├── module.ts              # 模块定义与注册表
│   ├── navigation.ts          # base-menu 导航解析与缓存
│   ├── pages.ts               # core 页面声明
│   └── vite.ts                # 自动页面装配插件
├── test                       # 导航匹配和 Vite 装配测试
├── tsconfig.json
└── package.json

src/rpc 是生成产物,只能通过 workspace 根目录的 pnpm generate:rpc 更新;该命令委托 backend 的 make ts-uni-appbackend/api/buf.uni-app.typescript.gen.yaml 生成。

功能

  • 定义 KratosAppModuleviewKey、静态页面覆盖和模块图标协议。
  • /v1/app/base/menu 加载 999 下的扁平菜单,按 parent_id 构建树,以二级页面生成 tabBar,并原子更新动态路由和层级导航。
  • 按匿名态、登录态缓存导航,并在远端不可用时回退到最近缓存或默认菜单。
  • 统一认证、token、HTTP、上传、配置、Pinia 和基础页面能力。
  • 构建时扫描模块 src/views/**/*.vue,逐文件合并模块 static,生成宿主页并在退出时按事务精确恢复。

公开入口

  • @liujitcn/kratos-uni-app-core:运行时、导航、store 和组件。
  • @liujitcn/kratos-uni-app-core/module:模块协议和 core 模块。
  • @liujitcn/kratos-uni-app-core/vite:Vite 配置与页面装配插件。
  • @liujitcn/kratos-uni-app-core/api/*components/*.vueutils/*views/*:白名单子路径。

构建与验证命令见 workspace 文档