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

lafrun

v0.1.0

Published

The laf runtime

Readme

lafrun

一个可以在本地运行的laf运行时

使用

安装

npm install -g lafrun

运行项目

lafrun run [path]

path: (可选)项目路径

创建项目

lafrun app init

函数操作

  • 创建函数
lafrun func create <name>

name:函数名称,如包含/,在访问url上也会带上/

  • 删除函数
lafrun func del <name>

name:函数名称

  • 查看函数列表
lafrun func list

依赖

cli: commandertypescriptyamldayjsnode-emojipromptscli-table3@types/node(--save-dev) runtime: express``cors``express-xml-bodyparser``dotenv``url``mongodb``database-proxy``ws``jsonwebtoken``pako``multer``node-modules-utils``chalk``lodash``source-map-support``@lafjs/cloud``openapi3-ts/oas30

引用

  • runtime\handler\typings.ts->router.ts
  • runtime\handler\db-proxy.ts->router.ts
  • runtime\handler\invoke.ts->router.ts
  • runtime\handler\openapi.ts->router.ts

Func

  • func.name
  • func.desc
  • func.methods
  • func.tags
  • func.source
    • .code
    • .compiled

file

LAFRUN\SRC\RUNTIME │ config.ts 配置文件 │ constants.ts 常量 │ db.ts 数据库管理 DatabaseAgent │ index.ts 运行 run() │ init.ts 初始化app 安装依赖 │ local.ts 读取本地-将删除 │ ├─handler │ db-proxy.ts handleDatabaseProxy │ invoke.ts handleInvokeFunction │ openapi.ts handleOpenAPIDefinition │ router.ts 路由入口 │ typings.ts handlePackageTypings │ └─support │ cloud-sdk.ts 云函数sdk初始化 createCloudSdk invokeInFunction │ init-hook.ts 执行__init__函数 │ lang.ts 语言工具 │ logger.ts 日志工具 │ lsp.ts LSP Server LspWebSocket launchLsp │ module-hot-reload.ts 模块热重载 │ openapi.ts OpenAPI支持 │ policy.ts PolicyAgent 策略代理类 - 管理多个策略 - 初始化策略注入器 │ token.ts jwt工具 │ types.ts 类型 │ utils.ts 工具库 │ ws.ts ws相关 │ ├─change-stream │ conf-change-stream.ts 配置文件变更流 │ └─engine cache.ts 函数缓存 FunctionCache console.ts 控制台日志输出 Console executor.ts 函数执行器 FunctionExecutor index.ts 入口 module.ts 模块管理 FunctionModule types.ts 类型

process.env Config

  • *DB_URI 数据库url
  • *SERVER_SECRET 服务器密钥
  • LOG_LEVEL || 'debug' 日志级别
  • DISPLAY_LINE_LOG_LEVEL || 'error' 显示行日志级别
  • LOG_DEPTH || 1 对象日志深度
  • __PORT || 8000 端口
  • *NODE_ENV 环境
  • RUNTIME_IMAGE || 'lafyun/runtime-node:latest' 运行时镜像
  • *APPID 应用id
  • NPM_INSTALL_FLAGS || '' npm install 参数
  • REQUEST_LIMIT_SIZE || '10mb' 请求限制大小
  • LOG_SERVER_URL || '' 日志服务器地址
  • LOG_SERVER_TOKEN || '' 日志服务器token
  • CHANGE_STREAM_RECONNECT_INTERVAL || 3000 变更流重连间隔
  • OSS_INTERNAL_ENDPOINT || '' OSS内部endpoint
  • *OSS_EXTERNAL_ENDPOINT OSS外部endpoint
  • DISABLE_MODULE_CACHE || false 禁用模块缓存
  • CUSTOM_DEPENDENCY_BASE_PATH || '/tmp/custom_dependency' 自定义依赖基础路径