@sunasteriskrnd/takumi 1.0.0-dev.36 → 1.0.0-dev.37
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 +7 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -19815,7 +19815,7 @@ var package_default;
|
|
|
19815
19815
|
var init_package = __esm(() => {
|
|
19816
19816
|
package_default = {
|
|
19817
19817
|
name: "@sunasteriskrnd/takumi",
|
|
19818
|
-
version: "1.0.0-dev.
|
|
19818
|
+
version: "1.0.0-dev.37",
|
|
19819
19819
|
description: "CLI tool for bootstrapping and managing Takumi projects",
|
|
19820
19820
|
type: "module",
|
|
19821
19821
|
repository: {
|
|
@@ -63093,6 +63093,10 @@ var HOOK_HANDLERS = [
|
|
|
63093
63093
|
metricsRecord,
|
|
63094
63094
|
metricsFlush
|
|
63095
63095
|
];
|
|
63096
|
+
function shortHandlerName(handler) {
|
|
63097
|
+
const prefix = `${handler.category}-`;
|
|
63098
|
+
return handler.name.startsWith(prefix) ? handler.name.slice(prefix.length) : handler.name;
|
|
63099
|
+
}
|
|
63096
63100
|
var CATEGORY_VALUES2 = new Set([
|
|
63097
63101
|
"guard",
|
|
63098
63102
|
"session",
|
|
@@ -63120,7 +63124,7 @@ function selectHandlers(selector, event, handlers3 = HOOK_HANDLERS) {
|
|
|
63120
63124
|
return handlers3.filter((m2) => {
|
|
63121
63125
|
if (m2.category !== selector.category)
|
|
63122
63126
|
return false;
|
|
63123
|
-
if (selector.handlerName !== null && m2.name !== selector.handlerName)
|
|
63127
|
+
if (selector.handlerName !== null && m2.name !== selector.handlerName && shortHandlerName(m2) !== selector.handlerName)
|
|
63124
63128
|
return false;
|
|
63125
63129
|
return m2.events.includes(event);
|
|
63126
63130
|
});
|
|
@@ -64961,7 +64965,7 @@ function buildHookExecCommand(handler, event, agent, bin = DEFAULT_HOOK_BIN, fla
|
|
|
64961
64965
|
bin,
|
|
64962
64966
|
"hook-exec",
|
|
64963
64967
|
"--hook",
|
|
64964
|
-
`${handler.category}.${handler
|
|
64968
|
+
`${handler.category}.${shortHandlerName(handler)}`,
|
|
64965
64969
|
"--event",
|
|
64966
64970
|
kebab,
|
|
64967
64971
|
"-a",
|