Detect legacy CANVAS_COMPONENT_DIR and migrate to canvas.config.json
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3577399. --> Reported by: [balintbrews](https://www.drupal.org/user/613760) Related to !688 >>> <h3>Overview</h3> <p>The CLI now expects component directory configuration in <code>canvas.config.json</code> under <code>componentDir</code>. Let's make sure we don't break projects where <code>CANVAS_COMPONENT_DIR</code> is defined in an environment variable or a <code>.env</code> file.</p> <h3>Proposed resolution</h3> <p>Detect legacy <code>CANVAS_COMPONENT_DIR</code>, warn users about the change, and offer to create or update <code>canvas.config.json</code> with <code>componentDir</code>. In non-interactive mode, the CLI should skip prompts and provide a clear manual migration message.</p> <h3>User interface changes</h3> <p><img src="https://www.drupal.org/files/issues/2026-03-05/canvas-cli-component-dir-bc.jpg" alt="Warning and prompt to create a canvas.config.json file"></p>
issue