@rse/claudex 1.0.1 → 1.0.3
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/CHANGELOG.md +10 -0
- package/claudex.js +20 -2
- package/claudex.ts +23 -2
- package/package.json +1 -1
- package/stx.conf +11 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
ChangeLog
|
|
3
3
|
=========
|
|
4
4
|
|
|
5
|
+
1.0.3 (2026-05-10)
|
|
6
|
+
------------------
|
|
7
|
+
|
|
8
|
+
- BUGFIX: ignore global -T (tmux) option of claude -p (print) option is present
|
|
9
|
+
|
|
10
|
+
1.0.2 (2026-05-10)
|
|
11
|
+
------------------
|
|
12
|
+
|
|
13
|
+
- IMPROVEMENT: provide a STX "publish" target for convenient release
|
|
14
|
+
|
|
5
15
|
1.0.1 (2026-05-10)
|
|
6
16
|
------------------
|
|
7
17
|
|
package/claudex.js
CHANGED
|
@@ -1027,6 +1027,8 @@ const main = async () => {
|
|
|
1027
1027
|
];
|
|
1028
1028
|
const isClaudeNative = claudeNativeSubcmds.includes(subcmd);
|
|
1029
1029
|
if (envFlags !== "" && subcmd !== "internal" && !isClaudeNative) {
|
|
1030
|
+
const tokens = envFlags.split(/\s+/).filter((t) => t !== "");
|
|
1031
|
+
/* provide check whether global options are present */
|
|
1030
1032
|
const aliases = {
|
|
1031
1033
|
"-R": "--recolor", "--recolor": "-R",
|
|
1032
1034
|
"-C": "--capsula", "--capsula": "-C",
|
|
@@ -1041,8 +1043,24 @@ const main = async () => {
|
|
|
1041
1043
|
return true;
|
|
1042
1044
|
return false;
|
|
1043
1045
|
};
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
+
/* ignore "-T"/"--tmux" from CLAUDEX_FLAGS when claude is
|
|
1047
|
+
invoked with any of these options, as the corresponding
|
|
1048
|
+
non-interactive or session-related modes are incompatible
|
|
1049
|
+
with wrapping claude inside a Tmux session */
|
|
1050
|
+
const noTmuxOpts = ["-p"];
|
|
1051
|
+
const skipTmux = topArgs.some((a) => noTmuxOpts.includes(a));
|
|
1052
|
+
const filtered = [];
|
|
1053
|
+
for (let i = 0; i < tokens.length; i++) {
|
|
1054
|
+
const t = tokens[i];
|
|
1055
|
+
if (skipTmux && (t === "-T" || t === "--tmux")) {
|
|
1056
|
+
if (i + 1 < tokens.length && !tokens[i + 1].startsWith("-"))
|
|
1057
|
+
i++;
|
|
1058
|
+
continue;
|
|
1059
|
+
}
|
|
1060
|
+
filtered.push(t);
|
|
1061
|
+
}
|
|
1062
|
+
/* insert in front of the other arguments */
|
|
1063
|
+
const toInsert = filtered.filter((t) => !present(t));
|
|
1046
1064
|
if (toInsert.length > 0)
|
|
1047
1065
|
process.argv.splice(2, 0, ...toInsert);
|
|
1048
1066
|
}
|
package/claudex.ts
CHANGED
|
@@ -1132,6 +1132,9 @@ const main = async (): Promise<void> => {
|
|
|
1132
1132
|
]
|
|
1133
1133
|
const isClaudeNative = claudeNativeSubcmds.includes(subcmd)
|
|
1134
1134
|
if (envFlags !== "" && subcmd !== "internal" && !isClaudeNative) {
|
|
1135
|
+
const tokens = envFlags.split(/\s+/).filter((t) => t !== "")
|
|
1136
|
+
|
|
1137
|
+
/* provide check whether global options are present */
|
|
1135
1138
|
const aliases: Record<string, string> = {
|
|
1136
1139
|
"-R": "--recolor", "--recolor": "-R",
|
|
1137
1140
|
"-C": "--capsula", "--capsula": "-C",
|
|
@@ -1146,8 +1149,26 @@ const main = async (): Promise<void> => {
|
|
|
1146
1149
|
return true
|
|
1147
1150
|
return false
|
|
1148
1151
|
}
|
|
1149
|
-
|
|
1150
|
-
|
|
1152
|
+
|
|
1153
|
+
/* ignore "-T"/"--tmux" from CLAUDEX_FLAGS when claude is
|
|
1154
|
+
invoked with any of these options, as the corresponding
|
|
1155
|
+
non-interactive or session-related modes are incompatible
|
|
1156
|
+
with wrapping claude inside a Tmux session */
|
|
1157
|
+
const noTmuxOpts = [ "-p" ]
|
|
1158
|
+
const skipTmux = topArgs.some((a) => noTmuxOpts.includes(a))
|
|
1159
|
+
const filtered: string[] = []
|
|
1160
|
+
for (let i = 0; i < tokens.length; i++) {
|
|
1161
|
+
const t = tokens[i]
|
|
1162
|
+
if (skipTmux && (t === "-T" || t === "--tmux")) {
|
|
1163
|
+
if (i + 1 < tokens.length && !tokens[i + 1].startsWith("-"))
|
|
1164
|
+
i++
|
|
1165
|
+
continue
|
|
1166
|
+
}
|
|
1167
|
+
filtered.push(t)
|
|
1168
|
+
}
|
|
1169
|
+
|
|
1170
|
+
/* insert in front of the other arguments */
|
|
1171
|
+
const toInsert = filtered.filter((t) => !present(t))
|
|
1151
1172
|
if (toInsert.length > 0)
|
|
1152
1173
|
process.argv.splice(2, 0, ...toInsert)
|
|
1153
1174
|
}
|
package/package.json
CHANGED
package/stx.conf
CHANGED
|
@@ -9,6 +9,17 @@ build
|
|
|
9
9
|
eslint --config eslint.mjs claudex.ts && \
|
|
10
10
|
tsc --project tsconfig.json
|
|
11
11
|
|
|
12
|
+
# publish to github.com and npmjs.com
|
|
13
|
+
publish [hostname=en4.*]
|
|
14
|
+
increment="patch"; \
|
|
15
|
+
case "$*" in -i* ) increment=`echo "$*" | sed -e 's;^-i;;'` ;; esac; \
|
|
16
|
+
kickout "$increment" && \
|
|
17
|
+
VERSION=`sed -n '/"version":/ s/.*: *"\(.*\)".*/\1/p' package.json` && \
|
|
18
|
+
V=`echo "$VERSION" | sed -e 's;\.;\\.;g'` && \
|
|
19
|
+
sed -n -e "/^${V} /, /^[0-9]\\./ { /^${V} /p; /^[0-9]\\./!p; }" <CHANGELOG.md >.notes.md && \
|
|
20
|
+
gh release create --title "claudeX $VERSION" --notes-file .notes.md --verify-tag $VERSION && \
|
|
21
|
+
rm -f .notes.md
|
|
22
|
+
|
|
12
23
|
# remove regularly built files
|
|
13
24
|
clean
|
|
14
25
|
shx rm -f claudex.js tsc.tsbuildinfo
|