1.0.2
This commit is contained in:
parent
eb9a46f282
commit
0c57b06cfa
6 changed files with 140 additions and 149 deletions
|
@ -2,13 +2,9 @@
|
|||
<project version="4">
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="7b89ff1e-1260-4dcf-9c3d-345de0471ea1" name="Default" comment="">
|
||||
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/libraries/Dart_SDK.xml" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/libraries/Dart_Packages.xml" afterPath="$PROJECT_DIR$/.idea/libraries/Dart_Packages.xml" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/runConfigurations/All_Tests.xml" afterPath="$PROJECT_DIR$/.idea/runConfigurations/All_Tests.xml" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/README.md" afterPath="$PROJECT_DIR$/README.md" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/lib/hooks.dart" afterPath="$PROJECT_DIR$/lib/hooks.dart" />
|
||||
<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$/lib/src/http/response_context.dart" afterPath="$PROJECT_DIR$/lib/src/http/response_context.dart" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/lib/src/http/server.dart" afterPath="$PROJECT_DIR$/lib/src/http/server.dart" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/pubspec.yaml" afterPath="$PROJECT_DIR$/pubspec.yaml" />
|
||||
|
@ -35,8 +31,8 @@
|
|||
<file leaf-file-name="response_context.dart" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/lib/src/http/response_context.dart">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="388">
|
||||
<caret line="185" column="32" lean-forward="false" selection-start-line="185" selection-start-column="32" selection-end-line="185" selection-end-column="32" />
|
||||
<state relative-caret-position="84">
|
||||
<caret line="180" column="68" lean-forward="true" selection-start-line="180" selection-start-column="68" selection-end-line="180" selection-end-column="68" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
|
@ -45,60 +41,35 @@
|
|||
<file leaf-file-name="map_service.dart" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/lib/src/http/map_service.dart">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="179">
|
||||
<caret line="55" column="21" lean-forward="false" selection-start-line="55" selection-start-column="21" selection-end-line="55" selection-end-column="21" />
|
||||
<state relative-caret-position="312">
|
||||
<caret line="29" column="24" lean-forward="false" selection-start-line="29" selection-start-column="24" selection-end-line="29" selection-end-column="24" />
|
||||
<folding>
|
||||
<element signature="e#0#20#0" expanded="true" />
|
||||
<marker date="1492277003000" expanded="true" signature="174:3294" ph="{...}" />
|
||||
<marker date="1492277003000" expanded="true" signature="1401:1771" ph="{...}" />
|
||||
<marker date="1492277003000" expanded="true" signature="2900:3292" ph="{...}" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="angel_http_exception.dart" pinned="false" current-in-tab="false">
|
||||
<file leaf-file-name="angel_http_exception.dart" pinned="false" current-in-tab="true">
|
||||
<entry file="file://$PROJECT_DIR$/lib/src/http/angel_http_exception.dart">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="1350">
|
||||
<state relative-caret-position="696">
|
||||
<caret line="90" column="46" lean-forward="false" selection-start-line="90" selection-start-column="46" selection-end-line="90" selection-end-column="46" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="pubspec.yaml" pinned="false" current-in-tab="true">
|
||||
<entry file="file://$PROJECT_DIR$/pubspec.yaml">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="15">
|
||||
<caret line="1" column="14" lean-forward="false" selection-start-line="1" selection-start-column="14" selection-end-line="1" selection-end-column="14" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="hooks.dart" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/lib/hooks.dart">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="200">
|
||||
<caret line="85" column="10" lean-forward="false" selection-start-line="85" selection-start-column="10" selection-end-line="85" selection-end-column="10" />
|
||||
<state relative-caret-position="101">
|
||||
<caret line="238" column="69" lean-forward="true" selection-start-line="238" selection-start-column="69" selection-end-line="238" selection-end-column="69" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<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="349">
|
||||
<caret line="312" column="3" lean-forward="false" selection-start-line="312" selection-start-column="3" selection-end-line="312" selection-end-column="3" />
|
||||
<folding>
|
||||
<element signature="e#38#58#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="controller_test.dart" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/test/controller_test.dart">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
|
@ -143,7 +114,17 @@
|
|||
<find>throw</find>
|
||||
<find>upa</find>
|
||||
<find>transform</find>
|
||||
<find>isAfter</find>
|
||||
<find>isBefore</find>
|
||||
<find>close</find>
|
||||
<find>!_isOpen</find>
|
||||
<find>end</find>
|
||||
<find>reopen</find>
|
||||
<find>REDIRECT</find>
|
||||
</findStrings>
|
||||
<replaceStrings>
|
||||
<replace>_isClosed</replace>
|
||||
</replaceStrings>
|
||||
</component>
|
||||
<component name="Git.Settings">
|
||||
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
||||
|
@ -160,10 +141,10 @@
|
|||
<option value="$PROJECT_DIR$/lib/src/http/angel_http_exception.dart" />
|
||||
<option value="$PROJECT_DIR$/lib/src/http/memory_service.dart" />
|
||||
<option value="$PROJECT_DIR$/lib/src/http/controller.dart" />
|
||||
<option value="$PROJECT_DIR$/lib/src/http/response_context.dart" />
|
||||
<option value="$PROJECT_DIR$/lib/src/http/map_service.dart" />
|
||||
<option value="$PROJECT_DIR$/lib/hooks.dart" />
|
||||
<option value="$PROJECT_DIR$/lib/src/http/server.dart" />
|
||||
<option value="$PROJECT_DIR$/lib/src/http/response_context.dart" />
|
||||
<option value="$PROJECT_DIR$/lib/hooks.dart" />
|
||||
<option value="$PROJECT_DIR$/pubspec.yaml" />
|
||||
<option value="$PROJECT_DIR$/README.md" />
|
||||
</list>
|
||||
|
@ -176,10 +157,10 @@
|
|||
<sorting>DEFINITION_ORDER</sorting>
|
||||
</component>
|
||||
<component name="ProjectFrameBounds">
|
||||
<option name="x" value="201" />
|
||||
<option name="y" value="65" />
|
||||
<option name="width" value="1486" />
|
||||
<option name="height" value="909" />
|
||||
<option name="x" value="155" />
|
||||
<option name="y" value="131" />
|
||||
<option name="width" value="1416" />
|
||||
<option name="height" value="843" />
|
||||
</component>
|
||||
<component name="ProjectLevelVcsManager">
|
||||
<ConfirmationsSetting value="2" id="Add" />
|
||||
|
@ -316,6 +297,9 @@
|
|||
<configuration default="true" type="DartTestRunConfigurationType" factoryName="Dart Test">
|
||||
<method />
|
||||
</configuration>
|
||||
<configuration default="true" type="FlutterRunConfigurationType" factoryName="Flutter">
|
||||
<method />
|
||||
</configuration>
|
||||
<configuration default="true" type="JavaScriptTestRunnerJest" factoryName="Jest">
|
||||
<node-interpreter value="project" />
|
||||
<working-dir value="" />
|
||||
|
@ -338,6 +322,12 @@
|
|||
<configuration default="true" type="JavascriptDebugType" factoryName="JavaScript Debug">
|
||||
<method />
|
||||
</configuration>
|
||||
<configuration default="true" type="LLVMCommandLineRunConfigurationType" factoryName="LLVM Application" show_console_on_std_err="false" show_console_on_std_out="false">
|
||||
<option name="VMOptions" />
|
||||
<option name="arguments" />
|
||||
<option name="filePath" />
|
||||
<method />
|
||||
</configuration>
|
||||
<configuration default="true" type="NodeJSConfigurationType" factoryName="Node.js" path-to-node="project" working-dir="">
|
||||
<method />
|
||||
</configuration>
|
||||
|
@ -401,7 +391,8 @@
|
|||
<workItem from="1481390924053" duration="19000" />
|
||||
<workItem from="1483149948840" duration="930000" />
|
||||
<workItem from="1484451782119" duration="617000" />
|
||||
<workItem from="1492276672342" duration="1434000" />
|
||||
<workItem from="1492276672342" duration="1478000" />
|
||||
<workItem from="1493086837879" duration="686000" />
|
||||
</task>
|
||||
<task id="LOCAL-00001" summary="Re-designed exception">
|
||||
<created>1481237183504</created>
|
||||
|
@ -445,13 +436,17 @@
|
|||
<option name="project" value="LOCAL" />
|
||||
<updated>1483150975010</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="7" />
|
||||
<task id="LOCAL-00007" summary="Fixed last batch?">
|
||||
<created>1492278141283</created>
|
||||
<option name="number" value="00007" />
|
||||
<option name="presentableId" value="LOCAL-00007" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1492278141283</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="8" />
|
||||
<servers />
|
||||
</component>
|
||||
<component name="TestHistory">
|
||||
<history-entry file="All_Tests - 2017.04.15 at 13h 18m 39s.xml">
|
||||
<configuration name="All Tests" configurationId="DartTestRunConfigurationType" />
|
||||
</history-entry>
|
||||
<history-entry file="All_Tests - 2017.04.15 at 13h 40m 48s.xml">
|
||||
<configuration name="All Tests" configurationId="DartTestRunConfigurationType" />
|
||||
</history-entry>
|
||||
|
@ -461,6 +456,9 @@
|
|||
<history-entry file="All_Tests - 2017.04.15 at 13h 41m 54s.xml">
|
||||
<configuration name="All Tests" configurationId="DartTestRunConfigurationType" />
|
||||
</history-entry>
|
||||
<history-entry file="All_Tests - 2017.04.24 at 22h 30m 02s.xml">
|
||||
<configuration name="All Tests" configurationId="DartTestRunConfigurationType" />
|
||||
</history-entry>
|
||||
<history-entry file="Hooked_Tests - 2016.12.10 at 09h 01m 45s.xml">
|
||||
<configuration name="Hooked Tests" configurationId="DartTestRunConfigurationType" />
|
||||
</history-entry>
|
||||
|
@ -481,7 +479,7 @@
|
|||
</history-entry>
|
||||
</component>
|
||||
<component name="TimeTrackingManager">
|
||||
<option name="totallyTimeSpent" value="5665000" />
|
||||
<option name="totallyTimeSpent" value="6395000" />
|
||||
</component>
|
||||
<component name="TodoView">
|
||||
<todo-panel id="selected-file">
|
||||
|
@ -493,23 +491,23 @@
|
|||
</todo-panel>
|
||||
</component>
|
||||
<component name="ToolWindowManager">
|
||||
<frame x="201" y="65" width="1486" height="909" extended-state="0" />
|
||||
<frame x="155" y="131" width="1416" height="843" extended-state="0" />
|
||||
<editor active="true" />
|
||||
<layout>
|
||||
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.21218638" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.3292683" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Tool Output" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32680538" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
|
||||
<window_info id="Dart Analysis" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32802936" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Run" active="true" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.32925338" sideWeight="0.5" order="2" 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.33" sideWeight="0.5" order="7" 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.32680538" 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.2122867" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="ANTLR Preview" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" 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.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Run" active="true" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.32756326" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="3" 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.3262317" sideWeight="0.5" order="7" 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="2" side_tool="true" content_ui="tabs" />
|
||||
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="3" side_tool="false" 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" />
|
||||
<window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32680538" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="SLIDING" type="SLIDING" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
|
||||
|
@ -531,7 +529,8 @@
|
|||
<MESSAGE value="Done???" />
|
||||
<MESSAGE value="findExpose" />
|
||||
<MESSAGE value="I love stack overflows!!!" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="I love stack overflows!!!" />
|
||||
<MESSAGE value="Fixed last batch?" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="Fixed last batch?" />
|
||||
</component>
|
||||
<component name="XDebuggerManager">
|
||||
<breakpoint-manager />
|
||||
|
@ -542,9 +541,6 @@
|
|||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="0">
|
||||
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
||||
<folding>
|
||||
<element signature="e#0#17#0" expanded="false" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
|
@ -626,7 +622,6 @@
|
|||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="1275">
|
||||
<caret line="90" column="29" lean-forward="true" selection-start-line="90" selection-start-column="29" selection-end-line="90" selection-end-column="29" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
|
@ -634,7 +629,6 @@
|
|||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="195">
|
||||
<caret line="13" column="1" lean-forward="true" selection-start-line="13" selection-start-column="1" selection-end-line="13" selection-end-column="1" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
|
@ -701,7 +695,6 @@
|
|||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="1275">
|
||||
<caret line="90" column="29" lean-forward="true" selection-start-line="90" selection-start-column="29" selection-end-line="90" selection-end-column="29" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
|
@ -709,7 +702,6 @@
|
|||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="195">
|
||||
<caret line="13" column="1" lean-forward="true" selection-start-line="13" selection-start-column="1" selection-end-line="13" selection-end-column="1" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
|
@ -823,9 +815,6 @@
|
|||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="0">
|
||||
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
||||
<folding>
|
||||
<element signature="e#0#17#0" expanded="false" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
|
@ -833,7 +822,6 @@
|
|||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="1020">
|
||||
<caret line="74" column="0" lean-forward="false" selection-start-line="74" selection-start-column="0" selection-end-line="74" selection-end-column="0" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
|
@ -841,7 +829,6 @@
|
|||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="1275">
|
||||
<caret line="90" column="25" lean-forward="false" selection-start-line="90" selection-start-column="25" selection-end-line="90" selection-end-column="25" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
|
@ -849,7 +836,6 @@
|
|||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="195">
|
||||
<caret line="13" column="1" lean-forward="false" selection-start-line="13" selection-start-column="1" selection-end-line="13" selection-end-column="1" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
|
@ -871,6 +857,14 @@
|
|||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/lib/src/http/service.dart">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="120">
|
||||
<caret line="16" column="6" lean-forward="false" selection-start-line="16" selection-start-column="6" selection-end-line="16" selection-end-column="6" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/test/di_test.dart">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="0">
|
||||
|
@ -881,71 +875,39 @@
|
|||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/lib/src/http/angel_http_exception.dart">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="1350">
|
||||
<caret line="90" column="46" lean-forward="false" selection-start-line="90" selection-start-column="46" selection-end-line="90" selection-end-column="46" />
|
||||
<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="388">
|
||||
<caret line="185" column="32" lean-forward="false" selection-start-line="185" selection-start-column="32" selection-end-line="185" selection-end-column="32" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/lib/src/http/map_service.dart">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="179">
|
||||
<caret line="55" column="21" lean-forward="false" selection-start-line="55" selection-start-column="21" selection-end-line="55" selection-end-column="21" />
|
||||
<state relative-caret-position="312">
|
||||
<caret line="29" column="24" lean-forward="false" selection-start-line="29" selection-start-column="24" selection-end-line="29" selection-end-column="24" />
|
||||
<folding>
|
||||
<element signature="e#0#20#0" expanded="true" />
|
||||
<marker date="1492277003000" expanded="true" signature="174:3294" ph="{...}" />
|
||||
<marker date="1492277003000" expanded="true" signature="1401:1771" ph="{...}" />
|
||||
<marker date="1492277003000" expanded="true" signature="2900:3292" ph="{...}" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/lib/src/http/service.dart">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="120">
|
||||
<caret line="16" column="6" lean-forward="false" selection-start-line="16" selection-start-column="6" selection-end-line="16" selection-end-column="6" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/lib/hooks.dart">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="200">
|
||||
<caret line="85" column="10" lean-forward="false" selection-start-line="85" selection-start-column="10" selection-end-line="85" selection-end-column="10" />
|
||||
<folding />
|
||||
</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="349">
|
||||
<caret line="312" column="3" lean-forward="false" selection-start-line="312" selection-start-column="3" selection-end-line="312" selection-end-column="3" />
|
||||
<state relative-caret-position="220">
|
||||
<caret line="477" column="31" lean-forward="false" selection-start-line="477" selection-start-column="31" selection-end-line="477" selection-end-column="31" />
|
||||
<folding>
|
||||
<element signature="e#38#58#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/README.md">
|
||||
<provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
|
||||
<state split_layout="SPLIT">
|
||||
<first_editor relative-caret-position="45">
|
||||
<caret line="3" column="62" lean-forward="false" selection-start-line="3" selection-start-column="62" selection-end-line="3" selection-end-column="62" />
|
||||
<folding>
|
||||
<marker date="1492278100000" expanded="true" signature="428:616" ph="{...}" />
|
||||
</folding>
|
||||
</first_editor>
|
||||
<second_editor />
|
||||
<entry file="file://$PROJECT_DIR$/lib/hooks.dart">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="101">
|
||||
<caret line="238" column="69" lean-forward="true" selection-start-line="238" selection-start-column="69" selection-end-line="238" selection-end-column="69" />
|
||||
<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="84">
|
||||
<caret line="180" column="68" lean-forward="true" selection-start-line="180" selection-start-column="68" selection-end-line="180" selection-end-column="68" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
|
@ -957,5 +919,26 @@
|
|||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/README.md">
|
||||
<provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
|
||||
<state split_layout="SPLIT">
|
||||
<first_editor relative-caret-position="30">
|
||||
<caret line="2" column="52" lean-forward="false" selection-start-line="2" selection-start-column="52" selection-end-line="2" selection-end-column="52" />
|
||||
<folding>
|
||||
<marker date="1493087521000" expanded="true" signature="428:616" ph="{...}" />
|
||||
</folding>
|
||||
</first_editor>
|
||||
<second_editor />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/lib/src/http/angel_http_exception.dart">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="696">
|
||||
<caret line="90" column="46" lean-forward="false" selection-start-line="90" selection-start-column="46" selection-end-line="90" selection-end-column="46" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</component>
|
||||
</project>
|
|
@ -1,6 +1,6 @@
|
|||
# angel_framework
|
||||
|
||||
[![pub 1.0.1](https://img.shields.io/badge/pub-1.0.1-brightgreen.svg)](https://pub.dartlang.org/packages/angel_framework)
|
||||
[![pub 1.0.2](https://img.shields.io/badge/pub-1.0.2-brightgreen.svg)](https://pub.dartlang.org/packages/angel_framework)
|
||||
[![build status](https://travis-ci.org/angel-dart/framework.svg)](https://travis-ci.org/angel-dart/framework)
|
||||
|
||||
A high-powered HTTP server with support for dependency injection, sophisticated routing and more.
|
||||
|
|
|
@ -241,7 +241,7 @@ HookedServiceEventListener addCreatedAt({
|
|||
}
|
||||
}
|
||||
|
||||
var now = new DateTime.now().toIso8601String();
|
||||
var now = new DateTime.now().toUtc().toIso8601String();
|
||||
|
||||
normalize(obj) async {
|
||||
if (obj != null) {
|
||||
|
@ -292,7 +292,7 @@ HookedServiceEventListener addUpdatedAt({
|
|||
}
|
||||
}
|
||||
|
||||
var now = new DateTime.now().toIso8601String();
|
||||
var now = new DateTime.now().toUtc().toIso8601String();
|
||||
|
||||
normalize(obj) async {
|
||||
if (obj != null) {
|
||||
|
|
|
@ -22,7 +22,7 @@ typedef String ResponseSerializer(data);
|
|||
class ResponseContext extends Extensible {
|
||||
final _LockableBytesBuilder _buffer = new _LockableBytesBuilder();
|
||||
final Map<String, String> _headers = {HttpHeaders.SERVER: 'angel'};
|
||||
bool _isOpen = true;
|
||||
bool _isOpen = true, _isClosed = false;
|
||||
|
||||
/// The [Angel] instance that is sending a response.
|
||||
Angel app;
|
||||
|
@ -36,10 +36,10 @@ class ResponseContext extends Extensible {
|
|||
/// Headers that will be sent to the user.
|
||||
Map<String, String> get headers {
|
||||
/// If the response is closed, then this getter will return an immutable `Map`.
|
||||
/*if (!_isOpen)
|
||||
if (!_isOpen)
|
||||
return new Map<String, String>.unmodifiable(_headers);
|
||||
else*/
|
||||
return _headers;
|
||||
else
|
||||
return _headers;
|
||||
}
|
||||
|
||||
/// Serializes response data into a String.
|
||||
|
@ -112,7 +112,7 @@ class ResponseContext extends Extensible {
|
|||
|
||||
/// Sends a download as a response.
|
||||
download(File file, {String filename}) async {
|
||||
// if (!_isOpen) throw _closed();
|
||||
if (!_isOpen) throw _closed();
|
||||
|
||||
headers["Content-Disposition"] =
|
||||
'attachment; filename="${filename ?? file.path}"';
|
||||
|
@ -122,15 +122,25 @@ class ResponseContext extends Extensible {
|
|||
end();
|
||||
}
|
||||
|
||||
/// Prevents more data from being written to the response.
|
||||
void end() {
|
||||
/// Prevents more data from being written to the response, and locks it entire from further editing.
|
||||
void close() {
|
||||
_buffer._lock();
|
||||
_isOpen = false;
|
||||
_isClosed = true;
|
||||
}
|
||||
|
||||
/// Prevents further request handlers from running on the response, except for response finalizers.
|
||||
///
|
||||
/// To disable response finalizers, see [willCloseItself].
|
||||
void end() {
|
||||
_isOpen = false;
|
||||
}
|
||||
|
||||
/// Re-opens a closed response. **NEVER USE THIS IN A PLUGIN**.
|
||||
///
|
||||
/// To preserve your sanity, don't use it ever. This is solely for internal use.
|
||||
///
|
||||
/// You're going to need this one day, and you'll be happy it was added.
|
||||
void reopen() {
|
||||
_buffer._reopen();
|
||||
_isOpen = true;
|
||||
|
@ -150,7 +160,7 @@ class ResponseContext extends Extensible {
|
|||
|
||||
/// Returns a JSONP response.
|
||||
void jsonp(value, {String callbackName: "callback", contentType}) {
|
||||
// if (!_isOpen) throw _closed();
|
||||
if (_isClosed) throw _closed();
|
||||
write("$callbackName(${serializer(value)})");
|
||||
|
||||
if (contentType != null) {
|
||||
|
@ -166,7 +176,7 @@ class ResponseContext extends Extensible {
|
|||
|
||||
/// Renders a view to the response stream, and closes the response.
|
||||
Future render(String view, [Map data]) async {
|
||||
// if (!_isOpen) throw _closed();
|
||||
if (_isClosed) throw _closed();
|
||||
write(await app.viewGenerator(view, data));
|
||||
headers[HttpHeaders.CONTENT_TYPE] = ContentType.HTML.toString();
|
||||
end();
|
||||
|
@ -180,7 +190,7 @@ class ResponseContext extends Extensible {
|
|||
///
|
||||
/// See [Router]#navigate for more. :)
|
||||
void redirect(url, {bool absolute: true, int code: 302}) {
|
||||
// if (!_isOpen) throw _closed();
|
||||
if (_isClosed) throw _closed();
|
||||
headers
|
||||
..[HttpHeaders.CONTENT_TYPE] = ContentType.HTML.toString()
|
||||
..[HttpHeaders.LOCATION] =
|
||||
|
@ -208,7 +218,7 @@ class ResponseContext extends Extensible {
|
|||
|
||||
/// Redirects to the given named [Route].
|
||||
void redirectTo(String name, [Map params, int code]) {
|
||||
// if (!_isOpen) throw _closed();
|
||||
if (_isClosed) throw _closed();
|
||||
Route _findRoute(Router r) {
|
||||
for (Route route in r.routes) {
|
||||
if (route is SymlinkRoute) {
|
||||
|
@ -233,7 +243,7 @@ class ResponseContext extends Extensible {
|
|||
|
||||
/// Redirects to the given [Controller] action.
|
||||
void redirectToAction(String action, [Map params, int code]) {
|
||||
// if (!_isOpen) throw _closed();
|
||||
if (_isClosed) throw _closed();
|
||||
// UserController@show
|
||||
List<String> split = action.split("@");
|
||||
|
||||
|
@ -263,7 +273,7 @@ class ResponseContext extends Extensible {
|
|||
/// Copies a file's contents into the response buffer.
|
||||
Future sendFile(File file,
|
||||
{int chunkSize, int sleepMs: 0, bool resumable: true}) async {
|
||||
// if (!_isOpen) throw _closed();
|
||||
if (_isClosed) throw _closed();
|
||||
|
||||
headers[HttpHeaders.CONTENT_TYPE] = lookupMimeType(file.path);
|
||||
buffer.add(await file.readAsBytes());
|
||||
|
@ -274,7 +284,7 @@ class ResponseContext extends Extensible {
|
|||
///
|
||||
/// [contentType] can be either a [String], or a [ContentType].
|
||||
void serialize(value, {contentType}) {
|
||||
// if (!_isOpen) throw _closed();
|
||||
if (_isClosed) throw _closed();
|
||||
var text = serializer(value);
|
||||
write(text);
|
||||
|
||||
|
@ -293,13 +303,13 @@ class ResponseContext extends Extensible {
|
|||
int sleepMs: 0,
|
||||
bool resumable: true,
|
||||
Codec<List<int>, List<int>> codec}) async {
|
||||
// if (!_isOpen) throw _closed();
|
||||
if (_isClosed) throw _closed();
|
||||
|
||||
headers[HttpHeaders.CONTENT_TYPE] = lookupMimeType(file.path);
|
||||
end();
|
||||
willCloseItself = true;
|
||||
|
||||
var stream = codec != null
|
||||
Stream stream = codec != null
|
||||
? file.openRead().transform(codec.encoder)
|
||||
: file.openRead();
|
||||
await stream.pipe(io);
|
||||
|
@ -307,14 +317,14 @@ class ResponseContext extends Extensible {
|
|||
|
||||
/// Writes data to the response.
|
||||
void write(value, {Encoding encoding: UTF8}) {
|
||||
/*if (!_isOpen)
|
||||
if (_isClosed)
|
||||
throw _closed();
|
||||
else {*/
|
||||
if (value is List<int>)
|
||||
buffer.add(value);
|
||||
else
|
||||
buffer.add(encoding.encode(value.toString()));
|
||||
//}
|
||||
else {
|
||||
if (value is List<int>)
|
||||
buffer.add(value);
|
||||
else
|
||||
buffer.add(encoding.encode(value.toString()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -333,7 +343,7 @@ class _LockableBytesBuilderImpl implements _LockableBytesBuilder {
|
|||
|
||||
@override
|
||||
void _lock() {
|
||||
// _closed = true;
|
||||
_closed = true;
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
|
@ -476,8 +476,6 @@ class Angel extends AngelBase {
|
|||
_afterProcessed.add(request);
|
||||
|
||||
if (!res.willCloseItself) {
|
||||
res.reopen();
|
||||
|
||||
for (var finalizer in responseFinalizers) {
|
||||
await finalizer(req, res);
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
name: angel_framework
|
||||
version: 1.0.1
|
||||
version: 1.0.2
|
||||
description: A high-powered HTTP server with DI, routing and more.
|
||||
author: Tobe O <thosakwe@gmail.com>
|
||||
homepage: https://github.com/angel-dart/angel_framework
|
||||
|
|
Loading…
Reference in a new issue