agents-inc 0.151.0 → 0.152.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 +11 -0
- package/dist/{chunk-YA4QQKKE.js → chunk-5GUOIJSG.js} +3 -7
- package/dist/{chunk-YA4QQKKE.js.map → chunk-5GUOIJSG.js.map} +1 -1
- package/dist/{chunk-44LLPS2N.js → chunk-5UWKOOIS.js} +6 -26
- package/dist/chunk-5UWKOOIS.js.map +1 -0
- package/dist/{chunk-O5ASLZ2K.js → chunk-76ADG7LQ.js} +1 -5
- package/dist/{chunk-O5ASLZ2K.js.map → chunk-76ADG7LQ.js.map} +1 -1
- package/dist/{chunk-WK4J2CHH.js → chunk-BNSRA6HL.js} +13 -18
- package/dist/{chunk-WK4J2CHH.js.map → chunk-BNSRA6HL.js.map} +1 -1
- package/dist/{chunk-FYPUUYSG.js → chunk-DTSG5XZB.js} +3 -7
- package/dist/{chunk-FYPUUYSG.js.map → chunk-DTSG5XZB.js.map} +1 -1
- package/dist/{chunk-NGLQ5W7U.js → chunk-E5X6RJ4E.js} +5 -15
- package/dist/chunk-E5X6RJ4E.js.map +1 -0
- package/dist/{chunk-TVHRMRD3.js → chunk-EEPELKOM.js} +4008 -4084
- package/dist/chunk-EEPELKOM.js.map +1 -0
- package/dist/{chunk-NIKUMXE7.js → chunk-F7T5AFFN.js} +1 -5
- package/dist/{chunk-NIKUMXE7.js.map → chunk-F7T5AFFN.js.map} +1 -1
- package/dist/{chunk-LAXAQ3PZ.js → chunk-FVDKAVOL.js} +10 -14
- package/dist/{chunk-LAXAQ3PZ.js.map → chunk-FVDKAVOL.js.map} +1 -1
- package/dist/{chunk-BNE4HHIH.js → chunk-GRVKW3CC.js} +2 -6
- package/dist/{chunk-BNE4HHIH.js.map → chunk-GRVKW3CC.js.map} +1 -1
- package/dist/{chunk-3XFUQ6OL.js → chunk-IHUY4M22.js} +4 -8
- package/dist/{chunk-3XFUQ6OL.js.map → chunk-IHUY4M22.js.map} +1 -1
- package/dist/{chunk-OZZGXBCN.js → chunk-IUQBOCSU.js} +1 -5
- package/dist/{chunk-OZZGXBCN.js.map → chunk-IUQBOCSU.js.map} +1 -1
- package/dist/{chunk-LYYXX2W5.js → chunk-J27W6TXS.js} +4 -6
- package/dist/{chunk-LYYXX2W5.js.map → chunk-J27W6TXS.js.map} +1 -1
- package/dist/chunk-JFLVEFFP.js +16 -0
- package/dist/chunk-JFLVEFFP.js.map +1 -0
- package/dist/{chunk-PV2HNW4I.js → chunk-KFB5CRXZ.js} +7 -12
- package/dist/{chunk-PV2HNW4I.js.map → chunk-KFB5CRXZ.js.map} +1 -1
- package/dist/{chunk-SYUOXSPU.js → chunk-KR65TPKC.js} +168 -14
- package/dist/chunk-KR65TPKC.js.map +1 -0
- package/dist/{chunk-KOPEM3Q7.js → chunk-KXYVJGJP.js} +2 -6
- package/dist/{chunk-KOPEM3Q7.js.map → chunk-KXYVJGJP.js.map} +1 -1
- package/dist/{chunk-TYJLR32W.js → chunk-L7SZXUBJ.js} +9 -14
- package/dist/{chunk-TYJLR32W.js.map → chunk-L7SZXUBJ.js.map} +1 -1
- package/dist/{chunk-NHCGC6DG.js → chunk-LASI35KT.js} +4 -9
- package/dist/{chunk-NHCGC6DG.js.map → chunk-LASI35KT.js.map} +1 -1
- package/dist/{chunk-VG2TVBFN.js → chunk-LDP5ASDM.js} +2 -6
- package/dist/{chunk-VG2TVBFN.js.map → chunk-LDP5ASDM.js.map} +1 -1
- package/dist/{chunk-5V2O6C3T.js → chunk-LZ52XEPR.js} +4 -8
- package/dist/{chunk-5V2O6C3T.js.map → chunk-LZ52XEPR.js.map} +1 -1
- package/dist/{chunk-WFWCZEMS.js → chunk-M7HO7NBK.js} +4 -8
- package/dist/{chunk-WFWCZEMS.js.map → chunk-M7HO7NBK.js.map} +1 -1
- package/dist/{chunk-XA57SX4T.js → chunk-MJ2KHG24.js} +4 -8
- package/dist/{chunk-XA57SX4T.js.map → chunk-MJ2KHG24.js.map} +1 -1
- package/dist/{chunk-DAG2ULNF.js → chunk-MM7CTTAV.js} +2 -6
- package/dist/chunk-MM7CTTAV.js.map +1 -0
- package/dist/{chunk-UFURYGD3.js → chunk-MQ7FLIYS.js} +2 -6
- package/dist/{chunk-UFURYGD3.js.map → chunk-MQ7FLIYS.js.map} +1 -1
- package/dist/{chunk-SI5FOARI.js → chunk-MVR3SYMN.js} +6 -8
- package/dist/chunk-MVR3SYMN.js.map +1 -0
- package/dist/{chunk-UTFN6UJS.js → chunk-MWG4VU64.js} +12 -17
- package/dist/{chunk-UTFN6UJS.js.map → chunk-MWG4VU64.js.map} +1 -1
- package/dist/{chunk-ES3NJZON.js → chunk-NR3OZGL4.js} +1 -5
- package/dist/{chunk-ES3NJZON.js.map → chunk-NR3OZGL4.js.map} +1 -1
- package/dist/{chunk-GYG5SE2D.js → chunk-ODNDXQH2.js} +2 -6
- package/dist/{chunk-GYG5SE2D.js.map → chunk-ODNDXQH2.js.map} +1 -1
- package/dist/{chunk-2RSNKBXC.js → chunk-P44SXVH3.js} +6 -10
- package/dist/{chunk-2RSNKBXC.js.map → chunk-P44SXVH3.js.map} +1 -1
- package/dist/{chunk-3LIU2ZEF.js → chunk-PMM2MYMA.js} +3 -16
- package/dist/{chunk-3LIU2ZEF.js.map → chunk-PMM2MYMA.js.map} +1 -1
- package/dist/{chunk-QTFQEYDA.js → chunk-PZIZNMHK.js} +24 -36
- package/dist/chunk-PZIZNMHK.js.map +1 -0
- package/dist/{chunk-C55DN7GE.js → chunk-Q2KG7UV3.js} +3 -5
- package/dist/chunk-Q2KG7UV3.js.map +1 -0
- package/dist/{chunk-QQLRX4KI.js → chunk-Q45ZU6HD.js} +2 -6
- package/dist/{chunk-QQLRX4KI.js.map → chunk-Q45ZU6HD.js.map} +1 -1
- package/dist/{chunk-6RBQBOBS.js → chunk-QRDTLVXG.js} +9 -14
- package/dist/{chunk-6RBQBOBS.js.map → chunk-QRDTLVXG.js.map} +1 -1
- package/dist/{chunk-YBVA7GPW.js → chunk-QZZJFYUQ.js} +3 -7
- package/dist/{chunk-YBVA7GPW.js.map → chunk-QZZJFYUQ.js.map} +1 -1
- package/dist/{chunk-OJIESW5B.js → chunk-R5NOI2LP.js} +13 -17
- package/dist/{chunk-OJIESW5B.js.map → chunk-R5NOI2LP.js.map} +1 -1
- package/dist/{chunk-DUVWGO6E.js → chunk-RNJWAKMO.js} +3 -7
- package/dist/{chunk-DUVWGO6E.js.map → chunk-RNJWAKMO.js.map} +1 -1
- package/dist/{chunk-4R6PGHQQ.js → chunk-SBHBBZKF.js} +7 -23
- package/dist/chunk-SBHBBZKF.js.map +1 -0
- package/dist/{chunk-NM3EDGB5.js → chunk-SKQWRUPX.js} +10 -14
- package/dist/{chunk-NM3EDGB5.js.map → chunk-SKQWRUPX.js.map} +1 -1
- package/dist/{chunk-Y4CXDA3I.js → chunk-STMHDOZD.js} +4 -21
- package/dist/chunk-STMHDOZD.js.map +1 -0
- package/dist/{chunk-SHHOMVWC.js → chunk-SX5H6TSC.js} +7 -11
- package/dist/chunk-SX5H6TSC.js.map +1 -0
- package/dist/{chunk-RBHYLCUB.js → chunk-TJJPWUMA.js} +2 -6
- package/dist/{chunk-RBHYLCUB.js.map → chunk-TJJPWUMA.js.map} +1 -1
- package/dist/{chunk-IOJR5TOY.js → chunk-TSIU7DME.js} +1 -5
- package/dist/{chunk-IOJR5TOY.js.map → chunk-TSIU7DME.js.map} +1 -1
- package/dist/{chunk-EVXG3X6G.js → chunk-TUPYW2IQ.js} +3 -7
- package/dist/{chunk-EVXG3X6G.js.map → chunk-TUPYW2IQ.js.map} +1 -1
- package/dist/{chunk-YU2VGX5R.js → chunk-UBEDZ4FD.js} +1 -8
- package/dist/{chunk-YU2VGX5R.js.map → chunk-UBEDZ4FD.js.map} +1 -1
- package/dist/{chunk-VEP23B5W.js → chunk-VASLW636.js} +1 -5
- package/dist/{chunk-VEP23B5W.js.map → chunk-VASLW636.js.map} +1 -1
- package/dist/{chunk-PG4G4IIK.js → chunk-VY6MNOXL.js} +2 -6
- package/dist/{chunk-PG4G4IIK.js.map → chunk-VY6MNOXL.js.map} +1 -1
- package/dist/{chunk-IHO75PMZ.js → chunk-WBCPLH66.js} +15 -13
- package/dist/chunk-WBCPLH66.js.map +1 -0
- package/dist/{chunk-DG2NGZ7S.js → chunk-WKTHWQKM.js} +2 -7
- package/dist/{chunk-DG2NGZ7S.js.map → chunk-WKTHWQKM.js.map} +1 -1
- package/dist/{chunk-EZ7STXUV.js → chunk-XHUODHZ4.js} +19 -25
- package/dist/{chunk-EZ7STXUV.js.map → chunk-XHUODHZ4.js.map} +1 -1
- package/dist/{chunk-KIR7VYQD.js → chunk-XVAQG2CV.js} +1 -5
- package/dist/{chunk-KIR7VYQD.js.map → chunk-XVAQG2CV.js.map} +1 -1
- package/dist/{chunk-P3PN5SVI.js → chunk-ZL7PFNHN.js} +2 -6
- package/dist/{chunk-P3PN5SVI.js.map → chunk-ZL7PFNHN.js.map} +1 -1
- package/dist/{chunk-3YGUHWLR.js → chunk-ZPPHXXAP.js} +9 -15
- package/dist/{chunk-3YGUHWLR.js.map → chunk-ZPPHXXAP.js.map} +1 -1
- package/dist/commands/build/marketplace.js +10 -15
- package/dist/commands/build/marketplace.js.map +1 -1
- package/dist/commands/build/plugins.js +9 -14
- package/dist/commands/build/plugins.js.map +1 -1
- package/dist/commands/compile.js +14 -19
- package/dist/commands/compile.js.map +1 -1
- package/dist/commands/doctor.js +13 -18
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/edit.js +51 -55
- package/dist/commands/edit.js.map +1 -1
- package/dist/commands/eject.js +13 -18
- package/dist/commands/eject.js.map +1 -1
- package/dist/commands/import/skill.js +9 -14
- package/dist/commands/import/skill.js.map +1 -1
- package/dist/commands/init.js +50 -51
- package/dist/commands/list.js +14 -16
- package/dist/commands/list.js.map +1 -1
- package/dist/commands/new/agent.js +12 -16
- package/dist/commands/new/agent.js.map +1 -1
- package/dist/commands/new/marketplace.js +15 -20
- package/dist/commands/new/marketplace.js.map +1 -1
- package/dist/commands/new/skill.js +11 -13
- package/dist/commands/search.js +14 -19
- package/dist/commands/search.js.map +1 -1
- package/dist/commands/uninstall.js +17 -21
- package/dist/commands/uninstall.js.map +1 -1
- package/dist/commands/update.js +17 -21
- package/dist/commands/update.js.map +1 -1
- package/dist/commands/validate.js +10 -16
- package/dist/commands/validate.js.map +1 -1
- package/dist/components/common/confirm.js +1 -2
- package/dist/components/common/prompt-confirm.js +2 -2
- package/dist/components/common/select-list.js +3 -4
- package/dist/components/common/spinner.js +1 -2
- package/dist/components/wizard/category-grid.js +8 -9
- package/dist/components/wizard/checkbox-grid.js +6 -7
- package/dist/components/wizard/domain-selection.js +14 -15
- package/dist/components/wizard/run-wizard-session.js +40 -40
- package/dist/components/wizard/scroll-affordance.js +2 -3
- package/dist/components/wizard/search-modal.js +6 -7
- package/dist/components/wizard/selection-card.js +2 -3
- package/dist/components/wizard/skill-agent-summary.js +8 -9
- package/dist/components/wizard/source-grid.js +13 -14
- package/dist/components/wizard/stack-selection.js +12 -13
- package/dist/components/wizard/step-agents.js +14 -15
- package/dist/components/wizard/step-build.js +14 -15
- package/dist/components/wizard/step-confirm.js +13 -14
- package/dist/components/wizard/step-settings.js +11 -12
- package/dist/components/wizard/step-sources.js +20 -21
- package/dist/components/wizard/step-stack.js +13 -14
- package/dist/components/wizard/summary-panel.js +12 -13
- package/dist/components/wizard/toast.js +2 -3
- package/dist/components/wizard/wizard-layout.js +18 -19
- package/dist/components/wizard/wizard-tabs.js +8 -9
- package/dist/components/wizard/wizard.js +38 -39
- package/dist/config-exports.js +1 -7
- package/dist/config-exports.js.map +1 -1
- package/dist/copy-local-skills-6EMVN7RB.js +14 -0
- package/dist/hooks/init.js +50 -54
- package/dist/hooks/init.js.map +1 -1
- package/dist/index.js +0 -4
- package/dist/index.js.map +1 -1
- package/dist/load-agent-defs-BWOUVEAR.js +15 -0
- package/dist/{loader-E2ERJYVA.js → loader-5JP4S7CJ.js} +4 -5
- package/dist/recompile-project-agents-6DL45TDI.js +19 -0
- package/dist/{source-loader-5UNRU7EZ.js → source-loader-MZYCPL2S.js} +7 -8
- package/dist/stores/wizard-store.js +7 -8
- package/package.json +15 -14
- package/dist/chunk-44LLPS2N.js.map +0 -1
- package/dist/chunk-4R6PGHQQ.js.map +0 -1
- package/dist/chunk-7QIHKQL5.js +0 -181
- package/dist/chunk-7QIHKQL5.js.map +0 -1
- package/dist/chunk-C55DN7GE.js.map +0 -1
- package/dist/chunk-DAG2ULNF.js.map +0 -1
- package/dist/chunk-DIBCRIMR.js +0 -36
- package/dist/chunk-DIBCRIMR.js.map +0 -1
- package/dist/chunk-EKWAUOQB.js +0 -96
- package/dist/chunk-EKWAUOQB.js.map +0 -1
- package/dist/chunk-I3XKEGHM.js +0 -16383
- package/dist/chunk-I3XKEGHM.js.map +0 -1
- package/dist/chunk-IHO75PMZ.js.map +0 -1
- package/dist/chunk-K3OU6TGX.js +0 -77
- package/dist/chunk-K3OU6TGX.js.map +0 -1
- package/dist/chunk-KSZ6PCY4.js +0 -43
- package/dist/chunk-KSZ6PCY4.js.map +0 -1
- package/dist/chunk-NGLQ5W7U.js.map +0 -1
- package/dist/chunk-P56WJ5FA.js +0 -50
- package/dist/chunk-P56WJ5FA.js.map +0 -1
- package/dist/chunk-QTFQEYDA.js.map +0 -1
- package/dist/chunk-SHHOMVWC.js.map +0 -1
- package/dist/chunk-SI5FOARI.js.map +0 -1
- package/dist/chunk-SYUOXSPU.js.map +0 -1
- package/dist/chunk-THKIOI32.js +0 -939
- package/dist/chunk-THKIOI32.js.map +0 -1
- package/dist/chunk-TVHRMRD3.js.map +0 -1
- package/dist/chunk-V7QOSGQA.js +0 -298
- package/dist/chunk-V7QOSGQA.js.map +0 -1
- package/dist/chunk-Y4CXDA3I.js.map +0 -1
- package/dist/components/common/confirm.test.js +0 -203
- package/dist/components/common/confirm.test.js.map +0 -1
- package/dist/components/wizard/category-grid.test.js +0 -1253
- package/dist/components/wizard/category-grid.test.js.map +0 -1
- package/dist/components/wizard/checkbox-grid.test.js +0 -264
- package/dist/components/wizard/checkbox-grid.test.js.map +0 -1
- package/dist/components/wizard/search-modal.test.js +0 -212
- package/dist/components/wizard/search-modal.test.js.map +0 -1
- package/dist/components/wizard/source-grid.test.js +0 -1094
- package/dist/components/wizard/source-grid.test.js.map +0 -1
- package/dist/components/wizard/step-agents.test.js +0 -204
- package/dist/components/wizard/step-agents.test.js.map +0 -1
- package/dist/components/wizard/step-build.test.js +0 -552
- package/dist/components/wizard/step-build.test.js.map +0 -1
- package/dist/components/wizard/step-confirm.test.js +0 -744
- package/dist/components/wizard/step-confirm.test.js.map +0 -1
- package/dist/components/wizard/step-settings.test.js +0 -244
- package/dist/components/wizard/step-settings.test.js.map +0 -1
- package/dist/components/wizard/step-sources.test.js +0 -155
- package/dist/components/wizard/step-sources.test.js.map +0 -1
- package/dist/components/wizard/step-stack.test.js +0 -262
- package/dist/components/wizard/step-stack.test.js.map +0 -1
- package/dist/components/wizard/summary-panel.test.js +0 -317
- package/dist/components/wizard/summary-panel.test.js.map +0 -1
- package/dist/components/wizard/wizard-layout.test.js +0 -200
- package/dist/components/wizard/wizard-layout.test.js.map +0 -1
- package/dist/components/wizard/wizard-tabs.test.js +0 -290
- package/dist/components/wizard/wizard-tabs.test.js.map +0 -1
- package/dist/copy-local-skills-UPA2GUZV.js +0 -15
- package/dist/dist-VNJNNJK7.js +0 -550
- package/dist/dist-VNJNNJK7.js.map +0 -1
- package/dist/load-agent-defs-SB4XAOVB.js +0 -16
- package/dist/magic-string.es-5TV73NJD.js +0 -1316
- package/dist/magic-string.es-5TV73NJD.js.map +0 -1
- package/dist/recompile-project-agents-U4ZY2GDX.js +0 -20
- package/dist/source-manager-3O54SIIB.js +0 -18
- package/dist/source-manager-3O54SIIB.js.map +0 -1
- package/dist/stores/d227-same-scope-tombstone-duplicate.test.js +0 -118
- package/dist/stores/d227-same-scope-tombstone-duplicate.test.js.map +0 -1
- package/dist/stores/wizard-store.test.js +0 -3053
- package/dist/stores/wizard-store.test.js.map +0 -1
- /package/dist/{copy-local-skills-UPA2GUZV.js.map → copy-local-skills-6EMVN7RB.js.map} +0 -0
- /package/dist/{load-agent-defs-SB4XAOVB.js.map → load-agent-defs-BWOUVEAR.js.map} +0 -0
- /package/dist/{loader-E2ERJYVA.js.map → loader-5JP4S7CJ.js.map} +0 -0
- /package/dist/{recompile-project-agents-U4ZY2GDX.js.map → recompile-project-agents-6DL45TDI.js.map} +0 -0
- /package/dist/{source-loader-5UNRU7EZ.js.map → source-loader-MZYCPL2S.js.map} +0 -0
|
@@ -1,200 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
RENDER_DELAY_MS,
|
|
4
|
-
delay
|
|
5
|
-
} from "../../chunk-KSZ6PCY4.js";
|
|
6
|
-
import {
|
|
7
|
-
render
|
|
8
|
-
} from "../../chunk-EKWAUOQB.js";
|
|
9
|
-
import {
|
|
10
|
-
afterEach,
|
|
11
|
-
beforeEach,
|
|
12
|
-
describe,
|
|
13
|
-
globalExpect,
|
|
14
|
-
it
|
|
15
|
-
} from "../../chunk-I3XKEGHM.js";
|
|
16
|
-
import {
|
|
17
|
-
WizardLayout
|
|
18
|
-
} from "../../chunk-UTFN6UJS.js";
|
|
19
|
-
import "../../chunk-EVXG3X6G.js";
|
|
20
|
-
import "../../chunk-RBHYLCUB.js";
|
|
21
|
-
import "../../chunk-TYJLR32W.js";
|
|
22
|
-
import "../../chunk-IOJR5TOY.js";
|
|
23
|
-
import "../../chunk-KOPEM3Q7.js";
|
|
24
|
-
import "../../chunk-YA4QQKKE.js";
|
|
25
|
-
import "../../chunk-VG2TVBFN.js";
|
|
26
|
-
import "../../chunk-IHO75PMZ.js";
|
|
27
|
-
import "../../chunk-5V2O6C3T.js";
|
|
28
|
-
import {
|
|
29
|
-
useWizardStore
|
|
30
|
-
} from "../../chunk-44LLPS2N.js";
|
|
31
|
-
import {
|
|
32
|
-
formatTerminalTooSmallMessage
|
|
33
|
-
} from "../../chunk-P3PN5SVI.js";
|
|
34
|
-
import "../../chunk-TVHRMRD3.js";
|
|
35
|
-
import "../../chunk-3LIU2ZEF.js";
|
|
36
|
-
import "../../chunk-DG2NGZ7S.js";
|
|
37
|
-
import "../../chunk-VEP23B5W.js";
|
|
38
|
-
import {
|
|
39
|
-
LOGO_MIN_TERMINAL_ROWS,
|
|
40
|
-
MIN_TERMINAL_SIZE
|
|
41
|
-
} from "../../chunk-O5ASLZ2K.js";
|
|
42
|
-
import "../../chunk-YU2VGX5R.js";
|
|
43
|
-
import {
|
|
44
|
-
init_esm_shims
|
|
45
|
-
} from "../../chunk-P56WJ5FA.js";
|
|
46
|
-
|
|
47
|
-
// src/cli/components/wizard/wizard-layout.test.tsx
|
|
48
|
-
init_esm_shims();
|
|
49
|
-
import { Text } from "ink";
|
|
50
|
-
import { jsx } from "react/jsx-runtime";
|
|
51
|
-
var CHILD_MARKER = "STEP BODY";
|
|
52
|
-
var TAB_LABEL = "Stack";
|
|
53
|
-
var FOOTER_LABEL = "select";
|
|
54
|
-
var LOGO_MARKER = "ASCII LOGO ART";
|
|
55
|
-
var VERSION = "9.9.9";
|
|
56
|
-
var TOO_NARROW = { columns: MIN_TERMINAL_SIZE.COLS - 1, rows: MIN_TERMINAL_SIZE.ROWS + 10 };
|
|
57
|
-
var TOO_SHORT = { columns: MIN_TERMINAL_SIZE.COLS + 20, rows: MIN_TERMINAL_SIZE.ROWS - 1 };
|
|
58
|
-
var AT_MINIMUM = { columns: MIN_TERMINAL_SIZE.COLS, rows: MIN_TERMINAL_SIZE.ROWS };
|
|
59
|
-
var ROOMY = { columns: MIN_TERMINAL_SIZE.COLS + 20, rows: MIN_TERMINAL_SIZE.ROWS + 20 };
|
|
60
|
-
var AT_LOGO_MINIMUM = { columns: MIN_TERMINAL_SIZE.COLS, rows: LOGO_MIN_TERMINAL_ROWS };
|
|
61
|
-
var BELOW_LOGO_MINIMUM = { columns: MIN_TERMINAL_SIZE.COLS, rows: LOGO_MIN_TERMINAL_ROWS - 1 };
|
|
62
|
-
var ABOVE_LOGO_MINIMUM = { columns: MIN_TERMINAL_SIZE.COLS, rows: LOGO_MIN_TERMINAL_ROWS + 10 };
|
|
63
|
-
function resizeTo(stdout, { columns, rows }) {
|
|
64
|
-
Object.defineProperty(stdout, "columns", { value: columns, configurable: true });
|
|
65
|
-
Object.defineProperty(stdout, "rows", { value: rows, configurable: true });
|
|
66
|
-
stdout.emit("resize");
|
|
67
|
-
}
|
|
68
|
-
var mountLayout = async (logo) => {
|
|
69
|
-
const instance = render(
|
|
70
|
-
/* @__PURE__ */ jsx(WizardLayout, { version: VERSION, logo, children: /* @__PURE__ */ jsx(Text, { children: CHILD_MARKER }) })
|
|
71
|
-
);
|
|
72
|
-
await delay(RENDER_DELAY_MS);
|
|
73
|
-
return instance;
|
|
74
|
-
};
|
|
75
|
-
beforeEach(() => {
|
|
76
|
-
useWizardStore.setState({ step: "stack" });
|
|
77
|
-
});
|
|
78
|
-
describe("WizardLayout terminal-size guard", () => {
|
|
79
|
-
let cleanup;
|
|
80
|
-
afterEach(() => {
|
|
81
|
-
cleanup?.();
|
|
82
|
-
cleanup = void 0;
|
|
83
|
-
});
|
|
84
|
-
it("renders the wizard when the terminal has room", async () => {
|
|
85
|
-
const { stdout, lastFrame, unmount } = await mountLayout();
|
|
86
|
-
cleanup = unmount;
|
|
87
|
-
resizeTo(stdout, ROOMY);
|
|
88
|
-
await delay(RENDER_DELAY_MS);
|
|
89
|
-
const output = lastFrame();
|
|
90
|
-
globalExpect(output).toContain(CHILD_MARKER);
|
|
91
|
-
globalExpect(output).toContain(TAB_LABEL);
|
|
92
|
-
globalExpect(output).toContain(FOOTER_LABEL);
|
|
93
|
-
globalExpect(output).not.toContain("Please resize");
|
|
94
|
-
});
|
|
95
|
-
it("renders the wizard at exactly the minimum size", async () => {
|
|
96
|
-
const { stdout, lastFrame, unmount } = await mountLayout();
|
|
97
|
-
cleanup = unmount;
|
|
98
|
-
resizeTo(stdout, AT_MINIMUM);
|
|
99
|
-
await delay(RENDER_DELAY_MS);
|
|
100
|
-
const output = lastFrame();
|
|
101
|
-
globalExpect(output).toContain(CHILD_MARKER);
|
|
102
|
-
globalExpect(output).toContain(FOOTER_LABEL);
|
|
103
|
-
globalExpect(output).not.toContain("Please resize");
|
|
104
|
-
});
|
|
105
|
-
it("replaces the wizard with the resize prompt when the terminal is too short", async () => {
|
|
106
|
-
const { stdout, lastFrame, unmount } = await mountLayout();
|
|
107
|
-
cleanup = unmount;
|
|
108
|
-
resizeTo(stdout, TOO_SHORT);
|
|
109
|
-
await delay(RENDER_DELAY_MS);
|
|
110
|
-
const output = lastFrame();
|
|
111
|
-
globalExpect(output).toContain(formatTerminalTooSmallMessage(TOO_SHORT.columns));
|
|
112
|
-
globalExpect(output).not.toContain(CHILD_MARKER);
|
|
113
|
-
globalExpect(output).not.toContain(TAB_LABEL);
|
|
114
|
-
globalExpect(output).not.toContain(FOOTER_LABEL);
|
|
115
|
-
});
|
|
116
|
-
it("replaces the wizard with the resize prompt when the terminal is too narrow", async () => {
|
|
117
|
-
const { stdout, lastFrame, unmount } = await mountLayout();
|
|
118
|
-
cleanup = unmount;
|
|
119
|
-
resizeTo(stdout, TOO_NARROW);
|
|
120
|
-
await delay(RENDER_DELAY_MS);
|
|
121
|
-
const output = lastFrame();
|
|
122
|
-
globalExpect(output).toContain(formatTerminalTooSmallMessage(TOO_NARROW.columns));
|
|
123
|
-
globalExpect(output).not.toContain(CHILD_MARKER);
|
|
124
|
-
globalExpect(output).not.toContain(TAB_LABEL);
|
|
125
|
-
globalExpect(output).not.toContain(FOOTER_LABEL);
|
|
126
|
-
});
|
|
127
|
-
it("brings the wizard back when the terminal grows again", async () => {
|
|
128
|
-
const { stdout, lastFrame, unmount } = await mountLayout();
|
|
129
|
-
cleanup = unmount;
|
|
130
|
-
resizeTo(stdout, TOO_SHORT);
|
|
131
|
-
await delay(RENDER_DELAY_MS);
|
|
132
|
-
globalExpect(lastFrame()).not.toContain(CHILD_MARKER);
|
|
133
|
-
resizeTo(stdout, ROOMY);
|
|
134
|
-
await delay(RENDER_DELAY_MS);
|
|
135
|
-
const output = lastFrame();
|
|
136
|
-
globalExpect(output).toContain(CHILD_MARKER);
|
|
137
|
-
globalExpect(output).toContain(TAB_LABEL);
|
|
138
|
-
globalExpect(output).toContain(FOOTER_LABEL);
|
|
139
|
-
globalExpect(output).not.toContain("Please resize");
|
|
140
|
-
});
|
|
141
|
-
});
|
|
142
|
-
describe("WizardLayout logo", () => {
|
|
143
|
-
let cleanup;
|
|
144
|
-
afterEach(() => {
|
|
145
|
-
cleanup?.();
|
|
146
|
-
cleanup = void 0;
|
|
147
|
-
});
|
|
148
|
-
it("paints the logo on the stack step at exactly the logo threshold", async () => {
|
|
149
|
-
const { stdout, lastFrame, unmount } = await mountLayout(LOGO_MARKER);
|
|
150
|
-
cleanup = unmount;
|
|
151
|
-
resizeTo(stdout, AT_LOGO_MINIMUM);
|
|
152
|
-
await delay(RENDER_DELAY_MS);
|
|
153
|
-
const output = lastFrame();
|
|
154
|
-
globalExpect(output).toContain(LOGO_MARKER);
|
|
155
|
-
globalExpect(output).toContain(CHILD_MARKER);
|
|
156
|
-
globalExpect(output).toContain(FOOTER_LABEL);
|
|
157
|
-
});
|
|
158
|
-
it("drops the logo one row below the threshold and keeps the step body", async () => {
|
|
159
|
-
const { stdout, lastFrame, unmount } = await mountLayout(LOGO_MARKER);
|
|
160
|
-
cleanup = unmount;
|
|
161
|
-
resizeTo(stdout, BELOW_LOGO_MINIMUM);
|
|
162
|
-
await delay(RENDER_DELAY_MS);
|
|
163
|
-
const output = lastFrame();
|
|
164
|
-
globalExpect(output).not.toContain(LOGO_MARKER);
|
|
165
|
-
globalExpect(output).toContain(CHILD_MARKER);
|
|
166
|
-
globalExpect(output).toContain(FOOTER_LABEL);
|
|
167
|
-
});
|
|
168
|
-
it("drops the logo at the smallest terminal the CLI runs in", async () => {
|
|
169
|
-
const { stdout, lastFrame, unmount } = await mountLayout(LOGO_MARKER);
|
|
170
|
-
cleanup = unmount;
|
|
171
|
-
resizeTo(stdout, AT_MINIMUM);
|
|
172
|
-
await delay(RENDER_DELAY_MS);
|
|
173
|
-
const output = lastFrame();
|
|
174
|
-
globalExpect(output).not.toContain(LOGO_MARKER);
|
|
175
|
-
globalExpect(output).toContain(CHILD_MARKER);
|
|
176
|
-
globalExpect(output).toContain(FOOTER_LABEL);
|
|
177
|
-
});
|
|
178
|
-
it("paints no logo off the stack step however tall the terminal", async () => {
|
|
179
|
-
useWizardStore.setState({ step: "domains" });
|
|
180
|
-
const { stdout, lastFrame, unmount } = await mountLayout(LOGO_MARKER);
|
|
181
|
-
cleanup = unmount;
|
|
182
|
-
resizeTo(stdout, ABOVE_LOGO_MINIMUM);
|
|
183
|
-
await delay(RENDER_DELAY_MS);
|
|
184
|
-
const output = lastFrame();
|
|
185
|
-
globalExpect(output).not.toContain(LOGO_MARKER);
|
|
186
|
-
globalExpect(output).toContain(CHILD_MARKER);
|
|
187
|
-
globalExpect(output).toContain(FOOTER_LABEL);
|
|
188
|
-
});
|
|
189
|
-
it("brings the logo back when the terminal grows past the threshold", async () => {
|
|
190
|
-
const { stdout, lastFrame, unmount } = await mountLayout(LOGO_MARKER);
|
|
191
|
-
cleanup = unmount;
|
|
192
|
-
resizeTo(stdout, AT_MINIMUM);
|
|
193
|
-
await delay(RENDER_DELAY_MS);
|
|
194
|
-
globalExpect(lastFrame()).not.toContain(LOGO_MARKER);
|
|
195
|
-
resizeTo(stdout, AT_LOGO_MINIMUM);
|
|
196
|
-
await delay(RENDER_DELAY_MS);
|
|
197
|
-
globalExpect(lastFrame()).toContain(LOGO_MARKER);
|
|
198
|
-
});
|
|
199
|
-
});
|
|
200
|
-
//# sourceMappingURL=wizard-layout.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/cli/components/wizard/wizard-layout.test.tsx"],"sourcesContent":["import { Text } from \"ink\";\nimport { render } from \"ink-testing-library\";\nimport { afterEach, beforeEach, describe, expect, it } from \"vitest\";\nimport { WizardLayout } from \"./wizard-layout\";\nimport { LOGO_MIN_TERMINAL_ROWS, MIN_TERMINAL_SIZE } from \"../../consts\";\nimport { useWizardStore } from \"../../stores/wizard-store\";\nimport { formatTerminalTooSmallMessage } from \"../../utils/terminal\";\nimport { RENDER_DELAY_MS, delay } from \"../../lib/__tests__/test-constants\";\n\n/** Text only the wizard's own children paint, so its absence proves they were replaced. */\nconst CHILD_MARKER = \"STEP BODY\";\n/** Wizard chrome WizardLayout itself paints: a step tab and the footer hotkey hint. */\nconst TAB_LABEL = \"Stack\";\nconst FOOTER_LABEL = \"select\";\n/** Stands in for `ASCII_LOGO`: the layout takes the art as an opaque string. */\nconst LOGO_MARKER = \"ASCII LOGO ART\";\n\nconst VERSION = \"9.9.9\";\n\nconst TOO_NARROW = { columns: MIN_TERMINAL_SIZE.COLS - 1, rows: MIN_TERMINAL_SIZE.ROWS + 10 };\nconst TOO_SHORT = { columns: MIN_TERMINAL_SIZE.COLS + 20, rows: MIN_TERMINAL_SIZE.ROWS - 1 };\n/** Exactly the gate — the geometry `TERMINAL_SIZE.SHORT` drives the E2E suite at. */\nconst AT_MINIMUM = { columns: MIN_TERMINAL_SIZE.COLS, rows: MIN_TERMINAL_SIZE.ROWS };\nconst ROOMY = { columns: MIN_TERMINAL_SIZE.COLS + 20, rows: MIN_TERMINAL_SIZE.ROWS + 20 };\n/** Exactly the logo threshold, and one row under it — the two sides of the boundary. */\nconst AT_LOGO_MINIMUM = { columns: MIN_TERMINAL_SIZE.COLS, rows: LOGO_MIN_TERMINAL_ROWS };\nconst BELOW_LOGO_MINIMUM = { columns: MIN_TERMINAL_SIZE.COLS, rows: LOGO_MIN_TERMINAL_ROWS - 1 };\n/** Comfortably over the logo threshold, so height cannot be why a logo is missing. */\nconst ABOVE_LOGO_MINIMUM = { columns: MIN_TERMINAL_SIZE.COLS, rows: LOGO_MIN_TERMINAL_ROWS + 10 };\n\ntype TestStdout = ReturnType<typeof render>[\"stdout\"];\n\n/**\n * Restate the terminal geometry the way a real resize does — `useTerminalDimensions`\n * re-reads `stdout.columns`/`stdout.rows` on the `resize` event. `columns` is a\n * prototype getter on the ink-testing-library stub, so it takes an own property\n * to shadow it; `rows` is absent there entirely.\n */\nfunction resizeTo(stdout: TestStdout, { columns, rows }: { columns: number; rows: number }): void {\n Object.defineProperty(stdout, \"columns\", { value: columns, configurable: true });\n Object.defineProperty(stdout, \"rows\", { value: rows, configurable: true });\n stdout.emit(\"resize\");\n}\n\n/**\n * Ink drives a concurrent React root, so effects have NOT flushed when\n * `render()` returns — resizing before the first paint settles emits into a\n * stdout nothing is listening on yet, and the frame never changes.\n */\nconst mountLayout = async (logo?: string) => {\n const instance = render(\n <WizardLayout version={VERSION} logo={logo}>\n <Text>{CHILD_MARKER}</Text>\n </WizardLayout>,\n );\n await delay(RENDER_DELAY_MS);\n return instance;\n};\n\n// The store is a module singleton, so the step one test sets would otherwise leak\n// into the next; the layout branches on it for the logo.\nbeforeEach(() => {\n useWizardStore.setState({ step: \"stack\" });\n});\n\ndescribe(\"WizardLayout terminal-size guard\", () => {\n let cleanup: (() => void) | undefined;\n\n afterEach(() => {\n cleanup?.();\n cleanup = undefined;\n });\n\n it(\"renders the wizard when the terminal has room\", async () => {\n const { stdout, lastFrame, unmount } = await mountLayout();\n cleanup = unmount;\n\n resizeTo(stdout, ROOMY);\n await delay(RENDER_DELAY_MS);\n\n const output = lastFrame();\n expect(output).toContain(CHILD_MARKER);\n expect(output).toContain(TAB_LABEL);\n expect(output).toContain(FOOTER_LABEL);\n expect(output).not.toContain(\"Please resize\");\n });\n\n it(\"renders the wizard at exactly the minimum size\", async () => {\n const { stdout, lastFrame, unmount } = await mountLayout();\n cleanup = unmount;\n\n resizeTo(stdout, AT_MINIMUM);\n await delay(RENDER_DELAY_MS);\n\n const output = lastFrame();\n expect(output).toContain(CHILD_MARKER);\n expect(output).toContain(FOOTER_LABEL);\n expect(output).not.toContain(\"Please resize\");\n });\n\n it(\"replaces the wizard with the resize prompt when the terminal is too short\", async () => {\n const { stdout, lastFrame, unmount } = await mountLayout();\n cleanup = unmount;\n\n resizeTo(stdout, TOO_SHORT);\n await delay(RENDER_DELAY_MS);\n\n const output = lastFrame();\n expect(output).toContain(formatTerminalTooSmallMessage(TOO_SHORT.columns));\n expect(output).not.toContain(CHILD_MARKER);\n expect(output).not.toContain(TAB_LABEL);\n expect(output).not.toContain(FOOTER_LABEL);\n });\n\n it(\"replaces the wizard with the resize prompt when the terminal is too narrow\", async () => {\n const { stdout, lastFrame, unmount } = await mountLayout();\n cleanup = unmount;\n\n resizeTo(stdout, TOO_NARROW);\n await delay(RENDER_DELAY_MS);\n\n const output = lastFrame();\n expect(output).toContain(formatTerminalTooSmallMessage(TOO_NARROW.columns));\n expect(output).not.toContain(CHILD_MARKER);\n expect(output).not.toContain(TAB_LABEL);\n expect(output).not.toContain(FOOTER_LABEL);\n });\n\n it(\"brings the wizard back when the terminal grows again\", async () => {\n const { stdout, lastFrame, unmount } = await mountLayout();\n cleanup = unmount;\n\n resizeTo(stdout, TOO_SHORT);\n await delay(RENDER_DELAY_MS);\n expect(lastFrame()).not.toContain(CHILD_MARKER);\n\n resizeTo(stdout, ROOMY);\n await delay(RENDER_DELAY_MS);\n\n const output = lastFrame();\n expect(output).toContain(CHILD_MARKER);\n expect(output).toContain(TAB_LABEL);\n expect(output).toContain(FOOTER_LABEL);\n expect(output).not.toContain(\"Please resize\");\n });\n});\n\ndescribe(\"WizardLayout logo\", () => {\n let cleanup: (() => void) | undefined;\n\n afterEach(() => {\n cleanup?.();\n cleanup = undefined;\n });\n\n it(\"paints the logo on the stack step at exactly the logo threshold\", async () => {\n const { stdout, lastFrame, unmount } = await mountLayout(LOGO_MARKER);\n cleanup = unmount;\n\n resizeTo(stdout, AT_LOGO_MINIMUM);\n await delay(RENDER_DELAY_MS);\n\n const output = lastFrame();\n expect(output).toContain(LOGO_MARKER);\n expect(output).toContain(CHILD_MARKER);\n expect(output).toContain(FOOTER_LABEL);\n });\n\n it(\"drops the logo one row below the threshold and keeps the step body\", async () => {\n const { stdout, lastFrame, unmount } = await mountLayout(LOGO_MARKER);\n cleanup = unmount;\n\n resizeTo(stdout, BELOW_LOGO_MINIMUM);\n await delay(RENDER_DELAY_MS);\n\n const output = lastFrame();\n expect(output).not.toContain(LOGO_MARKER);\n expect(output).toContain(CHILD_MARKER);\n expect(output).toContain(FOOTER_LABEL);\n });\n\n it(\"drops the logo at the smallest terminal the CLI runs in\", async () => {\n const { stdout, lastFrame, unmount } = await mountLayout(LOGO_MARKER);\n cleanup = unmount;\n\n resizeTo(stdout, AT_MINIMUM);\n await delay(RENDER_DELAY_MS);\n\n const output = lastFrame();\n expect(output).not.toContain(LOGO_MARKER);\n expect(output).toContain(CHILD_MARKER);\n expect(output).toContain(FOOTER_LABEL);\n });\n\n it(\"paints no logo off the stack step however tall the terminal\", async () => {\n useWizardStore.setState({ step: \"domains\" });\n\n const { stdout, lastFrame, unmount } = await mountLayout(LOGO_MARKER);\n cleanup = unmount;\n\n resizeTo(stdout, ABOVE_LOGO_MINIMUM);\n await delay(RENDER_DELAY_MS);\n\n const output = lastFrame();\n expect(output).not.toContain(LOGO_MARKER);\n expect(output).toContain(CHILD_MARKER);\n expect(output).toContain(FOOTER_LABEL);\n });\n\n it(\"brings the logo back when the terminal grows past the threshold\", async () => {\n const { stdout, lastFrame, unmount } = await mountLayout(LOGO_MARKER);\n cleanup = unmount;\n\n resizeTo(stdout, AT_MINIMUM);\n await delay(RENDER_DELAY_MS);\n expect(lastFrame()).not.toContain(LOGO_MARKER);\n\n resizeTo(stdout, AT_LOGO_MINIMUM);\n await delay(RENDER_DELAY_MS);\n\n expect(lastFrame()).toContain(LOGO_MARKER);\n });\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA,SAAS,YAAY;AAoDf;AA1CN,IAAM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-
it
|
|
10
|
-
} from "../../chunk-I3XKEGHM.js";
|
|
11
|
-
import {
|
|
12
|
-
WIZARD_STEPS,
|
|
13
|
-
WizardTabs,
|
|
14
|
-
formatStepLabel
|
|
15
|
-
} from "../../chunk-EVXG3X6G.js";
|
|
16
|
-
import "../../chunk-44LLPS2N.js";
|
|
17
|
-
import "../../chunk-TVHRMRD3.js";
|
|
18
|
-
import "../../chunk-3LIU2ZEF.js";
|
|
19
|
-
import "../../chunk-DG2NGZ7S.js";
|
|
20
|
-
import "../../chunk-VEP23B5W.js";
|
|
21
|
-
import "../../chunk-O5ASLZ2K.js";
|
|
22
|
-
import "../../chunk-YU2VGX5R.js";
|
|
23
|
-
import {
|
|
24
|
-
init_esm_shims
|
|
25
|
-
} from "../../chunk-P56WJ5FA.js";
|
|
26
|
-
|
|
27
|
-
// src/cli/components/wizard/wizard-tabs.test.tsx
|
|
28
|
-
init_esm_shims();
|
|
29
|
-
import { jsx } from "react/jsx-runtime";
|
|
30
|
-
var renderWizardTabs = (props = {}) => {
|
|
31
|
-
const defaultProps = {
|
|
32
|
-
steps: WIZARD_STEPS,
|
|
33
|
-
currentStep: "stack",
|
|
34
|
-
completedSteps: [],
|
|
35
|
-
skippedSteps: [],
|
|
36
|
-
...props
|
|
37
|
-
};
|
|
38
|
-
return render(/* @__PURE__ */ jsx(WizardTabs, { ...defaultProps }));
|
|
39
|
-
};
|
|
40
|
-
describe("WizardTabs component", () => {
|
|
41
|
-
let cleanup;
|
|
42
|
-
afterEach(() => {
|
|
43
|
-
cleanup?.();
|
|
44
|
-
cleanup = void 0;
|
|
45
|
-
});
|
|
46
|
-
describe("rendering", () => {
|
|
47
|
-
it("should render all 6 tabs", () => {
|
|
48
|
-
const { lastFrame, unmount } = renderWizardTabs();
|
|
49
|
-
cleanup = unmount;
|
|
50
|
-
const output = lastFrame();
|
|
51
|
-
globalExpect(output).toContain(formatStepLabel("stack"));
|
|
52
|
-
globalExpect(output).toContain(formatStepLabel("domains"));
|
|
53
|
-
globalExpect(output).toContain(formatStepLabel("build"));
|
|
54
|
-
globalExpect(output).toContain(formatStepLabel("sources"));
|
|
55
|
-
globalExpect(output).toContain(formatStepLabel("agents"));
|
|
56
|
-
globalExpect(output).toContain(formatStepLabel("confirm"));
|
|
57
|
-
});
|
|
58
|
-
it("should render with custom steps", () => {
|
|
59
|
-
const customSteps = [
|
|
60
|
-
{ id: "stack", label: "First" },
|
|
61
|
-
{ id: "build", label: "Second" }
|
|
62
|
-
];
|
|
63
|
-
const { lastFrame, unmount } = renderWizardTabs({
|
|
64
|
-
steps: customSteps,
|
|
65
|
-
currentStep: "stack"
|
|
66
|
-
});
|
|
67
|
-
cleanup = unmount;
|
|
68
|
-
const output = lastFrame();
|
|
69
|
-
globalExpect(output).toContain("First");
|
|
70
|
-
globalExpect(output).toContain("Second");
|
|
71
|
-
});
|
|
72
|
-
it("should render horizontal dividers above and below tabs", () => {
|
|
73
|
-
const { lastFrame, unmount } = renderWizardTabs();
|
|
74
|
-
cleanup = unmount;
|
|
75
|
-
const output = lastFrame();
|
|
76
|
-
globalExpect(output).toContain("\u2500");
|
|
77
|
-
});
|
|
78
|
-
});
|
|
79
|
-
describe("current step", () => {
|
|
80
|
-
it("should render current step label", () => {
|
|
81
|
-
const { lastFrame, unmount } = renderWizardTabs({
|
|
82
|
-
currentStep: "build"
|
|
83
|
-
});
|
|
84
|
-
cleanup = unmount;
|
|
85
|
-
const output = lastFrame();
|
|
86
|
-
globalExpect(output).toContain(formatStepLabel("build"));
|
|
87
|
-
});
|
|
88
|
-
it("should mark first step as current by default", () => {
|
|
89
|
-
const { lastFrame, unmount } = renderWizardTabs({
|
|
90
|
-
currentStep: "stack",
|
|
91
|
-
completedSteps: []
|
|
92
|
-
});
|
|
93
|
-
cleanup = unmount;
|
|
94
|
-
const output = lastFrame();
|
|
95
|
-
globalExpect(output).toContain(formatStepLabel("stack"));
|
|
96
|
-
});
|
|
97
|
-
it("should update current step when changed", () => {
|
|
98
|
-
const { lastFrame, unmount } = renderWizardTabs({
|
|
99
|
-
currentStep: "confirm",
|
|
100
|
-
completedSteps: ["stack", "build"]
|
|
101
|
-
});
|
|
102
|
-
cleanup = unmount;
|
|
103
|
-
const output = lastFrame();
|
|
104
|
-
globalExpect(output).toContain(formatStepLabel("confirm"));
|
|
105
|
-
});
|
|
106
|
-
});
|
|
107
|
-
describe("completed steps", () => {
|
|
108
|
-
it("should render completed step labels", () => {
|
|
109
|
-
const { lastFrame, unmount } = renderWizardTabs({
|
|
110
|
-
currentStep: "build",
|
|
111
|
-
completedSteps: ["stack"]
|
|
112
|
-
});
|
|
113
|
-
cleanup = unmount;
|
|
114
|
-
const output = lastFrame();
|
|
115
|
-
globalExpect(output).toContain(formatStepLabel("stack"));
|
|
116
|
-
});
|
|
117
|
-
it("should render multiple completed steps", () => {
|
|
118
|
-
const { lastFrame, unmount } = renderWizardTabs({
|
|
119
|
-
currentStep: "sources",
|
|
120
|
-
completedSteps: ["stack", "build"]
|
|
121
|
-
});
|
|
122
|
-
cleanup = unmount;
|
|
123
|
-
const output = lastFrame();
|
|
124
|
-
globalExpect(output).toContain(formatStepLabel("stack"));
|
|
125
|
-
globalExpect(output).toContain(formatStepLabel("build"));
|
|
126
|
-
});
|
|
127
|
-
it("should render current step separately from completed steps", () => {
|
|
128
|
-
const { lastFrame, unmount } = renderWizardTabs({
|
|
129
|
-
currentStep: "stack",
|
|
130
|
-
completedSteps: []
|
|
131
|
-
});
|
|
132
|
-
cleanup = unmount;
|
|
133
|
-
const output = lastFrame();
|
|
134
|
-
globalExpect(output).toContain(formatStepLabel("stack"));
|
|
135
|
-
});
|
|
136
|
-
});
|
|
137
|
-
describe("pending steps", () => {
|
|
138
|
-
it("should render pending step labels", () => {
|
|
139
|
-
const { lastFrame, unmount } = renderWizardTabs({
|
|
140
|
-
currentStep: "stack",
|
|
141
|
-
completedSteps: []
|
|
142
|
-
});
|
|
143
|
-
cleanup = unmount;
|
|
144
|
-
const output = lastFrame();
|
|
145
|
-
globalExpect(output).toContain(formatStepLabel("domains"));
|
|
146
|
-
globalExpect(output).toContain(formatStepLabel("build"));
|
|
147
|
-
globalExpect(output).toContain(formatStepLabel("sources"));
|
|
148
|
-
});
|
|
149
|
-
it("should render steps after current", () => {
|
|
150
|
-
const { lastFrame, unmount } = renderWizardTabs({
|
|
151
|
-
currentStep: "build",
|
|
152
|
-
completedSteps: ["stack"]
|
|
153
|
-
});
|
|
154
|
-
cleanup = unmount;
|
|
155
|
-
const output = lastFrame();
|
|
156
|
-
globalExpect(output).toContain(formatStepLabel("confirm"));
|
|
157
|
-
});
|
|
158
|
-
});
|
|
159
|
-
describe("skipped steps", () => {
|
|
160
|
-
it("should render skipped step labels", () => {
|
|
161
|
-
const { lastFrame, unmount } = renderWizardTabs({
|
|
162
|
-
currentStep: "sources",
|
|
163
|
-
completedSteps: ["stack"],
|
|
164
|
-
skippedSteps: ["build"]
|
|
165
|
-
});
|
|
166
|
-
cleanup = unmount;
|
|
167
|
-
const output = lastFrame();
|
|
168
|
-
globalExpect(output).toContain(formatStepLabel("build"));
|
|
169
|
-
});
|
|
170
|
-
it("should handle multiple skipped steps", () => {
|
|
171
|
-
const { lastFrame, unmount } = renderWizardTabs({
|
|
172
|
-
currentStep: "confirm",
|
|
173
|
-
completedSteps: ["stack"],
|
|
174
|
-
skippedSteps: ["build", "sources"]
|
|
175
|
-
});
|
|
176
|
-
cleanup = unmount;
|
|
177
|
-
const output = lastFrame();
|
|
178
|
-
globalExpect(output).toContain(formatStepLabel("build"));
|
|
179
|
-
globalExpect(output).toContain(formatStepLabel("sources"));
|
|
180
|
-
});
|
|
181
|
-
it("should prioritize completed over skipped when step is in both arrays", () => {
|
|
182
|
-
const { lastFrame, unmount } = renderWizardTabs({
|
|
183
|
-
currentStep: "sources",
|
|
184
|
-
completedSteps: ["stack", "build"],
|
|
185
|
-
skippedSteps: ["build"]
|
|
186
|
-
});
|
|
187
|
-
cleanup = unmount;
|
|
188
|
-
const output = lastFrame();
|
|
189
|
-
globalExpect(output).toContain(formatStepLabel("stack"));
|
|
190
|
-
globalExpect(output).toContain(formatStepLabel("build"));
|
|
191
|
-
});
|
|
192
|
-
});
|
|
193
|
-
describe("state priority", () => {
|
|
194
|
-
it("should prioritize completed over current", () => {
|
|
195
|
-
const { lastFrame, unmount } = renderWizardTabs({
|
|
196
|
-
currentStep: "stack",
|
|
197
|
-
completedSteps: ["stack"]
|
|
198
|
-
});
|
|
199
|
-
cleanup = unmount;
|
|
200
|
-
const output = lastFrame();
|
|
201
|
-
globalExpect(output).toContain(formatStepLabel("stack"));
|
|
202
|
-
});
|
|
203
|
-
it("should prioritize current over skipped", () => {
|
|
204
|
-
const { lastFrame, unmount } = renderWizardTabs({
|
|
205
|
-
currentStep: "build",
|
|
206
|
-
completedSteps: [],
|
|
207
|
-
skippedSteps: ["build"]
|
|
208
|
-
});
|
|
209
|
-
cleanup = unmount;
|
|
210
|
-
const output = lastFrame();
|
|
211
|
-
globalExpect(output).toContain(formatStepLabel("build"));
|
|
212
|
-
});
|
|
213
|
-
it("should prioritize completed over skipped", () => {
|
|
214
|
-
const { lastFrame, unmount } = renderWizardTabs({
|
|
215
|
-
currentStep: "sources",
|
|
216
|
-
completedSteps: ["stack"],
|
|
217
|
-
skippedSteps: ["stack"]
|
|
218
|
-
});
|
|
219
|
-
cleanup = unmount;
|
|
220
|
-
const output = lastFrame();
|
|
221
|
-
globalExpect(output).toContain(formatStepLabel("stack"));
|
|
222
|
-
});
|
|
223
|
-
});
|
|
224
|
-
describe("visual layout", () => {
|
|
225
|
-
it("should render tabs horizontally", () => {
|
|
226
|
-
const { lastFrame, unmount } = renderWizardTabs();
|
|
227
|
-
cleanup = unmount;
|
|
228
|
-
const output = lastFrame();
|
|
229
|
-
globalExpect(output).toContain(formatStepLabel("stack"));
|
|
230
|
-
globalExpect(output).toContain(formatStepLabel("confirm"));
|
|
231
|
-
});
|
|
232
|
-
it("should include step labels", () => {
|
|
233
|
-
const { lastFrame, unmount } = renderWizardTabs();
|
|
234
|
-
cleanup = unmount;
|
|
235
|
-
const output = lastFrame();
|
|
236
|
-
WIZARD_STEPS.forEach((step) => {
|
|
237
|
-
globalExpect(output).toContain(formatStepLabel(step.id));
|
|
238
|
-
});
|
|
239
|
-
});
|
|
240
|
-
});
|
|
241
|
-
describe("edge cases", () => {
|
|
242
|
-
it("should handle empty completed steps", () => {
|
|
243
|
-
const { lastFrame, unmount } = renderWizardTabs({
|
|
244
|
-
currentStep: "stack",
|
|
245
|
-
completedSteps: []
|
|
246
|
-
});
|
|
247
|
-
cleanup = unmount;
|
|
248
|
-
const output = lastFrame();
|
|
249
|
-
globalExpect(output).toContain(formatStepLabel("stack"));
|
|
250
|
-
globalExpect(output).toContain(formatStepLabel("confirm"));
|
|
251
|
-
});
|
|
252
|
-
it("should handle empty skipped steps", () => {
|
|
253
|
-
const { lastFrame, unmount } = renderWizardTabs({
|
|
254
|
-
currentStep: "sources",
|
|
255
|
-
completedSteps: ["stack", "build"],
|
|
256
|
-
skippedSteps: []
|
|
257
|
-
});
|
|
258
|
-
cleanup = unmount;
|
|
259
|
-
const output = lastFrame();
|
|
260
|
-
globalExpect(output).toContain(formatStepLabel("stack"));
|
|
261
|
-
globalExpect(output).toContain(formatStepLabel("build"));
|
|
262
|
-
globalExpect(output).toContain(formatStepLabel("sources"));
|
|
263
|
-
});
|
|
264
|
-
it("should handle all steps completed", () => {
|
|
265
|
-
const { lastFrame, unmount } = renderWizardTabs({
|
|
266
|
-
currentStep: "confirm",
|
|
267
|
-
completedSteps: ["stack", "domains", "build", "sources", "agents", "confirm"]
|
|
268
|
-
});
|
|
269
|
-
cleanup = unmount;
|
|
270
|
-
const output = lastFrame();
|
|
271
|
-
globalExpect(output).toContain(formatStepLabel("stack"));
|
|
272
|
-
globalExpect(output).toContain(formatStepLabel("domains"));
|
|
273
|
-
globalExpect(output).toContain(formatStepLabel("build"));
|
|
274
|
-
globalExpect(output).toContain(formatStepLabel("sources"));
|
|
275
|
-
globalExpect(output).toContain(formatStepLabel("confirm"));
|
|
276
|
-
});
|
|
277
|
-
it("should handle single step", () => {
|
|
278
|
-
const singleStep = [{ id: "confirm", label: "Only Step" }];
|
|
279
|
-
const { lastFrame, unmount } = renderWizardTabs({
|
|
280
|
-
steps: singleStep,
|
|
281
|
-
currentStep: "confirm",
|
|
282
|
-
completedSteps: []
|
|
283
|
-
});
|
|
284
|
-
cleanup = unmount;
|
|
285
|
-
const output = lastFrame();
|
|
286
|
-
globalExpect(output).toContain("Only Step");
|
|
287
|
-
});
|
|
288
|
-
});
|
|
289
|
-
});
|
|
290
|
-
//# sourceMappingURL=wizard-tabs.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/cli/components/wizard/wizard-tabs.test.tsx"],"sourcesContent":["import { render } from \"ink-testing-library\";\nimport { afterEach, describe, expect, it } from \"vitest\";\nimport type { WizardStep } from \"../../stores/wizard-store\";\nimport { WizardTabs, WIZARD_STEPS, formatStepLabel, type WizardTabsProps } from \"./wizard-tabs\";\n\nconst renderWizardTabs = (props: Partial<WizardTabsProps> = {}) => {\n const defaultProps: WizardTabsProps = {\n steps: WIZARD_STEPS,\n currentStep: \"stack\",\n completedSteps: [],\n skippedSteps: [],\n ...props,\n };\n return render(<WizardTabs {...defaultProps} />);\n};\n\ndescribe(\"WizardTabs component\", () => {\n let cleanup: (() => void) | undefined;\n\n afterEach(() => {\n cleanup?.();\n cleanup = undefined;\n });\n\n describe(\"rendering\", () => {\n it(\"should render all 6 tabs\", () => {\n const { lastFrame, unmount } = renderWizardTabs();\n cleanup = unmount;\n\n const output = lastFrame();\n expect(output).toContain(formatStepLabel(\"stack\"));\n expect(output).toContain(formatStepLabel(\"domains\"));\n expect(output).toContain(formatStepLabel(\"build\"));\n expect(output).toContain(formatStepLabel(\"sources\"));\n expect(output).toContain(formatStepLabel(\"agents\"));\n expect(output).toContain(formatStepLabel(\"confirm\"));\n });\n\n it(\"should render with custom steps\", () => {\n const customSteps = [\n { id: \"stack\" as WizardStep, label: \"First\" },\n { id: \"build\" as WizardStep, label: \"Second\" },\n ];\n const { lastFrame, unmount } = renderWizardTabs({\n steps: customSteps,\n currentStep: \"stack\",\n });\n cleanup = unmount;\n\n const output = lastFrame();\n expect(output).toContain(\"First\");\n expect(output).toContain(\"Second\");\n });\n\n it(\"should render horizontal dividers above and below tabs\", () => {\n const { lastFrame, unmount } = renderWizardTabs();\n cleanup = unmount;\n\n const output = lastFrame();\n expect(output).toContain(\"\\u2500\");\n });\n });\n\n describe(\"current step\", () => {\n it(\"should render current step label\", () => {\n const { lastFrame, unmount } = renderWizardTabs({\n currentStep: \"build\",\n });\n cleanup = unmount;\n\n const output = lastFrame();\n expect(output).toContain(formatStepLabel(\"build\"));\n });\n\n it(\"should mark first step as current by default\", () => {\n const { lastFrame, unmount } = renderWizardTabs({\n currentStep: \"stack\",\n completedSteps: [],\n });\n cleanup = unmount;\n\n const output = lastFrame();\n expect(output).toContain(formatStepLabel(\"stack\"));\n });\n\n it(\"should update current step when changed\", () => {\n const { lastFrame, unmount } = renderWizardTabs({\n currentStep: \"confirm\",\n completedSteps: [\"stack\", \"build\"],\n });\n cleanup = unmount;\n\n const output = lastFrame();\n expect(output).toContain(formatStepLabel(\"confirm\"));\n });\n });\n\n describe(\"completed steps\", () => {\n it(\"should render completed step labels\", () => {\n const { lastFrame, unmount } = renderWizardTabs({\n currentStep: \"build\",\n completedSteps: [\"stack\"],\n });\n cleanup = unmount;\n\n const output = lastFrame();\n expect(output).toContain(formatStepLabel(\"stack\"));\n });\n\n it(\"should render multiple completed steps\", () => {\n const { lastFrame, unmount } = renderWizardTabs({\n currentStep: \"sources\",\n completedSteps: [\"stack\", \"build\"],\n });\n cleanup = unmount;\n\n const output = lastFrame();\n expect(output).toContain(formatStepLabel(\"stack\"));\n expect(output).toContain(formatStepLabel(\"build\"));\n });\n\n it(\"should render current step separately from completed steps\", () => {\n const { lastFrame, unmount } = renderWizardTabs({\n currentStep: \"stack\",\n completedSteps: [],\n });\n cleanup = unmount;\n\n const output = lastFrame();\n expect(output).toContain(formatStepLabel(\"stack\"));\n });\n });\n\n describe(\"pending steps\", () => {\n it(\"should render pending step labels\", () => {\n const { lastFrame, unmount } = renderWizardTabs({\n currentStep: \"stack\",\n completedSteps: [],\n });\n cleanup = unmount;\n\n const output = lastFrame();\n expect(output).toContain(formatStepLabel(\"domains\"));\n expect(output).toContain(formatStepLabel(\"build\"));\n expect(output).toContain(formatStepLabel(\"sources\"));\n });\n\n it(\"should render steps after current\", () => {\n const { lastFrame, unmount } = renderWizardTabs({\n currentStep: \"build\",\n completedSteps: [\"stack\"],\n });\n cleanup = unmount;\n\n const output = lastFrame();\n expect(output).toContain(formatStepLabel(\"confirm\"));\n });\n });\n\n describe(\"skipped steps\", () => {\n it(\"should render skipped step labels\", () => {\n const { lastFrame, unmount } = renderWizardTabs({\n currentStep: \"sources\",\n completedSteps: [\"stack\"],\n skippedSteps: [\"build\"],\n });\n cleanup = unmount;\n\n const output = lastFrame();\n expect(output).toContain(formatStepLabel(\"build\"));\n });\n\n it(\"should handle multiple skipped steps\", () => {\n const { lastFrame, unmount } = renderWizardTabs({\n currentStep: \"confirm\",\n completedSteps: [\"stack\"],\n skippedSteps: [\"build\", \"sources\"],\n });\n cleanup = unmount;\n\n const output = lastFrame();\n expect(output).toContain(formatStepLabel(\"build\"));\n expect(output).toContain(formatStepLabel(\"sources\"));\n });\n\n it(\"should prioritize completed over skipped when step is in both arrays\", () => {\n const { lastFrame, unmount } = renderWizardTabs({\n currentStep: \"sources\",\n completedSteps: [\"stack\", \"build\"],\n skippedSteps: [\"build\"],\n });\n cleanup = unmount;\n\n const output = lastFrame();\n expect(output).toContain(formatStepLabel(\"stack\"));\n expect(output).toContain(formatStepLabel(\"build\"));\n });\n });\n\n describe(\"state priority\", () => {\n it(\"should prioritize completed over current\", () => {\n const { lastFrame, unmount } = renderWizardTabs({\n currentStep: \"stack\",\n completedSteps: [\"stack\"],\n });\n cleanup = unmount;\n\n const output = lastFrame();\n expect(output).toContain(formatStepLabel(\"stack\"));\n });\n\n it(\"should prioritize current over skipped\", () => {\n const { lastFrame, unmount } = renderWizardTabs({\n currentStep: \"build\",\n completedSteps: [],\n skippedSteps: [\"build\"],\n });\n cleanup = unmount;\n\n const output = lastFrame();\n expect(output).toContain(formatStepLabel(\"build\"));\n });\n\n it(\"should prioritize completed over skipped\", () => {\n const { lastFrame, unmount } = renderWizardTabs({\n currentStep: \"sources\",\n completedSteps: [\"stack\"],\n skippedSteps: [\"stack\"],\n });\n cleanup = unmount;\n\n const output = lastFrame();\n expect(output).toContain(formatStepLabel(\"stack\"));\n });\n });\n\n describe(\"visual layout\", () => {\n it(\"should render tabs horizontally\", () => {\n const { lastFrame, unmount } = renderWizardTabs();\n cleanup = unmount;\n\n const output = lastFrame();\n expect(output).toContain(formatStepLabel(\"stack\"));\n expect(output).toContain(formatStepLabel(\"confirm\"));\n });\n\n it(\"should include step labels\", () => {\n const { lastFrame, unmount } = renderWizardTabs();\n cleanup = unmount;\n\n const output = lastFrame();\n WIZARD_STEPS.forEach((step) => {\n expect(output).toContain(formatStepLabel(step.id));\n });\n });\n });\n\n describe(\"edge cases\", () => {\n it(\"should handle empty completed steps\", () => {\n const { lastFrame, unmount } = renderWizardTabs({\n currentStep: \"stack\",\n completedSteps: [],\n });\n cleanup = unmount;\n\n const output = lastFrame();\n expect(output).toContain(formatStepLabel(\"stack\"));\n expect(output).toContain(formatStepLabel(\"confirm\"));\n });\n\n it(\"should handle empty skipped steps\", () => {\n const { lastFrame, unmount } = renderWizardTabs({\n currentStep: \"sources\",\n completedSteps: [\"stack\", \"build\"],\n skippedSteps: [],\n });\n cleanup = unmount;\n\n const output = lastFrame();\n expect(output).toContain(formatStepLabel(\"stack\"));\n expect(output).toContain(formatStepLabel(\"build\"));\n expect(output).toContain(formatStepLabel(\"sources\"));\n });\n\n it(\"should handle all steps completed\", () => {\n const { lastFrame, unmount } = renderWizardTabs({\n currentStep: \"confirm\",\n completedSteps: [\"stack\", \"domains\", \"build\", \"sources\", \"agents\", \"confirm\"],\n });\n cleanup = unmount;\n\n const output = lastFrame();\n expect(output).toContain(formatStepLabel(\"stack\"));\n expect(output).toContain(formatStepLabel(\"domains\"));\n expect(output).toContain(formatStepLabel(\"build\"));\n expect(output).toContain(formatStepLabel(\"sources\"));\n expect(output).toContain(formatStepLabel(\"confirm\"));\n });\n\n it(\"should handle single step\", () => {\n const singleStep = [{ id: \"confirm\" as WizardStep, label: \"Only Step\" }];\n const { lastFrame, unmount } = renderWizardTabs({\n steps: singleStep,\n currentStep: \"confirm\",\n completedSteps: [],\n });\n cleanup = unmount;\n\n const output = lastFrame();\n expect(output).toContain(\"Only Step\");\n });\n });\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAagB;AARhB,IAAM,mBAAmB,CAAC,QAAkC,CAAC,MAAM;AACjE,QAAM,eAAgC;AAAA,IACpC,OAAO;AAAA,IACP,aAAa;AAAA,IACb,gBAAgB,CAAC;AAAA,IACjB,cAAc,CAAC;AAAA,IACf,GAAG;AAAA,EACL;AACA,SAAO,OAAO,oBAAC,cAAY,GAAG,cAAc,CAAE;AAChD;AAEA,SAAS,wBAAwB,MAAM;AACrC,MAAI;AAEJ,YAAU,MAAM;AACd,cAAU;AACV,cAAU;AAAA,EACZ,CAAC;AAED,WAAS,aAAa,MAAM;AAC1B,OAAG,4BAA4B,MAAM;AACnC,YAAM,EAAE,WAAW,QAAQ,IAAI,iBAAiB;AAChD,gBAAU;AAEV,YAAM,SAAS,UAAU;AACzB,mBAAO,MAAM,EAAE,UAAU,gBAAgB,OAAO,CAAC;AACjD,mBAAO,MAAM,EAAE,UAAU,gBAAgB,SAAS,CAAC;AACnD,mBAAO,MAAM,EAAE,UAAU,gBAAgB,OAAO,CAAC;AACjD,mBAAO,MAAM,EAAE,UAAU,gBAAgB,SAAS,CAAC;AACnD,mBAAO,MAAM,EAAE,UAAU,gBAAgB,QAAQ,CAAC;AAClD,mBAAO,M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AgB,SAAS,CAAC;AACnD,mBAAO,MAAM,EAAE,UAAU,gBAAgB,OAAO,CAAC;AACjD,mBAAO,MAAM,EAAE,UAAU,gBAAgB,SAAS,CAAC;AACnD,mBAAO,MAAM,EAAE,UAAU,gBAAgB,SAAS,CAAC;AAAA,IACrD,CAAC;AAED,OAAG,6BAA6B,MAAM;AACpC,YAAM,aAAa,CAAC,EAAE,IAAI,WAAyB,OAAO,YAAY,CAAC;AACvE,YAAM,EAAE,WAAW,QAAQ,IAAI,iBAAiB;AAAA,QAC9C,OAAO;AAAA,QACP,aAAa;AAAA,QACb,gBAAgB,CAAC;AAAA,MACnB,CAAC;AACD,gBAAU;AAEV,YAAM,SAAS,UAAU;AACzB,mBAAO,MAAM,EAAE,UAAU,WAAW;AAAA,IACtC,CAAC;AAAA,EACH,CAAC;AACH,CAAC;","names":[]}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
copyLocalSkills
|
|
4
|
-
} from "./chunk-3XFUQ6OL.js";
|
|
5
|
-
import "./chunk-TVHRMRD3.js";
|
|
6
|
-
import "./chunk-3LIU2ZEF.js";
|
|
7
|
-
import "./chunk-DG2NGZ7S.js";
|
|
8
|
-
import "./chunk-VEP23B5W.js";
|
|
9
|
-
import "./chunk-O5ASLZ2K.js";
|
|
10
|
-
import "./chunk-YU2VGX5R.js";
|
|
11
|
-
import "./chunk-P56WJ5FA.js";
|
|
12
|
-
export {
|
|
13
|
-
copyLocalSkills
|
|
14
|
-
};
|
|
15
|
-
//# sourceMappingURL=copy-local-skills-UPA2GUZV.js.map
|