Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

backbone-http

Package Overview
Dependencies
Maintainers
2
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

backbone-http - npm Package Compare versions

Comparing version 0.6.0 to 0.6.2

23

backbone-http.js
/*
backbone-http.js 0.6.0
backbone-http.js 0.6.2
Copyright (c) 2013-2014 Vidigami

@@ -66,3 +66,3 @@ License: MIT (http://www.opensource.org/licenses/mit-license.php)

/*
backbone-http.js 0.6.0
backbone-http.js 0.6.2
Copyright (c) 2013-2014 Vidigami

@@ -86,3 +86,3 @@ License: MIT (http://www.opensource.org/licenses/mit-license.php)

publish._.extend(BackboneHTTP, publish);
_.extend(BackboneHTTP, publish);

@@ -119,3 +119,3 @@ BackboneHTTP.modules = {

/*
backbone-http.js 0.6.0
backbone-http.js 0.6.2
Copyright (c) 2013-2014 Vidigami

@@ -137,5 +137,8 @@ License: MIT (http://www.opensource.org/licenses/mit-license.php)

CAPABILITIES = {
embed: true,
json: true,
self_reference: true
embed: 'maybe',
json: 'maybe',
unique: 'maybe',
manual_ids: false,
dynamic: false,
self_reference: 'maybe'
};

@@ -285,7 +288,5 @@

var configure;
module.exports = __webpack_require__(1).configure;
module.exports = configure = __webpack_require__(1).configure;
/***/ },

@@ -297,3 +298,3 @@ /* 5 */

/*
backbone-http.js 0.6.0
backbone-http.js 0.6.2
Copyright (c) 2013-2014 Vidigami

@@ -300,0 +301,0 @@ License: MIT (http://www.opensource.org/licenses/mit-license.php)

/*
backbone-http.js 0.6.0
backbone-http.js 0.6.2
Copyright (c) 2013-2014 Vidigami

@@ -8,2 +8,2 @@ License: MIT (http://www.opensource.org/licenses/mit-license.php)

*/
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("backbone-orm")):"function"==typeof define&&define.amd?define(["backbone-orm"],t):"object"==typeof exports?exports.BackboneHTTP=t(require("backbone-orm")):e.BackboneHTTP=t(e.BackboneORM)}(this,function(e){return function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){var n,o,u,i,s,c,l,p,a;p=u=r(1),l=p._,n=p.Backbone,e.exports=o=r(2),s={configure:r(4),sync:r(3),_:l,Backbone:n},s._.extend(o,s),o.modules={"backbone-orm":u},a=u.modules;for(i in a)c=a[i],o.modules[i]=c},function(t){t.exports=e},function(e){e.exports={}},function(e,t,r){var n,o,u,i,s,c,l,p,a,f,d,y;y=o=r(1),d=y._,n=y.Backbone,a=y.Utils,c=y.JSONUtils,l=y.Schema,p=o.modules.url,f=n.sync,i=r(5),u={embed:!0,json:!0,self_reference:!0},s=function(){function e(e,t){if(this.model_type=e,null==t&&(t={}),this.model_type.model_name=a.findOrGenerateModelName(this.model_type),!(this.url=d.result(new this.model_type,"url")))throw new Error("Missing url for model: "+this.model_type);this.schema=new l(this.model_type,{id:{type:"_raw"}}),this.beforeSend=t.beforeSend,this.event_emitter=d.extend({},n.Events)}return e.prototype.initialize=function(){return this.is_initialized?void 0:(this.is_initialized=!0,this.schema.initialize())},e.prototype.resetSchema=function(e,t){return this.http("delete",null,{},t)},e.prototype.cursor=function(e){return null==e&&(e={}),new i(e,{model_type:this.model_type,sync:this})},e.prototype.destroy=function(e,t){var r;return 1===arguments.length&&(r=[{},e],e=r[0],t=r[1]),this.http("delete",null,{query:e},t)},e.prototype.http=function(e,t,r,n){var o,u;return o=t?d.result(t,"url"):this.url,r.query&&d.size(r.query)&&(u=p.parse(o,!0),d.extend(u.query,c.toQuery(r.query)),o=p.format(u)),f(e,t||this.event_emitter,d.extend({url:o,beforeSend:this.beforeSend},r,{success:function(e){return n(null,c.parse(e))},error:function(t){return n(d.extend(new Error("Ajax failed with status "+t.status+" for "+e),{status:t.status}))}}))},e}(),e.exports=function(t,r){var n,u,i;return a.isCollection(new t)?(n=a.configureCollectionModelType(t,e.exports,r),t.prototype.sync=n.prototype.sync):(u=new s(t,r),t.prototype.sync=i=function(t,r,n){var o;if(null==n&&(n={}),u.initialize(),"createSync"===t)return e.exports.apply(null,Array.prototype.slice.call(arguments,1));if("sync"===t)return u;if("schema"===t)return u.schema;if("isRemote"===t)return!0;if(d.contains(["create","update","patch","delete","read"],t)){if(!(o=n.url||d.result(r,"url")))throw new Error("Missing url for model");return"read"===t&&(n=d.extend({$one:!r.models},n)),void u.http(t,r,d.omit(n,"error","success"),function(){return function(e,t){return e?n.error(e):n.success(t)}}(this))}return u[t]?u[t].apply(u,Array.prototype.slice.call(arguments,1)):void 0},a.configureModelType(t),o.model_cache.configureSync(t,i))},e.exports.capabilities=function(){return u}},function(e,t,r){var n;e.exports=n=r(1).configure},function(e,t,r){var n,o,u,i,s={}.hasOwnProperty,c=function(e,t){function r(){this.constructor=e}for(var n in t)s.call(t,n)&&(e[n]=t[n]);return r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype,e};i=r(1),u=i._,n=i.Cursor,e.exports=o=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return c(t,e),t.prototype.toJSON=function(e){var t;return this.hasCursorQuery("$zero")?e(null,this.hasCursorQuery("$one")?null:[]):this.sync.http("read",null,{query:t=u.extend({},this._find,this._cursor)},function(r){return function(n,o){return t.$one&&n&&404===n.status?e(null,null):e(null,r.hasCursorQuery("$count")||r.hasCursorQuery("$exists")?o.result:o)}}(this))},t}(n)}])});
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("backbone-orm")):"function"==typeof define&&define.amd?define(["backbone-orm"],t):"object"==typeof exports?exports.BackboneHTTP=t(require("backbone-orm")):e.BackboneHTTP=t(e.BackboneORM)}(this,function(e){return function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){var n,o,u,i,s,c,l,a,p;a=u=r(1),l=a._,n=a.Backbone,e.exports=o=r(2),s={configure:r(4),sync:r(3),_:l,Backbone:n},l.extend(o,s),o.modules={"backbone-orm":u},p=u.modules;for(i in p)c=p[i],o.modules[i]=c},function(t){t.exports=e},function(e){e.exports={}},function(e,t,r){var n,o,u,i,s,c,l,a,p,f,y,d;d=o=r(1),y=d._,n=d.Backbone,p=d.Utils,c=d.JSONUtils,l=d.Schema,a=o.modules.url,f=n.sync,i=r(5),u={embed:"maybe",json:"maybe",unique:"maybe",manual_ids:!1,dynamic:!1,self_reference:"maybe"},s=function(){function e(e,t){if(this.model_type=e,null==t&&(t={}),this.model_type.model_name=p.findOrGenerateModelName(this.model_type),!(this.url=y.result(new this.model_type,"url")))throw new Error("Missing url for model: "+this.model_type);this.schema=new l(this.model_type,{id:{type:"_raw"}}),this.beforeSend=t.beforeSend,this.event_emitter=y.extend({},n.Events)}return e.prototype.initialize=function(){return this.is_initialized?void 0:(this.is_initialized=!0,this.schema.initialize())},e.prototype.resetSchema=function(e,t){return this.http("delete",null,{},t)},e.prototype.cursor=function(e){return null==e&&(e={}),new i(e,{model_type:this.model_type,sync:this})},e.prototype.destroy=function(e,t){var r;return 1===arguments.length&&(r=[{},e],e=r[0],t=r[1]),this.http("delete",null,{query:e},t)},e.prototype.http=function(e,t,r,n){var o,u;return o=t?y.result(t,"url"):this.url,r.query&&y.size(r.query)&&(u=a.parse(o,!0),y.extend(u.query,c.toQuery(r.query)),o=a.format(u)),f(e,t||this.event_emitter,y.extend({url:o,beforeSend:this.beforeSend},r,{success:function(e){return n(null,c.parse(e))},error:function(t){return n(y.extend(new Error("Ajax failed with status "+t.status+" for "+e),{status:t.status}))}}))},e}(),e.exports=function(t,r){var n,u,i;return p.isCollection(new t)?(n=p.configureCollectionModelType(t,e.exports,r),t.prototype.sync=n.prototype.sync):(u=new s(t,r),t.prototype.sync=i=function(t,r,n){var o;if(null==n&&(n={}),u.initialize(),"createSync"===t)return e.exports.apply(null,Array.prototype.slice.call(arguments,1));if("sync"===t)return u;if("schema"===t)return u.schema;if("isRemote"===t)return!0;if(y.contains(["create","update","patch","delete","read"],t)){if(!(o=n.url||y.result(r,"url")))throw new Error("Missing url for model");return"read"===t&&(n=y.extend({$one:!r.models},n)),void u.http(t,r,y.omit(n,"error","success"),function(){return function(e,t){return e?n.error(e):n.success(t)}}(this))}return u[t]?u[t].apply(u,Array.prototype.slice.call(arguments,1)):void 0},p.configureModelType(t),o.model_cache.configureSync(t,i))},e.exports.capabilities=function(){return u}},function(e,t,r){e.exports=r(1).configure},function(e,t,r){var n,o,u,i,s={}.hasOwnProperty,c=function(e,t){function r(){this.constructor=e}for(var n in t)s.call(t,n)&&(e[n]=t[n]);return r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype,e};i=r(1),u=i._,n=i.Cursor,e.exports=o=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return c(t,e),t.prototype.toJSON=function(e){var t;return this.hasCursorQuery("$zero")?e(null,this.hasCursorQuery("$one")?null:[]):this.sync.http("read",null,{query:t=u.extend({},this._find,this._cursor)},function(r){return function(n,o){return t.$one&&n&&404===n.status?e(null,null):e(null,r.hasCursorQuery("$count")||r.hasCursorQuery("$exists")?o.result:o)}}(this))},t}(n)}])});
{
"name": "backbone-http",
"main": "backbone-http.js",
"version": "0.6.0",
"version": "0.6.2",
"homepage": "http://vidigami.github.io/backbone-orm/backbone-http.html",

@@ -6,0 +6,0 @@ "authors": [

{
"name": "backbone-http",
"version": "0.6.0",
"version": "0.6.2",
"description": "An HTTP interface for BackboneORM",

@@ -5,0 +5,0 @@ "repo": "vidigami/backbone-http",

{
"name": "backbone-http",
"version": "0.6.0",
"version": "0.6.2",
"description": "An HTTP interface for BackboneORM",

@@ -26,8 +26,3 @@ "main": "backbone-http.js",

"scripts": {
"test": "gulp test-quick",
"test-quick": "gulp test-node-quick",
"test-full": "gulp test",
"build": "gulp build",
"watch": "gulp watch",
"release": "gulp release"
"test": "gulp test --quick"
},

@@ -37,4 +32,4 @@ "devDependencies": {

"chai": "^1.9.1",
"codo": "2.x",
"coffee-loader": "^0.7.2",
"codo": "*",
"coffee-loader": "*",
"coffee-script": "*",

@@ -45,7 +40,7 @@ "cors": "*",

"gulp": "*",
"gulp-browserify": "^0.5.0",
"gulp-browserify": "*",
"gulp-compile-js": "*",
"gulp-concat": "*",
"gulp-header": "*",
"gulp-mocha": "^0.4.1",
"gulp-mocha": "*",
"gulp-mocha-phantomjs": "*",

@@ -59,17 +54,16 @@ "gulp-rename": "*",

"gulp-wrap-amd-infer": "*",
"gulp-zip": "*",
"jquery": "*",
"karma": "*",
"karma-chai": "^0.1.0",
"karma-chrome-launcher": "^0.1.4",
"karma-chai": "*",
"karma-chrome-launcher": "*",
"karma-cli": "*",
"karma-coffee-preprocessor": "*",
"karma-firefox-launcher": "^0.1.3",
"karma-mocha": "^0.1.4",
"karma-phantomjs-launcher": "^0.1.4",
"karma-safari-launcher": "^0.1.1",
"karma-spec-reporter": "0.0.13",
"karma-firefox-launcher": "*",
"karma-mocha": "*",
"karma-phantomjs-launcher": "*",
"karma-safari-launcher": "*",
"karma-spec-reporter": "*",
"lodash": "*",
"mocha": "*",
"node-jquery-xhr": "^1.8.3",
"node-jquery-xhr": "*",
"powerset": "*",

@@ -76,0 +70,0 @@ "queue-async": "*",

@@ -59,15 +59,15 @@ [![Build Status](https://secure.travis-ci.org/vidigami/backbone-http.png)](http://travis-ci.org/vidigami/backbone-http#master)

To build the library for Node.js:
To build the library for Node.js and browsers:
```
$ npm run build
$ gulp build
```
To build the library for the browser:
Please run tests before submitting a pull request:
```
$ npm run release
$ gulp test --quick
```
Please run tests before submitting a pull request.
and eventually all tests:

@@ -77,7 +77,1 @@ ```

```
Tests can be run with mocha directly with `mocha 'node_modules/backbone-orm/test/spec/**/*.coffee'`
Tests may be run in the browser with `karma start ./config/karma/manual-config.coffee`
Tests may be debugged in the browser with `karma start --no-single-run --browsers Chrome ./config/karma/manual-config.coffee`, and opening up the debug tab
Please refer to the following release notes when upgrading your version of BackboneHTTP.
### 0.6.2
* Added dynamic and manual_ids capabilities
### 0.6.1
* Added unique capability
### 0.6.0

@@ -4,0 +10,0 @@ * Moved to webpack for industrial packaging across Node.js and browser

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc