Apollo branch up to date with v0.27.4

This commit is contained in:
xavcz 2016-11-15 12:51:43 +01:00
commit 600ab15c4d
75 changed files with 556 additions and 249 deletions

View file

@ -1,44 +1,46 @@
/* Galaxy's Javascript linting configuration (Meteor)
*
* Documentation on rules can be found at:
* http://eslint.org/docs/rules/ <- Optionally append the rulename
*
* Ensure changes are kept in sync with the base linting configuration.
*/
{
"extends": ".eslintrc-meteor",
"env": {
/* Allows global vars from the Meteor environment to pass and enables certain rules */
"meteor": true
"extends": [
"eslint:recommended"
],
"parser": "babel-eslint",
"parserOptions": {
"allowImportExportEverywhere": true,
"ecmaVersion": 6,
"sourceType": "module"
},
"rules": {
/* ---------------- Rules relaxed for Meteor's sake --------------------- */
/* allows use of var (remove when we are ready to switch to ES6) */
"no-var": 0,
/* allows anonymous functions */
"func-names": 0,
/* allows var = function() delcarations */
"func-style": 0,
/* relaxes max-len to 100 chars per line */
"max-len": [2, 100, 2],
/* relaxes requirement to put all vars at the top of the scope */
"vars-on-top": 0,
/* relaxes dangling commas enforcement */
"babel/generator-star-spacing": 0,
"babel/new-cap": 1,
"babel/array-bracket-spacing": 0,
"babel/object-curly-spacing": 0,
"babel/object-shorthand": 0,
"babel/arrow-parens": 0,
"babel/no-await-in-loop": 1,
"comma-dangle": 0,
/* allows certain non-constructor functions to start with a capital letter, */
"new-cap": [2, { "capIsNewExceptions": [
"Match", "Any", "Object", "ObjectIncluding", "OneOf", "Optional", "Where"
]}],
/* ---------------------------------------------------------------------- */
"key-spacing": 0,
"no-extra-boolean-cast": 0,
"no-undef": 1,
"no-unused-vars": 1,
"no-console": 1
},
"env": {
"browser": true,
"commonjs": true,
"es6": true,
"meteor": true,
"node": true
},
"plugins": [
"babel",
"meteor"
],
"settings": {
"import/resolver": "meteor"
},
"modules": true,
"root": true,
"globals": {
"param": true,
"returns": true
}
}

3
.gitignore vendored
View file

@ -1,3 +1,4 @@
.eslintcache
npm-debug.log
*.scssc
.sass-cache/*
@ -44,4 +45,4 @@ node_modules
bundle.tar.gz
jsdoc-conf.json
jsdoc.json
jsdoc.json

View file

@ -35,7 +35,7 @@ nova:base-routes # default routes
nova:email-templates # default email templates for notifications
nova:i18n-en-us # default language translation
accounts-password@1.3.1
accounts-password@1.3.2
# accounts-twitter
# accounts-facebook

View file

@ -1 +1 @@
METEOR@1.4.2.1
METEOR@1.4.2.1

View file

@ -1,38 +1,38 @@
accounts-base@1.2.14
accounts-password@1.3.1
accounts-password@1.3.2
aldeed:collection2@2.10.0
aldeed:collection2-core@1.2.0
aldeed:schema-deny@1.1.0
aldeed:schema-index@1.1.0
aldeed:schema-index@1.1.1
aldeed:simple-schema@1.5.3
allow-deny@1.0.5
autoupdate@1.3.12
babel-compiler@6.13.0
babel-runtime@0.1.12
babel-runtime@1.0.0
base64@1.0.10
binary-heap@1.0.10
blaze@2.1.9
blaze@2.2.0
blaze-tools@1.0.10
boilerplate-generator@1.0.11
caching-compiler@1.1.8
caching-compiler@1.1.9
callback-hook@1.0.10
check@1.2.4
chuangbo:cookie@1.1.0
coffeescript@1.11.1_2
coffeescript@1.11.1_3
dburles:collection-helpers@1.1.0
ddp@1.2.5
ddp-client@1.3.2
ddp-common@1.2.7
ddp-common@1.2.8
ddp-rate-limiter@1.0.6
ddp-server@1.3.11
ddp-server@1.3.12
deps@1.0.12
diff-sequence@1.0.7
ecmascript@0.5.9
ecmascript@0.6.0
ecmascript-runtime@0.3.15
ejson@1.0.13
email@1.1.18
fortawesome:fontawesome@4.6.3
fourseven:scss@3.10.0
fortawesome:fontawesome@4.7.0
fourseven:scss@3.10.1
geojson-utils@1.0.10
hot-code-push@1.0.4
html-tools@1.0.11
@ -46,17 +46,15 @@ jquery@1.11.10
livedata@1.0.18
localstorage@1.0.12
logging@1.1.16
matb33:collection-hooks@0.8.4
mdg:validation-error@0.5.1
meteor@1.6.0
meteor-base@1.0.4
meteorhacks:fast-render@2.16.0
meteorhacks:inject-data@2.0.0
meteorhacks:inject-data@2.0.1-nova-patch
meteorhacks:inject-initial@1.0.4
meteorhacks:meteorx@1.4.1
meteorhacks:picker@1.0.3
meteorhacks:subs-manager@1.6.4
meteorhacks:unblock@1.1.0
minifier-css@1.2.15
minifier-js@1.2.15
minimongo@1.0.18
@ -64,31 +62,32 @@ modules@0.7.7
modules-runtime@0.7.7
mongo@1.1.14
mongo-id@1.0.6
nova:api@0.27.3-nova
nova:apollo@0.27.3-nova
nova:base-components@0.27.3-nova
nova:base-containers@0.27.3-nova
nova:base-routes@0.27.3-nova
nova:base-styles@0.27.3-nova
nova:categories@0.27.3-nova
nova:comments@0.27.3-nova
nova:core@0.27.3-nova
nova:debug@0.27.3-nova
nova:email@0.27.3-nova
nova:email-templates@0.27.3-nova
nova:embedly@0.27.3-nova
nova:events@0.27.3-nova
nova:forms@0.27.3-nova
nova:getting-started@0.27.3-nova
nova:i18n-en-us@0.27.3-nova
nova:lib@0.27.3-nova
nova:newsletter@0.27.3-nova
nova:notifications@0.27.3-nova
nova:posts@0.27.3-nova
nova:rss@0.27.3-nova
nova:search@0.27.3-nova
nova:users@0.27.3-nova
nova:voting@0.27.3-nova
nova:api@0.27.4-nova
nova:apollo@0.27.4-nova
nova:base-components@0.27.4-nova
nova:base-containers@0.27.4-nova
nova:base-routes@0.27.4-nova
nova:base-styles@0.27.4-nova
nova:categories@0.27.4-nova
nova:comments@0.27.4-nova
nova:core@0.27.4-nova
nova:debug@0.27.4-nova
nova:email@0.27.4-nova
nova:email-templates@0.27.4-nova
nova:embedly@0.27.4-nova
nova:events@0.27.4-nova
nova:forms@0.27.4-nova
nova:getting-started@0.27.4-nova
nova:i18n-en-us@0.27.4-nova
nova:lib@0.27.4-nova
nova:newsletter@0.27.4-nova
nova:notifications@0.27.4-nova
nova:posts@0.27.4-nova
nova:rss@0.27.4-nova
nova:search@0.27.4-nova
nova:settings@0.27.4-nova
nova:users@0.27.4-nova
nova:voting@0.27.4-nova
npm-bcrypt@0.9.2
npm-mongo@2.2.11_2
observe-sequence@1.0.14
@ -96,7 +95,7 @@ ordered-dict@1.0.9
peerlibrary:assert@0.2.5
peerlibrary:fiber-utils@0.6.0
peerlibrary:reactive-mongo@0.1.1
peerlibrary:reactive-publish@0.2.0
peerlibrary:reactive-publish@0.3.0
peerlibrary:server-autorun@0.5.2
percolatestudio:synced-cron@1.1.0
promise@0.8.8
@ -121,15 +120,13 @@ srp@1.0.10
standard-minifier-css@1.3.2
standard-minifier-js@1.2.1
standard-minifiers@1.0.6
std:accounts-ui@1.2.8
std:accounts-ui@1.2.9
tmeasday:check-npm-versions@0.3.1
tmeasday:publish-counts@0.8.0
tracker@1.1.1
ui@1.0.12
underscore@1.0.10
url@1.0.11
utilities:react-list-container@0.1.14
utilities:smart-methods@0.1.5
utilities:smart-publications@0.1.4
webapp@1.3.12
webapp-hashing@1.0.9

View file

@ -1,6 +1,18 @@
## vNEXT
## v0.27.4
Apollo integration, Webpack build (work in progress on `apollo` & `webpack` branches).
- Nova is now powered by Meteor 1.4.2.1, which provides among other cool features super fast build time! Some NPM dependencies changed: **be sure to run `npm install` again!**
- Fix typo in class name `posts-list-header-categories` ([PR #1487](https://github.com/TelescopeJS/Telescope/pull/1487), thanks [@seanjsong](https://github.com/seanjsong)).
- Make `document` property available to all form components, but don't pass it down to standard input controls to avoid error.
- Do not try to init legacy `Settings` collection client-side: this was an annoying warning that you may have got telling something about a forbidden insert.
- Add reset password components and route ([PR #1491](https://github.com/TelescopeJS/Telescope/pull/1491), thanks [@malively](https://github.com/malively)).
- Add internationalization messages for "no more posts", "no results" and "load more days" ([PR #1499](https://github.com/TelescopeJS/Telescope/pull/1499), thanks [@qge](https://github.com/qge)).
- No more duplicate slugs if a user signs up with an external service (Facebook, Twitter, ..) and another user signs up with a username being the same as the other user (modification on `Telescope.utils.getUnsudedSlug` to handle edge case on `Users` collection).
- Somebody can remove their account themselves again: `users.remove` fixed at the level of the permissions and related callbacks.
- Server-side rendering / data-injection is fixed thanks to a `meteorhacks:inject-data` fork added locally in the packages (`nova-inject-data` folder, [see here for more info](https://github.com/TelescopeJS/Telescope/commit/f988686653b21896c3f5d321f30c34c1b5778628#diff-8f4ee0b18f5c4673b79684ee3c7d2430))
- Add simplified chinese (`zh-CN`) translation package to the README ([PR #1503](https://github.com/TelescopeJS/Telescope/pull/1503), thanks [@qge](https://github.com/qge)).
- Only show comment reply button for logged in users ([PR #1504](https://github.com/TelescopeJS/Telescope/pull/1504), thanks [@qge](https://github.com/qge)).
- Fix React `setState` race condition on `NovaForm` autofilled values ([PR #1507](https://github.com/TelescopeJS/Telescope/pull/1507), thanks [@sherryxiao1988](https://github.com/sherryxiao1988)).
- Fix ESLint config: you can lint your project with `npm run lint`! It is based on `eslint:recommended` + `meteor` extends ([PR #1474](https://github.com/TelescopeJS/Telescope/pull/1474), thanks [@moimikey](https://github.com/moimikey)).
## v0.27.3

View file

@ -731,6 +731,7 @@ If you create a new internationalization package, let us know so we can add it h
- [ru-RU](https://github.com/fortunto2/nova-i18n-ru-ru)
- [de-DE](https://atmospherejs.com/fzeidler/nova-i18n-de-de)
- [pt-BR](https://github.com/lukasag/nova-i18n-pt-br)
- [zh-CN](https://github.com/qge/nova-i18n-zh-cn)
## Cheatsheet

View file

@ -1,9 +1,12 @@
{
"name": "Nova",
"version": "0.0.0",
"version": "0.27.4",
"engines": {
"npm": "^3.0"
},
"scripts": {
"lint": "eslint --cache packages"
},
"dependencies": {
"apollo-client": "^0.5.1",
"babel-runtime": "^6.18.0",
@ -57,7 +60,17 @@
},
"private": true,
"devDependencies": {
"autoprefixer": "^6.3.6"
"autoprefixer": "^6.3.6",
"babel-eslint": "^7.0.0",
"eslint": "^3.10.1",
"eslint-config-airbnb": "^13.0.0",
"eslint-config-meteor": "0.0.9",
"eslint-import-resolver-meteor": "^0.3.3",
"eslint-plugin-babel": "^3.3.0",
"eslint-plugin-import": "^2.2.0",
"eslint-plugin-jsx-a11y": "^2.2.3",
"eslint-plugin-meteor": "^4.0.1",
"eslint-plugin-react": "^6.7.1"
},
"postcss": {
"plugins": {

View file

@ -1,7 +1,7 @@
Package.describe({
name: "nova:api",
summary: "Telescope API package",
version: "0.27.3-nova",
version: "0.27.4-nova",
git: "https://github.com/TelescopeJS/Telescope.git"
});
@ -9,7 +9,7 @@ Package.onUse(function (api) {
api.versionsFrom(['METEOR@1.0']);
api.use(['nova:core@0.27.3-nova']);
api.use(['nova:core@0.27.4-nova']);
api.mainModule("lib/server.js", "server");
// api.mainModule("lib/client.js", "client");

View file

@ -1,7 +1,7 @@
Package.describe({
name: "nova:apollo",
summary: "Nova Apollo Server package",
version: "0.27.3-nova",
version: "0.27.4-nova",
git: "https://github.com/TelescopeJS/Telescope.git"
});
@ -13,8 +13,8 @@ Package.onUse(function (api) {
// Nova packages
'nova:core@0.27.3-nova',
'nova:users@0.27.3-nova',
'nova:core@0.27.4-nova',
'nova:users@0.27.4-nova',
]);

View file

@ -55,10 +55,15 @@ class CommentsItem extends Component{
renderComment() {
const htmlBody = {__html: this.props.comment.htmlBody};
const showReplyButton = !this.props.comment.isDeleted && !!this.context.currentUser;
return (
<div className="comments-item-text">
<div dangerouslySetInnerHTML={htmlBody}></div>
{!this.props.comment.isDeleted ? <a className="comments-item-reply-link" onClick={this.showReply}><Telescope.components.Icon name="reply"/> <FormattedMessage id="comments.reply"/></a> : null}
{ showReplyButton ?
<a className="comments-item-reply-link" onClick={this.showReply}>
<Telescope.components.Icon name="reply"/> <FormattedMessage id="comments.reply"/>
</a> : null}
</div>
)
}

View file

@ -76,3 +76,4 @@ Telescope.registerComponent("UsersName", require('./users/UsersName.j
Telescope.registerComponent("UsersMenu", require('./users/UsersMenu.jsx'));
Telescope.registerComponent("UsersAccountMenu", require('./users/UsersAccountMenu.jsx'));
Telescope.registerComponent("UsersAccountForm", require('./users/UsersAccountForm.jsx'));
Telescope.registerComponent("UsersResetPassword", require('./users/UsersResetPassword.jsx'));

View file

@ -1,10 +1,11 @@
import Telescope from 'meteor/nova:lib';
import React, { PropTypes, Component } from 'react';
import { Button } from 'react-bootstrap';
import moment from 'moment';
import Telescope from "meteor/nova:lib";
import React, { PropTypes, Component } from "react";
import { Button } from "react-bootstrap";
import moment from "moment";
import { FormattedMessage } from "react-intl";
class PostsDaily extends Component{
constructor(props) {
super(props);
this.loadMoreDays = this.loadMoreDays.bind(this);
@ -30,7 +31,7 @@ class PostsDaily extends Component{
<div className="posts-daily">
<Telescope.components.PostsListHeader />
{this.getLastNDates(this.state.days).map((date, index) => <Telescope.components.PostsDay key={index} date={date} number={index}/>)}
<button className="posts-load-more" onClick={this.loadMoreDays}>Load More Days</button>
<button className="posts-load-more" onClick={this.loadMoreDays}><FormattedMessage id="posts.load_more_days"/></button>
</div>
)
}
@ -39,12 +40,12 @@ class PostsDaily extends Component{
PostsDaily.propTypes = {
days: React.PropTypes.number,
increment: React.PropTypes.number
}
};
PostsDaily.defaultProps = {
days: 5,
increment: 5
}
};
module.exports = PostsDaily;
export default PostsDaily;

View file

@ -1,6 +1,7 @@
import React from 'react';
import React from "react";
import { FormattedMessage } from "react-intl";
const PostsNoMore = props => <p className="posts-no-more">No more posts.</p>
const PostsNoMore = props => <p className="posts-no-more"><FormattedMessage id="posts.no_more"/></p>;
PostsNoMore.displayName = "PostsNoMore";

View file

@ -1,6 +1,7 @@
import React from 'react';
import { FormattedMessage } from "react-intl";
const PostsNoResults = props => <p className="posts-no-results">No posts to display.</p>
const PostsNoResults = props => <p className="posts-no-results"><FormattedMessage id="posts.no_results"/></p>;
PostsNoResults.displayName = "PostsNoResults";

View file

@ -0,0 +1,36 @@
import React, { Component } from 'react';
import { Accounts, STATES } from 'meteor/std:accounts-ui';
import { Link } from 'react-router';
class UsersResetPassword extends Component {
componentDidMount() {
const token = this.props.params.token;
Accounts._loginButtonsSession.set('resetPasswordToken', token);
}
render() {
if (!this.context.currentUser) {
return (
<Accounts.ui.LoginForm
formState={ STATES.PASSWORD_CHANGE }
/>
);
}
return (
<div className='password-reset-form'>
<div>{T9n.get('info.passwordChanged')}!</div>
<Link to="/">
Return Home
</Link>
</div>
);
}
}
module.exports = UsersResetPassword;
export default UsersResetPassword;
UsersResetPassword.contextTypes = {
currentUser: React.PropTypes.object
};

View file

@ -1,7 +1,7 @@
Package.describe({
name: "nova:base-components",
summary: "Telescope components package",
version: "0.27.3-nova",
version: "0.27.4-nova",
git: "https://github.com/TelescopeJS/Telescope.git"
});
@ -11,10 +11,10 @@ Package.onUse(function (api) {
api.use([
// Nova packages
'nova:core@0.27.3-nova',
'nova:posts@0.27.3-nova',
'nova:users@0.27.3-nova',
'nova:comments@0.27.3-nova',
'nova:core@0.27.4-nova',
'nova:posts@0.27.4-nova',
'nova:users@0.27.4-nova',
'nova:comments@0.27.4-nova',
// third-party packages
'fortawesome:fontawesome@4.5.0',

View file

@ -1,7 +1,7 @@
Package.describe({
name: "nova:base-containers",
summary: "Telescope containers package",
version: "0.27.3-nova",
version: "0.27.4-nova",
git: "https://github.com/TelescopeJS/Telescope.git"
});
@ -11,11 +11,11 @@ Package.onUse(function (api) {
api.use([
// Nova packages
'nova:core@0.27.3-nova',
'nova:posts@0.27.3-nova',
'nova:users@0.27.3-nova',
'nova:comments@0.27.3-nova',
'nova:categories@0.27.3-nova',
'nova:core@0.27.4-nova',
'nova:posts@0.27.4-nova',
'nova:users@0.27.4-nova',
'nova:comments@0.27.4-nova',
'nova:categories@0.27.4-nova',
]);
api.mainModule("lib/server.js", "server");

View file

@ -22,12 +22,13 @@ Meteor.startup(() => {
Telescope.routes.indexRoute = { name: "posts.list", component: Telescope.components.PostsHome };
Telescope.routes.add([
{name:"posts.daily", path:"daily", component:Telescope.components.PostsDaily},
{name:"posts.single", path:"posts/:_id(/:slug)", component:Telescope.components.PostsSingle},
{name:"users.single", path:"users/:slug", component:Telescope.components.UsersSingle},
{name:"users.account", path:"account", component:Telescope.components.UsersAccount},
{name:"users.edit", path:"users/:slug/edit", component:Telescope.components.UsersAccount},
{name:"app.notfound", path:"*", component:Telescope.components.Error404},
{name:"posts.daily", path:"daily", component:Telescope.components.PostsDaily},
{name:"posts.single", path:"posts/:_id(/:slug)", component:Telescope.components.PostsSingle},
{name:"users.single", path:"users/:slug", component:Telescope.components.UsersSingle},
{name:"users.account", path:"account", component:Telescope.components.UsersAccount},
{name:"resetPassword", path:"reset-password/:token", component:Telescope.components.UsersResetPassword},
{name:"users.edit", path:"users/:slug/edit", component:Telescope.components.UsersAccount},
{name:"app.notfound", path:"*", component:Telescope.components.Error404},
]);
const AppRoutes = {

View file

@ -1,7 +1,7 @@
Package.describe({
name: "nova:base-routes",
summary: "Nova routes package",
version: "0.27.3-nova",
version: "0.27.4-nova",
git: "https://github.com/TelescopeJS/Telescope.git"
});
@ -13,10 +13,10 @@ Package.onUse(function (api) {
// Nova packages
'nova:core@0.27.3-nova',
'nova:posts@0.27.3-nova',
'nova:users@0.27.3-nova',
'nova:comments@0.27.3-nova',
'nova:core@0.27.4-nova',
'nova:posts@0.27.4-nova',
'nova:users@0.27.4-nova',
'nova:comments@0.27.4-nova',
// third-party packages

View file

@ -29,4 +29,8 @@
}
}
}
}
.password-reset-form{
text-align: center;
}

View file

@ -1,7 +1,7 @@
Package.describe({
name: "nova:base-styles",
summary: "Nova basic styles package",
version: "0.27.3-nova",
version: "0.27.4-nova",
git: "https://github.com/TelescopeJS/Telescope.git"
});
@ -10,8 +10,8 @@ Package.onUse(function (api) {
api.versionsFrom(['METEOR@1.0']);
api.use([
'nova:core@0.27.3-nova',
'fourseven:scss@3.9.0',
'nova:core@0.27.4-nova',
'fourseven:scss',
// 'juliancwirko:postcss@1.0.0-rc.4',
// 'seba:minifiers-autoprefixer@0.0.1',
// 'twbs:bootstrap@=4.0.0-alpha.2'

View file

@ -10,11 +10,11 @@ Categories.helpers({getCollectionName: () => "categories"});
* @param {Object} category
*/
Categories.getParents = function (category) {
var categoriesArray = [];
const categoriesArray = [];
var getParents = function recurse (category) {
var parent;
if (parent = Categories.findOne(category.parentId)) {
const getParents = function recurse (category) {
const parent = Categories.findOne(category.parentId);
if (parent) {
categoriesArray.push(parent);
recurse(parent);
}
@ -57,8 +57,8 @@ Posts.helpers({getCategories: function () {return Posts.getCategories(this);}});
* @param {Object} category
*/
Categories.getUrl = function (category, isAbsolute) {
var isAbsolute = typeof isAbsolute === "undefined" ? false : isAbsolute; // default to false
var prefix = isAbsolute ? Telescope.utils.getSiteUrl().slice(0,-1) : "";
isAbsolute = typeof isAbsolute === "undefined" ? false : isAbsolute; // default to false
const prefix = isAbsolute ? Telescope.utils.getSiteUrl().slice(0,-1) : "";
// return prefix + FlowRouter.path("postsCategory", category);
return `${prefix}/?cat=${category.slug}`;
};

View file

@ -1,7 +1,7 @@
Package.describe({
name: "nova:categories",
summary: "Telescope tags package",
version: "0.27.3-nova",
version: "0.27.4-nova",
git: "https://github.com/TelescopeJS/telescope-tags.git"
});
@ -10,9 +10,9 @@ Package.onUse(function (api) {
api.versionsFrom("METEOR@1.0");
api.use([
'nova:core@0.27.3-nova',
'nova:posts@0.27.3-nova',
'nova:users@0.27.3-nova'
'nova:core@0.27.4-nova',
'nova:posts@0.27.4-nova',
'nova:users@0.27.4-nova'
]);
api.mainModule("lib/server.js", "server");

View file

@ -1,7 +1,7 @@
Package.describe({
name: 'nova:cloudinary',
summary: 'Telescope file upload package.',
version: '0.27.3-nova',
version: '0.27.4-nova',
git: "https://github.com/TelescopeJS/Telescope.git"
});
@ -10,8 +10,8 @@ Package.onUse(function (api) {
api.versionsFrom(['METEOR@1.0']);
api.use([
'nova:posts@0.27.3-nova',
'nova:core@0.27.3-nova'
'nova:posts@0.27.4-nova',
'nova:core@0.27.4-nova'
]);
api.addFiles([

View file

@ -1,7 +1,7 @@
Package.describe({
name: "nova:comments",
summary: "Telescope comments package",
version: "0.27.3-nova",
version: "0.27.4-nova",
git: "https://github.com/TelescopeJS/Telescope.git"
});
@ -10,14 +10,15 @@ Package.onUse(function (api) {
api.versionsFrom(['METEOR@1.0']);
api.use([
'nova:lib@0.27.3-nova',
'nova:posts@0.27.3-nova',
'nova:users@0.27.3-nova'
'nova:lib@0.27.4-nova',
'nova:settings@0.27.4-nova',
'nova:posts@0.27.4-nova',
'nova:users@0.27.4-nova'
]);
api.use([
'nova:notifications@0.27.3-nova',
'nova:email@0.27.3-nova'
'nova:notifications@0.27.4-nova',
'nova:email@0.27.4-nova'
], ['client', 'server'], {weak: true});
api.mainModule("lib/server.js", "server");

View file

@ -10,7 +10,7 @@ import Telescope from 'meteor/nova:lib';
Telescope.utils.getIcon = function (iconName, iconClass) {
var icons = Telescope.utils.icons;
var iconCode = !!icons[iconName] ? icons[iconName] : iconName;
var iconClass = (typeof iconClass === 'string') ? ' '+iconClass : '';
iconClass = (typeof iconClass === 'string') ? ' '+iconClass : '';
return '<i class="icon fa fa-fw fa-' + iconCode + ' icon-' + iconName + iconClass+ '" aria-hidden="true"></i>';
};
@ -40,7 +40,6 @@ Telescope.utils.icons = {
time: "clock-o",
best: "star",
search: "search",
edit: "pencil",
approve: "check-circle-o",
reject: "times-circle-o",
views: "eye",

View file

@ -1,7 +1,7 @@
Package.describe({
name: "nova:core",
summary: "Telescope core package",
version: "0.27.3-nova",
version: "0.27.4-nova",
git: "https://github.com/TelescopeJS/Telescope.git"
});
@ -10,12 +10,12 @@ Package.onUse(function(api) {
api.versionsFrom("METEOR@1.0");
api.use([
'nova:lib@0.27.3-nova',
'nova:events@0.27.3-nova'
'nova:lib@0.27.4-nova',
'nova:events@0.27.4-nova'
]);
api.imply([
'nova:lib@0.27.3-nova'
'nova:lib@0.27.4-nova'
]);
api.mainModule("lib/server.js", "server");

View file

@ -1,7 +1,7 @@
Package.describe({
name: "nova:debug",
summary: "Telescope debug package",
version: "0.27.3-nova",
version: "0.27.4-nova",
git: "https://github.com/TelescopeJS/Telescope.git"
});
@ -11,15 +11,15 @@ Package.onUse(function (api) {
api.use([
'fourseven:scss@3.9.0',
'fourseven:scss',
// Nova packages
'nova:core@0.27.3-nova',
'nova:posts@0.27.3-nova',
'nova:users@0.27.3-nova',
'nova:email@0.27.3-nova',
'nova:comments@0.27.3-nova'
'nova:core@0.27.4-nova',
'nova:posts@0.27.4-nova',
'nova:users@0.27.4-nova',
'nova:email@0.27.4-nova',
'nova:comments@0.27.4-nova'
]);

View file

@ -1,7 +1,7 @@
Package.describe({
name: "nova:demo",
summary: "Telescope components package",
version: "0.27.3-nova",
version: "0.27.4-nova",
git: "https://github.com/TelescopeJS/Telescope.git"
});
@ -13,7 +13,7 @@ Package.onUse(function (api) {
// Nova packages
'nova:core@0.27.3-nova',
'nova:core@0.27.4-nova',
'utilities:react-list-container@0.1.10',
// third-party packages

View file

@ -1,7 +1,7 @@
Package.describe({
name: "nova:email-templates",
summary: "Telescope email templates package",
version: "0.27.3-nova",
version: "0.27.4-nova",
git: "https://github.com/TelescopeJS/Telescope.git"
});
@ -10,11 +10,11 @@ Package.onUse(function (api) {
api.versionsFrom(['METEOR@1.0']);
api.use([
'nova:core@0.27.3-nova',
'nova:posts@0.27.3-nova',
'nova:users@0.27.3-nova',
'nova:comments@0.27.3-nova',
'nova:email@0.27.3-nova'
'nova:core@0.27.4-nova',
'nova:posts@0.27.4-nova',
'nova:users@0.27.4-nova',
'nova:comments@0.27.4-nova',
'nova:email@0.27.4-nova'
]);
api.addFiles([

View file

@ -72,7 +72,7 @@ NovaEmail.send = function(to, subject, html, text){
if (typeof text === 'undefined'){
// Auto-generate text version if it doesn't exist. Has bugs, but should be good enough.
var text = htmlToText.fromString(html, {
text = htmlToText.fromString(html, {
wordwrap: 130
});
}

View file

@ -1,7 +1,7 @@
Package.describe({
name: "nova:email",
summary: "Telescope email package",
version: "0.27.3-nova",
version: "0.27.4-nova",
git: "https://github.com/TelescopeJS/telescope-email.git"
});
@ -10,7 +10,7 @@ Package.onUse(function (api) {
api.versionsFrom(['METEOR@1.0']);
api.use([
'nova:core@0.27.3-nova'
'nova:core@0.27.4-nova'
]);
api.mainModule("lib/server.js", "server");

View file

@ -46,7 +46,6 @@ getEmbedlyData = function (url) {
// the first 13 characters of the Embedly errors are "failed [400] ", so remove them and parse the rest
var errorObject = JSON.parse(error.message.substring(13));
throw new Meteor.Error(errorObject.error_code, errorObject.error_message);
return null;
}
}

View file

@ -1,7 +1,7 @@
Package.describe({
name: "nova:embedly",
summary: "Telescope Embedly module package",
version: "0.27.3-nova",
version: "0.27.4-nova",
git: 'https://github.com/TelescopeJS/telescope-embedly.git'
});
@ -10,10 +10,10 @@ Package.onUse( function(api) {
api.versionsFrom("METEOR@1.0");
api.use([
'nova:core@0.27.3-nova',
'nova:posts@0.27.3-nova',
'nova:users@0.27.3-nova',
'fourseven:scss@3.9.0'
'nova:core@0.27.4-nova',
'nova:posts@0.27.4-nova',
'nova:users@0.27.4-nova',
'fourseven:scss'
]);
api.addFiles([

View file

@ -13,7 +13,8 @@ Events.analyticsRequest = function() {
Events.analyticsInit = function() {
// Google Analytics
if (googleAnalyticsId = Telescope.settings.get("googleAnalyticsId")){
const googleAnalyticsId = Telescope.settings.get("googleAnalyticsId");
if (googleAnalyticsId) {
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),

View file

@ -1,7 +1,7 @@
Package.describe({
name: "nova:events",
summary: "Telescope event tracking package",
version: "0.27.3-nova",
version: "0.27.4-nova",
git: "https://github.com/TelescopeJS/Telescope.git"
});
@ -10,7 +10,7 @@ Package.onUse(function(api) {
api.versionsFrom("METEOR@1.0");
api.use([
'nova:lib@0.27.3-nova'
'nova:lib@0.27.4-nova'
]);
api.mainModule("lib/server.js", "server");

View file

@ -1,7 +1,7 @@
Package.describe({
name: "nova:forms-tags",
summary: "Telescope tag input package",
version: "0.27.3-nova",
version: "0.27.4-nova",
git: 'https://github.com/TelescopeJS/Telescope.git'
});
@ -10,8 +10,8 @@ Package.onUse( function(api) {
api.versionsFrom("METEOR@1.0");
api.use([
'nova:core@0.27.3-nova',
'nova:forms@0.27.3-nova'
'nova:core@0.27.4-nova',
'nova:forms@0.27.4-nova'
]);
api.mainModule("lib/export.js", ["client", "server"]);

View file

@ -43,7 +43,7 @@ class FormComponent extends Component {
// if control is a React component, use it
if (typeof this.props.control === "function") {
return <this.props.control document={document} {...properties} />
return <this.props.control {...properties} document={document} />
} else { // else pick a predefined component

View file

@ -269,8 +269,13 @@ class FormWrapper extends Component{
// add something to prefilled values
addToAutofilledValues(property) {
this.setState({
autofilledValues: {...this.state.autofilledValues, ...property}
this.setState(function(state){
return {
autofilledValues: {
...state.autofilledValues,
...property
}
};
});
}

View file

@ -1,8 +1,11 @@
// add support for nested properties
const deepValue = function(obj, path){
for (var i=0, path=path.split('.'), len=path.length; i<len; i++){
obj = obj[path[i]];
};
const pathArray = path.split('.');
for (var i=0; i < pathArray.length; i++) {
obj = obj[pathArray[i]];
}
return obj;
};

View file

@ -1,7 +1,7 @@
Package.describe({
name: "nova:forms",
summary: "Form containers for React",
version: "0.27.3-nova",
version: "0.27.4-nova",
git: "https://github.com/meteor-utilities/react-form-containers.git"
});
@ -14,7 +14,7 @@ Package.onUse(function(api) {
'check',
'aldeed:simple-schema@1.5.3',
'aldeed:collection2@2.8.0',
'fourseven:scss@3.9.0'
'fourseven:scss'
]);
api.addFiles([

View file

@ -1,7 +1,7 @@
Package.describe({
name: "nova:getting-started",
summary: "Getting started posts",
version: '0.27.3-nova',
version: '0.27.4-nova',
git: "https://github.com/TelescopeJS/telescope-getting-started.git"
});
@ -14,10 +14,10 @@ Package.onUse(function (api) {
api.versionsFrom(['METEOR@1.0']);
api.use([
'nova:core@0.27.3-nova',
'nova:posts@0.27.3-nova',
'nova:comments@0.27.3-nova',
'nova:users@0.27.3-nova'
'nova:core@0.27.4-nova',
'nova:posts@0.27.4-nova',
'nova:comments@0.27.4-nova',
'nova:users@0.27.4-nova'
]);
// both

View file

@ -18,6 +18,9 @@ Telescope.strings.en = {
"posts.status": "Status",
"posts.sticky": "Sticky",
"posts.load_more": "Load More",
"posts.load_more_days": "Load More Days",
"posts.no_more": "No more posts.",
"posts.no_results": "No posts to display.",
"posts.search": "Search",
"posts.view": "View",
"posts.top": "Top",

View file

@ -1,7 +1,7 @@
Package.describe({
name: "nova:i18n-en-us",
summary: "Telescope i18n package (en_US)",
version: "0.27.3-nova",
version: "0.27.4-nova",
git: "https://github.com/TelescopeJS/Telescope.git"
});
@ -10,7 +10,7 @@ Package.onUse(function (api) {
api.versionsFrom("METEOR@1.0");
api.use([
'nova:core@0.27.3-nova'
'nova:core@0.27.4-nova'
]);
api.addFiles([

View file

@ -0,0 +1,25 @@
# Change Log
### v2.0.1-nova-patch
We use this patch to avoid data injection failure during server-side rendering on Meteor 1.4.
All the credits for this package goes to Arunoda, Kadira's team & @rigconfig.
See https://github.com/meteor/meteor/issues/7992
### v2.0.0
2016-Feb-19
* Override individual res objects instead of overriding the prototype. This is a fix to support Meteor 1.3, which gave us the gzipped version of the html.
* Because of that we had to change the API a bit on the server. See:
- `res.pushData('key', {data: 'here'})` => `InjectData.pushData(res, 'key', {data: 'here'})`
- `res.getData('key')` => `InjectData.getData(res, 'key')`
### v1.4.1
* Use `EJSON.parse()`. See: [#4](https://github.com/meteorhacks/inject-data/pull/4)
### v1.4.0
* Add support for SSR by prepending the html on top of the first script tag
### v1.3.0
* Add IE8 Compatibility

View file

@ -0,0 +1,22 @@
(The MIT License)
Copyright (c) 2015 MeteorHacks (PVT) Ltd - Sri Lanka. <hello@meteorhacks.com>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View file

@ -0,0 +1,36 @@
> All the credits for this package goes to Arunoda, Kadira's team & @rigconfig. See [https://github.com/meteor/meteor/issues/7992](https://github.com/meteor/meteor/issues/7992).
# meteorhacks:inject-data
#### A way to inject data to the client with initial HTML
This is the package used by [`fast-render`](https://github.com/meteorhacks/fast-render) to push data to the client with the initial HTML.
## Installation
meteor add meteorhacks:inject-data
## Push Data
We need to use this package with a server side router. We've extended nodejs `http.OutgoingMessage` and provides an API like this.
Here is an example with [picker](https://github.com/meteorhacks/picker).
```js
Picker.route("/", function(params, req, res, next) {
var ejsonData = {aa: 10};
InjectData.pushData(res, "some-key", ejsonData);
// make sure to move the routing forward.
next();
});
```
## Get Data
You can get data with the following API from the **client**.
```js
InjectData.getData("some-key", function(data) {
console.log(data);
});
```

View file

@ -0,0 +1,11 @@
Meteor.startup(function() {
var dom = $('script[type="text/inject-data"]', document);
var injectedDataString = $.trim(dom.text());
InjectData._data = InjectData._decode(injectedDataString) || {};
});
InjectData.getData = function(key, callback) {
Meteor.startup(function() {
callback(InjectData._data[key]);
});
};

View file

@ -0,0 +1 @@
<script type="text/inject-data"><%= data %></script>

View file

@ -0,0 +1 @@
InjectData = {};

View file

@ -0,0 +1,64 @@
var http = Npm.require('http');
var templateText = Assets.getText('lib/inject.html');
var injectDataTemplate = _.template(templateText);
// custome API
InjectData.pushData = function pushData(res, key, value) {
if(!res._injectPayload) {
res._injectPayload = {};
}
res._injectPayload[key] = value;
InjectData._hijackWriteIfNeeded(res);
};
InjectData.getData = function getData(res, key) {
if(res._injectPayload) {
return _.clone(res._injectPayload[key]);
} else {
return null;
}
};
InjectData._hijackWriteIfNeeded = function(res) {
// if(res._writeHijacked) {
// return;
// }
// res._writeHijacked = true;
var originalWrite = res.write;
res.write = function(chunk, encoding) {
var condition =
res._injectPayload && !res._injected &&
encoding === undefined &&
/<!DOCTYPE html>/.test(chunk);
if(condition) {
// if cors headers included if may cause some security holes
// so we simply turn off injecting if we detect an cors header
// read more: http://goo.gl/eGwb4e
if(res._headers['access-control-allow-origin']) {
var warnMessage =
'warn: injecting data turned off due to CORS headers. ' +
'read more: http://goo.gl/eGwb4e';
console.warn(warnMessage);
originalWrite.call(res, chunk, encoding);
return;
}
// inject data
var data = InjectData._encode(res._injectPayload);
var injectHtml = injectDataTemplate({data: data});
// if this is a buffer, convert it to string
chunk = chunk.toString();
chunk = chunk.replace('<script', injectHtml + '<script');
res._injected = true;
}
originalWrite.call(res, chunk, encoding);
};
};

View file

@ -0,0 +1,11 @@
InjectData._encode = function(ejson) {
var ejsonString = EJSON.stringify(ejson);
return encodeURIComponent(ejsonString);
};
InjectData._decode = function(encodedEjson) {
var decodedEjsonString = decodeURIComponent(encodedEjson);
if(!decodedEjsonString) return null;
return EJSON.parse(decodedEjsonString);
};

View file

@ -0,0 +1,42 @@
var fs = Npm.require('fs');
var path = Npm.require('path');
// We use this patch to avoid data injection failure during server-side rendering on Meteor 1.4
// All the credits for this package goes to Arunoda, Kadira's team & @rigconfig
// see https://github.com/meteor/meteor/issues/7992
Package.describe({
"summary": "A way to inject data to the client with initial HTML",
"version": "2.0.1-nova-patch",
"git": "https://github.com/meteorhacks/inject-data",
"name": "meteorhacks:inject-data"
});
Package.onUse(function(api) {
configure(api);
api.export('InjectData', ['client', 'server']);
});
function configure (api) {
api.versionsFrom('METEOR@0.9.3');
api.use(['ejson', 'underscore'], ['server', 'client']);
api.use('jquery', 'client');
api.addFiles([
'lib/inject.html',
], 'server', {isAsset: true});
api.addFiles([
'lib/namespace.js',
'lib/utils.js',
], ['client', 'server']);
api.addFiles([
'lib/server.js'
], 'server');
api.addFiles([
'lib/client.js'
], 'client');
}

View file

@ -1,7 +1,7 @@
Package.describe({
name: "nova:kadira",
summary: "Telescope Kadira package",
version: "0.27.3-nova",
version: "0.27.4-nova",
git: "https://github.com/TelescopeJS/Telescope.git"
});
@ -10,7 +10,7 @@ Package.onUse(function (api) {
api.versionsFrom(['METEOR@1.0']);
api.use([
'nova:core@0.27.3-nova',
'nova:core@0.27.4-nova',
'meteorhacks:kadira@2.30.0',
'kadira:debug@3.2.2',
'meteorhacks:kadira-profiler@1.2.1'

View file

@ -5,7 +5,7 @@
Telescope = {};
Telescope.VERSION = '0.27.3-nova';
Telescope.VERSION = '0.27.4-nova';
// ------------------------------------- Config -------------------------------- //

View file

@ -27,7 +27,7 @@ _.mixin({
// Get deep value
} else {
while ((obj = obj[keys[i++]]) !== null && i < n) {};
//while ((obj = obj[keys[i++]]) !== null && i < n) {};
value = i < n ? void 0 : obj;
}

View file

@ -47,7 +47,6 @@ Telescope.utils.deepExtend = function () {
return false;
}
var key;
for (key in obj) {}
return key === undefined || hasOwn.call(obj, key);
}
};

View file

@ -147,9 +147,12 @@ Telescope.utils.slugify = function (s) {
Telescope.utils.getUnusedSlug = function (collection, slug) {
let suffix = "";
let index = 0;
// handle edge case for Users collection
const field = collection._name === 'users' ? '__slug' : 'slug';
// test if slug is already in use
while (!!collection.findOne({slug: slug+suffix})) {
while (!!collection.findOne({[field]: slug+suffix})) {
index++;
suffix = "-"+index;
}

View file

@ -1,7 +1,7 @@
Package.describe({
name: 'nova:lib',
summary: 'Telescope libraries.',
version: '0.27.3-nova',
version: '0.27.4-nova',
git: "https://github.com/TelescopeJS/Telescope.git"
});
@ -13,18 +13,18 @@ Package.onUse(function (api) {
// Meteor packages
'meteor-base@1.0.4',
'meteor-base',
'mongo',
'tracker',
'service-configuration',
'standard-minifiers@1.0.6',
'modules@0.5.2',
'standard-minifiers',
'modules',
'accounts-base',
'check',
'http',
'email',
'tracker',
'ecmascript@0.4.2',
'ecmascript',
'react-meteor-data@0.2.8',
'service-configuration',
'shell-server',
@ -39,7 +39,7 @@ Package.onUse(function (api) {
'percolatestudio:synced-cron@1.1.0',
'jparker:gravatar@0.4.1',
// 'kadira:flow-router-ssr@3.13.0',
"reactrouter:react-router-ssr@3.1.3",
"reactrouter:react-router-ssr@3.1.5",
// 'kadira:flow-router@2.12.1',
'utilities:smart-methods@0.1.4',
'meteorhacks:inject-initial@1.0.4',

View file

@ -1,7 +1,7 @@
Package.describe({
name: "nova:newsletter",
summary: "Telescope email newsletter package",
version: "0.27.3-nova",
version: "0.27.4-nova",
git: "https://github.com/TelescopeJS/telescope-newsletter.git"
});
@ -10,12 +10,12 @@ Package.onUse(function (api) {
api.versionsFrom("METEOR@1.0");
api.use([
'nova:core@0.27.3-nova',
'nova:posts@0.27.3-nova',
'nova:comments@0.27.3-nova',
'nova:users@0.27.3-nova',
'nova:categories@0.27.3-nova',
'nova:email@0.27.3-nova'
'nova:core@0.27.4-nova',
'nova:posts@0.27.4-nova',
'nova:comments@0.27.4-nova',
'nova:users@0.27.4-nova',
'nova:categories@0.27.4-nova',
'nova:email@0.27.4-nova'
]);
api.mainModule('lib/server.js', 'server');

View file

@ -1,7 +1,7 @@
Package.describe({
name: "nova:notifications",
summary: "Telescope notifications package",
version: "0.27.3-nova",
version: "0.27.4-nova",
git: "https://github.com/TelescopeJS/telescope-notifications.git"
});
@ -10,9 +10,9 @@ Package.onUse(function (api) {
api.versionsFrom("METEOR@1.0");
api.use([
'nova:core@0.27.3-nova',
'nova:email@0.27.3-nova',
'nova:users@0.27.3-nova'
'nova:core@0.27.4-nova',
'nova:email@0.27.4-nova',
'nova:users@0.27.4-nova'
]);
api.addFiles([

View file

@ -1,7 +1,7 @@
Package.describe({
name: "nova:posts",
summary: "Telescope posts package",
version: "0.27.3-nova",
version: "0.27.4-nova",
git: "https://github.com/TelescopeJS/telescope-posts.git"
});
@ -10,14 +10,14 @@ Package.onUse(function (api) {
api.versionsFrom(['METEOR@1.0']);
api.use([
'nova:core@0.27.3-nova',
'nova:users@0.27.3-nova',
'nova:core@0.27.4-nova',
'nova:users@0.27.4-nova',
'utilities:react-list-container@0.1.10'
]);
api.use([
'nova:notifications@0.27.3-nova',
'nova:email@0.27.3-nova'
'nova:notifications@0.27.4-nova',
'nova:email@0.27.4-nova'
], ['client', 'server'], {weak: true});
api.mainModule("lib/server.js", "server");

View file

@ -1,7 +1,7 @@
Package.describe({
name: "nova:rss",
summary: "Telescope RSS package",
version: "0.27.3-nova",
version: "0.27.4-nova",
git: "https://github.com/TelescopeJS/telescope-rss.git"
});
@ -9,7 +9,7 @@ Npm.depends({rss: "1.1.1"});
Package.onUse(function (api) {
api.use(['nova:core@0.27.3-nova']);
api.use(['nova:core@0.27.4-nova']);
api.addFiles(['lib/headtags.js'], ['client', 'server']);

View file

@ -6,7 +6,7 @@ function addSearchQueryParameter (parameters, terms) {
const query = escapeStringRegexp(terms.query);
var parameters = Telescope.utils.deepExtend(true, parameters, {
parameters = Telescope.utils.deepExtend(true, parameters, {
selector: {
$or: [
{title: {$regex: query, $options: 'i'}},

View file

@ -1,7 +1,7 @@
Package.describe({
name: "nova:search",
summary: "Telescope search package",
version: "0.27.3-nova",
version: "0.27.4-nova",
git: "https://github.com/TelescopeJS/telescope-pages.git"
});
@ -9,7 +9,7 @@ Package.onUse(function (api) {
api.versionsFrom("METEOR@1.0");
api.use(['nova:core@0.27.3-nova']);
api.use(['nova:core@0.27.4-nova']);
api.addFiles([
'lib/parameters.js',

View file

@ -18,7 +18,7 @@ import Users from 'meteor/nova:users';
// return Telescope.settings.collection.find({}, options);
// });
Telescope.settings.collection.smartPublish('settings');
// Telescope.settings.collection.smartPublish('settings');
Meteor.publish('settings.admin', function() {
if (Users.isAdminById(this.userId)) {

View file

@ -1,7 +1,7 @@
Package.describe({
name: "nova:settings",
summary: "Telescope settings package only necessary if you're storing settings in a collection",
version: "0.27.3-nova",
version: "0.27.4-nova",
git: "https://github.com/TelescopeJS/Telescope.git"
});
@ -10,8 +10,8 @@ Package.onUse(function(api) {
api.versionsFrom(['METEOR@1.0']);
api.use([
'nova:lib@0.27.3-nova',
'nova:users@0.27.3-nova'
'nova:lib@0.27.4-nova',
'nova:users@0.27.4-nova'
]);
api.addFiles([

View file

@ -1,7 +1,7 @@
Package.describe({
name: "nova:subscribe",
summary: "Subscribe to posts, users, etc. to be notified of new activity",
version: "0.27.3-nova",
version: "0.27.4-nova",
git: "https://github.com/TelescopeJS/telescope-subscribe-to-posts.git"
});
@ -11,8 +11,8 @@ Package.onUse(function (api) {
api.versionsFrom("METEOR@1.0");
api.use([
'nova:core@0.27.3-nova',
'nova:users@0.27.3-nova', // this dep is needed to check users permissions
'nova:core@0.27.4-nova',
'nova:users@0.27.4-nova', // this dep is needed to check users permissions
// dependencies on posts, categories are done with nested imports to reduce explicit dependencies
]);

View file

@ -97,8 +97,11 @@ Meteor.methods({
},
'users.remove'(userId, options) {
// do the user which to delete his account or another user?
const actionType = this.userId === userId ? "own" : "all";
if (Users.canDo(Meteor.user(), "users.remove.all")) {
if (Users.canDo(Meteor.user(), `users.remove.${actionType}`)) {
const user = Users.findOne(userId);

View file

@ -2,5 +2,6 @@ import Users from './modules.js';
import './server/create_user.js';
import './server/publications.js';
import './server/urls.js';
export default Users;

View file

@ -12,6 +12,6 @@ function novaCreateUserCallbacks (options, user) {
}
return user;
};
}
Accounts.onCreateUser(novaCreateUserCallbacks);

View file

@ -0,0 +1 @@
Accounts.urls.resetPassword = (token) => Meteor.absoluteUrl(`reset-password/${token}`);

View file

@ -1,7 +1,7 @@
Package.describe({
name: 'nova:users',
summary: 'Telescope permissions.',
version: '0.27.3-nova',
version: '0.27.4-nova',
git: "https://github.com/TelescopeJS/Telescope.git"
});
@ -10,8 +10,8 @@ Package.onUse(function (api) {
api.versionsFrom(['METEOR@1.0']);
api.use([
'nova:core@0.27.3-nova',
'nova:email@0.27.3-nova'
'nova:core@0.27.4-nova',
'nova:email@0.27.4-nova'
]);
api.mainModule("lib/server.js", "server");

View file

@ -1,7 +1,7 @@
Package.describe({
name: "nova:voting",
summary: "Telescope scoring package.",
version: "0.27.3-nova",
version: "0.27.4-nova",
git: "https://github.com/TelescopeJS/Telescope.git"
});
@ -9,11 +9,11 @@ Package.onUse(function (api) {
api.versionsFrom("METEOR@1.0");
api.use(['nova:core@0.27.3-nova']);
api.use(['nova:core@0.27.4-nova']);
api.use([
'nova:posts@0.27.3-nova',
'nova:comments@0.27.3-nova'
'nova:posts@0.27.4-nova',
'nova:comments@0.27.4-nova'
], ['client', 'server']);
api.mainModule("lib/server.js", "server");