dox 3.0.0
dox: ^3.0.0 copied to clipboard
This is a cli tool to generate migration, model and to handle database migration with dox framework. It support up and down methods to control migration version.
3.0.0 #
- The CLI moved to its own repo: dartondox/dox-cli. It is the same code.
3.0.0-rc.2 #
- Fix:
dox createanddox updatesorted pre-releases only by their number, so3.0.0-alpha.17looked newer than3.0.0-rc.1.dox createthen cloned the alpha.17 template. Now the label counts first: alpha < beta < rc < stable. - Only the CLI has this version. The other Dox packages stay at 3.0.0-rc.1.
3.0.0-rc.1 #
- Fix:
dox make:jobwrote abin/queue.dartthat did not compile. It calledQueueWorker(jobs: ...), butQueueWorkerhas nojobsparameter. It now writes the same file as the app template:QueueWorker(app: appConfig). - Fix: the job that
dox make:jobwrites showedX(userId: 1).dispatch()in its comment. The class has nouserId. The comment now showsX().dispatch(). - Fix:
dox db:seed --class UserSeeder(with a space) was refused. Both--class=UserSeederand--class UserSeederwork now. - Fix:
dox make:middlewarewroteextends IDoxMiddleware. It now writesimplements IDoxMiddleware, like the docs and the built-in middleware. dox buildalso leaves the SQLite lock files of dox_migration (*.sqlite.lock,*.sqlite3.lock,*.db.lock) out ofbuild/bundle/db.
3.0.0-alpha.17 #
- Uses dox_migration 3.0.0-alpha.12.
dox make:controller -r: thedestroystub shows how to give a 404 whendelete()deletes 0 rows.
3.0.0-alpha.16 #
- Version bump only, to match the other packages.
3.0.0-alpha.15 #
dox make:dto CreateBlognow writeslib/app/http/dtos/create_blog/create_blog.dto.dart. Each DTO has its own folder, like models. The.dto.g.dartfile is made next to it.
3.0.0-alpha.14 #
- Fix:
dox make:migrationrun more than once in the same second gave files with the same timestamp. Then the run order depended only on the name, which could break foreign keys. Now each new migration (.dartor.sql) sorts after every file already indb/migration. When needed, it uses the newest time plus 1 second.
3.0.0-alpha.13 #
- Version bump only, to match the other packages.
3.0.0-alpha.12 #
- Version bump only, to match the other packages.
3.0.0-alpha.11 #
dox buildalso buildsbin/queue.dartandbin/schedule.dartwhen they exist, tobuild/bundle/bin/queueandbuild/bundle/bin/schedule. Before, the worker and the scheduler had no production binary.- Fix:
dox buildcopied the local SQLite database (db/dox.sqlite, with its-waland-shmfiles) intobuild/bundle/db, so dev data went to production. SQLite files are now left out. dox --helpanddox -hshow the help, likedox help.
3.0.0-alpha.10 #
make:*is now the main name of every generator:make:controller,make:middleware,make:dto,make:serializerandmake:model, likemake:migration,make:factoryandmake:seeder. Thecreate:*names still work as aliases.- New
dox make:job <name>: makeslib/app/jobs/<name>.job.dartandbin/queue.dartwhen it is missing. It prints a hint to adddox_queueand to runbuild_runner. - New
dox queue:work,queue:failed,queue:retry,queue:forgetandqueue:flush: runbin/queue.dartwith the same flags. - New
dox schedule:work,schedule:run,schedule:listandschedule:test <name>: runbin/schedule.dart. - These commands pass the terminal through, send SIGINT and SIGTERM to the app script so a worker can stop by itself, and return its exit code. When the script is missing they print how to set it up.
3.0.0-alpha.9 #
dox make:controller(create:controller) writes@Inject()above the class, and no global controller instance. The file shows the typed route to use. The command says to runbuild_runner.- New
dox make:factory <model>: makesdb/factories/<model>.factory.dart. - New
dox make:seeder <name>: makesdb/seeders/<name>.seeder.dart, writes the seeder listdb/seeders/seeders.dartand makesbin/seed.dartwhen it is missing. - New
dox db:seed [--class=<name>]: runsbin/seed.dart. The default seeder isDatabaseSeeder. - New
dox migration:fresh(ormigrate:fresh): drops all tables, then runs all migrations. --seedaftermigration:run,migration:refreshormigration:freshruns the seeders when the migrations end well.
3.0.0-alpha.8 #
- Version bump only, to match the other packages.
3.0.0-alpha.7 #
- Breaking:
create:controllerno longer takes-ws. Dox uses Socket.IO for realtime now. See the Socket.IO docs for a namespace class. - Security:
dox createnow copies.env.exampleto.envand writes a new randomAPP_KEY. Before, every new app used the same public key from the template. You no longer runcp .env.example .env. - The
.env.exampleof the CLI has an emptyAPP_KEY. Rundox key:generateto set one.
3.0.0-alpha.6 #
- Fix:
dox key:generatedropped.envlines with more than one=(likeDATABASE_URL=postgres://u:p@h/db?sslmode=require). It also dropped comment lines. Now it only changes theAPP_KEYline. Every other line stays as it is. - Fix:
dox createcrashed withFailed to decode data using encoding 'utf-8'when the template had a binary file (for exampledb/dox.sqlite-shm). It now skips files that are not UTF-8 text. It only writes a file when its content changes.
3.0.0-alpha.5 #
- Fix:
dox create my_appwithout--versioncrashed with aRangeError. - Fix:
dox createpicked the GitHub "latest" template release, which skips pre-releases. During the 3.x alpha that gave the old 2.x template. It now takes the newest template with the same major version as the CLI. - Fix:
dox env:generatereadKEY=3000 # noteas text, not as anint. A#after a space is now a comment. - Fix:
dox updateran a plaindart pub global activate dox, which skips pre-releases. During the 3.x alpha it installed the old 2.x CLI. It now installs the newest version with the same major version as the CLI, from the pub.dev version list.
3.0.0-alpha.4 #
- Version bump only, to match the other packages.
3.0.0-alpha.3 #
- Version bump only, to match the other packages.
3.0.0-alpha.2 #
- Fix:
dox buildno longer passes--delete-conflicting-outputsto build_runner (it was removed and printed a warning). - Needs Dart 3.13 or newer.
- All dependencies updated to their latest versions.
dox buildnow runsdart build cli(AOT, with build hooks). The output isbuild/bundle/. Start it withcd build/bundle && ./bin/server.- New
dox create:dto <name>: makeslib/app/http/dtos/<name>.dto.dart.dox create:requestis removed. dox create:controller -rusesint idfor the resource methods.- New
dox openapi:generate [dir]. It runs the app'sbin/openapi.dartand writesopenapi.jsonandopenapi.yaml(defaultstorage/openapi). - New
dox env:generate: makeslib/config/env.dart(the typed env class) from.env.example. - New
dox env:check: loads the typed env and prints every missing or bad key (exit code 1).
3.0.0-alpha.1 #
- Version 3 of Dox. All Dox packages now share one version.
- Needs Dart 3.6 or newer.
- See the release notes for all main changes.
- Generated models import
package:dox_orm/dox_orm.dart.
2.0.1 #
- bug fix on dox create command
2.0.0 #
- Release stable version v2.0
2.0.0-alpha.3 #
- Fix migration issue
2.0.0-alpha.2 #
- Add option to create project with specific version
2.0.0-alpha.1 #
- Compatible with core version 2
1.1.1 #
- handle migration with dox_migration
- set default migration file with .sql
1.0.55 #
- Add command to create serializer
- Add help option
1.0.54 #
- update request template
- Add help option
1.0.53 #
- Added command to create form request
dox create:request Blog
1.0.52 #
- Added command to create websocket controller
1.0.51 #
- Initial version.