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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@gosls/tencent-prescf

v0.0.2

Published

该组件是为了兼容老版本的SCFCLI以及VSCode插件独立开发的。通过该组件,可以简单快速的将原有的函数进行部署。

Downloads

4

Readme

PreSCF组件使用说明

该组件是为了兼容老版本的SCFCLI以及VSCode插件独立开发的。通过该组件,可以简单快速的将原有的函数进行部署。

该组件的Yaml只有两个字段,分别是yamlregion,其中yaml表示相对的原始的yaml存放地,region表示要部署的区域,默认是ap-guangzhou

# serverless.yml
helloWorld:
  component: "@gosls/tencent-prescf"
  inputs:
    yaml: ./template.yaml
    region: ap-guangzhou
    functionName: hello_world
  • 注意上述中的funtionName是可选的,因为scfcli和vscode插件是可以单独部署某个函数的,为了实现这个功能,所以增加了hello_world,如果有这个参数,就可以单独部署老yaml中的单个函数。

例如我目录结构:

hello_world
|- .gitignore
|- index.py
|- README.md
|- template.yaml

此时,我只需要新建serverless.yaml

hello_world
|- .gitignore
|- index.py
|- README.md
|- serverless.yaml
|- template.yaml

内容为:

# serverless.yml
helloWorld:
  component: "@gosls/tencent-prescf"
  inputs:
    yaml: ./template.yaml
    region: ap-guangzhou

完成之后,直接部署:

DFOUNDERLIU-MB0:hello_world dfounderliu$ sls --debug

  DEBUG ─ Resolving the template's static variables.
  DEBUG ─ Collecting components from the template.
  DEBUG ─ Downloading any NPM components found in the template.
  DEBUG ─ Analyzing the template's components dependencies.
  DEBUG ─ Creating the template's components graph.
  DEBUG ─ Syncing template state.
  DEBUG ─ Executing the template's components graph.
  DEBUG ─ Compressing function hello_world file to /Users/dfounderliu/Desktop/ServerlessComponents/test/oldscf/hello_world/.serverless/hello_world.zip.
  DEBUG ─ Compressed function hello_world file successful
  DEBUG ─ Updating code... 
  DEBUG ─ Updating configure... 
  DEBUG ─ Created function hello_world successful
  DEBUG ─ Setting tags for function hello_world
  DEBUG ─ Creating trigger for function hello_world
  DEBUG ─ Deployed function hello_world successful

  helloWorld: 
    - 
      Name:        hello_world
      Runtime:     Python3.6
      Handler:     index.main_handler
      MemorySize:  128
      Timeout:     3
      Region:      ap-guangzhou
      Namespace:   anycodes
      Description: This is a template function

  11s › helloWorld › done

移除:

DFOUNDERLIU-MB0:hello_world dfounderliu$ sls remove --debug

  DEBUG ─ Flushing template state and removing all components.
  DEBUG ─ Removing function
  DEBUG ─ Request id
  DEBUG ─ Removed function hello_world successful

  4s › helloWorld › done