@moxb/meteor
Advanced tools
Comparing version 0.2.0-beta.2 to 0.2.0-beta.3
@@ -7,3 +7,5 @@ export * from './MeteorCall'; | ||
export * from './MeteorTableFetcher'; | ||
export * from './MeteorTableImpl'; | ||
export * from './MeteorTableFetcherImpl'; | ||
export * from './MethodDataFetcherImpl'; | ||
export * from './QueryStringParser'; |
@@ -7,3 +7,5 @@ "use strict"; | ||
tslib_1.__exportStar(require("./MeteorSubscriptionImpl"), exports); | ||
tslib_1.__exportStar(require("./MeteorTableImpl"), exports); | ||
tslib_1.__exportStar(require("./MeteorTableFetcherImpl"), exports); | ||
tslib_1.__exportStar(require("./MethodDataFetcherImpl"), exports); | ||
tslib_1.__exportStar(require("./QueryStringParser"), exports); |
@@ -6,2 +6,3 @@ import { Mongo } from 'meteor/mongo'; | ||
readonly data: T[]; | ||
readonly error?: Meteor.Error; | ||
} | ||
@@ -8,0 +9,0 @@ export interface MeteorTableQuery { |
@@ -17,3 +17,12 @@ "use strict"; | ||
MeteorTableFetcherImpl.prototype.callFetchData = function (query, done) { | ||
this._fetchData(query, done); | ||
var _this = this; | ||
this._fetchData(query, function (error, data) { | ||
// if there is an error, we set the error in the data | ||
if (error) { | ||
done(error, tslib_1.__assign({ error: error }, _this.getInitialData())); | ||
} | ||
else { | ||
done(error, data); | ||
} | ||
}); | ||
}; | ||
@@ -20,0 +29,0 @@ tslib_1.__decorate([ |
@@ -82,3 +82,3 @@ "use strict"; | ||
mobx_1.onBecomeObserved(this, '_data', function () { | ||
console.log('Observing=', JSON.stringify({}, null, 2)); | ||
console.log('observing=', _this.constructor.name); | ||
// it's important to get the autorunDisposer here... | ||
@@ -88,2 +88,3 @@ _this.autorunDisposer = mobx_1.autorun(function () { return _this.runDataFetcherFunction(); }); | ||
mobx_1.onBecomeUnobserved(this, '_data', function () { | ||
console.log('un-observing=', _this.constructor.name); | ||
_this.clearAllData(); | ||
@@ -90,0 +91,0 @@ // we stop the auto update, since nobody is listening.... |
{ | ||
"name": "@moxb/meteor", | ||
"version": "0.2.0-beta.2", | ||
"version": "0.2.0-beta.3", | ||
"description": "MobX meteor binding", | ||
@@ -49,3 +49,3 @@ "scripts": { | ||
"devDependencies": { | ||
"@moxb/moxb": "^0.2.0-beta.2", | ||
"@moxb/moxb": "^0.2.0-beta.3", | ||
"@types/jest": "^23.3.1", | ||
@@ -56,4 +56,4 @@ "@types/meteor": "^1.4.16", | ||
"dependencies": { | ||
"@moxb/moxb": "^0.2.0-beta.2" | ||
"@moxb/moxb": "^0.2.0-beta.3" | ||
} | ||
} |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
56777
27
1543
1
Updated@moxb/moxb@^0.2.0-beta.3