diff --git a/README.md b/README.md index a5d7f7f..2ccf755 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,8 @@ cd test To run all tests. Always make sure the build is green. +You will need to install the bash testing framework [bats](https://bats-core.readthedocs.io/en/stable/installation.html). + In order to run the application locally, run ```bash diff --git a/bricks/basics/__brick__/lib/main.dart b/bricks/basics/__brick__/lib/main.dart index 9b2f040..f2320cb 100644 --- a/bricks/basics/__brick__/lib/main.dart +++ b/bricks/basics/__brick__/lib/main.dart @@ -1,8 +1,8 @@ import 'dart:math'; import 'package:flame/components.dart'; +import 'package:flame/events.dart'; import 'package:flame/game.dart'; -import 'package:flame/input.dart'; import 'package:flame/palette.dart'; import 'package:flutter/material.dart'; @@ -12,40 +12,39 @@ void main() { runApp(GameWidget(game: MyGame())); } -class MyComponent extends PositionComponent with HasGameRef { - static final _paint = BasicPalette.white.paint(); - final Vector2 speed = Vector2.zero(); +class MyGame extends FlameGame with TapCallbacks { + late final MyComponent myComponent; - @override @override Future onLoad() async { - anchor = Anchor.center; - position = gameRef.size / 2; - } - - @override - void render(Canvas c) { - c.drawRect(size.toRect(), _paint); + await world.add(myComponent = MyComponent()); + return super.onLoad(); } @override - void update(double dt) { - position += speed * dt; + void onTapUp(TapUpEvent event) { + myComponent.speed.x = -1 + 2 * _rng.nextDouble(); + myComponent.speed.y = -1 + 2 * _rng.nextDouble(); } } -class MyGame extends FlameGame with TapDetector { - late final MyComponent myComponent; +class MyComponent extends PositionComponent with HasGameRef { + static final _paint = BasicPalette.white.paint(); + final Vector2 speed = Vector2.zero(); + + MyComponent() + : super( + anchor: Anchor.center, + size: Vector2.all(32), + ); @override - Future onLoad() async { - await add(myComponent = MyComponent()); - return super.onLoad(); + void render(Canvas c) { + c.drawRect(size.toRect(), _paint); } @override - void onTap() { - myComponent.speed.x = -5 + 10 * _rng.nextDouble(); - myComponent.speed.y = -5 + 10 * _rng.nextDouble(); + void update(double dt) { + position += speed * 32.0 * dt; } } diff --git a/bricks/basics/__brick__/pubspec.yaml b/bricks/basics/__brick__/pubspec.yaml index 06cd0d0..c9c7a28 100644 --- a/bricks/basics/__brick__/pubspec.yaml +++ b/bricks/basics/__brick__/pubspec.yaml @@ -5,12 +5,12 @@ version: {{version}} publish_to: 'none' environment: - sdk: ">=2.17.0 <3.0.0" + sdk: ">=3.0.0 <4.0.0" -dependencies: - flutter: - sdk: flutter{{#extra-dependencies}} +dependencies:{{#extra-dependencies}} {{name}}: {{version}}{{/extra-dependencies}} + flutter: + sdk: flutter dev_dependencies:{{#extra-dev-dependencies}} {{name}}: {{version}}{{/extra-dev-dependencies}} diff --git a/bricks/example/__brick__/lib/main.dart b/bricks/example/__brick__/lib/main.dart index 9b2f040..f2320cb 100644 --- a/bricks/example/__brick__/lib/main.dart +++ b/bricks/example/__brick__/lib/main.dart @@ -1,8 +1,8 @@ import 'dart:math'; import 'package:flame/components.dart'; +import 'package:flame/events.dart'; import 'package:flame/game.dart'; -import 'package:flame/input.dart'; import 'package:flame/palette.dart'; import 'package:flutter/material.dart'; @@ -12,40 +12,39 @@ void main() { runApp(GameWidget(game: MyGame())); } -class MyComponent extends PositionComponent with HasGameRef { - static final _paint = BasicPalette.white.paint(); - final Vector2 speed = Vector2.zero(); +class MyGame extends FlameGame with TapCallbacks { + late final MyComponent myComponent; - @override @override Future onLoad() async { - anchor = Anchor.center; - position = gameRef.size / 2; - } - - @override - void render(Canvas c) { - c.drawRect(size.toRect(), _paint); + await world.add(myComponent = MyComponent()); + return super.onLoad(); } @override - void update(double dt) { - position += speed * dt; + void onTapUp(TapUpEvent event) { + myComponent.speed.x = -1 + 2 * _rng.nextDouble(); + myComponent.speed.y = -1 + 2 * _rng.nextDouble(); } } -class MyGame extends FlameGame with TapDetector { - late final MyComponent myComponent; +class MyComponent extends PositionComponent with HasGameRef { + static final _paint = BasicPalette.white.paint(); + final Vector2 speed = Vector2.zero(); + + MyComponent() + : super( + anchor: Anchor.center, + size: Vector2.all(32), + ); @override - Future onLoad() async { - await add(myComponent = MyComponent()); - return super.onLoad(); + void render(Canvas c) { + c.drawRect(size.toRect(), _paint); } @override - void onTap() { - myComponent.speed.x = -5 + 10 * _rng.nextDouble(); - myComponent.speed.y = -5 + 10 * _rng.nextDouble(); + void update(double dt) { + position += speed * 32.0 * dt; } } diff --git a/bricks/example/__brick__/pubspec.yaml b/bricks/example/__brick__/pubspec.yaml index 06cd0d0..c9c7a28 100644 --- a/bricks/example/__brick__/pubspec.yaml +++ b/bricks/example/__brick__/pubspec.yaml @@ -5,12 +5,12 @@ version: {{version}} publish_to: 'none' environment: - sdk: ">=2.17.0 <3.0.0" + sdk: ">=3.0.0 <4.0.0" -dependencies: - flutter: - sdk: flutter{{#extra-dependencies}} +dependencies:{{#extra-dependencies}} {{name}}: {{version}}{{/extra-dependencies}} + flutter: + sdk: flutter dev_dependencies:{{#extra-dev-dependencies}} {{name}}: {{version}}{{/extra-dev-dependencies}} diff --git a/bricks/simple/__brick__/pubspec.yaml b/bricks/simple/__brick__/pubspec.yaml index 06cd0d0..c9c7a28 100644 --- a/bricks/simple/__brick__/pubspec.yaml +++ b/bricks/simple/__brick__/pubspec.yaml @@ -5,12 +5,12 @@ version: {{version}} publish_to: 'none' environment: - sdk: ">=2.17.0 <3.0.0" + sdk: ">=3.0.0 <4.0.0" -dependencies: - flutter: - sdk: flutter{{#extra-dependencies}} +dependencies:{{#extra-dependencies}} {{name}}: {{version}}{{/extra-dependencies}} + flutter: + sdk: flutter dev_dependencies:{{#extra-dev-dependencies}} {{name}}: {{version}}{{/extra-dev-dependencies}} diff --git a/lib/commands/create_command.dart b/lib/commands/create_command.dart index 3276920..984ec81 100644 --- a/lib/commands/create_command.dart +++ b/lib/commands/create_command.dart @@ -125,9 +125,11 @@ Future createCommand(ArgResults command) async { 'description': 'A simple Flame game.', 'version': '0.1.0', 'extra-dependencies': dependencies + .sortedBy((e) => e.name) .map((package) => package.toMustache(versions, flameVersion)) .toList(), 'extra-dev-dependencies': devDependencies + .sortedBy((e) => e.name) .map((package) => package.toMustache(versions, flameVersion)) .toList(), }; diff --git a/lib/templates/bricks/basics_bundle.dart b/lib/templates/bricks/basics_bundle.dart index 7351206..275e8f1 100644 --- a/lib/templates/bricks/basics_bundle.dart +++ b/lib/templates/bricks/basics_bundle.dart @@ -3,4 +3,4 @@ import 'package:mason/mason.dart'; -final basicsBundle = MasonBundle.fromJson({"files":[{"path":"analysis_options.yaml","data":"aW5jbHVkZTogcGFja2FnZTpmbGFtZV9saW50L2FuYWx5c2lzX29wdGlvbnMueWFtbA==","type":"text"},{"path":"lib/main.dart","data":"aW1wb3J0ICdkYXJ0Om1hdGgnOwoKaW1wb3J0ICdwYWNrYWdlOmZsYW1lL2NvbXBvbmVudHMuZGFydCc7CmltcG9ydCAncGFja2FnZTpmbGFtZS9nYW1lLmRhcnQnOwppbXBvcnQgJ3BhY2thZ2U6ZmxhbWUvaW5wdXQuZGFydCc7CmltcG9ydCAncGFja2FnZTpmbGFtZS9wYWxldHRlLmRhcnQnOwppbXBvcnQgJ3BhY2thZ2U6Zmx1dHRlci9tYXRlcmlhbC5kYXJ0JzsKCmZpbmFsIF9ybmcgPSBSYW5kb20oKTsKCnZvaWQgbWFpbigpIHsKICBydW5BcHAoR2FtZVdpZGdldChnYW1lOiBNeUdhbWUoKSkpOwp9CgpjbGFzcyBNeUNvbXBvbmVudCBleHRlbmRzIFBvc2l0aW9uQ29tcG9uZW50IHdpdGggSGFzR2FtZVJlZjxNeUdhbWU+IHsKICBzdGF0aWMgZmluYWwgX3BhaW50ID0gQmFzaWNQYWxldHRlLndoaXRlLnBhaW50KCk7CiAgZmluYWwgVmVjdG9yMiBzcGVlZCA9IFZlY3RvcjIuemVybygpOwoKICBAb3ZlcnJpZGUKICBAb3ZlcnJpZGUKICBGdXR1cmU8dm9pZD4gb25Mb2FkKCkgYXN5bmMgewogICAgYW5jaG9yID0gQW5jaG9yLmNlbnRlcjsKICAgIHBvc2l0aW9uID0gZ2FtZVJlZi5zaXplIC8gMjsKICB9CgogIEBvdmVycmlk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yc2lvbn19e3svZXh0cmEtZGV2LWRlcGVuZGVuY2llc319CiAgZmx1dHRlcl90ZXN0OgogICAgc2RrOiBmbHV0dGVyCiAgaW50ZWdyYXRpb25fdGVzdDoKICAgIHNkazogZmx1dHRlcgoKZmx1dHRlcjoKICB1c2VzLW1hdGVyaWFsLWRlc2lnbjogZmFsc2U=","type":"text"},{"path":"test/widget_test.dart","data":"aW1wb3J0ICdwYWNrYWdlOmZsYW1lL2dhbWUuZGFydCc7CmltcG9ydCAncGFja2FnZTpmbGFtZV90ZXN0L2ZsYW1lX3Rlc3QuZGFydCc7CmltcG9ydCAncGFja2FnZTpmbHV0dGVyX3Rlc3QvZmx1dHRlcl90ZXN0LmRhcnQnOwoKaW1wb3J0ICdwYWNrYWdlOnt7bmFtZX19L21haW4uZGFydCc7CgpmaW5hbCBteUdhbWUgPSBGbGFtZVRlc3RlcihNeUdhbWUubmV3KTsKCnZvaWQgbWFpbigpIHsKICBteUdhbWUudGVzdEdhbWVXaWRnZXQoCiAgICAnZ2FtZSB3aWxsIGxvYWQgaXRzIGNoaWxkJywKICAgIHZlcmlmeTogKGdhbWUsIHRlc3RlcikgYXN5bmMgewogICAgICBnYW1lLnVwZGF0ZSgwLjApOwoKICAgICAgZXhwZWN0KGdhbWUuY2hpbGRyZW4ubGVuZ3RoLCAxKTsKICAgICAgZXhwZWN0KGdhbWUubXlDb21wb25lbnQuc3BlZWQsIFZlY3RvcjIuemVybygpKTsKCiAgICAgIGF3YWl0IHRlc3Rlci50YXBBdChjb25zdCBPZmZzZXQoMTAsIDEwKSk7CiAgICAgIGV4cGVjdChnYW1lLm15Q29tcG9uZW50LnNwZWVkLCBpc05vdChlcXVhbHMoVmVjdG9yMi56ZXJvKCkpKSk7CiAgICB9LAogICk7Cn0K","type":"text"}],"hooks":[],"name":"basics","description":"The basic structure that most games will require. No boilerplate required, but no extra fluff.","version":"0.1.0","environment":{"mason":"any"},"vars":{"name":{"type":"string"},"description":{"type":"string"},"version":{"type":"string"},"flame-version":{"type":"string"},"flame-lint-version":{"type":"string"},"extra-dependencies":{"type":"array"},"extra-dev-dependencies":{"type":"array"}}}); \ No newline at end of file +final basicsBundle = MasonBundle.fromJson({"files":[{"path":"analysis_options.yaml","data":"aW5jbHVkZTogcGFja2FnZTpmbGFtZV9saW50L2FuYWx5c2lzX29wdGlvbnMueWFtbA==","type":"text"},{"path":"lib/main.dart","data":"aW1wb3J0ICdkYXJ0Om1hdGgnOwoKaW1wb3J0ICdwYWNrYWdlOmZsYW1lL2NvbXBvbmVudHMuZGFydCc7CmltcG9ydCAncGFja2FnZTpmbGFtZS9ldmVudHMuZGFydCc7CmltcG9ydCAncGFja2FnZTpmbGFtZS9nYW1lLmRhcnQnOwppbXBvcnQgJ3BhY2thZ2U6ZmxhbWUvcGFsZXR0ZS5kYXJ0JzsKaW1wb3J0ICdwYWNrYWdlOmZsdXR0ZXIvbWF0ZXJpYWwuZGFydCc7CgpmaW5hbCBfcm5nID0gUmFuZG9tKCk7Cgp2b2lkIG1haW4oKSB7CiAgcnVuQXBwKEdhbWVXaWRnZXQoZ2FtZTogTXlHYW1lKCkpKTsKfQoKY2xhc3MgTXlHYW1lIGV4dGVuZHMgRmxhbWVHYW1lIHdpdGggVGFwQ2FsbGJhY2tzIHsKICBsYXRlIGZpbmFsIE15Q29tcG9uZW50IG15Q29tcG9uZW50OwoKICBAb3ZlcnJpZGUKICBGdXR1cmU8dm9pZD4gb25Mb2FkKCkgYXN5bmMgewogICAgYXdhaXQgd29ybGQuYWRkKG15Q29tcG9uZW50ID0gTXlDb21wb25lbnQoKSk7CiAgICByZXR1cm4gc3VwZXIub25Mb2FkKCk7CiAgfQoKICBAb3ZlcnJpZGUKICB2b2lkIG9uVGFwVXAoVGFwVXBFdmVudCBldmVudCkgewogICAgbXlDb21wb25lbnQuc3BlZWQueCA9IC0xICsgMiAqIF9ybmcubmV4dERvdWJsZSgpOwogICAgbXlDb21wb25lbnQuc3BlZWQueSA9IC0xICsgMiAqIF9ybmc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ICBzZGs6IGZsdXR0ZXIKICBpbnRlZ3JhdGlvbl90ZXN0OgogICAgc2RrOiBmbHV0dGVyCgpmbHV0dGVyOgogIHVzZXMtbWF0ZXJpYWwtZGVzaWduOiBmYWxzZQ==","type":"text"},{"path":"test/widget_test.dart","data":"aW1wb3J0ICdwYWNrYWdlOmZsYW1lL2dhbWUuZGFydCc7CmltcG9ydCAncGFja2FnZTpmbGFtZV90ZXN0L2ZsYW1lX3Rlc3QuZGFydCc7CmltcG9ydCAncGFja2FnZTpmbHV0dGVyX3Rlc3QvZmx1dHRlcl90ZXN0LmRhcnQnOwoKaW1wb3J0ICdwYWNrYWdlOnt7bmFtZX19L21haW4uZGFydCc7CgpmaW5hbCBteUdhbWUgPSBGbGFtZVRlc3RlcihNeUdhbWUubmV3KTsKCnZvaWQgbWFpbigpIHsKICBteUdhbWUudGVzdEdhbWVXaWRnZXQoCiAgICAnZ2FtZSB3aWxsIGxvYWQgaXRzIGNoaWxkJywKICAgIHZlcmlmeTogKGdhbWUsIHRlc3RlcikgYXN5bmMgewogICAgICBnYW1lLnVwZGF0ZSgwLjApOwoKICAgICAgZXhwZWN0KGdhbWUuY2hpbGRyZW4ubGVuZ3RoLCAxKTsKICAgICAgZXhwZWN0KGdhbWUubXlDb21wb25lbnQuc3BlZWQsIFZlY3RvcjIuemVybygpKTsKCiAgICAgIGF3YWl0IHRlc3Rlci50YXBBdChjb25zdCBPZmZzZXQoMTAsIDEwKSk7CiAgICAgIGV4cGVjdChnYW1lLm15Q29tcG9uZW50LnNwZWVkLCBpc05vdChlcXVhbHMoVmVjdG9yMi56ZXJvKCkpKSk7CiAgICB9LAogICk7Cn0K","type":"text"}],"hooks":[],"name":"basics","description":"The basic structure that most games will require. No boilerplate required, but no extra fluff.","version":"0.1.0","environment":{"mason":"any"},"vars":{"name":{"type":"string"},"description":{"type":"string"},"version":{"type":"string"},"flame-version":{"type":"string"},"flame-lint-version":{"type":"string"},"extra-dependencies":{"type":"array"},"extra-dev-dependencies":{"type":"array"}}}); \ No newline at end of file diff --git a/lib/templates/bricks/example_bundle.dart b/lib/templates/bricks/example_bundle.dart index f95a987..873e746 100644 --- a/lib/templates/bricks/example_bundle.dart +++ b/lib/templates/bricks/example_bundle.dart @@ -3,4 +3,4 @@ import 'package:mason/mason.dart'; -final exampleBundle = MasonBundle.fromJson({"files":[{"path":"analysis_options.yaml","data":"aW5jbHVkZTogcGFja2FnZTpmbGFtZV9saW50L2FuYWx5c2lzX29wdGlvbnMueWFtbA==","type":"text"},{"path":"lib/main.dart","data":"aW1wb3J0ICdkYXJ0Om1hdGgnOwoKaW1wb3J0ICdwYWNrYWdlOmZsYW1lL2NvbXBvbmVudHMuZGFydCc7CmltcG9ydCAncGFja2FnZTpmbGFtZS9nYW1lLmRhcnQnOwppbXBvcnQgJ3BhY2thZ2U6ZmxhbWUvaW5wdXQuZGFydCc7CmltcG9ydCAncGFja2FnZTpmbGFtZS9wYWxldHRlLmRhcnQnOwppbXBvcnQgJ3BhY2thZ2U6Zmx1dHRlci9tYXRlcmlhbC5kYXJ0JzsKCmZpbmFsIF9ybmcgPSBSYW5kb20oKTsKCnZvaWQgbWFpbigpIHsKICBydW5BcHAoR2FtZVdpZGdldChnYW1lOiBNeUdhbWUoKSkpOwp9CgpjbGFzcyBNeUNvbXBvbmVudCBleHRlbmRzIFBvc2l0aW9uQ29tcG9uZW50IHdpdGggSGFzR2FtZVJlZjxNeUdhbWU+IHsKICBzdGF0aWMgZmluYWwgX3BhaW50ID0gQmFzaWNQYWxldHRlLndoaXRlLnBhaW50KCk7CiAgZmluYWwgVmVjdG9yMiBzcGVlZCA9IFZlY3RvcjIuemVybygpOwoKICBAb3ZlcnJpZGUKICBAb3ZlcnJpZGUKICBGdXR1cmU8dm9pZD4gb25Mb2FkKCkgYXN5bmMgewogICAgYW5jaG9yID0gQW5jaG9yLmNlbnRlcjsKICAgIHBvc2l0aW9uID0gZ2FtZVJlZi5zaXplIC8gMjsKICB9CgogIEBvdmVycmlkZQogI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vbn19e3svZXh0cmEtZGV2LWRlcGVuZGVuY2llc319CiAgZmx1dHRlcl90ZXN0OgogICAgc2RrOiBmbHV0dGVyCiAgaW50ZWdyYXRpb25fdGVzdDoKICAgIHNkazogZmx1dHRlcgoKZmx1dHRlcjoKICB1c2VzLW1hdGVyaWFsLWRlc2lnbjogZmFsc2U=","type":"text"},{"path":"test/widget_test.dart","data":"aW1wb3J0ICdwYWNrYWdlOmZsYW1lL2dhbWUuZGFydCc7CmltcG9ydCAncGFja2FnZTpmbGFtZV90ZXN0L2ZsYW1lX3Rlc3QuZGFydCc7CmltcG9ydCAncGFja2FnZTpmbHV0dGVyX3Rlc3QvZmx1dHRlcl90ZXN0LmRhcnQnOwoKaW1wb3J0ICdwYWNrYWdlOnt7bmFtZX19L21haW4uZGFydCc7CgpmaW5hbCBteUdhbWUgPSBGbGFtZVRlc3RlcihNeUdhbWUubmV3KTsKCnZvaWQgbWFpbigpIHsKICBteUdhbWUudGVzdEdhbWVXaWRnZXQoCiAgICAnZ2FtZSB3aWxsIGxvYWQgaXRzIGNoaWxkJywKICAgIHZlcmlmeTogKGdhbWUsIHRlc3RlcikgYXN5bmMgewogICAgICBnYW1lLnVwZGF0ZSgwLjApOwoKICAgICAgZXhwZWN0KGdhbWUuY2hpbGRyZW4ubGVuZ3RoLCAxKTsKICAgICAgZXhwZWN0KGdhbWUubXlDb21wb25lbnQuc3BlZWQsIFZlY3RvcjIuemVybygpKTsKCiAgICAgIGF3YWl0IHRlc3Rlci50YXBBdChjb25zdCBPZmZzZXQoMTAsIDEwKSk7CiAgICAgIGV4cGVjdChnYW1lLm15Q29tcG9uZW50LnNwZWVkLCBpc05vdChlcXVhbHMoVmVjdG9yMi56ZXJvKCkpKSk7CiAgICB9LAogICk7Cn0K","type":"text"}],"hooks":[],"name":"example","description":"An actual complete, working game example. Extra code that you won't need but will teach you how to wire the most important pieces.","version":"0.1.0","environment":{"mason":"any"},"vars":{"name":{"type":"string"},"description":{"type":"string"},"version":{"type":"string"},"flame-version":{"type":"string"},"flame-lint-version":{"type":"string"},"extra-dependencies":{"type":"array"},"extra-dev-dependencies":{"type":"array"}}}); \ No newline at end of file +final exampleBundle = MasonBundle.fromJson({"files":[{"path":"analysis_options.yaml","data":"aW5jbHVkZTogcGFja2FnZTpmbGFtZV9saW50L2FuYWx5c2lzX29wdGlvbnMueWFtbA==","type":"text"},{"path":"lib/main.dart","data":"aW1wb3J0ICdkYXJ0Om1hdGgnOwoKaW1wb3J0ICdwYWNrYWdlOmZsYW1lL2NvbXBvbmVudHMuZGFydCc7CmltcG9ydCAncGFja2FnZTpmbGFtZS9ldmVudHMuZGFydCc7CmltcG9ydCAncGFja2FnZTpmbGFtZS9nYW1lLmRhcnQnOwppbXBvcnQgJ3BhY2thZ2U6ZmxhbWUvcGFsZXR0ZS5kYXJ0JzsKaW1wb3J0ICdwYWNrYWdlOmZsdXR0ZXIvbWF0ZXJpYWwuZGFydCc7CgpmaW5hbCBfcm5nID0gUmFuZG9tKCk7Cgp2b2lkIG1haW4oKSB7CiAgcnVuQXBwKEdhbWVXaWRnZXQoZ2FtZTogTXlHYW1lKCkpKTsKfQoKY2xhc3MgTXlHYW1lIGV4dGVuZHMgRmxhbWVHYW1lIHdpdGggVGFwQ2FsbGJhY2tzIHsKICBsYXRlIGZpbmFsIE15Q29tcG9uZW50IG15Q29tcG9uZW50OwoKICBAb3ZlcnJpZGUKICBGdXR1cmU8dm9pZD4gb25Mb2FkKCkgYXN5bmMgewogICAgYXdhaXQgd29ybGQuYWRkKG15Q29tcG9uZW50ID0gTXlDb21wb25lbnQoKSk7CiAgICByZXR1cm4gc3VwZXIub25Mb2FkKCk7CiAgfQoKICBAb3ZlcnJpZGUKICB2b2lkIG9uVGFwVXAoVGFwVXBFdmVudCBldmVudCkgewogICAgbXlDb21wb25lbnQuc3BlZWQueCA9IC0xICsgMiAqIF9ybmcubmV4dERvdWJsZSgpOwogICAgbXlDb21wb25lbnQuc3BlZWQueSA9IC0xICsgMiAqIF9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iAgICBzZGs6IGZsdXR0ZXIKICBpbnRlZ3JhdGlvbl90ZXN0OgogICAgc2RrOiBmbHV0dGVyCgpmbHV0dGVyOgogIHVzZXMtbWF0ZXJpYWwtZGVzaWduOiBmYWxzZQ==","type":"text"},{"path":"test/widget_test.dart","data":"aW1wb3J0ICdwYWNrYWdlOmZsYW1lL2dhbWUuZGFydCc7CmltcG9ydCAncGFja2FnZTpmbGFtZV90ZXN0L2ZsYW1lX3Rlc3QuZGFydCc7CmltcG9ydCAncGFja2FnZTpmbHV0dGVyX3Rlc3QvZmx1dHRlcl90ZXN0LmRhcnQnOwoKaW1wb3J0ICdwYWNrYWdlOnt7bmFtZX19L21haW4uZGFydCc7CgpmaW5hbCBteUdhbWUgPSBGbGFtZVRlc3RlcihNeUdhbWUubmV3KTsKCnZvaWQgbWFpbigpIHsKICBteUdhbWUudGVzdEdhbWVXaWRnZXQoCiAgICAnZ2FtZSB3aWxsIGxvYWQgaXRzIGNoaWxkJywKICAgIHZlcmlmeTogKGdhbWUsIHRlc3RlcikgYXN5bmMgewogICAgICBnYW1lLnVwZGF0ZSgwLjApOwoKICAgICAgZXhwZWN0KGdhbWUuY2hpbGRyZW4ubGVuZ3RoLCAxKTsKICAgICAgZXhwZWN0KGdhbWUubXlDb21wb25lbnQuc3BlZWQsIFZlY3RvcjIuemVybygpKTsKCiAgICAgIGF3YWl0IHRlc3Rlci50YXBBdChjb25zdCBPZmZzZXQoMTAsIDEwKSk7CiAgICAgIGV4cGVjdChnYW1lLm15Q29tcG9uZW50LnNwZWVkLCBpc05vdChlcXVhbHMoVmVjdG9yMi56ZXJvKCkpKSk7CiAgICB9LAogICk7Cn0K","type":"text"}],"hooks":[],"name":"example","description":"An actual complete, working game example. Extra code that you won't need but will teach you how to wire the most important pieces.","version":"0.1.0","environment":{"mason":"any"},"vars":{"name":{"type":"string"},"description":{"type":"string"},"version":{"type":"string"},"flame-version":{"type":"string"},"flame-lint-version":{"type":"string"},"extra-dependencies":{"type":"array"},"extra-dev-dependencies":{"type":"array"}}}); \ No newline at end of file diff --git a/lib/templates/bricks/simple_bundle.dart b/lib/templates/bricks/simple_bundle.dart index 407b3e3..3ea6def 100644 --- a/lib/templates/bricks/simple_bundle.dart +++ b/lib/templates/bricks/simple_bundle.dart @@ -3,4 +3,4 @@ import 'package:mason/mason.dart'; -final simpleBundle = MasonBundle.fromJson({"files":[{"path":"analysis_options.yaml","data":"aW5jbHVkZTogcGFja2FnZTpmbGFtZV9saW50L2FuYWx5c2lzX29wdGlvbnMueWFtbA==","type":"text"},{"path":"lib/main.dart","data":"aW1wb3J0ICdwYWNrYWdlOmZsYW1lL2dhbWUuZGFydCc7CmltcG9ydCAncGFja2FnZTpmbHV0dGVyL21hdGVyaWFsLmRhcnQnOwoKdm9pZCBtYWluKCkgewogIHJ1bkFwcChHYW1lV2lkZ2V0KGdhbWU6IE15R2FtZSgpKSk7Cn0KCmNsYXNzIE15R2FtZSBleHRlbmRzIEZsYW1lR2FtZSB7CiAgQG92ZXJyaWRlCiAgRnV0dXJlPHZvaWQ+IG9uTG9hZCgpIGFzeW5jIHsKICAgIC8vIFRPRE8gYWRkIHlvdXIgbG9hZCBsb2dpYwogICAgcmV0dXJuIHN1cGVyLm9uTG9hZCgpOwogIH0KfQo=","type":"text"},{"path":"pubspec.yaml","data":"bmFtZToge3tuYW1lfX0KZGVzY3JpcHRpb246IHt7ZGVzY3JpcHRpb259fQp2ZXJzaW9uOiB7e3ZlcnNpb259fQoKcHVibGlzaF90bzogJ25vbmUnCgplbnZpcm9ubWVudDoKICBzZGs6ICI+PTIuMTcuMCA8My4wLjAiCgpkZXBlbmRlbmNpZXM6CiAgZmx1dHRlcjoKICAgIHNkazogZmx1dHRlcnt7I2V4dHJhLWRlcGVuZGVuY2llc319CiAge3tuYW1lfX06IHt7dmVyc2lvbn19e3svZXh0cmEtZGVwZW5kZW5jaWVzfX0KCmRldl9kZXBlbmRlbmNpZXM6e3sjZXh0cmEtZGV2LWRlcGVuZGVuY2llc319CiAge3tuYW1lfX06IHt7dmVyc2lvbn19e3svZXh0cmEtZGV2LWRlcGVuZGVuY2llc319CiAgZmx1dHRlcl90ZXN0OgogICAgc2RrOiBmbHV0dGVyCiAgaW50ZWdyYXRpb25fdGVzdDoKICAgIHNkazogZmx1dHRlcgoKZmx1dHRlcjoKICB1c2VzLW1hdGVyaWFsLWRlc2lnbjogZmFsc2U=","type":"text"}],"hooks":[],"name":"simple","description":"An empty Flame project with just the bare minimums to get you up and running.","version":"0.1.0","environment":{"mason":"any"},"vars":{"name":{"type":"string"},"description":{"type":"string"},"version":{"type":"string"},"flame-version":{"type":"string"},"flame-lint-version":{"type":"string"},"extra-dependencies":{"type":"array"},"extra-dev-dependencies":{"type":"array"}}}); \ No newline at end of file +final simpleBundle = MasonBundle.fromJson({"files":[{"path":"analysis_options.yaml","data":"aW5jbHVkZTogcGFja2FnZTpmbGFtZV9saW50L2FuYWx5c2lzX29wdGlvbnMueWFtbA==","type":"text"},{"path":"lib/main.dart","data":"aW1wb3J0ICdwYWNrYWdlOmZsYW1lL2dhbWUuZGFydCc7CmltcG9ydCAncGFja2FnZTpmbHV0dGVyL21hdGVyaWFsLmRhcnQnOwoKdm9pZCBtYWluKCkgewogIHJ1bkFwcChHYW1lV2lkZ2V0KGdhbWU6IE15R2FtZSgpKSk7Cn0KCmNsYXNzIE15R2FtZSBleHRlbmRzIEZsYW1lR2FtZSB7CiAgQG92ZXJyaWRlCiAgRnV0dXJlPHZvaWQ+IG9uTG9hZCgpIGFzeW5jIHsKICAgIC8vIFRPRE8gYWRkIHlvdXIgbG9hZCBsb2dpYwogICAgcmV0dXJuIHN1cGVyLm9uTG9hZCgpOwogIH0KfQo=","type":"text"},{"path":"pubspec.yaml","data":"bmFtZToge3tuYW1lfX0KZGVzY3JpcHRpb246IHt7ZGVzY3JpcHRpb259fQp2ZXJzaW9uOiB7e3ZlcnNpb259fQoKcHVibGlzaF90bzogJ25vbmUnCgplbnZpcm9ubWVudDoKICBzZGs6ICI+PTMuMC4wIDw0LjAuMCIKCmRlcGVuZGVuY2llczp7eyNleHRyYS1kZXBlbmRlbmNpZXN9fQogIHt7bmFtZX19OiB7e3ZlcnNpb259fXt7L2V4dHJhLWRlcGVuZGVuY2llc319CiAgZmx1dHRlcjoKICAgIHNkazogZmx1dHRlcgoKZGV2X2RlcGVuZGVuY2llczp7eyNleHRyYS1kZXYtZGVwZW5kZW5jaWVzfX0KICB7e25hbWV9fToge3t2ZXJzaW9ufX17ey9leHRyYS1kZXYtZGVwZW5kZW5jaWVzfX0KICBmbHV0dGVyX3Rlc3Q6CiAgICBzZGs6IGZsdXR0ZXIKICBpbnRlZ3JhdGlvbl90ZXN0OgogICAgc2RrOiBmbHV0dGVyCgpmbHV0dGVyOgogIHVzZXMtbWF0ZXJpYWwtZGVzaWduOiBmYWxzZQ==","type":"text"}],"hooks":[],"name":"simple","description":"An empty Flame project with just the bare minimums to get you up and running.","version":"0.1.0","environment":{"mason":"any"},"vars":{"name":{"type":"string"},"description":{"type":"string"},"version":{"type":"string"},"flame-version":{"type":"string"},"flame-lint-version":{"type":"string"},"extra-dependencies":{"type":"array"},"extra-dev-dependencies":{"type":"array"}}}); \ No newline at end of file diff --git a/lib/utils.dart b/lib/utils.dart index d1d7868..02f62a8 100644 --- a/lib/utils.dart +++ b/lib/utils.dart @@ -187,3 +187,9 @@ List cbx( } } } + +extension SortedBy on Iterable { + Iterable sortedBy(Comparable Function(T) selector) { + return toList()..sort((a, b) => selector(a).compareTo(selector(b))); + } +} diff --git a/pubspec.lock b/pubspec.lock index 9106ea6..8b6cc05 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -5,42 +5,42 @@ packages: dependency: transitive description: name: _fe_analyzer_shared - sha256: "0c80aeab9bc807ab10022cd3b2f4cf2ecdf231949dc1ddd9442406a003f19201" + sha256: "36a321c3d2cbe01cbcb3540a87b8843846e0206df3e691fa7b23e19e78de6d49" url: "https://pub.dev" source: hosted - version: "52.0.0" + version: "65.0.0" analyzer: dependency: transitive description: name: analyzer - sha256: cd8ee83568a77f3ae6b913a36093a1c9b1264e7cb7f834d9ddd2311dade9c1f4 + sha256: dfe03b90ec022450e22513b5e5ca1f01c0c01de9c3fba2f7fd233cb57a6b9a07 url: "https://pub.dev" source: hosted - version: "5.4.0" + version: "6.3.0" archive: dependency: transitive description: name: archive - sha256: d6347d54a2d8028e0437e3c099f66fdb8ae02c4720c1e7534c9f24c10351f85d + sha256: "7b875fd4a20b165a3084bd2d210439b22ebc653f21cea4842729c0c30c82596b" url: "https://pub.dev" source: hosted - version: "3.3.6" + version: "3.4.9" args: dependency: "direct main" description: name: args - sha256: "139d809800a412ebb26a3892da228b2d0ba36f0ef5d9a82166e5e52ec8d61611" + sha256: eef6c46b622e0494a36c5a12d10d77fb4e855501a91c1b9ef9339326e58f0596 url: "https://pub.dev" source: hosted - version: "2.3.2" + version: "2.4.2" async: dependency: transitive description: name: async - sha256: bfe67ef28df125b7dddcea62755991f807aa39a2492a23e1550161692950bbe0 + sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" url: "https://pub.dev" source: hosted - version: "2.10.0" + version: "2.11.0" boolean_selector: dependency: transitive description: @@ -61,18 +61,18 @@ packages: dependency: transitive description: name: checked_yaml - sha256: "3d1505d91afa809d177efd4eed5bb0eb65805097a1463abdd2add076effae311" + sha256: feb6bed21949061731a7a75fc5d2aa727cf160b91af9a3e464c5e3a32e28b5ff url: "https://pub.dev" source: hosted - version: "2.0.2" + version: "2.0.3" cli_completion: dependency: transitive description: name: cli_completion - sha256: "6f0c5920a85878652a84ad48c722655a7ea7fe6cd7074452a7c1e3efa389307b" + sha256: "1e87700c029c77041d836e57f9016b5c90d353151c43c2ca0c36deaadc05aa3a" url: "https://pub.dev" source: hosted - version: "0.2.0" + version: "0.4.0" cli_util: dependency: transitive description: @@ -85,10 +85,10 @@ packages: dependency: transitive description: name: collection - sha256: "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c" + sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a url: "https://pub.dev" source: hosted - version: "1.17.1" + version: "1.18.0" completion: dependency: "direct main" description: @@ -109,34 +109,34 @@ packages: dependency: transitive description: name: coverage - sha256: "961c4aebd27917269b1896382c7cb1b1ba81629ba669ba09c27a7e5710ec9040" + sha256: ac86d3abab0f165e4b8f561280ff4e066bceaac83c424dd19f1ae2c2fcd12ca9 url: "https://pub.dev" source: hosted - version: "1.6.2" + version: "1.7.1" crypto: dependency: transitive description: name: crypto - sha256: aa274aa7774f8964e4f4f38cc994db7b6158dd36e9187aaceaddc994b35c6c67 + sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab url: "https://pub.dev" source: hosted - version: "3.0.2" + version: "3.0.3" csslib: dependency: transitive description: name: csslib - sha256: b36c7f7e24c0bdf1bf9a3da461c837d1de64b9f8beb190c9011d8c72a3dfd745 + sha256: "706b5707578e0c1b4b7550f64078f0a0f19dec3f50a178ffae7006b0a9ca58fb" url: "https://pub.dev" source: hosted - version: "0.17.2" + version: "1.0.0" dartdoc: dependency: "direct dev" description: name: dartdoc - sha256: f9bf2fbf11e5dce3ffd085e1169f6218b632318403cb3f5762619e4d092e1e68 + sha256: c74b6481187b1704a788ad75affb9a2561c9f8d7baf3dab5c73afee25271a33d url: "https://pub.dev" source: hosted - version: "6.1.5" + version: "8.0.2" dartlin: dependency: "direct main" description: @@ -153,6 +153,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.0.5" + ffi: + dependency: transitive + description: + name: ffi + sha256: "7bf0adc28a23d395f19f3f1eb21dd7cfd1dd9f8e1c50051c069122e6853bc878" + url: "https://pub.dev" + source: hosted + version: "2.1.0" file: dependency: transitive description: @@ -165,10 +173,10 @@ packages: dependency: "direct dev" description: name: flame_lint - sha256: "537bca1509730377b048631f56b16749b011cb11468599de9f435f200806f61b" + sha256: "7dad67385e72cc8441cf39d2dfe16d69cc1687f56d91d5b27d7734f410d4edab" url: "https://pub.dev" source: hosted - version: "0.2.0" + version: "1.1.2" frontend_server_client: dependency: transitive description: @@ -181,26 +189,26 @@ packages: dependency: transitive description: name: glob - sha256: "4515b5b6ddb505ebdd242a5f2cc5d22d3d6a80013789debfbda7777f47ea308c" + sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63" url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.1.2" html: dependency: transitive description: name: html - sha256: d9793e10dbe0e6c364f4c59bf3e01fb33a9b2a674bc7a1081693dba0614b6269 + sha256: "3a7812d5bcd2894edf53dfaf8cd640876cf6cef50a8f238745c8b8120ea74d3a" url: "https://pub.dev" source: hosted - version: "0.15.1" + version: "0.15.4" http: dependency: "direct main" description: name: http - sha256: "6aa2946395183537c8b880962d935877325d6a09a2867c3970c05c0fed6ac482" + sha256: "5895291c13fa8a3bd82e76d5627f69e0d85ca6a30dcac95c4ea19a5d555879c2" url: "https://pub.dev" source: hosted - version: "0.13.5" + version: "0.13.6" http_multi_server: dependency: transitive description: @@ -229,82 +237,82 @@ packages: dependency: transitive description: name: js - sha256: "323b7c70073cccf6b9b8d8b334be418a3293cfb612a560dc2737160a37bf61bd" + sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 url: "https://pub.dev" source: hosted - version: "0.6.6" + version: "0.6.7" json_annotation: dependency: transitive description: name: json_annotation - sha256: c33da08e136c3df0190bd5bbe51ae1df4a7d96e7954d1d7249fea2968a72d317 + sha256: b10a7b2ff83d83c777edba3c6a0f97045ddadd56c944e1a23a3fdf43a1bf4467 url: "https://pub.dev" source: hosted - version: "4.8.0" + version: "4.8.1" logging: dependency: transitive description: name: logging - sha256: "04094f2eb032cbb06c6f6e8d3607edcfcb0455e2bb6cbc010cb01171dcb64e6d" + sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340" url: "https://pub.dev" source: hosted - version: "1.1.1" + version: "1.2.0" markdown: dependency: transitive description: name: markdown - sha256: c2b81e184067b41d0264d514f7cdaa2c02d38511e39d6521a1ccc238f6d7b3f2 + sha256: acf35edccc0463a9d7384e437c015a3535772e09714cf60e07eeef3a15870dcd url: "https://pub.dev" source: hosted - version: "6.0.1" + version: "7.1.1" mason: dependency: "direct main" description: name: mason - sha256: e7b919e7d1f300504017d168d0d4d253cd06ef812149561d984abd3af8ad3ee2 + sha256: c036d801a53bba2eb70deb5ed0cce8adc6cd11bed597aaffa8d4f011d7037976 url: "https://pub.dev" source: hosted - version: "0.1.0-dev.41" + version: "0.1.0-dev.51" mason_api: dependency: transitive description: name: mason_api - sha256: a4c9a742e605e1a80ace4aa77fb74fc49e126885aa935b22b75b65a47f6c8606 + sha256: "91d6078610679e97c763fb77410c0eb8880d40d7016b3cb711f893a4859fd5c2" url: "https://pub.dev" source: hosted - version: "0.1.0-dev.9" + version: "0.1.0-dev.10" mason_cli: dependency: "direct dev" description: name: mason_cli - sha256: "39a6315580398ff2ceb9cac2eca702905c22b1c143abecf8b08e7ef38178f25e" + sha256: "855568ff0967d4c9141e43b6c6b1335a739bac2e542314f590aa27d320f49150" url: "https://pub.dev" source: hosted - version: "0.1.0-dev.44" + version: "0.1.0-dev.53" mason_logger: dependency: transitive description: name: mason_logger - sha256: "893b47be5628aa97ec802111e64799b90bfeaf74f03976b0ca0fc19ecd0044c9" + sha256: b8c9d94617c09d4312e4f180ba191f15024a5d2c7027df99d3cdcb4b70675f87 url: "https://pub.dev" source: hosted - version: "0.2.4" + version: "0.2.10" matcher: dependency: transitive description: name: matcher - sha256: c94db23593b89766cda57aab9ac311e3616cf87c6fa4e9749df032f66f30dcb8 + sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" url: "https://pub.dev" source: hosted - version: "0.12.14" + version: "0.12.16" meta: dependency: transitive description: name: meta - sha256: "12307e7f0605ce3da64cf0db90e5fcab0869f3ca03f76be6bb2991ce0a55e82b" + sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 url: "https://pub.dev" source: hosted - version: "1.9.0" + version: "1.11.0" mime: dependency: transitive description: @@ -325,10 +333,10 @@ packages: dependency: transitive description: name: node_preamble - sha256: "8ebdbaa3b96d5285d068f80772390d27c21e1fa10fb2df6627b1b9415043608d" + sha256: "6e7eac89047ab8a8d26cf16127b5ed26de65209847630400f9aefd7cd5c730db" url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "2.0.2" package_config: dependency: transitive description: @@ -341,34 +349,26 @@ packages: dependency: "direct main" description: name: path - sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" url: "https://pub.dev" source: hosted - version: "1.8.3" - pedantic: - dependency: "direct dev" - description: - name: pedantic - sha256: "67fc27ed9639506c856c840ccce7594d0bdcd91bc8d53d6e52359449a1d50602" - url: "https://pub.dev" - source: hosted - version: "1.11.1" + version: "1.9.0" platform: dependency: transitive description: name: platform - sha256: "4a451831508d7d6ca779f7ac6e212b4023dd5a7d08a27a63da33756410e32b76" + sha256: "0a279f0707af40c890e80b1e9df8bb761694c074ba7e1d4ab1bc4b728e200b59" url: "https://pub.dev" source: hosted - version: "3.1.0" + version: "3.1.3" pointycastle: dependency: transitive description: name: pointycastle - sha256: db7306cf0249f838d1a24af52b5a5887c5bf7f31d8bb4e827d071dc0939ad346 + sha256: "7c1e5f0d23c9016c5bbd8b1473d0d3fb3fc851b876046039509e18e0c7485f2c" url: "https://pub.dev" source: hosted - version: "3.6.2" + version: "3.7.3" pool: dependency: transitive description: @@ -389,10 +389,10 @@ packages: dependency: "direct main" description: name: process_run - sha256: "1142d7f4f0c3f36393a1319406efcf481def2b6d862b2bf600c8ae8fa74d5bd8" + sha256: "94413ec6bbd05dfe7c3002c379724f75f185ff7f0a5dfb1851a42473d84c956e" url: "https://pub.dev" source: hosted - version: "0.12.5+2" + version: "0.13.3" prompts: dependency: "direct main" description: @@ -405,58 +405,50 @@ packages: dependency: transitive description: name: pub_semver - sha256: "307de764d305289ff24ad257ad5c5793ce56d04947599ad68b3baa124105fc17" + sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c" url: "https://pub.dev" source: hosted - version: "2.1.3" + version: "2.1.4" pub_updater: dependency: transitive description: name: pub_updater - sha256: "42890302ab2672adf567dc2b20e55b4ecc29d7e19c63b6b98143ab68dd717d3a" + sha256: "05ae70703e06f7fdeb05f7f02dd680b8aad810e87c756a618f33e1794635115c" url: "https://pub.dev" source: hosted - version: "0.2.4" - recase: - dependency: transitive - description: - name: recase - sha256: e4eb4ec2dcdee52dcf99cb4ceabaffc631d7424ee55e56f280bc039737f89213 - url: "https://pub.dev" - source: hosted - version: "4.1.0" + version: "0.3.0" shelf: dependency: transitive description: name: shelf - sha256: c24a96135a2ccd62c64b69315a14adc5c3419df63b4d7c05832a346fdb73682c + sha256: ad29c505aee705f41a4d8963641f91ac4cee3c8fad5947e033390a7bd8180fa4 url: "https://pub.dev" source: hosted - version: "1.4.0" + version: "1.4.1" shelf_packages_handler: dependency: transitive description: name: shelf_packages_handler - sha256: aef74dc9195746a384843102142ab65b6a4735bb3beea791e63527b88cc83306 + sha256: "89f967eca29607c933ba9571d838be31d67f53f6e4ee15147d5dc2934fee1b1e" url: "https://pub.dev" source: hosted - version: "3.0.1" + version: "3.0.2" shelf_static: dependency: transitive description: name: shelf_static - sha256: e792b76b96a36d4a41b819da593aff4bdd413576b3ba6150df5d8d9996d2e74c + sha256: a41d3f53c4adf0f57480578c1d61d90342cd617de7fc8077b1304643c2d85c1e url: "https://pub.dev" source: hosted - version: "1.1.1" + version: "1.1.2" shelf_web_socket: dependency: transitive description: name: shelf_web_socket - sha256: a988c0e8d8ffbdb8a28aa7ec8e449c260f3deb808781fe1284d22c5bba7156e8 + sha256: "9ca081be41c60190ebcb4766b2486a7d50261db7bd0f5d9615f2d653637a84c1" url: "https://pub.dev" source: hosted - version: "1.0.3" + version: "1.0.4" source_map_stack_trace: dependency: transitive description: @@ -469,34 +461,34 @@ packages: dependency: transitive description: name: source_maps - sha256: "490098075234dcedb83c5d949b4c93dad5e6b7702748de000be2b57b8e6b2427" + sha256: "708b3f6b97248e5781f493b765c3337db11c5d2c81c3094f10904bfa8004c703" url: "https://pub.dev" source: hosted - version: "0.10.11" + version: "0.10.12" source_span: dependency: transitive description: name: source_span - sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250 + sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" url: "https://pub.dev" source: hosted - version: "1.9.1" + version: "1.10.0" stack_trace: dependency: transitive description: name: stack_trace - sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5 + sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" url: "https://pub.dev" source: hosted - version: "1.11.0" + version: "1.11.1" stream_channel: dependency: transitive description: name: stream_channel - sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8" + sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.1.2" string_scanner: dependency: transitive description: @@ -509,10 +501,10 @@ packages: dependency: transitive description: name: synchronized - sha256: "33b31b6beb98100bf9add464a36a8dd03eb10c7a8cf15aeec535e9b054aaf04b" + sha256: "5fcbd27688af6082f5abd611af56ee575342c30e87541d0245f7ff99faa02c60" url: "https://pub.dev" source: hosted - version: "3.0.1" + version: "3.1.0" term_glyph: dependency: transitive description: @@ -525,73 +517,81 @@ packages: dependency: "direct dev" description: name: test - sha256: b54d427664c00f2013ffb87797a698883c46aee9288e027a50b46eaee7486fa2 + sha256: a1f7595805820fcc05e5c52e3a231aedd0b72972cb333e8c738a8b1239448b6f url: "https://pub.dev" source: hosted - version: "1.22.2" + version: "1.24.9" test_api: dependency: transitive description: name: test_api - sha256: "6182294da5abf431177fccc1ee02401f6df30f766bc6130a0852c6b6d7ee6b2d" + sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" url: "https://pub.dev" source: hosted - version: "0.4.18" + version: "0.6.1" test_core: dependency: transitive description: name: test_core - sha256: "95ecc12692d0dd59080ab2d38d9cf32c7e9844caba23ff6cd285690398ee8ef4" + sha256: a757b14fc47507060a162cc2530d9a4a2f92f5100a952c7443b5cad5ef5b106a url: "https://pub.dev" source: hosted - version: "0.4.22" + version: "0.5.9" typed_data: dependency: transitive description: name: typed_data - sha256: "26f87ade979c47a150c9eaab93ccd2bebe70a27dc0b4b29517f2904f04eb11a5" + sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c url: "https://pub.dev" source: hosted - version: "1.3.1" + version: "1.3.2" vm_service: dependency: transitive description: name: vm_service - sha256: "2277c73618916ae3c2082b6df67b6ebb64b4c69d9bf23b23700707952ac30e60" + sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 url: "https://pub.dev" source: hosted - version: "10.1.2" + version: "13.0.0" watcher: dependency: transitive description: name: watcher - sha256: "6a7f46926b01ce81bfc339da6a7f20afbe7733eff9846f6d6a5466aa4c6667c0" + sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8" url: "https://pub.dev" source: hosted - version: "1.0.2" + version: "1.1.0" web_socket_channel: dependency: transitive description: name: web_socket_channel - sha256: ca49c0bc209c687b887f30527fb6a9d80040b072cc2990f34b9bec3e7663101b + sha256: d88238e5eac9a42bb43ca4e721edba3c08c6354d4a53063afaa568516217621b url: "https://pub.dev" source: hosted - version: "2.3.0" + version: "2.4.0" webkit_inspection_protocol: dependency: transitive description: name: webkit_inspection_protocol - sha256: "67d3a8b6c79e1987d19d848b0892e582dbb0c66c57cc1fef58a177dd2aa2823d" + sha256: "87d3f2333bb240704cd3f1c6b5b7acd8a10e7f0bc28c28dcf14e782014f4a572" url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.2.1" + win32: + dependency: transitive + description: + name: win32 + sha256: b0f37db61ba2f2e9b7a78a1caece0052564d1bc70668156cf3a29d676fe4e574 + url: "https://pub.dev" + source: hosted + version: "5.1.1" yaml: dependency: "direct main" description: name: yaml - sha256: "23812a9b125b48d4007117254bca50abb6c712352927eece9e155207b1db2370" + sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5" url: "https://pub.dev" source: hosted - version: "3.1.1" + version: "3.1.2" sdks: - dart: ">=2.19.0-345.0.dev <4.0.0" + dart: ">=3.1.0 <4.0.0" diff --git a/pubspec.yaml b/pubspec.yaml index 6cbea2e..b64620d 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -8,24 +8,23 @@ executables: ignite: environment: - sdk: '>=2.17.0 <3.0.0' + sdk: ">=3.0.0 <4.0.0" dependencies: - args: ^2.1.0 + args: ^2.4.2 charcode: ^1.3.1 - completion: ^1.0.0 + completion: ^1.0.1 dartlin: ^0.6.3 http: ^0.13.4 - io: ^1.0.3 - mason: ^0.1.0-dev.41 - path: ^1.8.2 - process_run: ^0.12.3+2 + io: ^1.0.4 + mason: ^0.1.0-dev.51 + path: ^1.9.0 + process_run: ^0.13.3 prompts: ^2.0.0 - yaml: ^3.1.0 + yaml: ^3.1.2 dev_dependencies: - dartdoc: ^6.1.5 - flame_lint: ^0.2.0 - mason_cli: ^0.1.0-dev.44 - pedantic: ^1.11.0 - test: ^1.16.0 \ No newline at end of file + dartdoc: ^8.0.2 + flame_lint: ^1.1.2 + mason_cli: ^0.1.0-dev.53 + test: ^1.24.9 \ No newline at end of file diff --git a/scripts/build.sh b/scripts/build.sh index b19d44c..f79ed5e 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -2,7 +2,7 @@ # TODO(luan): use a wildcard once supported function bundle { - flutter pub run mason_cli:mason bundle $1 -t dart -o lib/templates/bricks/ + dart run mason_cli:mason bundle $1 -t dart -o lib/templates/bricks/ } rm -rf lib/templates/bricks