Draft
Conversation
- Fix command injection via exec() in simulator-launcher (use execFile)
- Fix silent device detection failure in device-installer
- Extract shared Vite helpers into cli/lib/vite-utils.js
- Replace promisify with manual wrapper for CLI callback convention
- Close Vite dev server on error, log errors before finishing
- Make metadata write failure non-fatal
- Distinguish ENOENT from other errors in readServeMetadata
- Handle non-Error truthy values in invokeLauncherStep
- Add port conflict guidance in start-server
- Initialize tiSymbols as {} to match object consumption pattern
- Extract DEFAULT_PORT constant, simplify port callback
Contributor
|
Neat! I need some time to review. :) |
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
I'm opening this as a draft for now since this involves changes across multiple other projects that need to be released first.
ti servecommand that starts a Vite dev server and launches the app, enabling HMR-based developmentbuildandservecommandsChanges
New
ti servecommand (cli/commands/serve.js)Orchestrates the Vite dev server lifecycle: starts the server, runs a build (or skips it if artifacts are fresh), then launches the app on the target platform using the extracted launchers.
Vite build hook (
cli/hooks/vite.js)Mirrors the existing Webpack hook pattern. Detects Vite in project dependencies, sets
builder.useBundler = true, and runs a one-shot Vite build duringbuild.pre.compile(skipped duringservesince the dev server is already running).Shared Vite utilities (
cli/lib/vite-utils.js)Resolves the project-local Vite installation, finds config files, and provides the
tiBridgePlugin/createTiViteBridgehelpers used by both the build hook and serve command.Serve helpers (
cli/lib/serve/)start-server.js— bootstraps the Vite dev server with HMR configurationmetadata.js— content-hash based staleness check for build artifact reuseresolve-host.js— picks the first non-internal IPv4 address for the dev serverPlatform launcher extraction
android/cli/lib/launcher.js— extracted fromandroid/cli/hooks/run.jsiphone/cli/lib/device-installer.js— extracted fromiphone/cli/hooks/install.jsiphone/cli/lib/simulator-launcher.js— extracted fromiphone/cli/hooks/run.jsexec→execFile)Build command updates
useWebpack→useBundleracross Android/iOS build commands andProcessJsTaskbuilderinstance from both platform_build.jsfiles soservecan access builder state