Updated framework
This commit is contained in:
parent
0d1601980a
commit
437849bbd1
85 changed files with 297 additions and 3186 deletions
|
@ -1,451 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="DBNavigator.Project.DataEditorManager">
|
||||
<record-view-column-sorting-type value="BY_INDEX" />
|
||||
<value-preview-text-wrapping value="true" />
|
||||
<value-preview-pinned value="false" />
|
||||
</component>
|
||||
<component name="DBNavigator.Project.DataExportManager">
|
||||
<export-instructions>
|
||||
<create-header value="true" />
|
||||
<quote-values-containing-separator value="true" />
|
||||
<quote-all-values value="false" />
|
||||
<value-separator value="" />
|
||||
<file-name value="" />
|
||||
<file-location value="" />
|
||||
<scope value="GLOBAL" />
|
||||
<destination value="FILE" />
|
||||
<format value="EXCEL" />
|
||||
<charset value="windows-1252" />
|
||||
</export-instructions>
|
||||
</component>
|
||||
<component name="DBNavigator.Project.DatabaseBrowserManager">
|
||||
<autoscroll-to-editor value="false" />
|
||||
<autoscroll-from-editor value="true" />
|
||||
<show-object-properties value="true" />
|
||||
<loaded-nodes />
|
||||
</component>
|
||||
<component name="DBNavigator.Project.EditorStateManager">
|
||||
<last-used-providers />
|
||||
</component>
|
||||
<component name="DBNavigator.Project.MethodExecutionManager">
|
||||
<method-browser />
|
||||
<execution-history>
|
||||
<group-entries value="true" />
|
||||
<execution-inputs />
|
||||
</execution-history>
|
||||
<argument-values-cache />
|
||||
</component>
|
||||
<component name="DBNavigator.Project.ObjectDependencyManager">
|
||||
<last-used-dependency-type value="INCOMING" />
|
||||
</component>
|
||||
<component name="DBNavigator.Project.ObjectQuickFilterManager">
|
||||
<last-used-operator value="EQUAL" />
|
||||
<filters />
|
||||
</component>
|
||||
<component name="DBNavigator.Project.ScriptExecutionManager" clear-outputs="true">
|
||||
<recently-used-interfaces />
|
||||
</component>
|
||||
<component name="DBNavigator.Project.Settings">
|
||||
<connections />
|
||||
<browser-settings>
|
||||
<general>
|
||||
<display-mode value="TABBED" />
|
||||
<navigation-history-size value="100" />
|
||||
<show-object-details value="false" />
|
||||
</general>
|
||||
<filters>
|
||||
<object-type-filter>
|
||||
<object-type name="SCHEMA" enabled="true" />
|
||||
<object-type name="USER" enabled="true" />
|
||||
<object-type name="ROLE" enabled="true" />
|
||||
<object-type name="PRIVILEGE" enabled="true" />
|
||||
<object-type name="CHARSET" enabled="true" />
|
||||
<object-type name="TABLE" enabled="true" />
|
||||
<object-type name="VIEW" enabled="true" />
|
||||
<object-type name="MATERIALIZED_VIEW" enabled="true" />
|
||||
<object-type name="NESTED_TABLE" enabled="true" />
|
||||
<object-type name="COLUMN" enabled="true" />
|
||||
<object-type name="INDEX" enabled="true" />
|
||||
<object-type name="CONSTRAINT" enabled="true" />
|
||||
<object-type name="DATASET_TRIGGER" enabled="true" />
|
||||
<object-type name="DATABASE_TRIGGER" enabled="true" />
|
||||
<object-type name="SYNONYM" enabled="true" />
|
||||
<object-type name="SEQUENCE" enabled="true" />
|
||||
<object-type name="PROCEDURE" enabled="true" />
|
||||
<object-type name="FUNCTION" enabled="true" />
|
||||
<object-type name="PACKAGE" enabled="true" />
|
||||
<object-type name="TYPE" enabled="true" />
|
||||
<object-type name="TYPE_ATTRIBUTE" enabled="true" />
|
||||
<object-type name="ARGUMENT" enabled="true" />
|
||||
<object-type name="DIMENSION" enabled="true" />
|
||||
<object-type name="CLUSTER" enabled="true" />
|
||||
<object-type name="DBLINK" enabled="true" />
|
||||
</object-type-filter>
|
||||
</filters>
|
||||
<sorting>
|
||||
<object-type name="COLUMN" sorting-type="NAME" />
|
||||
<object-type name="FUNCTION" sorting-type="NAME" />
|
||||
<object-type name="PROCEDURE" sorting-type="NAME" />
|
||||
<object-type name="ARGUMENT" sorting-type="POSITION" />
|
||||
</sorting>
|
||||
<default-editors>
|
||||
<object-type name="VIEW" editor-type="SELECTION" />
|
||||
<object-type name="PACKAGE" editor-type="SELECTION" />
|
||||
<object-type name="TYPE" editor-type="SELECTION" />
|
||||
</default-editors>
|
||||
</browser-settings>
|
||||
<navigation-settings>
|
||||
<lookup-filters>
|
||||
<lookup-objects>
|
||||
<object-type name="SCHEMA" enabled="true" />
|
||||
<object-type name="USER" enabled="false" />
|
||||
<object-type name="ROLE" enabled="false" />
|
||||
<object-type name="PRIVILEGE" enabled="false" />
|
||||
<object-type name="CHARSET" enabled="false" />
|
||||
<object-type name="TABLE" enabled="true" />
|
||||
<object-type name="VIEW" enabled="true" />
|
||||
<object-type name="MATERIALIZED VIEW" enabled="true" />
|
||||
<object-type name="NESTED TABLE" enabled="false" />
|
||||
<object-type name="COLUMN" enabled="false" />
|
||||
<object-type name="INDEX" enabled="true" />
|
||||
<object-type name="CONSTRAINT" enabled="true" />
|
||||
<object-type name="DATASET TRIGGER" enabled="true" />
|
||||
<object-type name="DATABASE TRIGGER" enabled="true" />
|
||||
<object-type name="SYNONYM" enabled="false" />
|
||||
<object-type name="SEQUENCE" enabled="true" />
|
||||
<object-type name="PROCEDURE" enabled="true" />
|
||||
<object-type name="FUNCTION" enabled="true" />
|
||||
<object-type name="PACKAGE" enabled="true" />
|
||||
<object-type name="TYPE" enabled="true" />
|
||||
<object-type name="TYPE ATTRIBUTE" enabled="false" />
|
||||
<object-type name="ARGUMENT" enabled="false" />
|
||||
<object-type name="DIMENSION" enabled="false" />
|
||||
<object-type name="CLUSTER" enabled="false" />
|
||||
<object-type name="DBLINK" enabled="true" />
|
||||
</lookup-objects>
|
||||
<force-database-load value="false" />
|
||||
<prompt-connection-selection value="true" />
|
||||
<prompt-schema-selection value="true" />
|
||||
</lookup-filters>
|
||||
</navigation-settings>
|
||||
<dataset-grid-settings>
|
||||
<general>
|
||||
<enable-zooming value="true" />
|
||||
</general>
|
||||
<sorting>
|
||||
<nulls-first value="true" />
|
||||
<max-sorting-columns value="4" />
|
||||
</sorting>
|
||||
<tracking-columns>
|
||||
<columnNames value="" />
|
||||
<visible value="true" />
|
||||
<editable value="false" />
|
||||
</tracking-columns>
|
||||
</dataset-grid-settings>
|
||||
<dataset-editor-settings>
|
||||
<text-editor-popup>
|
||||
<active value="false" />
|
||||
<active-if-empty value="false" />
|
||||
<data-length-threshold value="100" />
|
||||
<popup-delay value="1000" />
|
||||
</text-editor-popup>
|
||||
<values-list-popup>
|
||||
<show-popup-button value="true" />
|
||||
<element-count-threshold value="1000" />
|
||||
<data-length-threshold value="250" />
|
||||
</values-list-popup>
|
||||
<general>
|
||||
<fetch-block-size value="100" />
|
||||
<fetch-timeout value="30" />
|
||||
<trim-whitespaces value="true" />
|
||||
<convert-empty-strings-to-null value="true" />
|
||||
<select-content-on-cell-edit value="true" />
|
||||
<large-value-preview-active value="true" />
|
||||
</general>
|
||||
<filters>
|
||||
<prompt-filter-dialog value="true" />
|
||||
<default-filter-type value="BASIC" />
|
||||
</filters>
|
||||
<qualified-text-editor text-length-threshold="300">
|
||||
<content-types>
|
||||
<content-type name="Text" enabled="true" />
|
||||
<content-type name="XML" enabled="true" />
|
||||
<content-type name="DTD" enabled="true" />
|
||||
<content-type name="HTML" enabled="true" />
|
||||
<content-type name="XHTML" enabled="true" />
|
||||
<content-type name="CSS" enabled="true" />
|
||||
<content-type name="SQL" enabled="true" />
|
||||
<content-type name="PL/SQL" enabled="true" />
|
||||
<content-type name="JavaScript" enabled="true" />
|
||||
<content-type name="JSP" enabled="true" />
|
||||
<content-type name="JSPx" enabled="true" />
|
||||
<content-type name="ASP" enabled="true" />
|
||||
<content-type name="YAML" enabled="true" />
|
||||
<content-type name="Bash" enabled="true" />
|
||||
</content-types>
|
||||
</qualified-text-editor>
|
||||
<record-navigation>
|
||||
<navigation-target value="VIEWER" />
|
||||
</record-navigation>
|
||||
</dataset-editor-settings>
|
||||
<code-editor-settings>
|
||||
<general>
|
||||
<show-object-navigation-gutter value="false" />
|
||||
<show-spec-declaration-navigation-gutter value="true" />
|
||||
</general>
|
||||
<confirmations>
|
||||
<save-changes value="false" />
|
||||
<revert-changes value="true" />
|
||||
</confirmations>
|
||||
</code-editor-settings>
|
||||
<code-completion-settings>
|
||||
<filters>
|
||||
<basic-filter>
|
||||
<filter-element type="RESERVED_WORD" id="keyword" selected="true" />
|
||||
<filter-element type="RESERVED_WORD" id="function" selected="true" />
|
||||
<filter-element type="RESERVED_WORD" id="parameter" selected="true" />
|
||||
<filter-element type="RESERVED_WORD" id="datatype" selected="true" />
|
||||
<filter-element type="RESERVED_WORD" id="exception" selected="true" />
|
||||
<filter-element type="OBJECT" id="schema" selected="true" />
|
||||
<filter-element type="OBJECT" id="role" selected="true" />
|
||||
<filter-element type="OBJECT" id="user" selected="true" />
|
||||
<filter-element type="OBJECT" id="privilege" selected="true" />
|
||||
<user-schema>
|
||||
<filter-element type="OBJECT" id="table" selected="true" />
|
||||
<filter-element type="OBJECT" id="view" selected="true" />
|
||||
<filter-element type="OBJECT" id="materialized view" selected="true" />
|
||||
<filter-element type="OBJECT" id="index" selected="true" />
|
||||
<filter-element type="OBJECT" id="constraint" selected="true" />
|
||||
<filter-element type="OBJECT" id="trigger" selected="true" />
|
||||
<filter-element type="OBJECT" id="synonym" selected="false" />
|
||||
<filter-element type="OBJECT" id="sequence" selected="true" />
|
||||
<filter-element type="OBJECT" id="procedure" selected="true" />
|
||||
<filter-element type="OBJECT" id="function" selected="true" />
|
||||
<filter-element type="OBJECT" id="package" selected="true" />
|
||||
<filter-element type="OBJECT" id="type" selected="true" />
|
||||
<filter-element type="OBJECT" id="dimension" selected="true" />
|
||||
<filter-element type="OBJECT" id="cluster" selected="true" />
|
||||
<filter-element type="OBJECT" id="dblink" selected="true" />
|
||||
</user-schema>
|
||||
<public-schema>
|
||||
<filter-element type="OBJECT" id="table" selected="false" />
|
||||
<filter-element type="OBJECT" id="view" selected="false" />
|
||||
<filter-element type="OBJECT" id="materialized view" selected="false" />
|
||||
<filter-element type="OBJECT" id="index" selected="false" />
|
||||
<filter-element type="OBJECT" id="constraint" selected="false" />
|
||||
<filter-element type="OBJECT" id="trigger" selected="false" />
|
||||
<filter-element type="OBJECT" id="synonym" selected="false" />
|
||||
<filter-element type="OBJECT" id="sequence" selected="false" />
|
||||
<filter-element type="OBJECT" id="procedure" selected="false" />
|
||||
<filter-element type="OBJECT" id="function" selected="false" />
|
||||
<filter-element type="OBJECT" id="package" selected="false" />
|
||||
<filter-element type="OBJECT" id="type" selected="false" />
|
||||
<filter-element type="OBJECT" id="dimension" selected="false" />
|
||||
<filter-element type="OBJECT" id="cluster" selected="false" />
|
||||
<filter-element type="OBJECT" id="dblink" selected="false" />
|
||||
</public-schema>
|
||||
<any-schema>
|
||||
<filter-element type="OBJECT" id="table" selected="true" />
|
||||
<filter-element type="OBJECT" id="view" selected="true" />
|
||||
<filter-element type="OBJECT" id="materialized view" selected="true" />
|
||||
<filter-element type="OBJECT" id="index" selected="true" />
|
||||
<filter-element type="OBJECT" id="constraint" selected="true" />
|
||||
<filter-element type="OBJECT" id="trigger" selected="true" />
|
||||
<filter-element type="OBJECT" id="synonym" selected="true" />
|
||||
<filter-element type="OBJECT" id="sequence" selected="true" />
|
||||
<filter-element type="OBJECT" id="procedure" selected="true" />
|
||||
<filter-element type="OBJECT" id="function" selected="true" />
|
||||
<filter-element type="OBJECT" id="package" selected="true" />
|
||||
<filter-element type="OBJECT" id="type" selected="true" />
|
||||
<filter-element type="OBJECT" id="dimension" selected="true" />
|
||||
<filter-element type="OBJECT" id="cluster" selected="true" />
|
||||
<filter-element type="OBJECT" id="dblink" selected="true" />
|
||||
</any-schema>
|
||||
</basic-filter>
|
||||
<extended-filter>
|
||||
<filter-element type="RESERVED_WORD" id="keyword" selected="true" />
|
||||
<filter-element type="RESERVED_WORD" id="function" selected="true" />
|
||||
<filter-element type="RESERVED_WORD" id="parameter" selected="true" />
|
||||
<filter-element type="RESERVED_WORD" id="datatype" selected="true" />
|
||||
<filter-element type="RESERVED_WORD" id="exception" selected="true" />
|
||||
<filter-element type="OBJECT" id="schema" selected="true" />
|
||||
<filter-element type="OBJECT" id="user" selected="true" />
|
||||
<filter-element type="OBJECT" id="role" selected="true" />
|
||||
<filter-element type="OBJECT" id="privilege" selected="true" />
|
||||
<user-schema>
|
||||
<filter-element type="OBJECT" id="table" selected="true" />
|
||||
<filter-element type="OBJECT" id="view" selected="true" />
|
||||
<filter-element type="OBJECT" id="materialized view" selected="true" />
|
||||
<filter-element type="OBJECT" id="index" selected="true" />
|
||||
<filter-element type="OBJECT" id="constraint" selected="true" />
|
||||
<filter-element type="OBJECT" id="trigger" selected="true" />
|
||||
<filter-element type="OBJECT" id="synonym" selected="true" />
|
||||
<filter-element type="OBJECT" id="sequence" selected="true" />
|
||||
<filter-element type="OBJECT" id="procedure" selected="true" />
|
||||
<filter-element type="OBJECT" id="function" selected="true" />
|
||||
<filter-element type="OBJECT" id="package" selected="true" />
|
||||
<filter-element type="OBJECT" id="type" selected="true" />
|
||||
<filter-element type="OBJECT" id="dimension" selected="true" />
|
||||
<filter-element type="OBJECT" id="cluster" selected="true" />
|
||||
<filter-element type="OBJECT" id="dblink" selected="true" />
|
||||
</user-schema>
|
||||
<public-schema>
|
||||
<filter-element type="OBJECT" id="table" selected="true" />
|
||||
<filter-element type="OBJECT" id="view" selected="true" />
|
||||
<filter-element type="OBJECT" id="materialized view" selected="true" />
|
||||
<filter-element type="OBJECT" id="index" selected="true" />
|
||||
<filter-element type="OBJECT" id="constraint" selected="true" />
|
||||
<filter-element type="OBJECT" id="trigger" selected="true" />
|
||||
<filter-element type="OBJECT" id="synonym" selected="true" />
|
||||
<filter-element type="OBJECT" id="sequence" selected="true" />
|
||||
<filter-element type="OBJECT" id="procedure" selected="true" />
|
||||
<filter-element type="OBJECT" id="function" selected="true" />
|
||||
<filter-element type="OBJECT" id="package" selected="true" />
|
||||
<filter-element type="OBJECT" id="type" selected="true" />
|
||||
<filter-element type="OBJECT" id="dimension" selected="true" />
|
||||
<filter-element type="OBJECT" id="cluster" selected="true" />
|
||||
<filter-element type="OBJECT" id="dblink" selected="true" />
|
||||
</public-schema>
|
||||
<any-schema>
|
||||
<filter-element type="OBJECT" id="table" selected="true" />
|
||||
<filter-element type="OBJECT" id="view" selected="true" />
|
||||
<filter-element type="OBJECT" id="materialized view" selected="true" />
|
||||
<filter-element type="OBJECT" id="index" selected="true" />
|
||||
<filter-element type="OBJECT" id="constraint" selected="true" />
|
||||
<filter-element type="OBJECT" id="trigger" selected="true" />
|
||||
<filter-element type="OBJECT" id="synonym" selected="true" />
|
||||
<filter-element type="OBJECT" id="sequence" selected="true" />
|
||||
<filter-element type="OBJECT" id="procedure" selected="true" />
|
||||
<filter-element type="OBJECT" id="function" selected="true" />
|
||||
<filter-element type="OBJECT" id="package" selected="true" />
|
||||
<filter-element type="OBJECT" id="type" selected="true" />
|
||||
<filter-element type="OBJECT" id="dimension" selected="true" />
|
||||
<filter-element type="OBJECT" id="cluster" selected="true" />
|
||||
<filter-element type="OBJECT" id="dblink" selected="true" />
|
||||
</any-schema>
|
||||
</extended-filter>
|
||||
</filters>
|
||||
<sorting enabled="true">
|
||||
<sorting-element type="RESERVED_WORD" id="keyword" />
|
||||
<sorting-element type="RESERVED_WORD" id="datatype" />
|
||||
<sorting-element type="OBJECT" id="column" />
|
||||
<sorting-element type="OBJECT" id="table" />
|
||||
<sorting-element type="OBJECT" id="view" />
|
||||
<sorting-element type="OBJECT" id="materialized view" />
|
||||
<sorting-element type="OBJECT" id="index" />
|
||||
<sorting-element type="OBJECT" id="constraint" />
|
||||
<sorting-element type="OBJECT" id="trigger" />
|
||||
<sorting-element type="OBJECT" id="synonym" />
|
||||
<sorting-element type="OBJECT" id="sequence" />
|
||||
<sorting-element type="OBJECT" id="procedure" />
|
||||
<sorting-element type="OBJECT" id="function" />
|
||||
<sorting-element type="OBJECT" id="package" />
|
||||
<sorting-element type="OBJECT" id="type" />
|
||||
<sorting-element type="OBJECT" id="dimension" />
|
||||
<sorting-element type="OBJECT" id="cluster" />
|
||||
<sorting-element type="OBJECT" id="dblink" />
|
||||
<sorting-element type="OBJECT" id="schema" />
|
||||
<sorting-element type="OBJECT" id="role" />
|
||||
<sorting-element type="OBJECT" id="user" />
|
||||
<sorting-element type="RESERVED_WORD" id="function" />
|
||||
<sorting-element type="RESERVED_WORD" id="parameter" />
|
||||
</sorting>
|
||||
<format>
|
||||
<enforce-code-style-case value="true" />
|
||||
</format>
|
||||
</code-completion-settings>
|
||||
<execution-engine-settings>
|
||||
<statement-execution>
|
||||
<fetch-block-size value="100" />
|
||||
<execution-timeout value="20" />
|
||||
<debug-execution-timeout value="600" />
|
||||
<focus-result value="false" />
|
||||
<prompt-execution value="false" />
|
||||
</statement-execution>
|
||||
<script-execution>
|
||||
<command-line-interfaces />
|
||||
<execution-timeout value="300" />
|
||||
</script-execution>
|
||||
<method-execution>
|
||||
<execution-timeout value="30" />
|
||||
<debug-execution-timeout value="600" />
|
||||
<parameter-history-size value="10" />
|
||||
</method-execution>
|
||||
</execution-engine-settings>
|
||||
<operation-settings>
|
||||
<transactions>
|
||||
<uncommitted-changes>
|
||||
<on-project-close value="ASK" />
|
||||
<on-disconnect value="ASK" />
|
||||
<on-autocommit-toggle value="ASK" />
|
||||
</uncommitted-changes>
|
||||
<multiple-uncommitted-changes>
|
||||
<on-commit value="ASK" />
|
||||
<on-rollback value="ASK" />
|
||||
</multiple-uncommitted-changes>
|
||||
</transactions>
|
||||
<session-browser>
|
||||
<disconnect-session value="ASK" />
|
||||
<kill-session value="ASK" />
|
||||
<reload-on-filter-change value="false" />
|
||||
</session-browser>
|
||||
<compiler>
|
||||
<compile-type value="KEEP" />
|
||||
<compile-dependencies value="ASK" />
|
||||
<always-show-controls value="false" />
|
||||
</compiler>
|
||||
<debugger>
|
||||
<debugger-type value="JDBC" />
|
||||
<use-generic-runners value="true" />
|
||||
</debugger>
|
||||
</operation-settings>
|
||||
<ddl-file-settings>
|
||||
<extensions>
|
||||
<mapping file-type-id="VIEW" extensions="vw" />
|
||||
<mapping file-type-id="TRIGGER" extensions="trg" />
|
||||
<mapping file-type-id="PROCEDURE" extensions="prc" />
|
||||
<mapping file-type-id="FUNCTION" extensions="fnc" />
|
||||
<mapping file-type-id="PACKAGE" extensions="pkg" />
|
||||
<mapping file-type-id="PACKAGE_SPEC" extensions="pks" />
|
||||
<mapping file-type-id="PACKAGE_BODY" extensions="pkb" />
|
||||
<mapping file-type-id="TYPE" extensions="tpe" />
|
||||
<mapping file-type-id="TYPE_SPEC" extensions="tps" />
|
||||
<mapping file-type-id="TYPE_BODY" extensions="tpb" />
|
||||
</extensions>
|
||||
<general>
|
||||
<lookup-ddl-files value="true" />
|
||||
<create-ddl-files value="false" />
|
||||
<synchronize-ddl-files value="true" />
|
||||
<use-qualified-names value="false" />
|
||||
<make-scripts-rerunnable value="true" />
|
||||
</general>
|
||||
</ddl-file-settings>
|
||||
<general-settings>
|
||||
<regional-settings>
|
||||
<date-format value="MEDIUM" />
|
||||
<number-format value="UNGROUPED" />
|
||||
<locale value="SYSTEM_DEFAULT" />
|
||||
<use-custom-formats value="false" />
|
||||
</regional-settings>
|
||||
<environment>
|
||||
<environment-types>
|
||||
<environment-type id="development" name="Development" description="Development environment" color="-2430209/-12296320" readonly-code="false" readonly-data="false" />
|
||||
<environment-type id="integration" name="Integration" description="Integration environment" color="-2621494/-12163514" readonly-code="true" readonly-data="false" />
|
||||
<environment-type id="production" name="Production" description="Productive environment" color="-11574/-10271420" readonly-code="true" readonly-data="true" />
|
||||
<environment-type id="other" name="Other" description="" color="-1576/-10724543" readonly-code="false" readonly-data="false" />
|
||||
</environment-types>
|
||||
<visibility-settings>
|
||||
<connection-tabs value="true" />
|
||||
<dialog-headers value="true" />
|
||||
<object-editor-tabs value="true" />
|
||||
<script-editor-tabs value="false" />
|
||||
<execution-result-tabs value="true" />
|
||||
</visibility-settings>
|
||||
</environment>
|
||||
</general-settings>
|
||||
</component>
|
||||
<component name="DBNavigator.Project.StatementExecutionManager">
|
||||
<execution-variables />
|
||||
</component>
|
||||
</project>
|
|
@ -1,6 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Encoding">
|
||||
<file url="PROJECT" charset="UTF-8" />
|
||||
</component>
|
||||
</project>
|
|
@ -1,7 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="JavaScriptLibraryMappings">
|
||||
<includedPredefinedLibrary name="ECMAScript 6" />
|
||||
<includedPredefinedLibrary name="Node.js Core" />
|
||||
</component>
|
||||
</project>
|
|
@ -1,525 +0,0 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Dart Packages" type="DartPackagesLibraryType">
|
||||
<properties>
|
||||
<option name="packageNameToDirsMap">
|
||||
<entry key="analyzer">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/analyzer-0.32.4/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="angel_container">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/angel_container-1.0.0-alpha.8/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="angel_http_exception">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/angel_http_exception-1.0.0+3/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="angel_model">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/angel_model-1.0.0+1/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="angel_route">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/angel_route-3.0.0/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="args">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/args-1.5.0/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="async">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/async-2.0.8/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="body_parser">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/body_parser-1.1.1/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="boolean_selector">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/boolean_selector-1.0.4/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="charcode">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/charcode-1.1.2/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="code_buffer">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/code_buffer-1.0.1/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="collection">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/collection-1.14.11/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="combinator">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/combinator-1.0.0+3/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="convert">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/convert-2.0.2/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="crypto">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/crypto-2.0.6/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="csslib">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/csslib-0.14.5/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="dart2_constant">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/dart2_constant-1.0.2+dart2/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="file">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/file-5.0.4/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="front_end">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/front_end-0.1.4/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="glob">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/glob-1.1.7/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="html">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/html-0.13.3+3/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="http">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/http-0.11.3+17/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="http_multi_server">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/http_multi_server-2.0.5/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="http_parser">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/http_parser-3.1.3/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="http_server">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/http_server-0.9.8/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="intl">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/intl-0.15.7/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="io">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/io-0.3.3/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="js">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/js-0.6.1+1/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="json_rpc_2">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/json_rpc_2-2.0.9/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="kernel">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/kernel-0.3.4/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="logging">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/logging-0.11.3+2/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="matcher">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/matcher-0.12.3+1/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="merge_map">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/merge_map-1.0.1/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="meta">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/meta-1.1.6/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="mime">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/mime-0.9.6+2/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="mock_request">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/mock_request-1.0.3/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="multi_server_socket">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/multi_server_socket-1.0.2/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="node_preamble">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/node_preamble-1.4.4/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="package_config">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/package_config-1.0.5/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="package_resolver">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/package_resolver-1.0.4/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="path">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/path-1.6.2/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="plugin">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/plugin-0.2.0+3/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="pool">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/pool-1.3.6/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="pub_semver">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/pub_semver-1.4.2/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="quiver">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/quiver-2.0.0+1/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="shelf">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/shelf-0.7.3+3/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="shelf_packages_handler">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/shelf_packages_handler-1.0.4/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="shelf_static">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/shelf_static-0.2.8/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="shelf_web_socket">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/shelf_web_socket-0.2.2+4/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="source_map_stack_trace">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/source_map_stack_trace-1.1.5/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="source_maps">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/source_maps-0.10.7/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="source_span">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/source_span-1.4.1/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="stack_trace">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/stack_trace-1.9.3/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="stream_channel">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/stream_channel-1.6.8/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="string_scanner">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/string_scanner-1.0.4/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="term_glyph">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/term_glyph-1.0.1/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="test">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/test-1.3.0/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="tuple">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/tuple-1.0.2/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="typed_data">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/typed_data-1.1.6/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="utf">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/utf-0.9.0+5/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="vm_service_client">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/vm_service_client-0.2.6/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="watcher">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/watcher-0.9.7+10/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="web_socket_channel">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/web_socket_channel-1.0.9/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="yaml">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/yaml-2.1.15/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
</option>
|
||||
</properties>
|
||||
<CLASSES>
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/analyzer-0.32.4/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/angel_container-1.0.0-alpha.8/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/angel_http_exception-1.0.0+3/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/angel_model-1.0.0+1/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/angel_route-3.0.0/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/args-1.5.0/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/async-2.0.8/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/body_parser-1.1.1/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/boolean_selector-1.0.4/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/charcode-1.1.2/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/code_buffer-1.0.1/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/collection-1.14.11/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/combinator-1.0.0+3/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/convert-2.0.2/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/crypto-2.0.6/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/csslib-0.14.5/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/dart2_constant-1.0.2+dart2/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/file-5.0.4/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/front_end-0.1.4/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/glob-1.1.7/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/html-0.13.3+3/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/http-0.11.3+17/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/http_multi_server-2.0.5/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/http_parser-3.1.3/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/http_server-0.9.8/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/intl-0.15.7/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/io-0.3.3/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/js-0.6.1+1/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/json_rpc_2-2.0.9/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/kernel-0.3.4/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/logging-0.11.3+2/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/matcher-0.12.3+1/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/merge_map-1.0.1/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/meta-1.1.6/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/mime-0.9.6+2/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/mock_request-1.0.3/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/multi_server_socket-1.0.2/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/node_preamble-1.4.4/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/package_config-1.0.5/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/package_resolver-1.0.4/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/path-1.6.2/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/plugin-0.2.0+3/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/pool-1.3.6/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/pub_semver-1.4.2/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/quiver-2.0.0+1/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/shelf-0.7.3+3/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/shelf_packages_handler-1.0.4/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/shelf_static-0.2.8/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/shelf_web_socket-0.2.2+4/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/source_map_stack_trace-1.1.5/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/source_maps-0.10.7/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/source_span-1.4.1/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/stack_trace-1.9.3/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/stream_channel-1.6.8/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/string_scanner-1.0.4/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/term_glyph-1.0.1/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/test-1.3.0/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/tuple-1.0.2/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/typed_data-1.1.6/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/utf-0.9.0+5/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/vm_service_client-0.2.6/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/watcher-0.9.7+10/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/web_socket_channel-1.0.9/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/yaml-2.1.15/lib" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<LIBRARY_FILE />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</component>
|
|
@ -1,27 +0,0 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Dart SDK">
|
||||
<CLASSES>
|
||||
<root url="file:///usr/local/opt/dart/libexec/lib/async" />
|
||||
<root url="file:///usr/local/opt/dart/libexec/lib/collection" />
|
||||
<root url="file:///usr/local/opt/dart/libexec/lib/convert" />
|
||||
<root url="file:///usr/local/opt/dart/libexec/lib/core" />
|
||||
<root url="file:///usr/local/opt/dart/libexec/lib/developer" />
|
||||
<root url="file:///usr/local/opt/dart/libexec/lib/html" />
|
||||
<root url="file:///usr/local/opt/dart/libexec/lib/indexed_db" />
|
||||
<root url="file:///usr/local/opt/dart/libexec/lib/io" />
|
||||
<root url="file:///usr/local/opt/dart/libexec/lib/isolate" />
|
||||
<root url="file:///usr/local/opt/dart/libexec/lib/js" />
|
||||
<root url="file:///usr/local/opt/dart/libexec/lib/js_util" />
|
||||
<root url="file:///usr/local/opt/dart/libexec/lib/math" />
|
||||
<root url="file:///usr/local/opt/dart/libexec/lib/mirrors" />
|
||||
<root url="file:///usr/local/opt/dart/libexec/lib/svg" />
|
||||
<root url="file:///usr/local/opt/dart/libexec/lib/typed_data" />
|
||||
<root url="file:///usr/local/opt/dart/libexec/lib/web_audio" />
|
||||
<root url="file:///usr/local/opt/dart/libexec/lib/web_gl" />
|
||||
<root url="file:///usr/local/opt/dart/libexec/lib/web_sql" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<LIBRARY_FILE />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</component>
|
|
@ -1,4 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="PhpWorkspaceProjectConfiguration" backward_compatibility_performed="true" />
|
||||
</project>
|
|
@ -1,8 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/framework.iml" filepath="$PROJECT_DIR$/framework.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
|
@ -1,8 +0,0 @@
|
|||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="All Tests" type="DartTestRunConfigurationType" factoryName="Dart Test" singleton="true">
|
||||
<option name="filePath" value="$PROJECT_DIR$/test" />
|
||||
<option name="scope" value="FOLDER" />
|
||||
<option name="testRunnerOptions" value="-j 4" />
|
||||
<method />
|
||||
</configuration>
|
||||
</component>
|
|
@ -1,9 +0,0 @@
|
|||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="All Tests (PRODUCTION)" type="DartCommandLineRunConfigurationType" factoryName="Dart Command Line Application" singleton="true">
|
||||
<option name="envs">
|
||||
<entry key="ANGEL_ENV" value="production" />
|
||||
</option>
|
||||
<option name="filePath" value="$PROJECT_DIR$/test/all.dart" />
|
||||
<method />
|
||||
</configuration>
|
||||
</component>
|
|
@ -1,6 +0,0 @@
|
|||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="All Tests (for coverage)" type="DartCommandLineRunConfigurationType" factoryName="Dart Command Line Application" singleton="true">
|
||||
<option name="filePath" value="$PROJECT_DIR$/test/all.dart" />
|
||||
<method />
|
||||
</configuration>
|
||||
</component>
|
|
@ -1,6 +0,0 @@
|
|||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="Controller Tests" type="DartTestRunConfigurationType" factoryName="Dart Test" singleton="true">
|
||||
<option name="filePath" value="$PROJECT_DIR$/test/controller_test.dart" />
|
||||
<method />
|
||||
</configuration>
|
||||
</component>
|
|
@ -1,6 +0,0 @@
|
|||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="DI Tests" type="DartTestRunConfigurationType" factoryName="Dart Test" singleton="true">
|
||||
<option name="filePath" value="$PROJECT_DIR$/test/di_test.dart" />
|
||||
<method />
|
||||
</configuration>
|
||||
</component>
|
|
@ -1,6 +0,0 @@
|
|||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="Hooked Tests" type="DartTestRunConfigurationType" factoryName="Dart Test" singleton="true">
|
||||
<option name="filePath" value="$PROJECT_DIR$/test/hooked_test.dart" />
|
||||
<method />
|
||||
</configuration>
|
||||
</component>
|
|
@ -1,8 +0,0 @@
|
|||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="Match routes, even with query params in routing_test.dart" type="DartTestRunConfigurationType" factoryName="Dart Test" singleton="true" nameIsGenerated="true">
|
||||
<option name="filePath" value="$PROJECT_DIR$/test/routing_test.dart" />
|
||||
<option name="scope" value="GROUP_OR_TEST_BY_NAME" />
|
||||
<option name="testName" value="Match routes, even with query params" />
|
||||
<method />
|
||||
</configuration>
|
||||
</component>
|
|
@ -1,9 +0,0 @@
|
|||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="Middleware via metadata in routing_test.dart" type="DartTestRunConfigurationType" factoryName="Dart Test" singleton="true" nameIsGenerated="true">
|
||||
<option name="filePath" value="$PROJECT_DIR$/test/routing_test.dart" />
|
||||
<option name="scope" value="GROUP_OR_TEST_BY_NAME" />
|
||||
<option name="testName" value="Middleware via metadata" />
|
||||
<option name="testRunnerOptions" value="-j 4" />
|
||||
<method />
|
||||
</configuration>
|
||||
</component>
|
|
@ -1,6 +0,0 @@
|
|||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="Routing Tests" type="DartTestRunConfigurationType" factoryName="Dart Test" singleton="true">
|
||||
<option name="filePath" value="$PROJECT_DIR$/test/routing_test.dart" />
|
||||
<method />
|
||||
</configuration>
|
||||
</component>
|
|
@ -1,9 +0,0 @@
|
|||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="can fetch data in services_test.dart" type="DartTestRunConfigurationType" factoryName="Dart Test" singleton="true" nameIsGenerated="true">
|
||||
<option name="filePath" value="$PROJECT_DIR$/test/services_test.dart" />
|
||||
<option name="scope" value="GROUP_OR_TEST_BY_NAME" />
|
||||
<option name="testName" value="can fetch data" />
|
||||
<option name="testRunnerOptions" value="-j 4" />
|
||||
<method />
|
||||
</configuration>
|
||||
</component>
|
|
@ -1,8 +0,0 @@
|
|||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="cannot write after close in streaming_test.dart" type="DartTestRunConfigurationType" factoryName="Dart Test" singleton="true" nameIsGenerated="true">
|
||||
<option name="filePath" value="$PROJECT_DIR$/test/streaming_test.dart" />
|
||||
<option name="scope" value="GROUP_OR_TEST_BY_NAME" />
|
||||
<option name="testName" value="cannot write after close" />
|
||||
<method />
|
||||
</configuration>
|
||||
</component>
|
|
@ -1,9 +0,0 @@
|
|||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="encoding in encoders_buffer_test.dart" type="DartTestRunConfigurationType" factoryName="Dart Test" singleton="true" nameIsGenerated="true">
|
||||
<option name="filePath" value="$PROJECT_DIR$/test/encoders_buffer_test.dart" />
|
||||
<option name="scope" value="GROUP_OR_TEST_BY_NAME" />
|
||||
<option name="testName" value="encoding" />
|
||||
<option name="testRunnerOptions" value="-j 4" />
|
||||
<method />
|
||||
</configuration>
|
||||
</component>
|
|
@ -1,9 +0,0 @@
|
|||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="encoding in streaming_test.dart" type="DartTestRunConfigurationType" factoryName="Dart Test" singleton="true">
|
||||
<option name="filePath" value="$PROJECT_DIR$/test/streaming_test.dart" />
|
||||
<option name="scope" value="GROUP_OR_TEST_BY_NAME" />
|
||||
<option name="testName" value="encoding" />
|
||||
<option name="testRunnerOptions" value="-j 4" />
|
||||
<method />
|
||||
</configuration>
|
||||
</component>
|
|
@ -1,7 +0,0 @@
|
|||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="handle_error.dart" type="DartCommandLineRunConfigurationType" factoryName="Dart Command Line Application" singleton="true" nameIsGenerated="true">
|
||||
<option name="filePath" value="$PROJECT_DIR$/example/handle_error.dart" />
|
||||
<option name="workingDirectory" value="$PROJECT_DIR$" />
|
||||
<method />
|
||||
</configuration>
|
||||
</component>
|
|
@ -1,8 +0,0 @@
|
|||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="injects header or throws in parameter_meta_test.dart" type="DartTestRunConfigurationType" factoryName="Dart Test" singleton="true" nameIsGenerated="true">
|
||||
<option name="filePath" value="$PROJECT_DIR$/test/parameter_meta_test.dart" />
|
||||
<option name="scope" value="GROUP_OR_TEST_BY_NAME" />
|
||||
<option name="testName" value="injects header or throws" />
|
||||
<method />
|
||||
</configuration>
|
||||
</component>
|
|
@ -1,8 +0,0 @@
|
|||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="injects session or throws in parameter_meta_test.dart" type="DartTestRunConfigurationType" factoryName="Dart Test" singleton="true" nameIsGenerated="true">
|
||||
<option name="filePath" value="$PROJECT_DIR$/test/parameter_meta_test.dart" />
|
||||
<option name="scope" value="GROUP_OR_TEST_BY_NAME" />
|
||||
<option name="testName" value="injects session or throws" />
|
||||
<method />
|
||||
</configuration>
|
||||
</component>
|
|
@ -1,7 +0,0 @@
|
|||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="json.dart" type="DartCommandLineRunConfigurationType" factoryName="Dart Command Line Application" singleton="true" nameIsGenerated="true">
|
||||
<option name="filePath" value="$PROJECT_DIR$/example/json.dart" />
|
||||
<option name="workingDirectory" value="$PROJECT_DIR$" />
|
||||
<method />
|
||||
</configuration>
|
||||
</component>
|
|
@ -1,7 +0,0 @@
|
|||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="main.dart" type="DartCommandLineRunConfigurationType" factoryName="Dart Command Line Application" singleton="true" nameIsGenerated="true">
|
||||
<option name="filePath" value="$PROJECT_DIR$/example/main.dart" />
|
||||
<option name="workingDirectory" value="$PROJECT_DIR$" />
|
||||
<method />
|
||||
</configuration>
|
||||
</component>
|
|
@ -1,9 +0,0 @@
|
|||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="metadata in hooked_test.dart" type="DartTestRunConfigurationType" factoryName="Dart Test" singleton="true" nameIsGenerated="true">
|
||||
<option name="filePath" value="$PROJECT_DIR$/test/hooked_test.dart" />
|
||||
<option name="scope" value="GROUP_OR_TEST_BY_NAME" />
|
||||
<option name="testName" value="metadata" />
|
||||
<option name="testRunnerOptions" value="-j 4" />
|
||||
<method />
|
||||
</configuration>
|
||||
</component>
|
|
@ -1,11 +0,0 @@
|
|||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="only match route with matching method in routing_test.dart" type="DartTestRunConfigurationType" factoryName="Dart Test" singleton="true" nameIsGenerated="true">
|
||||
<option name="envs">
|
||||
<entry key="ANGEL_ENV" value="production" />
|
||||
</option>
|
||||
<option name="filePath" value="$PROJECT_DIR$/test/routing_test.dart" />
|
||||
<option name="scope" value="GROUP_OR_TEST_BY_NAME" />
|
||||
<option name="testName" value="only match route with matching method" />
|
||||
<method />
|
||||
</configuration>
|
||||
</component>
|
|
@ -1,7 +0,0 @@
|
|||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="performance::hello (DEV)" type="DartCommandLineRunConfigurationType" factoryName="Dart Command Line Application" singleton="true">
|
||||
<option name="filePath" value="$PROJECT_DIR$/performance/hello/main.dart" />
|
||||
<option name="workingDirectory" value="$PROJECT_DIR$" />
|
||||
<method />
|
||||
</configuration>
|
||||
</component>
|
|
@ -1,11 +0,0 @@
|
|||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="performance::hello (PRODUCTION)" type="DartCommandLineRunConfigurationType" factoryName="Dart Command Line Application" singleton="true">
|
||||
<option name="checkedMode" value="false" />
|
||||
<option name="envs">
|
||||
<entry key="ANGEL_ENV" value="production" />
|
||||
</option>
|
||||
<option name="filePath" value="$PROJECT_DIR$/performance/hello/main.dart" />
|
||||
<option name="workingDirectory" value="$PROJECT_DIR$" />
|
||||
<method />
|
||||
</configuration>
|
||||
</component>
|
|
@ -1,8 +0,0 @@
|
|||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="performance::hello::raw" type="DartCommandLineRunConfigurationType" factoryName="Dart Command Line Application" singleton="true">
|
||||
<option name="checkedMode" value="false" />
|
||||
<option name="filePath" value="$PROJECT_DIR$/performance/hello/raw.dart" />
|
||||
<option name="workingDirectory" value="$PROJECT_DIR$" />
|
||||
<method />
|
||||
</configuration>
|
||||
</component>
|
|
@ -1,7 +0,0 @@
|
|||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="tests in find_one_test.dart" type="DartTestRunConfigurationType" factoryName="Dart Test" singleton="true" nameIsGenerated="true">
|
||||
<option name="filePath" value="$PROJECT_DIR$/test/find_one_test.dart" />
|
||||
<option name="testRunnerOptions" value="-j4" />
|
||||
<method />
|
||||
</configuration>
|
||||
</component>
|
|
@ -1,8 +0,0 @@
|
|||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="tests in framework" type="DartTestRunConfigurationType" factoryName="Dart Test" singleton="true" nameIsGenerated="true">
|
||||
<option name="filePath" value="$PROJECT_DIR$" />
|
||||
<option name="scope" value="FOLDER" />
|
||||
<option name="testRunnerOptions" value="-j 4" />
|
||||
<method />
|
||||
</configuration>
|
||||
</component>
|
|
@ -1,11 +0,0 @@
|
|||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="tests in framework (PRODUCTION)" type="DartTestRunConfigurationType" factoryName="Dart Test" singleton="true">
|
||||
<option name="envs">
|
||||
<entry key="ANGEL_ENV" value="production" />
|
||||
</option>
|
||||
<option name="filePath" value="$PROJECT_DIR$/test" />
|
||||
<option name="scope" value="FOLDER" />
|
||||
<option name="testRunnerOptions" value="-j 4" />
|
||||
<method />
|
||||
</configuration>
|
||||
</component>
|
|
@ -1,9 +0,0 @@
|
|||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="tests in server_test.dart (PRODUCTION)" type="DartTestRunConfigurationType" factoryName="Dart Test" singleton="true">
|
||||
<option name="envs">
|
||||
<entry key="ANGEL_ENV" value="production" />
|
||||
</option>
|
||||
<option name="filePath" value="$PROJECT_DIR$/test/server_test.dart" />
|
||||
<method />
|
||||
</configuration>
|
||||
</component>
|
|
@ -1,7 +0,0 @@
|
|||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="view.dart" type="DartCommandLineRunConfigurationType" factoryName="Dart Command Line Application" singleton="true" nameIsGenerated="true">
|
||||
<option name="filePath" value="$PROJECT_DIR$/example/view.dart" />
|
||||
<option name="workingDirectory" value="$PROJECT_DIR$" />
|
||||
<method />
|
||||
</configuration>
|
||||
</component>
|
|
@ -1,6 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
File diff suppressed because it is too large
Load diff
|
@ -1,5 +1,10 @@
|
|||
# Change Log
|
||||
|
||||
## 4.1.1
|
||||
|
||||
* Updated link to `Angel3` home page
|
||||
* Fixed pedantic warnings
|
||||
|
||||
## 4.1.0
|
||||
|
||||
* Replaced `http_server` with `belatuk_http_server`
|
||||
|
|
|
@ -1,15 +1,14 @@
|
|||
# Angel3 Framework
|
||||
|
||||
[![version](https://img.shields.io/badge/pub-v4.1.0-brightgreen)](https://pub.dartlang.org/packages/angel3_framework)
|
||||
[![version](https://img.shields.io/badge/pub-v4.1.1-brightgreen)](https://pub.dartlang.org/packages/angel3_framework)
|
||||
[![Null Safety](https://img.shields.io/badge/null-safety-brightgreen)](https://dart.dev/null-safety)
|
||||
[![Gitter](https://img.shields.io/gitter/room/angel_dart/discussion)](https://gitter.im/angel_dart/discussion)
|
||||
|
||||
[![License](https://img.shields.io/github/license/dukefirehawk/angel)](https://github.com/dukefirehawk/angel/tree/angel3/packages/framework/LICENSE)
|
||||
|
||||
A high-powered HTTP server with support for dependency injection, sophisticated routing and more.
|
||||
A high-powered HTTP server with support for dependency injection, sophisticated routing and more. Angel3 is designed to keep the core minimal but extensible. Angel3 won't dictate which database or web templating engine to use. Everything is customizable, so that Angel3 can grow to support your application as your use cases increases in complexity.
|
||||
|
||||
This is the core of the [Angel3](https://github.com/dukefirehawk/angel/tree/angel3) framework.
|
||||
To build real-world applications, please see the [homepage](https://angel-dart.dev).
|
||||
This is the core of the [Angel3](https://github.com/dukefirehawk/angel/tree/angel3) framework. To build real-world applications, please see the [User Guide](https://angel3-docs.dukefirehawk.com).
|
||||
|
||||
```dart
|
||||
import 'package:angel3_container/mirrors.dart';
|
||||
|
@ -19,7 +18,7 @@ void main() async {
|
|||
var app = Angel(reflector: MirrorsReflector());
|
||||
|
||||
// Index route. Returns JSON.
|
||||
app.get('/', (req, res) => res.write('Welcome to Angel!'));
|
||||
app.get('/', (req, res) => res.write('Welcome to Angel3!'));
|
||||
|
||||
// Accepts a URL like /greet/foo or /greet/bob.
|
||||
app.get(
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
* Migrate http_server to shelf
|
||||
# TO DO
|
||||
|
||||
* Remove dependency on http_server
|
||||
* Support for [Trestle](https://github.com/dart-bridge/trestle), use this as default, set up migration system around this
|
||||
* Angel CLI
|
||||
* Angel bootstrap project
|
||||
* More docs
|
||||
* Make tutorials, videos
|
||||
* Launch!
|
||||
* Get a nice launch process, so we can pre-compile things before running. Also support a sort of hot-reload
|
||||
|
|
|
@ -37,7 +37,7 @@ class ArtistsController extends Controller {
|
|||
}
|
||||
|
||||
@Expose.post
|
||||
form(RequestContext req) async {
|
||||
Future<Artist> form(RequestContext req) async {
|
||||
// Deserialize the body into an artist.
|
||||
var artist = await req.deserializeBody((m) {
|
||||
return Artist(name: m!['name'] as String? ?? '(unknown name)');
|
||||
|
|
|
@ -41,6 +41,6 @@ void main() async {
|
|||
// HTTP/1.x requests will fallback to `AngelHttp`
|
||||
http2.onHttp1.listen(http1.handleRequest);
|
||||
|
||||
SecureServerSocket server = await http2.startServer('127.0.0.1', 3000);
|
||||
var server = await http2.startServer('127.0.0.1', 3000);
|
||||
print('Listening at https://${server.address.address}:${server.port}');
|
||||
}
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
import 'package:logging/logging.dart';
|
||||
|
||||
/// Prints the contents of a [LogRecord] with pretty colors.
|
||||
void prettyLog(LogRecord record) {
|
||||
print(record.toString());
|
||||
|
||||
if (record.error != null) print(record.error.toString());
|
||||
if (record.stackTrace != null) print(record.stackTrace.toString());
|
||||
}
|
|
@ -57,6 +57,6 @@ void main() async {
|
|||
// HTTP/1.x requests will fallback to `AngelHttp`
|
||||
http2.onHttp1.listen(http1.handleRequest);
|
||||
|
||||
SecureServerSocket server = await http2.startServer('127.0.0.1', 3000);
|
||||
var server = await http2.startServer('127.0.0.1', 3000);
|
||||
print('Listening at https://${server.address.address}:${server.port}');
|
||||
}
|
||||
|
|
|
@ -5,10 +5,10 @@ import 'package:angel3_framework/angel3_framework.dart';
|
|||
import 'package:angel3_framework/http.dart';
|
||||
|
||||
void main() async {
|
||||
int x = 0;
|
||||
var x = 0;
|
||||
var c = Completer();
|
||||
var exit = ReceivePort();
|
||||
List<Isolate> isolates = [];
|
||||
var isolates = <Isolate>[];
|
||||
|
||||
exit.listen((_) {
|
||||
if (++x >= 50) {
|
||||
|
@ -16,7 +16,7 @@ void main() async {
|
|||
}
|
||||
});
|
||||
|
||||
for (int i = 1; i < Platform.numberOfProcessors; i++) {
|
||||
for (var i = 1; i < Platform.numberOfProcessors; i++) {
|
||||
var isolate = await Isolate.spawn(serverMain, null);
|
||||
isolates.add(isolate);
|
||||
print('Spawned isolate #${i + 1}...');
|
||||
|
@ -30,16 +30,16 @@ void main() async {
|
|||
await c.future;
|
||||
}
|
||||
|
||||
serverMain(_) async {
|
||||
void serverMain(_) async {
|
||||
var app = Angel();
|
||||
var http =
|
||||
AngelHttp.custom(app, startShared, useZone: false); // Run a cluster
|
||||
|
||||
app.get('/', (req, res) {
|
||||
return res.serialize({
|
||||
"foo": "bar",
|
||||
"one": [2, "three"],
|
||||
"bar": {"baz": "quux"}
|
||||
'foo': 'bar',
|
||||
'one': [2, 'three'],
|
||||
'bar': {'baz': 'quux'}
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -48,6 +48,6 @@ serverMain(_) async {
|
|||
print(e.stackTrace);
|
||||
};
|
||||
|
||||
HttpServer server = await http.startServer('127.0.0.1', 3000);
|
||||
var server = await http.startServer('127.0.0.1', 3000);
|
||||
print('Listening at http://${server.address.address}:${server.port}');
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@ void main() async {
|
|||
});
|
||||
|
||||
var http = AngelHttp(app);
|
||||
HttpServer server = await http.startServer('127.0.0.1', 3000);
|
||||
var server = await http.startServer('127.0.0.1', 3000);
|
||||
var url = 'http://${server.address.address}:${server.port}';
|
||||
print('Listening at $url');
|
||||
print('Visit these pages to see Angel in action:');
|
||||
|
|
|
@ -14,7 +14,7 @@ void main() async {
|
|||
app.get('/', (req, res) => res.render('index', {'foo': 'bar'}));
|
||||
|
||||
var http = AngelHttp(app);
|
||||
HttpServer server = await http.startServer('127.0.0.1', 3000);
|
||||
var server = await http.startServer('127.0.0.1', 3000);
|
||||
var url = 'http://${server.address.address}:${server.port}';
|
||||
print('Listening at $url');
|
||||
}
|
||||
|
|
|
@ -33,30 +33,32 @@ class AnonymousService<Id, Data> extends Service<Id, Data> {
|
|||
}
|
||||
|
||||
@override
|
||||
index([Map<String, dynamic>? params]) =>
|
||||
Future<List<Data>> index([Map<String, dynamic>? params]) =>
|
||||
Future.sync(() => _index != null ? _index!(params) : super.index(params));
|
||||
|
||||
@override
|
||||
read(Id id, [Map<String, dynamic>? params]) => Future.sync(
|
||||
Future<Data> read(Id id, [Map<String, dynamic>? params]) => Future.sync(
|
||||
() => _read != null ? _read!(id, params) : super.read(id, params));
|
||||
|
||||
@override
|
||||
create(Data data, [Map<String, dynamic>? params]) => Future.sync(() =>
|
||||
_create != null ? _create!(data, params) : super.create(data, params));
|
||||
Future<Data> create(Data data, [Map<String, dynamic>? params]) =>
|
||||
Future.sync(() => _create != null
|
||||
? _create!(data, params)
|
||||
: super.create(data, params));
|
||||
|
||||
@override
|
||||
modify(Id id, Data data, [Map<String, dynamic>? params]) =>
|
||||
Future<Data> modify(Id id, Data data, [Map<String, dynamic>? params]) =>
|
||||
Future.sync(() => _modify != null
|
||||
? _modify!(id, data, params)
|
||||
: super.modify(id, data, params));
|
||||
|
||||
@override
|
||||
update(Id id, Data data, [Map<String, dynamic>? params]) =>
|
||||
Future<Data> update(Id id, Data data, [Map<String, dynamic>? params]) =>
|
||||
Future.sync(() => _update != null
|
||||
? _update!(id, data, params)
|
||||
: super.update(id, data, params));
|
||||
|
||||
@override
|
||||
remove(Id id, [Map<String, dynamic>? params]) => Future.sync(
|
||||
Future<Data> remove(Id id, [Map<String, dynamic>? params]) => Future.sync(
|
||||
() => _remove != null ? _remove!(id, params) : super.remove(id, params));
|
||||
}
|
||||
|
|
|
@ -51,10 +51,10 @@ class Controller {
|
|||
Router<RequestHandler> router, Reflector reflector) async {
|
||||
// Load global expose decl
|
||||
var classMirror = reflector.reflectClass(runtimeType)!;
|
||||
Expose? exposeDecl = findExpose(reflector);
|
||||
var exposeDecl = findExpose(reflector);
|
||||
|
||||
if (exposeDecl == null) {
|
||||
throw Exception("All controllers must carry an @Expose() declaration.");
|
||||
throw Exception('All controllers must carry an @Expose() declaration.');
|
||||
}
|
||||
|
||||
var routable = Routable();
|
||||
|
@ -64,9 +64,7 @@ class Controller {
|
|||
|
||||
// Pre-reflect methods
|
||||
var instanceMirror = reflector.reflectInstance(this);
|
||||
final handlers = <RequestHandler>[]
|
||||
..addAll(exposeDecl.middleware!)
|
||||
..addAll(middleware);
|
||||
final handlers = <RequestHandler>[...exposeDecl.middleware!, ...middleware];
|
||||
final routeBuilder =
|
||||
_routeBuilder(reflector, instanceMirror, routable, handlers);
|
||||
await configureRoutes(routable);
|
||||
|
@ -109,10 +107,11 @@ class Controller {
|
|||
|
||||
var reflectedMethod =
|
||||
instanceMirror!.getField(methodName).reflectee as Function?;
|
||||
var middleware = <RequestHandler>[]
|
||||
..addAll(handlers)
|
||||
..addAll(exposeDecl.middleware!);
|
||||
String? name =
|
||||
var middleware = <RequestHandler>[
|
||||
...handlers,
|
||||
...exposeDecl.middleware!
|
||||
];
|
||||
var name =
|
||||
exposeDecl.as?.isNotEmpty == true ? exposeDecl.as : methodName;
|
||||
|
||||
// Check if normal
|
||||
|
|
|
@ -71,8 +71,8 @@ abstract class Driver<
|
|||
return Future.value(_server);
|
||||
});
|
||||
}).catchError((error) {
|
||||
log.severe("Failed to create server", error);
|
||||
throw ArgumentError("[Driver]Failed to create server");
|
||||
log.severe('Failed to create server', error);
|
||||
throw ArgumentError('[Driver]Failed to create server');
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -125,7 +125,7 @@ abstract class Driver<
|
|||
Future handleRawRequest(Request request, Response response) {
|
||||
return createRequestContext(request, response).then((req) {
|
||||
return createResponseContext(request, response, req).then((res) {
|
||||
handle() {
|
||||
Future handle() {
|
||||
var path = req.path;
|
||||
if (path == '/') path = '';
|
||||
|
||||
|
@ -334,7 +334,7 @@ abstract class Driver<
|
|||
|
||||
if (!res.isBuffered) return res.close().then(_cleanup);
|
||||
|
||||
Future finalizers = ignoreFinalizers == true
|
||||
var finalizers = ignoreFinalizers == true
|
||||
? Future.value()
|
||||
: Future.forEach(app.responseFinalizers, (dynamic f) => f(req, res));
|
||||
|
||||
|
@ -366,7 +366,7 @@ abstract class Driver<
|
|||
if (allowedEncodings != null) {
|
||||
for (var encodingName in allowedEncodings) {
|
||||
Converter<List<int>, List<int>>? encoder;
|
||||
String key = encodingName;
|
||||
var key = encodingName;
|
||||
|
||||
if (res.encoders.containsKey(encodingName)) {
|
||||
encoder = res.encoders[encodingName];
|
||||
|
|
|
@ -96,7 +96,8 @@ class HookedService<Id, Data, T extends Service<Id, Data>>
|
|||
/// Adds hooks to this instance.
|
||||
void addHooks(Angel app) {
|
||||
var hooks = getAnnotation<Hooks>(inner, app.container!.reflector);
|
||||
List<HookedServiceEventListener<Id, Data, T>> before = [], after = [];
|
||||
var before = <HookedServiceEventListener<Id, Data, T>>[];
|
||||
var after = <HookedServiceEventListener<Id, Data, T>>[];
|
||||
|
||||
if (hooks != null) {
|
||||
before.addAll(hooks.before.cast());
|
||||
|
@ -106,9 +107,10 @@ class HookedService<Id, Data, T extends Service<Id, Data>>
|
|||
void applyListeners(
|
||||
Function fn, HookedServiceEventDispatcher<Id, Data, T> dispatcher,
|
||||
[bool? isAfter]) {
|
||||
Hooks? hooks = getAnnotation<Hooks>(fn, app.container!.reflector);
|
||||
final listeners = <HookedServiceEventListener<Id, Data, T>>[]
|
||||
..addAll(isAfter == true ? after : before);
|
||||
var hooks = getAnnotation<Hooks>(fn, app.container!.reflector);
|
||||
final listeners = <HookedServiceEventListener<Id, Data, T>>[
|
||||
...isAfter == true ? after : before
|
||||
];
|
||||
|
||||
if (hooks != null) {
|
||||
listeners.addAll((isAfter == true ? hooks.after : hooks.before).cast());
|
||||
|
|
|
@ -4,7 +4,7 @@ import 'package:string_scanner/string_scanner.dart';
|
|||
/// Parses a string into a [RegExp] that is matched against hostnames.
|
||||
class HostnameSyntaxParser {
|
||||
final SpanScanner _scanner;
|
||||
final _safe = RegExp(r"[0-9a-zA-Z-_:]+");
|
||||
final _safe = RegExp(r'[0-9a-zA-Z-_:]+');
|
||||
|
||||
HostnameSyntaxParser(String hostname)
|
||||
: _scanner = SpanScanner(hostname, sourceUrl: hostname);
|
||||
|
@ -33,7 +33,7 @@ class HostnameSyntaxParser {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
String part = _parseHostnamePart();
|
||||
var part = _parseHostnamePart();
|
||||
if (part.isNotEmpty) {
|
||||
if (_scanner.scan('.')) {
|
||||
var subPart = _parseHostnamePart(shouldThrow: false);
|
||||
|
@ -70,12 +70,12 @@ class HostnameSyntaxParser {
|
|||
} else if (_scanner.scan('+')) {
|
||||
return r'[^$]+';
|
||||
} else if (_scanner.scan(_safe)) {
|
||||
return _scanner.lastMatch?[0] ?? "";
|
||||
return _scanner.lastMatch?[0] ?? '';
|
||||
} else if (!_scanner.isDone && shouldThrow) {
|
||||
var s = String.fromCharCode(_scanner.peekChar()!);
|
||||
throw _formatExc('Unexpected character "$s".');
|
||||
} else {
|
||||
return "";
|
||||
return '';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,8 +12,7 @@ RequestHandler ioc(Function handler, {Iterable<String> optional = const []}) {
|
|||
RequestHandler? contained;
|
||||
|
||||
if (req.app?.container != null) {
|
||||
InjectionRequest injection =
|
||||
preInject(handler, req.app!.container!.reflector);
|
||||
var injection = preInject(handler, req.app!.container!.reflector);
|
||||
//if (injection != null) {
|
||||
injection.optional.addAll(optional);
|
||||
contained = handleContained(handler, injection);
|
||||
|
@ -104,9 +103,9 @@ RequestHandler handleContained(Function handler, InjectionRequest injection,
|
|||
injection.parameters.values.any((p) => p.match != null) &&
|
||||
!suitableForInjection(req, res, injection)) return Future.value(true);
|
||||
|
||||
List args = [];
|
||||
var args = [];
|
||||
|
||||
Map<Symbol, dynamic> named = {};
|
||||
var named = <Symbol, dynamic>{};
|
||||
|
||||
for (var r in injection.required) {
|
||||
args.add(await resolveInjection(r, injection, req, res, true, container));
|
||||
|
|
|
@ -58,7 +58,7 @@ class Expose {
|
|||
head = Expose(null, method: 'HEAD');
|
||||
|
||||
const Expose(this.path,
|
||||
{this.method = "GET",
|
||||
{this.method = 'GET',
|
||||
this.middleware = const [],
|
||||
this.as,
|
||||
this.allowNull = const []});
|
||||
|
@ -101,7 +101,7 @@ class Parameter {
|
|||
this.required});
|
||||
|
||||
/// Returns an error that can be thrown when the parameter is not present.
|
||||
get error {
|
||||
Object? get error {
|
||||
if (cookie?.isNotEmpty == true) {
|
||||
return AngelHttpException.badRequest(
|
||||
message: 'Missing required cookie "$cookie".');
|
||||
|
@ -120,7 +120,7 @@ class Parameter {
|
|||
}
|
||||
|
||||
/// Obtains a value for this parameter from a [RequestContext].
|
||||
getValue(RequestContext req) {
|
||||
dynamic getValue(RequestContext req) {
|
||||
if (cookie?.isNotEmpty == true) {
|
||||
return req.cookies.firstWhere((c) => c.name == cookie).value;
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ part 'injection.dart';
|
|||
abstract class RequestContext<RawRequest> {
|
||||
/// Similar to [Angel.shutdownHooks], allows for logic to be executed
|
||||
/// when a [RequestContext] is done being processed.
|
||||
final log = Logger('RequestContext');
|
||||
final _log = Logger('RequestContext');
|
||||
|
||||
final List<FutureOr<void> Function()> shutdownHooks = [];
|
||||
|
||||
|
@ -43,7 +43,7 @@ abstract class RequestContext<RawRequest> {
|
|||
Map<String, dynamic> _bodyFields = {};
|
||||
List _bodyList = [];
|
||||
List<UploadedFile> _uploadedFiles = <UploadedFile>[];
|
||||
MediaType _contentType = MediaType("text", "plain");
|
||||
MediaType _contentType = MediaType('text', 'plain');
|
||||
|
||||
/// The underlying [RawRequest] provided by the driver.
|
||||
RawRequest get rawRequest;
|
||||
|
@ -86,7 +86,7 @@ abstract class RequestContext<RawRequest> {
|
|||
try {
|
||||
_contentType = MediaType.parse(headers!.contentType.toString());
|
||||
} catch (e) {
|
||||
log.warning(
|
||||
_log.warning(
|
||||
'Invalid media type [${headers!.contentType.toString()}]', e);
|
||||
}
|
||||
}
|
||||
|
@ -101,7 +101,7 @@ abstract class RequestContext<RawRequest> {
|
|||
|
||||
/// Is this an **XMLHttpRequest**?
|
||||
bool get isXhr {
|
||||
return headers?.value("X-Requested-With")?.trim().toLowerCase() ==
|
||||
return headers?.value('X-Requested-With')?.trim().toLowerCase() ==
|
||||
'xmlhttprequest';
|
||||
}
|
||||
|
||||
|
@ -221,6 +221,7 @@ abstract class RequestContext<RawRequest> {
|
|||
|
||||
// Change to assert
|
||||
if (contentTypeString == null) {
|
||||
_log.severe('RequestContext.accepts is null');
|
||||
throw ArgumentError(
|
||||
'RequestContext.accepts expects the `contentType` parameter to NOT be null.');
|
||||
}
|
||||
|
@ -259,9 +260,7 @@ abstract class RequestContext<RawRequest> {
|
|||
if (!_hasParsedBody) {
|
||||
_hasParsedBody = true;
|
||||
|
||||
var contentBody = body;
|
||||
//TODO: Relook at this
|
||||
contentBody ??= Stream.empty();
|
||||
var contentBody = body ?? Stream.empty();
|
||||
|
||||
if (contentType.type == 'application' && contentType.subtype == 'json') {
|
||||
_uploadedFiles = [];
|
||||
|
@ -332,7 +331,7 @@ class UploadedFile {
|
|||
final HttpMultipartFormData formData;
|
||||
final log = Logger('UploadedFile');
|
||||
|
||||
MediaType _contentType = MediaType("multipart", "form-data");
|
||||
MediaType _contentType = MediaType('multipart', 'form-data');
|
||||
|
||||
UploadedFile(this.formData);
|
||||
|
||||
|
|
|
@ -146,7 +146,7 @@ abstract class ResponseContext<RawResponse>
|
|||
Future<void> download(File file, {String? filename}) async {
|
||||
if (!isOpen) throw closed();
|
||||
|
||||
headers["Content-Disposition"] =
|
||||
headers['Content-Disposition'] =
|
||||
'attachment; filename="${filename ?? file.path}"';
|
||||
contentType = MediaType.parse(lookupMimeType(file.path)!);
|
||||
headers['content-length'] = file.lengthSync().toString();
|
||||
|
@ -179,10 +179,10 @@ abstract class ResponseContext<RawResponse>
|
|||
///
|
||||
/// You can override the [contentType] sent; by default it is `application/javascript`.
|
||||
Future<void> jsonp(value,
|
||||
{String callbackName = "callback", MediaType? contentType}) {
|
||||
{String callbackName = 'callback', MediaType? contentType}) {
|
||||
if (!isOpen) throw closed();
|
||||
this.contentType = contentType ?? MediaType('application', 'javascript');
|
||||
write("$callbackName(${serializer(value)})");
|
||||
write('$callbackName(${serializer(value)})');
|
||||
return close();
|
||||
}
|
||||
|
||||
|
@ -238,7 +238,7 @@ abstract class ResponseContext<RawResponse>
|
|||
Future<void> redirectTo(String name, [Map? params, int? code]) async {
|
||||
if (!isOpen) throw closed();
|
||||
Route? _findRoute(Router r) {
|
||||
for (Route route in r.routes) {
|
||||
for (var route in r.routes) {
|
||||
if (route is SymlinkRoute) {
|
||||
final m = _findRoute(route.router);
|
||||
|
||||
|
@ -249,7 +249,7 @@ abstract class ResponseContext<RawResponse>
|
|||
return null;
|
||||
}
|
||||
|
||||
Route? matched = _findRoute(app!);
|
||||
var matched = _findRoute(app!);
|
||||
|
||||
if (matched != null) {
|
||||
await redirect(
|
||||
|
@ -267,21 +267,20 @@ abstract class ResponseContext<RawResponse>
|
|||
Future<void> redirectToAction(String action, [Map? params, int? code]) {
|
||||
if (!isOpen) throw closed();
|
||||
// UserController@show
|
||||
List<String> split = action.split("@");
|
||||
var split = action.split('@');
|
||||
|
||||
if (split.length < 2) {
|
||||
throw Exception(
|
||||
"Controller redirects must take the form of 'Controller@action'. You gave: $action");
|
||||
}
|
||||
|
||||
Controller? controller =
|
||||
app!.controllers[split[0].replaceAll(_straySlashes, '')];
|
||||
var controller = app!.controllers[split[0].replaceAll(_straySlashes, '')];
|
||||
|
||||
if (controller == null) {
|
||||
throw Exception("Could not find a controller named '${split[0]}'");
|
||||
}
|
||||
|
||||
Route? matched = controller.routeMappings[split[1]];
|
||||
var matched = controller.routeMappings[split[1]];
|
||||
|
||||
if (matched == null) {
|
||||
throw Exception(
|
||||
|
@ -293,7 +292,7 @@ abstract class ResponseContext<RawResponse>
|
|||
.path
|
||||
.toString()
|
||||
.replaceAll(_straySlashes, '');
|
||||
String tail = "";
|
||||
var tail = '';
|
||||
if (params != null) {
|
||||
tail = matched
|
||||
.makeUri(params.keys.fold<Map<String, dynamic>>({}, (out, k) {
|
||||
|
@ -349,7 +348,7 @@ abstract class ResponseContext<RawResponse>
|
|||
if (stackTrace != null) {
|
||||
Zone.current.handleUncaughtError(error, stackTrace);
|
||||
} else {
|
||||
log.warning("[ResponseContext] stackTrace is null");
|
||||
log.warning('[ResponseContext] stackTrace is null');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -380,13 +379,13 @@ abstract class ResponseContext<RawResponse>
|
|||
}
|
||||
|
||||
@override
|
||||
void writeln([Object? obj = ""]) {
|
||||
void writeln([Object? obj = '']) {
|
||||
write(obj.toString());
|
||||
write('\r\n');
|
||||
}
|
||||
|
||||
@override
|
||||
void writeAll(Iterable objects, [String separator = ""]) {
|
||||
void writeAll(Iterable objects, [String separator = '']) {
|
||||
write(objects.join(separator));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -101,7 +101,7 @@ class Routable extends Router<RequestHandler> {
|
|||
// Merge @Middleware declaration, if any
|
||||
var reflector = _container?.reflector;
|
||||
if (reflector != null && reflector is! ThrowingReflector) {
|
||||
Middleware? middlewareDeclaration =
|
||||
var middlewareDeclaration =
|
||||
getAnnotation<Middleware>(handler, _container?.reflector);
|
||||
if (middlewareDeclaration != null) {
|
||||
handlers.addAll(middlewareDeclaration.handlers);
|
||||
|
|
|
@ -137,14 +137,14 @@ class Angel extends Routable {
|
|||
|
||||
res.contentType = MediaType('text', 'html', {'charset': 'utf8'});
|
||||
res.statusCode = e.statusCode; // ?? 200;
|
||||
res.write("<!DOCTYPE html><html><head><title>${e.message}</title>");
|
||||
res.write("</head><body><h1>${e.message}</h1><ul>");
|
||||
res.write('<!DOCTYPE html><html><head><title>${e.message}</title>');
|
||||
res.write('</head><body><h1>${e.message}</h1><ul>');
|
||||
|
||||
for (String error in e.errors) {
|
||||
res.write("<li>$error</li>");
|
||||
for (var error in e.errors) {
|
||||
res.write('<li>$error</li>');
|
||||
}
|
||||
|
||||
res.write("</ul></body></html>");
|
||||
res.write('</ul></body></html>');
|
||||
res.close();
|
||||
};
|
||||
|
||||
|
@ -164,7 +164,8 @@ class Angel extends Routable {
|
|||
}
|
||||
|
||||
@override
|
||||
mount(String path, Router<RequestHandler> router) {
|
||||
SymlinkRoute<RequestHandler> mount(
|
||||
String path, Router<RequestHandler> router) {
|
||||
if (_flattened != null) {
|
||||
logger?.warning(
|
||||
'WARNING: You added mounted a child router ($path) on the router, after it had been optimized.');
|
||||
|
@ -284,7 +285,7 @@ class Angel extends Routable {
|
|||
}
|
||||
|
||||
/// Attempts to find a property by the given name within this application.
|
||||
findProperty(key) {
|
||||
dynamic findProperty(key) {
|
||||
if (configuration.containsKey(key)) return configuration[key];
|
||||
|
||||
return parent != null ? parent?.findProperty(key) : null;
|
||||
|
@ -344,7 +345,7 @@ class Angel extends Routable {
|
|||
///
|
||||
/// If you are on `Dart >=2.0.0`, simply call `mountController<T>()`.
|
||||
Future<T> mountController<T extends Controller>([Type? type]) {
|
||||
T controller = container!.make<T>(type)!;
|
||||
var controller = container!.make<T>(type)!;
|
||||
return configure(controller.configureServer).then((_) => controller);
|
||||
}
|
||||
|
||||
|
|
|
@ -23,9 +23,9 @@ class Providers {
|
|||
|
||||
const Providers(this.via);
|
||||
|
||||
static const String viaRest = "rest";
|
||||
static const String viaWebsocket = "websocket";
|
||||
static const String viaGraphQL = "graphql";
|
||||
static const String viaRest = 'rest';
|
||||
static const String viaWebsocket = 'websocket';
|
||||
static const String viaGraphQL = 'graphql';
|
||||
|
||||
/// Represents a request via REST.
|
||||
static const Providers rest = Providers(viaRest);
|
||||
|
@ -162,7 +162,7 @@ class Service<Id, Data> extends Routable {
|
|||
Service<Id, U> map<U>(U Function(Data) encoder, Data Function(U) decoder,
|
||||
{FutureOr<U> Function(RequestContext, ResponseContext)? readData}) {
|
||||
readData ??= (req, res) async {
|
||||
Data inner = await this.readData!(req, res)!;
|
||||
var inner = await this.readData!(req, res)!;
|
||||
return encoder(inner);
|
||||
};
|
||||
|
||||
|
@ -223,12 +223,11 @@ class Service<Id, Data> extends Routable {
|
|||
var handlers = List<RequestHandler>.from(handlerss);
|
||||
|
||||
// Add global middleware if declared on the instance itself
|
||||
Middleware? before =
|
||||
getAnnotation<Middleware>(service, app!.container!.reflector);
|
||||
var before = getAnnotation<Middleware>(service, app!.container!.reflector);
|
||||
|
||||
if (before != null) handlers.addAll(before.handlers);
|
||||
|
||||
Middleware? indexMiddleware =
|
||||
var indexMiddleware =
|
||||
getAnnotation<Middleware>(service.index, app!.container!.reflector);
|
||||
get('/', (req, res) {
|
||||
return index(mergeMap([
|
||||
|
@ -236,14 +235,12 @@ class Service<Id, Data> extends Routable {
|
|||
restProvider,
|
||||
req.serviceParams
|
||||
]));
|
||||
},
|
||||
middleware: []
|
||||
..addAll(handlers)
|
||||
..addAll((indexMiddleware == null)
|
||||
? []
|
||||
: indexMiddleware.handlers.toList()));
|
||||
}, middleware: [
|
||||
...handlers,
|
||||
...(indexMiddleware == null) ? [] : indexMiddleware.handlers.toList()
|
||||
]);
|
||||
|
||||
Middleware? createMiddleware =
|
||||
var createMiddleware =
|
||||
getAnnotation<Middleware>(service.create, app!.container!.reflector);
|
||||
post('/', (req, ResponseContext res) {
|
||||
return req.parseBody().then((_) async {
|
||||
|
@ -258,14 +255,12 @@ class Service<Id, Data> extends Routable {
|
|||
return r;
|
||||
});
|
||||
});
|
||||
},
|
||||
middleware: []
|
||||
..addAll(handlers)
|
||||
..addAll((createMiddleware == null)
|
||||
? []
|
||||
: createMiddleware.handlers.toList()));
|
||||
}, middleware: [
|
||||
...handlers,
|
||||
...(createMiddleware == null) ? [] : createMiddleware.handlers.toList()
|
||||
]);
|
||||
|
||||
Middleware? readMiddleware =
|
||||
var readMiddleware =
|
||||
getAnnotation<Middleware>(service.read, app!.container!.reflector);
|
||||
|
||||
get('/:id', (req, res) {
|
||||
|
@ -276,14 +271,12 @@ class Service<Id, Data> extends Routable {
|
|||
restProvider,
|
||||
req.serviceParams
|
||||
]));
|
||||
},
|
||||
middleware: []
|
||||
..addAll(handlers)
|
||||
..addAll((readMiddleware == null)
|
||||
? []
|
||||
: readMiddleware.handlers.toList()));
|
||||
}, middleware: [
|
||||
...handlers,
|
||||
...(readMiddleware == null) ? [] : readMiddleware.handlers.toList()
|
||||
]);
|
||||
|
||||
Middleware? modifyMiddleware =
|
||||
var modifyMiddleware =
|
||||
getAnnotation<Middleware>(service.modify, app!.container!.reflector);
|
||||
|
||||
patch('/:id', (req, res) {
|
||||
|
@ -297,14 +290,12 @@ class Service<Id, Data> extends Routable {
|
|||
req.serviceParams
|
||||
]));
|
||||
});
|
||||
},
|
||||
middleware: []
|
||||
..addAll(handlers)
|
||||
..addAll((modifyMiddleware == null)
|
||||
? []
|
||||
: modifyMiddleware.handlers.toList()));
|
||||
}, middleware: [
|
||||
...handlers,
|
||||
...(modifyMiddleware == null) ? [] : modifyMiddleware.handlers.toList()
|
||||
]);
|
||||
|
||||
Middleware? updateMiddleware =
|
||||
var updateMiddleware =
|
||||
getAnnotation<Middleware>(service.update, app!.container!.reflector);
|
||||
post('/:id', (req, res) {
|
||||
return req.parseBody().then((_) async {
|
||||
|
@ -317,12 +308,10 @@ class Service<Id, Data> extends Routable {
|
|||
req.serviceParams
|
||||
]));
|
||||
});
|
||||
},
|
||||
middleware: []
|
||||
..addAll(handlers)
|
||||
..addAll((updateMiddleware == null)
|
||||
? []
|
||||
: updateMiddleware.handlers.toList()));
|
||||
}, middleware: [
|
||||
...handlers,
|
||||
...(updateMiddleware == null) ? [] : updateMiddleware.handlers.toList()
|
||||
]);
|
||||
|
||||
put('/:id', (req, res) {
|
||||
return req.parseBody().then((_) async {
|
||||
|
@ -335,14 +324,12 @@ class Service<Id, Data> extends Routable {
|
|||
req.serviceParams
|
||||
]));
|
||||
});
|
||||
},
|
||||
middleware: []
|
||||
..addAll(handlers)
|
||||
..addAll((updateMiddleware == null)
|
||||
? []
|
||||
: updateMiddleware.handlers.toList()));
|
||||
}, middleware: [
|
||||
...handlers,
|
||||
...(updateMiddleware == null) ? [] : updateMiddleware.handlers.toList()
|
||||
]);
|
||||
|
||||
Middleware? removeMiddleware =
|
||||
var removeMiddleware =
|
||||
getAnnotation<Middleware>(service.remove, app!.container!.reflector);
|
||||
delete('/', (req, res) {
|
||||
return remove(
|
||||
|
@ -352,12 +339,10 @@ class Service<Id, Data> extends Routable {
|
|||
restProvider,
|
||||
req.serviceParams
|
||||
]));
|
||||
},
|
||||
middleware: []
|
||||
..addAll(handlers)
|
||||
..addAll((removeMiddleware == null)
|
||||
? []
|
||||
: removeMiddleware.handlers.toList()));
|
||||
}, middleware: [
|
||||
...handlers,
|
||||
...(removeMiddleware == null) ? [] : removeMiddleware.handlers.toList()
|
||||
]);
|
||||
|
||||
delete('/:id', (req, res) {
|
||||
return remove(
|
||||
|
@ -367,12 +352,10 @@ class Service<Id, Data> extends Routable {
|
|||
restProvider,
|
||||
req.serviceParams
|
||||
]));
|
||||
},
|
||||
middleware: []
|
||||
..addAll(handlers)
|
||||
..addAll((removeMiddleware == null)
|
||||
? []
|
||||
: removeMiddleware.handlers.toList()));
|
||||
}, middleware: [
|
||||
...handlers,
|
||||
...(removeMiddleware == null) ? [] : removeMiddleware.handlers.toList()
|
||||
]);
|
||||
|
||||
// REST compliance
|
||||
put('/', (req, res) => throw AngelHttpException.notFound());
|
||||
|
|
|
@ -2,9 +2,9 @@ final Map<Symbol, String> _cache = {};
|
|||
|
||||
String fastNameFromSymbol(Symbol s) {
|
||||
return _cache.putIfAbsent(s, () {
|
||||
String str = s.toString();
|
||||
int open = str.indexOf('"');
|
||||
int close = str.lastIndexOf('"');
|
||||
var str = s.toString();
|
||||
var open = str.indexOf('"');
|
||||
var close = str.lastIndexOf('"');
|
||||
return str.substring(open + 1, close);
|
||||
});
|
||||
}
|
||||
|
|
|
@ -104,8 +104,7 @@ class AngelHttp extends Driver<HttpRequest, HttpResponse, HttpServer,
|
|||
HttpRequest request, HttpResponse response,
|
||||
[HttpRequestContext? correspondingRequest]) {
|
||||
// TODO: Refactored to overcome NNBD migration error
|
||||
HttpResponseContext context =
|
||||
HttpResponseContext(response, app, correspondingRequest);
|
||||
var context = HttpResponseContext(response, app, correspondingRequest);
|
||||
context.serializer = (app.serializer ?? json.encode);
|
||||
context.encoders.addAll(app.encoders);
|
||||
return Future<HttpResponseContext>.value(context);
|
||||
|
|
|
@ -9,7 +9,7 @@ import '../core/core.dart';
|
|||
/// An implementation of [RequestContext] that wraps a [HttpRequest].
|
||||
class HttpRequestContext extends RequestContext<HttpRequest?> {
|
||||
Container? _container;
|
||||
MediaType _contentType = MediaType("text", "plain");
|
||||
MediaType _contentType = MediaType('text', 'plain');
|
||||
HttpRequest? _io;
|
||||
String? _override;
|
||||
String _path = '';
|
||||
|
@ -34,7 +34,7 @@ class HttpRequestContext extends RequestContext<HttpRequest?> {
|
|||
|
||||
@override
|
||||
String get hostname {
|
||||
return rawRequest?.headers.value('host') ?? "localhost";
|
||||
return rawRequest?.headers.value('host') ?? 'localhost';
|
||||
}
|
||||
|
||||
/// The underlying [HttpRequest] instance underneath this context.
|
||||
|
@ -77,10 +77,9 @@ class HttpRequestContext extends RequestContext<HttpRequest?> {
|
|||
/// Magically transforms an [HttpRequest] into a [RequestContext].
|
||||
static Future<HttpRequestContext> from(
|
||||
HttpRequest request, Angel app, String path) {
|
||||
HttpRequestContext ctx = HttpRequestContext()
|
||||
.._container = app.container!.createChild();
|
||||
var ctx = HttpRequestContext().._container = app.container!.createChild();
|
||||
|
||||
String override = request.method;
|
||||
var override = request.method;
|
||||
|
||||
if (app.allowMethodOverrides == true) {
|
||||
override =
|
||||
|
@ -90,7 +89,7 @@ class HttpRequestContext extends RequestContext<HttpRequest?> {
|
|||
|
||||
ctx.app = app;
|
||||
ctx._contentType = request.headers.contentType == null
|
||||
? MediaType("text", "plain")
|
||||
? MediaType('text', 'plain')
|
||||
: MediaType.parse(request.headers.contentType.toString());
|
||||
ctx._override = override;
|
||||
|
||||
|
|
|
@ -104,7 +104,7 @@ class HttpResponseContext extends ResponseContext<HttpResponse> {
|
|||
if (_allowedEncodings != null) {
|
||||
for (var encodingName in _allowedEncodings!) {
|
||||
Converter<List<int>, List<int>>? encoder;
|
||||
String key = encodingName;
|
||||
var key = encodingName;
|
||||
|
||||
if (encoders.containsKey(encodingName)) {
|
||||
encoder = encoders[encodingName];
|
||||
|
@ -132,13 +132,13 @@ class HttpResponseContext extends ResponseContext<HttpResponse> {
|
|||
if (_isClosed && isBuffered) throw ResponseContext.closed();
|
||||
_openStream();
|
||||
|
||||
Stream<List<int>> output = stream;
|
||||
var output = stream;
|
||||
|
||||
if (encoders.isNotEmpty && correspondingRequest != null) {
|
||||
if (_allowedEncodings != null) {
|
||||
for (var encodingName in _allowedEncodings!) {
|
||||
Converter<List<int>, List<int>>? encoder;
|
||||
String key = encodingName;
|
||||
var key = encodingName;
|
||||
|
||||
if (encoders.containsKey(encodingName)) {
|
||||
encoder = encoders[encodingName];
|
||||
|
@ -169,7 +169,7 @@ class HttpResponseContext extends ResponseContext<HttpResponse> {
|
|||
if (_allowedEncodings != null) {
|
||||
for (var encodingName in _allowedEncodings!) {
|
||||
Converter<List<int>, List<int>>? encoder;
|
||||
String key = encodingName;
|
||||
var key = encodingName;
|
||||
|
||||
if (encoders.containsKey(encodingName)) {
|
||||
encoder = encoders[encodingName];
|
||||
|
|
|
@ -55,8 +55,9 @@ class AngelHttp2 extends Driver<Socket, ServerTransportStream,
|
|||
factory AngelHttp2.custom(
|
||||
Angel app,
|
||||
SecurityContext ctx,
|
||||
Future<SecureServerSocket> serverGenerator(
|
||||
address, int port, SecurityContext ctx),
|
||||
Future<SecureServerSocket> Function(
|
||||
InternetAddress? address, int port, SecurityContext ctx)
|
||||
serverGenerator,
|
||||
{bool useZone = true,
|
||||
bool allowHttp1 = false,
|
||||
ServerSettings? settings}) {
|
||||
|
@ -73,8 +74,7 @@ class AngelHttp2 extends Driver<Socket, ServerTransportStream,
|
|||
|
||||
@override
|
||||
Future<SecureServerSocket> generateServer([address, int? port]) async {
|
||||
SecureServerSocket s =
|
||||
await serverGenerator(address ?? '127.0.0.1', port ?? 0);
|
||||
var s = await serverGenerator(address ?? '127.0.0.1', port ?? 0);
|
||||
return _artificial = _AngelHttp2ServerSocket(s, this);
|
||||
}
|
||||
|
||||
|
|
|
@ -82,7 +82,7 @@ class Http2ResponseContext extends ResponseContext<ServerTransportStream> {
|
|||
if (_allowedEncodings != null) {
|
||||
for (var encodingName in _allowedEncodings!) {
|
||||
Converter<List<int>, List<int>>? encoder;
|
||||
String key = encodingName;
|
||||
var key = encodingName;
|
||||
|
||||
if (encoders.containsKey(encodingName)) {
|
||||
encoder = encoders[encodingName];
|
||||
|
@ -136,13 +136,13 @@ class Http2ResponseContext extends ResponseContext<ServerTransportStream> {
|
|||
if (!isOpen && isBuffered) throw ResponseContext.closed();
|
||||
_openStream();
|
||||
|
||||
Stream<List<int>> output = stream;
|
||||
var output = stream;
|
||||
|
||||
if (encoders.isNotEmpty && correspondingRequest != null) {
|
||||
if (_allowedEncodings != null) {
|
||||
for (var encodingName in _allowedEncodings!) {
|
||||
Converter<List<int>, List<int>>? encoder;
|
||||
String key = encodingName;
|
||||
var key = encodingName;
|
||||
|
||||
if (encoders.containsKey(encodingName)) {
|
||||
encoder = encoders[encodingName];
|
||||
|
@ -173,7 +173,7 @@ class Http2ResponseContext extends ResponseContext<ServerTransportStream> {
|
|||
if (_allowedEncodings != null) {
|
||||
for (var encodingName in _allowedEncodings!) {
|
||||
Converter<List<int>, List<int>>? encoder;
|
||||
String key = encodingName;
|
||||
var key = encodingName;
|
||||
|
||||
if (encoders.containsKey(encodingName)) {
|
||||
encoder = encoders[encodingName];
|
||||
|
|
|
@ -3,7 +3,7 @@ import 'package:angel3_container/angel3_container.dart';
|
|||
final RegExp straySlashes = RegExp(r'(^/+)|(/+$)');
|
||||
|
||||
T? matchingAnnotation<T>(List<ReflectedInstance> metadata) {
|
||||
for (ReflectedInstance metaDatum in metadata) {
|
||||
for (var metaDatum in metadata) {
|
||||
if (metaDatum.type.reflectedType == T) {
|
||||
return metaDatum.reflectee as T?;
|
||||
}
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
# Angel Results
|
||||
# Angel Performance Results
|
||||
|
||||
5 consecutive trials run on a Windows 10 box with 4GB RAM, and several programs open in the background.
|
||||
|
||||
Setup:
|
||||
|
||||
* Angel framework `1.0.8`
|
||||
* Running `wrk` 4.0.2.2
|
||||
* 2 threads
|
||||
|
@ -9,10 +11,11 @@ Setup:
|
|||
* 30 seconds
|
||||
|
||||
Average:
|
||||
|
||||
* `11070.18` req/sec
|
||||
* `11.86` ms latency
|
||||
|
||||
```
|
||||
```bash
|
||||
tobe@LAPTOP-VBHCSVRH:/mnt/c/Users/thosa$ wrk -c 256 -d 30 -t 2 http://localhost:3000
|
||||
Running 30s test @ http://localhost:3000
|
||||
2 threads and 256 connections
|
||||
|
@ -59,4 +62,4 @@ Running 30s test @ http://localhost:3000
|
|||
Requests/sec: 11747.23
|
||||
Transfer/sec: 2.27MB
|
||||
tobe@LAPTOP-VBHCSVRH:/mnt/c/Users/thosa$
|
||||
```
|
||||
```
|
||||
|
|
|
@ -3,7 +3,7 @@ library performance.hello;
|
|||
|
||||
import 'dart:io';
|
||||
|
||||
main() {
|
||||
Future<Null> main() {
|
||||
return HttpServer.bind('127.0.0.1', 3000, shared: true).then((server) {
|
||||
print('Listening at http://${server.address.address}:${server.port}');
|
||||
|
||||
|
|
|
@ -1,17 +1,20 @@
|
|||
# `dart:io` Results
|
||||
|
||||
5 consecutive trials run on a Windows 10 box with 4GB RAM, and several programs open in the background.
|
||||
|
||||
Setup:
|
||||
|
||||
* Running `wrk` 4.0.2.2
|
||||
* 2 threads
|
||||
* 256 connections
|
||||
* 30 seconds
|
||||
|
||||
Average:
|
||||
|
||||
* `14598.16` req/sec
|
||||
* `8.88` ms latency
|
||||
|
||||
```
|
||||
```bash
|
||||
tobe@LAPTOP-VBHCSVRH:/mnt/c/Users/thosa$ wrk -c 256 -d 30 -t 2 http://localhost:3000
|
||||
Running 30s test @ http://localhost:3000
|
||||
2 threads and 256 connections
|
||||
|
@ -57,4 +60,4 @@ Running 30s test @ http://localhost:3000
|
|||
434674 requests in 30.09s, 85.39MB read
|
||||
Requests/sec: 14443.98
|
||||
Transfer/sec: 2.84MB
|
||||
```
|
||||
```
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
name: angel3_framework
|
||||
version: 4.1.0
|
||||
description: A high-powered HTTP server with dependency injection, routing and much more.
|
||||
homepage: https://github.com/dukefirehawk/angel/tree/angel3/packages/framework
|
||||
version: 4.1.1
|
||||
description: A high-powered HTTP server extensible framework with dependency injection, routing and much more.
|
||||
homepage: https://angel3-framework.web.app/
|
||||
repository: https://github.com/dukefirehawk/angel/tree/angel3/packages/framework
|
||||
environment:
|
||||
sdk: '>=2.12.0 <3.0.0'
|
||||
dependencies:
|
||||
|
|
|
@ -52,7 +52,7 @@ void main() {
|
|||
|
||||
test('does not continue processing after streaming', () async {
|
||||
var url = driver.uri.replace(path: '/hey');
|
||||
for (int i = 0; i < 100; i++) {
|
||||
for (var i = 0; i < 100; i++) {
|
||||
var r = await client.get(url);
|
||||
print('#$i: ${r.statusCode}: ${r.body}');
|
||||
expect(r.statusCode, 200);
|
||||
|
|
|
@ -37,7 +37,7 @@ void main() {
|
|||
});
|
||||
|
||||
test('strict', () async {
|
||||
var req = await acceptContentTypes(['text/html', "*/*"]);
|
||||
var req = await acceptContentTypes(['text/html', '*/*']);
|
||||
expect(req.accepts('text/html'), isTrue);
|
||||
//expect(req.accepts(ContentType.HTML), isTrue);
|
||||
//expect(req.accepts(ContentType.JSON, strict: true), isFalse);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import 'package:angel3_framework/angel3_framework.dart';
|
||||
import 'package:test/test.dart';
|
||||
|
||||
main() {
|
||||
void main() {
|
||||
test('custom methods', () async {
|
||||
var svc = AnonymousService<String?, String?>(
|
||||
index: ([p]) async => ['index'],
|
||||
|
|
|
@ -19,7 +19,7 @@ class Todo extends Model {
|
|||
|
||||
class BookService extends Service {
|
||||
@override
|
||||
index([params]) async {
|
||||
Future<List> index([params]) async {
|
||||
print('Book params: $params');
|
||||
|
||||
return [
|
||||
|
@ -28,7 +28,7 @@ class BookService extends Service {
|
|||
}
|
||||
}
|
||||
|
||||
incrementTodoTimes(e) {
|
||||
void incrementTodoTimes(e) {
|
||||
IncrementService.TIMES++;
|
||||
}
|
||||
|
||||
|
@ -38,7 +38,7 @@ class IncrementService extends Service {
|
|||
|
||||
@override
|
||||
@Hooks(after: [incrementTodoTimes])
|
||||
index([params]) async => [];
|
||||
Future<List> index([params]) async => [];
|
||||
}
|
||||
|
||||
class IsInstanceOf<T> implements Matcher {
|
||||
|
|
|
@ -11,11 +11,11 @@ import 'package:test/test.dart';
|
|||
|
||||
import 'common.dart';
|
||||
|
||||
@Expose("/todos", middleware: [foo])
|
||||
@Expose('/todos', middleware: [foo])
|
||||
class TodoController extends Controller {
|
||||
List<Todo> todos = [Todo(text: "Hello", over: "world")];
|
||||
List<Todo> todos = [Todo(text: 'Hello', over: 'world')];
|
||||
|
||||
@Expose("/:id", middleware: [bar])
|
||||
@Expose('/:id', middleware: [bar])
|
||||
Future<Todo> fetchTodo(
|
||||
String id, RequestContext req, ResponseContext res) async {
|
||||
expect(req, isNotNull);
|
||||
|
@ -23,7 +23,7 @@ class TodoController extends Controller {
|
|||
return todos[int.parse(id)];
|
||||
}
|
||||
|
||||
@Expose("/namedRoute/:foo", as: "foo")
|
||||
@Expose('/namedRoute/:foo', as: 'foo')
|
||||
Future<String> someRandomRoute(
|
||||
RequestContext req, ResponseContext res) async {
|
||||
return "${req.params['foo']}!";
|
||||
|
@ -37,7 +37,7 @@ class NoExposeController extends Controller {
|
|||
|
||||
String repeatName(String name, int times) {
|
||||
var b = StringBuffer();
|
||||
for (int i = 0; i < times; i++) {
|
||||
for (var i = 0; i < times; i++) {
|
||||
b.writeln(name);
|
||||
}
|
||||
return b.toString();
|
||||
|
@ -56,33 +56,33 @@ class NoExposeController extends Controller {
|
|||
@Expose('/named', as: 'foo')
|
||||
class NamedController extends Controller {
|
||||
@Expose('/optional/:arg?', allowNull: ['arg'])
|
||||
optional() => 2;
|
||||
int optional() => 2;
|
||||
}
|
||||
|
||||
bool foo(RequestContext req, ResponseContext res) {
|
||||
res.write("Hello, ");
|
||||
res.write('Hello, ');
|
||||
return true;
|
||||
}
|
||||
|
||||
bool bar(RequestContext req, ResponseContext res) {
|
||||
res.write("world!");
|
||||
res.write('world!');
|
||||
return true;
|
||||
}
|
||||
|
||||
main() {
|
||||
void main() {
|
||||
late Angel app;
|
||||
late TodoController todoController;
|
||||
late NoExposeController noExposeCtrl;
|
||||
late HttpServer server;
|
||||
http.Client client = http.Client();
|
||||
var client = http.Client();
|
||||
String? url;
|
||||
|
||||
setUp(() async {
|
||||
app = Angel(reflector: MirrorsReflector());
|
||||
app.get(
|
||||
"/redirect",
|
||||
'/redirect',
|
||||
(req, res) async =>
|
||||
res.redirectToAction("TodoController@foo", {"foo": "world"}));
|
||||
res.redirectToAction('TodoController@foo', {'foo': 'world'}));
|
||||
|
||||
// Register as a singleton, just for the purpose of this test
|
||||
if (!app.container!.has<TodoController>()) {
|
||||
|
@ -136,36 +136,36 @@ main() {
|
|||
expect(app.controllers['foo'], const IsInstanceOf<NamedController>());
|
||||
});
|
||||
|
||||
test("middleware", () async {
|
||||
var rgx = RegExp("^Hello, world!");
|
||||
var response = await client.get(Uri.parse("$url/todos/0"));
|
||||
test('middleware', () async {
|
||||
var rgx = RegExp('^Hello, world!');
|
||||
var response = await client.get(Uri.parse('$url/todos/0'));
|
||||
print('Response: ${response.body}');
|
||||
|
||||
expect(rgx.firstMatch(response.body)?.start, equals(0));
|
||||
|
||||
var todo = json.decode(response.body.replaceAll(rgx, "")) as Map;
|
||||
print("Todo: $todo");
|
||||
expect(todo['text'], equals("Hello"));
|
||||
expect(todo['over'], equals("world"));
|
||||
var todo = json.decode(response.body.replaceAll(rgx, '')) as Map;
|
||||
print('Todo: $todo');
|
||||
expect(todo['text'], equals('Hello'));
|
||||
expect(todo['over'], equals('world'));
|
||||
});
|
||||
|
||||
test("controller in group", () async {
|
||||
var rgx = RegExp("^Hello, world!");
|
||||
var response = await client.get(Uri.parse("$url/ctrl_group/todos/0"));
|
||||
test('controller in group', () async {
|
||||
var rgx = RegExp('^Hello, world!');
|
||||
var response = await client.get(Uri.parse('$url/ctrl_group/todos/0'));
|
||||
print('Response: ${response.body}');
|
||||
|
||||
expect(rgx.firstMatch(response.body)?.start, equals(0));
|
||||
|
||||
var todo = json.decode(response.body.replaceAll(rgx, "")) as Map;
|
||||
print("Todo: $todo");
|
||||
expect(todo['text'], equals("Hello"));
|
||||
expect(todo['over'], equals("world"));
|
||||
var todo = json.decode(response.body.replaceAll(rgx, '')) as Map;
|
||||
print('Todo: $todo');
|
||||
expect(todo['text'], equals('Hello'));
|
||||
expect(todo['over'], equals('world'));
|
||||
});
|
||||
|
||||
test("named actions", () async {
|
||||
var response = await client.get(Uri.parse("$url/redirect"));
|
||||
test('named actions', () async {
|
||||
var response = await client.get(Uri.parse('$url/redirect'));
|
||||
print('Response: ${response.body}');
|
||||
expect(response.body, equals("Hello, \"world!\""));
|
||||
expect(response.body, equals('Hello, \"world!\"'));
|
||||
});
|
||||
|
||||
group('optional expose', () {
|
||||
|
|
|
@ -11,8 +11,8 @@ import 'package:test/test.dart';
|
|||
|
||||
import 'common.dart';
|
||||
|
||||
final String TEXT = "make your bed";
|
||||
final String OVER = "never";
|
||||
final String TEXT = 'make your bed';
|
||||
final String OVER = 'never';
|
||||
|
||||
void main() {
|
||||
late Angel app;
|
||||
|
@ -32,9 +32,9 @@ void main() {
|
|||
return Foo(text);
|
||||
});
|
||||
|
||||
app.get("/errands", ioc((Todo singleton) => singleton));
|
||||
app.get('/errands', ioc((Todo singleton) => singleton));
|
||||
app.get(
|
||||
"/errands3",
|
||||
'/errands3',
|
||||
ioc(({required Errand singleton, Todo? foo, RequestContext? req}) =>
|
||||
singleton.text));
|
||||
app.post('/async', ioc((Foo foo) => {'baz': foo.bar}));
|
||||
|
@ -42,7 +42,7 @@ void main() {
|
|||
await app.configure(ErrandController().configureServer);
|
||||
|
||||
server = await AngelHttp(app).startServer();
|
||||
url = "http://${server.address.host}:${server.port}";
|
||||
url = 'http://${server.address.host}:${server.port}';
|
||||
});
|
||||
|
||||
tearDown(() async {
|
||||
|
@ -68,22 +68,22 @@ void main() {
|
|||
expect(text, json.encode('Hey!'));
|
||||
});
|
||||
|
||||
test("singleton in route", () async {
|
||||
validateTodoSingleton(await client.get(Uri.parse("$url/errands")));
|
||||
test('singleton in route', () async {
|
||||
validateTodoSingleton(await client.get(Uri.parse('$url/errands')));
|
||||
});
|
||||
|
||||
test("singleton in controller", () async {
|
||||
validateTodoSingleton(await client.get(Uri.parse("$url/errands2")));
|
||||
test('singleton in controller', () async {
|
||||
validateTodoSingleton(await client.get(Uri.parse('$url/errands2')));
|
||||
});
|
||||
|
||||
test("make in route", () async {
|
||||
var response = await client.get(Uri.parse("$url/errands3"));
|
||||
test('make in route', () async {
|
||||
var response = await client.get(Uri.parse('$url/errands3'));
|
||||
var text = await json.decode(response.body) as String?;
|
||||
expect(text, equals(TEXT));
|
||||
});
|
||||
|
||||
test("make in controller", () async {
|
||||
var response = await client.get(Uri.parse("$url/errands4"));
|
||||
test('make in controller', () async {
|
||||
var response = await client.get(Uri.parse('$url/errands4'));
|
||||
var text = await json.decode(response.body) as String?;
|
||||
expect(text, equals(TEXT));
|
||||
});
|
||||
|
@ -102,26 +102,26 @@ void main() {
|
|||
|
||||
void validateTodoSingleton(response) {
|
||||
var todo = json.decode(response.body.toString()) as Map;
|
||||
expect(todo["id"], equals(null));
|
||||
expect(todo["text"], equals(TEXT));
|
||||
expect(todo["over"], equals(OVER));
|
||||
expect(todo['id'], equals(null));
|
||||
expect(todo['text'], equals(TEXT));
|
||||
expect(todo['over'], equals(OVER));
|
||||
}
|
||||
|
||||
@Expose("/errands2")
|
||||
@Expose('/errands2')
|
||||
class SingletonController extends Controller {
|
||||
@Expose("/")
|
||||
todo(Todo singleton) => singleton;
|
||||
@Expose('/')
|
||||
Todo todo(Todo singleton) => singleton;
|
||||
}
|
||||
|
||||
@Expose("/errands4")
|
||||
@Expose('/errands4')
|
||||
class ErrandController extends Controller {
|
||||
@Expose("/")
|
||||
errand(Errand errand) {
|
||||
@Expose('/')
|
||||
String? errand(Errand errand) {
|
||||
return errand.text;
|
||||
}
|
||||
|
||||
@Expose('/async', method: 'POST')
|
||||
asyncResolve(Foo foo) {
|
||||
Map<String, String> asyncResolve(Foo foo) {
|
||||
return {'bar': foo.bar};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ void main() {
|
|||
client = http.Client();
|
||||
|
||||
server = await AngelHttp(app).startServer();
|
||||
url = "http://${server.address.host}:${server.port}";
|
||||
url = 'http://${server.address.host}:${server.port}';
|
||||
});
|
||||
|
||||
tearDown(() async {
|
||||
|
@ -27,7 +27,7 @@ void main() {
|
|||
await server.close(force: true);
|
||||
});
|
||||
|
||||
test("allow override of method", () async {
|
||||
test('allow override of method', () async {
|
||||
var response = await client.get(Uri.parse('$url/foo'),
|
||||
headers: {'X-HTTP-Method-Override': 'POST'});
|
||||
print('Response: ${response.body}');
|
||||
|
|
|
@ -37,7 +37,7 @@ void main() {
|
|||
};
|
||||
|
||||
server = await AngelHttp(app).startServer();
|
||||
url = "http://${server.address.host}:${server.port}";
|
||||
url = 'http://${server.address.host}:${server.port}';
|
||||
});
|
||||
|
||||
tearDown(() async {
|
||||
|
@ -45,8 +45,8 @@ void main() {
|
|||
client.close();
|
||||
});
|
||||
|
||||
test("listen before and after", () async {
|
||||
int count = 0;
|
||||
test('listen before and after', () async {
|
||||
var count = 0;
|
||||
|
||||
todoService
|
||||
..beforeIndexed.listen((_) {
|
||||
|
@ -56,44 +56,44 @@ void main() {
|
|||
count++;
|
||||
});
|
||||
|
||||
var response = await client.get(Uri.parse("$url/todos"));
|
||||
var response = await client.get(Uri.parse('$url/todos'));
|
||||
print(response.body);
|
||||
expect(count, equals(2));
|
||||
});
|
||||
|
||||
test("cancel before", () async {
|
||||
test('cancel before', () async {
|
||||
todoService.beforeCreated
|
||||
..listen((HookedServiceEvent event) {
|
||||
event.cancel({"hello": "hooked world"});
|
||||
event.cancel({'hello': 'hooked world'});
|
||||
})
|
||||
..listen((HookedServiceEvent event) {
|
||||
event.cancel({"this_hook": "should never run"});
|
||||
event.cancel({'this_hook': 'should never run'});
|
||||
});
|
||||
|
||||
var response = await client.post(Uri.parse("$url/todos"),
|
||||
body: json.encode({"arbitrary": "data"}),
|
||||
var response = await client.post(Uri.parse('$url/todos'),
|
||||
body: json.encode({'arbitrary': 'data'}),
|
||||
headers: headers as Map<String, String>);
|
||||
print(response.body);
|
||||
var result = json.decode(response.body) as Map;
|
||||
expect(result["hello"], equals("hooked world"));
|
||||
expect(result['hello'], equals('hooked world'));
|
||||
});
|
||||
|
||||
test("cancel after", () async {
|
||||
test('cancel after', () async {
|
||||
todoService.afterIndexed
|
||||
..listen((HookedServiceEvent event) async {
|
||||
// Hooks can be Futures ;)
|
||||
event.cancel([
|
||||
{"angel": "framework"}
|
||||
{'angel': 'framework'}
|
||||
]);
|
||||
})
|
||||
..listen((HookedServiceEvent event) {
|
||||
event.cancel({"this_hook": "should never run either"});
|
||||
event.cancel({'this_hook': 'should never run either'});
|
||||
});
|
||||
|
||||
var response = await client.get(Uri.parse("$url/todos"));
|
||||
var response = await client.get(Uri.parse('$url/todos'));
|
||||
print(response.body);
|
||||
var result = json.decode(response.body) as List;
|
||||
expect(result[0]["angel"], equals("framework"));
|
||||
expect(result[0]['angel'], equals('framework'));
|
||||
});
|
||||
|
||||
test('asStream() fires', () async {
|
||||
|
@ -111,7 +111,7 @@ void main() {
|
|||
});
|
||||
|
||||
test('inject request + response', () async {
|
||||
HookedService books = app.findService('books')
|
||||
var books = app.findService('books')
|
||||
as HookedService<dynamic, dynamic, Service<dynamic, dynamic>>;
|
||||
|
||||
books.beforeIndexed.listen((e) {
|
||||
|
@ -131,7 +131,7 @@ void main() {
|
|||
test('contains provider in before and after', () async {
|
||||
var svc = HookedService(AnonymousService(index: ([p]) async => []));
|
||||
|
||||
ensureProviderIsPresent(HookedServiceEvent e) {
|
||||
void ensureProviderIsPresent(HookedServiceEvent e) {
|
||||
var type = e.isBefore ? 'before' : 'after';
|
||||
print('Params to $type ${e.eventName}: ${e.params}');
|
||||
expect(e.params, isMap);
|
||||
|
|
|
@ -5,6 +5,7 @@ import 'package:angel3_container/mirrors.dart';
|
|||
import 'package:angel3_framework/angel3_framework.dart';
|
||||
import 'package:angel3_framework/http.dart';
|
||||
import 'package:angel3_mock_request/angel3_mock_request.dart';
|
||||
import 'package:logging/logging.dart';
|
||||
|
||||
import 'package:test/test.dart';
|
||||
|
||||
|
@ -22,7 +23,7 @@ void main() {
|
|||
group('parameter_meta', parameterMetaTests);
|
||||
}
|
||||
|
||||
parameterMetaTests() {
|
||||
void parameterMetaTests() {
|
||||
Angel app;
|
||||
late AngelHttp http;
|
||||
|
||||
|
@ -58,13 +59,12 @@ parameterMetaTests() {
|
|||
return 'DEFAULT $mode';
|
||||
}));
|
||||
|
||||
/*app.logger = Logger('parameter_meta_test')
|
||||
app.logger = Logger('parameter_meta_test')
|
||||
..onRecord.listen((rec) {
|
||||
print(rec);
|
||||
if (rec.error != null) print(rec.error);
|
||||
if (rec.stackTrace != null) print(rec.stackTrace);
|
||||
});
|
||||
*/
|
||||
});
|
||||
|
||||
test('injects header or throws', () async {
|
||||
|
@ -72,6 +72,7 @@ parameterMetaTests() {
|
|||
var rq = MockHttpRequest('GET', Uri.parse('/header'));
|
||||
await rq.close();
|
||||
var rs = rq.response;
|
||||
//TODO: Using await will hang. To be resolved.
|
||||
http.handleRequest(rq);
|
||||
|
||||
await printResponse(rs);
|
||||
|
|
|
@ -25,4 +25,4 @@ void main() {
|
|||
}, skip: 'Angel no longer has to preinject functions');
|
||||
}
|
||||
|
||||
echoAppFoo(String foo) => foo;
|
||||
String echoAppFoo(String foo) => foo;
|
||||
|
|
|
@ -12,15 +12,16 @@ import 'package:test/test.dart';
|
|||
import 'common.dart';
|
||||
|
||||
@Middleware([interceptor])
|
||||
testMiddlewareMetadata(RequestContext req, ResponseContext res) async {
|
||||
return "This should not be shown.";
|
||||
Future<String> testMiddlewareMetadata(
|
||||
RequestContext req, ResponseContext res) async {
|
||||
return 'This should not be shown.';
|
||||
}
|
||||
|
||||
@Middleware([interceptService])
|
||||
class QueryService extends Service {
|
||||
@override
|
||||
@Middleware([interceptor])
|
||||
read(id, [Map? params]) async => params;
|
||||
Future<Map?> read(id, [Map? params]) async => params;
|
||||
}
|
||||
|
||||
void interceptor(RequestContext req, ResponseContext res) {
|
||||
|
@ -30,11 +31,11 @@ void interceptor(RequestContext req, ResponseContext res) {
|
|||
}
|
||||
|
||||
bool interceptService(RequestContext req, ResponseContext res) {
|
||||
res.write("Service with ");
|
||||
res.write('Service with ');
|
||||
return true;
|
||||
}
|
||||
|
||||
main() {
|
||||
void main() {
|
||||
late Angel app;
|
||||
late Angel nested;
|
||||
late Angel todos;
|
||||
|
@ -88,8 +89,8 @@ main() {
|
|||
await res.redirectTo('Named routes', {'name': 'tests'});
|
||||
});
|
||||
app.get('/log', (RequestContext req, res) async {
|
||||
print("Query: ${req.queryParameters}");
|
||||
return "Logged";
|
||||
print('Query: ${req.queryParameters}');
|
||||
return 'Logged';
|
||||
});
|
||||
|
||||
app.get('/method', (req, res) => 'Only GET');
|
||||
|
@ -112,8 +113,8 @@ main() {
|
|||
//app.dumpTree(header: "DUMPING ROUTES:", showMatchers: true);
|
||||
|
||||
client = http.Client();
|
||||
HttpServer server = await AngelHttp(app).startServer('127.0.0.1', 0);
|
||||
url = "http://${server.address.host}:${server.port}";
|
||||
var server = await AngelHttp(app).startServer('127.0.0.1', 0);
|
||||
url = 'http://${server.address.host}:${server.port}';
|
||||
});
|
||||
|
||||
tearDown(() async {
|
||||
|
@ -122,7 +123,7 @@ main() {
|
|||
});
|
||||
|
||||
test('Can match basic url', () async {
|
||||
var response = await client.get(Uri.parse("$url/hello"));
|
||||
var response = await client.get(Uri.parse('$url/hello'));
|
||||
expect(response.body, equals('"world"'));
|
||||
});
|
||||
|
||||
|
@ -136,7 +137,7 @@ main() {
|
|||
});
|
||||
|
||||
test('Chained routes', () async {
|
||||
var response = await client.get(Uri.parse("$url/chained"));
|
||||
var response = await client.get(Uri.parse('$url/chained'));
|
||||
expect(response.body, equals('abc'));
|
||||
});
|
||||
|
||||
|
@ -167,8 +168,8 @@ main() {
|
|||
|
||||
test('Can serialize function result as JSON', () async {
|
||||
Map headers = <String, String>{'Content-Type': 'application/json'};
|
||||
String postData = json.encode({'it': 'works'});
|
||||
var response = await client.post(Uri.parse("$url/lambda"),
|
||||
var postData = json.encode({'it': 'works'});
|
||||
var response = await client.post(Uri.parse('$url/lambda'),
|
||||
headers: headers as Map<String, String>, body: postData);
|
||||
print('Response: ${response.body}');
|
||||
expect(json.decode(response.body)['it'], equals('works'));
|
||||
|
@ -197,25 +198,25 @@ main() {
|
|||
|
||||
test('Match routes, even with query params', () async {
|
||||
var response = await client
|
||||
.get(Uri.parse("$url/log?foo=bar&bar=baz&baz.foo=bar&baz.bar=foo"));
|
||||
.get(Uri.parse('$url/log?foo=bar&bar=baz&baz.foo=bar&baz.bar=foo'));
|
||||
print(response.body);
|
||||
expect(json.decode(response.body), equals('Logged'));
|
||||
|
||||
response = await client.get(Uri.parse("$url/query/foo?bar=baz"));
|
||||
response = await client.get(Uri.parse('$url/query/foo?bar=baz'));
|
||||
print(response.body);
|
||||
expect(response.body, equals("Service with Middleware"));
|
||||
expect(response.body, equals('Service with Middleware'));
|
||||
});
|
||||
|
||||
test('only match route with matching method', () async {
|
||||
var response = await client.get(Uri.parse("$url/method"));
|
||||
var response = await client.get(Uri.parse('$url/method'));
|
||||
print(response.body);
|
||||
expect(response.body, '"Only GET"');
|
||||
|
||||
response = await client.post(Uri.parse("$url/method"));
|
||||
response = await client.post(Uri.parse('$url/method'));
|
||||
print(response.body);
|
||||
expect(response.body, '"Only POST"');
|
||||
|
||||
response = await client.patch(Uri.parse("$url/method"));
|
||||
response = await client.patch(Uri.parse('$url/method'));
|
||||
print(response.body);
|
||||
expect(response.body, '"MJ"');
|
||||
});
|
||||
|
|
|
@ -23,7 +23,7 @@ void main() {
|
|||
client = http.Client();
|
||||
|
||||
server = await AngelHttp(app).startServer();
|
||||
url = "http://${server.address.host}:${server.port}";
|
||||
url = 'http://${server.address.host}:${server.port}';
|
||||
});
|
||||
|
||||
tearDown(() async {
|
||||
|
@ -31,7 +31,7 @@ void main() {
|
|||
await server.close(force: true);
|
||||
});
|
||||
|
||||
test("correct content-type", () async {
|
||||
test('correct content-type', () async {
|
||||
var response = await client.get(Uri.parse('$url/foo'));
|
||||
print('Response: ${response.body}');
|
||||
expect(response.headers['content-type'], contains('application/json'));
|
||||
|
|
|
@ -31,9 +31,9 @@ void main() {
|
|||
if (e.stackTrace != null) print(Chain.forTrace(e.stackTrace!).terse);
|
||||
};
|
||||
|
||||
HttpServer server = await AngelHttp(app).startServer();
|
||||
var server = await AngelHttp(app).startServer();
|
||||
client = http.Client();
|
||||
url = "http://${server.address.host}:${server.port}";
|
||||
url = 'http://${server.address.host}:${server.port}';
|
||||
});
|
||||
|
||||
tearDown(() async {
|
||||
|
@ -43,7 +43,7 @@ void main() {
|
|||
|
||||
group('memory', () {
|
||||
test('can index an empty service', () async {
|
||||
var response = await client.get(Uri.parse("$url/todos/"));
|
||||
var response = await client.get(Uri.parse('$url/todos/'));
|
||||
print(response.body);
|
||||
expect(response.body, equals('[]'));
|
||||
print(response.body);
|
||||
|
@ -51,8 +51,8 @@ void main() {
|
|||
});
|
||||
|
||||
test('can create data', () async {
|
||||
String postData = json.encode({'text': 'Hello, world!'});
|
||||
var response = await client.post(Uri.parse("$url/todos"),
|
||||
var postData = json.encode({'text': 'Hello, world!'});
|
||||
var response = await client.post(Uri.parse('$url/todos'),
|
||||
headers: headers as Map<String, String>, body: postData);
|
||||
expect(response.statusCode, 201);
|
||||
var jsons = json.decode(response.body);
|
||||
|
@ -61,10 +61,10 @@ void main() {
|
|||
});
|
||||
|
||||
test('can fetch data', () async {
|
||||
String postData = json.encode({'text': 'Hello, world!'});
|
||||
await client.post(Uri.parse("$url/todos"),
|
||||
var postData = json.encode({'text': 'Hello, world!'});
|
||||
await client.post(Uri.parse('$url/todos'),
|
||||
headers: headers as Map<String, String>, body: postData);
|
||||
var response = await client.get(Uri.parse("$url/todos/0"));
|
||||
var response = await client.get(Uri.parse('$url/todos/0'));
|
||||
expect(response.statusCode, 200);
|
||||
var jsons = json.decode(response.body);
|
||||
print(jsons);
|
||||
|
@ -72,12 +72,12 @@ void main() {
|
|||
});
|
||||
|
||||
test('can modify data', () async {
|
||||
String postData = json.encode({'text': 'Hello, world!'});
|
||||
await client.post(Uri.parse("$url/todos"),
|
||||
var postData = json.encode({'text': 'Hello, world!'});
|
||||
await client.post(Uri.parse('$url/todos'),
|
||||
headers: headers as Map<String, String>, body: postData);
|
||||
postData = json.encode({'text': 'modified'});
|
||||
|
||||
var response = await client.patch(Uri.parse("$url/todos/0"),
|
||||
var response = await client.patch(Uri.parse('$url/todos/0'),
|
||||
headers: headers, body: postData);
|
||||
expect(response.statusCode, 200);
|
||||
var jsons = json.decode(response.body);
|
||||
|
@ -86,12 +86,12 @@ void main() {
|
|||
});
|
||||
|
||||
test('can overwrite data', () async {
|
||||
String postData = json.encode({'text': 'Hello, world!'});
|
||||
await client.post(Uri.parse("$url/todos"),
|
||||
var postData = json.encode({'text': 'Hello, world!'});
|
||||
await client.post(Uri.parse('$url/todos'),
|
||||
headers: headers as Map<String, String>, body: postData);
|
||||
postData = json.encode({'over': 'write'});
|
||||
|
||||
var response = await client.post(Uri.parse("$url/todos/0"),
|
||||
var response = await client.post(Uri.parse('$url/todos/0'),
|
||||
headers: headers, body: postData);
|
||||
expect(response.statusCode, 200);
|
||||
var jsons = json.decode(response.body);
|
||||
|
@ -112,9 +112,9 @@ void main() {
|
|||
});
|
||||
|
||||
test('can delete data', () async {
|
||||
String postData = json.encode({'text': 'Hello, world!'});
|
||||
var postData = json.encode({'text': 'Hello, world!'});
|
||||
var created = await client
|
||||
.post(Uri.parse("$url/todos"),
|
||||
.post(Uri.parse('$url/todos'),
|
||||
headers: headers as Map<String, String>, body: postData)
|
||||
.then((r) => json.decode(r.body));
|
||||
var response =
|
||||
|
|
|
@ -75,7 +75,7 @@ void main() {
|
|||
|
||||
tearDown(() => http.close());
|
||||
|
||||
_expectHelloBye(String path) async {
|
||||
void _expectHelloBye(String path) async {
|
||||
var rq = MockHttpRequest('GET', Uri.parse(path));
|
||||
await (rq.close());
|
||||
await http.handleRequest(rq);
|
||||
|
|
|
@ -66,11 +66,10 @@ app.fallback(vDir.pushState('index.html'));
|
|||
|
||||
The `VirtualDirectory` API accepts a few named parameters:
|
||||
|
||||
- **source**: A `Directory` containing the files to be served. If left null, then Angel will serve either from `web` (in development) or
|
||||
- **source**: A `Directory` containing the files to be served. If left null, then Angel3 will serve either from `web` (in development) or
|
||||
`build/web` (in production), depending on your `ANGEL_ENV`.
|
||||
- **indexFileNames**: A `List<String>` of filenames that should be served as index pages. Default is `['index.html']`.
|
||||
- **publicPath**: To serve index files, you need to specify the virtual path under which
|
||||
angel_static is serving your files. If you are not serving static files at the site root,
|
||||
angel3_static is serving your files. If you are not serving static files at the site root,
|
||||
please include this.
|
||||
- **callback**: Runs before sending a file to a client. Use this to set headers, etc. If it returns anything other than `null` or `true`,
|
||||
then the callback's result will be sent to the user, instead of the file contents.
|
||||
- **callback**: Runs before sending a file to a client. Use this to set headers, etc. If it returns anything other than `null` or `true`, then the callback's result will be sent to the user, instead of the file contents.
|
||||
|
|
Loading…
Reference in a new issue