
Security News
GitHub Actions Pricing Whiplash: Self-Hosted Actions Billing Change Postponed
GitHub postponed a new billing model for self-hosted Actions after developer pushback, but moved forward with hosted runner price cuts on January 1.
@icreate/ics-chromely-js-sdk
Advanced tools
import icsChromelyRequest from '@icreate/ics-chromely-js-sdk' ## 对错误做统一处理 errorFn
import icsChromelyRequest from '@icreate/ics-chromely-js-sdk'
icsChromelyRequest.errorFn = (response) => {
console.log(response, 'error')
Message({
message: response.message || 'Error',
type: 'error',
duration: 5 1000
})
}
rollup.config.ts中添加以下配置,其余打包工具方法请自行查找external: ['@icreate/ics-chromely-js-sdk']
icsChromelyRequest.command(opts: { url: string; data?: any }): void
icsChromelyRequest.function(opts: { url: string; method?: 'POST' | 'GET'; data?: any })
request.Parameters["key"]对应的则为GET方法,且参数为key;_jsonSerializer.Deserialize<CacheModel>(request.PostData.ToString())对应的则为POST方法,参数为CacheModel对应的数据类型。{
/// <summary>
/// Memory Caching Controller
/// </summary>
[ControllerProperty(Name = "MemoryCachingController")]
public class MemoryCachingController : IcsChromelyController
{
private readonly IJsonSerializer _jsonSerializer;
private readonly IMemoryCache _memoryCache;
/// <summary>
/// 构造函数
/// </summary>
public MemoryCachingController(IJsonSerializer jsonSerializer, IMemoryCache memoryCache)
{
_jsonSerializer = jsonSerializer;
_memoryCache = memoryCache;
}
/// <summary>
/// 设置缓存(POST)
/// </summary>
/// <param name="queryParameters">查询参数</param>
[RequestAction(RouteKey = "Caching/Memory/Set")]
public IIcsChromelyResponse Set(IIcsChromelyRequest request)
{
try
{
Check.NotNull(request.PostData, "缓存对象");
var cacheModel = _jsonSerializer.Deserialize<CacheModel>(request.PostData.ToString());
_memoryCache.Set(cacheModel.Key, cacheModel.Value);
return Success("Ok");
}
catch (Exception ex)
{
return InternalError(ex.Message);
}
}
/// <summary>
/// 获取缓存(GET)
/// </summary>
/// <param name="queryParameters">查询参数</param>
[RequestAction(RouteKey = "Caching/Memory/Get")]
public IIcsChromelyResponse Info(IIcsChromelyRequest request)
{
try
{
if (!request.Parameters.ContainsKey("key"))
throw new ArgumentNullException("key");
string key = request.Parameters["key"];
Check.NotNull(key, "缓存键");
string value = _memoryCache.Get<string>(key);
return Success(value);
}
catch (Exception ex)
{
return InternalError(ex.Message);
}
}
/// <summary>
/// 删除缓存(GET)
/// </summary>
/// <param name="queryParameters">查询参数</param>
[RequestAction(RouteKey = "Caching/Memory/Remove")]
public IIcsChromelyResponse Remove(IIcsChromelyRequest request)
{
try
{
if (!request.Parameters.ContainsKey("key"))
throw new ArgumentNullException("key");
string key = request.Parameters["key"];
Check.NotNull(key, "缓存键");
_memoryCache.Remove(key);
return Success("ok");
}
catch (Exception ex)
{
return InternalError(ex.Message);
}
}
}
}
FAQs
import icsChromelyRequest from '@icreate/ics-chromely-js-sdk' ## 对错误做统一处理 errorFn
The npm package @icreate/ics-chromely-js-sdk receives a total of 10 weekly downloads. As such, @icreate/ics-chromely-js-sdk popularity was classified as not popular.
We found that @icreate/ics-chromely-js-sdk demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 12 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
GitHub postponed a new billing model for self-hosted Actions after developer pushback, but moved forward with hosted runner price cuts on January 1.

Research
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.

Security News
Socket CTO Ahmad Nassri shares practical AI coding techniques, tools, and team workflows, plus what still feels noisy and why shipping remains human-led.