Comparing version 1.4.2 to 1.4.3
import Ember from 'ember'; | ||
import DS from 'ember-data'; | ||
import Firebase from 'firebase'; | ||
import FirebaseAdapter from '../adapters/firebase'; | ||
import FirebaseSerializer from '../serializers/firebase'; | ||
var VERSION = '1.4.2'; | ||
var VERSION = '1.4.3'; | ||
if (Ember.libraries) { | ||
if (Firebase.SDK_VERSION) { | ||
Ember.libraries.registerCoreLibrary('Firebase', Firebase.SDK_VERSION); | ||
} | ||
Ember.libraries.registerCoreLibrary('EmberFire', VERSION); | ||
@@ -14,2 +19,3 @@ } | ||
name: 'emberfire', | ||
before: 'store', | ||
initialize: function (container, app) { | ||
@@ -16,0 +22,0 @@ app.register('adapter:-firebase', FirebaseAdapter); |
@@ -25,3 +25,3 @@ 'use strict'; | ||
return this.addBowerPackagesToProject([ {name: 'firebase', target: "~2.1.0"} ]) | ||
return this.addBowerPackagesToProject([ {name: 'firebase', target: "^2.1.0"} ]) | ||
.then(function() { | ||
@@ -28,0 +28,0 @@ return self.addToConfig('firebase', '\'' + firebaseUrl + '\''); |
@@ -1,1 +0,3 @@ | ||
fixed - Fixed an issue where `orderBy: 'property'` queries were not working. | ||
fixed - Fixed an issue where `model.destroyRecord` was throwing an error `undefined is not a function`. | ||
changed - Installs Firebase dependency with version compatibility of `^2.1.0`. | ||
changed - Show the `Firebase` version in Ember Inspector's info panel. |
@@ -7,3 +7,4 @@ { | ||
".read": true, | ||
".write": "!data.exists()" | ||
".write": "!data.exists()", | ||
".validate": "newData.hasChildren(['user', 'body', 'published'])", | ||
} | ||
@@ -17,3 +18,3 @@ }, | ||
".write": true, | ||
".validate": "newData.hasChildren(['body', 'published', 'title'])", | ||
".validate": "newData.hasChildren(['user', 'body', 'published', 'title'])", | ||
"body": { | ||
@@ -51,2 +52,2 @@ ".validate": "newData.isString()" | ||
} | ||
} | ||
} |
@@ -734,5 +734,11 @@ (function() { | ||
var $$$$$$addon$initializers$emberfire$$VERSION = '1.4.2'; | ||
var firebase$$default = window.Firebase; | ||
var $$$$$$addon$initializers$emberfire$$VERSION = '1.4.3'; | ||
if (ember$$default.libraries) { | ||
if (firebase$$default.SDK_VERSION) { | ||
ember$$default.libraries.registerCoreLibrary('Firebase', firebase$$default.SDK_VERSION); | ||
} | ||
ember$$default.libraries.registerCoreLibrary('EmberFire', $$$$$$addon$initializers$emberfire$$VERSION); | ||
@@ -743,2 +749,3 @@ } | ||
name: 'emberfire', | ||
before: 'store', | ||
initialize: function (container, app) { | ||
@@ -795,3 +802,3 @@ app.register('adapter:-firebase', $$$$$$addon$adapters$firebase$$default); | ||
* | ||
* EmberFire 1.4.2 | ||
* EmberFire 1.4.3 | ||
* https://github.com/firebase/emberfire/ | ||
@@ -798,0 +805,0 @@ * License: MIT |
@@ -1,2 +0,2 @@ | ||
(function(){"use strict";var e=window.Ember,r=window.DS,t=function(r,t,i,n){var o=i||[];return new e.RSVP.Promise(function(e,i){var a=function(r){r?(n&&"object"==typeof r&&(r.location=n),i(r)):e()};o.push(a),r.apply(t,o)})},i=e.String.fmt,n=e.RSVP.Promise,o=e.EnumerableUtils.forEach,a=e.EnumerableUtils.filter,s=e.EnumerableUtils.map,d=e.EnumerableUtils.indexOf,u=function(r){var t=e.A();return r.forEach(function(e){d(t,e)<0&&t.push(e)}),t},l=r.Adapter.extend(e.Evented,{defaultSerializer:"-firebase",init:function(){var e=this.get("firebase");if(!e||"object"!=typeof e)throw new Error("Please set the `firebase` property on the adapter.");this._ref=e.ref(),this._findAllMapForType={},this._recordCacheForType={},this._queue=[]},generateIdForRecord:function(){return this._getKey(this._ref.push())},_assignIdToPayload:function(e){var r=e.val();return null!==r&&"object"==typeof r&&"undefined"==typeof r.id&&(r.id=this._getKey(e)),r},find:function(e,r,t){var o=this,a=this._getRef(r,t);return new n(function(e,n){a.once("value",function(s){var d=o._assignIdToPayload(s);if(o._updateRecordCacheForType(r,d),null===d){var u=new Error(i("no record was found at %@",[a.toString()]));u.recordId=t,n(u)}else e(d)},function(e){n(e)})},i("DS: FirebaseAdapter#find %@ to %@",[r,a.toString()]))},recordWasPushed:function(e,r,t){t.__listening||this.listenForChanges(e,r,t)},recordWillUnload:function(e,r){var t=this._getRef(r.typeKey,r.get("id"));t.off("value")},recordWillDelete:function(e,r){var t=this;r.eachRelationship(function(i,n){if("belongsTo"===n.kind){var o=r.get(n.key),a=r.inverseFor(n.key);if(a&&o.get("id")){var s=t._getRef(a.type,o.get("id"));t._removeHasManyRecord(e,s,a.name,r.id)}}})},listenForChanges:function(e,r,t){t.__listening=!0;var i=e.serializerFor(r),n=this,o=this._getRef(r,t.get("id")),a=!1;o.on("value",function(t){a&&n._handleChildValue(e,r,i,t),a=!0})},findMany:void 0,findAll:function(e,r){var t=this,o=this._getRef(r);return new n(function(i,n){o.once("value",function(n){t._findAllHasEventsForType(r)||t._findAllAddEventListeners(e,r,o);var a=[];n.forEach(function(e){var i=t._assignIdToPayload(e);t._updateRecordCacheForType(r,i),a.push(i)}),i(a)},function(e){n(e)})},i("DS: FirebaseAdapter#findAll %@ to %@",[r,o.toString()]))},findQuery:function(e,r,t){var o=this,a=this._getRef(r);return a=this.applyQueryToRef(a,t),new n(function(t,i){a.once("value",function(i){o._findAllHasEventsForType(r)||o._findAllAddEventListeners(e,r,a);var n=[];i.forEach(function(e){var t=o._assignIdToPayload(e);o._updateRecordCacheForType(r,t),n.push(t)}),t(n)},function(e){i(e)})},i("DS: FirebaseAdapter#findQuery %@ with %@",[r,t]))},applyQueryToRef:function(e,r){return r.orderBy||(r.orderBy="_key"),e="_key"===r.orderBy?e.orderByKey():"_value"===r.orderBy?e.orderByValue():"_priority"===r.orderBy?e.orderByPriority():e.orderByChild(r.orderBy),["limitToFirst","limitToLast","startAt","endAt","equalTo"].forEach(function(t){(r[t]||""===r[t])&&(e=e[t](r[t]))}),e},_findAllMapForType:void 0,_findAllHasEventsForType:function(r){return!e.isNone(this._findAllMapForType[r])},_findAllAddEventListeners:function(e,r,t){this._findAllMapForType[r]=!0;var i=this,n=e.serializerFor(r);t.on("child_added",function(t){e.hasRecordForId(r,i._getKey(t))||i._handleChildValue(e,r,n,t)})},_handleChildValue:function(e,r,t,i){if(!e.isDestroying){var n=i.val();if(null===n){var o=this._getKey(i),a=e.getById(r,o);a.get("isDeleted")||a.deleteRecord()}else{var s=this._assignIdToPayload(i);this._enqueue(function(){e.push(r,t.extractSingle(e,r,s))})}}},createRecord:function(e,r,t){var i=this;return this.updateRecord(e,r,t).then(function(){i.listenForChanges(e,r,t)})},updateRecord:function(r,t,o,a){var s=this,d=a||this._getRef(t,o.id),u=s._getRecordCache(t.typeKey,o.get("id")),l=o.serialize({includeId:!1});return new n(function(n,a){var c=e.A();o.eachRelationship(function(e,i){var n;"hasMany"===i.kind?l[e]&&(n=s._saveHasManyRelationship(r,t,i,l[e],d,u),c.push(n),delete l[e]):i.options.embedded===!0&&l[e]&&(n=s._saveBelongsToRecord(r,t,i,l[e],d),c.push(n),delete l[e])});var h=e.RSVP.allSettled(c),f=s._updateRecord(d,l);e.RSVP.hashSettled({relationships:h,record:f}).then(function(r){var s=e.A(r.relationships.value).filterBy("state","rejected");if("rejected"===r.record.state&&s.push(r.record),0!==s.length){var d=new Error(i("Some errors were encountered while saving %@ %@",[t,o.id]));d.errors=s.mapBy("reason"),a(d)}else n()})},i("DS: FirebaseAdapter#updateRecord %@ to %@",[t,d.toString()]))},_updateRecord:function(e,r){return t(e.update,e,[r])},_saveHasManyRelationship:function(r,t,n,o,d,l){if(!e.isArray(o))throw new Error("hasMany relationships must must be an array");var c=this,h=e.A(l[n.key]),f=[],y=a(o,function(e){return!h.contains(e)});f=a(o,function(e){var t=n.type;return r.hasRecordForId(t,e)&&r.getById(t,e).get("isDirty")===!0}),f=s(u(f.concat(y)),function(e){return c._saveHasManyRecord(r,n,d,e)});var p=a(h,function(e){return!o.contains(e)});p=s(p,function(e){return c._removeHasManyRecord(r,d,n.key,e)});var v=f.concat(p);return e.RSVP.allSettled(v).then(function(r){var t=e.A(e.A(r).filterBy("state","rejected"));if(0===t.get("length"))return l[n.key]=o,r;var a=new Error(i("Some errors were encountered while saving a hasMany relationship %@ -> %@",[n.parentType,n.type]));throw a.errors=e.A(t).mapBy("reason"),a})},_saveHasManyRecord:function(e,r,i,n){var o=this._getRelationshipRef(i,r.key,n),a=e.getById(r.type,n),s=r.options.embedded===!0;return s?this.updateRecord(e,r.type,a,o):t(o.set,o,[!0])},_removeHasManyRecord:function(e,r,i,n){var o=this._getRelationshipRef(r,i,n);return t(o.remove,o,[],o.toString())},_saveBelongsToRecord:function(e,r,t,i,n){var o=n.child(t.key),a=e.getById(t.type,i);return this.updateRecord(e,t.type,a,o)},deleteRecord:function(e,r,i){var n=this._getRef(r,i.get("id"));return t(n.remove,n)},pathForType:function(r){var t=e.String.camelize(r);return e.String.pluralize(t)},_getRef:function(e,r){var t=this._ref;return e&&(t=t.child(this.pathForType(e.typeKey))),r&&(t=t.child(r)),t},_getRelationshipRef:function(e,r,t){return e.child(r).child(t)},_queueFlushDelay:1e3/60,_queueScheduleFlush:function(){e.run.later(this,this._queueFlush,this._queueFlushDelay)},_queueFlush:function(){o(this._queue,function(e){var r=e[0],t=e[1];r.apply(null,t)}),this._queue.length=0},_enqueue:function(e,r){if(this._queueFlushDelay){var t=this._queue.push([e,r]);1===t&&this._queueScheduleFlush()}else e.apply(null,r)},_recordCacheForType:void 0,_updateRecordCacheForType:function(r,t){if(t){var i=t.id,n=r.typeKey,o=this._getRecordCache(n,i);r.eachRelationship(function(r,i){if("hasMany"===i.kind){var n=t[r];o[r]=e.isNone(n)?e.A():e.A(e.keys(n))}})}},_getRecordCache:function(e,r){var t=this._recordCacheForType;return t[e]=t[e]||{},t[e][r]=t[e][r]||{},t[e][r]},_getKey:function(e){return"function"==typeof e.key?e.key():e.name()}}),c=e.EnumerableUtils.map,h=e.String.fmt,f=r.JSONSerializer.extend(e.Evented,{_normalizeNumberIDs:function(e,r){var t=[];e[r][0]===!0&&t.push("0"),e[r][1]===!0&&t.push("1"),e[r]=t},normalizeHasMany:function(r,t,i){var n=i.key;if("object"!=typeof t[n]||e.isArray(t[n])){if(e.isArray(t[n])&&t[n].length<3&&(t[n][0]===!0||t[n][1]===!0))this._normalizeNumberIDs(t,n);else if(e.isArray(t[n]))throw new Error(h('%@ relationship %@(\'%@\') must be a key/value map in Firebase. Example: { "%@": { "%@_id": true } }',[r.toString(),i.kind,i.type.typeKey,n,i.type.typeKey]))}else t[n]=e.keys(t[n])},normalizeEmbeddedHasMany:function(r,t,i){var n,o=i.key,a=t[o];if(t[o]){for(n in a){var s=a[n];null!==s&&"object"==typeof s&&(s.id=n),this.store.push(i.type,this.normalize(i.type,s))}t[o]=e.keys(t[o])}},normalizeEmbeddedBelongsTo:function(e,r,t){var i=t.key;if(r[i]){var n=r[i];if("string"!=typeof n.id)throw new Error(h('Embedded relationship "%@" of "%@" must contain an "id" property in the payload',[t.type.typeKey,e]));this.store.push(t.type,this.normalize(t.type,n)),r[i]=n.id}},normalizeBelongsTo:e.K,normalize:function(e,r){var t=this;return e.eachRelationship(function(i,n){"hasMany"===n.kind?n.options.embedded?t.normalizeEmbeddedHasMany(e,r,n):t.normalizeHasMany(e,r,n):n.options.embedded?t.normalizeEmbeddedBelongsTo(e,r,n):t.normalizeBelongsTo(e,r,n)}),this._super.apply(this,arguments)},extractSingle:function(e,r,t){return this.normalize(r,t)},extractArray:function(e,r,t){return c(t,function(t){return this.extractSingle(e,r,t)},this)},serializeHasMany:function(r,t,i){var n=i.key,o=this.keyForRelationship?this.keyForRelationship(n,"hasMany"):n;t[o]=e.A(r.get(n)).mapBy("id")},serializeBelongsTo:function(e,r,t){this._super(e,r,t);var i=t.key;("undefined"==typeof r[i]||""===r[i])&&delete r[i]}}),y="1.4.2";e.libraries&&e.libraries.registerCoreLibrary("EmberFire",y);var p={name:"emberfire",initialize:function(e,t){t.register("adapter:-firebase",l),t.register("serializer:-firebase",f),r.Store.reopen({push:function(e,r,t){var i=this._super(e,r,t),n=this.adapterFor(i.constructor);return n.recordWasPushed&&n.recordWasPushed(this,e,i),i},recordWillUnload:function(e){var r=this.adapterFor(e.constructor);r.recordWillUnload&&r.recordWillUnload(this,e)},recordWillDelete:function(e){var r=this.adapterFor(e.constructor);r.recordWillDelete&&r.recordWillDelete(this,e)}}),r.Model.reopen({unloadRecord:function(){return this.store.recordWillUnload(this),this._super()},deleteRecord:function(){this.store.recordWillDelete(this),this._super()}}),r.FirebaseAdapter=l,r.FirebaseSerializer=f}};/*! | ||
(function(){"use strict";var e=window.Ember,r=window.DS,t=function(r,t,i,n){var o=i||[];return new e.RSVP.Promise(function(e,i){var a=function(r){r?(n&&"object"==typeof r&&(r.location=n),i(r)):e()};o.push(a),r.apply(t,o)})},i=e.String.fmt,n=e.RSVP.Promise,o=e.EnumerableUtils.forEach,a=e.EnumerableUtils.filter,s=e.EnumerableUtils.map,d=e.EnumerableUtils.indexOf,u=function(r){var t=e.A();return r.forEach(function(e){d(t,e)<0&&t.push(e)}),t},l=r.Adapter.extend(e.Evented,{defaultSerializer:"-firebase",init:function(){var e=this.get("firebase");if(!e||"object"!=typeof e)throw new Error("Please set the `firebase` property on the adapter.");this._ref=e.ref(),this._findAllMapForType={},this._recordCacheForType={},this._queue=[]},generateIdForRecord:function(){return this._getKey(this._ref.push())},_assignIdToPayload:function(e){var r=e.val();return null!==r&&"object"==typeof r&&"undefined"==typeof r.id&&(r.id=this._getKey(e)),r},find:function(e,r,t){var o=this,a=this._getRef(r,t);return new n(function(e,n){a.once("value",function(s){var d=o._assignIdToPayload(s);if(o._updateRecordCacheForType(r,d),null===d){var u=new Error(i("no record was found at %@",[a.toString()]));u.recordId=t,n(u)}else e(d)},function(e){n(e)})},i("DS: FirebaseAdapter#find %@ to %@",[r,a.toString()]))},recordWasPushed:function(e,r,t){t.__listening||this.listenForChanges(e,r,t)},recordWillUnload:function(e,r){var t=this._getRef(r.typeKey,r.get("id"));t.off("value")},recordWillDelete:function(e,r){var t=this;r.eachRelationship(function(i,n){if("belongsTo"===n.kind){var o=r.get(n.key),a=r.inverseFor(n.key);if(a&&o.get("id")){var s=t._getRef(a.type,o.get("id"));t._removeHasManyRecord(e,s,a.name,r.id)}}})},listenForChanges:function(e,r,t){t.__listening=!0;var i=e.serializerFor(r),n=this,o=this._getRef(r,t.get("id")),a=!1;o.on("value",function(t){a&&n._handleChildValue(e,r,i,t),a=!0})},findMany:void 0,findAll:function(e,r){var t=this,o=this._getRef(r);return new n(function(i,n){o.once("value",function(n){t._findAllHasEventsForType(r)||t._findAllAddEventListeners(e,r,o);var a=[];n.forEach(function(e){var i=t._assignIdToPayload(e);t._updateRecordCacheForType(r,i),a.push(i)}),i(a)},function(e){n(e)})},i("DS: FirebaseAdapter#findAll %@ to %@",[r,o.toString()]))},findQuery:function(e,r,t){var o=this,a=this._getRef(r);return a=this.applyQueryToRef(a,t),new n(function(t,i){a.once("value",function(i){o._findAllHasEventsForType(r)||o._findAllAddEventListeners(e,r,a);var n=[];i.forEach(function(e){var t=o._assignIdToPayload(e);o._updateRecordCacheForType(r,t),n.push(t)}),t(n)},function(e){i(e)})},i("DS: FirebaseAdapter#findQuery %@ with %@",[r,t]))},applyQueryToRef:function(e,r){return r.orderBy||(r.orderBy="_key"),e="_key"===r.orderBy?e.orderByKey():"_value"===r.orderBy?e.orderByValue():"_priority"===r.orderBy?e.orderByPriority():e.orderByChild(r.orderBy),["limitToFirst","limitToLast","startAt","endAt","equalTo"].forEach(function(t){(r[t]||""===r[t])&&(e=e[t](r[t]))}),e},_findAllMapForType:void 0,_findAllHasEventsForType:function(r){return!e.isNone(this._findAllMapForType[r])},_findAllAddEventListeners:function(e,r,t){this._findAllMapForType[r]=!0;var i=this,n=e.serializerFor(r);t.on("child_added",function(t){e.hasRecordForId(r,i._getKey(t))||i._handleChildValue(e,r,n,t)})},_handleChildValue:function(e,r,t,i){if(!e.isDestroying){var n=i.val();if(null===n){var o=this._getKey(i),a=e.getById(r,o);a.get("isDeleted")||a.deleteRecord()}else{var s=this._assignIdToPayload(i);this._enqueue(function(){e.push(r,t.extractSingle(e,r,s))})}}},createRecord:function(e,r,t){var i=this;return this.updateRecord(e,r,t).then(function(){i.listenForChanges(e,r,t)})},updateRecord:function(r,t,o,a){var s=this,d=a||this._getRef(t,o.id),u=s._getRecordCache(t.typeKey,o.get("id")),l=o.serialize({includeId:!1});return new n(function(n,a){var c=e.A();o.eachRelationship(function(e,i){var n;"hasMany"===i.kind?l[e]&&(n=s._saveHasManyRelationship(r,t,i,l[e],d,u),c.push(n),delete l[e]):i.options.embedded===!0&&l[e]&&(n=s._saveBelongsToRecord(r,t,i,l[e],d),c.push(n),delete l[e])});var h=e.RSVP.allSettled(c),f=s._updateRecord(d,l);e.RSVP.hashSettled({relationships:h,record:f}).then(function(r){var s=e.A(r.relationships.value).filterBy("state","rejected");if("rejected"===r.record.state&&s.push(r.record),0!==s.length){var d=new Error(i("Some errors were encountered while saving %@ %@",[t,o.id]));d.errors=s.mapBy("reason"),a(d)}else n()})},i("DS: FirebaseAdapter#updateRecord %@ to %@",[t,d.toString()]))},_updateRecord:function(e,r){return t(e.update,e,[r])},_saveHasManyRelationship:function(r,t,n,o,d,l){if(!e.isArray(o))throw new Error("hasMany relationships must must be an array");var c=this,h=e.A(l[n.key]),f=[],y=a(o,function(e){return!h.contains(e)});f=a(o,function(e){var t=n.type;return r.hasRecordForId(t,e)&&r.getById(t,e).get("isDirty")===!0}),f=s(u(f.concat(y)),function(e){return c._saveHasManyRecord(r,n,d,e)});var p=a(h,function(e){return!o.contains(e)});p=s(p,function(e){return c._removeHasManyRecord(r,d,n.key,e)});var v=f.concat(p);return e.RSVP.allSettled(v).then(function(r){var t=e.A(e.A(r).filterBy("state","rejected"));if(0===t.get("length"))return l[n.key]=o,r;var a=new Error(i("Some errors were encountered while saving a hasMany relationship %@ -> %@",[n.parentType,n.type]));throw a.errors=e.A(t).mapBy("reason"),a})},_saveHasManyRecord:function(e,r,i,n){var o=this._getRelationshipRef(i,r.key,n),a=e.getById(r.type,n),s=r.options.embedded===!0;return s?this.updateRecord(e,r.type,a,o):t(o.set,o,[!0])},_removeHasManyRecord:function(e,r,i,n){var o=this._getRelationshipRef(r,i,n);return t(o.remove,o,[],o.toString())},_saveBelongsToRecord:function(e,r,t,i,n){var o=n.child(t.key),a=e.getById(t.type,i);return this.updateRecord(e,t.type,a,o)},deleteRecord:function(e,r,i){var n=this._getRef(r,i.get("id"));return t(n.remove,n)},pathForType:function(r){var t=e.String.camelize(r);return e.String.pluralize(t)},_getRef:function(e,r){var t=this._ref;return e&&(t=t.child(this.pathForType(e.typeKey))),r&&(t=t.child(r)),t},_getRelationshipRef:function(e,r,t){return e.child(r).child(t)},_queueFlushDelay:1e3/60,_queueScheduleFlush:function(){e.run.later(this,this._queueFlush,this._queueFlushDelay)},_queueFlush:function(){o(this._queue,function(e){var r=e[0],t=e[1];r.apply(null,t)}),this._queue.length=0},_enqueue:function(e,r){if(this._queueFlushDelay){var t=this._queue.push([e,r]);1===t&&this._queueScheduleFlush()}else e.apply(null,r)},_recordCacheForType:void 0,_updateRecordCacheForType:function(r,t){if(t){var i=t.id,n=r.typeKey,o=this._getRecordCache(n,i);r.eachRelationship(function(r,i){if("hasMany"===i.kind){var n=t[r];o[r]=e.isNone(n)?e.A():e.A(e.keys(n))}})}},_getRecordCache:function(e,r){var t=this._recordCacheForType;return t[e]=t[e]||{},t[e][r]=t[e][r]||{},t[e][r]},_getKey:function(e){return"function"==typeof e.key?e.key():e.name()}}),c=e.EnumerableUtils.map,h=e.String.fmt,f=r.JSONSerializer.extend(e.Evented,{_normalizeNumberIDs:function(e,r){var t=[];e[r][0]===!0&&t.push("0"),e[r][1]===!0&&t.push("1"),e[r]=t},normalizeHasMany:function(r,t,i){var n=i.key;if("object"!=typeof t[n]||e.isArray(t[n])){if(e.isArray(t[n])&&t[n].length<3&&(t[n][0]===!0||t[n][1]===!0))this._normalizeNumberIDs(t,n);else if(e.isArray(t[n]))throw new Error(h('%@ relationship %@(\'%@\') must be a key/value map in Firebase. Example: { "%@": { "%@_id": true } }',[r.toString(),i.kind,i.type.typeKey,n,i.type.typeKey]))}else t[n]=e.keys(t[n])},normalizeEmbeddedHasMany:function(r,t,i){var n,o=i.key,a=t[o];if(t[o]){for(n in a){var s=a[n];null!==s&&"object"==typeof s&&(s.id=n),this.store.push(i.type,this.normalize(i.type,s))}t[o]=e.keys(t[o])}},normalizeEmbeddedBelongsTo:function(e,r,t){var i=t.key;if(r[i]){var n=r[i];if("string"!=typeof n.id)throw new Error(h('Embedded relationship "%@" of "%@" must contain an "id" property in the payload',[t.type.typeKey,e]));this.store.push(t.type,this.normalize(t.type,n)),r[i]=n.id}},normalizeBelongsTo:e.K,normalize:function(e,r){var t=this;return e.eachRelationship(function(i,n){"hasMany"===n.kind?n.options.embedded?t.normalizeEmbeddedHasMany(e,r,n):t.normalizeHasMany(e,r,n):n.options.embedded?t.normalizeEmbeddedBelongsTo(e,r,n):t.normalizeBelongsTo(e,r,n)}),this._super.apply(this,arguments)},extractSingle:function(e,r,t){return this.normalize(r,t)},extractArray:function(e,r,t){return c(t,function(t){return this.extractSingle(e,r,t)},this)},serializeHasMany:function(r,t,i){var n=i.key,o=this.keyForRelationship?this.keyForRelationship(n,"hasMany"):n;t[o]=e.A(r.get(n)).mapBy("id")},serializeBelongsTo:function(e,r,t){this._super(e,r,t);var i=t.key;("undefined"==typeof r[i]||""===r[i])&&delete r[i]}}),y=window.Firebase,p="1.4.3";e.libraries&&(y.SDK_VERSION&&e.libraries.registerCoreLibrary("Firebase",y.SDK_VERSION),e.libraries.registerCoreLibrary("EmberFire",p));var v={name:"emberfire",before:"store",initialize:function(e,t){t.register("adapter:-firebase",l),t.register("serializer:-firebase",f),r.Store.reopen({push:function(e,r,t){var i=this._super(e,r,t),n=this.adapterFor(i.constructor);return n.recordWasPushed&&n.recordWasPushed(this,e,i),i},recordWillUnload:function(e){var r=this.adapterFor(e.constructor);r.recordWillUnload&&r.recordWillUnload(this,e)},recordWillDelete:function(e){var r=this.adapterFor(e.constructor);r.recordWillDelete&&r.recordWillDelete(this,e)}}),r.Model.reopen({unloadRecord:function(){return this.store.recordWillUnload(this),this._super()},deleteRecord:function(){this.store.recordWillDelete(this),this._super()}}),r.FirebaseAdapter=l,r.FirebaseSerializer=f}};/*! | ||
* EmberFire is the officially supported adapter for using Firebase with | ||
@@ -6,6 +6,6 @@ * Ember Data. The DS.FirebaseAdapter provides all of the standard DS.Adapter | ||
* | ||
* EmberFire 1.4.2 | ||
* EmberFire 1.4.3 | ||
* https://github.com/firebase/emberfire/ | ||
* License: MIT | ||
*/ | ||
window.DS.FirebaseAdapter=l,window.DS.FirebaseSerializer=f,e.onLoad("Ember.Application",function(e){e.initializer(p)})}).call(this); | ||
window.DS.FirebaseAdapter=l,window.DS.FirebaseSerializer=f,e.onLoad("Ember.Application",function(e){e.initializer(v)})}).call(this); |
{ | ||
"name": "emberfire", | ||
"description": "The officially supported Ember binding for Firebase", | ||
"version": "1.4.2", | ||
"version": "1.4.3", | ||
"author": "Firebase <support@firebase.com> (https://www.firebase.com/)", | ||
@@ -39,3 +39,3 @@ "homepage": "https://github.com/firebase/emberfire/", | ||
}, | ||
"dependencies":{ | ||
"dependencies": { | ||
"chalk": "^1.0.0", | ||
@@ -46,8 +46,8 @@ "fs-extra": "0.16.4", | ||
"devDependencies": { | ||
"broccoli-asset-rev": "2.0.1", | ||
"broccoli-asset-rev": "2.0.2", | ||
"del": "1.1.1", | ||
"ember-cli": "0.1.15", | ||
"ember-cli-6to5": "3.0.0", | ||
"ember-cli-dependency-checker": "0.0.7", | ||
"ember-cli-htmlbars": "0.6.0", | ||
"ember-cli": "0.2.0", | ||
"ember-cli-babel": "4.3.0", | ||
"ember-cli-dependency-checker": "0.0.8", | ||
"ember-cli-htmlbars": "0.7.4", | ||
"ember-cli-inject-live-reload": "1.3.1", | ||
@@ -58,3 +58,2 @@ "ember-cli-mocha": "0.5.0", | ||
"ember-export-application-global": "1.0.2", | ||
"express": "4.12.2", | ||
"glob": "4.5.0", | ||
@@ -61,0 +60,0 @@ "gulp": "3.8.11", |
@@ -11,3 +11,3 @@ import Ember from 'ember'; | ||
* | ||
* EmberFire 1.4.2 | ||
* EmberFire 1.4.3 | ||
* https://github.com/firebase/emberfire/ | ||
@@ -14,0 +14,0 @@ * License: MIT |
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
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
260675
18
34
3085