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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@cloudbase/weda-node-sdk

v1.0.50

Published

微搭低码数据源云函数公共 node 包, 数据源相关 `lcap-datasource-test`(微搭控制台数据源测试专用的云函数)、`lcap-common-service`(微搭应用运行态依赖的公共云函数, 提供用户注册、获取用户信息、调用微搭后端服务等公共功能)、数据源云函数(在微搭控制台中数据源保存和发布均会部署对应的云函数) 均使用了该包.

Downloads

1,084

Readme

@cloudbase/weda-node-sdk

微搭低码数据源云函数公共 node 包, 数据源相关 lcap-datasource-test(微搭控制台数据源测试专用的云函数)、lcap-common-service(微搭应用运行态依赖的公共云函数, 提供用户注册、获取用户信息、调用微搭后端服务等公共功能)、数据源云函数(在微搭控制台中数据源保存和发布均会部署对应的云函数) 均使用了该包.

包中提供的函数

createApp

创建数据源云函数, 传入参数后, 该函数会返回一个可以直接作为tcb云函数默认入口函数的新的函数

方法定义

(options: ICreateAppOptions) => ((params: IFnParams, context: IContext) => any)

/**
 * 创建数据源云函数所用的参数
 */
interface ICreateAppOptions {
  /**
   * 是否为测试模式, 目前仅测试云函数需要将其设置为 true, 为 true 时会有以下效果:
   *  - user source 若无(无法从Node环境信息中获取C端用户信息), 则指定为 uid 0, type 4
   *  - 请求出错时会将错误对象返回, 添加 original 字段, 会将错误对象转换为字符串, 即 stack 内容
   */
  isTestMode?: boolean;
  /** 数据源的自定义方法对象 */
  handlers: Record<string, IDsFn>
  /** 数据源描述信息 */
  dsConfig?: IPlatformDataSource
  /**
   * 是否为旧数据源结构, 若为旧数据源结构, 则走旧逻辑
   */
  isLegacyDs?: boolean
}