You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
BREAKING
The CLI moved from fluttersdk_artisan to dowel, and so did every name built on it. The executable is dart run magic:dowel <cmd> (there is no artisan executable any more), MagicArtisanProvider is MagicDowelProvider, the command base classes are DowelCommand, DowelGeneratorCommand and DowelContext, the stub override variable is DOWEL_STUBS_DIR, and project state lives in .dowel/ instead of .artisan/. The executable hands over to the consumer's bin/dispatcher.dart when dart run dowel install has scaffolded one, so plugin commands keep resolving. To upgrade an app: dart pub remove fluttersdk_artisan and dart pub add dowel, move .artisan/ to .dowel/ (the install hashes survive), delete .dowel/plugins.json, the fluttersdk_* records under .dowel/installed/, bin/dispatcher.dart, bin/fsa, a leftover bin/artisan.dart, lib/app/_plugins.g.dart and lib/app/commands/_index.g.dart, rename Artisan* classes in your own commands to Dowel*, run dart run dowel install and dart run dowel commands:refresh, then dart run dowel plugin:install magic and plugin:install <package> for each plugin, so the registration lands in .dowel/plugins.json (a file a renamed plugin published earlier shows as an unmanaged-file conflict: review it, then pass --force). The full recipe is in the dowel changelog; "Upgrading from 0.0.x" in doc/getting-started/installation.md follows it. (pubspec.yaml, bin/dowel.dart, lib/cli.dart, lib/src/cli/)
Wind moved from fluttersdk_wind to wind_kit, which builds on material_ui, so the SDK floor is Dart 3.13 and Flutter 3.47.package:magic/magic.dart re-exports wind_kit. MagicApplication builds its MaterialApp from package:material_ui/material_ui.dart and defaults localizationsDelegates to GlobalMaterialLocalizations.delegates from the same package, which bundles the Cupertino and Widgets delegates. An app imports package:material_ui/material_ui.dart for MaterialApp, ThemeData, Colors and MaterialColor (flutter pub add material_ui, then dart fix --apply --code=deprecated_member_use); Flutter's own package:flutter/material.dart types are not interchangeable with them. magic:install adds wind_kit, material_ui and dowel to the app. flutter_localizations is no longer a dependency of core. (pubspec.yaml, lib/src/foundation/magic_app_widget.dart, lib/src/cli/)
Four layers left core for plugin packages, and package:magic/magic.dart no longer exports them.magic_encryption carries Crypt, MagicEncrypter, EncryptionServiceProvider and key:generate; magic_picker carries Pick and the MagicFile.toXFile() and XFile.toMagicFile() conversions (XFile leaves core, and fromXFile is replaced by toMagicFile) and the file_picker, image_picker and share_plus re-exports; magic_socket carries Echo, the broadcasting manager, the Reverb and null drivers, ListensToBroadcasts and FakeBroadcastManager (now package:magic_socket/testing.dart); magic_local_storage carries the whole SQLite layer: DB, Schema, the query builder, migrations, seeders, factories, SyncFeed and SyncLedger. Add one with flutter pub add <package> then dart run magic:dowel plugin:install <package>. The Crypt payload wire format is unchanged (AES-256-CBC, base64(iv):base64(ct)), so ciphertext written by 0.0.41 still decrypts.
Five facades are gone from core, so core has 13: Auth, Cache, Config, Event, Gate, Http, Lang, Launch, Log, Route, Session, Storage, Vault.Crypt, DB, Echo, Pick and Schema now come from the plugins above.
The installer flags --without-database and --without-broadcasting are removed, and so are make:migration, make:seeder, make:factory and key:generate. Core ships 17 make:* generators instead of 20. make:model -m/-f/-s and make:resource look the migration, factory and seeder commands up in the dowel registry and print a hint to install magic_local_storage when it is absent.
make:controller --broadcasts is removed. Mix ListensToBroadcasts from magic_socket into the controller by hand.
Storage.download on IO throws UnsupportedError unless a handler is set. Core no longer carries share_plus; magic_picker sets the new LocalAdapterContract.downloadHandler so the file is shared as before. The web adapter is unchanged.
Model.query() is gone from core. It is the extension ModelQuery in magic_local_storage. A model with useLocal => true throws a StateError naming magic_local_storage on every persistence leg when nothing is bound to the local_model_store container key.
Magic.seed is gone from core. Use Seeding.run(List<Seeder>) from magic_local_storage.
magic:install no longer registers DatabaseServiceProvider or BroadcastServiceProvider, so an app that needs one runs plugin:install for its plugin. An app installed on 0.0.41 also has the published lib/config/database.dart and lib/config/broadcasting.dart. The plugins export databaseConfig and broadcastingConfig from their barrels, so delete those two files before running plugin:install magic_local_storage or plugin:install magic_socket, or the import becomes ambiguous.
The record type of FakeCacheManager.recorded is FakeCacheCall, not CacheRecord. A test that names CacheRecord stops compiling: rename it to FakeCacheCall. The generic name collided with the CacheRecord class of the crumbs dev tool for any app that imports both barrels, and a test fake's record shape does not belong under a generic name in package:magic/magic.dart. The shape is unchanged: ({String operation, String key, dynamic value}). (lib/src/testing/fake_cache_manager.dart)
Added
LocalModelStore, the one contract core keeps for local persistence.Model resolves it from the container under 'local_model_store', and magic_local_storage binds it. Core keeps the base Model (API-first, useLocal false by default), casts, HasTimestamps, InteractsWithPersistence, model_events and db_events. (lib/src/database/contracts/local_model_store.dart)
LocalAdapterContract.downloadHandler, the seam that lets a plugin own the IO download. (lib/src/storage/drivers/local/local_adapter_contract.dart)
Changed
First stable release: version 1.0.0 replaces the planned 0.1.0 and follows 0.0.41, so the 0.x caret trap is gone: a package on magic: ^1.0.0 takes every 1.x release. It requires dowel ^1.0.0 and wind_kit ^1.12.0; no API change beyond what is listed here.
The web local storage adapter reads and writes localStorage directly. Keys (flutter. plus the path) and the json-encoded base64 value format are the same, so files stored by 0.0.41 stay readable.
The installer's lib/main.dart preview draws an in-repo unified diff instead of using more.
The sqlite3 floor is ^3.9.1 and the sqlite3.wasm pin moves to 3.9.1. Both now belong to magic_local_storage, whose local_storage:install downloads the wasm.
magic:install --with-devtools wires the tapir and crumbs debug trio.fluttersdk_dusk and fluttersdk_telescope are discontinued, so the flag adds magic_devtools ^1.0.0, tapir ^1.0.0 and crumbs ^1.0.0 to dependencies and writes the TapirPlugin and CrumbsPlugin blocks (with the ExceptionWatcher and DumpWatcher) into lib/main.dart under !kReleaseMode (debug and profile builds carry the tools, so a perf measurement runs on a profile build; release tree-shakes them), with MagicPerfIntegration.install() before Magic.init() and MagicTapirIntegration and MagicCrumbsIntegration after it. A call already in lib/main.dart is never written twice, and an app already calling MagicDevtools.installPre( is left untouched. Its post-install message lists plugin:install tapir, plugin:install crumbs, tapir:install and crumbs:install. (lib/src/cli/commands/magic_install_command.dart, install.yaml)
Every direct dependency constraint is raised to its latest release.wind_kit ^1.12.0, dowel ^1.0.0, go_router ^18.1.4 (the 17.x floor is gone), flutter_secure_storage ^11.2.0, dio ^5.11.1, logger ^2.8.0, jiffy ^6.4.5, meta ^1.19.0 and the rest to their current patch.
Removed
Ten dependencies leave core's pubspec.yaml:more, sqlite3_flutter_libs, shared_preferences, encrypt, file_picker, image_picker, share_plus, web_socket_channel, sqlite3 and faker. A consumer that used one of them transitively adds it, or the plugin that now owns it, to its own pubspec.yaml. (pubspec.yaml)
Fixed
Five doc comments no longer carry bare angle brackets. pana reports unintended_html_in_doc_comment for them even though analysis_options.yaml ignores the lint, and the publish workflow requires full pana points. The generic types now sit inside backticks. (lib/src/actions/magic_action.dart, lib/src/cli/helpers/main_dart_smart_merger.dart, lib/src/database/eloquent/model.dart, lib/src/foundation/config_repository.dart, lib/src/ui/magic_form_data.dart)
An overlay route opened as a dialog puts a transparent Material above its panel, as the sheet does. The dialog route had no Material above the panel, so a bare Text or WText in it was drawn with the debug fallback style (a yellow double underline) where the same panel looked right as a sheet, and every panel had to bring its own. The Material paints nothing and does not absorb a tap, so the scrim around the panel still closes the dialog when canDismiss allows it; the panel still draws its own surface and size. (#285, lib/src/routing/magic_overlay_page.dart)
A transport failure is a failed response, so fetchList and fetchOne report an error instead of an empty list.DioNetworkDriver answers a timeout or a dead link with status 0 and no data; MagicResponse.failed only checked >= 400, so fetchList skipped setError, read the missing payload as "no rows" and called setEmpty() (an offline user saw an empty list), and fetchOne reported "Resource not found". failed now also answers true for status 0, so both set an error ("Failed to load"). successful, clientError and serverError are unchanged. (lib/src/network/magic_response.dart, lib/src/http/magic_controller.dart)
Carbon.isWeekend no longer depends on the locale. Under en_us it flagged Friday and Saturday; it now answers for Saturday and Sunday in every locale. (lib/src/support/carbon.dart)