@agents-inc/cli 0.61.0 → 0.65.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/CHANGELOG.md +46 -0
- package/README.md +23 -172
- package/dist/{chunk-YHOHLNHM.js → chunk-3YNT3NX3.js} +13 -11
- package/dist/chunk-3YNT3NX3.js.map +1 -0
- package/dist/{chunk-IGM6HA3S.js → chunk-4C7CSZC5.js} +27 -149
- package/dist/chunk-4C7CSZC5.js.map +1 -0
- package/dist/{chunk-WHISPMAQ.js → chunk-4KVBH2X4.js} +33 -14
- package/dist/chunk-4KVBH2X4.js.map +1 -0
- package/dist/{chunk-KIWFEBKH.js → chunk-52THXN5G.js} +14 -5
- package/dist/chunk-52THXN5G.js.map +1 -0
- package/dist/{chunk-FWMWWE3X.js → chunk-53URJ5XK.js} +448 -152
- package/dist/chunk-53URJ5XK.js.map +1 -0
- package/dist/{chunk-H5DASUX5.js → chunk-6DEK3TDF.js} +10 -10
- package/dist/chunk-6DEK3TDF.js.map +1 -0
- package/dist/{chunk-SDKCQXWE.js → chunk-6IK2TCK7.js} +13 -6
- package/dist/chunk-6IK2TCK7.js.map +1 -0
- package/dist/chunk-6VIOO74O.js +51 -0
- package/dist/chunk-6VIOO74O.js.map +1 -0
- package/dist/{chunk-52XO4ULK.js → chunk-7DI3HGKL.js} +32 -14
- package/dist/chunk-7DI3HGKL.js.map +1 -0
- package/dist/{chunk-MGNYPVOJ.js → chunk-AQYAVLZK.js} +2 -2
- package/dist/{chunk-BNQ5O6LE.js → chunk-AUNBGZS4.js} +2 -2
- package/dist/chunk-BGPGQF35.js +248 -0
- package/dist/chunk-BGPGQF35.js.map +1 -0
- package/dist/chunk-BKL3DF2Q.js +45 -0
- package/dist/chunk-BKL3DF2Q.js.map +1 -0
- package/dist/{chunk-AX3SZZWA.js → chunk-BKTPEATV.js} +13 -6
- package/dist/chunk-BKTPEATV.js.map +1 -0
- package/dist/{chunk-H7WJK7NJ.js → chunk-CKPJTMNC.js} +13 -6
- package/dist/chunk-CKPJTMNC.js.map +1 -0
- package/dist/{chunk-MR6OBL3B.js → chunk-CXRVM7BA.js} +2 -4
- package/dist/chunk-CXRVM7BA.js.map +1 -0
- package/dist/{chunk-VR3CDXDT.js → chunk-EE5EPS32.js} +2 -2
- package/dist/{chunk-6OWHQ7HM.js → chunk-EGMQ3SXN.js} +2 -11
- package/dist/{chunk-6OWHQ7HM.js.map → chunk-EGMQ3SXN.js.map} +1 -1
- package/dist/{chunk-6DAZG54T.js → chunk-EZ35IPXZ.js} +10 -7
- package/dist/chunk-EZ35IPXZ.js.map +1 -0
- package/dist/{chunk-OCEFD7V6.js → chunk-F3REOP7N.js} +3 -3
- package/dist/{chunk-C577AJE7.js → chunk-FGLUQSVU.js} +3 -3
- package/dist/{chunk-Z3TM4N37.js → chunk-J4POGAJF.js} +24 -24
- package/dist/chunk-J4POGAJF.js.map +1 -0
- package/dist/{chunk-O6BA7Q2B.js → chunk-KFDTVSIC.js} +18 -8
- package/dist/chunk-KFDTVSIC.js.map +1 -0
- package/dist/{chunk-LWXRUR6B.js → chunk-LMZXL5RQ.js} +2 -2
- package/dist/{chunk-LWXRUR6B.js.map → chunk-LMZXL5RQ.js.map} +1 -1
- package/dist/{chunk-BFD5NZQ4.js → chunk-MVYJVKVT.js} +19 -11
- package/dist/chunk-MVYJVKVT.js.map +1 -0
- package/dist/{chunk-X5EG4EFP.js → chunk-MWGDG4QN.js} +2 -2
- package/dist/chunk-N4D43IOO.js +238 -0
- package/dist/chunk-N4D43IOO.js.map +1 -0
- package/dist/{chunk-KDO6WU76.js → chunk-O2HK3NTG.js} +10 -6
- package/dist/chunk-O2HK3NTG.js.map +1 -0
- package/dist/{chunk-46DQG2N7.js → chunk-OORWBS6F.js} +45 -52
- package/dist/chunk-OORWBS6F.js.map +1 -0
- package/dist/{chunk-CIG7IKX3.js → chunk-OV5UJWS5.js} +4 -4
- package/dist/{chunk-IEEVXLJB.js → chunk-R46CB36B.js} +5 -5
- package/dist/{chunk-GH2RQ4MI.js → chunk-RG3KDXMR.js} +16 -8
- package/dist/chunk-RG3KDXMR.js.map +1 -0
- package/dist/{chunk-MMFQNJPE.js → chunk-SXGBPQY6.js} +3 -3
- package/dist/chunk-SXGBPQY6.js.map +1 -0
- package/dist/{chunk-XUDTFI4M.js → chunk-T5DJCIUP.js} +2 -2
- package/dist/{chunk-AJJJE7F7.js → chunk-TQLDQ3XZ.js} +2 -2
- package/dist/{chunk-M6YWRMXH.js → chunk-WSMQ5GAP.js} +33 -21
- package/dist/chunk-WSMQ5GAP.js.map +1 -0
- package/dist/{chunk-WYVDNGJB.js → chunk-XMLCXRTS.js} +3 -3
- package/dist/{chunk-SDLDPFNV.js → chunk-YEGPTBX5.js} +4 -4
- package/dist/{chunk-SRBN6RRD.js → chunk-ZFY5EMDV.js} +5 -5
- package/dist/{chunk-BKJHAJQW.js → chunk-ZYUASJUN.js} +7 -4
- package/dist/chunk-ZYUASJUN.js.map +1 -0
- package/dist/commands/build/marketplace.js +4 -4
- package/dist/commands/build/plugins.js +7 -6
- package/dist/commands/build/plugins.js.map +1 -1
- package/dist/commands/build/stack.js +7 -6
- package/dist/commands/build/stack.js.map +1 -1
- package/dist/commands/compile.js +11 -80
- package/dist/commands/compile.js.map +1 -1
- package/dist/commands/config/index.js +7 -6
- package/dist/commands/config/index.js.map +1 -1
- package/dist/commands/config/path.js +6 -5
- package/dist/commands/config/path.js.map +1 -1
- package/dist/commands/config/show.js +7 -6
- package/dist/commands/diff.js +6 -5
- package/dist/commands/diff.js.map +1 -1
- package/dist/commands/doctor.js +11 -15
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/edit.js +63 -69
- package/dist/commands/edit.js.map +1 -1
- package/dist/commands/eject.js +13 -13
- package/dist/commands/eject.js.map +1 -1
- package/dist/commands/import/skill.js +7 -6
- package/dist/commands/import/skill.js.map +1 -1
- package/dist/commands/info.js +14 -16
- package/dist/commands/info.js.map +1 -1
- package/dist/commands/init.js +32 -30
- package/dist/commands/list.js +6 -5
- package/dist/commands/list.js.map +1 -1
- package/dist/commands/new/agent.js +7 -6
- package/dist/commands/new/agent.js.map +1 -1
- package/dist/commands/new/marketplace.js +28 -11
- package/dist/commands/new/marketplace.js.map +1 -1
- package/dist/commands/new/skill.js +7 -6
- package/dist/commands/outdated.js +6 -5
- package/dist/commands/outdated.js.map +1 -1
- package/dist/commands/search.js +13 -11
- package/dist/commands/search.js.map +1 -1
- package/dist/commands/uninstall.js +9 -10
- package/dist/commands/uninstall.js.map +1 -1
- package/dist/commands/update.js +12 -8
- package/dist/commands/update.js.map +1 -1
- package/dist/commands/validate.js +20 -42
- package/dist/commands/validate.js.map +1 -1
- package/dist/components/skill-search/skill-search.js +4 -3
- package/dist/components/wizard/category-grid.js +5 -3
- package/dist/components/wizard/category-grid.test.js +242 -194
- package/dist/components/wizard/category-grid.test.js.map +1 -1
- package/dist/components/wizard/checkbox-grid.js +5 -5
- package/dist/components/wizard/checkbox-grid.test.js +5 -5
- package/dist/components/wizard/domain-selection.js +12 -11
- package/dist/components/wizard/help-modal.js +3 -2
- package/dist/components/wizard/menu-item.js +1 -1
- package/dist/components/wizard/search-modal.js +3 -2
- package/dist/components/wizard/search-modal.test.js +3 -2
- package/dist/components/wizard/search-modal.test.js.map +1 -1
- package/dist/components/wizard/section-progress.js +2 -2
- package/dist/components/wizard/section-progress.test.js +3 -3
- package/dist/components/wizard/section-progress.test.js.map +1 -1
- package/dist/components/wizard/selection-card.js +2 -2
- package/dist/components/wizard/source-grid.js +6 -4
- package/dist/components/wizard/source-grid.test.js +60 -40
- package/dist/components/wizard/source-grid.test.js.map +1 -1
- package/dist/components/wizard/stack-selection.js +9 -8
- package/dist/components/wizard/step-agents.js +11 -10
- package/dist/components/wizard/step-agents.test.js +29 -26
- package/dist/components/wizard/step-agents.test.js.map +1 -1
- package/dist/components/wizard/step-build.js +12 -10
- package/dist/components/wizard/step-build.test.js +79 -99
- package/dist/components/wizard/step-build.test.js.map +1 -1
- package/dist/components/wizard/step-confirm.js +6 -4
- package/dist/components/wizard/step-confirm.test.js +11 -15
- package/dist/components/wizard/step-confirm.test.js.map +1 -1
- package/dist/components/wizard/step-refine.js +3 -2
- package/dist/components/wizard/step-refine.test.js +3 -2
- package/dist/components/wizard/step-refine.test.js.map +1 -1
- package/dist/components/wizard/step-settings.js +10 -8
- package/dist/components/wizard/step-settings.test.js +17 -13
- package/dist/components/wizard/step-settings.test.js.map +1 -1
- package/dist/components/wizard/step-sources.js +13 -11
- package/dist/components/wizard/step-sources.test.js +20 -16
- package/dist/components/wizard/step-sources.test.js.map +1 -1
- package/dist/components/wizard/step-stack.js +15 -14
- package/dist/components/wizard/step-stack.test.js +53 -59
- package/dist/components/wizard/step-stack.test.js.map +1 -1
- package/dist/components/wizard/view-title.js +2 -2
- package/dist/components/wizard/wizard-layout.js +10 -8
- package/dist/components/wizard/wizard-tabs.js +2 -2
- package/dist/components/wizard/wizard-tabs.test.js +2 -2
- package/dist/components/wizard/wizard.js +29 -27
- package/dist/hooks/init.js +32 -30
- package/dist/hooks/init.js.map +1 -1
- package/dist/{loader-2O32KKAQ.js → loader-4YOZCFIP.js} +4 -4
- package/dist/plugins/dummy-skill/.claude-plugin/.content-hash +1 -0
- package/dist/plugins/dummy-skill/.claude-plugin/plugin.json +13 -0
- package/dist/{source-loader-KMEBBZCQ.js → source-loader-O5RMYUBW.js} +6 -5
- package/dist/{source-manager-5XBSPJNR.js → source-manager-NKLL6HCL.js} +6 -5
- package/dist/stores/matrix-store.js +15 -0
- package/dist/stores/matrix-store.js.map +1 -0
- package/dist/stores/matrix-store.test.js +123 -0
- package/dist/stores/matrix-store.test.js.map +1 -0
- package/dist/stores/wizard-store.js +6 -5
- package/dist/stores/wizard-store.test.js +150 -113
- package/dist/stores/wizard-store.test.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-46DQG2N7.js.map +0 -1
- package/dist/chunk-52XO4ULK.js.map +0 -1
- package/dist/chunk-6DAZG54T.js.map +0 -1
- package/dist/chunk-7FMEMXJ4.js +0 -277
- package/dist/chunk-7FMEMXJ4.js.map +0 -1
- package/dist/chunk-AX3SZZWA.js.map +0 -1
- package/dist/chunk-BFD5NZQ4.js.map +0 -1
- package/dist/chunk-BKJHAJQW.js.map +0 -1
- package/dist/chunk-FWMWWE3X.js.map +0 -1
- package/dist/chunk-GH2RQ4MI.js.map +0 -1
- package/dist/chunk-H5DASUX5.js.map +0 -1
- package/dist/chunk-H7WJK7NJ.js.map +0 -1
- package/dist/chunk-IGM6HA3S.js.map +0 -1
- package/dist/chunk-KD2YS76O.js +0 -151
- package/dist/chunk-KD2YS76O.js.map +0 -1
- package/dist/chunk-KDO6WU76.js.map +0 -1
- package/dist/chunk-KIWFEBKH.js.map +0 -1
- package/dist/chunk-M6YWRMXH.js.map +0 -1
- package/dist/chunk-MMFQNJPE.js.map +0 -1
- package/dist/chunk-MR6OBL3B.js.map +0 -1
- package/dist/chunk-O6BA7Q2B.js.map +0 -1
- package/dist/chunk-SDKCQXWE.js.map +0 -1
- package/dist/chunk-WHISPMAQ.js.map +0 -1
- package/dist/chunk-YHOHLNHM.js.map +0 -1
- package/dist/chunk-Z3TM4N37.js.map +0 -1
- /package/dist/{chunk-MGNYPVOJ.js.map → chunk-AQYAVLZK.js.map} +0 -0
- /package/dist/{chunk-BNQ5O6LE.js.map → chunk-AUNBGZS4.js.map} +0 -0
- /package/dist/{chunk-VR3CDXDT.js.map → chunk-EE5EPS32.js.map} +0 -0
- /package/dist/{chunk-OCEFD7V6.js.map → chunk-F3REOP7N.js.map} +0 -0
- /package/dist/{chunk-C577AJE7.js.map → chunk-FGLUQSVU.js.map} +0 -0
- /package/dist/{chunk-X5EG4EFP.js.map → chunk-MWGDG4QN.js.map} +0 -0
- /package/dist/{chunk-CIG7IKX3.js.map → chunk-OV5UJWS5.js.map} +0 -0
- /package/dist/{chunk-IEEVXLJB.js.map → chunk-R46CB36B.js.map} +0 -0
- /package/dist/{chunk-XUDTFI4M.js.map → chunk-T5DJCIUP.js.map} +0 -0
- /package/dist/{chunk-AJJJE7F7.js.map → chunk-TQLDQ3XZ.js.map} +0 -0
- /package/dist/{chunk-WYVDNGJB.js.map → chunk-XMLCXRTS.js.map} +0 -0
- /package/dist/{chunk-SDLDPFNV.js.map → chunk-YEGPTBX5.js.map} +0 -0
- /package/dist/{chunk-SRBN6RRD.js.map → chunk-ZFY5EMDV.js.map} +0 -0
- /package/dist/{loader-2O32KKAQ.js.map → loader-4YOZCFIP.js.map} +0 -0
- /package/dist/{source-loader-KMEBBZCQ.js.map → source-loader-O5RMYUBW.js.map} +0 -0
- /package/dist/{source-manager-5XBSPJNR.js.map → source-manager-NKLL6HCL.js.map} +0 -0
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
} from "../../chunk-66UDJBF6.js";
|
|
14
14
|
import {
|
|
15
15
|
createMockMatrix
|
|
16
|
-
} from "../../chunk-
|
|
16
|
+
} from "../../chunk-N4D43IOO.js";
|
|
17
17
|
import {
|
|
18
18
|
afterEach,
|
|
19
19
|
beforeEach,
|
|
@@ -23,20 +23,23 @@ import {
|
|
|
23
23
|
} from "../../chunk-XY3XDVMI.js";
|
|
24
24
|
import {
|
|
25
25
|
StepAgents
|
|
26
|
-
} from "../../chunk-
|
|
26
|
+
} from "../../chunk-J4POGAJF.js";
|
|
27
27
|
import "../../chunk-K77I4XGL.js";
|
|
28
|
-
import "../../chunk-
|
|
29
|
-
import "../../chunk-
|
|
30
|
-
import "../../chunk-
|
|
31
|
-
import "../../chunk-
|
|
28
|
+
import "../../chunk-ZYUASJUN.js";
|
|
29
|
+
import "../../chunk-XMLCXRTS.js";
|
|
30
|
+
import "../../chunk-AQYAVLZK.js";
|
|
31
|
+
import "../../chunk-AUNBGZS4.js";
|
|
32
32
|
import {
|
|
33
33
|
useWizardStore
|
|
34
|
-
} from "../../chunk-
|
|
35
|
-
import "../../chunk-
|
|
36
|
-
import "../../chunk-
|
|
34
|
+
} from "../../chunk-4C7CSZC5.js";
|
|
35
|
+
import "../../chunk-53URJ5XK.js";
|
|
36
|
+
import "../../chunk-F3REOP7N.js";
|
|
37
37
|
import "../../chunk-T4EXUIBY.js";
|
|
38
|
-
import
|
|
39
|
-
|
|
38
|
+
import {
|
|
39
|
+
useMatrixStore
|
|
40
|
+
} from "../../chunk-BKL3DF2Q.js";
|
|
41
|
+
import "../../chunk-LMZXL5RQ.js";
|
|
42
|
+
import "../../chunk-EGMQ3SXN.js";
|
|
40
43
|
import "../../chunk-EC3UJRKZ.js";
|
|
41
44
|
import {
|
|
42
45
|
init_esm_shims
|
|
@@ -45,11 +48,11 @@ import {
|
|
|
45
48
|
// src/cli/components/wizard/step-agents.test.tsx
|
|
46
49
|
init_esm_shims();
|
|
47
50
|
import { jsx } from "react/jsx-runtime";
|
|
48
|
-
var EMPTY_MATRIX = createMockMatrix(
|
|
51
|
+
var EMPTY_MATRIX = createMockMatrix();
|
|
49
52
|
describe("StepAgents component", () => {
|
|
50
53
|
let cleanup;
|
|
51
54
|
beforeEach(() => {
|
|
52
|
-
|
|
55
|
+
useMatrixStore.getState().setMatrix(EMPTY_MATRIX);
|
|
53
56
|
});
|
|
54
57
|
afterEach(() => {
|
|
55
58
|
cleanup?.();
|
|
@@ -57,13 +60,13 @@ describe("StepAgents component", () => {
|
|
|
57
60
|
});
|
|
58
61
|
describe("rendering", () => {
|
|
59
62
|
it("should render title", () => {
|
|
60
|
-
const { lastFrame, unmount } = render(/* @__PURE__ */ jsx(StepAgents, {
|
|
63
|
+
const { lastFrame, unmount } = render(/* @__PURE__ */ jsx(StepAgents, {}));
|
|
61
64
|
cleanup = unmount;
|
|
62
65
|
const output = lastFrame();
|
|
63
66
|
globalExpect(output).toContain("Select agents to compile:");
|
|
64
67
|
});
|
|
65
68
|
it("should render all agents", () => {
|
|
66
|
-
const { lastFrame, unmount } = render(/* @__PURE__ */ jsx(StepAgents, {
|
|
69
|
+
const { lastFrame, unmount } = render(/* @__PURE__ */ jsx(StepAgents, {}));
|
|
67
70
|
cleanup = unmount;
|
|
68
71
|
const output = lastFrame();
|
|
69
72
|
globalExpect(output).toContain("Web Developer");
|
|
@@ -85,7 +88,7 @@ describe("StepAgents component", () => {
|
|
|
85
88
|
globalExpect(output).toContain("Documentor");
|
|
86
89
|
});
|
|
87
90
|
it("should render agent descriptions", () => {
|
|
88
|
-
const { lastFrame, unmount } = render(/* @__PURE__ */ jsx(StepAgents, {
|
|
91
|
+
const { lastFrame, unmount } = render(/* @__PURE__ */ jsx(StepAgents, {}));
|
|
89
92
|
cleanup = unmount;
|
|
90
93
|
const output = lastFrame();
|
|
91
94
|
globalExpect(output).toContain("Frontend features, components, TypeScript");
|
|
@@ -93,7 +96,7 @@ describe("StepAgents component", () => {
|
|
|
93
96
|
globalExpect(output).toContain("CLI commands, interactive prompts");
|
|
94
97
|
});
|
|
95
98
|
it("should render group headers", () => {
|
|
96
|
-
const { lastFrame, unmount } = render(/* @__PURE__ */ jsx(StepAgents, {
|
|
99
|
+
const { lastFrame, unmount } = render(/* @__PURE__ */ jsx(StepAgents, {}));
|
|
97
100
|
cleanup = unmount;
|
|
98
101
|
const output = lastFrame();
|
|
99
102
|
globalExpect(output).toContain("Web");
|
|
@@ -102,7 +105,7 @@ describe("StepAgents component", () => {
|
|
|
102
105
|
globalExpect(output).toContain("Meta");
|
|
103
106
|
});
|
|
104
107
|
it("should show continue arrow", () => {
|
|
105
|
-
const { lastFrame, unmount } = render(/* @__PURE__ */ jsx(StepAgents, {
|
|
108
|
+
const { lastFrame, unmount } = render(/* @__PURE__ */ jsx(StepAgents, {}));
|
|
106
109
|
cleanup = unmount;
|
|
107
110
|
const output = lastFrame();
|
|
108
111
|
globalExpect(output).toContain("\u2192");
|
|
@@ -113,13 +116,13 @@ describe("StepAgents component", () => {
|
|
|
113
116
|
store.toggleAgent("web-developer");
|
|
114
117
|
store.toggleAgent("api-developer");
|
|
115
118
|
store.toggleAgent("web-reviewer");
|
|
116
|
-
const { lastFrame, unmount } = render(/* @__PURE__ */ jsx(StepAgents, {
|
|
119
|
+
const { lastFrame, unmount } = render(/* @__PURE__ */ jsx(StepAgents, {}));
|
|
117
120
|
cleanup = unmount;
|
|
118
121
|
const output = lastFrame();
|
|
119
122
|
globalExpect(output).toContain("Continue with 3 agent(s)");
|
|
120
123
|
});
|
|
121
124
|
it("should show 'Continue without agents' when no agents selected", () => {
|
|
122
|
-
const { lastFrame, unmount } = render(/* @__PURE__ */ jsx(StepAgents, {
|
|
125
|
+
const { lastFrame, unmount } = render(/* @__PURE__ */ jsx(StepAgents, {}));
|
|
123
126
|
cleanup = unmount;
|
|
124
127
|
const output = lastFrame();
|
|
125
128
|
globalExpect(output).toContain("Continue without agents");
|
|
@@ -127,7 +130,7 @@ describe("StepAgents component", () => {
|
|
|
127
130
|
});
|
|
128
131
|
describe("keyboard interaction", () => {
|
|
129
132
|
it("should toggle agent on SPACE", async () => {
|
|
130
|
-
const { stdin, lastFrame, unmount } = render(/* @__PURE__ */ jsx(StepAgents, {
|
|
133
|
+
const { stdin, lastFrame, unmount } = render(/* @__PURE__ */ jsx(StepAgents, {}));
|
|
131
134
|
cleanup = unmount;
|
|
132
135
|
await delay(RENDER_DELAY_MS);
|
|
133
136
|
await stdin.write(SPACE);
|
|
@@ -136,7 +139,7 @@ describe("StepAgents component", () => {
|
|
|
136
139
|
globalExpect(store.selectedAgents).toContain("web-developer");
|
|
137
140
|
});
|
|
138
141
|
it("should toggle correct agent after navigation", async () => {
|
|
139
|
-
const { stdin, unmount } = render(/* @__PURE__ */ jsx(StepAgents, {
|
|
142
|
+
const { stdin, unmount } = render(/* @__PURE__ */ jsx(StepAgents, {}));
|
|
140
143
|
cleanup = unmount;
|
|
141
144
|
await delay(RENDER_DELAY_MS);
|
|
142
145
|
await stdin.write(ARROW_DOWN);
|
|
@@ -150,7 +153,7 @@ describe("StepAgents component", () => {
|
|
|
150
153
|
const store = useWizardStore.getState();
|
|
151
154
|
store.toggleAgent("web-developer");
|
|
152
155
|
store.setStep("agents");
|
|
153
|
-
const { stdin, unmount } = render(/* @__PURE__ */ jsx(StepAgents, {
|
|
156
|
+
const { stdin, unmount } = render(/* @__PURE__ */ jsx(StepAgents, {}));
|
|
154
157
|
cleanup = unmount;
|
|
155
158
|
await delay(RENDER_DELAY_MS);
|
|
156
159
|
await stdin.write(ENTER);
|
|
@@ -161,7 +164,7 @@ describe("StepAgents component", () => {
|
|
|
161
164
|
it("should navigate to confirm on ENTER even with no agents selected", async () => {
|
|
162
165
|
const store = useWizardStore.getState();
|
|
163
166
|
store.setStep("agents");
|
|
164
|
-
const { stdin, unmount } = render(/* @__PURE__ */ jsx(StepAgents, {
|
|
167
|
+
const { stdin, unmount } = render(/* @__PURE__ */ jsx(StepAgents, {}));
|
|
165
168
|
cleanup = unmount;
|
|
166
169
|
await delay(RENDER_DELAY_MS);
|
|
167
170
|
await stdin.write(ENTER);
|
|
@@ -173,7 +176,7 @@ describe("StepAgents component", () => {
|
|
|
173
176
|
const store = useWizardStore.getState();
|
|
174
177
|
store.setStep("sources");
|
|
175
178
|
store.setStep("agents");
|
|
176
|
-
const { stdin, unmount } = render(/* @__PURE__ */ jsx(StepAgents, {
|
|
179
|
+
const { stdin, unmount } = render(/* @__PURE__ */ jsx(StepAgents, {}));
|
|
177
180
|
cleanup = unmount;
|
|
178
181
|
await delay(RENDER_DELAY_MS);
|
|
179
182
|
await stdin.write(ESCAPE);
|
|
@@ -184,7 +187,7 @@ describe("StepAgents component", () => {
|
|
|
184
187
|
it("should toggle agent off when already selected", async () => {
|
|
185
188
|
const store = useWizardStore.getState();
|
|
186
189
|
store.toggleAgent("web-developer");
|
|
187
|
-
const { stdin, unmount } = render(/* @__PURE__ */ jsx(StepAgents, {
|
|
190
|
+
const { stdin, unmount } = render(/* @__PURE__ */ jsx(StepAgents, {}));
|
|
188
191
|
cleanup = unmount;
|
|
189
192
|
await delay(RENDER_DELAY_MS);
|
|
190
193
|
await stdin.write(SPACE);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/cli/components/wizard/step-agents.test.tsx"],"sourcesContent":["import { render } from \"ink-testing-library\";\nimport { afterEach, beforeEach, describe, expect, it } from \"vitest\";\nimport { StepAgents } from \"./step-agents\";\nimport { useWizardStore } from \"../../stores/wizard-store\";\nimport {\n ARROW_DOWN,\n ENTER,\n ESCAPE,\n SPACE,\n RENDER_DELAY_MS,\n INPUT_DELAY_MS,\n delay,\n} from \"../../lib/__tests__/test-constants\";\nimport { createMockMatrix } from \"../../lib/__tests__/helpers\";\n\nconst EXPECTED_AGENT_COUNT = 18;\nconst EMPTY_MATRIX = createMockMatrix({});\n\ndescribe(\"StepAgents component\", () => {\n let cleanup: (() => void) | undefined;\n\n beforeEach(() => {\n useWizardStore.getState().reset();\n });\n\n afterEach(() => {\n cleanup?.();\n cleanup = undefined;\n });\n\n describe(\"rendering\", () => {\n it(\"should render title\", () => {\n const { lastFrame, unmount } = render(<StepAgents matrix={EMPTY_MATRIX} />);\n cleanup = unmount;\n\n const output = lastFrame();\n expect(output).toContain(\"Select agents to compile:\");\n });\n\n it(\"should render all agents\", () => {\n const { lastFrame, unmount } = render(<StepAgents matrix={EMPTY_MATRIX} />);\n cleanup = unmount;\n\n const output = lastFrame();\n expect(output).toContain(\"Web Developer\");\n expect(output).toContain(\"API Developer\");\n expect(output).toContain(\"CLI Developer\");\n expect(output).toContain(\"Web Architecture\");\n expect(output).toContain(\"Web Reviewer\");\n expect(output).toContain(\"API Reviewer\");\n expect(output).toContain(\"CLI Reviewer\");\n expect(output).toContain(\"Web Researcher\");\n expect(output).toContain(\"API Researcher\");\n expect(output).toContain(\"Web Tester\");\n expect(output).toContain(\"CLI Tester\");\n expect(output).toContain(\"Web PM\");\n expect(output).toContain(\"Pattern Scout\");\n expect(output).toContain(\"Pattern Critique\");\n expect(output).toContain(\"Agent Summoner\");\n expect(output).toContain(\"Skill Summoner\");\n expect(output).toContain(\"Documentor\");\n });\n\n it(\"should render agent descriptions\", () => {\n const { lastFrame, unmount } = render(<StepAgents matrix={EMPTY_MATRIX} />);\n cleanup = unmount;\n\n const output = lastFrame();\n expect(output).toContain(\"Frontend features, components, TypeScript\");\n expect(output).toContain(\"Backend routes, database, middleware\");\n expect(output).toContain(\"CLI commands, interactive prompts\");\n });\n\n it(\"should render group headers\", () => {\n const { lastFrame, unmount } = render(<StepAgents matrix={EMPTY_MATRIX} />);\n cleanup = unmount;\n\n const output = lastFrame();\n expect(output).toContain(\"Web\");\n expect(output).toContain(\"API\");\n expect(output).toContain(\"CLI\");\n expect(output).toContain(\"Meta\");\n });\n\n it(\"should show continue arrow\", () => {\n const { lastFrame, unmount } = render(<StepAgents matrix={EMPTY_MATRIX} />);\n cleanup = unmount;\n\n const output = lastFrame();\n expect(output).toContain(\"\\u2192\");\n expect(output).toContain(\"Continue\");\n });\n\n it(\"should show continue option with agent count when agents selected\", () => {\n const store = useWizardStore.getState();\n store.toggleAgent(\"web-developer\");\n store.toggleAgent(\"api-developer\");\n store.toggleAgent(\"web-reviewer\");\n\n const { lastFrame, unmount } = render(<StepAgents matrix={EMPTY_MATRIX} />);\n cleanup = unmount;\n\n const output = lastFrame();\n expect(output).toContain(\"Continue with 3 agent(s)\");\n });\n\n it(\"should show 'Continue without agents' when no agents selected\", () => {\n const { lastFrame, unmount } = render(<StepAgents matrix={EMPTY_MATRIX} />);\n cleanup = unmount;\n\n const output = lastFrame();\n expect(output).toContain(\"Continue without agents\");\n });\n });\n\n describe(\"keyboard interaction\", () => {\n it(\"should toggle agent on SPACE\", async () => {\n const { stdin, lastFrame, unmount } = render(<StepAgents matrix={EMPTY_MATRIX} />);\n cleanup = unmount;\n\n await delay(RENDER_DELAY_MS);\n await stdin.write(SPACE);\n await delay(INPUT_DELAY_MS);\n\n const store = useWizardStore.getState();\n expect(store.selectedAgents).toContain(\"web-developer\");\n });\n\n it(\"should toggle correct agent after navigation\", async () => {\n const { stdin, unmount } = render(<StepAgents matrix={EMPTY_MATRIX} />);\n cleanup = unmount;\n\n await delay(RENDER_DELAY_MS);\n await stdin.write(ARROW_DOWN);\n await delay(INPUT_DELAY_MS);\n await stdin.write(SPACE);\n await delay(INPUT_DELAY_MS);\n\n const store = useWizardStore.getState();\n expect(store.selectedAgents).toContain(\"web-reviewer\");\n });\n\n it(\"should navigate to confirm on ENTER when agents selected\", async () => {\n const store = useWizardStore.getState();\n store.toggleAgent(\"web-developer\");\n // Set step to agents so setStep(\"confirm\") actually navigates\n store.setStep(\"agents\");\n\n const { stdin, unmount } = render(<StepAgents matrix={EMPTY_MATRIX} />);\n cleanup = unmount;\n\n await delay(RENDER_DELAY_MS);\n await stdin.write(ENTER);\n await delay(INPUT_DELAY_MS);\n\n const updatedStore = useWizardStore.getState();\n expect(updatedStore.step).toBe(\"confirm\");\n });\n\n it(\"should navigate to confirm on ENTER even with no agents selected\", async () => {\n const store = useWizardStore.getState();\n store.setStep(\"agents\");\n\n const { stdin, unmount } = render(<StepAgents matrix={EMPTY_MATRIX} />);\n cleanup = unmount;\n\n await delay(RENDER_DELAY_MS);\n await stdin.write(ENTER);\n await delay(INPUT_DELAY_MS);\n\n const updatedStore = useWizardStore.getState();\n expect(updatedStore.step).toBe(\"confirm\");\n });\n\n it(\"should go back on ESC\", async () => {\n const store = useWizardStore.getState();\n store.setStep(\"sources\");\n store.setStep(\"agents\");\n\n const { stdin, unmount } = render(<StepAgents matrix={EMPTY_MATRIX} />);\n cleanup = unmount;\n\n await delay(RENDER_DELAY_MS);\n await stdin.write(ESCAPE);\n await delay(INPUT_DELAY_MS);\n\n const updatedStore = useWizardStore.getState();\n expect(updatedStore.step).toBe(\"sources\");\n });\n\n it(\"should toggle agent off when already selected\", async () => {\n const store = useWizardStore.getState();\n store.toggleAgent(\"web-developer\");\n\n const { stdin, unmount } = render(<StepAgents matrix={EMPTY_MATRIX} />);\n cleanup = unmount;\n\n await delay(RENDER_DELAY_MS);\n // First item is web-developer, toggle it off\n await stdin.write(SPACE);\n await delay(INPUT_DELAY_MS);\n\n const updatedStore = useWizardStore.getState();\n exp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ink-testing-library\";\nimport { afterEach, beforeEach, describe, expect, it } from \"vitest\";\nimport { StepAgents } from \"./step-agents\";\nimport { useWizardStore } from \"../../stores/wizard-store\";\nimport { useMatrixStore } from \"../../stores/matrix-store\";\nimport {\n ARROW_DOWN,\n ENTER,\n ESCAPE,\n SPACE,\n RENDER_DELAY_MS,\n INPUT_DELAY_MS,\n delay,\n} from \"../../lib/__tests__/test-constants\";\nimport { createMockMatrix } from \"../../lib/__tests__/helpers\";\n\nconst EXPECTED_AGENT_COUNT = 18;\nconst EMPTY_MATRIX = createMockMatrix();\n\ndescribe(\"StepAgents component\", () => {\n let cleanup: (() => void) | undefined;\n\n beforeEach(() => {\n useMatrixStore.getState().setMatrix(EMPTY_MATRIX);\n });\n\n afterEach(() => {\n cleanup?.();\n cleanup = undefined;\n });\n\n describe(\"rendering\", () => {\n it(\"should render title\", () => {\n const { lastFrame, unmount } = render(<StepAgents />);\n cleanup = unmount;\n\n const output = lastFrame();\n expect(output).toContain(\"Select agents to compile:\");\n });\n\n it(\"should render all agents\", () => {\n const { lastFrame, unmount } = render(<StepAgents />);\n cleanup = unmount;\n\n const output = lastFrame();\n expect(output).toContain(\"Web Developer\");\n expect(output).toContain(\"API Developer\");\n expect(output).toContain(\"CLI Developer\");\n expect(output).toContain(\"Web Architecture\");\n expect(output).toContain(\"Web Reviewer\");\n expect(output).toContain(\"API Reviewer\");\n expect(output).toContain(\"CLI Reviewer\");\n expect(output).toContain(\"Web Researcher\");\n expect(output).toContain(\"API Researcher\");\n expect(output).toContain(\"Web Tester\");\n expect(output).toContain(\"CLI Tester\");\n expect(output).toContain(\"Web PM\");\n expect(output).toContain(\"Pattern Scout\");\n expect(output).toContain(\"Pattern Critique\");\n expect(output).toContain(\"Agent Summoner\");\n expect(output).toContain(\"Skill Summoner\");\n expect(output).toContain(\"Documentor\");\n });\n\n it(\"should render agent descriptions\", () => {\n const { lastFrame, unmount } = render(<StepAgents />);\n cleanup = unmount;\n\n const output = lastFrame();\n expect(output).toContain(\"Frontend features, components, TypeScript\");\n expect(output).toContain(\"Backend routes, database, middleware\");\n expect(output).toContain(\"CLI commands, interactive prompts\");\n });\n\n it(\"should render group headers\", () => {\n const { lastFrame, unmount } = render(<StepAgents />);\n cleanup = unmount;\n\n const output = lastFrame();\n expect(output).toContain(\"Web\");\n expect(output).toContain(\"API\");\n expect(output).toContain(\"CLI\");\n expect(output).toContain(\"Meta\");\n });\n\n it(\"should show continue arrow\", () => {\n const { lastFrame, unmount } = render(<StepAgents />);\n cleanup = unmount;\n\n const output = lastFrame();\n expect(output).toContain(\"\\u2192\");\n expect(output).toContain(\"Continue\");\n });\n\n it(\"should show continue option with agent count when agents selected\", () => {\n const store = useWizardStore.getState();\n store.toggleAgent(\"web-developer\");\n store.toggleAgent(\"api-developer\");\n store.toggleAgent(\"web-reviewer\");\n\n const { lastFrame, unmount } = render(<StepAgents />);\n cleanup = unmount;\n\n const output = lastFrame();\n expect(output).toContain(\"Continue with 3 agent(s)\");\n });\n\n it(\"should show 'Continue without agents' when no agents selected\", () => {\n const { lastFrame, unmount } = render(<StepAgents />);\n cleanup = unmount;\n\n const output = lastFrame();\n expect(output).toContain(\"Continue without agents\");\n });\n });\n\n describe(\"keyboard interaction\", () => {\n it(\"should toggle agent on SPACE\", async () => {\n const { stdin, lastFrame, unmount } = render(<StepAgents />);\n cleanup = unmount;\n\n await delay(RENDER_DELAY_MS);\n await stdin.write(SPACE);\n await delay(INPUT_DELAY_MS);\n\n const store = useWizardStore.getState();\n expect(store.selectedAgents).toContain(\"web-developer\");\n });\n\n it(\"should toggle correct agent after navigation\", async () => {\n const { stdin, unmount } = render(<StepAgents />);\n cleanup = unmount;\n\n await delay(RENDER_DELAY_MS);\n await stdin.write(ARROW_DOWN);\n await delay(INPUT_DELAY_MS);\n await stdin.write(SPACE);\n await delay(INPUT_DELAY_MS);\n\n const store = useWizardStore.getState();\n expect(store.selectedAgents).toContain(\"web-reviewer\");\n });\n\n it(\"should navigate to confirm on ENTER when agents selected\", async () => {\n const store = useWizardStore.getState();\n store.toggleAgent(\"web-developer\");\n // Set step to agents so setStep(\"confirm\") actually navigates\n store.setStep(\"agents\");\n\n const { stdin, unmount } = render(<StepAgents />);\n cleanup = unmount;\n\n await delay(RENDER_DELAY_MS);\n await stdin.write(ENTER);\n await delay(INPUT_DELAY_MS);\n\n const updatedStore = useWizardStore.getState();\n expect(updatedStore.step).toBe(\"confirm\");\n });\n\n it(\"should navigate to confirm on ENTER even with no agents selected\", async () => {\n const store = useWizardStore.getState();\n store.setStep(\"agents\");\n\n const { stdin, unmount } = render(<StepAgents />);\n cleanup = unmount;\n\n await delay(RENDER_DELAY_MS);\n await stdin.write(ENTER);\n await delay(INPUT_DELAY_MS);\n\n const updatedStore = useWizardStore.getState();\n expect(updatedStore.step).toBe(\"confirm\");\n });\n\n it(\"should go back on ESC\", async () => {\n const store = useWizardStore.getState();\n store.setStep(\"sources\");\n store.setStep(\"agents\");\n\n const { stdin, unmount } = render(<StepAgents />);\n cleanup = unmount;\n\n await delay(RENDER_DELAY_MS);\n await stdin.write(ESCAPE);\n await delay(INPUT_DELAY_MS);\n\n const updatedStore = useWizardStore.getState();\n expect(updatedStore.step).toBe(\"sources\");\n });\n\n it(\"should toggle agent off when already selected\", async () => {\n const store = useWizardStore.getState();\n store.toggleAgent(\"web-developer\");\n\n const { stdin, unmount } = render(<StepAgents />);\n cleanup = unmount;\n\n await delay(RENDER_DELAY_MS);\n // First item is web-developer, toggle it off\n await stdin.write(SPACE);\n await delay(INPUT_DELAY_MS);\n\n const updatedStore = useWizardStore.getState();\n expect(updatedStore.selectedAgents).not.toContain(\"web-developer\");\n });\n });\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAiC4C;AAhB5C,IAAM,eAAe,iBAAiB;AAEtC,SAAS,wBAAwB,MAAM;AACrC,MAAI;AAEJ,aAAW,MAAM;AACf,mBAAe,SAAS,EAAE,UAAU,YAAY;AAA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yB,YAAY;AACtC,YAAM,QAAQ,eAAe,SAAS;AACtC,YAAM,QAAQ,SAAS;AACvB,YAAM,QAAQ,QAAQ;AAEtB,YAAM,EAAE,OAAO,QAAQ,IAAI,OAAO,oBAAC,cAAW,CAAE;AAChD,gBAAU;AAEV,YAAM,MAAM,eAAe;AAC3B,YAAM,MAAM,MAAM,MAAM;AACxB,YAAM,MAAM,cAAc;AAE1B,YAAM,eAAe,eAAe,SAAS;AAC7C,mBAAO,aAAa,IAAI,EAAE,KAAK,SAAS;AAAA,IAC1C,CAAC;AAED,OAAG,iDAAiD,YAAY;AAC9D,YAAM,QAAQ,eAAe,SAAS;AACtC,YAAM,YAAY,eAAe;AAEjC,YAAM,EAAE,OAAO,QAAQ,IAAI,OAAO,oBAAC,cAAW,CAAE;AAChD,gBAAU;AAEV,YAAM,MAAM,eAAe;AAE3B,YAAM,MAAM,MAAM,KAAK;AACvB,YAAM,MAAM,cAAc;AAE1B,YAAM,eAAe,eAAe,SAAS;AAC7C,mBAAO,aAAa,cAAc,EAAE,IAAI,UAAU,eAAe;AAAA,IACnE,CAAC;AAAA,EACH,CAAC;AACH,CAAC;","names":[]}
|
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
StepBuild
|
|
4
|
-
} from "../../chunk-
|
|
4
|
+
} from "../../chunk-BGPGQF35.js";
|
|
5
5
|
import "../../chunk-K77I4XGL.js";
|
|
6
|
-
import "../../chunk-
|
|
6
|
+
import "../../chunk-CKPJTMNC.js";
|
|
7
7
|
import "../../chunk-GG4BSB6S.js";
|
|
8
|
-
import "../../chunk-
|
|
9
|
-
import "../../chunk-
|
|
10
|
-
import "../../chunk-
|
|
11
|
-
import "../../chunk-
|
|
12
|
-
import "../../chunk-
|
|
13
|
-
import "../../chunk-
|
|
8
|
+
import "../../chunk-ZYUASJUN.js";
|
|
9
|
+
import "../../chunk-AQYAVLZK.js";
|
|
10
|
+
import "../../chunk-AUNBGZS4.js";
|
|
11
|
+
import "../../chunk-4C7CSZC5.js";
|
|
12
|
+
import "../../chunk-6VIOO74O.js";
|
|
13
|
+
import "../../chunk-53URJ5XK.js";
|
|
14
|
+
import "../../chunk-F3REOP7N.js";
|
|
14
15
|
import "../../chunk-T4EXUIBY.js";
|
|
15
|
-
import "../../chunk-
|
|
16
|
-
import "../../chunk-
|
|
16
|
+
import "../../chunk-BKL3DF2Q.js";
|
|
17
|
+
import "../../chunk-LMZXL5RQ.js";
|
|
18
|
+
import "../../chunk-EGMQ3SXN.js";
|
|
17
19
|
import "../../chunk-EC3UJRKZ.js";
|
|
18
20
|
import "../../chunk-DHET7RCE.js";
|
|
19
21
|
export {
|
|
@@ -10,38 +10,41 @@ import {
|
|
|
10
10
|
render
|
|
11
11
|
} from "../../chunk-66UDJBF6.js";
|
|
12
12
|
import {
|
|
13
|
-
|
|
13
|
+
SKILLS,
|
|
14
|
+
TEST_CATEGORIES,
|
|
14
15
|
createMockMatrix,
|
|
15
|
-
createMockSkill
|
|
16
|
-
|
|
17
|
-
} from "../../chunk-7FMEMXJ4.js";
|
|
16
|
+
createMockSkill
|
|
17
|
+
} from "../../chunk-N4D43IOO.js";
|
|
18
18
|
import {
|
|
19
19
|
afterEach,
|
|
20
|
+
beforeEach,
|
|
20
21
|
describe,
|
|
21
22
|
globalExpect,
|
|
22
23
|
it,
|
|
23
24
|
vi
|
|
24
25
|
} from "../../chunk-XY3XDVMI.js";
|
|
25
26
|
import {
|
|
26
|
-
StepBuild
|
|
27
|
-
|
|
27
|
+
StepBuild,
|
|
28
|
+
validateBuildStep
|
|
29
|
+
} from "../../chunk-BGPGQF35.js";
|
|
28
30
|
import "../../chunk-K77I4XGL.js";
|
|
29
|
-
import "../../chunk-
|
|
31
|
+
import "../../chunk-CKPJTMNC.js";
|
|
30
32
|
import "../../chunk-GG4BSB6S.js";
|
|
31
33
|
import {
|
|
32
34
|
orderDomains
|
|
33
|
-
} from "../../chunk-
|
|
34
|
-
import "../../chunk-
|
|
35
|
-
import "../../chunk-
|
|
36
|
-
import
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
import "../../chunk-FWMWWE3X.js";
|
|
41
|
-
import "../../chunk-OCEFD7V6.js";
|
|
35
|
+
} from "../../chunk-ZYUASJUN.js";
|
|
36
|
+
import "../../chunk-AQYAVLZK.js";
|
|
37
|
+
import "../../chunk-AUNBGZS4.js";
|
|
38
|
+
import "../../chunk-4C7CSZC5.js";
|
|
39
|
+
import "../../chunk-6VIOO74O.js";
|
|
40
|
+
import "../../chunk-53URJ5XK.js";
|
|
41
|
+
import "../../chunk-F3REOP7N.js";
|
|
42
42
|
import "../../chunk-T4EXUIBY.js";
|
|
43
|
-
import
|
|
44
|
-
|
|
43
|
+
import {
|
|
44
|
+
useMatrixStore
|
|
45
|
+
} from "../../chunk-BKL3DF2Q.js";
|
|
46
|
+
import "../../chunk-LMZXL5RQ.js";
|
|
47
|
+
import "../../chunk-EGMQ3SXN.js";
|
|
45
48
|
import "../../chunk-EC3UJRKZ.js";
|
|
46
49
|
import {
|
|
47
50
|
init_esm_shims
|
|
@@ -53,58 +56,50 @@ import { indexBy } from "remeda";
|
|
|
53
56
|
|
|
54
57
|
// src/cli/lib/__tests__/mock-data/mock-categories.ts
|
|
55
58
|
init_esm_shims();
|
|
56
|
-
var WEB_FRAMEWORK_CATEGORY =
|
|
57
|
-
|
|
58
|
-
required: true
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
domain: "web",
|
|
59
|
+
var WEB_FRAMEWORK_CATEGORY = {
|
|
60
|
+
...TEST_CATEGORIES.framework,
|
|
61
|
+
required: true
|
|
62
|
+
};
|
|
63
|
+
var WEB_STYLING_CATEGORY = {
|
|
64
|
+
...TEST_CATEGORIES.styling,
|
|
63
65
|
required: true,
|
|
64
66
|
order: 1
|
|
65
|
-
}
|
|
66
|
-
var WEB_STATE_CATEGORY =
|
|
67
|
-
|
|
68
|
-
required: false,
|
|
67
|
+
};
|
|
68
|
+
var WEB_STATE_CATEGORY = {
|
|
69
|
+
...TEST_CATEGORIES.clientState,
|
|
69
70
|
order: 2
|
|
70
|
-
}
|
|
71
|
-
var API_FRAMEWORK_CATEGORY =
|
|
71
|
+
};
|
|
72
|
+
var API_FRAMEWORK_CATEGORY = {
|
|
73
|
+
...TEST_CATEGORIES.api,
|
|
74
|
+
displayName: "API Framework",
|
|
75
|
+
// Boundary cast: narrows string to Domain union
|
|
72
76
|
domain: "api",
|
|
73
77
|
required: true,
|
|
74
78
|
order: 0
|
|
75
|
-
}
|
|
76
|
-
var API_DATABASE_CATEGORY =
|
|
79
|
+
};
|
|
80
|
+
var API_DATABASE_CATEGORY = {
|
|
81
|
+
...TEST_CATEGORIES.database,
|
|
82
|
+
// Boundary cast: narrows string to Domain union
|
|
77
83
|
domain: "api",
|
|
78
|
-
required: false,
|
|
79
84
|
order: 1
|
|
80
|
-
}
|
|
81
|
-
var
|
|
85
|
+
};
|
|
86
|
+
var CLI_FRAMEWORK_CATEGORY = {
|
|
87
|
+
...TEST_CATEGORIES.cliFramework,
|
|
88
|
+
domain: "cli",
|
|
89
|
+
exclusive: false
|
|
90
|
+
};
|
|
91
|
+
var FRAMEWORK_CATEGORY = {
|
|
92
|
+
...TEST_CATEGORIES.framework,
|
|
82
93
|
description: "Web frameworks",
|
|
83
|
-
exclusive: true,
|
|
84
|
-
required: false,
|
|
85
94
|
order: 1
|
|
86
|
-
}
|
|
95
|
+
};
|
|
87
96
|
|
|
88
97
|
// src/cli/components/wizard/step-build.test.tsx
|
|
89
98
|
import { jsx } from "react/jsx-runtime";
|
|
90
|
-
var buildTestMatrix = (categories, skills) => createMockMatrix(
|
|
91
|
-
indexBy
|
|
92
|
-
|
|
93
|
-
categories: indexBy(categories, (c) => c.id)
|
|
94
|
-
}
|
|
95
|
-
);
|
|
96
|
-
var reactSkill = getTestSkill("react", { displayName: "react" });
|
|
97
|
-
var vueSkill = getTestSkill("vue", { displayName: "vue" });
|
|
98
|
-
var tailwindSkill = createMockSkill("web-styling-tailwind", "web-styling", {
|
|
99
|
-
displayName: "tailwind"
|
|
100
|
-
});
|
|
101
|
-
var scssSkill = getTestSkill("scss-modules", { displayName: "scss-modules" });
|
|
102
|
-
var zustandSkill = getTestSkill("zustand", { displayName: "zustand" });
|
|
103
|
-
var honoSkill = getTestSkill("hono", { displayName: "hono" });
|
|
104
|
-
var expressSkill = createMockSkill("api-framework-express", "api-api", {
|
|
105
|
-
displayName: "express"
|
|
99
|
+
var buildTestMatrix = (categories, skills) => createMockMatrix(...skills, {
|
|
100
|
+
// Test data construction cast: indexBy returns generic Record
|
|
101
|
+
categories: indexBy(categories, (c) => c.id)
|
|
106
102
|
});
|
|
107
|
-
var postgresSkill = createMockSkill("api-database-postgres", "api-database");
|
|
108
103
|
var defaultMatrix = buildTestMatrix(
|
|
109
104
|
[
|
|
110
105
|
WEB_FRAMEWORK_CATEGORY,
|
|
@@ -114,18 +109,16 @@ var defaultMatrix = buildTestMatrix(
|
|
|
114
109
|
API_DATABASE_CATEGORY
|
|
115
110
|
],
|
|
116
111
|
[
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
postgresSkill
|
|
112
|
+
SKILLS.react,
|
|
113
|
+
SKILLS.vue,
|
|
114
|
+
SKILLS.tailwind,
|
|
115
|
+
SKILLS.scss,
|
|
116
|
+
SKILLS.zustand,
|
|
117
|
+
SKILLS.hono,
|
|
118
|
+
SKILLS.drizzle
|
|
125
119
|
]
|
|
126
120
|
);
|
|
127
121
|
var defaultProps = {
|
|
128
|
-
matrix: defaultMatrix,
|
|
129
122
|
domain: "web",
|
|
130
123
|
selectedDomains: ["web"],
|
|
131
124
|
selections: {},
|
|
@@ -141,6 +134,9 @@ var renderStepBuild = (props = {}) => {
|
|
|
141
134
|
};
|
|
142
135
|
describe("StepBuild component", () => {
|
|
143
136
|
let cleanup;
|
|
137
|
+
beforeEach(() => {
|
|
138
|
+
useMatrixStore.getState().setMatrix(defaultMatrix);
|
|
139
|
+
});
|
|
144
140
|
afterEach(() => {
|
|
145
141
|
cleanup?.();
|
|
146
142
|
cleanup = void 0;
|
|
@@ -176,10 +172,10 @@ describe("StepBuild component", () => {
|
|
|
176
172
|
});
|
|
177
173
|
cleanup = unmount;
|
|
178
174
|
const output = lastFrame();
|
|
179
|
-
globalExpect(output).toContain("
|
|
180
|
-
globalExpect(output).toContain("
|
|
181
|
-
globalExpect(output).toContain("
|
|
182
|
-
globalExpect(output).toContain("
|
|
175
|
+
globalExpect(output).toContain("React");
|
|
176
|
+
globalExpect(output).toContain("Vue");
|
|
177
|
+
globalExpect(output).toContain("Tailwind");
|
|
178
|
+
globalExpect(output).toContain("Scss Modules");
|
|
183
179
|
});
|
|
184
180
|
it("should show required indicator (*) for required categories", () => {
|
|
185
181
|
const { lastFrame, unmount } = renderStepBuild();
|
|
@@ -294,7 +290,7 @@ describe("StepBuild component", () => {
|
|
|
294
290
|
});
|
|
295
291
|
cleanup = unmount;
|
|
296
292
|
const output = lastFrame();
|
|
297
|
-
globalExpect(output).toContain("
|
|
293
|
+
globalExpect(output).toContain("React");
|
|
298
294
|
});
|
|
299
295
|
it("should pass showLabels to CategoryGrid", () => {
|
|
300
296
|
const { lastFrame, unmount } = renderStepBuild({
|
|
@@ -382,7 +378,7 @@ describe("StepBuild component", () => {
|
|
|
382
378
|
it("should handle allSelections with skills from other domains", () => {
|
|
383
379
|
const { lastFrame, unmount } = renderStepBuild({
|
|
384
380
|
domain: "web",
|
|
385
|
-
allSelections: ["api-framework-hono", "api-database-
|
|
381
|
+
allSelections: ["api-framework-hono", "api-database-drizzle"],
|
|
386
382
|
// API skills in test matrix
|
|
387
383
|
selections: { "web-framework": ["web-framework-react"] }
|
|
388
384
|
// Need framework to see other categories
|
|
@@ -413,12 +409,8 @@ describe("StepBuild component", () => {
|
|
|
413
409
|
globalExpect(output).toContain("Customize your API stack");
|
|
414
410
|
});
|
|
415
411
|
it("should show ViewTitle for current domain in three-domain flow", () => {
|
|
416
|
-
const cliFrameworkCategory =
|
|
417
|
-
|
|
418
|
-
required: true,
|
|
419
|
-
order: 0
|
|
420
|
-
});
|
|
421
|
-
const commanderSkill = createMockSkill("cli-cli-framework-commander", "cli-framework", {
|
|
412
|
+
const cliFrameworkCategory = { ...CLI_FRAMEWORK_CATEGORY, required: true, order: 0 };
|
|
413
|
+
const commanderSkill = createMockSkill("cli-framework-commander", {
|
|
422
414
|
displayName: "commander"
|
|
423
415
|
});
|
|
424
416
|
const matrixWithCli = buildTestMatrix(
|
|
@@ -431,19 +423,18 @@ describe("StepBuild component", () => {
|
|
|
431
423
|
cliFrameworkCategory
|
|
432
424
|
],
|
|
433
425
|
[
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
postgresSkill,
|
|
426
|
+
SKILLS.react,
|
|
427
|
+
SKILLS.vue,
|
|
428
|
+
SKILLS.tailwind,
|
|
429
|
+
SKILLS.scss,
|
|
430
|
+
SKILLS.zustand,
|
|
431
|
+
SKILLS.hono,
|
|
432
|
+
SKILLS.drizzle,
|
|
442
433
|
commanderSkill
|
|
443
434
|
]
|
|
444
435
|
);
|
|
436
|
+
useMatrixStore.getState().setMatrix(matrixWithCli);
|
|
445
437
|
const { lastFrame, unmount } = renderStepBuild({
|
|
446
|
-
matrix: matrixWithCli,
|
|
447
438
|
domain: "api",
|
|
448
439
|
selectedDomains: ["web", "api", "cli"]
|
|
449
440
|
});
|
|
@@ -487,7 +478,7 @@ describe("StepBuild component", () => {
|
|
|
487
478
|
displayName: "Framework",
|
|
488
479
|
required: true,
|
|
489
480
|
exclusive: true,
|
|
490
|
-
options: [{ id: "web-framework-react",
|
|
481
|
+
options: [{ id: "web-framework-react", state: "normal", selected: true }]
|
|
491
482
|
}
|
|
492
483
|
];
|
|
493
484
|
const selections = { "web-framework": ["web-framework-react"] };
|
|
@@ -502,9 +493,7 @@ describe("StepBuild component", () => {
|
|
|
502
493
|
displayName: "Framework",
|
|
503
494
|
required: true,
|
|
504
495
|
exclusive: true,
|
|
505
|
-
options: [
|
|
506
|
-
{ id: "web-framework-react", label: "React", state: "normal", selected: false }
|
|
507
|
-
]
|
|
496
|
+
options: [{ id: "web-framework-react", state: "normal", selected: false }]
|
|
508
497
|
}
|
|
509
498
|
];
|
|
510
499
|
const selections = {};
|
|
@@ -522,7 +511,6 @@ describe("StepBuild component", () => {
|
|
|
522
511
|
options: [
|
|
523
512
|
{
|
|
524
513
|
id: "web-state-zustand",
|
|
525
|
-
label: "Zustand",
|
|
526
514
|
state: "normal",
|
|
527
515
|
selected: false
|
|
528
516
|
}
|
|
@@ -588,12 +576,4 @@ describe("StepBuild component", () => {
|
|
|
588
576
|
});
|
|
589
577
|
});
|
|
590
578
|
});
|
|
591
|
-
describe("getSkillDisplayLabel", () => {
|
|
592
|
-
it("should return displayName when available", () => {
|
|
593
|
-
globalExpect(getSkillDisplayLabel({ displayName: "react" })).toBe("react");
|
|
594
|
-
});
|
|
595
|
-
it("should return displayName", () => {
|
|
596
|
-
globalExpect(getSkillDisplayLabel({ displayName: "scss-modules" })).toBe("scss-modules");
|
|
597
|
-
});
|
|
598
|
-
});
|
|
599
579
|
//# sourceMappingURL=step-build.test.js.map
|