[Feat] Optional install of Mise NPN/Bun with PHP/Laravel sites#1113
Merged
RichardAnderson merged 8 commits intoMay 23, 2026
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR extends site provisioning and deployment to support optional installation and consistent reuse (“locking”) of mise-managed Node.js and Bun versions per isolated user, and improves command wrapping and error/log handling around deployments.
Changes:
- Adds
node_version/bun_versioninputs for PHP/PHP-Blank/Laravel site types, persists them intype_data, and installs runtimes during site install when requested. - Introduces
UsesMiseRuntimetrait to centralize supported runtime versions and provide safer command wrapping (bash -cwithescapeshellarg). - Injects site-type-specific deployment environment variables (notably
PATHfor mise shims) into deployment scripts and enhances deploy-key failure messaging/redaction.
Reviewed changes
Copilot reviewed 21 out of 22 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/Unit/MiseSiteTypeTest.php | Updates assertions for new quoting behavior in wrapped commands. |
| tests/Unit/MiseBunSiteTypeTest.php | Updates assertions for new quoting behavior in wrapped commands. |
| tests/Feature/SitesTest.php | Adjusts site creation payloads to include node_version defaults and updates supported Node version expectations. |
| resources/js/types/isolated-user.d.ts | Adds a shared TS type including locked node_version/bun_version per isolated user. |
| resources/js/pages/sites/components/isolated-user-select.tsx | Uses shared IsolatedUserOption type instead of inline type. |
| resources/js/pages/sites/components/create-site.tsx | Adds runtime selectors, “locked runtime” UX, and automatic lock/reset behavior when selecting isolated users. |
| public/api-docs/openapi/sites.yaml | Documents node_version and bun_version request properties for site creation. |
| app/SSH/OS/OS.php | Escapes alias/variable values for runScript-generated shell code and removes logging of raw script command. |
| app/SiteTypes/SiteType.php | Adds deploymentEnvironment() to the SiteType contract. |
| app/SiteTypes/PHPSite.php | Adds runtime validation/data defaults, installs Node/Bun via mise during install, and provides deployment PATH env when configured. |
| app/SiteTypes/PHPBlank.php | Adds runtime validation/data defaults and installs Node/Bun via mise during install. |
| app/SiteTypes/MiseSiteType.php | Refactors to use shared UsesMiseRuntime trait for runtime setup and command wrapping. |
| app/SiteTypes/MiseNodeJS.php | Switches to centralized supported Node versions constant. |
| app/SiteTypes/MiseBun.php | Switches to centralized supported Bun versions constant. |
| app/SiteTypes/Concerns/UsesMiseRuntime.php | New shared trait for supported versions, shim PATH building, runtime install, and safer command wrapping. |
| app/SiteTypes/AbstractSiteType.php | Adds default deploymentEnvironment() implementation returning empty env. |
| app/Providers/SiteTypeServiceProvider.php | Exposes Node/Bun selectors for PHP/PHP-Blank/Laravel site types; updates supported version sources for mise site types. |
| app/Models/Site.php | Adds helper to detect existing per-user runtime versions across sibling sites. |
| app/Jobs/Site/DeployJob.php | Merges site-type deployment env (e.g., PATH) into deployment script environment. |
| app/Jobs/Site/CreateJob.php | Improves deploy-key failure logging/UI summary with public-key redaction + truncation. |
| app/Actions/Site/GetIsolatedUsers.php | Extends isolated-user listing to include detected locked Node/Bun versions. |
| app/Actions/Site/CreateSite.php | Enforces runtime “locking” for existing isolated users and centralizes isolated-user regex. |
saeedvaziry
approved these changes
May 23, 2026
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.
This pull request introduces improved support for managing Node.js and Bun runtime versions for isolated users across site types, with a focus on consistency, validation, and safety. It adds new helper methods, validation logic, and UI options for runtime selection, and also enhances deployment environment handling and error reporting.