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

sofa-micro

v1.0.2

Published

微服务应用模板,引入的是git仓库引用

Downloads

7

Readme

sofa-micro

微服务应用模板,引入的是git仓库引用

publish micro

发布微服务,配置文件是sofa.config.js,字段如下:

export default config = {
  name: 'common-system-manage',
  type: 'micro',
  isBlank: false,
  isTs: false,
  frame: 'react',
  microsPath: '',
  detail: '',
  exportModules: {},
  importModules: {},
  plugins: {},
};

发布流程

  1. 检验sofa.config.js、config-bridge、package.json文件,以及不允许导出空
  2. 校验git信息(是否安装、是否登录)
  3. 校验子模块git信息,没有git仓库就初始化空仓库,检查本地代码更新与否
  4. 交互-名称确认/获取,校验不重名
  5. 质量检查eslint/tslint配置
  6. 发布micro,参数:(operator,secretKey, path, version=0.0.0 + config)

涉及其他模块的接口

git模块:新增initGit, checkGitClean databse模块:addTemplate需要支持micro类型,getTemplates config;支持类型是micro的getConfig、setConfig

add micro [name]

选择并拉取微服务子模块

添加流程

  1. 校验当前目录下的sofa.config.js文件,包括是否存在和相关字段,解析plugins字段。
  2. 带参数,查询有无此微服务,如果有跳过步骤;没有或无参数查询出所有微服务,让用户选择。
  3. 向sofa.config.js文件中写入导入模板(不能写重复了)
  4. 当前目录下不存在同名文件夹,与db交互获取path
  5. clone代码

以上每一步操作执行后都回调抛出当前可能要执行的hooks操作。

涉及其他模块的接口

git模块:新增clone仓库 databse模块:getTemplates config:支持getconfig字段是复杂类型的数据 dev-utils:

add component

选择和拉取组件,不可修改

添加流程

  1. 查询db,选择组件
  2. 查找components路径
  3. clone代码

以上每一步操作执行后都回调抛出当前可能要执行的hooks操作。

涉及其他模块的接口

git模块:新增clone仓库 databse模块:getTemplates config:支持getconfig字段是复杂类型的数据