@contentful/experience-design-system-cli 2.38.1-dev-build-f59ff6e8.0 → 2.38.1-dev-build-1adffe40.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app.d.ts +5 -7
- package/dist/app.js +30449 -967
- package/dist/index.js +34085 -1070
- package/dist/package.json +8 -3
- package/dist/src/commands/import-options.d.ts +10 -0
- package/dist/src/commands/import.d.ts +2 -1
- package/dist/src/tui/debug-prune.d.ts +12 -0
- package/dist/src/tui/debug-store.d.ts +18 -1
- package/dist/src/tui/help/file-locations.d.ts +23 -0
- package/dist/src/tui/home/home.theme.d.ts +0 -9
- package/dist/src/tui/import/resolve-user-path.d.ts +1 -0
- package/dist/src/tui/import/shared/error-step/controls.d.ts +7 -0
- package/{legacy/dist/src/import/tui/steps/ErrorStep.d.ts → dist/src/tui/import/shared/error-step/error-step.d.ts} +2 -2
- package/dist/src/tui/import/shared/error-step/logic.d.ts +15 -0
- package/dist/src/tui/import/shared/gate-step/controls.d.ts +8 -0
- package/dist/src/tui/import/shared/gate-step/gate-step.d.ts +16 -0
- package/dist/src/tui/import/shared/gate-step/logic.d.ts +11 -0
- package/dist/src/tui/import/shared/index.d.ts +4 -0
- package/dist/src/tui/import/shared/overview-box/overview-box.d.ts +10 -0
- package/dist/src/tui/import/shared/running-step/logic.d.ts +11 -0
- package/dist/src/tui/import/shared/running-step/running-step.d.ts +10 -0
- package/dist/src/tui/import/shared/running-step/theme.d.ts +3 -0
- package/dist/src/tui/import/shared/running-step/use-elapsed.d.ts +1 -0
- package/dist/src/tui/import/steps/00-preflight/controls.d.ts +17 -0
- package/dist/src/tui/import/steps/00-preflight/logic.d.ts +45 -0
- package/dist/src/tui/import/steps/00-preflight/screen.d.ts +8 -0
- package/dist/src/tui/import/steps/01-welcome/controls.d.ts +4 -1
- package/dist/src/tui/import/steps/02-token-input/controls.d.ts +3 -0
- package/dist/src/tui/import/steps/03-path-validation/controls.d.ts +13 -0
- package/dist/src/tui/import/steps/03-path-validation/helpers/scan-files.d.ts +2 -0
- package/dist/src/tui/import/steps/03-path-validation/logic.d.ts +45 -0
- package/dist/src/tui/import/steps/03-path-validation/screen.d.ts +14 -0
- package/dist/src/tui/import/steps/04-credentials/logic.d.ts +12 -0
- package/dist/src/tui/import/steps/04-credentials/screen.d.ts +19 -0
- package/dist/src/tui/import/steps/04-credentials/validate.d.ts +8 -0
- package/dist/src/tui/import/steps/06-extraction/find-skill-path.d.ts +1 -0
- package/dist/src/tui/import/steps/06-extraction/logic.d.ts +33 -0
- package/dist/src/tui/import/steps/06-extraction/run-tokens-only.d.ts +31 -0
- package/dist/src/tui/import/steps/06-extraction/run.d.ts +26 -0
- package/dist/src/tui/import/steps/06-extraction/screen.d.ts +8 -0
- package/dist/src/tui/import/steps/06-extraction/selection.d.ts +18 -0
- package/dist/src/tui/import/steps/06-extraction/types.d.ts +45 -0
- package/dist/src/tui/import/steps/06-extraction/use-extraction.d.ts +14 -0
- package/dist/src/tui/import/steps/06-extraction/use-tokens-only.d.ts +12 -0
- package/dist/src/tui/import/steps/07-scope-gate/cache-check.d.ts +10 -0
- package/{legacy/dist/src/import/tui/scope-gate-columns.d.ts → dist/src/tui/import/steps/07-scope-gate/columns.d.ts} +22 -4
- package/dist/src/tui/import/steps/07-scope-gate/graph/fuzzy-search.d.ts +1 -0
- package/dist/src/tui/import/steps/07-scope-gate/graph/index.d.ts +33 -0
- package/dist/src/tui/import/steps/07-scope-gate/graph/lineage.d.ts +7 -0
- package/dist/src/tui/import/steps/07-scope-gate/keymap.d.ts +84 -0
- package/dist/src/tui/import/steps/07-scope-gate/load.d.ts +8 -0
- package/dist/src/tui/import/steps/07-scope-gate/panels/added-column.d.ts +15 -0
- package/dist/src/tui/import/steps/07-scope-gate/panels/cycles-panel.d.ts +8 -0
- package/dist/src/tui/import/steps/07-scope-gate/panels/reject-prompt.d.ts +5 -0
- package/dist/src/tui/import/steps/07-scope-gate/screen.d.ts +9 -0
- package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/07-scope-gate/sidebar}/ai-flag.d.ts +0 -1
- package/{legacy/dist/src/analyze/select/tui → dist/src/tui/import/steps/07-scope-gate/sidebar}/components/GotoBanner.d.ts +2 -1
- package/{legacy/dist/src/analyze/select/tui → dist/src/tui/import/steps/07-scope-gate/sidebar}/components/GroupedSidebar.d.ts +3 -36
- package/dist/src/tui/import/steps/07-scope-gate/sidebar/components/badge.d.ts +13 -0
- package/{legacy/dist/src/tui → dist/src/tui/import/steps/07-scope-gate/sidebar/components}/windowed-panel.d.ts +3 -5
- package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/07-scope-gate/sidebar}/group-collapse.d.ts +1 -1
- package/dist/src/tui/import/steps/07-scope-gate/sidebar/lineage-layout.d.ts +32 -0
- package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/07-scope-gate/sidebar}/sidebar-help.d.ts +1 -1
- package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/07-scope-gate/sidebar}/sidebar-navigation.d.ts +2 -2
- package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/07-scope-gate/sidebar}/step-filters.d.ts +4 -0
- package/dist/src/tui/import/steps/07-scope-gate/sidebar/types.d.ts +7 -0
- package/dist/src/tui/import/steps/07-scope-gate/state.d.ts +19 -0
- package/dist/src/tui/import/steps/07-scope-gate/types.d.ts +24 -0
- package/dist/src/tui/import/steps/07-scope-gate/use-scope-gate-flow.d.ts +27 -0
- package/dist/src/tui/import/steps/07-scope-gate/use-scope-gate.d.ts +77 -0
- package/dist/src/tui/import/steps/08-generation/logic.d.ts +23 -0
- package/dist/src/tui/import/steps/08-generation/map-tokens.d.ts +14 -0
- package/dist/src/tui/import/steps/08-generation/run.d.ts +12 -0
- package/dist/src/tui/import/steps/08-generation/save-decisions.d.ts +8 -0
- package/dist/src/tui/import/steps/08-generation/screen.d.ts +10 -0
- package/dist/src/tui/import/steps/08-generation/types.d.ts +47 -0
- package/dist/src/tui/import/steps/08-generation/use-generation.d.ts +14 -0
- package/{legacy/dist/src/analyze/select/tui → dist/src/tui/import/steps/09-review}/components/ComponentRationalePanel.d.ts +1 -1
- package/{legacy/dist/src/analyze/select/tui → dist/src/tui/import/steps/09-review}/components/FieldEditor.d.ts +1 -18
- package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/09-review}/components/LivePreviewSummary.d.ts +2 -2
- package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/09-review}/components/ReviewComponentPanel.d.ts +3 -3
- package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/09-review}/components/ReviewDetailsEditor.d.ts +3 -3
- package/dist/src/tui/import/steps/09-review/components/ReviewDialogs.d.ts +14 -0
- package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/09-review}/components/ReviewStatus.d.ts +1 -1
- package/{legacy/dist/src/analyze/select/tui → dist/src/tui/import/steps/09-review}/components/ScrollablePanel.d.ts +2 -2
- package/{legacy/dist/src/analyze/select/tui → dist/src/tui/import/steps/09-review}/components/TokenReviewPanel.d.ts +0 -6
- package/dist/src/tui/import/steps/09-review/generate-review-step.d.ts +16 -0
- package/{legacy/dist/src/import → dist/src/tui/import/steps/09-review/graph}/cycle-auto-reject.d.ts +1 -1
- package/{legacy/dist/src/analyze → dist/src/tui/import/steps/09-review/graph}/cycle-view.d.ts +2 -2
- package/{legacy/dist/src/analyze → dist/src/tui/import/steps/09-review/graph}/issue-inheritance.d.ts +1 -1
- package/{legacy/dist/src/analyze → dist/src/tui/import/steps/09-review/graph}/selection-cascade.d.ts +1 -1
- package/dist/src/tui/import/steps/09-review/helpers/cycle-panel-scroll.d.ts +4 -0
- package/{legacy/dist/src/import/tui/steps → dist/src/tui/import/steps/09-review/helpers}/enumerate-cycle-breaks.d.ts +1 -1
- package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/09-review}/history.d.ts +1 -1
- package/{legacy/dist/src/import/tui/steps → dist/src/tui/import/steps/09-review}/review-details-panel.d.ts +2 -2
- package/{legacy/dist/src/import/tui/hooks → dist/src/tui/import/steps/09-review}/review-input.d.ts +2 -2
- package/{legacy/dist/src/import/tui/runLivePreview.d.ts → dist/src/tui/import/steps/09-review/run-live-preview.d.ts} +2 -6
- package/dist/src/tui/import/steps/09-review/session.d.ts +26 -0
- package/dist/src/tui/import/steps/09-review/token-suggestions.d.ts +8 -0
- package/dist/src/tui/import/steps/09-review/types.d.ts +19 -0
- package/{legacy/dist/src/import/tui/useFinalizePreview.d.ts → dist/src/tui/import/steps/09-review/use-finalize-preview.d.ts} +1 -11
- package/{legacy/dist/src/import/tui/hooks/useReviewEditor.d.ts → dist/src/tui/import/steps/09-review/use-review-editor.d.ts} +1 -3
- package/{legacy/dist/src/import/tui/hooks/useReviewPreview.d.ts → dist/src/tui/import/steps/09-review/use-review-preview.d.ts} +2 -2
- package/{legacy/dist/src/import/tui/hooks/useReviewSession.d.ts → dist/src/tui/import/steps/09-review/use-review-session.d.ts} +5 -35
- package/dist/src/tui/import/steps/10-flow/flow/build-flow-start.d.ts +22 -0
- package/dist/src/tui/import/steps/10-flow/flow/controller.d.ts +71 -0
- package/dist/src/tui/import/steps/10-flow/flow/preview.d.ts +44 -0
- package/dist/src/tui/import/steps/10-flow/flow/push.d.ts +45 -0
- package/dist/src/tui/import/steps/10-flow/flow/save.d.ts +41 -0
- package/dist/src/tui/import/steps/10-flow/flow/screen.d.ts +13 -0
- package/dist/src/tui/import/steps/10-flow/flow/types.d.ts +71 -0
- package/dist/src/tui/import/steps/10-flow/flow/use-flow.d.ts +12 -0
- package/{legacy/dist/src/import/tui/steps → dist/src/tui/import/steps/10-flow/screens}/DoneStep.d.ts +6 -1
- package/dist/src/tui/import/steps/10-flow/screens/PushingStep.d.ts +9 -0
- package/dist/src/tui/import/steps/10-flow/screens/WizardPreviewStep.d.ts +12 -0
- package/{legacy/dist/src/import → dist/src/tui/import/steps/10-flow/support}/path-utils.d.ts +0 -5
- package/dist/src/tui/import/steps/10-flow/support/preview-diff.d.ts +7 -0
- package/dist/src/tui/import/steps/10-flow/support/produced.d.ts +15 -0
- package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/10-flow/support}/wizard-state-transitions.d.ts +0 -13
- package/dist/src/tui/import/steps/index.d.ts +4 -0
- package/dist/src/tui/import/steps/preview-validation-error/logic.d.ts +9 -0
- package/dist/src/tui/import/steps/preview-validation-error/screen.d.ts +11 -0
- package/dist/src/tui/settings/{contentful-configuration/ContentfulConfigScreen.d.ts → configuration/ConfigurationScreen.d.ts} +1 -0
- package/dist/src/tui/settings/configuration/agents/AgentDetail.d.ts +15 -0
- package/dist/src/tui/settings/configuration/agents/AgentStatusBadge.d.ts +10 -0
- package/dist/src/tui/settings/configuration/agents/AgentsScreen.d.ts +11 -0
- package/dist/src/tui/settings/configuration/agents/agent-debug.d.ts +25 -0
- package/dist/src/tui/settings/configuration/agents/agent-status.d.ts +63 -0
- package/dist/src/tui/settings/configuration/agents/agent-store.d.ts +21 -0
- package/dist/src/tui/settings/configuration/agents/apply-binary-overrides.d.ts +13 -0
- package/dist/src/tui/settings/configuration/project/ProjectScreen.d.ts +5 -0
- package/dist/src/tui/settings/{contentful-configuration/config-store.d.ts → configuration/project/project-store.d.ts} +1 -0
- package/dist/src/tui/settings/debug-mode/debug-mode-store.d.ts +7 -1
- package/dist/src/tui/settings/debug-mode/screen.d.ts +4 -0
- package/dist/src/tui/settings/shared/debug-trail.d.ts +35 -0
- package/dist/src/tui/shared/components/ClearableTextInput.d.ts +6 -0
- package/dist/src/tui/shared/components/ControlHints.d.ts +9 -0
- package/dist/src/tui/shared/components/FieldForm.d.ts +71 -0
- package/dist/src/tui/shared/components/StepHeader.d.ts +26 -0
- package/dist/src/tui/theme.d.ts +21 -0
- package/dist/src/tui/user-agent.d.ts +5 -0
- package/package.json +8 -3
- package/dist/src/commands/forwarded.d.ts +0 -2
- package/dist/src/legacy/forwarded-import-args.d.ts +0 -1
- package/dist/src/legacy/legacy-cli-path.d.ts +0 -1
- package/dist/src/legacy/run-legacy.d.ts +0 -1
- package/dist/src/tui/control-hints.d.ts +0 -7
- package/dist/src/tui/import/spawn-v1-import.d.ts +0 -29
- package/dist/src/tui/import/terminal-input.d.ts +0 -2
- package/dist/src/tui/upgrade/PageContainer.d.ts +0 -4
- package/legacy/bin/cli.js +0 -58
- package/legacy/dist/package.json +0 -73
- package/legacy/dist/src/analytics/apply.d.ts +0 -6
- package/legacy/dist/src/analytics/client.d.ts +0 -8
- package/legacy/dist/src/analytics/constants.d.ts +0 -4
- package/legacy/dist/src/analytics/exit.d.ts +0 -4
- package/legacy/dist/src/analytics/index.d.ts +0 -6
- package/legacy/dist/src/analytics/normalize.d.ts +0 -3
- package/legacy/dist/src/analytics/os.d.ts +0 -2
- package/legacy/dist/src/analytics/session.d.ts +0 -3
- package/legacy/dist/src/analytics/tracker.d.ts +0 -16
- package/legacy/dist/src/analytics/types.d.ts +0 -28
- package/legacy/dist/src/analyze/composition/apply-mapping.d.ts +0 -22
- package/legacy/dist/src/analyze/composition/candidate-files.d.ts +0 -34
- package/legacy/dist/src/analyze/composition/composition-cache-key.d.ts +0 -18
- package/legacy/dist/src/analyze/composition/interchange-schema.d.ts +0 -17
- package/legacy/dist/src/analyze/composition/manifest-doc-evidence.d.ts +0 -49
- package/legacy/dist/src/analyze/composition/merge-edges.d.ts +0 -19
- package/legacy/dist/src/analyze/composition/parse-map-edges.d.ts +0 -16
- package/legacy/dist/src/analyze/composition/prompt-loader.d.ts +0 -3
- package/legacy/dist/src/analyze/composition/resolve-mapping-cli.d.ts +0 -10
- package/legacy/dist/src/analyze/composition/resolve-mapping.d.ts +0 -59
- package/legacy/dist/src/analyze/extract-command.d.ts +0 -7
- package/legacy/dist/src/analyze/fuzzy-search.d.ts +0 -3
- package/legacy/dist/src/analyze/lineage.d.ts +0 -29
- package/legacy/dist/src/analyze/select/command.d.ts +0 -27
- package/legacy/dist/src/analyze/select/parser.d.ts +0 -6
- package/legacy/dist/src/analyze/select/persistence.d.ts +0 -22
- package/legacy/dist/src/analyze/select/tui/LegacySelectApp.d.ts +0 -8
- package/legacy/dist/src/analyze/select/tui/components/ComponentDetail.d.ts +0 -19
- package/legacy/dist/src/analyze/select/tui/components/JsonEditor.d.ts +0 -10
- package/legacy/dist/src/analyze/select/tui/components/PreviewSummaryBar.d.ts +0 -8
- package/legacy/dist/src/analyze/select/tui/components/Sidebar.d.ts +0 -29
- package/legacy/dist/src/analyze/select/tui/components/SourcePanel.d.ts +0 -11
- package/legacy/dist/src/analyze/select/tui/components/StatusBar.d.ts +0 -11
- package/legacy/dist/src/analyze/select/tui/components/TopBar.d.ts +0 -10
- package/legacy/dist/src/analyze/select/tui/hooks/list-scroll-input.d.ts +0 -13
- package/legacy/dist/src/analyze/select/tui/hooks/useKeymap.d.ts +0 -24
- package/legacy/dist/src/analyze/select/tui/hooks/useSession.d.ts +0 -19
- package/legacy/dist/src/analyze/select/tui/hooks/useUndo.d.ts +0 -8
- package/legacy/dist/src/analyze/select/tui/theme.d.ts +0 -18
- package/legacy/dist/src/analyze/select/types.d.ts +0 -54
- package/legacy/dist/src/apply/api-client.d.ts +0 -64
- package/legacy/dist/src/apply/command.d.ts +0 -43
- package/legacy/dist/src/apply/preview-utils.d.ts +0 -12
- package/legacy/dist/src/apply/tokens.d.ts +0 -1
- package/legacy/dist/src/apply/tui/ServerApplyView.d.ts +0 -34
- package/legacy/dist/src/apply/tui/ServerPreviewView.d.ts +0 -9
- package/legacy/dist/src/credentials-store.d.ts +0 -18
- package/legacy/dist/src/doctor/checks.d.ts +0 -5
- package/legacy/dist/src/doctor/command.d.ts +0 -2
- package/legacy/dist/src/doctor/report.d.ts +0 -7
- package/legacy/dist/src/generate/command.d.ts +0 -2
- package/legacy/dist/src/generate/tui/GenerateView.d.ts +0 -12
- package/legacy/dist/src/helpers/build-contentful-management-client.d.ts +0 -7
- package/legacy/dist/src/helpers/fetch-and-persist-existing-contentful-entities.d.ts +0 -29
- package/legacy/dist/src/helpers/fetch-existing-contentful-entities.d.ts +0 -11
- package/legacy/dist/src/helpers/find-nearly-matching-component.d.ts +0 -7
- package/legacy/dist/src/helpers/read-existing-contentful-entities-from-session.d.ts +0 -7
- package/legacy/dist/src/helpers/summarize-existing-contentful-entities.d.ts +0 -50
- package/legacy/dist/src/host-utils.d.ts +0 -3
- package/legacy/dist/src/import/agent-model-resolve.d.ts +0 -27
- package/legacy/dist/src/import/command.d.ts +0 -2
- package/legacy/dist/src/import/composition-options.d.ts +0 -7
- package/legacy/dist/src/import/tui/WizardApp.d.ts +0 -67
- package/legacy/dist/src/import/tui/components/LegendEntry.d.ts +0 -2
- package/legacy/dist/src/import/tui/components/ReviewDialogs.d.ts +0 -28
- package/legacy/dist/src/import/tui/components/StepHeader.d.ts +0 -8
- package/legacy/dist/src/import/tui/cycle-panel-scroll.d.ts +0 -8
- package/legacy/dist/src/import/tui/lineage-layout.d.ts +0 -68
- package/legacy/dist/src/import/tui/run-selection-agent.d.ts +0 -9
- package/legacy/dist/src/import/tui/runScopeGate.d.ts +0 -12
- package/legacy/dist/src/import/tui/spawn-generate.d.ts +0 -33
- package/legacy/dist/src/import/tui/steps/CredentialsStep.d.ts +0 -43
- package/legacy/dist/src/import/tui/steps/GateStep.d.ts +0 -15
- package/legacy/dist/src/import/tui/steps/GenerateReviewStep.d.ts +0 -37
- package/legacy/dist/src/import/tui/steps/PathValidationStep.d.ts +0 -10
- package/legacy/dist/src/import/tui/steps/PreviewValidationErrorStep.d.ts +0 -11
- package/legacy/dist/src/import/tui/steps/PushingStep.d.ts +0 -9
- package/legacy/dist/src/import/tui/steps/RunningStep.d.ts +0 -32
- package/legacy/dist/src/import/tui/steps/ScopeGateStep.d.ts +0 -48
- package/legacy/dist/src/import/tui/steps/TokenInputStep.d.ts +0 -8
- package/legacy/dist/src/import/tui/steps/WelcomeStep.d.ts +0 -7
- package/legacy/dist/src/import/tui/steps/WizardPreviewStep.d.ts +0 -21
- package/legacy/dist/src/import/tui/steps/preview-diff.d.ts +0 -10
- package/legacy/dist/src/import/tui/wizard-422-helpers.d.ts +0 -48
- package/legacy/dist/src/import/tui/wizard-generate-progress.d.ts +0 -21
- package/legacy/dist/src/index.d.ts +0 -1
- package/legacy/dist/src/index.js +0 -33004
- package/legacy/dist/src/lib/agent-definitions.d.ts +0 -14
- package/legacy/dist/src/lib/agent-model-options.d.ts +0 -15
- package/legacy/dist/src/lib/agent-output.d.ts +0 -5
- package/legacy/dist/src/lib/cli-errors.d.ts +0 -2
- package/legacy/dist/src/lib/cli-path.d.ts +0 -4
- package/legacy/dist/src/lib/command-options.d.ts +0 -3
- package/legacy/dist/src/lib/component-patch.d.ts +0 -12
- package/legacy/dist/src/lib/debug-logger.d.ts +0 -39
- package/legacy/dist/src/lib/debug-preamble.d.ts +0 -7
- package/legacy/dist/src/lib/error-parser.d.ts +0 -40
- package/legacy/dist/src/lib/path-exists.d.ts +0 -1
- package/legacy/dist/src/lib/prompt-overrides.d.ts +0 -38
- package/legacy/dist/src/lib/terminal-capabilities.d.ts +0 -29
- package/legacy/dist/src/lib/user-agent.d.ts +0 -7
- package/legacy/dist/src/map-tokens/apply.d.ts +0 -12
- package/legacy/dist/src/map-tokens/command.d.ts +0 -2
- package/legacy/dist/src/map-tokens/resolve-defaults.d.ts +0 -32
- package/legacy/dist/src/map-tokens/tui/MapTokensView.d.ts +0 -13
- package/legacy/dist/src/output/format.d.ts +0 -23
- package/legacy/dist/src/print/command.d.ts +0 -11
- package/legacy/dist/src/print/validate/tui/ValidateView.d.ts +0 -15
- package/legacy/dist/src/print/validate/validators/cdf-validator.d.ts +0 -2
- package/legacy/dist/src/print/validate/validators/dtcg-validator.d.ts +0 -2
- package/legacy/dist/src/print/validate/validators/format-errors.d.ts +0 -12
- package/legacy/dist/src/print/validate/validators/read-json-file.d.ts +0 -10
- package/legacy/dist/src/program.d.ts +0 -25
- package/legacy/dist/src/runs/fingerprint.d.ts +0 -36
- package/legacy/dist/src/runs/save-path-resolver.d.ts +0 -11
- package/legacy/dist/src/runs/store.d.ts +0 -65
- package/legacy/dist/src/session/cache-keys.d.ts +0 -22
- package/legacy/dist/src/session/core/cdf/cdf-mappers.d.ts +0 -3
- package/legacy/dist/src/session/core/components/derive-component-id.d.ts +0 -1
- package/legacy/dist/src/session/core/components/hash-component-shape.d.ts +0 -5
- package/legacy/dist/src/session/core/shared/index-rows-by-key.d.ts +0 -1
- package/legacy/dist/src/session/core/tokens/build-dtcg-groups.d.ts +0 -12
- package/legacy/dist/src/session/core/tokens/build-dtcg-tokens.d.ts +0 -3
- package/legacy/dist/src/session/core/tokens/hash-token-content.d.ts +0 -1
- package/legacy/dist/src/session/db.d.ts +0 -200
- package/legacy/dist/src/session/migration.d.ts +0 -2
- package/legacy/dist/src/session/repositories/sessions/read.d.ts +0 -11
- package/legacy/dist/src/session/repositories/sessions/write.d.ts +0 -3
- package/legacy/dist/src/session/repositories/shared/with-transaction.d.ts +0 -2
- package/legacy/dist/src/session/repositories/steps/read.d.ts +0 -2
- package/legacy/dist/src/session/repositories/steps/write.d.ts +0 -5
- package/legacy/dist/src/session/repositories/tokens/read.d.ts +0 -15
- package/legacy/dist/src/session/repositories/tokens/write.d.ts +0 -16
- package/legacy/dist/src/session/resolve-session-id.d.ts +0 -1
- package/legacy/dist/src/session/services/session-resolver.d.ts +0 -9
- package/legacy/dist/src/session/services/tokens/apply-tool-calls.d.ts +0 -8
- package/legacy/dist/src/session/services/tokens/replace-raw-prop-token-paths.d.ts +0 -3
- package/legacy/dist/src/session/services/tokens/replace-raw-token-name-paths.d.ts +0 -3
- package/legacy/dist/src/session/services/tokens/store-dtcg-tokens.d.ts +0 -3
- package/legacy/dist/src/session/session-id.d.ts +0 -1
- package/legacy/dist/src/session/source-excerpt.d.ts +0 -26
- package/legacy/dist/src/setup/SetupScreen.d.ts +0 -28
- package/legacy/dist/src/setup/SetupStepper.d.ts +0 -7
- package/legacy/dist/src/setup/command.d.ts +0 -3
- package/legacy/dist/src/setup/lib/checks.d.ts +0 -57
- package/legacy/dist/src/setup/lib/shell.d.ts +0 -12
- package/legacy/dist/src/setup/steps/CodingAgentScreen.d.ts +0 -20
- package/legacy/dist/src/setup/steps/ContentfulCredentialsScreen.d.ts +0 -11
- package/legacy/dist/src/setup/steps/StepLayout.d.ts +0 -20
- package/legacy/dist/src/setup/steps/preferences/AnalyticsScreen.d.ts +0 -5
- package/legacy/dist/src/setup/steps/preferences/BooleanInput.d.ts +0 -21
- package/legacy/dist/src/setup/steps/preferences/ColorPreferenceScreen.d.ts +0 -5
- package/legacy/dist/src/setup/steps/preferences/CustomPromptScreen.d.ts +0 -14
- package/legacy/dist/src/setup/steps/preferences/DebugLogsScreen.d.ts +0 -5
- package/legacy/dist/src/setup/steps/preferences/PreferencesMenu.d.ts +0 -26
- package/legacy/dist/src/setup/steps/prerequisites/PrerequisitesScreen.d.ts +0 -16
- package/legacy/dist/src/setup/steps/prerequisites/build.d.ts +0 -2
- package/legacy/dist/src/setup/steps/prerequisites/deps.d.ts +0 -33
- package/legacy/dist/src/setup/steps/prerequisites/index.d.ts +0 -4
- package/legacy/dist/src/setup/steps/prerequisites/node.d.ts +0 -2
- package/legacy/dist/src/setup/steps/prerequisites/pnpm.d.ts +0 -2
- package/legacy/dist/src/tui/CommandCompletionView.d.ts +0 -13
- package/legacy/dist/src/tui/render-with-goodbye.d.ts +0 -7
- package/legacy/dist/src/types.d.ts +0 -2
- package/legacy/package.json +0 -80
- package/legacy/prompts/composition-edges.md +0 -11
- /package/dist/src/tui/{upgrade → home}/version.d.ts +0 -0
- /package/{legacy/dist/src/analyze → dist/src/tui/import/steps/07-scope-gate/graph}/composite-closure.d.ts +0 -0
- /package/{legacy/dist/src/analyze → dist/src/tui/import/steps/07-scope-gate/graph}/cycle-detection.d.ts +0 -0
- /package/{legacy/dist/src/analyze → dist/src/tui/import/steps/07-scope-gate/graph}/scope-gate-cascade.d.ts +0 -0
- /package/{legacy/dist/src/analyze → dist/src/tui/import/steps/07-scope-gate/graph}/search-neighborhood.d.ts +0 -0
- /package/{legacy/dist/src/analyze → dist/src/tui/import/steps/07-scope-gate/graph}/slot-graph.d.ts +0 -0
- /package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/07-scope-gate/sidebar}/autocomplete.d.ts +0 -0
- /package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/07-scope-gate/sidebar}/components/CompactControlBar.d.ts +0 -0
- /package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/07-scope-gate/sidebar}/components/CounterStrip.d.ts +0 -0
- /package/{legacy/dist/src/analyze/select/tui → dist/src/tui/import/steps/07-scope-gate/sidebar}/components/HelpOverlay.d.ts +0 -0
- /package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/07-scope-gate/sidebar}/components/SearchMatchSummary.d.ts +0 -0
- /package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/07-scope-gate/sidebar}/hooks/sidebar-search-state.d.ts +0 -0
- /package/{legacy/dist/src/tui → dist/src/tui/import/steps/07-scope-gate/sidebar/hooks}/use-terminal-size.d.ts +0 -0
- /package/{legacy/dist/src/analyze/select/tui → dist/src/tui/import/steps/07-scope-gate/sidebar}/hooks/useImmediateInput.d.ts +0 -0
- /package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/07-scope-gate/sidebar}/hooks/useOverlayPanel.d.ts +0 -0
- /package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/07-scope-gate/sidebar}/sidebar-input.d.ts +0 -0
- /package/{legacy/dist/src/analyze/select/tui → dist/src/tui/import/steps/09-review}/components/FinalizeDialog.d.ts +0 -0
- /package/{legacy/dist/src/analyze/select/tui → dist/src/tui/import/steps/09-review}/components/HighlightedLine.d.ts +0 -0
- /package/{legacy/dist/src/analyze/select/tui → dist/src/tui/import/steps/09-review}/components/JsonPanel.d.ts +0 -0
- /package/{legacy/dist/src/analyze/select/tui → dist/src/tui/import/steps/09-review}/components/QuitDialog.d.ts +0 -0
- /package/{legacy/dist/src/analyze/select/tui → dist/src/tui/import/steps/09-review}/components/RationaleLine.d.ts +0 -0
- /package/{legacy/dist/src/analyze/select/tui → dist/src/tui/import/steps/09-review}/components/RationalePanel.d.ts +0 -0
- /package/{legacy/dist/src/analyze/select/tui → dist/src/tui/import/steps/09-review}/components/removed-components-text.d.ts +0 -0
- /package/{legacy/dist/src/analyze/select/tui → dist/src/tui/import/steps/09-review}/components/wrap-text.d.ts +0 -0
- /package/{legacy/dist/src/import/tui/steps → dist/src/tui/import/steps/09-review/helpers}/auto-reject-decision.d.ts +0 -0
- /package/{legacy/dist/src/import/tui/steps → dist/src/tui/import/steps/09-review/helpers}/breaking-change-format.d.ts +0 -0
- /package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/09-review/helpers}/sidebar-width.d.ts +0 -0
- /package/{legacy/dist/src/analyze/select → dist/src/tui/import/steps/09-review}/preview-annotations.d.ts +0 -0
- /package/{legacy/dist/src/import/tui/steps → dist/src/tui/import/steps/09-review}/review-json-panel.d.ts +0 -0
- /package/{legacy/dist/src/analyze/select/tui/hooks → dist/src/tui/import/steps/09-review}/scroll-offset.d.ts +0 -0
- /package/{legacy/dist/src/import/tui/useLivePreview.d.ts → dist/src/tui/import/steps/09-review/use-live-preview.d.ts} +0 -0
- /package/{legacy/dist/src/import/tui/hooks/useReviewSurfaceState.d.ts → dist/src/tui/import/steps/09-review/use-review-surface-state.d.ts} +0 -0
- /package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/10-flow/components}/CustomPromptBanner.d.ts +0 -0
- /package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/10-flow}/components/SpaceEnvironment.d.ts +0 -0
- /package/{legacy/dist/src/runs/path-prompt.d.ts → dist/src/tui/import/steps/10-flow/screens/PathPrompt.d.ts} +0 -0
- /package/{legacy/dist/src/lib → dist/src/tui/import/steps/10-flow/support}/contentful-urls.d.ts +0 -0
- /package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/10-flow/support}/preview-confirmation-input.d.ts +0 -0
- /package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/10-flow/support}/push-progress.d.ts +0 -0
- /package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/10-flow/support}/run-print-files-helpers.d.ts +0 -0
- /package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/10-flow/support}/run-teaser.d.ts +0 -0
- /package/{legacy/dist/src/tui → dist/src/tui/import/steps/10-flow/support}/use-blinking-cursor.d.ts +0 -0
- /package/{legacy/dist/src/tui → dist/src/tui/import/steps/10-flow/support}/use-timed-spinner.d.ts +0 -0
- /package/dist/src/tui/settings/{utils → shared}/v1-store.d.ts +0 -0
- /package/{legacy/skills → skills}/generate-components.md +0 -0
- /package/{legacy/skills → skills}/generate-tokens.md +0 -0
- /package/{legacy/skills → skills}/map-tokens.md +0 -0
- /package/{legacy/skills → skills}/select-components.md +0 -0
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentful/experience-design-system-cli",
|
|
3
|
-
"version": "2.38.1-dev-build-
|
|
3
|
+
"version": "2.38.1-dev-build-1adffe40.0",
|
|
4
4
|
"description": "Contentful Experiences design system import CLI",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -25,7 +25,8 @@
|
|
|
25
25
|
"files": [
|
|
26
26
|
"bin/",
|
|
27
27
|
"dist/",
|
|
28
|
-
"legacy/"
|
|
28
|
+
"legacy/",
|
|
29
|
+
"skills/"
|
|
29
30
|
],
|
|
30
31
|
"scripts": {
|
|
31
32
|
"build": "nx build experience-design-system-cli",
|
|
@@ -37,10 +38,12 @@
|
|
|
37
38
|
"dev": "node scripts/dev.mjs"
|
|
38
39
|
},
|
|
39
40
|
"dependencies": {
|
|
41
|
+
"@contentful/experience-design-system-backend-pipeline": "workspace:*",
|
|
40
42
|
"@contentful/experience-design-system-types": "workspace:*",
|
|
41
43
|
"@inkjs/ui": "^2.0.0",
|
|
42
44
|
"@segment/analytics-node": "^3.0.0",
|
|
43
45
|
"@vue/compiler-sfc": "^3.5.31",
|
|
46
|
+
"ajv": "^8.18.0",
|
|
44
47
|
"commander": "^13.1.0",
|
|
45
48
|
"contentful-management": "^12.17.0",
|
|
46
49
|
"figures": "6.1.0",
|
|
@@ -51,7 +54,8 @@
|
|
|
51
54
|
"semver": "^7.7.2",
|
|
52
55
|
"svelte": "^5.56.4",
|
|
53
56
|
"ts-morph": "^27.0.2",
|
|
54
|
-
"typescript": "^5.9.3"
|
|
57
|
+
"typescript": "^5.9.3",
|
|
58
|
+
"zod": "^4.6.5"
|
|
55
59
|
},
|
|
56
60
|
"devDependencies": {
|
|
57
61
|
"@tsconfig/node24": "^24.0.4",
|
|
@@ -62,6 +66,7 @@
|
|
|
62
66
|
"eslint": "^9.39.5",
|
|
63
67
|
"eslint-config-prettier": "^10.1.8",
|
|
64
68
|
"eslint-plugin-prettier": "^5.5.6",
|
|
69
|
+
"ink-testing-library": "^4.0.0",
|
|
65
70
|
"typescript-eslint": "^8.67.0",
|
|
66
71
|
"vitest": "^4.0.16"
|
|
67
72
|
},
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
import type { Command } from 'commander';
|
|
2
|
-
|
|
2
|
+
import { type ImportOptions } from './import-options.js';
|
|
3
|
+
export declare function registerImportCommand(program: Command, openTui: (options: ImportOptions) => Promise<void>): void;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type PruneResult = {
|
|
2
|
+
logs: number;
|
|
3
|
+
folders: number;
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* Deletes the debug logs under `<base>/.contentful` that are older than `retentionDays`. It only looks at `.md` files
|
|
7
|
+
* inside the `debug` folder of a session folder, so nothing the import produced or the user put there is touched. A file
|
|
8
|
+
* that cannot be read or deleted is skipped: this runs at startup and must never get in the user's way. A folder the
|
|
9
|
+
* deletion left empty is removed too, up to the session folder; one that still holds anything stays. Returns how many
|
|
10
|
+
* logs and folders it deleted.
|
|
11
|
+
*/
|
|
12
|
+
export declare function pruneExpiredLogs(base: string, retentionDays: number, now?: number): Promise<PruneResult>;
|
|
@@ -1,6 +1,23 @@
|
|
|
1
1
|
type Status = 'success' | 'error';
|
|
2
2
|
type ExitMethod = 'saved' | 'discarded' | 'crashed';
|
|
3
|
-
export declare function currentDebugSessionDir(): string;
|
|
3
|
+
export declare function currentDebugSessionDir(): string | undefined;
|
|
4
|
+
/** This terminal session's folder, `<base>/.contentful/<session>/`, or undefined until it is known. */
|
|
5
|
+
export declare function currentSessionDir(): string | undefined;
|
|
6
|
+
/**
|
|
7
|
+
* Starts this terminal session's folder in `base`. The base directory setting being saved passes `replace` so the new
|
|
8
|
+
* location wins; the import passes nothing and only starts a session when none exists yet. Fail-open like the rest of
|
|
9
|
+
* the logger.
|
|
10
|
+
*/
|
|
11
|
+
export declare function startDebugSessionIn(base: string, { replace }?: {
|
|
12
|
+
replace?: boolean | undefined;
|
|
13
|
+
}): Promise<void>;
|
|
14
|
+
/**
|
|
15
|
+
* Where this import run writes everything it produces (tokens.json, .existing-entities.json, components.json): a new
|
|
16
|
+
* `dsi-import-N` folder in this session's folder, next to the debug logs. The session is started here, and waited for,
|
|
17
|
+
* so the answer does not depend on how quickly the boot-time start finished. Without a session (Debug Mode off, or a
|
|
18
|
+
* folder that cannot be created) the files stay in `<project>/.contentful`, as before.
|
|
19
|
+
*/
|
|
20
|
+
export declare function startImportRun(projectPath: string): Promise<string>;
|
|
4
21
|
export declare function startDebugRun({ flow, step, menuOption, inputs, }: {
|
|
5
22
|
flow: string;
|
|
6
23
|
step: string;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export interface FileLocationInput {
|
|
2
|
+
/** The Root Project Directory from Settings > Configuration > Project. Empty when not set. */
|
|
3
|
+
contentfulBaseDir: string;
|
|
4
|
+
/** Whether Debug Mode is on. Debug logs and the per-run folders only exist while it is. */
|
|
5
|
+
debugModeEnabled: boolean;
|
|
6
|
+
/** This terminal session's folder, once it has started. */
|
|
7
|
+
currentSessionDir: string | undefined;
|
|
8
|
+
}
|
|
9
|
+
export interface FileLocations {
|
|
10
|
+
debugLogs: string;
|
|
11
|
+
importFiles: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Where the CLI writes the files a user goes looking for, from the settings that decide it (see `startImportRun`).
|
|
15
|
+
*
|
|
16
|
+
* With Debug Mode on, everything goes in this terminal session's folder, `<base>/.contentful/<date>-session-N/`:
|
|
17
|
+
* the debug logs in `debug/` and, for each import, a `dsi-import-N/` folder with `tokens.json` and `components.json`.
|
|
18
|
+
* `<base>` is the Root Project Directory, or the project being imported when none is set. With Debug Mode off there is
|
|
19
|
+
* no session folder and no logs, and the files go to `<project>/.contentful/`.
|
|
20
|
+
*
|
|
21
|
+
* Names that are only known when a session or an import starts are shown as patterns, never guessed.
|
|
22
|
+
*/
|
|
23
|
+
export declare function describeFileLocations({ contentfulBaseDir, debugModeEnabled, currentSessionDir, }: FileLocationInput): FileLocations;
|
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
export declare const PALETTE: {
|
|
2
|
-
readonly accent: "#1773EB";
|
|
3
|
-
readonly heading: "#FFFFFF";
|
|
4
|
-
readonly success: "#00C459";
|
|
5
|
-
readonly error: "#E44F20";
|
|
6
|
-
readonly warning: "#FFDA00";
|
|
7
|
-
readonly muted: "#A6B5C7";
|
|
8
|
-
readonly border: "#C4D1DE";
|
|
9
|
-
};
|
|
10
1
|
export declare function brandBar(width: number, ramp?: readonly string[]): {
|
|
11
2
|
text: string;
|
|
12
3
|
color: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function resolveUserPath(raw: string): string;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
2
|
+
interface ErrorStepProps {
|
|
3
3
|
stepName: string;
|
|
4
4
|
message: string;
|
|
5
5
|
onExit: () => void;
|
|
6
6
|
onRetryCredentials?: () => void;
|
|
7
7
|
onAcknowledgeBreakingChanges?: () => void;
|
|
8
|
-
}
|
|
8
|
+
}
|
|
9
9
|
export declare function ErrorStep({ stepName, message, onExit, onRetryCredentials, onAcknowledgeBreakingChanges, }: ErrorStepProps): React.ReactElement;
|
|
10
10
|
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
interface Key {
|
|
2
|
+
return: boolean;
|
|
3
|
+
escape: boolean;
|
|
4
|
+
}
|
|
5
|
+
export type ErrorAction = 'exit' | 'retry' | 'acknowledge' | null;
|
|
6
|
+
interface Available {
|
|
7
|
+
canRetry: boolean;
|
|
8
|
+
canAcknowledge: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare function errorAction(input: string, key: Key, available: Available): ErrorAction;
|
|
11
|
+
export declare function errorControls(available: Available): {
|
|
12
|
+
keys: string;
|
|
13
|
+
label: string;
|
|
14
|
+
}[];
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type StepHeaderProps } from '@tui/shared/components/StepHeader.js';
|
|
3
|
+
interface GateStepProps {
|
|
4
|
+
message: string;
|
|
5
|
+
onContinue: () => void;
|
|
6
|
+
onQuit: () => void;
|
|
7
|
+
summary?: string;
|
|
8
|
+
context?: string;
|
|
9
|
+
continueLabel?: string;
|
|
10
|
+
skipLabel?: string;
|
|
11
|
+
onSkip?: () => void;
|
|
12
|
+
intent?: 'success' | 'error';
|
|
13
|
+
step?: StepHeaderProps['step'];
|
|
14
|
+
}
|
|
15
|
+
export declare function GateStep({ message, onContinue, onQuit, summary, context, continueLabel, skipLabel, onSkip, intent, step, }: GateStepProps): React.ReactElement;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
interface Key {
|
|
2
|
+
return: boolean;
|
|
3
|
+
escape: boolean;
|
|
4
|
+
}
|
|
5
|
+
export type GateAction = 'continue' | 'skip' | 'quit' | null;
|
|
6
|
+
export declare function gateAction(input: string, key: Key, canSkip: boolean): GateAction;
|
|
7
|
+
export declare function gateControls(continueLabel: string, skipLabel: string, canSkip: boolean): {
|
|
8
|
+
keys: string;
|
|
9
|
+
label: string;
|
|
10
|
+
}[];
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface OverviewStep {
|
|
3
|
+
description: string;
|
|
4
|
+
/** Whether the step uses the user's local AI agent. */
|
|
5
|
+
ai: boolean;
|
|
6
|
+
}
|
|
7
|
+
/** The framed list of the steps an import goes through, with the AI disclosure under it. Shown by the intro screens. */
|
|
8
|
+
export declare function OverviewBox({ steps }: {
|
|
9
|
+
steps: readonly OverviewStep[];
|
|
10
|
+
}): React.ReactElement;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface Progress {
|
|
2
|
+
done: number;
|
|
3
|
+
total: number;
|
|
4
|
+
}
|
|
5
|
+
export interface RunningLine {
|
|
6
|
+
text: string;
|
|
7
|
+
complete?: boolean;
|
|
8
|
+
progress?: Progress;
|
|
9
|
+
}
|
|
10
|
+
export declare function progressPercent(progress: Progress): number;
|
|
11
|
+
export declare function formatElapsed(totalSeconds: number): string;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type RunningLine } from './logic.js';
|
|
3
|
+
import type { ImportStepId } from '@tui/shared/components/StepHeader.js';
|
|
4
|
+
interface RunningStepProps {
|
|
5
|
+
step: ImportStepId;
|
|
6
|
+
description: string;
|
|
7
|
+
lines?: readonly RunningLine[];
|
|
8
|
+
}
|
|
9
|
+
export declare function RunningStep({ step, description, lines, }: RunningStepProps): React.ReactElement;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useElapsed(): string;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type ImportTarget } from './logic.js';
|
|
2
|
+
export declare const PREFLIGHT_CONTROLS: readonly [{
|
|
3
|
+
readonly keys: "↑/↓";
|
|
4
|
+
readonly label: "Choose";
|
|
5
|
+
}, {
|
|
6
|
+
readonly keys: "Enter";
|
|
7
|
+
readonly label: "Continue";
|
|
8
|
+
}, {
|
|
9
|
+
readonly keys: "Esc";
|
|
10
|
+
readonly label: "Back to menu";
|
|
11
|
+
}];
|
|
12
|
+
export declare function usePreflightControls(handlers: {
|
|
13
|
+
focus: number;
|
|
14
|
+
onFocus: (focus: number) => void;
|
|
15
|
+
onChoose: (target: ImportTarget) => void;
|
|
16
|
+
onQuit: () => void;
|
|
17
|
+
}): void;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { OverviewStep } from '../../shared/index.js';
|
|
2
|
+
export type ImportTarget = 'both' | 'tokens' | 'components';
|
|
3
|
+
export declare const IMPORT_TARGET_OPTIONS: ReadonlyArray<{
|
|
4
|
+
target: ImportTarget;
|
|
5
|
+
label: string;
|
|
6
|
+
}>;
|
|
7
|
+
export declare function overviewFor(target: ImportTarget): readonly OverviewStep[];
|
|
8
|
+
export type ImportStepId = 'project' | 'token-file' | 'path-validation' | 'credentials' | 'component-extraction' | 'token-generation' | 'scope-gate' | 'generation' | 'review' | 'save-push';
|
|
9
|
+
export declare function stepsFor(target: ImportTarget): readonly ImportStepId[];
|
|
10
|
+
export interface InputAnswers {
|
|
11
|
+
projectPath?: string;
|
|
12
|
+
tokensPath?: string;
|
|
13
|
+
scannedFiles?: string[];
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* The input screen to show: the first step of this mode whose answer is still missing, or 'credentials' once every
|
|
17
|
+
* earlier one is answered. A mode never shows a screen it does not list, so skipping one needs no special case.
|
|
18
|
+
*/
|
|
19
|
+
export declare function currentInputStep(target: ImportTarget, answers: InputAnswers): Extract<ImportStepId, 'project' | 'token-file' | 'path-validation' | 'credentials'>;
|
|
20
|
+
/**
|
|
21
|
+
* What Back from `current` does: leave for the preflight when it is the first screen of the mode, otherwise clear the
|
|
22
|
+
* previous step's answer so that screen shows again.
|
|
23
|
+
*/
|
|
24
|
+
export declare function goBack(target: ImportTarget, current: ImportStepId, answers: InputAnswers): {
|
|
25
|
+
to: 'preflight';
|
|
26
|
+
} | {
|
|
27
|
+
to: 'step';
|
|
28
|
+
answers: InputAnswers;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Where a run writes its files when it has no project to put them in: the Root Project Directory setting if there is
|
|
32
|
+
* one, otherwise the folder the token file is in. Components runs always have a project and use it.
|
|
33
|
+
*/
|
|
34
|
+
export declare function runBaseDir(input: {
|
|
35
|
+
projectPath?: string;
|
|
36
|
+
tokensPath?: string;
|
|
37
|
+
configuredBaseDir?: string;
|
|
38
|
+
}): string;
|
|
39
|
+
interface FocusKey {
|
|
40
|
+
upArrow: boolean;
|
|
41
|
+
downArrow: boolean;
|
|
42
|
+
}
|
|
43
|
+
/** The option focused after a key: arrows move through the list and wrap around. */
|
|
44
|
+
export declare function moveFocus(focus: number, key: FocusKey, count: number): number;
|
|
45
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type ImportTarget } from './logic.js';
|
|
3
|
+
interface PreflightScreenProps {
|
|
4
|
+
onChoose: (target: ImportTarget) => void;
|
|
5
|
+
onQuit: () => void;
|
|
6
|
+
}
|
|
7
|
+
export declare function PreflightScreen({ onChoose, onQuit }: PreflightScreenProps): React.ReactElement;
|
|
8
|
+
export {};
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
export declare const WELCOME_CONTROLS: readonly [{
|
|
2
2
|
readonly keys: "Enter";
|
|
3
3
|
readonly label: "Continue";
|
|
4
|
+
}, {
|
|
5
|
+
readonly keys: "Ctrl+D";
|
|
6
|
+
readonly label: "Clear";
|
|
4
7
|
}, {
|
|
5
8
|
readonly keys: "Esc";
|
|
6
|
-
readonly label: "Back
|
|
9
|
+
readonly label: "Back";
|
|
7
10
|
}];
|
|
8
11
|
export declare function useWelcomeControls(onQuit: () => void): void;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type PathPhase } from './logic.js';
|
|
2
|
+
interface Control {
|
|
3
|
+
keys: string;
|
|
4
|
+
label: string;
|
|
5
|
+
}
|
|
6
|
+
interface PathValidationHandlers {
|
|
7
|
+
onConfirm: () => void;
|
|
8
|
+
onChangePath: () => void;
|
|
9
|
+
onBack: () => void;
|
|
10
|
+
}
|
|
11
|
+
export declare function controlsFor(phase: PathPhase): readonly Control[];
|
|
12
|
+
export declare function usePathValidationControls(phase: PathPhase, handlers: PathValidationHandlers): void;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
type FileCategory = 'tsx' | 'ts' | 'vue' | 'astro' | 'jsx' | 'js' | 'json' | 'other';
|
|
2
|
+
export type FileCounts = Record<FileCategory, number> & {
|
|
3
|
+
total: number;
|
|
4
|
+
};
|
|
5
|
+
export type ScanFailureCode = 'not-found' | 'permission-denied' | 'is-file' | 'not-directory' | 'unreadable';
|
|
6
|
+
export type ScanResult = {
|
|
7
|
+
ok: true;
|
|
8
|
+
counts: FileCounts;
|
|
9
|
+
filePaths: string[];
|
|
10
|
+
warnings: string[];
|
|
11
|
+
} | {
|
|
12
|
+
ok: false;
|
|
13
|
+
failure: ScanFailureCode;
|
|
14
|
+
};
|
|
15
|
+
export type PathPhase = 'scanning' | 'ready' | 'failed';
|
|
16
|
+
export type KeyAction = 'confirm' | 'change-path' | 'back';
|
|
17
|
+
export interface SummaryRow {
|
|
18
|
+
label: string;
|
|
19
|
+
count: number;
|
|
20
|
+
tone: 'default' | 'accent' | 'muted';
|
|
21
|
+
}
|
|
22
|
+
export interface Summary {
|
|
23
|
+
total: number;
|
|
24
|
+
rows: SummaryRow[];
|
|
25
|
+
warning?: string;
|
|
26
|
+
}
|
|
27
|
+
export interface FailureMessage {
|
|
28
|
+
headline: string;
|
|
29
|
+
hints: string[];
|
|
30
|
+
}
|
|
31
|
+
interface Key {
|
|
32
|
+
escape: boolean;
|
|
33
|
+
return: boolean;
|
|
34
|
+
}
|
|
35
|
+
export declare function describeFailure(failure: ScanFailureCode, path: string): FailureMessage;
|
|
36
|
+
/**
|
|
37
|
+
* The scan result as rows and a warning. When the import does not generate tokens (components only), `.json` files are
|
|
38
|
+
* not design tokens here, so the row says they are ignored and the warnings do not mention tokens.
|
|
39
|
+
*/
|
|
40
|
+
export declare function summarize(counts: FileCounts, { hasTokens }?: {
|
|
41
|
+
hasTokens?: boolean;
|
|
42
|
+
}): Summary;
|
|
43
|
+
export declare function phaseOf(scan: ScanResult | undefined): PathPhase;
|
|
44
|
+
export declare function keyAction(phase: PathPhase, input: string, key: Key): KeyAction | undefined;
|
|
45
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface PathValidationScreenProps {
|
|
3
|
+
projectPath: string;
|
|
4
|
+
onConfirm: (result: {
|
|
5
|
+
projectPath: string;
|
|
6
|
+
filePaths: string[];
|
|
7
|
+
}) => void;
|
|
8
|
+
onChangePath: () => void;
|
|
9
|
+
onBack: () => void;
|
|
10
|
+
/** False when the import does not generate tokens, so `.json` files are not described as design tokens. */
|
|
11
|
+
hasTokens?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare function PathValidationScreen({ projectPath, onConfirm, onChangePath, onBack, hasTokens, }: PathValidationScreenProps): React.ReactElement;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
declare const FIELDS: readonly ["spaceId", "environmentId", "cmaToken", "host"];
|
|
2
|
+
export type CredentialField = (typeof FIELDS)[number];
|
|
3
|
+
export type CredentialValues = Record<CredentialField, string>;
|
|
4
|
+
/**
|
|
5
|
+
* Why the space is asked for. Components are looked up in it before they are generated, so that is part of the reason
|
|
6
|
+
* unless the import only generates tokens, which has nothing to look up.
|
|
7
|
+
*/
|
|
8
|
+
export declare function credentialsPurpose(tokensOnly: boolean): string;
|
|
9
|
+
export declare function normalize(values: CredentialValues): CredentialValues;
|
|
10
|
+
export declare function missingField(values: CredentialValues): boolean;
|
|
11
|
+
export declare function isUnchanged(current: CredentialValues, initial: CredentialValues): boolean;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type CredentialValues } from './logic.js';
|
|
3
|
+
import { type ValidationResult } from './validate.js';
|
|
4
|
+
export type CredentialsResult = {
|
|
5
|
+
skipped: false;
|
|
6
|
+
credentials: CredentialValues;
|
|
7
|
+
} | {
|
|
8
|
+
skipped: true;
|
|
9
|
+
};
|
|
10
|
+
interface CredentialsScreenProps {
|
|
11
|
+
onDone: (result: CredentialsResult) => void;
|
|
12
|
+
onBack: () => void;
|
|
13
|
+
initial?: Partial<CredentialValues>;
|
|
14
|
+
validate?: (values: CredentialValues) => Promise<ValidationResult>;
|
|
15
|
+
/** The import only generates tokens, so there are no components to look up in the space. */
|
|
16
|
+
tokensOnly?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export declare function CredentialsScreen({ onDone, onBack, initial, validate, tokensOnly, }: CredentialsScreenProps): React.ReactElement;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function findSkillPath(fileName: string): string;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { ExtractAndComposeProgress } from '@contentful/experience-design-system-backend-pipeline';
|
|
2
|
+
import type { ExtractionProgress } from './types.js';
|
|
3
|
+
/** Structured progress events emitted by the orchestrator (extraction + composition). */
|
|
4
|
+
export type ProgressEvent = ExtractAndComposeProgress;
|
|
5
|
+
/**
|
|
6
|
+
* Every job the stage will run starts on the first frame, so no row appears later as a surprise. A job that does not
|
|
7
|
+
* apply stays 'idle' and has no row: existing entities need credentials, and token definitions need a raw tokens file.
|
|
8
|
+
*/
|
|
9
|
+
export declare function initialProgress(input: {
|
|
10
|
+
hasCredentials: boolean;
|
|
11
|
+
hasRawTokens: boolean;
|
|
12
|
+
}): ExtractionProgress;
|
|
13
|
+
export declare function applyProgressEvent(progress: ExtractionProgress, event: ProgressEvent): ExtractionProgress;
|
|
14
|
+
/** The rows the screen shows, in the order the wizard showed them. Rows that do not apply are left out. */
|
|
15
|
+
export declare function progressRows(progress: ExtractionProgress, agent: string): Array<{
|
|
16
|
+
text: string;
|
|
17
|
+
complete: boolean;
|
|
18
|
+
}>;
|
|
19
|
+
/** True when every job is already done, so the screen would only flash. The wizard shows nothing in this case. */
|
|
20
|
+
export declare function isFullCacheHit(progress: ExtractionProgress): boolean;
|
|
21
|
+
export declare function noComponentsMessage(projectPath: string): string;
|
|
22
|
+
export declare function agentAuthMessage(agent: string, status: 'not-found' | 'unauthenticated'): string;
|
|
23
|
+
/**
|
|
24
|
+
* The agent and model the import runs with: what was typed after `--agent` (either `agent` or `agent:model`), else
|
|
25
|
+
* what `experiences setup` saved, else Claude with no model. Same chain the legacy import command uses.
|
|
26
|
+
*/
|
|
27
|
+
export declare function resolveAgentChoice(flag: string | undefined, stored: {
|
|
28
|
+
agent?: unknown;
|
|
29
|
+
agentModel?: unknown;
|
|
30
|
+
}): {
|
|
31
|
+
agent: string;
|
|
32
|
+
agentModel?: string;
|
|
33
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { checkAgentAuth, runGenerateTokensSession } from '@contentful/experience-design-system-backend-pipeline';
|
|
2
|
+
export interface TokensOnlyInput {
|
|
3
|
+
rawTokensPath: string;
|
|
4
|
+
/** Where tokens.json is written: this import run's folder. */
|
|
5
|
+
outDir: string;
|
|
6
|
+
agent: string;
|
|
7
|
+
agentModel?: string;
|
|
8
|
+
promptOverrides: string[];
|
|
9
|
+
noCache: boolean;
|
|
10
|
+
}
|
|
11
|
+
export type TokensOnlyResult = {
|
|
12
|
+
ok: true;
|
|
13
|
+
tokensPath: string;
|
|
14
|
+
tokenSessionId: string | null;
|
|
15
|
+
tokenCount: number;
|
|
16
|
+
} | {
|
|
17
|
+
ok: false;
|
|
18
|
+
step: 'generate tokens' | `${string} auth check`;
|
|
19
|
+
message: string;
|
|
20
|
+
};
|
|
21
|
+
/** The outside world the stage talks to, so it can be tested without an agent. */
|
|
22
|
+
export interface TokensOnlyDeps {
|
|
23
|
+
checkAgentAuth: typeof checkAgentAuth;
|
|
24
|
+
runGenerateTokensSession: typeof runGenerateTokensSession;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* The extraction stage for an import that only generates tokens: the same auth check and token generation the full stage
|
|
28
|
+
* runs, without scanning components, composing them or selecting. The full stage fails when it finds no components, so it
|
|
29
|
+
* cannot be used for this.
|
|
30
|
+
*/
|
|
31
|
+
export declare function runTokensOnly(input: TokensOnlyInput, deps?: TokensOnlyDeps): Promise<TokensOnlyResult>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { checkAgentAuth, runExtractAndComposeSession, runGenerateTokensSession } from '@contentful/experience-design-system-backend-pipeline';
|
|
2
|
+
import { runSelection } from './selection.js';
|
|
3
|
+
import type { ExtractionInput, ExtractionProgress, ExtractionResult } from './types.js';
|
|
4
|
+
/** The outside world the stage talks to, so the order of events can be tested without a network, an agent or a CLI. */
|
|
5
|
+
export interface ExtractionDeps {
|
|
6
|
+
checkAgentAuth: typeof checkAgentAuth;
|
|
7
|
+
fetchEntities: (credentials: NonNullable<ExtractionInput['credentials']>, outDir: string) => Promise<string | null>;
|
|
8
|
+
runExtractAndComposeSession: typeof runExtractAndComposeSession;
|
|
9
|
+
runGenerateTokensSession: typeof runGenerateTokensSession;
|
|
10
|
+
runSelection: typeof runSelection;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Runs the stage. The jobs overlap exactly as they did when extract was a
|
|
14
|
+
* subprocess:
|
|
15
|
+
*
|
|
16
|
+
* entities fetch ───────────────────┐
|
|
17
|
+
* extract + compose (in-process) │
|
|
18
|
+
* └─ onSessionCreated(id) ────────┴─ selection agent (waits for fetch) ──┐
|
|
19
|
+
* └──────────────────────── returns (composition done) ─────────────────┴─ result
|
|
20
|
+
* token generation (only when the tokens are not being reused)
|
|
21
|
+
*
|
|
22
|
+
* Selection starts the moment the orchestrator mints the sessionId, so it
|
|
23
|
+
* overlaps with composition. When more than one job fails, the error reported
|
|
24
|
+
* is the first of: extract, no components, selection, token generation.
|
|
25
|
+
*/
|
|
26
|
+
export declare function runExtraction(input: ExtractionInput, onProgress: (progress: ExtractionProgress) => void, deps?: ExtractionDeps): Promise<ExtractionResult>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ExtractionProgress } from './types.js';
|
|
3
|
+
interface ExtractionScreenProps {
|
|
4
|
+
progress: ExtractionProgress;
|
|
5
|
+
agent: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function ExtractionScreen({ progress, agent }: ExtractionScreenProps): React.ReactElement;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type AgentName } from '@contentful/experience-design-system-backend-pipeline';
|
|
2
|
+
export interface SelectionOptions {
|
|
3
|
+
sessionId: string;
|
|
4
|
+
agent: AgentName;
|
|
5
|
+
model?: string;
|
|
6
|
+
promptText?: string;
|
|
7
|
+
promptPath?: string;
|
|
8
|
+
noCache: boolean;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* The selection agent run, as the legacy wizard ran it.
|
|
12
|
+
*
|
|
13
|
+
* Reads the extracted components from the session database and skips the ones already decided (cache keyed by
|
|
14
|
+
* component hash, prompt hash and CLI version). It asks the agent about the rest, then writes accepted or rejected to
|
|
15
|
+
* raw_components and stores the new decisions in the cache in one transaction. Throws on a timeout, a non-zero exit,
|
|
16
|
+
* or a database error.
|
|
17
|
+
*/
|
|
18
|
+
export declare function runSelection(options: SelectionOptions): Promise<void>;
|