Publish angel3_merge_map and angel3_mock_request
This commit is contained in:
parent
5db88c8a92
commit
19858b3f6e
18 changed files with 200 additions and 162 deletions
95
packages/framework/.gitignore
vendored
95
packages/framework/.gitignore
vendored
|
@ -1,41 +1,64 @@
|
|||
# Created by .ignore support plugin (hsz.mobi)
|
||||
# See https://www.dartlang.org/tools/private-files.html
|
||||
|
||||
# Files and directories created by pub
|
||||
.dart_tool
|
||||
.packages
|
||||
.pub/
|
||||
build/
|
||||
|
||||
# If you're building an application, you may want to check-in your pubspec.lock
|
||||
pubspec.lock
|
||||
|
||||
# Directory created by dartdoc
|
||||
# If you don't generate documentation locally you can remove this line.
|
||||
doc/api/
|
||||
|
||||
### Dart template
|
||||
# See https://www.dartlang.org/tools/private-files.html
|
||||
|
||||
# Files and directories created by pub
|
||||
|
||||
# SDK 1.20 and later (no longer creates packages directories)
|
||||
|
||||
# Older SDK versions
|
||||
# (Include if the minimum SDK version specified in pubsepc.yaml is earlier than 1.20)
|
||||
.project
|
||||
.buildlog
|
||||
**/packages/
|
||||
|
||||
|
||||
# Files created by dart2js
|
||||
# (Most Dart developers will use pub build to compile Dart, use/modify these
|
||||
# rules if you intend to use dart2js directly
|
||||
# Convention is to use extension '.dart.js' for Dart compiled to Javascript to
|
||||
# differentiate from explicit Javascript files)
|
||||
*.dart.js
|
||||
*.part.js
|
||||
*.js.deps
|
||||
*.js.map
|
||||
*.info.json
|
||||
|
||||
# Directory created by dartdoc
|
||||
|
||||
# Don't commit pubspec lock file
|
||||
# (Library packages only! Remove pattern if developing an application package)
|
||||
### JetBrains template
|
||||
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio
|
||||
|
||||
*.iml
|
||||
|
||||
## Directory-based project format:
|
||||
# if you remove the above rule, at least ignore the following:
|
||||
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
|
||||
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
||||
|
||||
# User-specific stuff:
|
||||
# .idea/workspace.xml
|
||||
# .idea/tasks.xml
|
||||
# .idea/dictionaries
|
||||
|
||||
# Sensitive or high-churn files:
|
||||
# .idea/dataSources.ids
|
||||
# .idea/dataSources.xml
|
||||
# .idea/sqlDataSources.xml
|
||||
# .idea/dynamic.xml
|
||||
# .idea/uiDesigner.xml
|
||||
|
||||
# Gradle:
|
||||
# .idea/gradle.xml
|
||||
# .idea/libraries
|
||||
|
||||
# Mongo Explorer plugin:
|
||||
# .idea/mongoSettings.xml
|
||||
## VsCode
|
||||
.vscode/
|
||||
|
||||
## File-based project format:
|
||||
*.ipr
|
||||
*.iws
|
||||
|
||||
## Plugin-specific files:
|
||||
|
||||
# IntelliJ
|
||||
.idea/
|
||||
/out/
|
||||
|
||||
# mpeltonen/sbt-idea plugin
|
||||
.idea_modules/
|
||||
|
||||
# JIRA plugin
|
||||
|
@ -45,22 +68,4 @@ atlassian-ide-plugin.xml
|
|||
com_crashlytics_export_strings.xml
|
||||
crashlytics.properties
|
||||
crashlytics-build.properties
|
||||
### Dart template
|
||||
# Don’t commit the following directories created by pub.
|
||||
.buildlog
|
||||
.pub/
|
||||
build/
|
||||
packages
|
||||
.packages
|
||||
|
||||
# Or the files created by dart2js.
|
||||
*.dart.js
|
||||
*.js_
|
||||
*.js.deps
|
||||
*.js.map
|
||||
|
||||
# Include when developing application packages.
|
||||
pubspec.lock
|
||||
|
||||
doc/api
|
||||
.dart_tool
|
||||
fabric.properties
|
||||
|
|
|
@ -1,2 +1,12 @@
|
|||
Tobe O <thosakwe@gmail.com>
|
||||
Thomas Hii <thomashii@dukefirehawk.com>
|
||||
Primary Authors
|
||||
===============
|
||||
|
||||
* __[Thomas Hii](dukefirehawk.apps@gmail.com)__
|
||||
|
||||
Thomas is the current maintainer of the code base. He has refactored and migrated the
|
||||
code base to support NNBD.
|
||||
|
||||
* __[Tobe O](thosakwe@gmail.com)__
|
||||
|
||||
Tobe has written much of the original code prior to NNBD migration. He has moved on and
|
||||
is no longer involved with the project.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2016 The Angel Framework
|
||||
Copyright (c) 2021 dukefirehawk.com
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
SOFTWARE.
|
||||
|
|
93
packages/merge_map/.gitignore
vendored
93
packages/merge_map/.gitignore
vendored
|
@ -1,60 +1,32 @@
|
|||
# Created by .ignore support plugin (hsz.mobi)
|
||||
### JetBrains template
|
||||
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
|
||||
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
||||
# See https://www.dartlang.org/tools/private-files.html
|
||||
|
||||
# User-specific stuff:
|
||||
.idea/workspace.xml
|
||||
.idea/tasks.xml
|
||||
.idea/dictionaries
|
||||
.idea/vcs.xml
|
||||
.idea/jsLibraryMappings.xml
|
||||
# Files and directories created by pub
|
||||
.dart_tool
|
||||
.packages
|
||||
.pub/
|
||||
build/
|
||||
|
||||
# Sensitive or high-churn files:
|
||||
.idea/dataSources.ids
|
||||
.idea/dataSources.xml
|
||||
.idea/dataSources.local.xml
|
||||
.idea/sqlDataSources.xml
|
||||
.idea/dynamic.xml
|
||||
.idea/uiDesigner.xml
|
||||
# If you're building an application, you may want to check-in your pubspec.lock
|
||||
pubspec.lock
|
||||
|
||||
# Gradle:
|
||||
.idea/gradle.xml
|
||||
.idea/libraries
|
||||
# Directory created by dartdoc
|
||||
# If you don't generate documentation locally you can remove this line.
|
||||
doc/api/
|
||||
|
||||
# Mongo Explorer plugin:
|
||||
.idea/mongoSettings.xml
|
||||
|
||||
## File-based project format:
|
||||
*.iws
|
||||
|
||||
## Plugin-specific files:
|
||||
|
||||
# IntelliJ
|
||||
/out/
|
||||
|
||||
# mpeltonen/sbt-idea plugin
|
||||
.idea_modules/
|
||||
|
||||
# JIRA plugin
|
||||
atlassian-ide-plugin.xml
|
||||
|
||||
# Crashlytics plugin (for Android Studio and IntelliJ)
|
||||
com_crashlytics_export_strings.xml
|
||||
crashlytics.properties
|
||||
crashlytics-build.properties
|
||||
fabric.properties
|
||||
### Dart template
|
||||
# See https://www.dartlang.org/tools/private-files.html
|
||||
|
||||
# Files and directories created by pub
|
||||
.buildlog
|
||||
.packages
|
||||
|
||||
# SDK 1.20 and later (no longer creates packages directories)
|
||||
|
||||
# Older SDK versions
|
||||
# (Include if the minimum SDK version specified in pubsepc.yaml is earlier than 1.20)
|
||||
.project
|
||||
.pub/
|
||||
build/
|
||||
.buildlog
|
||||
**/packages/
|
||||
|
||||
|
||||
# Files created by dart2js
|
||||
# (Most Dart developers will use pub build to compile Dart, use/modify these
|
||||
# rules if you intend to use dart2js directly
|
||||
|
@ -67,10 +39,33 @@ build/
|
|||
*.info.json
|
||||
|
||||
# Directory created by dartdoc
|
||||
doc/api/
|
||||
|
||||
# Don't commit pubspec lock file
|
||||
# (Library packages only! Remove pattern if developing an application package)
|
||||
pubspec.lock
|
||||
### JetBrains template
|
||||
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
|
||||
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
||||
|
||||
.dart_tool
|
||||
# User-specific stuff:
|
||||
|
||||
## VsCode
|
||||
.vscode/
|
||||
|
||||
## File-based project format:
|
||||
*.iws
|
||||
|
||||
## Plugin-specific files:
|
||||
|
||||
# IntelliJ
|
||||
.idea/
|
||||
/out/
|
||||
.idea_modules/
|
||||
|
||||
# JIRA plugin
|
||||
atlassian-ide-plugin.xml
|
||||
|
||||
# Crashlytics plugin (for Android Studio and IntelliJ)
|
||||
com_crashlytics_export_strings.xml
|
||||
crashlytics.properties
|
||||
crashlytics-build.properties
|
||||
fabric.properties
|
||||
|
|
|
@ -1,2 +1,12 @@
|
|||
Tobe O <thosakwe@gmail.com>
|
||||
Thomas Hii <thomashii@dukefirehawk.com>
|
||||
Primary Authors
|
||||
===============
|
||||
|
||||
* __[Thomas Hii](dukefirehawk.apps@gmail.com)__
|
||||
|
||||
Thomas is the current maintainer of the code base. He has refactored and migrated the
|
||||
code base to support NNBD.
|
||||
|
||||
* __[Tobe O](thosakwe@gmail.com)__
|
||||
|
||||
Tobe has written much of the original code prior to NNBD migration. He has moved on and
|
||||
is no longer involved with the project.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
The MIT License (MIT)
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2016 Tobe O
|
||||
Copyright (c) 2021 dukefirehawk.com
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
@ -1,4 +1,9 @@
|
|||
# merge_map
|
||||
# angel3_merge_map
|
||||
[![version](https://img.shields.io/badge/pub-v2.12.4-brightgreen)](https://pub.dartlang.org/packages/angel3_merge_map)
|
||||
[![Null Safety](https://img.shields.io/badge/null-safety-brightgreen)](https://dart.dev/null-safety)
|
||||
|
||||
[![License](https://img.shields.io/github/license/dukefirehawk/angel)](https://github.com/dukefirehawk/angel/tree/angel3/packages/merge_map)
|
||||
|
||||
Combine multiple Maps into one. Equivalent to
|
||||
[Object.assign](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign)
|
||||
in JS.
|
||||
|
@ -6,9 +11,9 @@ in JS.
|
|||
# Example
|
||||
|
||||
```dart
|
||||
import "package:merge_map/merge_map.dart";
|
||||
import "package:angel3_merge_map/angel3_merge_map.dart";
|
||||
|
||||
main() {
|
||||
void main() {
|
||||
Map map1 = {'hello': 'world'};
|
||||
Map map2 = {'foo': {'bar': 'baz', 'this': 'will be overwritten'}};
|
||||
Map map3 = {'foo': {'john': 'doe', 'this': 'overrides previous maps'}};
|
||||
|
|
|
@ -1,11 +1,15 @@
|
|||
import 'package:merge_map/merge_map.dart';
|
||||
import 'package:angel3_merge_map/angel3_merge_map.dart';
|
||||
|
||||
main() {
|
||||
Map map1 = {'hello': 'world'};
|
||||
Map map2 = {'foo': {'bar': 'baz', 'this': 'will be overwritten'}};
|
||||
Map map3 = {'foo': {'john': 'doe', 'this': 'overrides previous maps'}};
|
||||
Map merged = mergeMap([map1, map2, map3]);
|
||||
print(merged);
|
||||
void main() {
|
||||
Map map1 = {'hello': 'world'};
|
||||
Map map2 = {
|
||||
'foo': {'bar': 'baz', 'this': 'will be overwritten'}
|
||||
};
|
||||
Map map3 = {
|
||||
'foo': {'john': 'doe', 'this': 'overrides previous maps'}
|
||||
};
|
||||
Map merged = mergeMap([map1, map2, map3]);
|
||||
print(merged);
|
||||
|
||||
// {hello: world, foo: {bar: baz, john: doe, this: overrides previous maps}}
|
||||
}
|
||||
// {hello: world, foo: {bar: baz, john: doe, this: overrides previous maps}}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/// Exposes the [mergeMap] function, which... merges Maps.
|
||||
library merge_map;
|
||||
library angel3_merge_map;
|
||||
|
||||
_copyValues<K, V>(
|
||||
Map<K, V> from, Map<K, V?>? to, bool recursive, bool acceptNull) {
|
||||
|
@ -28,7 +28,7 @@ Map<K, V> mergeMap<K, V>(Iterable<Map<K, V>> maps,
|
|||
{bool recursive: true, bool acceptNull: false}) {
|
||||
Map<K, V> result = <K, V>{};
|
||||
maps.forEach((Map<K, V> map) {
|
||||
if (map != null) _copyValues(map, result, recursive, acceptNull);
|
||||
_copyValues(map, result, recursive, acceptNull);
|
||||
});
|
||||
return result;
|
||||
}
|
|
@ -1,8 +1,8 @@
|
|||
name: merge_map
|
||||
description: Combine multiple Maps into one. Equivalent to Object.assign in JS.
|
||||
name: angel3_merge_map
|
||||
version: 2.0.0
|
||||
homepage: https://github.com/thosakwe/merge_map
|
||||
description: Combine multiple Maps into one. Equivalent to Object.assign in JS.
|
||||
homepage: https://github.com/dukefirehawk/angel/tree/angel3/packages/merge_map
|
||||
environment:
|
||||
sdk: '>=2.12.0 <3.0.0'
|
||||
dev_dependencies:
|
||||
test: ^1.17.3
|
||||
test: ^1.17.4
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import "package:merge_map/merge_map.dart";
|
||||
import "package:angel3_merge_map/angel3_merge_map.dart";
|
||||
import "package:test/test.dart";
|
||||
|
||||
void main() {
|
||||
|
|
53
packages/mock_request/.gitignore
vendored
53
packages/mock_request/.gitignore
vendored
|
@ -1,15 +1,34 @@
|
|||
# See https://www.dartlang.org/tools/private-files.html
|
||||
|
||||
# Files and directories created by pub
|
||||
.buildlog
|
||||
.dart_tool
|
||||
.packages
|
||||
.project
|
||||
.pub/
|
||||
build/
|
||||
|
||||
# If you're building an application, you may want to check-in your pubspec.lock
|
||||
pubspec.lock
|
||||
|
||||
# Directory created by dartdoc
|
||||
# If you don't generate documentation locally you can remove this line.
|
||||
doc/api/
|
||||
|
||||
### Dart template
|
||||
# See https://www.dartlang.org/tools/private-files.html
|
||||
|
||||
# Files and directories created by pub
|
||||
|
||||
# SDK 1.20 and later (no longer creates packages directories)
|
||||
|
||||
# Older SDK versions
|
||||
# (Include if the minimum SDK version specified in pubsepc.yaml is earlier than 1.20)
|
||||
.project
|
||||
.buildlog
|
||||
**/packages/
|
||||
|
||||
|
||||
# Files created by dart2js
|
||||
# (Most Dart developers will use pub build to compile Dart, use/modify these
|
||||
# (Most Dart developers will use pub build to compile Dart, use/modify these
|
||||
# rules if you intend to use dart2js directly
|
||||
# Convention is to use extension '.dart.js' for Dart compiled to Javascript to
|
||||
# differentiate from explicit Javascript files)
|
||||
|
@ -20,35 +39,17 @@ build/
|
|||
*.info.json
|
||||
|
||||
# Directory created by dartdoc
|
||||
doc/api/
|
||||
|
||||
# Don't commit pubspec lock file
|
||||
# Don't commit pubspec lock file
|
||||
# (Library packages only! Remove pattern if developing an application package)
|
||||
pubspec.lock
|
||||
### JetBrains template
|
||||
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
|
||||
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
||||
|
||||
# User-specific stuff:
|
||||
.idea/**/workspace.xml
|
||||
.idea/**/tasks.xml
|
||||
.idea/dictionaries
|
||||
|
||||
# Sensitive or high-churn files:
|
||||
.idea/**/dataSources/
|
||||
.idea/**/dataSources.ids
|
||||
.idea/**/dataSources.xml
|
||||
.idea/**/dataSources.local.xml
|
||||
.idea/**/sqlDataSources.xml
|
||||
.idea/**/dynamic.xml
|
||||
.idea/**/uiDesigner.xml
|
||||
|
||||
# Gradle:
|
||||
.idea/**/gradle.xml
|
||||
.idea/**/libraries
|
||||
|
||||
# Mongo Explorer plugin:
|
||||
.idea/**/mongoSettings.xml
|
||||
## VsCode
|
||||
.vscode/
|
||||
|
||||
## File-based project format:
|
||||
*.iws
|
||||
|
@ -56,9 +57,8 @@ pubspec.lock
|
|||
## Plugin-specific files:
|
||||
|
||||
# IntelliJ
|
||||
.idea/
|
||||
/out/
|
||||
|
||||
# mpeltonen/sbt-idea plugin
|
||||
.idea_modules/
|
||||
|
||||
# JIRA plugin
|
||||
|
@ -69,4 +69,3 @@ com_crashlytics_export_strings.xml
|
|||
crashlytics.properties
|
||||
crashlytics-build.properties
|
||||
fabric.properties
|
||||
.dart_tool
|
|
@ -1,2 +1,12 @@
|
|||
Tobe O <thosakwe@gmail.com>
|
||||
Thomas Hii <thomashii@dukefirehawk.com>
|
||||
Primary Authors
|
||||
===============
|
||||
|
||||
* __[Thomas Hii](dukefirehawk.apps@gmail.com)__
|
||||
|
||||
Thomas is the current maintainer of the code base. He has refactored and migrated the
|
||||
code base to support NNBD.
|
||||
|
||||
* __[Tobe O](thosakwe@gmail.com)__
|
||||
|
||||
Tobe has written much of the original code prior to NNBD migration. He has moved on and
|
||||
is no longer involved with the project.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2017 Tobe O
|
||||
Copyright (c) 2021 dukefirehawk.com
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
@ -1,19 +1,20 @@
|
|||
# mock_request
|
||||
# angel3_mock_request
|
||||
[![version](https://img.shields.io/badge/pub-v2.12.4-brightgreen)](https://pub.dartlang.org/packages/angel3_mock_request)
|
||||
[![Null Safety](https://img.shields.io/badge/null-safety-brightgreen)](https://dart.dev/null-safety)
|
||||
|
||||
[![Pub](https://img.shields.io/pub/v/mock_request.svg)](https://pub.dartlang.org/packages/mock_request)
|
||||
[![build status](https://travis-ci.org/thosakwe/mock_request.svg)](https://travis-ci.org/thosakwe/mock_request)
|
||||
[![License](https://img.shields.io/github/license/dukefirehawk/angel)](https://github.com/dukefirehawk/angel/tree/angel3/packages/mock_request)
|
||||
|
||||
Manufacture dart:io HttpRequests, HttpResponses, HttpHeaders, etc.
|
||||
This makes it possible to test server-side Dart applications without
|
||||
having to ever bind to a port.
|
||||
|
||||
This package was originally designed to testing
|
||||
[Angel](https://github.com/angel-dart/angel/wiki)
|
||||
[Angel](https://github.com/dukefirehawk/angel)
|
||||
applications smoother, but works with any Dart-based server. :)
|
||||
|
||||
# Usage
|
||||
```dart
|
||||
var rq = new MockHttpRequest('GET', Uri.parse('/foo'));
|
||||
var rq = MockHttpRequest('GET', Uri.parse('/foo'));
|
||||
await rq.close();
|
||||
await app.handleRequest(rq); // Run within your server-side application
|
||||
var rs = rq.response;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import 'dart:async';
|
||||
import 'package:mock_request/mock_request.dart';
|
||||
import 'package:angel3_mock_request/angel3_mock_request.dart';
|
||||
|
||||
Future<void> main() async {
|
||||
var rq =
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
name: mock_request
|
||||
name: angel3_mock_request
|
||||
version: 2.0.0
|
||||
description: Manufacture dart:io HttpRequests, HttpResponses, HttpHeaders, etc.
|
||||
author: Tobe O <thosakwe@gmail.com>
|
||||
homepage: https://github.com/thosakwe/mock_request
|
||||
homepage: https://github.com/dukefirehawk/angel/tree/angel3/packages/mock_request
|
||||
environment:
|
||||
sdk: '>=2.12.0 <3.0.0'
|
||||
dependencies:
|
||||
charcode: ^1.2.0
|
||||
dev_dependencies:
|
||||
#angel_framework: ^2.1.0
|
||||
http: ^0.13.0
|
||||
test: ^1.16.8
|
||||
http: ^0.13.2
|
||||
test: ^1.17.4
|
||||
|
|
Loading…
Reference in a new issue