diff --git a/README.md b/README.md index 96cc38b..d569f87 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # o.js -_o.js beta v0.3.5_ +_o.js beta v0.3.6_ o.js is a client side Odata Javascript library to simplify the request of data. The main goal is to build a **standalone, lightweight and easy** to understand Odata lib. @@ -230,6 +230,8 @@ Currently the following queries are supported: `.expand(string)` - expands a related resource (Odata: Products/?_$expand=ProductUnit_) +`.select(string)` - selects only certain properties (Odata: Products/?_$select=Name) + `.ref(string, string)` - expands a related resource (Odata: Products/_$ref=Categories(1)_) `.deleteRef(string, string)` - expands a related resource (Odata: Products/_$ref=Categories(1)_) diff --git a/o.js b/o.js index 496c54c..167662b 100644 --- a/o.js +++ b/o.js @@ -326,12 +326,16 @@ } // +++ - // returns the first object which is found + // returns the counted data-sets // +++ base.count = function () { - removeQuery('$format'); - resource.appending = '$count'; - //addQuery('$count', 'count'); + if (base.oConfig.version >= 4) { + resource.path.push({ resource: '$count', get: null }); + } + else { + removeQuery('$format'); + addQuery('$count', 'count'); + } return (base); } @@ -339,7 +343,7 @@ // adds a inline count // +++ base.inlineCount = function (countOption) { - if (base.oConfig.version == 4) { + if (base.oConfig.version >= 4) { countOption = countOption || 'true'; if (!isQueryThrowEx('$count')) { addQuery('$count', countOption); @@ -401,7 +405,7 @@ else { resource.method = 'POST'; resource.path.push({ resource: navPath, get: null }); - resource.appending = '$ref'; + resource.path.push({ resource: '$ref', get: null }); } var newResource = parseUri(navPath); newResource.path[newResource.path.length - 1].get = id; @@ -426,7 +430,7 @@ else { resource.method = 'POST'; resource.path.push({ resource: navPath, get: null }); - resource.appending = '$ref'; + resource.path.push({ resource: '$ref', get: null }); } if (id) { var newResource = parseUri(navPath); @@ -704,7 +708,6 @@ //get the full query var queryStr = ''; - //var isEndpoint=false; //add the configured endpoint if (isEndpoint) { @@ -722,7 +725,7 @@ queryStr += '/'; } - if(typeof res.appending === 'undefined' || res.appending === null) { + if (typeof res.appending === 'undefined' || res.appending === null) { queryStr = queryStr.slice(0, -1); } @@ -887,7 +890,7 @@ //create a CORS ajax Request if (resourceList.length === 0 && !isSave) { - startAjaxReq(createCORSRequest('GET', buildQuery()), null, callback, errorCallback, false, + startAjaxReq(createCORSRequest('GET', buildQuery()), null, callback, errorCallback, false, [ { name: 'Accept', value: 'application/json,text/plain' }, { name: 'Content-Type', value: 'application/json' } @@ -1036,7 +1039,6 @@ } } - return (reqObj); } @@ -1183,7 +1185,6 @@ return (JSON.stringify(data)); else { //Throw exception - //TODO: Is there any other solution for non JSON? caniuse say there is a 96.58% coverage for JSON parsing... throwEx('No JSON support.'); return (data); } diff --git a/o.min.js b/o.min.js index beb4df1..2ca078a 100644 --- a/o.min.js +++ b/o.min.js @@ -1 +1 @@ -!function(e,n){"function"==typeof define&&define.amd?define(["q"],n):"object"==typeof exports?module.exports=n(require("q")):e.o=n(e.Q)}(this,function(e){function n(e){function n(){for(var e,n={},t=0,r=arguments.length;r>t;t++)for(e in arguments[t])arguments[t].hasOwnProperty(e)&&(n[e]=arguments[t][e]);return n}var r=this;return r.oConfig=r.oConfig||{endpoint:null,format:"json",autoFormat:!0,version:4,strictMode:!0,start:null,ready:null,error:null,headers:[],username:null,password:null,isAsync:!0,isCors:!0,openAjaxRequests:0,isHashRoute:!0,appending:""},r.config=function(e){r.oConfig=n(r.oConfig,e)},r.isEndpoint=function(){return null!==r.oConfig.endpoint},"undefined"==typeof e?r:new t(e,r.oConfig)}function t(n,t){function r(){if("undefined"!=typeof e){var n=e;return n}if("undefined"==typeof window){var n=require("q");return n}return null}function o(e,n,t,r){if(A(n)){var o="",a=[];for(i=0;i0?"?"+e.substring(1):""}function f(e){for(var n=0;n-1||e.toUpperCase().indexOf("HTTPS://")>-1?I=!1:B.oConfig.endpoint||k("You can not use resource query without defining your oData endpoint. Use o().config({endpoint:yourEndpoint}) to define your oData endpoint."),routeName=e,h(e),B)}function v(e){w("$expand")?(U.queryList[U.query.$expand].value+=","+e,U.queryList[U.query.$expand].original=U.queryList[U.query.$expand].value):C("$expand",e,e)}function m(e){var n=e.split("?"),t=e,r="",o={path:[],appending:"",query:{},queryList:[],method:"GET",data:null,progress:null};if(2===n.length){t=n[0],r=n[1];for(var a=r.split("&"),i=0;i0?e:void k(n+": Parameter must be set.")}function O(e,n){if("number"==typeof e)return e;var t=n;return e&&e.length>0&&(isNaN(e)||(t=parseInt(e))),t}function P(e){for(var n=0,t=0;t-1&&n++;return n}function E(e){for(var n=[],t=0;t-1&&n.push(t);for(var t=n.length-1;t>=0;t--)G.splice(n[t],1);G[0]&&(U=G[0])}function b(e){return JSON?JSON.stringify(e):(k("No JSON support."),e)}function A(e){return"undefined"==typeof Array.isArray?"[object Array]"===e.toString():Array.isArray(e)}function R(e,n){return e?-1!==e.indexOf(n,e.length-n.length):!1}function N(e,n){return 0===e.indexOf(n)}function k(e){function n(e){this.message=e,this.name="o.js exception"}if(n.prototype=new Error,B.oConfig.strictMode===!0)throw new n(e);console.log("o.js exception: "+e)}function L(e,n){var t="",r=$(),o=!1;n&&(t+="--batch_"+e+"\n",t+="Content-Type: multipart/mixed; boundary=changeset_"+r+"\n\n");var a=null;null!==B.oConfig.endpoint&&(a=B.oConfig.endpoint.indexOf("://")>-1?B.oConfig.endpoint.split("/")[2]:B.oConfig.endpoint.split("/")[0],a=a.split(":")[0]);for(var i=0;i=200&&e.status<300){if(204!==e.status)if(o){var n,a=[],s=/({[\s\S]*?--batchresponse_)/g;do n=s.exec(e.responseText),n&&(D(n[0].substring(0,n[0].length-16),f),a.push(f.data));while(n);f.data=a}else D(e.responseText,f);X&&X.resolve(f),"function"==typeof t&&t.call(f,f.data,i)}else try{var p=e.responseText;if(JSON&&""!=e.responseText&&(p=JSON.parse(e.responseText)),""!==p&&p["odata.error"]){var l=p["odata.error"].message.value+" | HTTP Status: "+e.status+" | oData Code: "+p["odata.error"].code;k(l)}else k("Request to "+u()+" failed with HTTP status "+(e.status||404)+".")}catch(d){if(H(f,!0,e.status||404,e.responseText),"function"==typeof r)r(e.status||404,d);else{if(!X)throw d;d.status=e.status||404,X.reject(d)}}H(f,!1)}},B.oConfig.username&&B.oConfig.password&&(z&&k("CORS and Basic Auth is not supported for IE <= 9. Try to set isCors:false in the OData config if you do not need CORS support."),e.setRequestHeader("Authorization","Basic "+Y(B.oConfig.username+":"+B.oConfig.password))),!z){if(a)for(var p=0;p0)for(var p=0;p>2,i=(3&t)<<4|r>>4,u=(15&r)<<2|o>>6,s=63&o,isNaN(r)?u=s=64:isNaN(o)&&(s=64),f=f+this._keyStr.charAt(a)+this._keyStr.charAt(i)+this._keyStr.charAt(u)+this._keyStr.charAt(s);return f},_utf8_encode:function(e){e=e.replace(/\r\n/g,"\n");for(var n="",t=0;tr?n+=String.fromCharCode(r):r>127&&2048>r?(n+=String.fromCharCode(r>>6|192),n+=String.fromCharCode(63&r|128)):(n+=String.fromCharCode(r>>12|224),n+=String.fromCharCode(r>>6&63|128),n+=String.fromCharCode(63&r|128))}return n}};return n.encode(e)}var B=this,U=null,G=[],M=[],I=!0,X=null,F=null,z=!1,Q=function(){},W={},K={"==":"eq","===":"eq","!=":"ne","!==":"ne",">":"gt",">=":"ge","<":"lt","<=":"le","&&":"and","||":"or","!":"not","*":"mul","%":"mod"};return B.data=[],B.inlinecount=null,B.param={},B.oConfig=t,B.routes=B.route=function(e,n){A(e)||(e=[e]),"undefined"==typeof window&&k("Routes are only supported in a browser env.");for(var t=window.location.hash,r=0;rt;t++)for(e in arguments[t])arguments[t].hasOwnProperty(e)&&(n[e]=arguments[t][e]);return n}var r=this;return r.oConfig=r.oConfig||{endpoint:null,format:"json",autoFormat:!0,version:4,strictMode:!0,start:null,ready:null,error:null,headers:[],username:null,password:null,isAsync:!0,isCors:!0,openAjaxRequests:0,isHashRoute:!0,appending:""},r.config=function(e){r.oConfig=n(r.oConfig,e)},r.isEndpoint=function(){return null!==r.oConfig.endpoint},"undefined"==typeof e?r:new t(e,r.oConfig)}function t(n,t){function r(){if("undefined"!=typeof e){var n=e;return n}if("undefined"==typeof window){var n=require("q");return n}return null}function o(e,n,t,r){if(A(n)){var o="",a=[];for(i=0;i0?"?"+e.substring(1):""}function f(e){for(var n=0;n-1||e.toUpperCase().indexOf("HTTPS://")>-1?I=!1:B.oConfig.endpoint||k("You can not use resource query without defining your oData endpoint. Use o().config({endpoint:yourEndpoint}) to define your oData endpoint."),routeName=e,h(e),B)}function v(e){w("$expand")?(U.queryList[U.query.$expand].value+=","+e,U.queryList[U.query.$expand].original=U.queryList[U.query.$expand].value):C("$expand",e,e)}function m(e){var n=e.split("?"),t=e,r="",o={path:[],appending:"",query:{},queryList:[],method:"GET",data:null,progress:null};if(2===n.length){t=n[0],r=n[1];for(var a=r.split("&"),i=0;i0?e:void k(n+": Parameter must be set.")}function O(e,n){if("number"==typeof e)return e;var t=n;return e&&e.length>0&&(isNaN(e)||(t=parseInt(e))),t}function P(e){for(var n=0,t=0;t-1&&n++;return n}function E(e){for(var n=[],t=0;t-1&&n.push(t);for(var t=n.length-1;t>=0;t--)G.splice(n[t],1);G[0]&&(U=G[0])}function b(e){return JSON?JSON.stringify(e):(k("No JSON support."),e)}function A(e){return"undefined"==typeof Array.isArray?"[object Array]"===e.toString():Array.isArray(e)}function R(e,n){return e?-1!==e.indexOf(n,e.length-n.length):!1}function N(e,n){return 0===e.indexOf(n)}function k(e){function n(e){this.message=e,this.name="o.js exception"}if(n.prototype=new Error,B.oConfig.strictMode===!0)throw new n(e);console.log("o.js exception: "+e)}function L(e,n){var t="",r=$(),o=!1;n&&(t+="--batch_"+e+"\n",t+="Content-Type: multipart/mixed; boundary=changeset_"+r+"\n\n");var a=null;null!==B.oConfig.endpoint&&(a=B.oConfig.endpoint.indexOf("://")>-1?B.oConfig.endpoint.split("/")[2]:B.oConfig.endpoint.split("/")[0],a=a.split(":")[0]);for(var i=0;i=200&&e.status<300){if(204!==e.status)if(o){var n,a=[],s=/({[\s\S]*?--batchresponse_)/g;do n=s.exec(e.responseText),n&&(D(n[0].substring(0,n[0].length-16),f),a.push(f.data));while(n);f.data=a}else D(e.responseText,f);X&&X.resolve(f),"function"==typeof t&&t.call(f,f.data,i)}else try{var p=e.responseText;if(JSON&&""!=e.responseText&&(p=JSON.parse(e.responseText)),""!==p&&p["odata.error"]){var l=p["odata.error"].message.value+" | HTTP Status: "+e.status+" | oData Code: "+p["odata.error"].code;k(l)}else k("Request to "+u()+" failed with HTTP status "+(e.status||404)+".")}catch(d){if(H(f,!0,e.status||404,e.responseText),"function"==typeof r)r(e.status||404,d);else{if(!X)throw d;d.status=e.status||404,X.reject(d)}}H(f,!1)}},B.oConfig.username&&B.oConfig.password&&(z&&k("CORS and Basic Auth is not supported for IE <= 9. Try to set isCors:false in the OData config if you do not need CORS support."),e.setRequestHeader("Authorization","Basic "+Y(B.oConfig.username+":"+B.oConfig.password))),!z){if(a)for(var p=0;p0)for(var p=0;p>2,i=(3&t)<<4|r>>4,u=(15&r)<<2|o>>6,s=63&o,isNaN(r)?u=s=64:isNaN(o)&&(s=64),f=f+this._keyStr.charAt(a)+this._keyStr.charAt(i)+this._keyStr.charAt(u)+this._keyStr.charAt(s);return f},_utf8_encode:function(e){e=e.replace(/\r\n/g,"\n");for(var n="",t=0;tr?n+=String.fromCharCode(r):r>127&&2048>r?(n+=String.fromCharCode(r>>6|192),n+=String.fromCharCode(63&r|128)):(n+=String.fromCharCode(r>>12|224),n+=String.fromCharCode(r>>6&63|128),n+=String.fromCharCode(63&r|128))}return n}};return n.encode(e)}var B=this,U=null,G=[],M=[],I=!0,X=null,F=null,z=!1,Q=function(){},W={},K={"==":"eq","===":"eq","!=":"ne","!==":"ne",">":"gt",">=":"ge","<":"lt","<=":"le","&&":"and","||":"or","!":"not","*":"mul","%":"mod"};return B.data=[],B.inlinecount=null,B.param={},B.oConfig=t,B.routes=B.route=function(e,n){A(e)||(e=[e]),"undefined"==typeof window&&k("Routes are only supported in a browser env.");for(var t=window.location.hash,r=0;r=4?U.path.push({resource:"$count",get:null}):(q("$format"),C("$count","count")),B},B.inlineCount=function(e){return B.oConfig.version>=4?(e=e||"true",T("$count")||C("$count",e)):(e=e||"allpages",T("$inlinecount")||C("$inlinecount",e)),B},B.batch=function(e){return h(e),B},B.expand=function(e){return v(e),B},B.loading=function(e,n){return n=n||e,F=e?[e,n]:[function(){},function(){}],B},B.ref=B.link=function(e,n){q("$format"),(null==U||U.get)&&k("You need to define a resource with the find() method to append an navigation property"),B.oConfig.version<4?(U.method="POST",U.path.push("$link"),U.path.push({resource:e,get:null})):(U.method="POST",U.path.push({resource:e,get:null}),U.path.push({resource:"$ref",get:null}));var t=m(e);t.path[t.path.length-1].get=n;var r=u(t);return U.data={"@odata.id":r.substring(0,r.length-1)},B},B.removeRef=B.deleteRef=function(e,n){if(q("$format"),(null==U||U.get)&&k("You need to define a resource with the find() method to append an navigation property"),B.oConfig.version<4?(U.method="POST",U.path.push("$link"),U.path.push({resource:e,get:null})):(U.method="POST",U.path.push({resource:e,get:null}),U.path.push({resource:"$ref",get:null})),n){var t=m(e);t.path[t.path.length-1].get=n;var r=u(t);C("$id",r.substring(0,r.length-1))}return U.method="DELETE",B},B.get=function(e,n){var t=r();return t&&"undefined"==typeof e&&(X=t.defer()),c(e,n,!1),t&&"undefined"==typeof e?X.promise:B},B.save=function(e,n){if("GET"===U.method&&null!==U.data){var t=l(U);t.method="PATCH",t.data=U.data,h(t)}var o=r();return o&&"undefined"==typeof e?(X=o.defer(),c(e,n,!0),X.promise):(c(e,n,!0),B)},B.post=function(e,n){return q("$format"),n&&h(n),U.method="POST",U.data=e,B},B.patch=function(e,n){return n&&h(n),U.path[U.path.length-1]&&U.path[U.path.length-1].get||k("Bulk updates are not supported. You need to query a unique resource with find() to patch/put it."),U.method="PATCH",U.data=e,B},B.put=function(e,n){return n&&h(n),U.path[U.path.length-1]&&U.path[U.path.length-1].get||k("Bulk updates are not supported. You need to query a unique resource with find() to patch/put it."),U.method="PUT",U.data=e,B},B.remove=B["delete"]=function(e){return e&&h(e),U.path[U.path.length-1]&&U.path[U.path.length-1].get||k("Bulk deletes are not supported. You need to query a unique resource with find() to delete it."),U.method="DELETE",B},B.query=function(e){return u(e)},B.search=function(e,n,t,r){var o=a(e,n,t);return 4==B.oConfig.version&&r?T("$search")||C("$search",o,o):T("$filter")||C("$filter",o,o,"$search"),B},B.filterByList=B.exclude=function(e,n){if(!T("$filter")){var t=o(e,n,K["!="],K["&&"]);C("$filter",S(t),t)}return B},B.include=function(e,n){if(!T("$filter")){var t=o(e,n,K["=="],K["||"]);C("$filter",S(t),t)}return B},B.progress=function(e){return null!=U&&(U.progress=e),B},y(n)}return n}); \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index b14e4ce..84a1d44 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,7 +1,8 @@ { - "name": "odata", - "version": "0.3.2", + "name": "o.js", + "version": "0.3.5", "lockfileVersion": 1, + "requires": true, "dependencies": { "abbrev": { "version": "1.1.0", @@ -16,7 +17,11 @@ "brace-expansion": { "version": "1.1.7", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.7.tgz", - "integrity": "sha1-Pv/DxQ4ABTH7cg6v+A8K6O8jz1k=" + "integrity": "sha1-Pv/DxQ4ABTH7cg6v+A8K6O8jz1k=", + "requires": { + "balanced-match": "0.4.2", + "concat-map": "0.0.1" + } }, "buffer-shims": { "version": "1.0.0", @@ -46,12 +51,24 @@ "glob": { "version": "7.1.2", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", - "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==" + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "requires": { + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } }, "inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=" + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "requires": { + "once": "1.4.0", + "wrappy": "1.0.2" + } }, "inherits": { "version": "2.0.3", @@ -68,6 +85,11 @@ "resolved": "https://registry.npmjs.org/jasmine/-/jasmine-2.4.1.tgz", "integrity": "sha1-kBbdpFMhPSesbUPcTqlzFaGJCF4=", "dev": true, + "requires": { + "exit": "0.1.2", + "glob": "3.2.11", + "jasmine-core": "2.4.1" + }, "dependencies": { "exit": { "version": "0.1.2", @@ -80,6 +102,10 @@ "resolved": "https://registry.npmjs.org/glob/-/glob-3.2.11.tgz", "integrity": "sha1-Spc/Y1uRkPcV0QmH1cAP0oFevj0=", "dev": true, + "requires": { + "inherits": "2.0.1", + "minimatch": "0.3.0" + }, "dependencies": { "inherits": { "version": "2.0.1", @@ -92,6 +118,10 @@ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.3.0.tgz", "integrity": "sha1-J12O2qxPG7MyZHIInnlJyDlGmd0=", "dev": true, + "requires": { + "lru-cache": "2.7.3", + "sigmund": "1.0.1" + }, "dependencies": { "lru-cache": { "version": "2.7.3", @@ -120,22 +150,37 @@ "jslint": { "version": "0.10.3", "resolved": "https://registry.npmjs.org/jslint/-/jslint-0.10.3.tgz", - "integrity": "sha1-iQ2j55ky7fBsX0tSp7W6ZDaGdDY=" + "integrity": "sha1-iQ2j55ky7fBsX0tSp7W6ZDaGdDY=", + "requires": { + "exit": "0.1.2", + "glob": "7.1.2", + "nopt": "3.0.6", + "readable-stream": "2.1.5" + } }, "minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==" + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "requires": { + "brace-expansion": "1.1.7" + } }, "nopt": { "version": "3.0.6", "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", - "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=" + "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=", + "requires": { + "abbrev": "1.1.0" + } }, "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=" + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "requires": { + "wrappy": "1.0.2" + } }, "path-is-absolute": { "version": "1.0.1", @@ -155,7 +200,16 @@ "readable-stream": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.1.5.tgz", - "integrity": "sha1-ZvqLcg4UOLNkaB8q0aY8YYRIydA=" + "integrity": "sha1-ZvqLcg4UOLNkaB8q0aY8YYRIydA=", + "requires": { + "buffer-shims": "1.0.0", + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "1.0.7", + "string_decoder": "0.10.31", + "util-deprecate": "1.0.2" + } }, "string_decoder": { "version": "0.10.31", @@ -167,6 +221,12 @@ "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.6.1.tgz", "integrity": "sha1-7bvhiIujUl3tOnv4NrMLNAXTFhs=", "dev": true, + "requires": { + "async": "0.2.10", + "source-map": "0.5.3", + "uglify-to-browserify": "1.0.2", + "yargs": "3.10.0" + }, "dependencies": { "async": { "version": "0.2.10", @@ -191,6 +251,12 @@ "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", "dev": true, + "requires": { + "camelcase": "1.2.1", + "cliui": "2.1.0", + "decamelize": "1.1.2", + "window-size": "0.1.0" + }, "dependencies": { "camelcase": { "version": "1.2.1", @@ -203,24 +269,41 @@ "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=", "dev": true, + "requires": { + "center-align": "0.1.3", + "right-align": "0.1.3", + "wordwrap": "0.0.2" + }, "dependencies": { "center-align": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=", "dev": true, + "requires": { + "align-text": "0.1.3", + "lazy-cache": "1.0.3" + }, "dependencies": { "align-text": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.3.tgz", "integrity": "sha1-cts5g4cu7CMTkZyUJqmTpBr+k/c=", "dev": true, + "requires": { + "kind-of": "2.0.1", + "longest": "1.0.1", + "repeat-string": "1.5.2" + }, "dependencies": { "kind-of": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-2.0.1.tgz", "integrity": "sha1-AY7HpM5+OobLkUG+UZ0kyPqpgbU=", "dev": true, + "requires": { + "is-buffer": "1.1.2" + }, "dependencies": { "is-buffer": { "version": "1.1.2", @@ -257,18 +340,29 @@ "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=", "dev": true, + "requires": { + "align-text": "0.1.3" + }, "dependencies": { "align-text": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.3.tgz", "integrity": "sha1-cts5g4cu7CMTkZyUJqmTpBr+k/c=", "dev": true, + "requires": { + "kind-of": "2.0.1", + "longest": "1.0.1", + "repeat-string": "1.5.2" + }, "dependencies": { "kind-of": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-2.0.1.tgz", "integrity": "sha1-AY7HpM5+OobLkUG+UZ0kyPqpgbU=", "dev": true, + "requires": { + "is-buffer": "1.1.2" + }, "dependencies": { "is-buffer": { "version": "1.1.2", @@ -307,6 +401,9 @@ "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.1.2.tgz", "integrity": "sha1-3Mk3J74gljLpiwJxjvTLeWAjIvI=", "dev": true, + "requires": { + "escape-string-regexp": "1.0.4" + }, "dependencies": { "escape-string-regexp": { "version": "1.0.4", diff --git a/package.json b/package.json index dba10dd..f05dbee 100644 --- a/package.json +++ b/package.json @@ -1,14 +1,14 @@ { "name": "o.js", "description": "o.js is a client side Odata Javascript library to simplify the request of data. The main goal is to build a standalone, lightweight and easy to understand Odata lib.", - "version": "0.3.5", + "version": "0.3.6", "main": "o.js", "dependencies": { - "jslint": "^0.10.3", "q": "^1.5.0", "xhr2": "^0.1.4 " }, "devDependencies": { + "jslint": "^0.10.3", "jasmine": "*", "uglify-js": "*" },