New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

copilot-core

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

copilot-core - npm Package Compare versions

Comparing version 0.0.12 to 0.0.13

lib/util/cache.d.ts

18

lib/index.js

@@ -15,2 +15,3 @@ "use strict";

const action_1 = require("./action");
const cache_1 = require("./util/cache");
const { debug, warn, error } = require("b-logger")("copilot.main");

@@ -20,2 +21,3 @@ const { asyncify } = require("array-asyncify");

let processorNames;
let cache = new cache_1.Cache();
function startUp() {

@@ -49,2 +51,3 @@ return __awaiter(this, void 0, void 0, function* () {

}
cache.clear();
}

@@ -92,8 +95,19 @@ exports.run = run;

let cmds = cmd_1.parse(input);
let useCache = true;
return asyncify(cmds)
.reduce((pre, next, idx) => __awaiter(this, void 0, void 0, function* () {
debug("Process: ", next);
let cachedRet = cache.get(next.original);
if (cachedRet && useCache) {
debug("Using cache for ", next.original);
return cachedRet;
}
else {
debug("Dont use cache for ", next.original);
useCache = false;
}
let p = lookup(next.cmd);
if (p) {
ret = yield p(next.args || {}, ret);
ret = yield p(next.args || {}, pre);
cache.set(next.original, ret);
return ret;

@@ -112,5 +126,5 @@ }

}
}), {});
}), []);
});
}
exports.handle = handle;

3

lib/processor/filter.js

@@ -38,8 +38,7 @@ "use strict";

debug("search ", op.strings.join(" "));
let result = fuse.search(op.strings.join(" "));
if (op.strings.length === 0) {
return list;
}
let result = fuse.search(op.strings.join(" "));
return result.map(ret => {
debug(ret);
for (let match of ret.matches) {

@@ -46,0 +45,0 @@ let key = match.key;

@@ -35,2 +35,3 @@ "use strict";

return __awaiter(this, void 0, void 0, function* () {
console.log("@wins.list");
let ret = yield util_1.default.exec("wmctrl", "-lp");

@@ -37,0 +38,0 @@ return ret.split("\n")

{
"name": "copilot-core",
"version": "0.0.12",
"version": "0.0.13",
"description": "copilot",

@@ -5,0 +5,0 @@ "license": "MIT",

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