From ce6c4c56fae0922c63dde4a1e33555f57046118d Mon Sep 17 00:00:00 2001 From: Patrick Stewart Date: Sun, 15 Dec 2024 12:58:42 -0700 Subject: [PATCH] refactor: refactored validate > validation --- packages/{validate => validation}/.gitignore | 0 packages/{validate => validation}/AUTHORS.md | 0 packages/{validate => validation}/CHANGELOG.md | 0 packages/{validate => validation}/LICENSE | 0 packages/{validate => validation}/README.md | 8 ++++---- packages/{validate => validation}/analysis_options.yaml | 0 packages/{validate => validation}/example/main.dart | 2 +- .../lib/platform_validation.dart} | 2 +- packages/{validate => validation}/lib/server.dart | 6 +++--- packages/{validate => validation}/lib/src/async.dart | 0 .../{validate => validation}/lib/src/context_aware.dart | 0 .../lib/src/context_validator.dart | 0 packages/{validate => validation}/lib/src/matchers.dart | 0 packages/{validate => validation}/lib/src/validator.dart | 0 packages/{validate => validation}/pubspec.yaml | 2 +- .../{validate => validation}/test/basic_data_test.dart | 2 +- .../{validate => validation}/test/complex_data_test.dart | 2 +- packages/{validate => validation}/test/server_test.dart | 2 +- packages/{validate => validation}/validate.iml | 0 packages/{validate => validation}/web/index.html | 2 +- packages/{validate => validation}/web/main.dart | 2 +- 21 files changed, 15 insertions(+), 15 deletions(-) rename packages/{validate => validation}/.gitignore (100%) rename packages/{validate => validation}/AUTHORS.md (100%) rename packages/{validate => validation}/CHANGELOG.md (100%) rename packages/{validate => validation}/LICENSE (100%) rename packages/{validate => validation}/README.md (96%) rename packages/{validate => validation}/analysis_options.yaml (100%) rename packages/{validate => validation}/example/main.dart (88%) rename packages/{validate/lib/angel3_validate.dart => validation/lib/platform_validation.dart} (93%) rename packages/{validate => validation}/lib/server.dart (97%) rename packages/{validate => validation}/lib/src/async.dart (100%) rename packages/{validate => validation}/lib/src/context_aware.dart (100%) rename packages/{validate => validation}/lib/src/context_validator.dart (100%) rename packages/{validate => validation}/lib/src/matchers.dart (100%) rename packages/{validate => validation}/lib/src/validator.dart (100%) rename packages/{validate => validation}/pubspec.yaml (93%) rename packages/{validate => validation}/test/basic_data_test.dart (95%) rename packages/{validate => validation}/test/complex_data_test.dart (95%) rename packages/{validate => validation}/test/server_test.dart (97%) rename packages/{validate => validation}/validate.iml (100%) rename packages/{validate => validation}/web/index.html (95%) rename packages/{validate => validation}/web/main.dart (97%) diff --git a/packages/validate/.gitignore b/packages/validation/.gitignore similarity index 100% rename from packages/validate/.gitignore rename to packages/validation/.gitignore diff --git a/packages/validate/AUTHORS.md b/packages/validation/AUTHORS.md similarity index 100% rename from packages/validate/AUTHORS.md rename to packages/validation/AUTHORS.md diff --git a/packages/validate/CHANGELOG.md b/packages/validation/CHANGELOG.md similarity index 100% rename from packages/validate/CHANGELOG.md rename to packages/validation/CHANGELOG.md diff --git a/packages/validate/LICENSE b/packages/validation/LICENSE similarity index 100% rename from packages/validate/LICENSE rename to packages/validation/LICENSE diff --git a/packages/validate/README.md b/packages/validation/README.md similarity index 96% rename from packages/validate/README.md rename to packages/validation/README.md index 6809263..ac60480 100644 --- a/packages/validate/README.md +++ b/packages/validation/README.md @@ -1,6 +1,6 @@ # Angel3 Validate -![Pub Version (including pre-releases)](https://img.shields.io/pub/v/angel3_validate?include_prereleases) +![Pub Version (including pre-releases)](https://img.shields.io/pub/v/platform_validation?include_prereleases) [![Null Safety](https://img.shields.io/badge/null-safety-brightgreen)](https://dart.dev/null-safety) [![Discord](https://img.shields.io/discord/1060322353214660698)](https://discord.gg/3X6bxTUdCM) [![License](https://img.shields.io/github/license/dart-backend/angel)](https://github.com/dart-backend/angel/tree/master/packages/validate/LICENSE) @@ -30,7 +30,7 @@ For convenience's sake, this library also exports `matcher`. ### Creating a Validator ```dart -import 'package:angel3_validate/angel3_validate.dart'; +import 'package:platform_validation/platform_validation.dart'; main() { var validator = Validator({ @@ -131,7 +131,7 @@ main() { ### Custom Error Messages -If these are not present, `angel3_validate` will *attempt* to generate a coherent error message on its own. +If these are not present, `platform_validation` will *attempt* to generate a coherent error message on its own. ```dart Validator({ @@ -270,7 +270,7 @@ main() { ```dart import 'package:angel3_framework/angel3_framework.dart'; -import 'package:angel3_validate/server.dart'; +import 'package:platform_validation/server.dart'; final Validator echo = Validator({ 'message*': (String message) => message.length >= 5 diff --git a/packages/validate/analysis_options.yaml b/packages/validation/analysis_options.yaml similarity index 100% rename from packages/validate/analysis_options.yaml rename to packages/validation/analysis_options.yaml diff --git a/packages/validate/example/main.dart b/packages/validation/example/main.dart similarity index 88% rename from packages/validate/example/main.dart rename to packages/validation/example/main.dart index 145945a..b508bd6 100644 --- a/packages/validate/example/main.dart +++ b/packages/validation/example/main.dart @@ -1,4 +1,4 @@ -import 'package:angel3_validate/angel3_validate.dart'; +import 'package:platform_validation/platform_validation.dart'; void main() { var bio = Validator({ diff --git a/packages/validate/lib/angel3_validate.dart b/packages/validation/lib/platform_validation.dart similarity index 93% rename from packages/validate/lib/angel3_validate.dart rename to packages/validation/lib/platform_validation.dart index 33bb43b..7a1fe14 100644 --- a/packages/validate/lib/angel3_validate.dart +++ b/packages/validation/lib/platform_validation.dart @@ -1,5 +1,5 @@ /// Cross-platform validation library based on `matcher`. -library angel3_validate; +library platform_validation; export 'package:matcher/matcher.dart'; export 'src/context_aware.dart'; diff --git a/packages/validate/lib/server.dart b/packages/validation/lib/server.dart similarity index 97% rename from packages/validate/lib/server.dart rename to packages/validation/lib/server.dart index a47d806..6694be7 100644 --- a/packages/validate/lib/server.dart +++ b/packages/validation/lib/server.dart @@ -1,13 +1,13 @@ /// Support for using `angel_validate` with the Angel Framework. -library angel3_validate.server; +library platform_validation.server; import 'dart:async'; import 'package:platform_foundation/core.dart'; import 'src/async.dart'; -import 'angel3_validate.dart'; +import 'platform_validation.dart'; export 'src/async.dart'; -export 'angel3_validate.dart'; +export 'platform_validation.dart'; /// Auto-parses numbers in `req.bodyAsMap`. RequestHandler autoParseBody(List fields) { diff --git a/packages/validate/lib/src/async.dart b/packages/validation/lib/src/async.dart similarity index 100% rename from packages/validate/lib/src/async.dart rename to packages/validation/lib/src/async.dart diff --git a/packages/validate/lib/src/context_aware.dart b/packages/validation/lib/src/context_aware.dart similarity index 100% rename from packages/validate/lib/src/context_aware.dart rename to packages/validation/lib/src/context_aware.dart diff --git a/packages/validate/lib/src/context_validator.dart b/packages/validation/lib/src/context_validator.dart similarity index 100% rename from packages/validate/lib/src/context_validator.dart rename to packages/validation/lib/src/context_validator.dart diff --git a/packages/validate/lib/src/matchers.dart b/packages/validation/lib/src/matchers.dart similarity index 100% rename from packages/validate/lib/src/matchers.dart rename to packages/validation/lib/src/matchers.dart diff --git a/packages/validate/lib/src/validator.dart b/packages/validation/lib/src/validator.dart similarity index 100% rename from packages/validate/lib/src/validator.dart rename to packages/validation/lib/src/validator.dart diff --git a/packages/validate/pubspec.yaml b/packages/validation/pubspec.yaml similarity index 93% rename from packages/validate/pubspec.yaml rename to packages/validation/pubspec.yaml index e222688..70d58fd 100644 --- a/packages/validate/pubspec.yaml +++ b/packages/validation/pubspec.yaml @@ -1,4 +1,4 @@ -name: angel3_validate +name: platform_validation description: Cross-platform HTTP request body validator library based on `matcher`. version: 8.2.0 homepage: https://angel3-framework.web.app/ diff --git a/packages/validate/test/basic_data_test.dart b/packages/validation/test/basic_data_test.dart similarity index 95% rename from packages/validate/test/basic_data_test.dart rename to packages/validation/test/basic_data_test.dart index 68ea10e..a6224c8 100644 --- a/packages/validate/test/basic_data_test.dart +++ b/packages/validation/test/basic_data_test.dart @@ -1,4 +1,4 @@ -import 'package:angel3_validate/angel3_validate.dart'; +import 'package:platform_validation/platform_validation.dart'; import 'package:test/test.dart'; final Validator emailSchema = diff --git a/packages/validate/test/complex_data_test.dart b/packages/validation/test/complex_data_test.dart similarity index 95% rename from packages/validate/test/complex_data_test.dart rename to packages/validation/test/complex_data_test.dart index 23f0af5..87e7874 100644 --- a/packages/validate/test/complex_data_test.dart +++ b/packages/validation/test/complex_data_test.dart @@ -1,4 +1,4 @@ -import 'package:angel3_validate/angel3_validate.dart'; +import 'package:platform_validation/platform_validation.dart'; import 'package:test/test.dart'; void main() { diff --git a/packages/validate/test/server_test.dart b/packages/validation/test/server_test.dart similarity index 97% rename from packages/validate/test/server_test.dart rename to packages/validation/test/server_test.dart index c39eb16..ef80390 100644 --- a/packages/validate/test/server_test.dart +++ b/packages/validation/test/server_test.dart @@ -4,7 +4,7 @@ import 'dart:convert'; import 'package:platform_foundation/core.dart'; import 'package:platform_foundation/http.dart'; //import 'package:angel_test/angel_test.dart'; -import 'package:angel3_validate/server.dart'; +import 'package:platform_validation/server.dart'; import 'package:logging/logging.dart'; import 'package:platform_testing/http.dart'; import 'package:test/test.dart'; diff --git a/packages/validate/validate.iml b/packages/validation/validate.iml similarity index 100% rename from packages/validate/validate.iml rename to packages/validation/validate.iml diff --git a/packages/validate/web/index.html b/packages/validation/web/index.html similarity index 95% rename from packages/validate/web/index.html rename to packages/validation/web/index.html index 803aef0..32acbad 100644 --- a/packages/validate/web/index.html +++ b/packages/validation/web/index.html @@ -2,7 +2,7 @@ - angel3_validate + platform_validation