freight_cli 0.1.0
freight_cli: ^0.1.0 copied to clipboard
Build and check asset packs for the freight package: resolve globs, generate manifests, and package them with Apple's ba-package.
Changelog #
0.1.0 #
-
freight setupnow writesBAHasManagedAssetPacksandBAUsesAppleHostingalongsideBAAppGroupID, and generates the extension with the correct extension point identifier. Managed Background Assets enforces all of these by trapping rather than returning an error, so a project missing one crashed with a message that named neither the key nor the caller. -
freight doctorchecks the two new keys, failing on a missingBAHasManagedAssetPacksand warning whenBAUsesAppleHostingis absent — self-hosting is legitimate, but it brings further requirements the framework also enforces by trapping. -
Corrected the glob patterns in the documentation and the example.
**/*.tilesmatches only files inside a subdirectory, so a pack written that way silently dropped everything sitting directly in its root — use**.tiles. The distinction is now documented with the other glob rules and pinned by a test. -
Added an example, and
freight doctorno longer asks forba-packagein a project with noios/directory. -
freight doctornow checks the Android side too: that the asset pack plugin is declared, that each module exists, is included insettings.gradle.ktsand listed on the app, and that its delivery type still matchesfreight.yaml— changingdeliverydoes nothing untilfreight setupruns again, and the bundle builds happily with the stale policy. It also stops asking forba-packagein a project with noios/directory, which made it unusable on Linux. -
doctorandbuildwarn about packs over Play's limits: 512 MB for a fast-follow or on-demand pack, and 1 GB across all install-time packs. -
freight setupnow generates the Gradle asset pack modules for Android as well, andfreight buildgained--platform, staging each pack's files into its module under the same logical paths the iOS archive records. Pack ids are validated against Play's rule for module names — letters, numbers and underscores, starting with a letter — because one id has to be valid on both platforms. -
Added the
freight setupcommand, which adds the Background Assets downloader extension target to a Flutter iOS project: the extension's source, itsInfo.plistand entitlements, the app group on both targets,BAAppGroupID, and theproject.pbxprojedits that add the target and embed it in a build phase early enough not to produce a dependency cycle. It is idempotent, and it refuses projects that do not match the layoutflutter createproduces rather than guessing. -
Split out of
freight, so an app depending on the plugin no longer carriesargs,glob,pathandyamlfor tooling it never runs. Nothing in this package importsfreight; the two share thefreight.yamlformat, not code.