
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// client-side version of Accounts.onLogin | |
export function onLoginUser(hook) { | |
Meteor.subscribe('allUserData', () => | |
Tracker.autorun(function (computation) { | |
// waiting for user subscription to load | |
if (!_.get(Meteor.user(), 'services.google')) { | |
return | |
} | |
// cancel autorun now that we've authenticated | |
computation.stop() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** Given an object, apply a Mongo update and return the resulting document */ | |
function mongoUpdate(obj: Action, update: any): Action { | |
const collection = new Mongo.Collection<Action>(null) | |
const objId = collection.insert(obj) | |
collection.update(objId, update) | |
return collection.findOne(objId)! | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"compilerOptions": { | |
"baseUrl": ".", | |
"paths": { | |
"/imports/*": "./*" | |
} | |
} | |
} | |
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Process: node [48757] | |
Path: /Users/USER/*/node | |
Identifier: node | |
Version: ??? | |
Code Type: X86-64 (Native) | |
Parent Process: node [48750] | |
Responsible: node [48757] | |
User ID: 501 | |
Date/Time: 2017-09-21 20:51:22.136 -0700 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.addEventListener('beforeunload', function (e) { | |
const hasOutstandingRequests = | |
Meteor.connection._outstandingMethodBlocks.length | |
if (hasOutstandingRequests) { | |
// Note: modern browsers don't show a custom message but still confirm | |
const confirmationMessage = | |
'WARNING: There are outstanding requests. Really close this window? If you do you may lose data!' | |
e.returnValue = confirmationMessage // Gecko, Trident, Chrome 34+ | |
return confirmationMessage // Gecko, WebKit, Chrome <34 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"env": { | |
"meteor:coverage": { | |
"plugins": ["istanbul"] | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2017-08-31T21:42:21.245+0000 I CONTROL [initandlisten] MongoDB starting : pid=68530 port=9001 dbpath=/private/var/folders/sr/45xc_4j93svghrd2mcxsx0vr0000gn/T/meteor-test-run66k341.s0sym/.meteor/local/db 64-bit host=jbb-imac.local | |
2017-08-31T21:42:21.245+0000 I CONTROL [initandlisten] db version v3.2.15 | |
2017-08-31T21:42:21.245+0000 I CONTROL [initandlisten] git version: e11e3c1b9c9ce3f7b4a79493e16f5e4504e01140 | |
2017-08-31T21:42:21.245+0000 I CONTROL [initandlisten] allocator: system | |
2017-08-31T21:42:21.245+0000 I CONTROL [initandlisten] modules: none | |
2017-08-31T21:42:21.245+0000 I CONTROL [initandlisten] build environment: | |
2017-08-31T21:42:21.245+0000 I CONTROL [initandlisten] distarch: x86_64 | |
2017-08-31T21:42:21.245+0000 I CONTROL [initandlisten] target_arch: x86_64 | |
2017-08-31T21:42:21.245+0000 I CONTROL [initandlisten] options: { net: { bindIp: "127.0.0.1", port: 9001 }, replication: { oplogSizeMB: 8, replSet: "meteor" }, storage: { dbPath: "/private/var/folders/sr/45xc_4j93svghrd2mcxsx0vr000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* eslint-env browser, serviceworker */ | |
self.addEventListener('error', function (event) { | |
logError(event.error) | |
}) | |
self.addEventListener('unhandledrejection', function (event) { | |
let { reason, detail } = event | |
if (!reason && detail) { | |
reason = detail.reason | |
} |
NewerOlder