@contentful/experience-design-system-cli 2.38.1-dev-build-6d903339.0 → 2.38.1-dev-build-962dbe22.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 +2 -1
- package/dist/app.js +5778 -3809
- package/dist/index.js +13842 -12466
- package/dist/package.json +1 -1
- package/dist/src/commands/import-options.d.ts +0 -2
- 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 -8
- package/dist/src/tui/import/shared/gate-step/gate-step.d.ts +3 -1
- package/dist/src/tui/import/shared/index.d.ts +1 -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 +0 -1
- package/dist/src/tui/import/shared/running-step/running-step.d.ts +3 -4
- 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/helpers/scan-files.d.ts +1 -9
- package/dist/src/tui/import/steps/03-path-validation/logic.d.ts +7 -5
- package/dist/src/tui/import/steps/03-path-validation/screen.d.ts +3 -1
- package/dist/src/tui/import/steps/04-credentials/logic.d.ts +6 -9
- package/dist/src/tui/import/steps/04-credentials/screen.d.ts +3 -1
- package/dist/src/tui/import/steps/06-extraction/logic.d.ts +1 -16
- package/dist/src/tui/import/steps/06-extraction/run-tokens-only.d.ts +31 -0
- package/dist/src/tui/import/steps/06-extraction/screen.d.ts +1 -3
- package/dist/src/tui/import/steps/06-extraction/types.d.ts +4 -5
- 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 +0 -7
- package/dist/src/tui/import/steps/07-scope-gate/columns.d.ts +0 -2
- package/dist/src/tui/import/steps/07-scope-gate/graph/fuzzy-search.d.ts +0 -2
- package/dist/src/tui/import/steps/07-scope-gate/graph/lineage.d.ts +0 -22
- package/dist/src/tui/import/steps/07-scope-gate/sidebar/ai-flag.d.ts +0 -1
- package/dist/src/tui/import/steps/07-scope-gate/sidebar/components/GroupedSidebar.d.ts +1 -33
- package/dist/src/tui/import/steps/07-scope-gate/sidebar/components/windowed-panel.d.ts +4 -0
- package/dist/src/tui/import/steps/07-scope-gate/sidebar/lineage-layout.d.ts +0 -36
- package/dist/src/tui/import/steps/07-scope-gate/sidebar/step-filters.d.ts +4 -0
- package/dist/src/tui/import/steps/07-scope-gate/use-scope-gate.d.ts +1 -0
- package/dist/src/tui/import/steps/08-generation/logic.d.ts +0 -4
- package/dist/src/tui/import/steps/08-generation/run.d.ts +0 -10
- package/dist/src/tui/import/steps/08-generation/screen.d.ts +1 -3
- package/dist/src/tui/import/steps/09-review/components/FieldEditor.d.ts +1 -18
- package/dist/src/tui/import/steps/09-review/components/ReviewDialogs.d.ts +0 -14
- package/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 +1 -22
- package/dist/src/tui/import/steps/09-review/helpers/cycle-panel-scroll.d.ts +0 -4
- package/dist/src/tui/import/steps/09-review/run-live-preview.d.ts +0 -3
- package/dist/src/tui/import/steps/09-review/use-finalize-preview.d.ts +1 -11
- package/dist/src/tui/import/steps/10-flow/flow/build-flow-start.d.ts +1 -0
- package/dist/src/tui/import/steps/10-flow/flow/controller.d.ts +14 -8
- package/dist/src/tui/import/steps/10-flow/flow/preview.d.ts +3 -15
- package/dist/src/tui/import/steps/10-flow/flow/push.d.ts +2 -0
- package/dist/src/tui/import/steps/10-flow/flow/save.d.ts +1 -10
- package/dist/src/tui/import/steps/10-flow/flow/screen.d.ts +0 -4
- package/dist/src/tui/import/steps/10-flow/flow/use-flow.d.ts +4 -1
- package/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 +3 -3
- package/dist/src/tui/import/steps/10-flow/screens/WizardPreviewStep.d.ts +1 -9
- package/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 +2 -5
- package/dist/src/tui/import/steps/10-flow/support/produced.d.ts +15 -0
- package/dist/src/tui/import/steps/index.d.ts +1 -1
- package/dist/src/tui/import/steps/preview-validation-error/logic.d.ts +0 -3
- 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/package.json +3 -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/steps/04-credentials/controls.d.ts +0 -21
- package/dist/src/tui/import/steps/05-token-reuse/logic.d.ts +0 -21
- package/dist/src/tui/import/steps/05-token-reuse/screen.d.ts +0 -10
- package/dist/src/tui/import/steps/07-scope-gate/sidebar/components/LegendEntry.d.ts +0 -2
- package/dist/src/tui/import/steps/07-scope-gate/sidebar/theme.d.ts +0 -8
- package/dist/src/tui/import/steps/09-review/theme.d.ts +0 -9
- package/dist/src/tui/import/steps/10-flow/components/StepHeader.d.ts +0 -8
- package/dist/src/tui/import/steps/10-flow/theme.d.ts +0 -13
- package/dist/src/tui/upgrade/PageContainer.d.ts +0 -4
- package/legacy/bin/cli.js +0 -58
- package/legacy/dist/package.json +0 -76
- 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/composite-closure.d.ts +0 -26
- 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/cycle-detection.d.ts +0 -27
- 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/issue-inheritance.d.ts +0 -8
- package/legacy/dist/src/analyze/lineage.d.ts +0 -29
- package/legacy/dist/src/analyze/search-neighborhood.d.ts +0 -3
- 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/preview-annotations.d.ts +0 -26
- 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/ComponentRationalePanel.d.ts +0 -10
- package/legacy/dist/src/analyze/select/tui/components/FieldEditor.d.ts +0 -67
- package/legacy/dist/src/analyze/select/tui/components/FinalizeDialog.d.ts +0 -22
- package/legacy/dist/src/analyze/select/tui/components/GotoBanner.d.ts +0 -31
- package/legacy/dist/src/analyze/select/tui/components/GroupedSidebar.d.ts +0 -94
- package/legacy/dist/src/analyze/select/tui/components/HelpOverlay.d.ts +0 -21
- package/legacy/dist/src/analyze/select/tui/components/HighlightedLine.d.ts +0 -9
- package/legacy/dist/src/analyze/select/tui/components/JsonEditor.d.ts +0 -10
- package/legacy/dist/src/analyze/select/tui/components/JsonPanel.d.ts +0 -11
- package/legacy/dist/src/analyze/select/tui/components/PreviewSummaryBar.d.ts +0 -8
- package/legacy/dist/src/analyze/select/tui/components/QuitDialog.d.ts +0 -8
- package/legacy/dist/src/analyze/select/tui/components/RationaleLine.d.ts +0 -21
- package/legacy/dist/src/analyze/select/tui/components/RationalePanel.d.ts +0 -15
- package/legacy/dist/src/analyze/select/tui/components/ScrollablePanel.d.ts +0 -14
- 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/TokenReviewPanel.d.ts +0 -30
- package/legacy/dist/src/analyze/select/tui/components/TopBar.d.ts +0 -10
- package/legacy/dist/src/analyze/select/tui/components/removed-components-text.d.ts +0 -7
- package/legacy/dist/src/analyze/select/tui/components/wrap-text.d.ts +0 -1
- package/legacy/dist/src/analyze/select/tui/hooks/list-scroll-input.d.ts +0 -13
- package/legacy/dist/src/analyze/select/tui/hooks/scroll-offset.d.ts +0 -30
- package/legacy/dist/src/analyze/select/tui/hooks/useImmediateInput.d.ts +0 -19
- 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/analyze/selection-cascade.d.ts +0 -3
- package/legacy/dist/src/analyze/slot-graph.d.ts +0 -11
- 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/index.d.ts +0 -1
- package/legacy/dist/src/index.js +0 -25001
- 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/contentful-urls.d.ts +0 -15
- 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/tui/use-terminal-size.d.ts +0 -6
- package/legacy/dist/src/tui/windowed-panel.d.ts +0 -37
- package/legacy/dist/src/types.d.ts +0 -2
- package/legacy/package.json +0 -85
- package/legacy/prompts/composition-edges.md +0 -11
- package/legacy/skills/generate-components.md +0 -612
- package/legacy/skills/generate-tokens.md +0 -194
- package/legacy/skills/map-tokens.md +0 -102
- package/legacy/skills/select-components.md +0 -235
- /package/dist/src/tui/{upgrade → home}/version.d.ts +0 -0
- /package/dist/src/tui/settings/{utils → shared}/v1-store.d.ts +0 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { AgentConfig } from './agent-store.js';
|
|
2
|
+
/**
|
|
3
|
+
* The pipeline picks an agent's binary from `EDS_AGENT_BINARY_<AGENT>` and nowhere else. This copies each saved
|
|
4
|
+
* `agents.<name>.binary` into that variable, so the saved path reaches every place that spawns an agent (the import,
|
|
5
|
+
* the generation package and the legacy commands) without touching their call sites.
|
|
6
|
+
*
|
|
7
|
+
* Called once at startup, and again after Settings saves a binary so a change applies without a restart.
|
|
8
|
+
*
|
|
9
|
+
* Settings wins over a variable already in the shell, so a forgotten `EDS_AGENT_BINARY_CLAUDE` cannot silently override
|
|
10
|
+
* what the user sees on screen. An agent with no saved path leaves the shell's variable alone, and clearing a path
|
|
11
|
+
* puts the shell's value back.
|
|
12
|
+
*/
|
|
13
|
+
export declare function applyBinaryOverrides(config: AgentConfig): void;
|
|
@@ -1,5 +1,11 @@
|
|
|
1
|
+
/** How long a debug log is kept before the CLI deletes it. Only these values are offered. */
|
|
2
|
+
export declare const RETENTION_CHOICES: readonly [7, 14, 30];
|
|
3
|
+
type RetentionDays = (typeof RETENTION_CHOICES)[number];
|
|
1
4
|
export type DebugModeSetting = {
|
|
2
5
|
enabled: boolean;
|
|
6
|
+
retentionDays: RetentionDays;
|
|
3
7
|
};
|
|
4
8
|
export declare function readDebugModeSetting(): Promise<DebugModeSetting>;
|
|
5
|
-
|
|
9
|
+
/** Saves the given fields and keeps the others, so turning logging off does not forget the retention. */
|
|
10
|
+
export declare function writeDebugModeSetting(change: Partial<DebugModeSetting>): Promise<void>;
|
|
11
|
+
export {};
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Settings > Debug Mode. Logging is switched with Enter. The retention is chosen with ←/→, which only moves a highlight:
|
|
4
|
+
* nothing is saved until Enter, and then the screen says so.
|
|
5
|
+
*/
|
|
2
6
|
export declare function DebugModeScreen({ onDone }: {
|
|
3
7
|
onDone: () => void;
|
|
4
8
|
}): React.ReactElement;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/** One screen's values, as flat text, taken when the screen opens and again when it closes. */
|
|
2
|
+
export type Snapshot = Record<string, string>;
|
|
3
|
+
export type Change = {
|
|
4
|
+
changed: boolean;
|
|
5
|
+
/** Field names that differ between the two snapshots, in the order the fields appear. Never the values. */
|
|
6
|
+
changed_fields: string[];
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Compares the snapshot taken on entry with the one taken on exit. A field that exists in only one of them counts as
|
|
10
|
+
* changed. Only names are returned, so the result can be logged without repeating a secret.
|
|
11
|
+
*/
|
|
12
|
+
export declare function diffSnapshots(before: Snapshot, after: Snapshot): Change;
|
|
13
|
+
export type Trail = {
|
|
14
|
+
/** Adds one action, such as `edited spaceId`, `saved`, or `made Codex the default`. Field names, never values. */
|
|
15
|
+
record(action: string): void;
|
|
16
|
+
/** The recorded actions in order, oldest first. Once the limit is passed the oldest are dropped. */
|
|
17
|
+
entries(): string[];
|
|
18
|
+
};
|
|
19
|
+
/** Keeps the last `limit` actions of a visit, so a long visit cannot make the log grow without bound. */
|
|
20
|
+
export declare function createTrail(limit?: number): Trail;
|
|
21
|
+
/**
|
|
22
|
+
* The message of a failed load or save, safe to log: any of `secrets` that appears in it is replaced. The CMA token is
|
|
23
|
+
* only redacted by key elsewhere, so an error that quotes it would otherwise get through. A secret is matched as it is
|
|
24
|
+
* and as it looks URL-encoded, which is how it appears in a request error.
|
|
25
|
+
*/
|
|
26
|
+
export declare function scrubError(error: unknown, secrets: readonly string[]): string;
|
|
27
|
+
/**
|
|
28
|
+
* Where Project's settings live and what could be moving them: the settings file path, whether `EDS_HOME` relocated it,
|
|
29
|
+
* and whether the file exists. Facts for the log, with no values read from the file.
|
|
30
|
+
*/
|
|
31
|
+
export declare function describeSettingsFile(): {
|
|
32
|
+
path: string;
|
|
33
|
+
eds_home_set: boolean;
|
|
34
|
+
exists: boolean;
|
|
35
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import TextInput from 'ink-text-input';
|
|
3
|
+
export declare function isClearKey(input: string, key: {
|
|
4
|
+
ctrl: boolean;
|
|
5
|
+
}): boolean;
|
|
6
|
+
export declare function ClearableTextInput({ onChange, ...props }: React.ComponentProps<typeof TextInput>): React.ReactElement;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface FormField<K extends string> {
|
|
3
|
+
key: K;
|
|
4
|
+
label: string;
|
|
5
|
+
/** A short note shown dimmed after the value, so the label column stays narrow. */
|
|
6
|
+
hint?: string;
|
|
7
|
+
/** Shows dots instead of the value, for secrets. */
|
|
8
|
+
masked?: boolean;
|
|
9
|
+
}
|
|
10
|
+
/** A row after the fields that Enter runs instead of opening for editing, such as "Run test". */
|
|
11
|
+
export interface FormAction {
|
|
12
|
+
label: string;
|
|
13
|
+
/** What running it does, shown dimmed after the label. */
|
|
14
|
+
description: string;
|
|
15
|
+
/** Shown instead of the description while it runs. */
|
|
16
|
+
runningText?: string;
|
|
17
|
+
running?: boolean;
|
|
18
|
+
/** The control hint for Enter while this row is focused. */
|
|
19
|
+
hint: string;
|
|
20
|
+
onRun: () => void;
|
|
21
|
+
}
|
|
22
|
+
export type FormNotice = {
|
|
23
|
+
kind: 'success' | 'error';
|
|
24
|
+
text: string;
|
|
25
|
+
};
|
|
26
|
+
interface FieldFormProps<K extends string> {
|
|
27
|
+
/** Shown above the form, outside its padding, such as the import's step header. */
|
|
28
|
+
header?: React.ReactNode;
|
|
29
|
+
title: string;
|
|
30
|
+
/** What this form is for, shown dimmed under the title. */
|
|
31
|
+
subtitle?: string;
|
|
32
|
+
fields: readonly FormField<K>[];
|
|
33
|
+
values: Record<K, string>;
|
|
34
|
+
onChange: (key: K, value: string) => void;
|
|
35
|
+
onSave: () => void;
|
|
36
|
+
saveLabel?: string;
|
|
37
|
+
enterAdvances?: boolean;
|
|
38
|
+
onSkip?: () => void;
|
|
39
|
+
skipLabel?: string;
|
|
40
|
+
/** Leaves without saving. */
|
|
41
|
+
onQuit: () => void;
|
|
42
|
+
/** What Esc does, in the control hints. */
|
|
43
|
+
quitLabel?: string;
|
|
44
|
+
/** Rows after the fields that are run, not edited. They share the cursor with the fields. */
|
|
45
|
+
actions?: readonly FormAction[];
|
|
46
|
+
notice?: FormNotice | null;
|
|
47
|
+
/** Ignores keys while a load or save is in flight. */
|
|
48
|
+
busy?: boolean;
|
|
49
|
+
/** Shown after the rows and the notice, for read-only content that belongs to the same screen. */
|
|
50
|
+
children?: React.ReactNode;
|
|
51
|
+
}
|
|
52
|
+
/** The widest label among a form's rows. The form pads every label to it, and read-only rows use it to line up with them. */
|
|
53
|
+
export declare function formLabelWidth(rows: readonly {
|
|
54
|
+
label: string;
|
|
55
|
+
}[]): number;
|
|
56
|
+
/**
|
|
57
|
+
* A label and value for read-only content shown with a form. It is built the same way as the form's own rows (a pointer
|
|
58
|
+
* slot, the label padded to the shared width, then the value), so its values start in the same column as the form's.
|
|
59
|
+
*/
|
|
60
|
+
export declare function FormReadOnlyRow({ label, labelWidth, children, }: {
|
|
61
|
+
label: string;
|
|
62
|
+
labelWidth: number;
|
|
63
|
+
children: React.ReactNode;
|
|
64
|
+
}): React.ReactElement;
|
|
65
|
+
/**
|
|
66
|
+
* The edit-in-place form the Configuration pages share. Fields are read-only until Enter opens one; Enter again closes it.
|
|
67
|
+
* While one is open, keys type into it (so a "q" in a path is just a "q"), and Esc closes it and restores the old value.
|
|
68
|
+
* Actions sit after the fields and take the same cursor: Enter runs one, and `c` does nothing on it.
|
|
69
|
+
*/
|
|
70
|
+
export declare function FieldForm<K extends string>({ header, title, subtitle, fields, values, onChange, onSave, saveLabel, enterAdvances, onSkip, skipLabel, onQuit, quitLabel, actions, notice, busy, children, }: FieldFormProps<K>): React.ReactElement;
|
|
71
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare const IMPORT_STEPS: readonly [{
|
|
3
|
+
readonly id: "setup";
|
|
4
|
+
readonly label: "Setup";
|
|
5
|
+
}, {
|
|
6
|
+
readonly id: "extraction";
|
|
7
|
+
readonly label: "Extract";
|
|
8
|
+
}, {
|
|
9
|
+
readonly id: "scope-gate";
|
|
10
|
+
readonly label: "Select";
|
|
11
|
+
}, {
|
|
12
|
+
readonly id: "generation";
|
|
13
|
+
readonly label: "Generate";
|
|
14
|
+
}, {
|
|
15
|
+
readonly id: "review";
|
|
16
|
+
readonly label: "Review";
|
|
17
|
+
}, {
|
|
18
|
+
readonly id: "push";
|
|
19
|
+
readonly label: "Push";
|
|
20
|
+
}];
|
|
21
|
+
export type ImportStepId = (typeof IMPORT_STEPS)[number]['id'];
|
|
22
|
+
export interface StepHeaderProps {
|
|
23
|
+
step: ImportStepId | 'done';
|
|
24
|
+
}
|
|
25
|
+
export declare function StepHeader({ step }: StepHeaderProps): React.ReactElement;
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export type ColorMode = 'dark' | 'light';
|
|
2
|
+
export declare function detectColorMode(env?: NodeJS.ProcessEnv): ColorMode;
|
|
3
|
+
export declare const PALETTE: {
|
|
4
|
+
readonly text: "#f7f9fa";
|
|
5
|
+
readonly muted: "#aec1cc";
|
|
6
|
+
readonly border: "#aec1cc";
|
|
7
|
+
readonly accent: "#40a0ff";
|
|
8
|
+
readonly onAccent: "#111B2B";
|
|
9
|
+
readonly error: "#ff707d";
|
|
10
|
+
readonly success: "#5DB057";
|
|
11
|
+
readonly warning: "#FFC835";
|
|
12
|
+
} | {
|
|
13
|
+
readonly text: "#111B2B";
|
|
14
|
+
readonly muted: "#5A657C";
|
|
15
|
+
readonly border: "#5A657C";
|
|
16
|
+
readonly accent: "#0059c8";
|
|
17
|
+
readonly onAccent: "#FFFFFF";
|
|
18
|
+
readonly error: "#bd002a";
|
|
19
|
+
readonly success: "#006D23";
|
|
20
|
+
readonly warning: "#CC4500";
|
|
21
|
+
};
|
package/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-962dbe22.0",
|
|
4
4
|
"description": "Contentful Experiences design system import CLI",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -45,8 +45,8 @@
|
|
|
45
45
|
"ts-morph": "^27.0.2",
|
|
46
46
|
"typescript": "^5.9.3",
|
|
47
47
|
"zod": "^4.6.5",
|
|
48
|
-
"@contentful/experience-design-system-backend-pipeline": "2.38.1-dev-build-
|
|
49
|
-
"@contentful/experience-design-system-types": "2.38.1-dev-build-
|
|
48
|
+
"@contentful/experience-design-system-backend-pipeline": "2.38.1-dev-build-962dbe22.0",
|
|
49
|
+
"@contentful/experience-design-system-types": "2.38.1-dev-build-962dbe22.0"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@tsconfig/node24": "^24.0.4",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function forwardedImportArgs(argv: string[]): string[];
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function findLegacyCliPath(): string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function runLegacy(args: string[]): Promise<number>;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export declare const CREDENTIALS_CONTROLS: readonly [{
|
|
2
|
-
readonly keys: "Enter";
|
|
3
|
-
readonly label: "Next field / Continue";
|
|
4
|
-
}, {
|
|
5
|
-
readonly keys: "Tab";
|
|
6
|
-
readonly label: "Switch field";
|
|
7
|
-
}, {
|
|
8
|
-
readonly keys: "Ctrl+S";
|
|
9
|
-
readonly label: "Skip (no push)";
|
|
10
|
-
}, {
|
|
11
|
-
readonly keys: "Esc";
|
|
12
|
-
readonly label: "Back";
|
|
13
|
-
}];
|
|
14
|
-
interface CredentialsHandlers {
|
|
15
|
-
disabled: boolean;
|
|
16
|
-
onBack: () => void;
|
|
17
|
-
onNextField: () => void;
|
|
18
|
-
onSkip: () => void;
|
|
19
|
-
}
|
|
20
|
-
export declare function useCredentialsControls(handlers: CredentialsHandlers): void;
|
|
21
|
-
export {};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export type { TokenStrategy } from '../06-extraction/types.js';
|
|
2
|
-
export type TokensState = {
|
|
3
|
-
kind: 'none';
|
|
4
|
-
} | {
|
|
5
|
-
kind: 'cached';
|
|
6
|
-
tokensPath: string;
|
|
7
|
-
sourceChanged: boolean;
|
|
8
|
-
};
|
|
9
|
-
interface InspectInput {
|
|
10
|
-
rawTokensPath: string;
|
|
11
|
-
outDir: string;
|
|
12
|
-
cache: boolean;
|
|
13
|
-
}
|
|
14
|
-
export declare function inspectTokens({ rawTokensPath, outDir, cache }: InspectInput): Promise<TokensState>;
|
|
15
|
-
export declare function gateText({ tokensPath, sourceChanged }: {
|
|
16
|
-
tokensPath: string;
|
|
17
|
-
sourceChanged: boolean;
|
|
18
|
-
}): {
|
|
19
|
-
summary: string;
|
|
20
|
-
context?: string;
|
|
21
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
interface TokenReuseScreenProps {
|
|
3
|
-
tokensPath: string;
|
|
4
|
-
sourceChanged: boolean;
|
|
5
|
-
onReuse: () => void;
|
|
6
|
-
onRegenerate: () => void;
|
|
7
|
-
onQuit: () => void;
|
|
8
|
-
}
|
|
9
|
-
export declare function TokenReuseScreen({ tokensPath, sourceChanged, onReuse, onRegenerate, onQuit, }: TokenReuseScreenProps): React.ReactElement;
|
|
10
|
-
export {};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export declare const PALETTE: {
|
|
2
|
-
readonly link: "#58A6FF";
|
|
3
|
-
readonly info: "#1773EB";
|
|
4
|
-
readonly success: "#00C459";
|
|
5
|
-
readonly error: "#E44F20";
|
|
6
|
-
readonly warning: "#FFDA00";
|
|
7
|
-
readonly muted: "#8B8D91";
|
|
8
|
-
readonly border: "#C4D1DE";
|
|
9
|
-
readonly inverse: "#FFFFFF";
|
|
10
|
-
};
|
|
11
|
-
export declare const INK_UI_THEME: {
|
|
12
|
-
components: Record<string, import("@inkjs/ui").ComponentTheme>;
|
|
13
|
-
};
|
package/legacy/bin/cli.js
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
// Suppress the SQLite ExperimentalWarning before any modules load.
|
|
3
|
-
// Must use dynamic import so this handler registers before sqlite is imported.
|
|
4
|
-
process.removeAllListeners("warning");
|
|
5
|
-
process.on("warning", (w) => {
|
|
6
|
-
if (w.name === "ExperimentalWarning" && w.message.includes("SQLite")) return;
|
|
7
|
-
process.stderr.write(`${w.name}: ${w.message}\n`);
|
|
8
|
-
});
|
|
9
|
-
|
|
10
|
-
// Auto-rebuild when running from source (dev mode only).
|
|
11
|
-
// Skipped when src/ doesn't exist (e.g. npm-installed users).
|
|
12
|
-
import { existsSync, statSync, readdirSync } from "node:fs";
|
|
13
|
-
import { execFileSync } from "node:child_process";
|
|
14
|
-
import { fileURLToPath } from "node:url";
|
|
15
|
-
import { dirname, resolve, join } from "node:path";
|
|
16
|
-
|
|
17
|
-
function newestMtime(dir, depth = 0) {
|
|
18
|
-
if (depth > 10) return 0;
|
|
19
|
-
let max = 0;
|
|
20
|
-
for (const entry of readdirSync(dir, { withFileTypes: true })) {
|
|
21
|
-
if (entry.isSymbolicLink()) continue;
|
|
22
|
-
const full = join(dir, entry.name);
|
|
23
|
-
if (entry.isDirectory()) {
|
|
24
|
-
max = Math.max(max, newestMtime(full, depth + 1));
|
|
25
|
-
} else if (entry.name.endsWith(".ts") || entry.name.endsWith(".tsx")) {
|
|
26
|
-
max = Math.max(max, statSync(full).mtimeMs);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
return max;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
33
|
-
const pkgRoot = resolve(__dirname, "..");
|
|
34
|
-
const srcDir = join(pkgRoot, "src");
|
|
35
|
-
const distEntry = join(pkgRoot, "dist", "src", "index.js");
|
|
36
|
-
|
|
37
|
-
if (
|
|
38
|
-
existsSync(srcDir) &&
|
|
39
|
-
existsSync(distEntry) &&
|
|
40
|
-
process.env.NODE_ENV !== "test"
|
|
41
|
-
) {
|
|
42
|
-
const distMtime = statSync(distEntry).mtimeMs;
|
|
43
|
-
if (newestMtime(srcDir) > distMtime) {
|
|
44
|
-
process.stderr.write("⚙ Source changed — rebuilding...\n");
|
|
45
|
-
const tsc = join(pkgRoot, "node_modules", ".bin", "tsc");
|
|
46
|
-
try {
|
|
47
|
-
execFileSync(tsc, ["-p", join(pkgRoot, "tsconfig.build.json")], {
|
|
48
|
-
stdio: ["ignore", "ignore", "inherit"],
|
|
49
|
-
cwd: pkgRoot,
|
|
50
|
-
});
|
|
51
|
-
process.stderr.write("✓ Build complete\n");
|
|
52
|
-
} catch {
|
|
53
|
-
process.stderr.write("✗ Build failed — running with existing dist\n");
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
await import("../dist/src/index.js");
|
package/legacy/dist/package.json
DELETED
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@contentful/experience-design-system-cli-legacy",
|
|
3
|
-
"version": "2.35.0",
|
|
4
|
-
"description": "Legacy Contentful Experiences import CLI (internal, not published; used by @contentful/experience-design-system-cli)",
|
|
5
|
-
"license": "MIT",
|
|
6
|
-
"private": true,
|
|
7
|
-
"type": "module",
|
|
8
|
-
"main": "./dist/src/index.js",
|
|
9
|
-
"types": "./dist/src/index.d.ts",
|
|
10
|
-
"exports": {
|
|
11
|
-
".": {
|
|
12
|
-
"types": "./dist/src/index.d.ts",
|
|
13
|
-
"import": "./dist/src/index.js",
|
|
14
|
-
"node": "./dist/src/index.js"
|
|
15
|
-
}
|
|
16
|
-
},
|
|
17
|
-
"files": [
|
|
18
|
-
"bin/",
|
|
19
|
-
"dist/",
|
|
20
|
-
"prompts/",
|
|
21
|
-
"skills/"
|
|
22
|
-
],
|
|
23
|
-
"scripts": {
|
|
24
|
-
"build": "nx build experience-design-system-cli-legacy",
|
|
25
|
-
"typecheck": "nx typecheck experience-design-system-cli-legacy",
|
|
26
|
-
"clean": "nx clean experience-design-system-cli-legacy",
|
|
27
|
-
"test": "nx test experience-design-system-cli-legacy",
|
|
28
|
-
"test:watch": "nx test:watch experience-design-system-cli-legacy",
|
|
29
|
-
"lint": "nx lint experience-design-system-cli-legacy",
|
|
30
|
-
"lint:fix": "nx lint:fix experience-design-system-cli-legacy"
|
|
31
|
-
},
|
|
32
|
-
"dependencies": {
|
|
33
|
-
"@contentful/experience-design-system-backend-pipeline": "workspace:*",
|
|
34
|
-
"@contentful/experience-design-system-types": "workspace:*",
|
|
35
|
-
"@inkjs/ui": "^2.0.0",
|
|
36
|
-
"@segment/analytics-node": "^3.0.0",
|
|
37
|
-
"@vue/compiler-sfc": "^3.5.31",
|
|
38
|
-
"ajv": "^8.17.1",
|
|
39
|
-
"commander": "^13.1.0",
|
|
40
|
-
"contentful-management": "^12.17.0",
|
|
41
|
-
"figures": "6.1.0",
|
|
42
|
-
"ink": "^5.2.1",
|
|
43
|
-
"react": "^18.3.1",
|
|
44
|
-
"react-devtools-core": "^4.19.1",
|
|
45
|
-
"svelte": "^5.56.4",
|
|
46
|
-
"ts-morph": "^27.0.2",
|
|
47
|
-
"typescript": "^5.9.3",
|
|
48
|
-
"zod": "^4.3.6"
|
|
49
|
-
},
|
|
50
|
-
"devDependencies": {
|
|
51
|
-
"@contentful/experience-design-system-client": "workspace:*",
|
|
52
|
-
"@contentful/experience-design-system-extraction": "workspace:*",
|
|
53
|
-
"@contentful/experience-design-system-generation": "workspace:*",
|
|
54
|
-
"@tsconfig/node24": "^24.0.4",
|
|
55
|
-
"@types/node": "^24.0.3",
|
|
56
|
-
"@types/react": "^18.3.24",
|
|
57
|
-
"eslint": "^9.39.5",
|
|
58
|
-
"eslint-config-prettier": "^10.1.8",
|
|
59
|
-
"eslint-plugin-prettier": "^5.5.6",
|
|
60
|
-
"ink-testing-library": "^4.0.0",
|
|
61
|
-
"typescript-eslint": "^8.67.0",
|
|
62
|
-
"vitest": "^4.0.16"
|
|
63
|
-
},
|
|
64
|
-
"repository": {
|
|
65
|
-
"type": "git",
|
|
66
|
-
"url": "git+https://github.com/contentful/experience-design-system-sdk-public.git",
|
|
67
|
-
"directory": "packages/experience-design-system-cli-legacy"
|
|
68
|
-
},
|
|
69
|
-
"homepage": "https://github.com/contentful/experience-design-system-sdk-public#readme",
|
|
70
|
-
"bugs": {
|
|
71
|
-
"url": "https://github.com/contentful/experience-design-system-sdk-public/issues"
|
|
72
|
-
},
|
|
73
|
-
"engines": {
|
|
74
|
-
"node": ">=24"
|
|
75
|
-
}
|
|
76
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { ApplyOperationResponse } from '@contentful/experience-design-system-types';
|
|
2
|
-
import type { ImportApiClient } from '../apply/api-client.js';
|
|
3
|
-
/** Record apply/preview API outcomes on the active command. */
|
|
4
|
-
export declare function recordApplyOutcome(client: ImportApiClient, spaceId: string, environmentId: string, operation: ApplyOperationResponse): void;
|
|
5
|
-
/** Record Contentful target context without an apply operation (e.g. preview-only). */
|
|
6
|
-
export declare function recordContentfulContext(client: ImportApiClient, spaceId: string, environmentId: string): void;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export declare function cliVersion(): string;
|
|
2
|
-
export declare function setPersistedAnalyticsDisabled(disabled: boolean): void;
|
|
3
|
-
export declare function analyticsEnabled(): boolean;
|
|
4
|
-
export declare function trackEvent(event: string, properties: Record<string, unknown>, anonymousId: string, options?: {
|
|
5
|
-
flush?: boolean;
|
|
6
|
-
}): Promise<void>;
|
|
7
|
-
export declare function flushAnalytics(): Promise<void>;
|
|
8
|
-
export declare function resetAnalyticsClientForTests(): void;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { ApiError } from '../apply/api-client.js';
|
|
2
|
-
import type { CommandFailure } from './types.js';
|
|
3
|
-
export declare function exitWithAnalytics(code: number, fields?: CommandFailure): Promise<never>;
|
|
4
|
-
export declare function failureFromApiError(error: ApiError): CommandFailure;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export { exitWithAnalytics, failureFromApiError } from './exit.js';
|
|
2
|
-
export { flushAnalytics, setPersistedAnalyticsDisabled } from './client.js';
|
|
3
|
-
export { isPipelineAnalyticsChild } from './session.js';
|
|
4
|
-
export { bindAnalyticsSessionId, completeActiveCommand, emitSessionStarted, enrichCommandResult, failActiveCommand, noteCommandStart, } from './tracker.js';
|
|
5
|
-
export { recordApplyOutcome, recordContentfulContext } from './apply.js';
|
|
6
|
-
export type { CommandFailure } from './types.js';
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { CommandCompletion, CommandContext, CommandFailure, EntryCommand } from './types.js';
|
|
2
|
-
/** Record the start of a tracked command. Invoked is deferred until a session is bound. */
|
|
3
|
-
export declare function noteCommandStart(commandChain: string): void;
|
|
4
|
-
/** Bind a session id, preferring a pipeline parent id when present. */
|
|
5
|
-
export declare function bindAnalyticsSessionId(sessionId: string | undefined, context?: CommandContext): Promise<string>;
|
|
6
|
-
/** Attach Contentful target context for the active command. */
|
|
7
|
-
export declare function setCommandContext(context: CommandContext): void;
|
|
8
|
-
/** Merge optional completion fields before the terminal event fires. */
|
|
9
|
-
export declare function enrichCommandResult(fields: CommandCompletion): void;
|
|
10
|
-
/** Bind the pipeline session and emit invoked once both command and session are known. */
|
|
11
|
-
export declare function bindAnalyticsSession(id: string, context?: CommandContext): Promise<void>;
|
|
12
|
-
/** Emit session_started once per new pipeline head. */
|
|
13
|
-
export declare function emitSessionStarted(entryCommand: EntryCommand): Promise<void>;
|
|
14
|
-
export declare function completeActiveCommand(): Promise<void>;
|
|
15
|
-
export declare function failActiveCommand(fields?: CommandFailure): Promise<void>;
|
|
16
|
-
export declare function resetAnalyticsStateForTests(): void;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/** Tracked CLI commands — closed set aligned with the published event schema. */
|
|
2
|
-
export type DsiCliCommand = 'analyze_extract' | 'analyze_select' | 'generate_components' | 'generate_tokens' | 'map_tokens' | 'apply_push' | 'print_components' | 'print_tokens' | 'import';
|
|
3
|
-
export type EntryCommand = 'analyze_extract' | 'import';
|
|
4
|
-
export type OsName = 'macOS' | 'Linux' | 'Windows' | 'Android' | 'other';
|
|
5
|
-
export type WriteResult = {
|
|
6
|
-
created_count: number;
|
|
7
|
-
updated_count: number;
|
|
8
|
-
failed_count: number;
|
|
9
|
-
};
|
|
10
|
-
export type CommandContext = {
|
|
11
|
-
space_key?: string;
|
|
12
|
-
environment_key?: string;
|
|
13
|
-
x_contentful_request_id?: string;
|
|
14
|
-
};
|
|
15
|
-
export type CommandCompletion = CommandContext & {
|
|
16
|
-
dsi_operation_id?: string;
|
|
17
|
-
extracted_component_count?: number;
|
|
18
|
-
accepted_component_count?: number;
|
|
19
|
-
component_type_result?: WriteResult;
|
|
20
|
-
design_token_result?: WriteResult;
|
|
21
|
-
};
|
|
22
|
-
export type CommandFailure = CommandContext & {
|
|
23
|
-
dsi_operation_id?: string;
|
|
24
|
-
error_name?: string;
|
|
25
|
-
error_code?: string;
|
|
26
|
-
http_status_code?: number;
|
|
27
|
-
exit_code?: number;
|
|
28
|
-
};
|