fluxible-plugin-fetchr
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -9,2 +9,3 @@ /** | ||
var Fetchr = require('fetchr'); | ||
var objectAssign = require('object-assign'); | ||
@@ -66,5 +67,7 @@ /** | ||
* @param {Object} contextOptions.req The server request object (only supplied if on server) | ||
* @param {Object} contextOptions.dimensions Request context dimensions (e.g. { device: "tablet" }) | ||
* @returns {Object} | ||
*/ | ||
plugContext: function plugContext(contextOptions) { | ||
var dimensions = contextOptions.dimensions; | ||
return { | ||
@@ -79,3 +82,4 @@ /** | ||
req: contextOptions.req, | ||
xhrPath: xhrPath | ||
xhrPath: xhrPath, | ||
context: objectAssign({}, dimensions) | ||
}); | ||
@@ -91,2 +95,20 @@ actionContext.service = { | ||
}; | ||
}, | ||
/** | ||
* Called to dehydrate plugin options | ||
* @method dehydrate | ||
* @returns {Object} | ||
*/ | ||
dehydrate: function dehydrate() { | ||
return { | ||
dimensions: contextOptions.dimensions | ||
}; | ||
}, | ||
/** | ||
* Called to rehydrate plugin options | ||
* @method rehydrate | ||
* @returns {Object} | ||
*/ | ||
rehydrate: function rehydrate(state) { | ||
dimensions = state.dimensions; | ||
} | ||
@@ -93,0 +115,0 @@ }; |
{ | ||
"name": "fluxible-plugin-fetchr", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "A plugin for fluxible applications to provide an isomorphic interface for RESTful services", | ||
@@ -13,3 +13,4 @@ "main": "index.js", | ||
"debug": "^2.0.0", | ||
"fetchr": "^0.4.0" | ||
"fetchr": "^0.4.0", | ||
"object-assign": "^1.0.0" | ||
}, | ||
@@ -19,3 +20,3 @@ "devDependencies": { | ||
"coveralls": "^2.11.1", | ||
"fluxible-app": "^0.0.x", | ||
"fluxible-app": "^0.1.0", | ||
"grunt": "^0.4.5", | ||
@@ -22,0 +23,0 @@ "istanbul": "~0.2.7", |
# Fetchr Plugin for Fluxible App | ||
[![Build Status](https://travis-ci.org/yahoo/fluxible-plugin-fetchr.svg?branch=master)](https://travis-ci.org/yahoo/fluxible-plugin-fetchr) [![Dependency Status](https://david-dm.org/yahoo/fluxible-plugin-fetchr.svg)](https://david-dm.org/yahoo/fluxible-plugin-fetchr) [![Coverage Status](https://coveralls.io/repos/yahoo/fluxible-plugin-fetchr/badge.png?branch=master)](https://coveralls.io/r/yahoo/fluxible-plugin-fetchr?branch=master) | ||
Provides isomorphic RESTful service access to your [Fluxible application](github.com/yahoo/fluxible-app) using [fetchr](github.com/yahoo/fetchr). | ||
[![npm version](https://badge.fury.io/js/fluxible-plugin-fetchr.svg)](http://badge.fury.io/js/fluxible-plugin-fetchr) [![Build Status](https://travis-ci.org/yahoo/fluxible-plugin-fetchr.svg?branch=master)](https://travis-ci.org/yahoo/fluxible-plugin-fetchr) [![Dependency Status](https://david-dm.org/yahoo/fluxible-plugin-fetchr.svg)](https://david-dm.org/yahoo/fluxible-plugin-fetchr) [![Coverage Status](https://coveralls.io/repos/yahoo/fluxible-plugin-fetchr/badge.png?branch=master)](https://coveralls.io/r/yahoo/fluxible-plugin-fetchr?branch=master) | ||
Provides isomorphic RESTful service access to your [Fluxible application](https://github.com/yahoo/fluxible-app) using [fetchr](https://github.com/yahoo/fetchr). | ||
## Usage | ||
@@ -51,3 +52,3 @@ | ||
Since the fetchr plugin is in control the fetchr class, we expose this through the `getServiceManager` method. | ||
Since the fetchr plugin is in control the fetchr class, we expose this through the `registerService` method. | ||
@@ -54,0 +55,0 @@ ```js |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
154
79
12217
3
11
1
+ Addedobject-assign@^1.0.0
+ Addedobject-assign@1.0.0(transitive)