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

@alicloud/console-fetcher-basic

v1.12.2

Published

控制台基础 Fetcher(无风控)

Downloads

93

Readme

@alicloud/console-fetcher-basic

控制台请求基础包,无风控,仅对一般性错误做国际化,对业务错误进行封装。

一个专门为控制台量身定制的请求 基础 包:

  • @alicloud/console-fetcher-interceptor-res-error-message 国际化基本错误(Timeout、NetworkError 等)
  • @alicloud/console-fetcher-interceptor-req-security 为类 POST 添加必要的安全参数
  • @alicloud/console-fetcher-interceptor-res-biz 请求成功,判断业务成功或失败,成功则返回真正的 data,失败则抛出封装后的业务错误对象

注意它之所以称为 基础 是没有添加风控,原因:

  1. 不是所有的控制台都需要风控
  2. 风控以 react 实现,不是所有的控制台都有 react,ng 下可以自主实现风控

有风控需求,且应用是 react 的请使用 @alicloud/console-fetcher

输出

@alicloud/fetcher 一致,除了:

  1. 扩展了 Fetcher,新增 API 方法 1.1 callInnerApi 1.2 callContainerApi 1.3 callOpenApi 1.4 callMultiOpenApi
  2. 扩展了 FetcherConfig
  3. 新增 API 类型输出 3.1 FetcherConsoleApiOptions 3.2 FetcherFnOpenApi 3.3 FetcherFnInnerApi 3.4 FetcherFnContainerApi 3.5 FetcherFnOpenApiMulti