Skip to content

Conversation

@middt
Copy link
Contributor

@middt middt commented Dec 5, 2025

Summary by Sourcery

Rename the package and related tooling from the old vnext-template identity to the new morph-touch identity while improving setup behavior for non-interactive and preconfigured environments.

New Features:

  • Add support for detecting preconfigured domains via vnext.config.json and skipping setup when the corresponding domain folder is already structured.
  • Add non-interactive environment detection to bypass prompts and skip setup when no domain name can be provided.

Enhancements:

  • Extend setup idempotency checks to recognize existing vNext structures under a touch directory.
  • Update CLI entry points, messages, and helper paths to match the new morph-touch package name.

Build:

  • Rename the npm package, repository metadata, and binary names from @burgan-tech/vnext-template to @burgan-tech/morph-touch.

CI:

  • Update GitHub workflow summaries, installation snippets, and Sonar project key to reference the morph-touch package.

Tests:

  • Adjust test and validation scripts’ logging to reference the morph-touch package.

Summary by CodeRabbit

  • New Features

    • Setup process now supports non-interactive mode for automated deployments
    • Enhanced domain configuration detection to prevent duplicate setups
  • Chores

    • Renamed package to "morph-touch" across CLI tools, workflows, and package metadata
    • Updated repository and issue tracker references accordingly

✏️ Tip: You can customize this high-level summary in your review settings.

@sourcery-ai
Copy link

sourcery-ai bot commented Dec 5, 2025

Reviewer's Guide

Refines setup behavior to better handle existing domain configurations and non-interactive environments, while rebranding the package from @burgan-tech/vnext-template to @burgan-tech/morph-touch across code, metadata, and CI workflows.

Sequence diagram for updated setup behavior in interactive and non_interactive modes

sequenceDiagram
  actor Developer
  participant cli as init_js_or_setup_js
  participant setup as setup_function
  participant cfg as getDomainFromConfig
  participant cfgCheck as isDomainFolderConfigured
  participant domCheck as isAlreadySetup
  participant domName as getDomainName
  participant nonInt as isNonInteractive
  participant fs as filesystem

  Developer->>cli: run morph_touch_setup_or_npx_morph_touch
  cli->>setup: invoke setup_function()

  setup->>setup: isInstalledAsDependency()
  alt installed_as_dependency
    setup-->>cli: return (skip setup)
    cli-->>Developer: exit
  else normal_install
    setup->>cfg: getDomainFromConfig()
    cfg->>fs: read vnext_config_json
    fs-->>cfg: config_or_null
    cfg-->>setup: domainFromConfig

    alt domain_folder_already_configured
      setup->>cfgCheck: isDomainFolderConfigured()
      cfgCheck->>fs: check_domain_folder_and_structure
      fs-->>cfgCheck: exists_with_vnext_structure
      cfgCheck-->>setup: true
      setup-->>cli: log_domain_already_configured_and_skip
      cli-->>Developer: exit
    else not_configured_via_config
      setup->>domCheck: isAlreadySetup()
      alt touch_or_other_domain_exists
        domCheck->>fs: check_touch_and_domain_directories
        fs-->>domCheck: vnext_structure_found
        domCheck-->>setup: true
        setup-->>cli: log_template_already_set_up_and_skip
        cli-->>Developer: exit
      else fresh_setup
        domCheck-->>setup: false
        setup->>domName: getDomainName()
        domName->>nonInt: isNonInteractive()
        alt non_interactive
          nonInt-->>domName: true
          domName-->>setup: null
          setup-->>cli: log_skipping_setup_non_interactive
          cli-->>Developer: exit
        else interactive
          nonInt-->>domName: false
          domName->>Developer: prompt_for_domain_name
          Developer-->>domName: enter_domain_name
          domName-->>setup: domainName
          setup-->>cli: perform_replacements_and_create_structure
          cli-->>Developer: setup_complete
        end
      end
    end
  end
Loading

Flow diagram for updated setup function decision logic

flowchart TD
  A[start_setup_function] --> B{isInstalledAsDependency}
  B -->|true| C[return_skip_setup]
  B -->|false| D[getDomainFromConfig]
  D --> E{has_domain_from_config}

  E -->|true| F[isDomainFolderConfigured]
  F --> G{domain_folder_exists_with_vnext_structure}
  G -->|true| H[log_domain_already_configured_and_skip]
  G -->|false| I[proceed_to_already_setup_check]

  E -->|false| I

  I --> J[isAlreadySetup]
  J --> K{touch_or_other_domain_has_vnext_structure}
  K -->|true| L[log_template_already_set_up_and_skip]
  K -->|false| M[getDomainName]

  M --> N[isNonInteractive]
  N --> O{non_interactive_environment}
  O -->|true| P[return_null_domain_name]
  O -->|false| Q[prompt_user_for_domain_name]

  P --> R{domainName_is_null}
  Q --> S[domainName_from_user]
  S --> T[perform_domain_setup_with_domainName]
  T --> U[end_setup]

  R -->|true| V[log_skipping_setup_non_interactive_with_instructions]
  V --> U

  R -->|false| T
Loading

File-Level Changes

Change Details Files
Improve setup flow to recognize preconfigured domains and support non-interactive environments.
  • Extend isAlreadySetup to consider an existing vNext-style structure under a top-level touch directory.
  • Introduce isNonInteractive to detect CI/non-interactive installs and short-circuit domain prompts.
  • Add getDomainFromConfig and isDomainFolderConfigured helpers to read vnext.config.json and verify the configured domain folder structure.
  • In setup, short-circuit when a configured domain folder is already set up and when running non-interactively without a domain, logging clear guidance messages.
  • Update getDomainName to skip prompting entirely in non-interactive mode and allow a null domain result.
setup.js
Rebrand the NPM package and CLI from vnext-template to morph-touch and align related tooling.
  • Rename the package, bin commands, repository URLs, bugs URL, and homepage in package.json to use @burgan-tech/morph-touch and morph-touch naming.
  • Adjust init.js to look up the installed package under node_modules/@burgan-tech/morph-touch and update npx usage/help text accordingly.
  • Update logging strings in test.js and validate.js to reference the morph-touch package name.
  • Update build-and-publish GitHub Actions workflow to reference the new package name, NPM links, and usage examples.
  • Update the SonarQube project key in check-sonar.yml to match the new morph-touch naming.
  • Regenerate/package-lock.json to reflect the renamed package and dependency adjustments.
package.json
init.js
test.js
validate.js
.github/workflows/build-and-publish.yml
.github/workflows/check-sonar.yml
package-lock.json

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@middt middt merged commit 7050004 into release-v0.0 Dec 5, 2025
1 of 3 checks passed
@coderabbitai
Copy link

coderabbitai bot commented Dec 5, 2025

Caution

Review failed

The pull request is closed.

Note

.coderabbit.yaml has unrecognized properties

CodeRabbit is using all valid settings from your configuration. Unrecognized properties (listed below) have been ignored and may indicate typos or deprecated fields that can be removed.

⚠️ Parsing warnings (1)
Validation error: Unrecognized key(s) in object: 'review'
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Walkthrough

A systematic package rebranding from @burgan-tech/vnext-template to @burgan-tech/morph-touch across workflow configurations, package metadata, CLI entry points, and script references. Additionally, setup.js introduces configuration-aware and non-interactive domain setup capabilities.

Changes

Cohort / File(s) Summary
GitHub Workflows
.github/workflows/build-and-publish.yml, .github/workflows/check-sonar.yml
Updated all package name references from vnext-template to morph-touch in workflow steps, NPM links, and release notes. SonarCloud projectKey updated from burgan-tech_vnext-template to burgan-tech_morph-touch.
Package Configuration
package.json
Renamed package from @burgan-tech/vnext-template to @burgan-tech/morph-touch; updated bin entries (vnext-template/vnext-setup → morph-touch/morph-touch-setup); refreshed repository, issues, and homepage URLs; added publishable files array; promoted @burgan-tech/vnext-schema@^0.0.23 from devDependencies to production dependencies.
Setup and Initialization
init.js, setup.js
Updated package references and user-facing CLI messages from vnext-template to morph-touch. Enhanced setup.js with non-interactive mode detection, config-based domain setup via vnext.config.json, and improved existing setup detection logic to skip redundant configuration.
Scripts and Utilities
test.js, validate.js
Updated console output and log messages to reference morph-touch instead of vnext-template.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • setup.js requires careful review of new non-interactive and config-aware logic, particularly the enhanced isAlreadySetup(), new helper functions (isNonInteractive(), getDomainFromConfig(), isDomainFolderConfigured()), and early exit conditions in the setup() function.
  • Verify that the new domain configuration detection in setup.js correctly reads vnext.config.json and validates folder structures without breaking existing workflows.
  • Confirm that production dependency addition of @burgan-tech/vnext-schema@^0.0.23 is intentional and properly versioned.
  • Most other changes (rebranding, URL updates) are straightforward text replacements.

Poem

🐰 A touch of morph, a name renewed,
From vnext-template, the template flew!
New config flows, no prompts to pain,
The rabbit hops through setup's new lane!

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch master

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9fae1aa and 095f163.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (7)
  • .github/workflows/build-and-publish.yml (5 hunks)
  • .github/workflows/check-sonar.yml (1 hunks)
  • init.js (2 hunks)
  • package.json (4 hunks)
  • setup.js (5 hunks)
  • test.js (1 hunks)
  • validate.js (1 hunks)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist
Copy link

Summary of Changes

Hello @middt, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request primarily focuses on a significant rebranding effort, transitioning the package identity from vnext-template to morph-touch. This change is reflected throughout the codebase, including package metadata, internal path resolutions, and user-facing messages. Concurrently, the setup process has been made more robust and user-friendly by introducing checks for non-interactive environments and existing configurations, ensuring a smoother experience for both automated deployments and manual setups.

Highlights

  • Package Renaming: The entire project has been rebranded and renamed from @burgan-tech/vnext-template to @burgan-tech/morph-touch across all relevant configuration files, code references, and console outputs.
  • Enhanced Setup Script: The setup.js script now includes intelligent checks for non-interactive environments (e.g., CI/CD, npm install), reads domain configurations from vnext.config.json, and prevents redundant setups if a domain is already configured or the touch directory exists with a vnext structure.
  • Dependency Correction: The @burgan-tech/vnext-schema package has been correctly moved from devDependencies to dependencies in package.json and package-lock.json, reflecting its role as a core runtime dependency.
Ignored Files
  • Ignored by pattern: .github/workflows/** (2)
    • .github/workflows/build-and-publish.yml
    • .github/workflows/check-sonar.yml
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey there - I've reviewed your changes - here's some feedback:

  • The logic for detecting an already-configured domain (checking for Schemas/Workflows/Tasks in both isAlreadySetup and isDomainFolderConfigured) is duplicated; consider extracting a shared helper to avoid divergent behavior over time.
  • The @burgan-tech/vnext-schema package is now listed in both dependencies and devDependencies; if it’s only needed at build/validation time, you can keep it just in devDependencies to avoid bloating the runtime install.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The logic for detecting an already-configured domain (checking for `Schemas`/`Workflows`/`Tasks` in both `isAlreadySetup` and `isDomainFolderConfigured`) is duplicated; consider extracting a shared helper to avoid divergent behavior over time.
- The `@burgan-tech/vnext-schema` package is now listed in both `dependencies` and `devDependencies`; if it’s only needed at build/validation time, you can keep it just in `devDependencies` to avoid bloating the runtime install.

## Individual Comments

### Comment 1
<location> `package.json:59` </location>
<code_context>
       "hasInstallScript": true,
       "license": "MIT",
+      "dependencies": {
+        "@burgan-tech/vnext-schema": "^0.0.23"
+      },
       "bin": {
</code_context>

<issue_to_address>
**suggestion:** Avoid duplicating @burgan-tech/vnext-schema in both dependencies and devDependencies.

Having the same package/version in both dependencies and devDependencies is redundant and risks them drifting apart over time. Keep it only where it’s needed at runtime (likely dependencies) and remove the duplicate entry.

Suggested implementation:

```
  "dependencies": {
    "@burgan-tech/vnext-schema": "^0.0.23",
    "@burgan-tech/morph-touch": "./init.js",
    "morph-touch": "./init.js",
    "morph-touch-setup": "./setup.js"
  },

```

1. Locate the `"devDependencies"` section in this same `package.json` file.
2. Remove the line that declares `@burgan-tech/vnext-schema` there, e.g. delete:
   `"@burgan-tech/vnext-schema": "^0.0.23",`
3. Ensure the surrounding JSON remains valid (commas on previous/next lines adjusted as needed).
</issue_to_address>

### Comment 2
<location> `setup.js:10-16` </location>
<code_context>
  if (fs.existsSync('touch')) {
    if (fs.existsSync(path.join('touch', 'Schemas')) ||
        fs.existsSync(path.join('touch', 'Workflows')) ||
        fs.existsSync(path.join('touch', 'Tasks'))) {
      return true;
    }
  }

</code_context>

<issue_to_address>
**suggestion (code-quality):** Merge nested if conditions ([`merge-nested-ifs`](https://docs.sourcery.ai/Reference/Rules-and-In-Line-Suggestions/JavaScript/Default-Rules/merge-nested-ifs))

```suggestion
  if (fs.existsSync('touch') && (fs.existsSync(path.join('touch', 'Schemas')) ||
          fs.existsSync(path.join('touch', 'Workflows')) ||
          fs.existsSync(path.join('touch', 'Tasks')))) {
        return true;
  }

```

<br/><details><summary>Explanation</summary>Reading deeply nested conditional code is confusing, since you have to keep track of which
conditions relate to which levels. We therefore strive to reduce nesting where
possible, and the situation where two `if` conditions can be combined using
`and` is an easy win.
</details>
</issue_to_address>

### Comment 3
<location> `setup.js:217-223` </location>
<code_context>
  if (fs.existsSync(domainFromConfig)) {
    if (fs.existsSync(path.join(domainFromConfig, 'Schemas')) ||
        fs.existsSync(path.join(domainFromConfig, 'Workflows')) ||
        fs.existsSync(path.join(domainFromConfig, 'Tasks'))) {
      return true;
    }
  }

</code_context>

<issue_to_address>
**suggestion (code-quality):** Merge nested if conditions ([`merge-nested-ifs`](https://docs.sourcery.ai/Reference/Rules-and-In-Line-Suggestions/JavaScript/Default-Rules/merge-nested-ifs))

```suggestion
  if (fs.existsSync(domainFromConfig) && (fs.existsSync(path.join(domainFromConfig, 'Schemas')) ||
          fs.existsSync(path.join(domainFromConfig, 'Workflows')) ||
          fs.existsSync(path.join(domainFromConfig, 'Tasks')))) {
        return true;
  }

```

<br/><details><summary>Explanation</summary>Reading deeply nested conditional code is confusing, since you have to keep track of which
conditions relate to which levels. We therefore strive to reduce nesting where
possible, and the situation where two `if` conditions can be combined using
`and` is an easy win.
</details>
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request primarily handles the renaming of the package from vnext-template to morph-touch, updating all relevant files and configurations. It also introduces enhancements to the setup script, such as support for non-interactive environments and improved idempotency checks. The changes are generally well-implemented, but I have a couple of suggestions regarding package dependency configuration and code duplication that would improve the overall quality.

},
"dependencies": {

"@burgan-tech/vnext-schema": "^0.0.23"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The package @burgan-tech/vnext-schema is now listed as both a dependency and a devDependency. Since it appears to be used only for development and validation scripts (like validate.js), it should remain only in devDependencies. Including it in dependencies will unnecessarily add it to the production installs of projects that use this package.

Comment on lines +218 to +220
if (fs.existsSync(path.join(domainFromConfig, 'Schemas')) ||
fs.existsSync(path.join(domainFromConfig, 'Workflows')) ||
fs.existsSync(path.join(domainFromConfig, 'Tasks'))) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The logic to check for a vNext directory structure (i.e., the presence of Schemas, Workflows, or Tasks subdirectories) is duplicated in this function (isDomainFolderConfigured) and also within isAlreadySetup. To improve maintainability and reduce redundancy, this logic should be extracted into a separate helper function.

For example, you could create a function like this:

function hasVNextStructure(dirPath) {
  return fs.existsSync(path.join(dirPath, 'Schemas')) ||
         fs.existsSync(path.join(dirPath, 'Workflows')) ||
         fs.existsSync(path.join(dirPath, 'Tasks'));
}

This new helper could then be used in both isDomainFolderConfigured and isAlreadySetup to simplify the code and avoid repetition.

@coderabbitai coderabbitai bot mentioned this pull request Dec 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants