@elyx-code/project-logic-tree 0.0.7220 → 0.0.7221
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js
CHANGED
|
@@ -182939,6 +182939,7 @@ class Csn extends Rsn {
|
|
|
182939
182939
|
class Ge {
|
|
182940
182940
|
constructor(p, t) {
|
|
182941
182941
|
w(this, "manifest");
|
|
182942
|
+
w(this, "command");
|
|
182942
182943
|
w(this, "module");
|
|
182943
182944
|
w(this, "state");
|
|
182944
182945
|
this.extensionsRegistry = p, this.state = new Csn(this, t);
|
|
@@ -218219,6 +218220,8 @@ function JTn(a) {
|
|
|
218219
218220
|
class M7 {
|
|
218220
218221
|
constructor(p = new Qv("extensions-registry-fallback-events")) {
|
|
218221
218222
|
w(this, "extensionsRegistry", /* @__PURE__ */ new Map());
|
|
218223
|
+
w(this, "commandsRegistryMap", /* @__PURE__ */ new Map());
|
|
218224
|
+
w(this, "commandsListCache", null);
|
|
218222
218225
|
// Keeps track of all modules that have already been initialized
|
|
218223
218226
|
// This is used to prevent re-initialization of the same module
|
|
218224
218227
|
w(this, "initialized", /* @__PURE__ */ new Set());
|
|
@@ -218301,7 +218304,20 @@ class M7 {
|
|
|
218301
218304
|
}
|
|
218302
218305
|
// Register an extension before init
|
|
218303
218306
|
register(p) {
|
|
218304
|
-
this.extensionsRegistry.set(p.manifest.id, p)
|
|
218307
|
+
this.extensionsRegistry.set(p.manifest.id, p), p.command && p.command.command && (this.commandsRegistryMap.set(
|
|
218308
|
+
p.command.command.toLowerCase(),
|
|
218309
|
+
p
|
|
218310
|
+
), this.commandsListCache = null);
|
|
218311
|
+
}
|
|
218312
|
+
// Query indexed command extensions with optional context filtering
|
|
218313
|
+
getCommands(p) {
|
|
218314
|
+
if (this.commandsListCache || (this.commandsListCache = Array.from(this.commandsRegistryMap.values())), !p)
|
|
218315
|
+
return this.commandsListCache;
|
|
218316
|
+
const { contextType: t, globalOnly: n } = p;
|
|
218317
|
+
return this.commandsListCache.filter((s) => {
|
|
218318
|
+
var u;
|
|
218319
|
+
return n ? !s.manifest.contexts || s.manifest.contexts.length === 0 : t ? (u = s.manifest.contexts) == null ? void 0 : u.includes(t) : !0;
|
|
218320
|
+
});
|
|
218305
218321
|
}
|
|
218306
218322
|
// Initialize all extensions in priority order
|
|
218307
218323
|
async initAll() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elyx-code/project-logic-tree",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.7221",
|
|
4
4
|
"author": "Sergio Herrero",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"description": "An installable module which contains the type definitions and ephemeral state management for a projects' logic tree data structure",
|