fluzer 2.0.0
fluzer: ^2.0.0 copied to clipboard
CLI tool for scaffolding Flutter Zero template projects.
2.0.0 #
Removed #
- Removed the CLI/template version compatibility gate from the
newandgen-l10ncommands. These commands no longer read theminCliVersionfield fromflutter_zero_config.yamlto reject or allow a CLI version, and the--skip-version-checkflag (debug-only bypass) has been removed as it is no longer needed.
Changed #
createnow always selects the latest available template version instead of filtering candidates by a minimum CLI version.- Refined and unified the localized (zh/en/ja) prompt text across template-source resolution, cache operations, and the version-update notice; stale comments were cleaned up.
1.2.1 #
Fixed #
createno longer removes an existing directory that has the same name as the project being created. Previously the command reported the name conflict and then recursively deleted that directory together with all of its contents. It now reports the error and exits without touching your files. Cleaning up a half-created project still happens when a later step ofcreatefails.
1.2.0 #
Added #
- Terminal CLI is now localized: Chinese (zh), English (en) and Japanese (ja) are supported. A new global
--locale/-Lflag selects the UI language; when omitted, it follows the system locale or environment variables. - Configuration-validation error messages emitted by the
newandgen-l10ncommands are now localized (zh/en/ja) instead of hardcoded mixed-language text.
Changed #
- Subprocess output is now drained concurrently for both stdout and stderr. This eliminates a pipe-backpressure stall that made child commands (notably
build_runnerduringnew) extremely slow when run without--log. - Subprocesses now start with their standard input closed by default, so a child command that waits for interactive input (such as a confirmation prompt) no longer hangs silently and instead proceeds with its default behavior.
1.1.3 #
Changed #
create,newandgen-l10nnow show a one-line upgrade hint at startup when a newer CLI version is available, without blocking the command.- The
versioncommand now shows a live progress indicator while checking for updates. - The
newcommand now runs code generation only for the newly created module instead of the whole project, making scaffolding much faster on large codebases.
Removed #
- Removed the
build_runnerstep at the end of thecreatecommand. A freshly created project template needs no code generation, socreatenow finishes right afterflutter gen-l10n.
1.1.2 #
Added #
- Concurrent mirror-racing HTTP client for template downloads: the direct URL now races against configured GitHub mirror prefixes; the first successful response wins and the rest are cancelled, removing the sequential wait for direct-timeout-then-mirror fallback.
Changed #
- Logging overhaul: removed the
LogPolicyabstraction — visibility is now driven solely byLogger.level. Every command step is wrapped inrunWithSpinnerfor a live progress indicator; in--logmode the spinner is suppressed and child-command output is streamed live instead. - The download progress bar now appears only in
--logmode (verbose); in the default mode the step spinner conveys progress, avoiding duplicate/overlapping output. - Internal refactors with no user-facing behavior change:
TemplateSourceResolveris now the single public template-source API (top-level helpers removed); thegen-l10nparameter-type switch was replaced by an extensibleL10nParamTyperegistry (OCP); config/version/util packages were restructured to remove cyclic dependencies.
Fixed #
- Fixed a Windows CI crash where the global
Directory.currentwas restored to a temporary directory already deleted by a parallel test, failing theNewCommandfull-flow test. Commands and the CLI entry point now accept an explicitworkingDirectoryinstead of mutating global cwd. - Improved cross-platform test stability on the Linux/macOS/Windows CI matrix:
Platform.resolvedExecutablereplaces the'dart'string command,path.joinreplaces hardcoded separators, and temporary-directory deletion now retries under Windows file locking.
1.1.1 #
Added #
- Version compatibility gate for
newandgen-l10ncommands: the CLI now validates the running CLI version against the project template's required minimum (theminCliVersionfield influtter_zero_config.yaml) before proceeding. Incompatible versions are rejected with a clear upgrade prompt. A--skip-version-checkflag bypasses the gate for debugging only. newcommand now pins the exact template version declared in the project config (flutter_zero_config.yamlversion) when resolving the download source, instead of always picking the latest CLI-compatible template.ProjectConfiggains aminCliVersionfield and anisCliCompatible(currentCliVersion)helper. Legacy projects withoutminCliVersiondefault to"0.0.0"(accepted by any CLI).
Fixed #
SemanticVersionlacked value equality (==/hashCode), causing unreliable version comparisons; value equality is now implemented.
1.1.0 #
Added #
fluzer gen-l10n: runsflutter gen-l10nand auto-generates a type-safe localization access layer.- Parses
l10n.yaml(arb-dir/output-dir/output-class, with fallback probing) and the generatedAppLocalizationsabstract class (brace-counting class-body scanner). - Generates
l10n_code.dart: theL10nCodevalue object with typed factory constructors, symmetrictoString/parseserialization,==/hashCode, and immutableMap<String, String>parameters. - Generates
l10n_code_ext.dart:typeS()/typeE()/typeI()/typeW()toast-type markers and atoToastEffect()shortcut for emitting effects directly from BLoCs. - Generates
l10n_toast_effect_helper.dart: a centralized switch dispatcher covering every ARB key, deserializing parameters by declared type (int.tryParse,DateTime.tryParse, ...). - Auto-wires
L10nToastEffectHelperintodefaultToastHandlevia an AST-based patch with three-state detection (template / already-wired / customized), idempotent on repeated runs. Flags:--skip-handle-patch,--force-handle-patch. - Generated sources are formatted with
dart_styleand tagged with the CLI version.
- Parses
Fixed #
- Placeholder types declared in ARB (e.g.
"type": "int") no longer break generation: parameter types are preserved end-to-end instead of being hardcoded asObject; unparseable parameter declarations now fail loudly withFormatExceptioninstead of being silently dropped. L10nCode.parsetolerates malformed input (e.g. incomplete percent-encoding) instead of throwing inside the effect chain.- Factory parameters named
code/parametersare renamed (codeParam/parametersParam) to avoid shadowing class members; map keys remain unchanged.
1.0.1 #
Changed #
- Switched
README.mdto English (Chinese version preserved asREADME_CN.md). - Rewrote
CHANGELOG.mdin English. - Changed
pubspec.yamldescriptionto English-only.
Added #
- Added
example/directory with CLI usage examples and programmatic API demo. - Added library-level dartdoc to
lib/fluzer.dart.
Fixed #
- Improved pub.dev score: widened
analyzerconstraint from^10.2.0to>=10.0.1 <15.0.0so the constraint supports the latest version (the actual resolved version is still capped at 10.x bycodemod_recipe's transitive^10.0.1).
1.0.0 #
Initial release.
Added #
fluzer create <name>: Generate a Flutter Zero project in one step (supports local path, remote zip, and template registry sources).fluzer new <feature>: Generate a feature module in an existing project with automatic DI registration injection.fluzer version: Check the latest CLI and template versions with update notifications.fluzer cache list|clean: View or clear the local template cache.- Built-in China mirror fallback (ghfast.top / api.gitproxy.dev) for improved domestic access stability.
- Colored log output and clear command help messages.