magus-cli 7.11.7 → 7.12.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/package.json +4 -4
- package/src/__tests__/alias-agent-teams.test.ts +259 -0
- package/src/__tests__/alias-autocompact.test.ts +169 -0
- package/src/__tests__/alias-env-adoption.test.ts +334 -0
- package/src/__tests__/alias-option-compatibility.test.ts +92 -0
- package/src/__tests__/marketplace-refresh.test.ts +211 -2
- package/src/cli/update.ts +39 -22
- package/src/data/alias-flags.ts +123 -1
- package/src/services/alias-shell-writer.ts +100 -21
- package/src/services/catalog-cache-store.ts +67 -27
- package/src/services/marketplace-fetcher.ts +4 -0
- package/src/services/marketplace-refresh.ts +107 -30
- package/src/ui/screens/AliasScreen.tsx +31 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "magus-cli",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.12.0",
|
|
4
4
|
"description": "TUI tool for managing Claude Code plugins, MCPs, and configuration",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/main.tsx",
|
|
@@ -65,8 +65,8 @@
|
|
|
65
65
|
"typescript": "^5.6.3"
|
|
66
66
|
},
|
|
67
67
|
"optionalDependencies": {
|
|
68
|
-
"magus-cli-darwin-arm64": "7.
|
|
69
|
-
"magus-cli-darwin-x64": "7.
|
|
70
|
-
"magus-cli-linux-x64": "7.
|
|
68
|
+
"magus-cli-darwin-arm64": "7.12.0",
|
|
69
|
+
"magus-cli-darwin-x64": "7.12.0",
|
|
70
|
+
"magus-cli-linux-x64": "7.12.0"
|
|
71
71
|
}
|
|
72
72
|
}
|
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
import { describe, expect, it } from "bun:test";
|
|
2
|
+
import { ALIAS_FLAGS, FLAG_GROUPS, getFlagById } from "../data/alias-flags";
|
|
3
|
+
import {
|
|
4
|
+
type ShellKind,
|
|
5
|
+
parseAliasFromRc,
|
|
6
|
+
renderAlias,
|
|
7
|
+
renderArgs,
|
|
8
|
+
renderArgsAsTokens,
|
|
9
|
+
renderEnv,
|
|
10
|
+
} from "../services/alias-shell-writer";
|
|
11
|
+
import type { AliasConfig } from "../services/alias-store";
|
|
12
|
+
|
|
13
|
+
const assignment = "CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1";
|
|
14
|
+
const shells: ShellKind[] = ["bash", "zsh", "fish"];
|
|
15
|
+
const modes = ["tmux", "iterm2", "in-process", "auto"];
|
|
16
|
+
|
|
17
|
+
function expectAliasLine(
|
|
18
|
+
block: string,
|
|
19
|
+
shell: ShellKind,
|
|
20
|
+
envEnabled: boolean,
|
|
21
|
+
argv: string[],
|
|
22
|
+
aliasName = "c",
|
|
23
|
+
) {
|
|
24
|
+
const lines = block.split("\n").filter((line) => line.startsWith("alias "));
|
|
25
|
+
const prefix = envEnabled
|
|
26
|
+
? `${(shell === "fish" ? "env " : "") + assignment} claude`
|
|
27
|
+
: "claude";
|
|
28
|
+
const bareArgs = argv.length === 0 ? "" : ` ${argv.join(" ")}`;
|
|
29
|
+
|
|
30
|
+
expect(lines).toHaveLength(1);
|
|
31
|
+
if (shell === "fish") {
|
|
32
|
+
const quotedArgs =
|
|
33
|
+
argv.length === 0 ? "" : ` ${argv.map((arg) => `'${arg}'`).join(" ")}`;
|
|
34
|
+
expect([
|
|
35
|
+
`alias ${aliasName} '${prefix}${bareArgs}'`,
|
|
36
|
+
`alias ${aliasName} '${prefix}${quotedArgs}'`,
|
|
37
|
+
]).toContain(lines[0]);
|
|
38
|
+
} else {
|
|
39
|
+
expect(lines).toEqual([`alias ${aliasName}='${prefix}${bareArgs}'`]);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
describe("agent teams catalog", () => {
|
|
44
|
+
it("TEST-7 REQ-1 REQ-4 exposes an env-backed boolean and the Agent teams group", () => {
|
|
45
|
+
expect(getFlagById("agent-teams")).toMatchObject({
|
|
46
|
+
id: "agent-teams",
|
|
47
|
+
label: "Agent teams",
|
|
48
|
+
kind: "boolean",
|
|
49
|
+
env: assignment,
|
|
50
|
+
flag: assignment,
|
|
51
|
+
group: "agents",
|
|
52
|
+
});
|
|
53
|
+
expect(FLAG_GROUPS.filter((group) => group.id === "agents")).toEqual([
|
|
54
|
+
{ id: "agents", label: "Agent teams" },
|
|
55
|
+
]);
|
|
56
|
+
expect(
|
|
57
|
+
ALIAS_FLAGS.filter((flag) => flag.id === "agent-teams"),
|
|
58
|
+
).toHaveLength(1);
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
it("TEST-8 REQ-4 exposes exactly the teammate choices and their dependency", () => {
|
|
62
|
+
const flag = getFlagById("teammate-mode");
|
|
63
|
+
|
|
64
|
+
expect(flag).toMatchObject({
|
|
65
|
+
id: "teammate-mode",
|
|
66
|
+
label: "Teammate panes",
|
|
67
|
+
kind: "select",
|
|
68
|
+
flag: "--teammate-mode",
|
|
69
|
+
group: "agents",
|
|
70
|
+
requires: "agent-teams",
|
|
71
|
+
});
|
|
72
|
+
expect(flag.options?.map((option) => option.value).sort()).toEqual([
|
|
73
|
+
"auto",
|
|
74
|
+
"in-process",
|
|
75
|
+
"iterm2",
|
|
76
|
+
"tmux",
|
|
77
|
+
]);
|
|
78
|
+
expect(flag.env).toBeUndefined();
|
|
79
|
+
});
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
describe("environment and argv separation", () => {
|
|
83
|
+
for (const state of ["enabled", "disabled", "missing"] as const) {
|
|
84
|
+
it(`TEST-9 REQ-1 REQ-6 REQ-7 REQ-9 separates env from argv when agent teams is ${state}`, () => {
|
|
85
|
+
const config: AliasConfig = { aliasName: "c", flags: {} };
|
|
86
|
+
if (state !== "missing") {
|
|
87
|
+
config.flags["agent-teams"] = {
|
|
88
|
+
kind: "boolean",
|
|
89
|
+
enabled: state === "enabled",
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
const expectedEnv = state === "enabled" ? [assignment] : [];
|
|
93
|
+
|
|
94
|
+
expect(renderEnv(config)).toEqual(expectedEnv);
|
|
95
|
+
expect(renderArgs(config)).toEqual([]);
|
|
96
|
+
expect(renderArgsAsTokens(config)).toEqual(expectedEnv);
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
describe("agent teams shell output and POSIX round-trips", () => {
|
|
102
|
+
// Fish rendering is covered; the parse-back contract uses POSIX alias lines.
|
|
103
|
+
for (const shell of shells) {
|
|
104
|
+
it(`TEST-10 REQ-8 REQ-13 renders agent teams alone before claude on ${shell}`, () => {
|
|
105
|
+
const config: AliasConfig = {
|
|
106
|
+
aliasName: "c",
|
|
107
|
+
flags: { "agent-teams": { kind: "boolean", enabled: true } },
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
const rendered = renderAlias(config, shell);
|
|
111
|
+
|
|
112
|
+
expect(rendered.shell).toBe(shell);
|
|
113
|
+
expectAliasLine(rendered.block, shell, true, []);
|
|
114
|
+
if (shell !== "fish") {
|
|
115
|
+
expect(parseAliasFromRc(rendered.block)).toEqual({
|
|
116
|
+
aliasName: "c",
|
|
117
|
+
flags: { "agent-teams": { kind: "boolean", enabled: true } },
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
for (const mode of modes) {
|
|
123
|
+
it(`TEST-11 REQ-4 REQ-6 REQ-7 REQ-8 REQ-9 REQ-13 ${shell === "fish" ? "renders " : "renders and round-trips "}${mode} teammates on ${shell}`, () => {
|
|
124
|
+
const config: AliasConfig = {
|
|
125
|
+
aliasName: "c",
|
|
126
|
+
flags: {
|
|
127
|
+
"agent-teams": { kind: "boolean", enabled: true },
|
|
128
|
+
"teammate-mode": { kind: "select", enabled: true, value: mode },
|
|
129
|
+
},
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
const rendered = renderAlias(config, shell);
|
|
133
|
+
|
|
134
|
+
expect(renderEnv(config)).toEqual([assignment]);
|
|
135
|
+
expect(renderArgs(config)).toEqual([
|
|
136
|
+
{ kind: "literal", text: "--teammate-mode" },
|
|
137
|
+
{ kind: "literal", text: mode },
|
|
138
|
+
]);
|
|
139
|
+
expect(renderArgsAsTokens(config)).toEqual([
|
|
140
|
+
assignment,
|
|
141
|
+
"--teammate-mode",
|
|
142
|
+
mode,
|
|
143
|
+
]);
|
|
144
|
+
expectAliasLine(rendered.block, shell, true, ["--teammate-mode", mode]);
|
|
145
|
+
if (shell !== "fish") {
|
|
146
|
+
expect(parseAliasFromRc(rendered.block)).toEqual({
|
|
147
|
+
aliasName: "c",
|
|
148
|
+
flags: {
|
|
149
|
+
"agent-teams": { kind: "boolean", enabled: true },
|
|
150
|
+
"teammate-mode": { kind: "select", enabled: true, value: mode },
|
|
151
|
+
},
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
for (const state of ["missing", "disabled"] as const) {
|
|
158
|
+
it(`TEST-12 REQ-14 drops teammate-mode with ${state} agent teams but keeps context size on ${shell}`, () => {
|
|
159
|
+
const config: AliasConfig = {
|
|
160
|
+
aliasName: "c",
|
|
161
|
+
flags: {
|
|
162
|
+
"teammate-mode": { kind: "select", enabled: true, value: "tmux" },
|
|
163
|
+
autocompact: { kind: "text", enabled: true, value: "200k" },
|
|
164
|
+
},
|
|
165
|
+
};
|
|
166
|
+
if (state === "disabled") {
|
|
167
|
+
config.flags["agent-teams"] = { kind: "boolean", enabled: false };
|
|
168
|
+
}
|
|
169
|
+
const original = structuredClone(config);
|
|
170
|
+
|
|
171
|
+
const rendered = renderAlias(config, shell);
|
|
172
|
+
|
|
173
|
+
expect(renderEnv(config)).toEqual([]);
|
|
174
|
+
expect(renderArgs(config)).toEqual([
|
|
175
|
+
{ kind: "literal", text: "--autocompact" },
|
|
176
|
+
{ kind: "literal", text: "200k" },
|
|
177
|
+
]);
|
|
178
|
+
expect(renderArgsAsTokens(config)).toEqual(["--autocompact", "200k"]);
|
|
179
|
+
expectAliasLine(rendered.block, shell, false, [
|
|
180
|
+
"--autocompact",
|
|
181
|
+
"200k",
|
|
182
|
+
]);
|
|
183
|
+
if (shell !== "fish") {
|
|
184
|
+
expect(parseAliasFromRc(rendered.block)).toEqual({
|
|
185
|
+
aliasName: "c",
|
|
186
|
+
flags: {
|
|
187
|
+
autocompact: { kind: "text", enabled: true, value: "200k" },
|
|
188
|
+
},
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
expect(config).toEqual(original);
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
it(`TEST-13 REQ-4 REQ-7 REQ-8 REQ-13 keeps agent teams but omits a disabled teammate mode on ${shell}`, () => {
|
|
196
|
+
const config: AliasConfig = {
|
|
197
|
+
aliasName: "c",
|
|
198
|
+
flags: {
|
|
199
|
+
"agent-teams": { kind: "boolean", enabled: true },
|
|
200
|
+
"teammate-mode": { kind: "select", enabled: false, value: "tmux" },
|
|
201
|
+
},
|
|
202
|
+
};
|
|
203
|
+
|
|
204
|
+
const rendered = renderAlias(config, shell);
|
|
205
|
+
|
|
206
|
+
expect(renderArgs(config)).toEqual([]);
|
|
207
|
+
expect(renderArgsAsTokens(config)).toEqual([assignment]);
|
|
208
|
+
expectAliasLine(rendered.block, shell, true, []);
|
|
209
|
+
if (shell !== "fish") {
|
|
210
|
+
expect(parseAliasFromRc(rendered.block)).toEqual({
|
|
211
|
+
aliasName: "c",
|
|
212
|
+
flags: { "agent-teams": { kind: "boolean", enabled: true } },
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
});
|
|
216
|
+
|
|
217
|
+
it(`TEST-14 REQ-6 REQ-7 REQ-8 REQ-9 REQ-13 renders all new options with env first on ${shell}`, () => {
|
|
218
|
+
const config: AliasConfig = {
|
|
219
|
+
aliasName: "crew",
|
|
220
|
+
flags: {
|
|
221
|
+
"teammate-mode": { kind: "select", enabled: true, value: "tmux" },
|
|
222
|
+
autocompact: { kind: "text", enabled: true, value: "200k" },
|
|
223
|
+
"agent-teams": { kind: "boolean", enabled: true },
|
|
224
|
+
},
|
|
225
|
+
};
|
|
226
|
+
const contextIndex = ALIAS_FLAGS.findIndex(
|
|
227
|
+
(flag) => flag.id === "autocompact",
|
|
228
|
+
);
|
|
229
|
+
const modeIndex = ALIAS_FLAGS.findIndex(
|
|
230
|
+
(flag) => flag.id === "teammate-mode",
|
|
231
|
+
);
|
|
232
|
+
expect(contextIndex).toBeGreaterThanOrEqual(0);
|
|
233
|
+
expect(modeIndex).toBeGreaterThanOrEqual(0);
|
|
234
|
+
const argv =
|
|
235
|
+
contextIndex < modeIndex
|
|
236
|
+
? ["--autocompact", "200k", "--teammate-mode", "tmux"]
|
|
237
|
+
: ["--teammate-mode", "tmux", "--autocompact", "200k"];
|
|
238
|
+
|
|
239
|
+
const rendered = renderAlias(config, shell);
|
|
240
|
+
|
|
241
|
+
expect(renderEnv(config)).toEqual([assignment]);
|
|
242
|
+
expect(renderArgs(config)).toEqual(
|
|
243
|
+
argv.map((text) => ({ kind: "literal", text })),
|
|
244
|
+
);
|
|
245
|
+
expect(renderArgsAsTokens(config)).toEqual([assignment, ...argv]);
|
|
246
|
+
expectAliasLine(rendered.block, shell, true, argv, "crew");
|
|
247
|
+
if (shell !== "fish") {
|
|
248
|
+
expect(parseAliasFromRc(rendered.block)).toEqual({
|
|
249
|
+
aliasName: "crew",
|
|
250
|
+
flags: {
|
|
251
|
+
"agent-teams": { kind: "boolean", enabled: true },
|
|
252
|
+
"teammate-mode": { kind: "select", enabled: true, value: "tmux" },
|
|
253
|
+
autocompact: { kind: "text", enabled: true, value: "200k" },
|
|
254
|
+
},
|
|
255
|
+
});
|
|
256
|
+
}
|
|
257
|
+
});
|
|
258
|
+
}
|
|
259
|
+
});
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import { describe, expect, it } from "bun:test";
|
|
2
|
+
import {
|
|
3
|
+
AUTOCOMPACT_MAX_TOKENS,
|
|
4
|
+
AUTOCOMPACT_MIN_TOKENS,
|
|
5
|
+
getFlagById,
|
|
6
|
+
parseAutocompactSize,
|
|
7
|
+
validateAutocompactSize,
|
|
8
|
+
} from "../data/alias-flags";
|
|
9
|
+
import {
|
|
10
|
+
type ShellKind,
|
|
11
|
+
parseAliasFromRc,
|
|
12
|
+
renderAlias,
|
|
13
|
+
renderArgs,
|
|
14
|
+
renderArgsAsTokens,
|
|
15
|
+
renderEnv,
|
|
16
|
+
} from "../services/alias-shell-writer";
|
|
17
|
+
import type { AliasConfig } from "../services/alias-store";
|
|
18
|
+
|
|
19
|
+
const shells: ShellKind[] = ["bash", "zsh", "fish"];
|
|
20
|
+
|
|
21
|
+
function expectSizeAlias(block: string, shell: ShellKind, value?: string) {
|
|
22
|
+
const lines = block.split("\n").filter((line) => line.startsWith("alias "));
|
|
23
|
+
const args = value === undefined ? "" : ` --autocompact ${value}`;
|
|
24
|
+
|
|
25
|
+
expect(lines).toHaveLength(1);
|
|
26
|
+
if (shell === "fish") {
|
|
27
|
+
const quotedArgs = value === undefined ? "" : ` '--autocompact' '${value}'`;
|
|
28
|
+
expect([
|
|
29
|
+
`alias c 'claude${args}'`,
|
|
30
|
+
`alias c 'claude${quotedArgs}'`,
|
|
31
|
+
]).toContain(lines[0]);
|
|
32
|
+
} else {
|
|
33
|
+
expect(lines).toEqual([`alias c='claude${args}'`]);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
describe("context window size catalog and validation", () => {
|
|
38
|
+
it("TEST-1 REQ-2 exposes the context text option and its validator", () => {
|
|
39
|
+
const flag = getFlagById("autocompact");
|
|
40
|
+
|
|
41
|
+
expect(flag).toMatchObject({
|
|
42
|
+
id: "autocompact",
|
|
43
|
+
label: "Context window size",
|
|
44
|
+
kind: "text",
|
|
45
|
+
flag: "--autocompact",
|
|
46
|
+
group: "context",
|
|
47
|
+
});
|
|
48
|
+
expect(typeof flag.validateValue).toBe("function");
|
|
49
|
+
expect(flag.env).toBeUndefined();
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
const validSizes: Array<[string, number | "auto"]> = [
|
|
53
|
+
["auto", "auto"],
|
|
54
|
+
["AUTO", "auto"],
|
|
55
|
+
["aUtO", "auto"],
|
|
56
|
+
["200k", 200000],
|
|
57
|
+
["1m", 1000000],
|
|
58
|
+
["200000", 200000],
|
|
59
|
+
["500", 500000],
|
|
60
|
+
["100k", 100000],
|
|
61
|
+
["100000", 100000],
|
|
62
|
+
["100", 100000],
|
|
63
|
+
["1000k", 1000000],
|
|
64
|
+
["1000000", 1000000],
|
|
65
|
+
["1000", 1000000],
|
|
66
|
+
];
|
|
67
|
+
|
|
68
|
+
for (const [value, expected] of validSizes) {
|
|
69
|
+
it(`TEST-2 REQ-3 accepts ${JSON.stringify(value)} as ${expected}`, () => {
|
|
70
|
+
const catalogValidator = getFlagById("autocompact").validateValue;
|
|
71
|
+
|
|
72
|
+
expect(parseAutocompactSize(value)).toBe(expected);
|
|
73
|
+
expect(validateAutocompactSize(value)).toBeNull();
|
|
74
|
+
expect(catalogValidator?.(value)).toBeNull();
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
const invalidSizes = [
|
|
79
|
+
"50k",
|
|
80
|
+
"2m",
|
|
81
|
+
"abc",
|
|
82
|
+
"",
|
|
83
|
+
"0",
|
|
84
|
+
"99",
|
|
85
|
+
"1001",
|
|
86
|
+
"99k",
|
|
87
|
+
"1001k",
|
|
88
|
+
"99999",
|
|
89
|
+
"1000001",
|
|
90
|
+
];
|
|
91
|
+
|
|
92
|
+
for (const value of invalidSizes) {
|
|
93
|
+
it(`TEST-3 REQ-3 rejects ${JSON.stringify(value)} with a reason`, () => {
|
|
94
|
+
const catalogValidator = getFlagById("autocompact").validateValue;
|
|
95
|
+
|
|
96
|
+
expect(parseAutocompactSize(value)).toBeUndefined();
|
|
97
|
+
const reasons = [
|
|
98
|
+
validateAutocompactSize(value),
|
|
99
|
+
catalogValidator?.(value),
|
|
100
|
+
];
|
|
101
|
+
for (const reason of reasons) {
|
|
102
|
+
expect(reason).toEqual(expect.any(String));
|
|
103
|
+
expect(reason).toMatch(/\S/);
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
it("TEST-4 REQ-3 exposes the inclusive 100000–1000000 token limits", () => {
|
|
109
|
+
expect(AUTOCOMPACT_MIN_TOKENS).toBe(100000);
|
|
110
|
+
expect(AUTOCOMPACT_MAX_TOKENS).toBe(1000000);
|
|
111
|
+
});
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
describe("context window size shell output", () => {
|
|
115
|
+
// Fish rendering is covered; the parse-back contract uses POSIX alias lines.
|
|
116
|
+
for (const shell of shells) {
|
|
117
|
+
for (const value of ["auto", "200k", "1m", "200000", "500"]) {
|
|
118
|
+
it(`TEST-5 REQ-2 REQ-7 REQ-8 REQ-13 ${shell === "fish" ? "renders " : "renders and round-trips "}${value} on ${shell}`, () => {
|
|
119
|
+
const config: AliasConfig = {
|
|
120
|
+
aliasName: "c",
|
|
121
|
+
flags: {
|
|
122
|
+
autocompact: { kind: "text", enabled: true, value },
|
|
123
|
+
},
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
const rendered = renderAlias(config, shell);
|
|
127
|
+
|
|
128
|
+
expect(rendered.shell).toBe(shell);
|
|
129
|
+
expect(renderEnv(config)).toEqual([]);
|
|
130
|
+
expect(renderArgs(config)).toEqual([
|
|
131
|
+
{ kind: "literal", text: "--autocompact" },
|
|
132
|
+
{ kind: "literal", text: value },
|
|
133
|
+
]);
|
|
134
|
+
expect(renderArgsAsTokens(config)).toEqual(["--autocompact", value]);
|
|
135
|
+
expectSizeAlias(rendered.block, shell, value);
|
|
136
|
+
if (shell !== "fish") {
|
|
137
|
+
expect(parseAliasFromRc(rendered.block)).toEqual({
|
|
138
|
+
aliasName: "c",
|
|
139
|
+
flags: {
|
|
140
|
+
autocompact: { kind: "text", enabled: true, value },
|
|
141
|
+
},
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
it(`TEST-6 REQ-2 REQ-10 omits a disabled context size on ${shell}`, () => {
|
|
148
|
+
const config: AliasConfig = {
|
|
149
|
+
aliasName: "c",
|
|
150
|
+
flags: {
|
|
151
|
+
autocompact: { kind: "text", enabled: false, value: "200k" },
|
|
152
|
+
},
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
const rendered = renderAlias(config, shell);
|
|
156
|
+
|
|
157
|
+
expect(renderArgs(config)).toEqual([]);
|
|
158
|
+
expect(renderArgsAsTokens(config)).toEqual([]);
|
|
159
|
+
expect(renderEnv(config)).toEqual([]);
|
|
160
|
+
expectSizeAlias(rendered.block, shell);
|
|
161
|
+
if (shell !== "fish") {
|
|
162
|
+
expect(parseAliasFromRc(rendered.block)).toEqual({
|
|
163
|
+
aliasName: "c",
|
|
164
|
+
flags: {},
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
});
|