diff --git a/samples/react/MusicStore/ReactApp/fx/domain-tasks.d.ts b/samples/react/MusicStore/ReactApp/fx/domain-task.d.ts similarity index 78% rename from samples/react/MusicStore/ReactApp/fx/domain-tasks.d.ts rename to samples/react/MusicStore/ReactApp/fx/domain-task.d.ts index 33013aa..902905a 100644 --- a/samples/react/MusicStore/ReactApp/fx/domain-tasks.d.ts +++ b/samples/react/MusicStore/ReactApp/fx/domain-task.d.ts @@ -1,10 +1,10 @@ // TODO: Move this on to definitelytyped, and take a dependency on whatwg-fetch // so that the 'fetch' function can have the correct type args -declare module 'domain-tasks' { +declare module 'domain-task' { function addTask(task: PromiseLike): void; } -declare module 'domain-tasks/fetch' { +declare module 'domain-task/fetch' { function fetch(url, options?): Promise; } diff --git a/samples/react/MusicStore/ReactApp/fx/render-server.js b/samples/react/MusicStore/ReactApp/fx/render-server.js index ed90735..5ea8c35 100644 --- a/samples/react/MusicStore/ReactApp/fx/render-server.js +++ b/samples/react/MusicStore/ReactApp/fx/render-server.js @@ -1,7 +1,7 @@ require('./require-ts-babel')(); // Enable loading TS/TSX/JSX/ES2015 modules var url = require('url'); -var domainTasks = require('domain-tasks'); -var baseUrl = require('domain-tasks/fetch').baseUrl; +var domainTask = require('domain-task'); +var baseUrl = require('domain-task/fetch').baseUrl; function render(bootModulePath, absoluteRequestUrl, requestPathAndQuery, callback) { var bootFunc = require(bootModulePath); @@ -19,11 +19,11 @@ function render(bootModulePath, absoluteRequestUrl, requestPathAndQuery, callbac }; // Open a new domain that can track all the async tasks commenced during first render - domainTasks.run(function() { + domainTask.run(function() { baseUrl(absoluteRequestUrl); // Since route matching is asynchronous, add the rendering itself to the list of tasks we're awaiting - domainTasks.addTask(new Promise(function (resolve, reject) { + domainTask.addTask(new Promise(function (resolve, reject) { // Now actually perform the first render that will match a route and commence associated tasks bootFunc(params, function(error, result) { if (error) { diff --git a/samples/react/MusicStore/ReactApp/store/AlbumDetails.ts b/samples/react/MusicStore/ReactApp/store/AlbumDetails.ts index eff9796..8903f16 100644 --- a/samples/react/MusicStore/ReactApp/store/AlbumDetails.ts +++ b/samples/react/MusicStore/ReactApp/store/AlbumDetails.ts @@ -1,4 +1,4 @@ -import { fetch } from 'domain-tasks/fetch'; +import { fetch } from 'domain-task/fetch'; import { typeName, isActionType, Action, Reducer } from '../fx/TypedRedux'; import { ActionCreator } from './'; import { Genre } from './GenreList'; diff --git a/samples/react/MusicStore/ReactApp/store/FeaturedAlbums.ts b/samples/react/MusicStore/ReactApp/store/FeaturedAlbums.ts index 5a4bb9c..8a60ee2 100644 --- a/samples/react/MusicStore/ReactApp/store/FeaturedAlbums.ts +++ b/samples/react/MusicStore/ReactApp/store/FeaturedAlbums.ts @@ -1,4 +1,4 @@ -import { fetch } from 'domain-tasks/fetch'; +import { fetch } from 'domain-task/fetch'; import { typeName, isActionType, Action, Reducer } from '../fx/TypedRedux'; import { ActionCreator } from './'; diff --git a/samples/react/MusicStore/ReactApp/store/GenreDetails.ts b/samples/react/MusicStore/ReactApp/store/GenreDetails.ts index c47fba6..c7754ae 100644 --- a/samples/react/MusicStore/ReactApp/store/GenreDetails.ts +++ b/samples/react/MusicStore/ReactApp/store/GenreDetails.ts @@ -1,4 +1,4 @@ -import { fetch } from 'domain-tasks/fetch'; +import { fetch } from 'domain-task/fetch'; import { typeName, isActionType, Action, Reducer } from '../fx/TypedRedux'; import { ActionCreator } from './'; import { Album } from './FeaturedAlbums'; diff --git a/samples/react/MusicStore/ReactApp/store/GenreList.ts b/samples/react/MusicStore/ReactApp/store/GenreList.ts index 682bded..4f1107d 100644 --- a/samples/react/MusicStore/ReactApp/store/GenreList.ts +++ b/samples/react/MusicStore/ReactApp/store/GenreList.ts @@ -1,4 +1,4 @@ -import { fetch } from 'domain-tasks/fetch'; +import { fetch } from 'domain-task/fetch'; import { typeName, isActionType, Action, Reducer } from '../fx/TypedRedux'; import { ActionCreator } from './'; diff --git a/samples/react/MusicStore/package.json b/samples/react/MusicStore/package.json index 16ba485..7ba2b0c 100644 --- a/samples/react/MusicStore/package.json +++ b/samples/react/MusicStore/package.json @@ -21,7 +21,7 @@ "dependencies": { "bootstrap": "^3.3.6", "domain-context": "^0.5.1", - "domain-tasks": "^1.0.0", + "domain-task": "^1.0.0", "isomorphic-fetch": "^2.2.1", "ntypescript": "^1.201602072208.1", "react": "^0.14.7",