Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
acm-client
Advanced tools
Readme
Aliyun acm client for Node.js. 阿里云 acm Node.js 客户端 https://help.aliyun.com/document_detail/60137.html
重新使用了 typescript 编码,使用 async/await 重构。
$ npm i acm-client --save
import {ACMClient} from 'acm-client'; // ts
const ACMClient = require('acm-client').ACMClient; //js
const acm = new ACMClient({
endpoint: 'acm.aliyun.com', // acm 控制台查看
namespace: '***************', // acm 控制台查看
accessKey: '***************', // acm 控制台查看
secretKey: '***************', // acm 控制台查看
requestTimeout: 6000, // 请求超时时间,默认6s
});
// 务必要等待 ready
await client.ready();
// 主动拉取配置
const content= await acm.getConfig('test', 'DEFAULT_GROUP');
console.log('getConfig = ',content);
// 监听数据更新
acm.subscribe({
dataId: 'test',
group: 'DEFAULT_GROUP',
}, content => {
console.log(content);
});
// 发布配置接口
const content= await acm.publishSingle('test', 'DEFAULT_GROUP', '测试');
console.log('getConfig = ',content);
// 删除配置
await acm.remove('test', 'DEFAULT_GROUP');
// 批量获取配置
const content = await amc.batchGetConfig(['test', 'test1'], 'DEFAULT_GROUP');
// 获取所有配置
const configList = await amc.getAllConfigInfo();
acm.on('error', function (err) {
// 可以在这里统一进行日志的记录
// 如果不监听错误事件,所有的异常都将会打印到 stderr
});
async function getConfig(dataId, group)
async function publishSingle(dataId, group, content)
async function remove(dataId, group)
async function batchGetConfig(dataIds, group)
function subscribe(info, listener)
function unSubscribe(info, [listener])
function getConfigs()
该接口不返回配置的具体内容,拿到配置信息后请再调用getConfig
获取配置内容FAQs
aliyun acm client
The npm package acm-client receives a total of 13 weekly downloads. As such, acm-client popularity was classified as not popular.
We found that acm-client demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.