Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
@txdfe/at-exceed
Advanced tools
用法
import Exceed from '@alife/at-exceed';
const apimap = [
{
id: 'memberSearch',
url: '/api/members/search',
method: 'get',
},
];
// 对apimap做一次封装,最简只需定义id和url字段
function apimapCreator(apimapArr) {
// 在这里可以对请求做一些统一处理,如加前缀、加headers
return apimapArr.map(option => Object.assign(option, {
name: option.name || option.id,
id: option.id,
method: option.method || 'get',
contentType: option.type || 'application/x-www-form-urlencoded',
urls: {
local: `${window.UILessConfig.host}${option.url}`,
},
}));
}
const exceed = new Exceed({
ENV: 'local',
});
exceed.use(apimapCreator(apimap));
exceed.interceptors.request.use((config) => {
if (config && config.headers) {
config.headers['x-requested-with'] = 'XMLHttpRequest';
config.headers['Authorization'] = `Bearer ${window.UILessConfig.accessToken}`;
config.headers['X-Tenant-Id'] = `${window.UILessConfig.orgId}`;
config.headers['X-app-id'] = `${window.UILessConfig.appId}`;
}
return config;
}, (error) => {
return Promise.reject(error);
});
exceed.interceptors.response.use(
(response) => {
response.status = parseInt(response.headers['x-http-status'] || response.status);
const code = parseInt(response.data.code);
if (code > 300 || code < 200) {
return Promise.reject(response);
}
return Promise.resolve(response);
},
(error) => {
return Promise.reject(error);
},
);
export default exceed;
import exceed from 'utils/api';
exceed.fetch({
api: 'memberSearch',
data: {
q,
}
}).then(res => {
console.log(res)
})
FAQs
axios
The npm package @txdfe/at-exceed receives a total of 2 weekly downloads. As such, @txdfe/at-exceed popularity was classified as not popular.
We found that @txdfe/at-exceed demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 7 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.