@gobing-ai/superskill 0.1.6 → 0.1.7
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 +17 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -96028,16 +96028,27 @@ function convertCanonicalToPiHooks(config3) {
|
|
|
96028
96028
|
const piHooks = {};
|
|
96029
96029
|
const canonicalHooks = config3.hooks ?? {};
|
|
96030
96030
|
for (const [canonicalEvent, definitions] of Object.entries(canonicalHooks)) {
|
|
96031
|
-
const
|
|
96031
|
+
const normalized = canonicalEvent.charAt(0).toLowerCase() + canonicalEvent.slice(1);
|
|
96032
|
+
const piEvent = CANONICAL_TO_PI_EVENT[normalized];
|
|
96032
96033
|
if (!piEvent)
|
|
96033
96034
|
continue;
|
|
96034
96035
|
const commands = [];
|
|
96035
96036
|
for (const def of definitions) {
|
|
96036
|
-
if (def.
|
|
96037
|
-
|
|
96038
|
-
|
|
96039
|
-
|
|
96040
|
-
|
|
96037
|
+
if (def.hooks) {
|
|
96038
|
+
for (const entry of def.hooks) {
|
|
96039
|
+
if (entry.type && entry.type !== "command")
|
|
96040
|
+
continue;
|
|
96041
|
+
if (!entry.command)
|
|
96042
|
+
continue;
|
|
96043
|
+
commands.push(entry.timeout ? { command: entry.command, timeout: entry.timeout } : entry.command);
|
|
96044
|
+
}
|
|
96045
|
+
} else {
|
|
96046
|
+
if (def.type && def.type !== "command")
|
|
96047
|
+
continue;
|
|
96048
|
+
if (!def.command)
|
|
96049
|
+
continue;
|
|
96050
|
+
commands.push(def.timeout ? { command: def.command, timeout: def.timeout } : def.command);
|
|
96051
|
+
}
|
|
96041
96052
|
}
|
|
96042
96053
|
if (commands.length > 0) {
|
|
96043
96054
|
piHooks[piEvent] = commands;
|