nitrogen_cli 0.1.8
nitrogen_cli: ^0.1.8 copied to clipboard
CLI for Nitrogen Modules. Scaffold new Flutter FFI plugins and generate native bridge code.
0.1.8 #
nitrogen link: fix Android/iOS build failure wheredart_api_dl.canddart_api_dl.hwere not found whennitrois installed from pub.dev (e.g. via puro's pub cache) rather than a local monorepo path.linknow reads.dart_tool/package_config.jsonto resolve the actual installednitropackage path (absolutefile://URI or relative URI).- Creates a local
src/dart_api_dl.cforwarder (#include "<resolved path>") so the Android CMake build never references a path outside the project directory. ios/Classes/dart_api_dl.cnow chains through../../src/dart_api_dl.c, giving both Android CMake and iOS CocoaPods/SPM a single resolution point.- Migrates legacy
"${NITRO_NATIVE}/dart_api_dl.c"entries in existingCMakeLists.txtto the new local"dart_api_dl.c"form automatically. - Updates a stale
NITRO_NATIVEcmake variable if the path it currently points to no longer containsdart_api_dl.h.
nitrogen init: generatedCMakeLists.txtandios/Classes/dart_api_dl.cnow use the same local-forwarder pattern from day one.- Extracted
resolveNitroNativePath,nitroNativePathExists, anddartApiDlForwarderContentas package-level functions for testability; private_LinkViewStatehelpers now delegate to them. - Added tests covering
resolveNitroNativePath(file:// URI, relative URI, absent config, fallback),nitroNativePathExists, anddartApiDlForwarderContent.
0.1.7 #
nitrogen init:nitroandnitro_generatordependency versions are now resolved automatically from pub.dev at scaffold time instead of being hardcoded.- Fallback: if pub.dev is unreachable,
flutter pub add nitroandflutter pub add --dev nitro_generatorare run in the generated plugin directory so pub resolves the latest compatible versions itself.
0.1.6 #
- Fix
nitrogen doctoralways reportingios/Classes/dart_api_dl.cpp missing: the check now correctly looks fordart_api_dl.c, matching whatnitrogen linkactually creates (.cppis deleted bylinkbecause C++ rejects thevoid*/function-pointer cast inside it).
0.1.5 #
nitrogen initnow generates starter${ClassName}Impl.swiftand${ClassName}Impl.ktfiles so the plugin compiles immediately without any manual steps.- iOS: switched from
@objc/NSObjectto@_cdeclC-bridge stubs — Swift structs and Swift-only protocols can now cross the native boundary correctly. - iOS:
HEADER_SEARCH_PATHSin podspec now uses${PODS_ROOT}/../.symlinks/plugins/nitro/src/nativeso the path resolves correctly whethernitrois a local path dependency or installed from pub.dev. - iOS:
dart_api_dlis created as.c(not.cpp) so the Dart DL API compiles as C; C++ rejects thevoid*/function-pointer cast inside it. - iOS:
nitrogen initnow creates aPackage.swiftalongside the podspec, enabling Swift Package Manager distribution in addition to CocoaPods. - iOS: SPM
Sources/layout uses symlinks intoClasses/so a single file exists at one location and is shared between both build systems. nitrogen link: extracteddiscoverModuleLibsandextractLibNameFromSpecas package-level functions for testability.- Added comprehensive
link_command_test.dartcovering lib-name extraction, module discovery, podspec path correctness, and template content validation.
0.1.4 #
nitrogen initalways prompts for plugin name via an interactivePluginNameFormTUI; the name can no longer be passed as a positional argument.- Added
NitrogenInitApp(public) to handle the form → scaffold flow, reusable in both CLI and TUI dashboard. - TUI dashboard
/initroute updated to useNitrogenInitAppinstead of a hardcodedInitView. ESCon the plugin name form navigates back to the dashboard (TUI) or is a no-op (CLI).- Added
pluginNamefield toInitResultfor post-run reporting. - Added comprehensive tests for
InitResult,InitStep,InitStepRow,PluginNameForm, and plugin name validation.
0.1.3 #
- Implement String type conversion in the struct generator and add braces to the CLI's plugin name extraction.
0.1.2 #
- Rename generator package folder to
nitro_generator. - Update
doctorandinitcommands with new path references.
0.1.1 #
- Update
nitrogenpackage reference tonitro_generator.
0.1.0 #
- Initial release with
noctermdashboard. - Integrated
nitrogen init,generate,link,doctor, andupdate.