Skip to content

Refactor: Modular architecture, migrate javscript code and test alignment - #47

Merged
macalbert merged 37 commits into
mainfrom
codex/migrate-javascript-code-to-typescript
Jun 7, 2025
Merged

Refactor: Modular architecture, migrate javscript code and test alignment#47
macalbert merged 37 commits into
mainfrom
codex/migrate-javascript-code-to-typescript

Conversation

@macalbert

@macalbert macalbert commented Jun 1, 2025

Copy link
Copy Markdown
Owner

Description

This PR restructures the codebase to follow a modular layered architecture, migrates all source files from JavaScript to TypeScript, and aligns the test structure and naming conventions with the production code. These changes are made to support future growth and maintainability as outlined in the project roadmap.

Key Changes

  • Architecture Refactor:
    Adopted a modular layered structure with clear separation between CLI, application, domain, and infrastructure layers. This improves code clarity, testability, and scalability.
  • TypeScript Migration
    All source files have been moved from JavaScript (.js) to TypeScript (.ts), enabling better type safety and developer experience.
  • Test Structure Alignment:
    Test folders and filenames now mirror the production code structure, using PascalCase for consistency. This makes it easier to locate and maintain tests as the project evolves.
  • Basic Unit Tests:
    Added simple unit tests for core modules (e.g., EnvilderFactory, AwsSsmStoreSecrets) to ensure the test suite passes and to provide a foundation for future test coverage.

Motivation

These changes lay the groundwork for new features and increased complexity as described in the project roadmap. The new structure will make it easier to extend the CLI, add support for new secret stores, and maintain high code quality as the project grows.

Summary by CodeRabbit

  • New Features

    • Introduced a modular and extensible architecture for synchronizing environment variables from AWS SSM Parameter Store or other secret providers to local .env files.
    • Added a builder pattern for flexible configuration of secret providers and environment file managers.
    • Enhanced CLI workflow with improved logging and error handling.
  • Bug Fixes

    • Improved escaping of special characters in .env files to ensure correct formatting.
  • Chores

    • Migrated project scripts, CI workflows, and documentation from Yarn to npm.
    • Updated package version and dependencies.
    • Improved .gitignore and code formatting settings.
  • Documentation

    • Updated installation and usage instructions to focus on npm.
    • Enhanced workflow and script documentation with clearer commands and thematic naming.
  • Tests

    • Added comprehensive unit, integration, and end-to-end tests for new features and infrastructure.

@macalbert macalbert added the codex Created or modified by Codex (AI agent) label Jun 1, 2025 — with ChatGPT Codex Connector
@coderabbitai

This comment was marked as outdated.

gemini-code-assist[bot]

This comment was marked as outdated.

gemini-code-assist[bot]

This comment was marked as outdated.

coderabbitai[bot]

This comment was marked as outdated.

coderabbitai[bot]

This comment was marked as outdated.

@macalbert macalbert changed the title Migrate pack script to TS and configure yarn Migrate pack script to TS Jun 1, 2025
@github-advanced-security

Copy link
Copy Markdown
Contributor

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

@macalbert macalbert self-assigned this Jun 2, 2025
coderabbitai[bot]

This comment was marked as outdated.

…re growth

- Restructured project to follow a modular layered architecture (CLI, application, domain, infrastructure) for clarity and maintainability.
- Aligned test folder structure and naming conventions with production code for consistency.
- Added basic unit tests for core modules to ensure testability and CI compatibility.
- This refactor prepares the codebase for future features and complexity as outlined in the project roadmap, enabling easier scaling and extension.
coderabbitai[bot]

This comment was marked as outdated.

@macalbert macalbert changed the title Migrate pack script to TS Refactor: Modular Layered Architecture, TypeScript Migration, and Test Alignment Jun 7, 2025
coderabbitai[bot]

This comment was marked as outdated.

coderabbitai[bot]

This comment was marked as outdated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor Code restructuring with no behavior change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants