2024-10-21 03:18:25 +00:00
# This file is part of the Protevus Platform.
#
# (C) Protevus <developers@protevus.com>
#
# For the full copyright and license information, please view the LICENSE
# file that was distributed with this source code.
2024-10-21 02:00:02 +00:00
# THIS FILE IS AUTOGENERATED BY MELOS. DO NOT EDIT THIS FILE DIRECTLY.
# EDIT THE CORRESPONDING YAML FILES INSTEAD.
2024-07-08 04:34:07 +00:00
name : protevus_platform
repository : https://github.com/protevus/platform
packages :
2024-10-28 05:54:30 +00:00
- apps/**
2024-07-08 04:34:07 +00:00
- packages/**
2024-11-12 08:00:05 +00:00
- sandbox/**
2024-11-11 19:52:28 +00:00
- helpers/tools/**
2024-09-06 18:54:27 +00:00
- examples/**
2024-07-08 06:26:05 +00:00
command :
version :
linkToCommits : true
2024-10-20 18:49:41 +00:00
message : "chore: Bump version to %v"
2024-07-08 06:26:05 +00:00
branch : main
workspaceChangelog : true
2024-10-21 03:18:25 +00:00
2024-07-08 04:34:07 +00:00
ide :
intellij :
enabled : false
2024-10-20 18:49:41 +00:00
scripts :
analyze :
run : dart analyze .
description : Run static analysis on all packages
format :
run : dart format .
description : Format all Dart files in the repository
generate :
run : melos exec -- "dart run build_runner build --delete-conflicting-outputs"
description : Run code generation for all packages
2024-10-21 01:50:34 +00:00
generate:custom :
run : melos exec --scope="$MELOS_SCOPE" -- "dart run build_runner build --delete-conflicting-outputs"
description : Run code generation for specified packages (use with MELOS_SCOPE env var)
generate:check :
run : "melos exec --scope=\"$MELOS_SCOPE\" -- \" if grep -q 'build_runner' pubspec.yaml; then\n if [ -n \\\"$(find lib test example -name '*.g.dart' -o -name '*.freezed.dart' -o -name '*.reflectable.dart' 2>\/dev\/null)\\\" ]; then\n echo \\\"Package {MELOS_PACKAGE_NAME} needs code generation.\\\"\n else\n echo \\\"Package {MELOS_PACKAGE_NAME} has build_runner but no generated files found.\\\"\n fi\nelse\n echo \\\"Package {MELOS_PACKAGE_NAME} does not use build_runner.\\\"\nfi \"\n"
description : Check if code generation is needed (use with MELOS_SCOPE env var)
generate:dummy:test :
run : "melos exec --scope=\"$MELOS_SCOPE\" -- \" echo ' import \\\"package:test\/test.dart\\\";\nvoid main() {\n group(\\\"Dummy Test\\\", () {\n test(\\\"Always passes\\\", () {\n expect(true, isTrue);\n });\n\n test(\\\"Basic arithmetic\\\", () {\n expect(2 + 2, equals(4));\n });\n\n test(\\\"String manipulation\\\", () {\n String testString = \\\"Protevus Platform\\\";\n expect(testString.contains(\\\"Platform\\\"), isTrue);\n expect(testString.toLowerCase(), equals(\\\"protevus platform\\\"));\n });\n });\n} ' > test\/dummy_test.dart \"\n"
description : Generate a dummy test file in the specified package(s)
publish :
run : melos publish
description : Publish all packages that have changed.
publish:check :
run : melos publish --dry-run
description : Check which packages would be published
2024-10-20 18:49:41 +00:00
docs:generate :
run : melos exec -- "dart doc ."
description : Generate documentation for all packages
2024-10-21 01:50:34 +00:00
docs:generate:custom :
run : melos exec --scope="$MELOS_SCOPE" -- "dart doc ."
description : Generate documentation for specified packages (use with MELOS_SCOPE env var)
docs:serve :
run : dhttpd --path doc
description : Serve generated documentation
docs:serve:custom :
run : "melos exec --scope=\"$MELOS_SCOPE\" -- \"echo 'Serving docs for {MELOS_PACKAGE_NAME}' && dhttpd --path doc --port \\${DOC_PORT:-8080}\"\n"
description : Serve generated documentation for specified packages (use with MELOS_SCOPE and optionally DOC_PORT env vars)
2024-10-21 04:52:47 +00:00
coverage :
run : "melos exec -c 1 --fail-fast -- \"dart pub add --dev coverage && dart test --coverage=coverage && dart pub global activate coverage && dart pub global run coverage:format_coverage -l --packages=.dart_tool\/package_config.json --report-on=lib\/ -i coverage -o coverage\/lcov.info && dart pub remove coverage\"\n"
description : Run tests with coverage and generate LCOV report for each package
coverage_report :
run : "melos exec -c 1 --fail-fast -- \" if [ -s coverage\/lcov.info ]; then\n genhtml -o coverage_report coverage\/lcov.info;\n echo 'Coverage report generated successfully.';\nelse\n echo 'No valid coverage data found. Skipping report generation.';\nfi \"\n"
description : "Generate HTML coverage report from LCOV data for each package, if valid data exists"
2024-10-21 06:58:22 +00:00
clean :
run : "melos exec -c 1 --fail-fast -- \" rm -rf build .dart_tool .packages .flutter-plugins .flutter-plugins-dependencies .pub-cache .pub .idea coverage doc\/api .test_coverage.dart .test_runner.dart && find . -name '*.g.dart' -delete && find . -name '*.freezed.dart' -delete && find . -name '*.mocks.dart' -delete && find . -name '*.gr.dart' -delete && find . -name '*.config.dart' -delete && find . -name '*.hive.dart' -delete && find . -name '*.chopper.dart' -delete && find . -name '*.reflectable.dart' -delete && find . -name '*.injectable.dart' -delete && find . -name '*.gql.dart' -delete && find . -name '*.gql.g.dart' -delete && find . -name '*.iconfig.dart' -delete && find . -name '*.moor.dart' -delete && find . -name '*.drift.dart' -delete && find . -name '*.mapper.dart' -delete && find . -name '*.ast.gql.dart' -delete && find . -name '*.req.gql.dart' -delete && find . -name '*.data.gql.dart' -delete && find . -name '*.var.gql.dart' -delete && find . -name '*.jorm.dart' -delete && find . -name '*.g.aot' -delete && find . -name '*.g.ddc' -delete && find . -name '*.g.js' -delete && find . -name '*.g.js.map' -delete && find . -name '*.g.part' -delete && find . -name '*.g.sum' -delete && find . -name '*.g.txt' -delete && find . -name 'lcov.info' -delete && find . -name 'coverage_report' -type d -exec rm -r {} + && git clean -xdf \" && flutter clean\n"
description : "Thoroughly clean all build artifacts, generated files, coverage reports, and documentation from the entire repository"
configure :
2024-10-21 07:13:19 +00:00
run : "melos bootstrap && MELOS_SCOPE=\"platform_container_generator\" melos run generate:custom && MELOS_SCOPE=\"platform_model, platform_exceptions, platform_mocking\" melos run generate:dummy:test && MELOS_SCOPE=\"platform_container_generator\" melos run debug:reflectable && melos run test && melos run coverage && melos run coverage_report && melos run docs:generate\n"
2024-10-21 06:58:22 +00:00
description : "Configure the development environment, generate code and dummy tests, run tests, generate coverage, and create API documentation"
2024-10-28 06:24:00 +00:00
template :
name : Create from template
description : "Creates a new project from a template in the templates directory.\n\nUsage: melos run template template_name:name type:dart|flutter name:project_name\n\nExample:\n melos run template template_name:bloc_app type:flutter name:my_new_app\n melos run template template_name:core_package type:dart name:core_utils\n"
run : dart run helpers/create_from_template.dart $MELOS_ARGS
2024-10-21 01:50:34 +00:00
test :
run : melos exec -c 1 --fail-fast -- "dart test"
description : Run tests for all packages
test:custom :
run : melos exec --scope="$MELOS_SCOPE" -- dart test
description : Run tests for specified packages (use with MELOS_SCOPE env var)
2024-10-28 05:54:30 +00:00
create :
name : Create new package or application
description : "Creates a new Dart package or Flutter application in the appropriate directory.\n\nUsage: melos run create -- --type dart|flutter --category type --name project_name\n\nAvailable categories for Dart:\n - package : Basic Dart package\n - console : Command-line application\n - server : Server-side application\n - desktop : Desktop application\n - plugin : Dart plugin\n\nAvailable categories for Flutter:\n - app : Mobile application\n - web : Web application\n - desktop : Desktop application\n - plugin : Flutter plugin\n - module : Flutter module\n - package : Flutter package\n"
run : dart run helpers/create_project.dart $MELOS_ARGS
2024-10-20 18:49:41 +00:00
deps:check :
run : melos exec -- "dart pub outdated"
description : Check for outdated dependencies
deps:upgrade :
run : melos exec -- "dart pub upgrade"
description : Upgrade all dependencies to their latest versions
2024-10-21 01:50:34 +00:00
deps:upgrade:custom :
run : melos exec --scope="$MELOS_SCOPE" -- "dart pub upgrade"
description : Upgrade dependencies for specified packages (use with MELOS_SCOPE env var)
ci :
run : melos run analyze && melos run test
description : Run full CI pipeline
2024-10-20 18:49:41 +00:00
debug_pkg_name :
2024-10-21 01:50:34 +00:00
run : "melos exec -- echo \"Package name is {MELOS_PACKAGE_NAME}\""
2024-10-20 18:49:41 +00:00
description : Debug package name resolution
debug_pkg_path :
2024-10-21 01:50:34 +00:00
run : "melos exec -- echo \"Package name is {MELOS_PACKAGE_PATH}\""
description : Debug package path resolution
debug:reflectable :
run : "melos exec --scope=\"$MELOS_SCOPE\" -- \" echo \\\"Checking for .reflectable.dart files in {MELOS_PACKAGE_NAME}\\\" && find lib test example -name '*.reflectable.dart' -print 2>\/dev\/null \"\n"
description : Debug script to find .reflectable.dart files (use with MELOS_SCOPE env var)
list:dart:files :
run : "melos exec --scope=\"$MELOS_SCOPE\" -- \" echo \\\"Listing all Dart files in {MELOS_PACKAGE_NAME}:\\\" && find lib test example -name '*.dart' -print 2>\/dev\/null \"\n"
description : List all Dart files in specified package(s) (use with MELOS_SCOPE env var)
combine_config :
run : dart helpers/combine_melos_config.dart
description : Combine Melos configuration files
2024-10-21 03:18:25 +00:00
help :
run : dart helpers/print_melos_commands.dart
description : Display a formatted list of all available Melos commands