docs: TypeScript core migration plan (Phase 1 inventory)#3611
Draft
christierney wants to merge 7 commits intomainfrom
Draft
docs: TypeScript core migration plan (Phase 1 inventory)#3611christierney wants to merge 7 commits intomainfrom
christierney wants to merge 7 commits intomainfrom
Conversation
Inventory the Go API surface (46 endpoints), map extension call sites, identify external resources, and assess the test suite as groundwork for migrating from the Go REST API to an in-process TypeScript core using hexagonal architecture. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Proof-of-concept implementing the hexagonal architecture pattern for the Configuration domain: - Domain types translated from Go's internal/config/types.go - ConfigurationStore port interface (list/read/write/remove) - Three use cases: ListConfigurations, GetConfiguration, SaveConfiguration - Product type compliance logic ported from Go - 9 tests using node:test with inline fakes (no mocking framework) - Extension wired via tsconfig paths (no npm workspaces, no vsce issues) - Migration plan updated with workspace structure decisions Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
First driven adapter implementing the ConfigurationStore port: - Reads/writes .posit/publish/*.toml files - Translates snake_case TOML keys to camelCase domain types - Maps filesystem errors to domain errors (NotFound, ReadError) - 13 tests against real temp directories (list, read, write, remove, round-trip, error cases) - Extension tsconfig wired with @publisher/adapters path mapping - Proof-of-concept doc updated with full end-to-end architecture Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Demonstrates the incremental migration strategy: GoApiConfigurationStore implements the same ConfigurationStore port as FsConfigurationStore, but delegates to the existing Go backend REST API. This lets the extension be wired through the port interface today while still using the Go backend. Removes rootDir from the extension tsconfig to allow TypeScript to follow paths mappings into packages/core/ and packages/adapters/. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Move error-collection logic from the ListConfigurations use case into each adapter's list() implementation. This eliminates the N+1 pattern where callers had to list names then read each one individually. The use case becomes a thin wrapper, and both FsConfigurationStore and GoApiConfigurationStore now return full summaries (with parsed configs or error messages) in a single call. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
committing for future reference
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
src/api/resources/This is the Phase 1 output of a planned migration from the Go REST API backend to an in-process TypeScript core package using hexagonal architecture.
Reference implementation: https://github.com/christierney/hexatype
Open questions (looking for feedback)
See
TS_MIGRATION_PLAN.mdfor full details.🤖 Generated with Claude Code