FLUTTER ECOSYSTEM

blaugold/cli_launcher

로컬에 설치된 버전을 시작하는 데 지원하는 CLI 개발 유틸리티입니다.

cli_launcher 프로젝트 이미지
Stars
10
Forks
2
최근 푸시(UTC)
2026. 9. 21.
프로젝트 상태
활성
Gabriel Terwesten GitHub avatar
GITHUB User

Gabriel Terwesten ↗

@lotumMunich
언어Dart

기술 주제

이 저장소가 배포한 패키지

사용 중인 의존성

의존성 목록 6 개
  • path^1.8.0
  • yaml^3.1.1
  • lints개발 의존성^6.0.0
  • test개발 의존성^1.16.0
  • melos개발 의존성^6.3.3
  • daco개발 의존성^0.4.0

원본 README

아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.

README 펼치기 / 접기

CI Pub Version

CLI development utility to support launching locally installed versions.

When the globally installed version of a CLI is launched and it finds a locally installed version of itself that is a different version, it will launch the locally installed version.

Otherwise, the globally installed version will continue to run.

Installing means adding the package that contains the CLI executable to a pubspec.yaml file.

To find the locally installed version, the globally installed version will search for a pubspec.yaml file in the current directory or any parent directory. If it finds one, it will look for a dependency on the package that contains the CLI executable.

In addition, if the CLI is executed in the package that contains the CLI executable, the current version in that package will be launched. This is useful for development.

Launch flow

flowchart TD
    A["User invokes CLI"] --> B["launchExecutable()"]
    B --> C{"Launch context<br/>in args?"}

    C -- "Yes (relaunched by global)" --> D["Restore original working<br/>directory, call entrypoint"]
    C -- "No (initial invocation)" --> E["Detect global installation<br/>from Platform.script"]

    E --> F["Search for local installation<br/>(walk up from cwd, check pubspec.yaml<br/>for dependency or dev_dependency)"]

    F -- "Found" --> G{"pubspec.lock<br/>up to date?"}
    F -- "Not found" --> GLOBAL

    G -- "Yes" --> I
    G -- "Missing or<br/>older than<br/>pubspec.yaml" --> H["Run pub get from<br/>lock file root"]

    H -- "OK" --> I{"Source package,<br/>path dep, or<br/>version mismatch?"}
    H -- "Failed" --> EXIT["Exit with error"]

    I -- "No" --> GLOBAL["Run entrypoint<br/>with global installation"]
    I -- "Yes" --> J["Launch local via<br/>dart run package:executable<br/>(inject launch context in args)"]

    J --> K["New process starts,<br/>calls launchExecutable(),<br/>finds launch context in args"]
    K --> D