Comparing version 1.0.2 to 1.0.3
{ | ||
"name": "rest", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"main": "./rest.js", | ||
"moduleType": ["amd", "node"], | ||
"dependencies": { | ||
@@ -6,0 +7,0 @@ "when": "~2" |
@@ -36,3 +36,3 @@ # wire.js | ||
baseClient: { module: 'rest' }, | ||
plugins: [{ module: 'rest/wire' }] | ||
$plugins: [{ module: 'rest/wire' }] | ||
``` | ||
@@ -51,3 +51,3 @@ | ||
}, | ||
plugins: [{ module: 'rest/wire' }] | ||
$plugins: [{ module: 'rest/wire' }] | ||
``` | ||
@@ -66,3 +66,3 @@ | ||
}, | ||
plugins: [{ module: 'rest/wire' }] | ||
$plugins: [{ module: 'rest/wire' }] | ||
``` | ||
@@ -83,3 +83,3 @@ | ||
hateoas: { module: 'rest/interceptor/hateoas' }, | ||
plugins: [{ module: 'rest/wire' }] | ||
$plugins: [{ module: 'rest/wire' }] | ||
``` | ||
@@ -86,0 +86,0 @@ |
{ | ||
"name": "rest", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "RESTful HTTP client library", | ||
@@ -5,0 +5,0 @@ "keywords": ["rest", "http", "client", "rest-template", "spring", "cujojs"], |
@@ -105,7 +105,7 @@ rest.js | ||
}, | ||
plugins: [{ module: 'rest/wire' }] | ||
$plugins: [{ module: 'rest/wire' }] | ||
} | ||
``` | ||
There are a couple things to notice. First is the 'plugins' section, by declaring the `rest/wire` module, the `rest` factory becomes available within the specification. The second thing to notice is that we no longer need to individually `require()` interceptor modules; wire.js is smart enough to automatically fetch the modules. The interceptors are then chained together in the order they are defined and provided with the corresponding config object, if it's defined. The resulting client can then be injected into any other object using standard wire.js facilities. | ||
There are a couple things to notice. First is the '$plugins' section, by declaring the `rest/wire` module, the `rest` factory becomes available within the specification. The second thing to notice is that we no longer need to individually `require()` interceptor modules; wire.js is smart enough to automatically fetch the modules. The interceptors are then chained together in the order they are defined and provided with the corresponding config object, if it's defined. The resulting client can then be injected into any other object using standard wire.js facilities. | ||
@@ -233,2 +233,6 @@ | ||
1.0.3 | ||
- add moduleType for bower (node and amd). Thanks @briancavalier | ||
- doc polish. Thanks @gogamoga | ||
1.0.2 | ||
@@ -240,3 +244,3 @@ - restore client.chain() to the default client | ||
- allow overriding the default client | ||
- allow AMD loaders to load node client. Useful when using an AMD loader with Node | ||
- allow AMD loaders to load node client. Useful when using an AMD loader with Node. Thanks @unscriptable | ||
@@ -243,0 +247,0 @@ 1.0.0 |
@@ -42,3 +42,3 @@ /* | ||
store: { $ref: 'resource!', client: client }, | ||
plugins: [{ module: 'rest/dojo/wire' }] | ||
$plugins: [{ module: 'rest/dojo/wire' }] | ||
}; | ||
@@ -53,3 +53,3 @@ return wire(spec).then(function (spec) { | ||
resource: { $ref: 'resource!test/dojo', get: 'hello.json', entity: false, client: client }, | ||
plugins: [{ module: 'rest/dojo/wire' }] | ||
$plugins: [{ module: 'rest/dojo/wire' }] | ||
}; | ||
@@ -65,3 +65,3 @@ return wire(spec).then(function (spec) { | ||
client: { $ref: 'client!', client: client }, | ||
plugins: [{ module: 'rest/dojo/wire' }] | ||
$plugins: [{ module: 'rest/dojo/wire' }] | ||
}; | ||
@@ -68,0 +68,0 @@ return wire(spec).then(function (spec) { |
@@ -34,3 +34,3 @@ /* | ||
client: { $ref: 'client!', client: client }, | ||
plugins: [{ module: 'rest/wire' }] | ||
$plugins: [{ module: 'rest/wire' }] | ||
}; | ||
@@ -50,3 +50,3 @@ return wire(spec, { require: require }).then(function (spec) { | ||
client: { $ref: 'client!path', client: client, accept: 'text/plain', entity: false }, | ||
plugins: [{ module: 'rest/wire' }] | ||
$plugins: [{ module: 'rest/wire' }] | ||
}; | ||
@@ -68,3 +68,3 @@ return wire(spec, { require: require }).then(function (spec) { | ||
client: { $ref: 'client!', client: client }, | ||
plugins: [{ module: 'rest/wire' }] | ||
$plugins: [{ module: 'rest/wire' }] | ||
}; | ||
@@ -90,3 +90,3 @@ return wire(spec, { require: require }).then( | ||
client: { $ref: 'client!', client: client, errorCode: false }, | ||
plugins: [{ module: 'rest/wire' }] | ||
$plugins: [{ module: 'rest/wire' }] | ||
}; | ||
@@ -106,3 +106,3 @@ return wire(spec, { require: require }).then(function (spec) { | ||
client: { $ref: 'client!', client: client, mime: false }, | ||
plugins: [{ module: 'rest/wire' }] | ||
$plugins: [{ module: 'rest/wire' }] | ||
}; | ||
@@ -122,3 +122,3 @@ return wire(spec, { require: require }).then(function (spec) { | ||
client: { $ref: 'client!', client: client, entity: false }, | ||
plugins: [{ module: 'rest/wire' }] | ||
$plugins: [{ module: 'rest/wire' }] | ||
}; | ||
@@ -150,3 +150,3 @@ return wire(spec, { require: require }).then(function (spec) { | ||
}, | ||
plugins: [{ module: 'rest/wire' }] | ||
$plugins: [{ module: 'rest/wire' }] | ||
}; | ||
@@ -183,3 +183,3 @@ return wire(spec, { require: require }).then(function (spec) { | ||
errorCode: { module: 'rest/interceptor/errorCode' }, | ||
plugins: [{ module: 'rest/wire' }] | ||
$plugins: [{ module: 'rest/wire' }] | ||
}; | ||
@@ -211,3 +211,3 @@ return wire(spec, { require: require }).then(function (spec) { | ||
}, | ||
plugins: [{ module: 'rest/wire' }] | ||
$plugins: [{ module: 'rest/wire' }] | ||
}; | ||
@@ -232,3 +232,3 @@ return wire(spec, { require: require }).then(function (spec) { | ||
}, | ||
plugins: [{ module: 'rest/wire' }] | ||
$plugins: [{ module: 'rest/wire' }] | ||
}; | ||
@@ -250,3 +250,3 @@ return wire(spec, { require: require }).then(function (spec) { | ||
}, | ||
plugins: [{ module: 'rest/wire' }] | ||
$plugins: [{ module: 'rest/wire' }] | ||
}; | ||
@@ -272,3 +272,3 @@ return wire(spec, { require: require }).then(function (spec) { | ||
parentClient: client, | ||
plugins: [{ module: 'rest/wire' }] | ||
$plugins: [{ module: 'rest/wire' }] | ||
}; | ||
@@ -296,3 +296,3 @@ return wire(spec, { require: require }).then(function (spec) { | ||
}, | ||
plugins: [{ module: 'rest/wire' }] | ||
$plugins: [{ module: 'rest/wire' }] | ||
}; | ||
@@ -299,0 +299,0 @@ return wire(spec, { require: require }).then(function (spec) { |
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
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
376083
8063
321