Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@giteeteam/apps-api

Package Overview
Dependencies
Maintainers
0
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@giteeteam/apps-api - npm Package Compare versions

Comparing version 0.6.0 to 0.6.1

10

dist/axios/index.d.ts

@@ -15,5 +15,11 @@ /// <reference types="node" />

* @param [AxiosConfig] config
* @param [Boolean] onlyData 默认为true,只返回data数据,false时返回data, headers, status, statusText
* @returns 返回的是请求后的data数据,不是axios返回的对象
*/
export declare const axios: (config: AxiosConfig, onlyData?: boolean | undefined) => Promise<any>;
export declare const axios: (config: AxiosConfig) => Promise<any>;
/**
* 使用的是vm中注入的global axios
* @param [AxiosConfig] config
* @returns 返回了部分axios对象:data, headers, status, statusText
*/
export declare const axiosFull: (config: AxiosConfig) => Promise<import("../global").AxiosFullResponse>;
export { AxiosRequestHeaders };

@@ -20,0 +26,0 @@ export declare const requestAppsApi: ({ method, url: _url, data, headers, }: {

8

dist/axios/index.js
/**
* 使用的是vm中注入的global axios
* @param [AxiosConfig] config
* @param [Boolean] onlyData 默认为true,只返回data数据,false时返回data, headers, status, statusText
* @returns 返回的是请求后的data数据,不是axios返回的对象
*/
export const axios = global.axios;
/**
* 使用的是vm中注入的global axios
* @param [AxiosConfig] config
* @returns 返回了部分axios对象:data, headers, status, statusText
*/
export const axiosFull = global.axiosFull;
// 请求应用中心的接口

@@ -8,0 +14,0 @@ export const requestAppsApi = async ({ method = 'GET', url: _url, data, headers, }) => {

@@ -30,5 +30,13 @@ /* eslint-disable no-var */

export interface AxiosFullResponse {
data: any;
headers: Record<string, any>;
status: number;
statusText: string;
}
// global对象是从外层传入vm的方法
declare global {
var axios: (config: AxiosConfig, onlyData?: boolean) => Promise<any>;
var axios: (config: AxiosConfig) => Promise<any>;
var axiosFull: (config: AxiosConfig) => Promise<AxiosFullResponse>;
var applicationId: string;

@@ -35,0 +43,0 @@ var appKey: string;

{
"name": "@giteeteam/apps-api",
"version": "0.6.0",
"version": "0.6.1",
"description": "Giteeteam Apps API",

@@ -5,0 +5,0 @@ "keywords": [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc