@ksm0709/context 0.0.36 → 0.1.0
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/cli/index.js +8 -2
- package/dist/index.js +1 -1
- package/dist/mcp.js +3 -21
- package/dist/omc/session-start-hook.js +1 -1
- package/dist/omx/index.mjs +1 -1
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -27,7 +27,7 @@ function resolveContextDir(projectDir) {
|
|
|
27
27
|
// package.json
|
|
28
28
|
var package_default = {
|
|
29
29
|
name: "@ksm0709/context",
|
|
30
|
-
version: "0.0
|
|
30
|
+
version: "0.1.0",
|
|
31
31
|
author: {
|
|
32
32
|
name: "TaehoKang",
|
|
33
33
|
email: "ksm07091@gmail.com"
|
|
@@ -2116,10 +2116,16 @@ function registerHook(event, rule) {
|
|
|
2116
2116
|
settings.hooks[event] = [];
|
|
2117
2117
|
}
|
|
2118
2118
|
const rules = settings.hooks[event];
|
|
2119
|
+
const scriptBasename = (cmd) => {
|
|
2120
|
+
const parts = cmd.trim().split(/\s+/);
|
|
2121
|
+
const last = parts[parts.length - 1];
|
|
2122
|
+
return last.split("/").pop() ?? last;
|
|
2123
|
+
};
|
|
2119
2124
|
for (const hookCmd of rule.hooks) {
|
|
2125
|
+
const newBasename = scriptBasename(hookCmd.command);
|
|
2120
2126
|
let replaced = false;
|
|
2121
2127
|
for (let i = 0;i < rules.length; i++) {
|
|
2122
|
-
const existingIdx = rules[i].hooks.findIndex((h) => h.command ===
|
|
2128
|
+
const existingIdx = rules[i].hooks.findIndex((h) => scriptBasename(h.command) === newBasename);
|
|
2123
2129
|
if (existingIdx !== -1) {
|
|
2124
2130
|
rules[i] = rule;
|
|
2125
2131
|
replaced = true;
|
package/dist/index.js
CHANGED
package/dist/mcp.js
CHANGED
|
@@ -4,43 +4,25 @@ var __getProtoOf = Object.getPrototypeOf;
|
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
function __accessProp(key) {
|
|
8
|
-
return this[key];
|
|
9
|
-
}
|
|
10
|
-
var __toESMCache_node;
|
|
11
|
-
var __toESMCache_esm;
|
|
12
7
|
var __toESM = (mod, isNodeMode, target) => {
|
|
13
|
-
var canCache = mod != null && typeof mod === "object";
|
|
14
|
-
if (canCache) {
|
|
15
|
-
var cache = isNodeMode ? __toESMCache_node ??= new WeakMap : __toESMCache_esm ??= new WeakMap;
|
|
16
|
-
var cached = cache.get(mod);
|
|
17
|
-
if (cached)
|
|
18
|
-
return cached;
|
|
19
|
-
}
|
|
20
8
|
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
21
9
|
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
22
10
|
for (let key of __getOwnPropNames(mod))
|
|
23
11
|
if (!__hasOwnProp.call(to, key))
|
|
24
12
|
__defProp(to, key, {
|
|
25
|
-
get:
|
|
13
|
+
get: () => mod[key],
|
|
26
14
|
enumerable: true
|
|
27
15
|
});
|
|
28
|
-
if (canCache)
|
|
29
|
-
cache.set(mod, to);
|
|
30
16
|
return to;
|
|
31
17
|
};
|
|
32
18
|
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
33
|
-
var __returnValue = (v) => v;
|
|
34
|
-
function __exportSetter(name, newValue) {
|
|
35
|
-
this[name] = __returnValue.bind(null, newValue);
|
|
36
|
-
}
|
|
37
19
|
var __export = (target, all) => {
|
|
38
20
|
for (var name in all)
|
|
39
21
|
__defProp(target, name, {
|
|
40
22
|
get: all[name],
|
|
41
23
|
enumerable: true,
|
|
42
24
|
configurable: true,
|
|
43
|
-
set:
|
|
25
|
+
set: (newValue) => all[name] = () => newValue
|
|
44
26
|
});
|
|
45
27
|
};
|
|
46
28
|
|
|
@@ -6303,7 +6285,7 @@ var require_formats = __commonJS((exports) => {
|
|
|
6303
6285
|
}
|
|
6304
6286
|
var TIME = /^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;
|
|
6305
6287
|
function getTime(strictTimeZone) {
|
|
6306
|
-
return function
|
|
6288
|
+
return function time(str) {
|
|
6307
6289
|
const matches = TIME.exec(str);
|
|
6308
6290
|
if (!matches)
|
|
6309
6291
|
return false;
|
package/dist/omx/index.mjs
CHANGED