Created setup for AngelHttp

This commit is contained in:
Tobe O 2018-02-06 22:32:31 -05:00
parent 56e1fc62d0
commit 3527da6f4b
3 changed files with 179 additions and 52 deletions

View file

@ -2,11 +2,9 @@
<project version="4">
<component name="ChangeListManager">
<list default="true" id="7b89ff1e-1260-4dcf-9c3d-345de0471ea1" name="Default" comment="">
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/libraries/Dart_Packages.xml" afterPath="$PROJECT_DIR$/.idea/libraries/Dart_Packages.xml" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/lib/src/http/angel_http.dart" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/CHANGELOG.md" afterPath="$PROJECT_DIR$/CHANGELOG.md" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/lib/src/http/map_service.dart" afterPath="$PROJECT_DIR$/lib/src/http/map_service.dart" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/pubspec.yaml" afterPath="$PROJECT_DIR$/pubspec.yaml" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/lib/src/http/server.dart" afterPath="$PROJECT_DIR$/lib/src/http/server.dart" />
</list>
<ignored path="$PROJECT_DIR$/.tmp/" />
<ignored path="$PROJECT_DIR$/temp/" />
@ -76,7 +74,7 @@
</provider>
</entry>
</file>
<file leaf-file-name="CHANGELOG.md" pinned="false" current-in-tab="true">
<file leaf-file-name="CHANGELOG.md" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/CHANGELOG.md">
<provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
<state split_layout="SPLIT">
@ -92,15 +90,73 @@
<file leaf-file-name="server.dart" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/lib/src/http/server.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1481">
<caret line="399" column="28" lean-forward="false" selection-start-line="399" selection-start-column="28" selection-end-line="399" selection-end-column="28" />
<state relative-caret-position="409">
<caret line="464" column="0" lean-forward="true" selection-start-line="464" selection-start-column="0" selection-end-line="464" selection-end-column="0" />
<folding>
<element signature="e#38#58#0" expanded="true" />
<element signature="e#1894#1949#0" expanded="false" />
<element signature="e#2304#2311#0" expanded="false" />
<element signature="e#2534#2611#0" expanded="false" />
<element signature="e#2869#2964#0" expanded="false" />
<element signature="e#3252#3306#0" expanded="false" />
<element signature="e#3430#3485#0" expanded="false" />
<element signature="e#3611#3652#0" expanded="false" />
<element signature="e#3866#4128#0" expanded="false" />
<element signature="e#5025#5047#0" expanded="false" />
<element signature="e#5175#5490#0" expanded="false" />
<element signature="e#5601#5948#0" expanded="false" />
<element signature="e#6038#6405#0" expanded="false" />
<element signature="e#6498#6736#0" expanded="false" />
<element signature="e#6740#6807#0" expanded="false" />
<element signature="e#6911#7587#0" expanded="false" />
<element signature="e#7749#8389#0" expanded="false" />
<element signature="e#8501#8536#0" expanded="false" />
<element signature="e#8709#8750#0" expanded="false" />
<element signature="e#8886#8921#0" expanded="false" />
<element signature="e#9006#9723#0" expanded="false" />
<element signature="e#9892#10283#0" expanded="false" />
<element signature="e#10352#10696#0" expanded="false" />
<element signature="e#10837#10854#0" expanded="false" />
<element signature="e#11138#11281#0" expanded="false" />
<element signature="e#11380#11513#0" expanded="false" />
<element signature="e#11731#12311#0" expanded="false" />
<element signature="e#12660#13030#0" expanded="false" />
<element signature="e#12899#12904#0" expanded="false" />
<element signature="e#13199#13224#0" expanded="false" />
<element signature="e#14842#14904#0" expanded="false" />
<element signature="e#15220#15852#0" expanded="false" />
<element signature="e#15313#15437#0" expanded="false" />
<element signature="e#15471#15716#0" expanded="false" />
<element signature="e#15856#15914#0" expanded="false" />
<element signature="e#16148#16323#0" expanded="false" />
<element signature="e#16479#16668#0" expanded="false" />
<element signature="e#16823#19001#0" expanded="false" />
<element signature="e#17538#17589#0" expanded="false" />
<element signature="e#19005#19091#0" expanded="false" />
<element signature="e#19273#19341#0" expanded="false" />
<element signature="e#19443#19482#0" expanded="false" />
<element signature="e#19486#19547#0" expanded="false" />
<element signature="e#19973#21048#0" expanded="false" />
<element signature="e#21100#21178#0" expanded="false" />
<element signature="e#21246#21508#0" expanded="false" />
<element signature="e#21638#21703#0" expanded="false" />
<element signature="e#21766#21960#0" expanded="false" />
<element signature="e#21964#21992#0" expanded="false" />
<element signature="e#22284#22703#0" expanded="false" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="angel_http.dart" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/lib/src/http/angel_http.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="30">
<caret line="2" column="51" lean-forward="false" selection-start-line="2" selection-start-column="51" selection-end-line="2" selection-end-column="51" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="services_test.dart" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/test/services_test.dart">
<provider selected="true" editor-type-id="text-editor">
@ -134,19 +190,6 @@
</provider>
</entry>
</file>
<file leaf-file-name="routing_test.dart" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/test/routing_test.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="3015">
<caret line="205" column="5" lean-forward="false" selection-start-line="205" selection-start-column="5" selection-end-line="205" selection-end-column="5" />
<folding>
<marker date="1511894754000" expanded="false" signature="7:13" ph="..." />
<marker date="1511894754000" expanded="true" signature="6165:6175" ph="{...}" />
</folding>
</state>
</provider>
</entry>
</file>
</leaf>
</component>
<component name="FileTemplateManagerImpl">
@ -158,7 +201,6 @@
</component>
<component name="FindInProjectRecents">
<findStrings>
<find>sendRespon</find>
<find>inject(</find>
<find>sendRe</find>
<find>sendResponse</find>
@ -188,6 +230,7 @@
<find>addStre</find>
<find>((cre)|(upd))atedAt</find>
<find>'((cre)|(upd))atedAt'</find>
<find>handleReque</find>
</findStrings>
<replaceStrings>
<replace>_isClosed</replace>
@ -235,7 +278,6 @@
<component name="IdeDocumentHistory">
<option name="CHANGED_PATHS">
<list>
<option value="$PROJECT_DIR$/lib/src/safe_stream_controller.dart" />
<option value="$PROJECT_DIR$/lib/src/extensible.dart" />
<option value="$PROJECT_DIR$/test/util_test.dart" />
<option value="$PROJECT_DIR$/performance/hello/raw.dart" />
@ -281,11 +323,12 @@
<option value="$PROJECT_DIR$/test/extension_test.dart" />
<option value="$PROJECT_DIR$/test/all.dart" />
<option value="$PROJECT_DIR$/lib/src/http/service.dart" />
<option value="$PROJECT_DIR$/lib/src/http/server.dart" />
<option value="$PROJECT_DIR$/lib/src/http/response_context.dart" />
<option value="$PROJECT_DIR$/pubspec.yaml" />
<option value="$PROJECT_DIR$/lib/src/http/map_service.dart" />
<option value="$PROJECT_DIR$/CHANGELOG.md" />
<option value="$PROJECT_DIR$/lib/src/http/server.dart" />
<option value="$PROJECT_DIR$/lib/src/http/angel_http.dart" />
</list>
</option>
</component>
@ -296,9 +339,9 @@
<sorting>DEFINITION_ORDER</sorting>
</component>
<component name="ProjectFrameBounds">
<option name="x" value="67" />
<option name="y" value="23" />
<option name="width" value="1337" />
<option name="x" value="39" />
<option name="y" value="25" />
<option name="width" value="1360" />
<option name="height" value="797" />
</component>
<component name="ProjectLevelVcsManager" settingsEditedManually="true">
@ -326,6 +369,24 @@
<item name="Root" type="cbb8eebc:String" user="Root" />
<item name="framework" type="cbb8eebc:String" user="framework" />
</path>
<path>
<item name="Root" type="cbb8eebc:String" user="Root" />
<item name="framework" type="cbb8eebc:String" user="framework" />
<item name="lib" type="cbb8eebc:String" user="lib" />
</path>
<path>
<item name="Root" type="cbb8eebc:String" user="Root" />
<item name="framework" type="cbb8eebc:String" user="framework" />
<item name="lib" type="cbb8eebc:String" user="lib" />
<item name="src" type="cbb8eebc:String" user="src" />
</path>
<path>
<item name="Root" type="cbb8eebc:String" user="Root" />
<item name="framework" type="cbb8eebc:String" user="framework" />
<item name="lib" type="cbb8eebc:String" user="lib" />
<item name="src" type="cbb8eebc:String" user="src" />
<item name="http" type="cbb8eebc:String" user="http" />
</path>
</expand>
<select />
</subPane>
@ -675,7 +736,7 @@
<workItem from="1513103483207" duration="18000" />
<workItem from="1513103506825" duration="139000" />
<workItem from="1517332581856" duration="858000" />
<workItem from="1517973177718" duration="692000" />
<workItem from="1517973177718" duration="1156000" />
</task>
<task id="LOCAL-00001" summary="Re-designed exception">
<created>1481237183504</created>
@ -1013,7 +1074,14 @@
<option name="project" value="LOCAL" />
<updated>1517973412941</updated>
</task>
<option name="localTasksCounter" value="49" />
<task id="LOCAL-00049" summary="Added `autoSnakeCaseNames` to `MapService`">
<created>1517973884510</created>
<option name="number" value="00049" />
<option name="presentableId" value="LOCAL-00049" />
<option name="project" value="LOCAL" />
<updated>1517973884510</updated>
</task>
<option name="localTasksCounter" value="50" />
<servers />
</component>
<component name="TestHistory">
@ -1049,7 +1117,7 @@
</history-entry>
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="118728000" />
<option name="totallyTimeSpent" value="119192000" />
</component>
<component name="TodoView">
<todo-panel id="selected-file">
@ -1061,7 +1129,7 @@
</todo-panel>
</component>
<component name="ToolWindowManager">
<frame x="67" y="23" width="1337" height="797" extended-state="0" />
<frame x="39" y="25" width="1360" height="797" extended-state="0" />
<editor active="true" />
<layout>
<window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
@ -1084,9 +1152,9 @@
<window_info id="Image Layers" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Capture Analysis" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32905984" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.4002849" sideWeight="0.4964476" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4002849" sideWeight="0.4964476" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.48005697" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.2023166" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.23141123" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Theme Preview" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="true" content_ui="tabs" />
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
@ -1108,7 +1176,6 @@
</component>
<component name="VcsManagerConfiguration">
<option name="CHECK_CODE_SMELLS_BEFORE_PROJECT_COMMIT" value="false" />
<MESSAGE value="Added RequestContext.accepts" />
<MESSAGE value="Swapped to angel_model" />
<MESSAGE value="1.0.7+2" />
<MESSAGE value="Working on 1.0.8, including performance tuning" />
@ -1133,20 +1200,14 @@
<MESSAGE value="Patched handleAngelHttpException, bump to 1.1.0+2" />
<MESSAGE value="Patched ResponseContext#isOpen, bump to 1.1.0+3" />
<MESSAGE value="Response no longer closes if `serialize` is called with an empty string" />
<option name="LAST_COMMIT_MESSAGE" value="Response no longer closes if `serialize` is called with an empty string" />
<MESSAGE value="Added `autoSnakeCaseNames` to `MapService`" />
<option name="LAST_COMMIT_MESSAGE" value="Added `autoSnakeCaseNames` to `MapService`" />
</component>
<component name="XDebuggerManager">
<breakpoint-manager />
<watches-manager />
</component>
<component name="editorHistoryManager">
<entry file="file:///usr/local/Cellar/dart/1.24.2/libexec/lib/developer/profiler.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-1404">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file:///usr/local/Cellar/dart/1.24.2/libexec/lib/developer/extension.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-2001">
@ -1461,16 +1522,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/lib/src/http/server.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1481">
<caret line="399" column="28" lean-forward="false" selection-start-line="399" selection-start-column="28" selection-end-line="399" selection-end-column="28" />
<folding>
<element signature="e#38#58#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/lib/src/http/response_context.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="371">
@ -1521,6 +1572,72 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/lib/src/http/server.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="409">
<caret line="464" column="0" lean-forward="true" selection-start-line="464" selection-start-column="0" selection-end-line="464" selection-end-column="0" />
<folding>
<element signature="e#1894#1949#0" expanded="false" />
<element signature="e#2304#2311#0" expanded="false" />
<element signature="e#2534#2611#0" expanded="false" />
<element signature="e#2869#2964#0" expanded="false" />
<element signature="e#3252#3306#0" expanded="false" />
<element signature="e#3430#3485#0" expanded="false" />
<element signature="e#3611#3652#0" expanded="false" />
<element signature="e#3866#4128#0" expanded="false" />
<element signature="e#5025#5047#0" expanded="false" />
<element signature="e#5175#5490#0" expanded="false" />
<element signature="e#5601#5948#0" expanded="false" />
<element signature="e#6038#6405#0" expanded="false" />
<element signature="e#6498#6736#0" expanded="false" />
<element signature="e#6740#6807#0" expanded="false" />
<element signature="e#6911#7587#0" expanded="false" />
<element signature="e#7749#8389#0" expanded="false" />
<element signature="e#8501#8536#0" expanded="false" />
<element signature="e#8709#8750#0" expanded="false" />
<element signature="e#8886#8921#0" expanded="false" />
<element signature="e#9006#9723#0" expanded="false" />
<element signature="e#9892#10283#0" expanded="false" />
<element signature="e#10352#10696#0" expanded="false" />
<element signature="e#10837#10854#0" expanded="false" />
<element signature="e#11138#11281#0" expanded="false" />
<element signature="e#11380#11513#0" expanded="false" />
<element signature="e#11731#12311#0" expanded="false" />
<element signature="e#12660#13030#0" expanded="false" />
<element signature="e#12899#12904#0" expanded="false" />
<element signature="e#13199#13224#0" expanded="false" />
<element signature="e#14842#14904#0" expanded="false" />
<element signature="e#15220#15852#0" expanded="false" />
<element signature="e#15313#15437#0" expanded="false" />
<element signature="e#15471#15716#0" expanded="false" />
<element signature="e#15856#15914#0" expanded="false" />
<element signature="e#16148#16323#0" expanded="false" />
<element signature="e#16479#16668#0" expanded="false" />
<element signature="e#16823#19001#0" expanded="false" />
<element signature="e#17538#17589#0" expanded="false" />
<element signature="e#19005#19091#0" expanded="false" />
<element signature="e#19273#19341#0" expanded="false" />
<element signature="e#19443#19482#0" expanded="false" />
<element signature="e#19486#19547#0" expanded="false" />
<element signature="e#19973#21048#0" expanded="false" />
<element signature="e#21100#21178#0" expanded="false" />
<element signature="e#21246#21508#0" expanded="false" />
<element signature="e#21638#21703#0" expanded="false" />
<element signature="e#21766#21960#0" expanded="false" />
<element signature="e#21964#21992#0" expanded="false" />
<element signature="e#22284#22703#0" expanded="false" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/lib/src/http/angel_http.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="30">
<caret line="2" column="51" lean-forward="false" selection-start-line="2" selection-start-column="51" selection-end-line="2" selection-end-column="51" />
<folding />
</state>
</provider>
</entry>
</component>
<component name="masterDetails">
<states>

View file

@ -0,0 +1,6 @@
import 'dart:io';
/// Adapts `dart:io`'s [HttpServer] to serve Angel.
class AngelHttp {
}

View file

@ -461,6 +461,10 @@ class Angel extends AngelBase {
}
}
Future setupRequest(RequestContext req) async {
}
/// Runs several optimizations, *if* [isProduction] is `true`.
///
/// * Preprocesses all dependency injection, and eliminates the burden of reflecting handlers