diff --git a/.meteor/packages b/.meteor/packages index 873909a22..d72127e8c 100644 --- a/.meteor/packages +++ b/.meteor/packages @@ -26,7 +26,6 @@ nova:users # user management and permissions # nova:api # nova:rss # nova:subscribe -# nova:cloudinary ############ Customizable Packages ############ diff --git a/packages/nova-inject-data/CHANGELOG.md b/packages/_inject-data/CHANGELOG.md similarity index 100% rename from packages/nova-inject-data/CHANGELOG.md rename to packages/_inject-data/CHANGELOG.md diff --git a/packages/nova-inject-data/LICENSE b/packages/_inject-data/LICENSE similarity index 100% rename from packages/nova-inject-data/LICENSE rename to packages/_inject-data/LICENSE diff --git a/packages/nova-inject-data/README.md b/packages/_inject-data/README.md similarity index 100% rename from packages/nova-inject-data/README.md rename to packages/_inject-data/README.md diff --git a/packages/nova-inject-data/lib/client.js b/packages/_inject-data/lib/client.js similarity index 100% rename from packages/nova-inject-data/lib/client.js rename to packages/_inject-data/lib/client.js diff --git a/packages/nova-inject-data/lib/inject.html b/packages/_inject-data/lib/inject.html similarity index 100% rename from packages/nova-inject-data/lib/inject.html rename to packages/_inject-data/lib/inject.html diff --git a/packages/nova-inject-data/lib/namespace.js b/packages/_inject-data/lib/namespace.js similarity index 100% rename from packages/nova-inject-data/lib/namespace.js rename to packages/_inject-data/lib/namespace.js diff --git a/packages/nova-inject-data/lib/server.js b/packages/_inject-data/lib/server.js similarity index 100% rename from packages/nova-inject-data/lib/server.js rename to packages/_inject-data/lib/server.js diff --git a/packages/nova-inject-data/lib/utils.js b/packages/_inject-data/lib/utils.js similarity index 100% rename from packages/nova-inject-data/lib/utils.js rename to packages/_inject-data/lib/utils.js diff --git a/packages/nova-inject-data/package.js b/packages/_inject-data/package.js similarity index 100% rename from packages/nova-inject-data/package.js rename to packages/_inject-data/package.js diff --git a/packages/_nova-invites/.gitignore b/packages/_nova-invites/.gitignore deleted file mode 100644 index 677a6fc26..000000000 --- a/packages/_nova-invites/.gitignore +++ /dev/null @@ -1 +0,0 @@ -.build* diff --git a/packages/_nova-invites/.versions b/packages/_nova-invites/.versions deleted file mode 100644 index f99c301e1..000000000 --- a/packages/_nova-invites/.versions +++ /dev/null @@ -1,58 +0,0 @@ -aldeed:autoform@5.1.2 -aldeed:simple-schema@1.3.2 -base64@1.0.3 -binary-heap@1.0.3 -blaze@2.1.2 -blaze-tools@1.0.3 -boilerplate-generator@1.0.3 -callback-hook@1.0.3 -cfs:http-methods@0.0.28 -check@1.0.5 -coffeescript@1.0.6 -ddp@1.1.0 -deps@1.0.7 -ejson@1.0.6 -geojson-utils@1.0.3 -html-tools@1.0.4 -htmljs@1.0.4 -id-map@1.0.3 -iron:controller@1.0.7 -iron:core@1.0.7 -iron:dynamic-template@1.0.7 -iron:layout@1.0.7 -iron:location@1.0.7 -iron:middleware-stack@1.0.7 -iron:router@1.0.7 -iron:url@1.0.7 -jquery@1.11.3_2 -json@1.0.3 -livedata@1.0.13 -logging@1.0.7 -meteor@1.1.6 -minifiers@1.1.5 -minimongo@1.0.8 -momentjs:moment@2.8.4 -mongo@1.1.0 -observe-sequence@1.0.6 -ordered-dict@1.0.3 -random@1.0.3 -reactive-dict@1.1.0 -reactive-var@1.0.5 -retry@1.0.3 -routepolicy@1.0.5 -session@1.1.0 -spacebars@1.0.6 -spacebars-compiler@1.0.6 -tap:i18n@1.4.1 -nova:i18n@0.1.0 -nova:invites@0.1.0 -nova:lib@0.3.1 -nova:messages@0.1.0 -nova:settings@0.1.0 -nova:users@0.1.0 -templating@1.1.1 -tracker@1.0.7 -ui@1.0.6 -underscore@1.0.3 -webapp@1.2.0 -webapp-hashing@1.0.3 diff --git a/packages/_nova-invites/README.md b/packages/_nova-invites/README.md deleted file mode 100644 index 5fe8a880e..000000000 --- a/packages/_nova-invites/README.md +++ /dev/null @@ -1 +0,0 @@ -Telescope invites package, used internally. \ No newline at end of file diff --git a/packages/_nova-invites/i18n/ar.i18n.json b/packages/_nova-invites/i18n/ar.i18n.json deleted file mode 100644 index 7a73a41bf..000000000 --- a/packages/_nova-invites/i18n/ar.i18n.json +++ /dev/null @@ -1,2 +0,0 @@ -{ -} \ No newline at end of file diff --git a/packages/_nova-invites/i18n/bg.i18n.json b/packages/_nova-invites/i18n/bg.i18n.json deleted file mode 100644 index 7a73a41bf..000000000 --- a/packages/_nova-invites/i18n/bg.i18n.json +++ /dev/null @@ -1,2 +0,0 @@ -{ -} \ No newline at end of file diff --git a/packages/_nova-invites/i18n/cs.i18n.json b/packages/_nova-invites/i18n/cs.i18n.json deleted file mode 100644 index bc31ea17c..000000000 --- a/packages/_nova-invites/i18n/cs.i18n.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "translation_key" : "Proměnná překladu" -} \ No newline at end of file diff --git a/packages/_nova-invites/i18n/da.i18n.json b/packages/_nova-invites/i18n/da.i18n.json deleted file mode 100644 index 7a73a41bf..000000000 --- a/packages/_nova-invites/i18n/da.i18n.json +++ /dev/null @@ -1,2 +0,0 @@ -{ -} \ No newline at end of file diff --git a/packages/_nova-invites/i18n/de.i18n.json b/packages/_nova-invites/i18n/de.i18n.json deleted file mode 100644 index 7cbdbb522..000000000 --- a/packages/_nova-invites/i18n/de.i18n.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "translation_key" : "translation string" -} \ No newline at end of file diff --git a/packages/_nova-invites/i18n/el.i18n.json b/packages/_nova-invites/i18n/el.i18n.json deleted file mode 100644 index 7a73a41bf..000000000 --- a/packages/_nova-invites/i18n/el.i18n.json +++ /dev/null @@ -1,2 +0,0 @@ -{ -} \ No newline at end of file diff --git a/packages/_nova-invites/i18n/en.i18n.json b/packages/_nova-invites/i18n/en.i18n.json deleted file mode 100644 index 7cbdbb522..000000000 --- a/packages/_nova-invites/i18n/en.i18n.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "translation_key" : "translation string" -} \ No newline at end of file diff --git a/packages/_nova-invites/i18n/es.i18n.json b/packages/_nova-invites/i18n/es.i18n.json deleted file mode 100644 index 7a73a41bf..000000000 --- a/packages/_nova-invites/i18n/es.i18n.json +++ /dev/null @@ -1,2 +0,0 @@ -{ -} \ No newline at end of file diff --git a/packages/_nova-invites/i18n/et.i18n.json b/packages/_nova-invites/i18n/et.i18n.json deleted file mode 100644 index 2774ae2e7..000000000 --- a/packages/_nova-invites/i18n/et.i18n.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "translation_key" : "tõlkimise string" -} \ No newline at end of file diff --git a/packages/_nova-invites/i18n/fa.i18n.json b/packages/_nova-invites/i18n/fa.i18n.json deleted file mode 100644 index 705ca66de..000000000 --- a/packages/_nova-invites/i18n/fa.i18n.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "translation_key" : "رشته ترجمه" -} \ No newline at end of file diff --git a/packages/_nova-invites/i18n/fr.i18n.json b/packages/_nova-invites/i18n/fr.i18n.json deleted file mode 100644 index e9251fe55..000000000 --- a/packages/_nova-invites/i18n/fr.i18n.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "translation_key" : "traduire une chaîne de caractères" -} \ No newline at end of file diff --git a/packages/_nova-invites/i18n/hu.i18n.json b/packages/_nova-invites/i18n/hu.i18n.json deleted file mode 100644 index 7a73a41bf..000000000 --- a/packages/_nova-invites/i18n/hu.i18n.json +++ /dev/null @@ -1,2 +0,0 @@ -{ -} \ No newline at end of file diff --git a/packages/_nova-invites/i18n/id.i18n.json b/packages/_nova-invites/i18n/id.i18n.json deleted file mode 100644 index 7cbdbb522..000000000 --- a/packages/_nova-invites/i18n/id.i18n.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "translation_key" : "translation string" -} \ No newline at end of file diff --git a/packages/_nova-invites/i18n/it.i18n.json b/packages/_nova-invites/i18n/it.i18n.json deleted file mode 100644 index 7cbdbb522..000000000 --- a/packages/_nova-invites/i18n/it.i18n.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "translation_key" : "translation string" -} \ No newline at end of file diff --git a/packages/_nova-invites/i18n/ja.i18n.json b/packages/_nova-invites/i18n/ja.i18n.json deleted file mode 100644 index 7a73a41bf..000000000 --- a/packages/_nova-invites/i18n/ja.i18n.json +++ /dev/null @@ -1,2 +0,0 @@ -{ -} \ No newline at end of file diff --git a/packages/_nova-invites/i18n/kk.i18n.json b/packages/_nova-invites/i18n/kk.i18n.json deleted file mode 100644 index 523562681..000000000 --- a/packages/_nova-invites/i18n/kk.i18n.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "translation_key" : "аударма текст" -} \ No newline at end of file diff --git a/packages/_nova-invites/i18n/ko.i18n.json b/packages/_nova-invites/i18n/ko.i18n.json deleted file mode 100644 index 9453ce997..000000000 --- a/packages/_nova-invites/i18n/ko.i18n.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "translation_key" : "번역 문자열" -} \ No newline at end of file diff --git a/packages/_nova-invites/i18n/lv-LV.i18n.json b/packages/_nova-invites/i18n/lv-LV.i18n.json deleted file mode 100644 index 7a73a41bf..000000000 --- a/packages/_nova-invites/i18n/lv-LV.i18n.json +++ /dev/null @@ -1,2 +0,0 @@ -{ -} \ No newline at end of file diff --git a/packages/_nova-invites/i18n/lv.i18n.json b/packages/_nova-invites/i18n/lv.i18n.json deleted file mode 100644 index 7a73a41bf..000000000 --- a/packages/_nova-invites/i18n/lv.i18n.json +++ /dev/null @@ -1,2 +0,0 @@ -{ -} \ No newline at end of file diff --git a/packages/_nova-invites/i18n/nl.i18n.json b/packages/_nova-invites/i18n/nl.i18n.json deleted file mode 100644 index 7a73a41bf..000000000 --- a/packages/_nova-invites/i18n/nl.i18n.json +++ /dev/null @@ -1,2 +0,0 @@ -{ -} \ No newline at end of file diff --git a/packages/_nova-invites/i18n/pl.i18n.json b/packages/_nova-invites/i18n/pl.i18n.json deleted file mode 100644 index 7cbdbb522..000000000 --- a/packages/_nova-invites/i18n/pl.i18n.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "translation_key" : "translation string" -} \ No newline at end of file diff --git a/packages/_nova-invites/i18n/pt-BR.i18n.json b/packages/_nova-invites/i18n/pt-BR.i18n.json deleted file mode 100644 index de4ac4374..000000000 --- a/packages/_nova-invites/i18n/pt-BR.i18n.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "translation_key" : "chave de tradução" -} \ No newline at end of file diff --git a/packages/_nova-invites/i18n/ro.i18n.json b/packages/_nova-invites/i18n/ro.i18n.json deleted file mode 100644 index 7a73a41bf..000000000 --- a/packages/_nova-invites/i18n/ro.i18n.json +++ /dev/null @@ -1,2 +0,0 @@ -{ -} \ No newline at end of file diff --git a/packages/_nova-invites/i18n/ru.i18n.json b/packages/_nova-invites/i18n/ru.i18n.json deleted file mode 100644 index 7a73a41bf..000000000 --- a/packages/_nova-invites/i18n/ru.i18n.json +++ /dev/null @@ -1,2 +0,0 @@ -{ -} \ No newline at end of file diff --git a/packages/_nova-invites/i18n/se.i18n.json b/packages/_nova-invites/i18n/se.i18n.json deleted file mode 100644 index 7a73a41bf..000000000 --- a/packages/_nova-invites/i18n/se.i18n.json +++ /dev/null @@ -1,2 +0,0 @@ -{ -} \ No newline at end of file diff --git a/packages/_nova-invites/i18n/sl.i18n.json b/packages/_nova-invites/i18n/sl.i18n.json deleted file mode 100644 index 27b68137b..000000000 --- a/packages/_nova-invites/i18n/sl.i18n.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "translation_key" : "preveden niz" -} \ No newline at end of file diff --git a/packages/_nova-invites/i18n/sv.i18n.json b/packages/_nova-invites/i18n/sv.i18n.json deleted file mode 100644 index db0a7ba68..000000000 --- a/packages/_nova-invites/i18n/sv.i18n.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "translation_key" : "översättningstext" -} \ No newline at end of file diff --git a/packages/_nova-invites/i18n/th.i18n.json b/packages/_nova-invites/i18n/th.i18n.json deleted file mode 100644 index 7a73a41bf..000000000 --- a/packages/_nova-invites/i18n/th.i18n.json +++ /dev/null @@ -1,2 +0,0 @@ -{ -} \ No newline at end of file diff --git a/packages/_nova-invites/i18n/tr-TR.i18n.json b/packages/_nova-invites/i18n/tr-TR.i18n.json deleted file mode 100644 index 7a73a41bf..000000000 --- a/packages/_nova-invites/i18n/tr-TR.i18n.json +++ /dev/null @@ -1,2 +0,0 @@ -{ -} \ No newline at end of file diff --git a/packages/_nova-invites/i18n/tr.i18n.json b/packages/_nova-invites/i18n/tr.i18n.json deleted file mode 100644 index 6b861c162..000000000 --- a/packages/_nova-invites/i18n/tr.i18n.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "translation_key" : "çeviri dizgisi" -} \ No newline at end of file diff --git a/packages/_nova-invites/i18n/vi.i18n.json b/packages/_nova-invites/i18n/vi.i18n.json deleted file mode 100644 index 7a73a41bf..000000000 --- a/packages/_nova-invites/i18n/vi.i18n.json +++ /dev/null @@ -1,2 +0,0 @@ -{ -} \ No newline at end of file diff --git a/packages/_nova-invites/i18n/zh-CN.i18n.json b/packages/_nova-invites/i18n/zh-CN.i18n.json deleted file mode 100644 index 7cbdbb522..000000000 --- a/packages/_nova-invites/i18n/zh-CN.i18n.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "translation_key" : "translation string" -} \ No newline at end of file diff --git a/packages/_nova-invites/lib/client/templates/user_invites.html b/packages/_nova-invites/lib/client/templates/user_invites.html deleted file mode 100644 index 30fffceaf..000000000 --- a/packages/_nova-invites/lib/client/templates/user_invites.html +++ /dev/null @@ -1,41 +0,0 @@ - \ No newline at end of file diff --git a/packages/_nova-invites/lib/client/templates/user_invites.js b/packages/_nova-invites/lib/client/templates/user_invites.js deleted file mode 100644 index f695662ef..000000000 --- a/packages/_nova-invites/lib/client/templates/user_invites.js +++ /dev/null @@ -1,62 +0,0 @@ -Template.user_invites.created = function () { - - var user = this.data; - var instance = this; - - instance.invites = new ReactiveVar({}); - - Meteor.autorun(function () { - Telescope.subsManager.subscribe('invites', user._id); - var invites = Invites.find({invitingUserId: user._id}); - instance.invites.set(invites); - }); -}; - -Template.user_invites.helpers({ - canCurrentUserInvite: function () { - var currentUser = Meteor.user(); - return currentUser && (Users.isAdmin(currentUser) || currentUser.telescope.inviteCount > 0 && Users.can.invite(currentUser)); - }, - invitesLeft: function () { - var currentUser = Meteor.user(); - return (currentUser && !(Users.isAdmin(currentUser))) ? (currentUser.telescope.inviteCount - currentUser.telescope.invitedCount) : 0 - }, - invitesSchema: function () { - // expose schema for Invites (used by AutoForm) - return Invites.simpleSchema(); - }, - invites: function () { - return Template.instance().invites.get(); - } -}); - -var scrollUp = function(){ - Deps.afterFlush(function() { - var element = $('.grid > .error'); - $('html, body').animate({scrollTop: element.offset().top}); - }); -}; - -AutoForm.hooks({ - inviteForm: { - onSuccess: function(operation, result) { - Messages.clearSeen(); - - if(result && result.newUser){ - Messages.flash('An invite has been sent out. Thank you!', "success"); - } else { - Messages.flash('Thank you!', "info"); - } - scrollUp(); - }, - - onError: function(operation, error) { - Messages.clearSeen(); - - if(error && error.reason){ - Messages.flash(error.reason, "error"); - scrollUp(); - } - } - } -}); diff --git a/packages/_nova-invites/lib/invites.js b/packages/_nova-invites/lib/invites.js deleted file mode 100644 index 0d100dba9..000000000 --- a/packages/_nova-invites/lib/invites.js +++ /dev/null @@ -1,130 +0,0 @@ -var InviteSchema = new SimpleSchema({ - _id: { - type: String, - optional: true - }, - invitingUserId: { - type: String, - optional: true - }, - invitedUserEmail: { - type: String, - regEx: SimpleSchema.RegEx.Email - }, - accepted: { - type: Boolean, - optional: true - } -}); - -Invites = new Meteor.Collection("invites"); -Invites.attachSchema(InviteSchema); - -Users.addField([ - /** - A count of the user's remaining invites - */ - { - fieldName: "telescope.inviteCount", - fieldSchema: { - type: Number, - optional: true - } - }, - /** - A count of how many users have been invited by the user - */ - { - fieldName: "telescope.invitedCount", - fieldSchema: { - type: Number, - optional: true - } - }, - /** - Whether the user is invited or not - */ - { - fieldName: "telescope.isInvited", - fieldSchema: { - type: Boolean, - publish: true, - optional: true, - insertableIf: Users.isAdmin, - editableIf: Users.isAdmin, - autoform: { - omit: true - } - } - }, - /** - The _id of the user who invited the current user - */ - { - fieldName: "telescope.invitedBy", - fieldSchema: { - type: String, - optional: true, - autoform: { - omit: true - } - } - }, - /** - The name of the user who invited the current user - */ - { - fieldName: "telescope.invitedByName", - fieldSchema: { - type: String, - optional: true, - autoform: { - omit: true - } - } - } -]); - -// invites are managed through Meteor method - -Invites.deny({ - insert: function(){ return true; }, - update: function(){ return true; }, - remove: function(){ return true; } -}); - -Telescope.modules.add("profileEdit", { - template: 'user_invites', - order: 2 -}); - - function setStartingInvites (user) { - // give new users a few invites (default to 3) - user.telescope.inviteCount = Settings.get('startInvitesCount', 3); - return user; -} -Telescope.callbacks.add("onCreateUser", setStartingInvites); - -// on profile completion, check if the new user has been invited -// if so set her status accordingly and update invitation info -function checkIfInvited (user) { - - var invite = Invites.findOne({ invitedUserEmail : Users.getEmail(user) }); - - if(invite){ - - var invitedBy = Meteor.users.findOne({ _id : invite.invitingUserId }); - - Users.update(user._id, { $set: { - "telescope.isInvited": true, - "telescope.invitedBy": invitedBy._id, - "telescope.invitedByName": Users.getDisplayName(invitedBy) - }}); - - Invites.update(invite._id, {$set : { - accepted : true - }}); - - } -} -Telescope.callbacks.add("profileCompletedAsync", checkIfInvited); diff --git a/packages/_nova-invites/lib/server/invites.js b/packages/_nova-invites/lib/server/invites.js deleted file mode 100644 index d8743d989..000000000 --- a/packages/_nova-invites/lib/server/invites.js +++ /dev/null @@ -1,89 +0,0 @@ -Meteor.methods({ - - inviteUser: function(invitation){ - - check(invitation, Match.Any); - - // invite user returns the following hash - // { newUser : true|false } - // newUser is true if the person being invited is not on the site yet - - // invitation can either contain userId or an email address : - // { invitedUserEmail : 'bob@gmail.com' } or { userId : 'user-id' } - - check(invitation, Match.OneOf( - { invitedUserEmail : String }, - { userId : String } - )); - - var user = invitation.invitedUserEmail ? - Meteor.users.findOne({ emails : { $elemMatch: { address: invitation.invitedUserEmail } } }) : - Meteor.users.findOne({ _id : invitation.userId }); - - var userEmail = invitation.invitedUserEmail ? invitation.invitedUserEmail :Users.getEmail(user); - var currentUser = Meteor.user(); - var currentUserIsAdmin = Users.isAdmin(currentUser); - var currentUserCanInvite = currentUserIsAdmin || (currentUser.telescope.inviteCount > 0 && Users.can.invite(currentUser)); - - // check if the person is already invited - if(user && Users.is.invited(user)){ - throw new Meteor.Error(403, "This person is already invited."); - } else { - if (!currentUserCanInvite){ - throw new Meteor.Error(701, "You can't invite this user, sorry."); - } - - // don't allow duplicate multiple invite for the same person - var existingInvite = Invites.findOne({ invitedUserEmail : userEmail }); - - if (existingInvite) { - throw new Meteor.Error(403, "Somebody has already invited this person."); - } - - // create an invite - // consider invite accepted if the invited person has an account already - Invites.insert({ - invitingUserId: Meteor.userId(), - invitedUserEmail: userEmail, - accepted: typeof user !== "undefined" - }); - - // update invinting user - Meteor.users.update(Meteor.userId(), {$inc:{"telescope.inviteCount": -1, "telescope.invitedCount": 1}}); - - if(user){ - // update invited user - Meteor.users.update(user._id, { - $set: { - "telescope.isInvited": true, - "telescope.invitedBy": Meteor.userId(), - "telescope.invitedByName": Users.getDisplayName(currentUser) - } - }); - } - - var communityName = Settings.get('title','Telescope'), - emailSubject = 'You are invited to try '+communityName, - emailProperties = { - newUser : typeof user === 'undefined', - communityName : communityName, - actionLink : user ? Telescope.utils.getSigninUrl() : Telescope.utils.getSignupUrl(), - invitedBy : Users.getDisplayName(currentUser), - profileUrl : Users.getProfileUrl(currentUser), - siteUrl: Settings.get("siteUrl") - }; - - Meteor.setTimeout(function () { - NovaEmail.buildAndSend(userEmail, emailSubject, 'emailInvite', emailProperties); - }, 1); - - } - - return { - newUser : typeof user === 'undefined' - }; - }, - unInviteUser: function (userId) { - Meteor.users.update(userId, {$set: {"telescope.isInvited": false}}); - } -}); diff --git a/packages/_nova-invites/lib/server/publications.js b/packages/_nova-invites/lib/server/publications.js deleted file mode 100644 index 22ab03093..000000000 --- a/packages/_nova-invites/lib/server/publications.js +++ /dev/null @@ -1,4 +0,0 @@ -Meteor.publish('invites', function (userId) { - var invites = Invites.find({invitingUserId: userId}); - return (this.userId === userId || Users.isAdminById(this.userId)) ? invites : []; -}); diff --git a/packages/_nova-invites/lib/server/routes.js b/packages/_nova-invites/lib/server/routes.js deleted file mode 100644 index ff8fdf7e3..000000000 --- a/packages/_nova-invites/lib/server/routes.js +++ /dev/null @@ -1,39 +0,0 @@ -import NovaEmail from 'meteor/nova:email'; - -// Invitation email -Picker.route('/email/invite-existing-user/:id?', function(params, req, res, next) { - - var html; - var invitingUser = typeof params.id === "undefined" ? Meteor.users.findOne() : Meteor.users.findOne(params.id); - - var communityName = Settings.get('title','Telescope'), - emailProperties = { - newUser : false, - communityName : communityName, - actionLink : Telescope.utils.getSigninUrl(), - invitedBy : Users.getDisplayName(invitingUser), - profileUrl : Users.getProfileUrl(invitingUser) - }; - - html = NovaEmail.getTemplate('emailInvite')(emailProperties); - res.end(NovaEmail.buildTemplate(html)); -}); - -// Invitation email -Picker.route('/email/invite-new-user/:id?', function(params, req, res, next) { - - var html; - var invitingUser = typeof params.id === "undefined" ? Meteor.users.findOne() : Meteor.users.findOne(params.id); - - var communityName = Settings.get('title','Telescope'), - emailProperties = { - newUser : true, - communityName : communityName, - actionLink : Telescope.utils.getSignupUrl(), - invitedBy : Users.getDisplayName(invitingUser), - profileUrl : Users.getProfileUrl(invitingUser) - }; - - html = NovaEmail.getTemplate('emailInvite')(emailProperties); - res.end(NovaEmail.buildTemplate(html)); -}); \ No newline at end of file diff --git a/packages/_nova-invites/lib/server/templates.js b/packages/_nova-invites/lib/server/templates.js deleted file mode 100644 index 76a82a4f8..000000000 --- a/packages/_nova-invites/lib/server/templates.js +++ /dev/null @@ -1,5 +0,0 @@ -import NovaEmail from 'meteor/nova:email'; - -NovaEmail.addTemplates({ - emailInvite: Assets.getText("lib/server/templates/emailInvite.handlebars") -}); \ No newline at end of file diff --git a/packages/_nova-invites/lib/server/templates/emailInvite.handlebars b/packages/_nova-invites/lib/server/templates/emailInvite.handlebars deleted file mode 100644 index d9e753e13..000000000 --- a/packages/_nova-invites/lib/server/templates/emailInvite.handlebars +++ /dev/null @@ -1,11 +0,0 @@ - - {{invitedBy}} invited you to join {{communityName}} -

- -{{#if newUser}} - Join {{communityName}} -{{else}} - Sign in to {{communityName}} -{{/if}} - -

diff --git a/packages/_nova-invites/package-tap.i18n b/packages/_nova-invites/package-tap.i18n deleted file mode 100644 index a52321d15..000000000 --- a/packages/_nova-invites/package-tap.i18n +++ /dev/null @@ -1,5 +0,0 @@ -{ - "translation_function_name": "__", - "helper_name": "_", - "namespace": "project" -} \ No newline at end of file diff --git a/packages/_nova-invites/package.js b/packages/_nova-invites/package.js deleted file mode 100644 index b5414a194..000000000 --- a/packages/_nova-invites/package.js +++ /dev/null @@ -1,82 +0,0 @@ -Package.describe({ - name: "invites", - summary: "Telescope invites package", - version: "0.27.2-nova", - git: "https://github.com/TelescopeJS/telescope-invites.git" -}); - -Npm.depends({ - // NPM package dependencies -}); - -Package.onUse(function (api) { - - api.versionsFrom("METEOR@1.0"); - - // --------------------------- 1. Meteor packages dependencies --------------------------- - - // automatic (let the package specify where it's needed) - - api.use(['nova:core@0.27.2-nova']); - - // client - - api.use([ - 'jquery', - 'underscore', - 'templating' - ], ['client']); - - // server - - api.use([ - // - ], ['server']); - - // ---------------------------------- 2. Files to include ---------------------------------- - - // i18n config (must come first) - - api.addFiles([ - 'package-tap.i18n' - ], ['client', 'server']); - - // both - - api.addFiles([ - 'lib/invites.js' - ], ['client', 'server']); - - // client - - api.addFiles([ - 'lib/client/templates/user_invites.html', - 'lib/client/templates/user_invites.js' - ], ['client']); - - // server - - api.addAssets([ - 'lib/server/templates/emailInvite.handlebars' - ], ['server']); - - api.addFiles([ - 'lib/server/invites.js', - 'lib/server/publications.js', - 'lib/server/routes.js', - 'lib/server/templates.js' - ], ['server']); - - // i18n languages (must come last) - - var languages = ["ar", "bg", "cs", "da", "de", "el", "en", "es", "et", "fr", "hu", "id", "it", "ja", "kk", "ko", "nl", "pl", "pt-BR", "ro", "ru", "sl", "sv", "th", "tr", "vi", "zh-CN"]; - var languagesPaths = languages.map(function (language) { - return "i18n/"+language+".i18n.json"; - }); - api.addFiles(languagesPaths, ["client", "server"]); - - // -------------------------------- 3. Variables to export -------------------------------- - - api.export("Invites"); - -}); diff --git a/packages/_nova-invites/versions.json b/packages/_nova-invites/versions.json deleted file mode 100644 index 44ee51b7d..000000000 --- a/packages/_nova-invites/versions.json +++ /dev/null @@ -1,235 +0,0 @@ -{ - "dependencies": [ - [ - "aldeed:autoform", - "4.2.0" - ], - [ - "aldeed:simple-schema", - "1.2.0" - ], - [ - "application-configuration", - "1.0.3" - ], - [ - "base64", - "1.0.1" - ], - [ - "binary-heap", - "1.0.1" - ], - [ - "blaze", - "2.0.3" - ], - [ - "blaze-tools", - "1.0.1" - ], - [ - "boilerplate-generator", - "1.0.1" - ], - [ - "callback-hook", - "1.0.1" - ], - [ - "check", - "1.0.2" - ], - [ - "coffeescript", - "1.0.4" - ], - [ - "ddp", - "1.0.12" - ], - [ - "deps", - "1.0.5" - ], - [ - "ejson", - "1.0.4" - ], - [ - "follower-livedata", - "1.0.2" - ], - [ - "geojson-utils", - "1.0.1" - ], - [ - "html-tools", - "1.0.2" - ], - [ - "htmljs", - "1.0.2" - ], - [ - "id-map", - "1.0.1" - ], - [ - "iron:controller", - "1.0.3" - ], - [ - "iron:core", - "1.0.4" - ], - [ - "iron:dynamic-template", - "1.0.5" - ], - [ - "iron:layout", - "1.0.5" - ], - [ - "iron:location", - "1.0.4" - ], - [ - "iron:middleware-stack", - "1.0.3" - ], - [ - "iron:router", - "1.0.3" - ], - [ - "iron:url", - "1.0.4" - ], - [ - "jquery", - "1.0.1" - ], - [ - "json", - "1.0.1" - ], - [ - "livedata", - "1.0.11" - ], - [ - "logging", - "1.0.5" - ], - [ - "meteor", - "1.1.3" - ], - [ - "minifiers", - "1.1.2" - ], - [ - "minimongo", - "1.0.5" - ], - [ - "mongo", - "1.0.9" - ], - [ - "mrt:moment", - "2.8.1" - ], - [ - "observe-sequence", - "1.0.3" - ], - [ - "ordered-dict", - "1.0.1" - ], - [ - "random", - "1.0.1" - ], - [ - "reactive-dict", - "1.0.4" - ], - [ - "reactive-var", - "1.0.3" - ], - [ - "retry", - "1.0.1" - ], - [ - "routepolicy", - "1.0.2" - ], - [ - "session", - "1.0.4" - ], - [ - "spacebars", - "1.0.3" - ], - [ - "spacebars-compiler", - "1.0.3" - ], - [ - "tap:http-methods", - "0.0.23" - ], - [ - "tap:i18n", - "1.2.1" - ], - [ - "telescope-base", - "0.0.0" - ], - [ - "nova:i18n", - "0.0.0" - ], - [ - "telescope-lib", - "0.2.9" - ], - [ - "templating", - "1.0.9" - ], - [ - "tracker", - "1.0.3" - ], - [ - "ui", - "1.0.4" - ], - [ - "underscore", - "1.0.1" - ], - [ - "webapp", - "1.1.4" - ], - [ - "webapp-hashing", - "1.0.1" - ] - ], - "pluginDependencies": [], - "toolVersion": "meteor-tool@1.0.36", - "format": "1.0" -} \ No newline at end of file diff --git a/packages/_nova-migrations/README.md b/packages/_nova-migrations/README.md deleted file mode 100644 index aa24ea2d5..000000000 --- a/packages/_nova-migrations/README.md +++ /dev/null @@ -1 +0,0 @@ -Telescope migrations package, used internally. \ No newline at end of file diff --git a/packages/_nova-migrations/lib/server/migrations.js b/packages/_nova-migrations/lib/server/migrations.js deleted file mode 100644 index 357e3b5af..000000000 --- a/packages/_nova-migrations/lib/server/migrations.js +++ /dev/null @@ -1,740 +0,0 @@ -import marked from 'marked'; -import Posts from "meteor/nova:posts"; -import Comments from "meteor/nova:comments"; -import Categories from "meteor/nova:categories"; -import Events from "meteor/nova:events"; -import Users from "meteor/nova:users"; - -// TODO: switch over to Tom's migration package. - -// database migrations -// http://stackoverflow.com/questions/10365496/meteor-how-to-perform-database-migrations -Migrations = new Meteor.Collection('migrations'); - -Meteor.startup(function () { - allMigrations = Object.keys(migrationsList); - _.each(allMigrations, function(migrationName){ - runMigration(migrationName); - }); -}); - -Meteor.methods({ - removeMigration: function (name) { - check(name, String); - if (Users.isAdmin(Meteor.user())) { - console.log('// removing migration: ' + name); - Migrations.remove({name: name}); - } - } -}); - -// wrapper function for all migrations -var runMigration = function (migrationName) { - var migration = Migrations.findOne({name: migrationName}); - - if (migration){ - if(typeof migration.finishedAt === 'undefined'){ - // if migration exists but hasn't finished, remove it and start fresh - console.log('!!! Found incomplete migration "'+migrationName+'", removing and running again.'); - Migrations.remove({name: migrationName}); - }else{ - // do nothing - // console.log('Migration "'+migrationName+'" already exists, doing nothing.') - return; - } - } - - console.log("//----------------------------------------------------------------------//"); - console.log("//------------// Starting "+migrationName+" Migration //-----------//"); - console.log("//----------------------------------------------------------------------//"); - Migrations.insert({name: migrationName, startedAt: new Date(), completed: false}); - - // execute migration function - var itemsAffected = migrationsList[migrationName]() || 0; - - Migrations.update({name: migrationName}, {$set: {finishedAt: new Date(), completed: true, itemsAffected: itemsAffected}}); - console.log("//----------------------------------------------------------------------//"); - console.log("//------------// Ending "+migrationName+" Migration //-----------//"); - console.log("//----------------------------------------------------------------------//"); -}; - -var migrationsList = { - updatePostStatus: function () { - var i = 0; - Posts.find({status: {$exists : false}}).forEach(function (post) { - i++; - Posts.update(post._id, {$set: {status: 2}}); - console.log("---------------------"); - console.log("Post: "+post.title); - console.log("Updating status to approved"); - }); - return i; - }, - updateCategories: function () { - if (typeof Categories === "undefined" || Categories === null) return; - var i = 0; - Categories.find({slug: {$exists : false}}).forEach(function (category) { - i++; - var slug = Telescope.utils.slugify(category.name); - Categories.update(category._id, {$set: {slug: slug}}); - console.log("---------------------"); - console.log("Category: "+category.name); - console.log("Updating category with new slug: "+slug); - }); - return i; - }, - updatePostCategories: function () { - if (typeof Categories === "undefined" || Categories === null) return; - var i = 0; - Posts.find().forEach(function (post) { - i++; - var oldCategories = post.categories; - var newCategories = []; - var category = {}; - var updating = false; // by default, assume we're not going to do anything - - // iterate over the post.categories array - // if the post has no categories then nothing will happen - _.each(oldCategories, function(value){ - // make sure the categories are strings - if((typeof value === "string") && (category = Categories.findOne({name: value}))){ - // if value is a string, then look for the matching category object - // and if it exists push it to the newCategories array - updating = true; // we're updating at least one category for this post - newCategories.push(category); - }else{ - // if category A) is already an object, or B) it's a string but a matching category object doesn't exist - // just keep the current value - newCategories.push(value); - } - }); - - if(updating){ - // update categories property on post - Posts.update(post._id, {$set: {categories: newCategories}}); - } - - // START CONSOLE LOGS - console.log("---------------------"); - console.log("Post: "+post.title); - if(updating){ - console.log(oldCategories.length+" categories: "+oldCategories); - console.log("Updating categories array to: "); - console.log(newCategories); - }else{ - console.log("No updates"); - } - // END CONSOLE LOGS - }); - return i; - }, - updateUserProfiles: function () { - var i = 0; - var allUsers = Meteor.users.find(); - console.log('> Found '+allUsers.count()+' users.\n'); - - allUsers.forEach(function(user){ - i++; - console.log('> Updating user '+user._id+' ('+user.username+')'); - - var properties = {}; - properties.telescope = {}; - // update user slug - if(Users.getUserName(user)) - properties.slug = Telescope.utils.slugify(Users.getUserName(user)); - - // update user isAdmin flag - if(typeof user.isAdmin === 'undefined') - properties.isAdmin = false; - - // update postCount - var postsByUser = Posts.find({userId: user._id}); - properties.telescope.postCount = postsByUser.count(); - - // update commentCount - var commentsByUser = Comments.find({userId: user._id}); - properties.telescope.commentCount = commentsByUser.count(); - - Meteor.users.update(user._id, {$set:properties}); - - }); - return i; - }, - resetUpvotesDownvotes: function () { - var i = 0; - Posts.find().forEach(function (post) { - i++; - var upvotes = 0, - downvotes = 0; - console.log("Post: "+post.title); - if(post.upvoters){ - upvotes = post.upvoters.length; - console.log("Found "+upvotes+" upvotes."); - } - if(post.downvoters){ - downvotes = post.downvoters.length; - console.log("Found "+downvotes+" downvotes."); - } - Posts.update(post._id, {$set: {upvotes: upvotes, downvotes: downvotes}}); - console.log("---------------------"); - }); - return i; - }, - resetCommentsUpvotesDownvotes: function () { - var i = 0; - Comments.find().forEach(function (comment) { - i++; - var upvotes = 0, - downvotes = 0; - console.log("Comment: "+comment._id); - if(comment.upvoters){ - upvotes = comment.upvoters.length; - console.log("Found "+upvotes+" upvotes."); - } - if(comment.downvoters){ - downvotes = comment.downvoters.length; - console.log("Found "+downvotes+" downvotes."); - } - Comments.update(comment._id, {$set: {upvotes: upvotes, downvotes: downvotes}}); - console.log("---------------------"); - }); - return i; - }, - headlineToTitle: function () { - var i = 0; - Posts.find({title: {$exists : false}}).forEach(function (post) { - i++; - console.log("Post: "+post.headline+" "+post.title); - Posts.update(post._id, { $rename: { 'headline': 'title'}}, {multi: true, validate: false}); - console.log("---------------------"); - }); - return i; - }, - commentsSubmittedToCreatedAt: function () { - var i = 0; - Comments.find({createdAt: {$exists: false}}).forEach(function (comment) { - i++; - console.log("Comment: "+comment._id); - Comments.update(comment._id, { $rename: { 'submitted': 'createdAt'}}, {multi: true, validate: false}); - console.log("---------------------"); - }); - return i; - }, - commentsPostToPostId: function () { - var i = 0; - Comments.find({postId: {$exists : false}}).forEach(function (comment) { - i++; - console.log("Comment: "+comment._id); - Comments.update(comment._id, { $rename: { 'post': 'postId'}}, {multi: true, validate: false}); - console.log("---------------------"); - }); - return i; - }, - createdAtSubmittedToDate: function () { - var i = 0; - Posts.find().forEach(function (post) { - if(typeof post.submitted === "number" || typeof post.createdAt === "number"){ - i++; - console.log("Posts: "+post.title); - var createdAt = new Date(post.createdAt); - var submitted = new Date(post.submitted); - console.log(createdAt); - Posts.update(post._id, { $set: { 'createdAt': createdAt, submitted: submitted}}, {multi: true, validate: false}); - console.log("---------------------"); - } - }); - return i; - }, - commentsCreatedAtToDate: function () { - var i = 0; - Comments.find().forEach(function (comment) { - if(typeof comment.createdAt === "number"){ - i++; - console.log("Comment: "+comment._id); - var createdAt = new Date(comment.createdAt); - console.log(createdAt); - Comments.update(comment._id, { $set: { 'createdAt': createdAt}}, {multi: true, validate: false}); - console.log("---------------------"); - } - }); - return i; - }, - submittedToPostedAt: function () { - var i = 0; - Posts.find({submitted: {$exists : true}, postedAt: {$exists : false}}).forEach(function (post) { - i++; - console.log("Post: "+post._id); - Posts.update(post._id, { $rename: { 'submitted': 'postedAt'}}, {multi: true, validate: false}); - console.log("---------------------"); - }); - return i; - }, - addPostedAtToComments: function () { - var i = 0; - Comments.find({postedAt: {$exists : false}}).forEach(function (comment) { - i++; - console.log("Comment: "+comment._id); - Comments.update(comment._id, { $set: { 'postedAt': comment.createdAt}}, {multi: true, validate: false}); - console.log("---------------------"); - }); - return i; - }, - parentToParentCommentId: function () { - var i = 0; - Comments.find({parent: {$exists: true}, parentCommentId: {$exists : false}}).forEach(function (comment) { - i++; - console.log("Comment: "+comment._id); - Comments.update(comment._id, { $set: { 'parentCommentId': comment.parent}}, {multi: true, validate: false}); - console.log("---------------------"); - }); - return i; - }, - addLastCommentedAt: function () { - var i = 0; - Posts.find({$and: [ - {$or: [{comments: {$gt: 0}}, {commentCount: {$gt: 0}}]}, - {lastCommentedAt: {$exists : false}} - ]}).forEach(function (post) { - i++; - console.log("Post: "+post._id); - var postComments = Comments.find({$or: [{postId: post._id}, {post: post._id}]}, {sort: {postedAt: -1}}).fetch(); - var lastComment; - if (_.isEmpty(postComments)) { - console.log('postComments from post '+post._id+' is empty. Skipping.'); - return; - } - lastComment = postComments[0]; - Posts.update(post._id, { $set: { lastCommentedAt: lastComment.postedAt}}, {multi: false, validate: false}); - console.log("---------------------"); - }); - return i; - }, - commentsToCommentCount: function () { - var i = 0; - Posts.find({comments: {$exists : true}, commentCount: {$exists : false}}).forEach(function (post) { - i++; - console.log("Post: "+post._id); - Posts.update(post._id, { $set: { 'commentCount': post.comments}, $unset: { 'comments': ''}}, {multi: true, validate: false}); - console.log("---------------------"); - }); - return i; - }, - addCommentersToPosts: function () { - var i = 0; - Comments.find().forEach(function (comment) { - i++; - console.log("Comment: "+comment._id); - console.log("Post: "+comment.postId); - Posts.update(comment.postId, { $addToSet: { 'commenters': comment.userId}}, {multi: true, validate: false}); - console.log("---------------------"); - }); - return i; - }, - moveVotesFromProfile: function () { - var i = 0; - Meteor.users.find().forEach(function (user) { - i++; - console.log("User: "+user._id); - Meteor.users.update(user._id, { - $rename: { - 'profile.upvotedPosts': 'telescope.upvotedPosts', - 'profile.downvotedPosts': 'telescope.downvotedPosts', - 'profile.upvotedComments': 'telescope.upvotedComments', - 'profile.downvotedComments': 'telescope.downvotedComments' - } - }, {multi: true, validate: false}); - console.log("---------------------"); - }); - return i; - }, - addHTMLBody: function () { - var i = 0; - Posts.find({body: {$exists : true}}).forEach(function (post) { - i++; - var htmlBody = Telescope.utils.sanitize(marked(post.body)); - console.log("Post: "+post._id); - Posts.update(post._id, { $set: { 'htmlBody': htmlBody}}, {multi: true, validate: false}); - console.log("---------------------"); - }); - return i; - }, - addHTMLComment: function () { - var i = 0; - Comments.find({body: {$exists : true}}).forEach(function (comment) { - i++; - var htmlBody = Telescope.utils.sanitize(marked(comment.body)); - console.log("Comment: "+comment._id); - Comments.update(comment._id, { $set: { 'htmlBody': htmlBody}}, {multi: true, validate: false}); - console.log("---------------------"); - }); - return i; - }, - clicksToClickCount: function () { - var i = 0; - Posts.find({"clicks": {$exists: true}, "clickCount": {$exists : false}}).forEach(function (post) { - i++; - console.log("Post: " + post._id); - Posts.update(post._id, { $set: { 'clickCount': post.clicks}, $unset: { 'clicks': ''}}, {multi: true, validate: false}); - console.log("---------------------"); - }); - return i; - }, - commentsCountToCommentCount: function () { - var i = 0; - Posts.find({"commentCount": {$exists : false}}).forEach(function (post) { - i++; - console.log("Post: " + post._id); - Posts.update({_id: post._id}, { $set: { 'commentCount': post.commentsCount}, $unset: {'commentsCount': ""}}, {multi: true, validate: false}); - console.log("---------------------"); - }); - return i; - }, - userDataCommentsCountToCommentCount: function(){ - var i = 0; - Meteor.users.find({'commentCount': {$exists: false}}).forEach(function(user){ - i++; - var commentCount = Comments.find({userId: user._id}).count(); - console.log("User: " + user._id); - Meteor.users.update(user._id, {$set: { telescope : {'commentCount': commentCount}}}); - console.log("---------------------"); - }); - return i; - }, - clicksToClickCountForRealThisTime: function () { // since both fields might be co-existing, add to clickCount instead of overwriting it - var i = 0; - Posts.find({'clicks': {$exists: true}}).forEach(function (post) { - i++; - console.log("Post: " + post._id); - Posts.update(post._id, { $inc: { 'clickCount': post.clicks}, $unset: {'clicks': ""}}, {multi: true, validate: false}); - console.log("---------------------"); - }); - return i; - }, - normalizeCategories: function () { - var i = 0; - Posts.find({'categories': {$exists: true}}).forEach(function (post) { - i++; - console.log("Post: " + post._id); - var justCategoryIds = post.categories.map(function (category){ - return category._id; - }); - Posts.update(post._id, {$set: {categories: justCategoryIds, oldCategories: post.categories}}, {multi: true, validate: false}); - console.log("---------------------"); - }); - return i; - }, - cleanUpStickyProperty: function () { - var i = 0; - Posts.find({'sticky': {$exists: false}}).forEach(function (post) { - i++; - console.log("Post: " + post._id); - Posts.update(post._id, {$set: {sticky: false}}, {multi: true, validate: false}); - console.log("---------------------"); - }); - return i; - }, - show0112ReleaseNotes: function () { - var i = 0; - // if this is the 0.11.2 update, the first run event will not exist yet. - // if that's the case, make sure to still show release notes - if (!Events.findOne({name: 'firstRun'})) { - Releases.update({number:'0.11.2'}, {$set: {read:false}}); - } - return i; - }, - removeThumbnailHTTP: function () { - var i = 0; - Posts.find({thumbnailUrl: {$exists : true}}).forEach(function (post) { - i++; - var newThumbnailUrl = post.thumbnailUrl.replace("http:", ""); - console.log("Post: "+post._id); - Posts.update(post._id, { $set: { 'thumbnailUrl': newThumbnailUrl}}, {multi: true, validate: false}); - console.log("---------------------"); - }); - return i; - }, - updateUserNames: function () { - var i = 0; - var allUsers = Meteor.users.find({username: {$exists: true}, profile: {$exists: true}, 'profile.isDummy': {$ne: true}}); - - console.log('> Found '+allUsers.count()+' users.\n'); - - allUsers.forEach(function(user){ - i++; - - // Perform the same transforms done by useraccounts with `lowercaseUsernames` set to `true` - var oldUsername = user.username; - var username = user.username; - username = username.trim().replace(/\s+/gm, ' '); - user.profile.username = user.profile.name || username; - delete user.profile.name; - username = username.toLowerCase().replace(/\s+/gm, ''); - user.username = username; - - if (user.emails && user.emails.length > 0) { - _.each(user.emails, function(email){ - email.address = email.address.toLowerCase().replace(/\s+/gm, ''); - }); - } - - console.log('> Updating user '+user._id+' ('+oldUsername+' -> ' + user.username + ')'); - - try { - Meteor.users.update(user._id, { - $set: { - emails: user.emails, - profile: user.profile, - username: user.username, - }, - }); - } - catch (err) { - console.warn('> Unable to convert username ' + user.username + ' to lowercase!'); - console.warn('> Please try to fix it by hand!! :('); - } - }); - return i; - }, - changeColorNames: function () { - var i = 0; - var settings = Telescope.settings.collection.findOne(); - var set = {}; - - if (!!settings) { - - if (!!settings.buttonColor) - set.accentColor = settings.buttonColor; - - if (!!settings.buttonTextColor) - set.accentContrastColor = settings.buttonTextColor; - - if (!!settings.buttonColor) - set.secondaryColor = settings.headerColor; - - if (!!settings.buttonColor) - set.secondaryContrastColor = settings.headerTextColor; - - if (!_.isEmpty(set)) { - Telescope.settings.collection.update(settings._id, {$set: set}, {validate: false}); - } - - } - return i; - }, - migrateUserProfiles: function () { - var i = 0; - var allUsers = Meteor.users.find({telescope: {$exists: false}}); - console.log('> Found '+allUsers.count()+' users.\n'); - - allUsers.forEach(function(user){ - i++; - - console.log('> Updating user '+user._id+' (' + user.username + ')'); - - var telescopeUserData = {}; - - // loop over user data schema - _.each(Telescope.schemas.userData._schema, function (property, key) { - - if (!!user[key]) { // look for property on root of user object - telescopeUserData[key] = user[key]; - } else if (user.votes && !!user.votes[key]) { // look for it in user.votes object - telescopeUserData[key] = user.votes[key]; - } else if (user.profile && user.profile[key]) { // look for it in user.profile object - telescopeUserData[key] = user.profile[key]; - } - - }); - - // console.log(telescopeUserData); - - try { - Meteor.users.update(user._id, { - $set: { - telescope: telescopeUserData - } - }); - } catch (err) { - console.log(err); - console.warn('> Unable to migrate profile for user ' + user.username); - } - }); - return i; - }, - migrateEmailHash: function () { - var i = 0; - var allUsers = Meteor.users.find({$and: [{"email_hash": {$exists: true}}, {"telescope.emailHash": {$exists: false}}]}); - console.log('> Found '+allUsers.count()+' users.\n'); - - allUsers.forEach(function(user){ - i++; - - console.log('> Updating user '+user._id+' (' + user.username + ')'); - - var emailHash = user.email_hash; - if (!!emailHash) { - Meteor.users.update(user._id, {$set: {"telescope.emailHash": emailHash}}); - } - }); - return i; - }, - // addTopLevelCommentIdToComments: function() { - // var i = 0; - - // // find all root comments and set topLevelCommentId on their root children - // Comments.find({parentCommentId: {$exists : false}}).forEach(function (comment) { - - // // topLevelCommentId is the root comment._id - // var topLevelCommentId = comment._id; - // console.log("Root Comment found: " + topLevelCommentId); - - // // find childComments that have this root comment as parentCommentId - // Comments.find({parentCommentId: comment._id}).forEach(function (childComment) { - // i++; - // updateParentAndChild(topLevelCommentId, childComment._id); - // }); - - // }); - - // function updateParentAndChild(topLevelCommentId, parentId) { - - // i++; - // console.log("Parent Comment: " + parentId, " top level comment " + topLevelCommentId); - - // Comments.update(parentId, {$set: {'topLevelCommentId': topLevelCommentId}}, {multi: false, validate: false}); - - // var childComments = Comments.find({topLevelCommentId: {$exists : false}, parentCommentId: parentId}); - - // console.log('> Found '+childComments.count()+' child comments.\n'); - - // childComments.forEach(function(childComment){ - // i++; - - // // find all nested childComments and set topLevelCommentId - // console.log("Child Comment: " + childComment._id, " top level comment " + topLevelCommentId); - - // // set nested childComment to use parent's topLevelCommentId - // Comments.update(childComment._id, {$set: {'topLevelCommentId': topLevelCommentId}}, {multi: false, validate: false}); - // updateParentAndChild(topLevelCommentId, childComment._id, true); - // }); - - // } - // console.log("---------------------"); - // return i; - // }, - migrateDisplayName: function () { - var i = 0; - var displayName; - var allUsers = Meteor.users.find({"telescope.displayName": {$exists: false}}); - console.log('> Found '+allUsers.count()+' users.\n'); - - allUsers.forEach(function(user){ - i++; - - console.log('> Updating user '+user._id+' (' + user.username + ')'); - if (!!user.profile) { - displayName = user.profile.name || user.profile.username; - } else { - displayName = user.username; - } - - console.log('name: ', displayName); - if (!!displayName) { - Meteor.users.update(user._id, {$set: {"telescope.displayName": displayName}}); - } else { - console.log("displayName not found :("); - } - }); - return i; - }, - migrateNewsletterSettings: function () { - var i = 0; - var allUsers = Meteor.users.find({ - $or: [ - {"profile.showBanner": {$exists: true}}, - {"profile.subscribedToNewsletter": {$exists: true}} - ] - }); - console.log('> Found '+allUsers.count()+' users.\n'); - - allUsers.forEach(function(user){ - i++; - var displayName; - - if (!!user.profile) { - displayName = user.profile.name || user.profile.username; - } else { - displayName = user.username; - } - - console.log('> Updating user '+user._id+' (' + displayName + ')'); - - if (user.profile) { - - var set = {}; - - var showBanner = user.profile.showBanner; - if (typeof showBanner !== "undefined") { - set["telescope.newsletter.showBanner"] = showBanner; - } - - var subscribeToNewsletter = user.profile.subscribedToNewsletter; - if (typeof subscribeToNewsletter !== "undefined") { - set["telescope.newsletter.subscribeToNewsletter"] = subscribeToNewsletter; - } - console.log(set) - if (!_.isEmpty(set)) { - Meteor.users.update(user._id, {$set: set}); - } - - } - - }); - return i; - }, - addSlugsToPosts: function () { - var i = 0; - Posts.find({slug: {$exists : false}}).forEach(function (post) { - i++; - var slug = Telescope.utils.slugify(post.title); - console.log("Post: "+post._id + " | "+slug); - Posts.update(post._id, { $set: { 'slug': slug}}); - console.log("---------------------"); - }); - return i; - }, - updateNewsletterFrequency: function () { - var i = 0; - Telescope.settings.collection.find().forEach(function (setting) { - if (!!setting.newsletterFrequency) { - console.log("Migrating newsletter frequency… ("+setting.newsletterFrequency+")"); - i++; - var days; - switch (setting.newsletterFrequency) { - case 1: - days = [1,2,3,4,5,6,7]; - break; - case 2: - days = [2,4,6]; - break; - case 3: - days = [2,5]; - break; - default: - days = [2]; - break; - } - Telescope.settings.collection.update(setting._id, { $set: { newsletterFrequency: days } }); - } - }); - return i; - }, - changeOutsideLinksPointTo: function () { - var i = 0; - Telescope.settings.collection.find({outsideLinksPointTo: {$exists : true}}).forEach(function (setting) { - i++; - Telescope.settings.collection.update(setting._id, {$set: {RSSLinksPointTo: setting.outsideLinksPointTo}}); - }); - return i; - } -}; diff --git a/packages/_nova-migrations/package.js b/packages/_nova-migrations/package.js deleted file mode 100644 index d6c1d5b53..000000000 --- a/packages/_nova-migrations/package.js +++ /dev/null @@ -1,21 +0,0 @@ -Package.describe({ - name: "migrations", - summary: "Telescope migrations package", - version: "0.27.2-nova", - git: "https://github.com/TelescopeJS/Telescope.git" -}); - -Package.onUse(function(api) { - - api.versionsFrom("METEOR@1.0"); - - api.use(['nova:core@0.27.2-nova']); - - api.addFiles([ - 'lib/server/migrations.js' - ], ['server']); - - api.export([ - 'Migrations' - ]); -}); diff --git a/packages/_react-router-ssr/.npm/package/.gitignore b/packages/_react-router-ssr/.npm/package/.gitignore new file mode 100644 index 000000000..3c3629e64 --- /dev/null +++ b/packages/_react-router-ssr/.npm/package/.gitignore @@ -0,0 +1 @@ +node_modules diff --git a/packages/_react-router-ssr/.npm/package/README b/packages/_react-router-ssr/.npm/package/README new file mode 100644 index 000000000..3d492553a --- /dev/null +++ b/packages/_react-router-ssr/.npm/package/README @@ -0,0 +1,7 @@ +This directory and the files immediately inside it are automatically generated +when you change this package's NPM dependencies. Commit the files in this +directory (npm-shrinkwrap.json, .gitignore, and this README) to source control +so that others run the same versions of sub-dependencies. + +You should NOT check in the node_modules directory that Meteor automatically +creates; if you are using git, the .gitignore file tells git to ignore it. diff --git a/packages/_react-router-ssr/.npm/package/npm-shrinkwrap.json b/packages/_react-router-ssr/.npm/package/npm-shrinkwrap.json new file mode 100644 index 000000000..4ca90a5bc --- /dev/null +++ b/packages/_react-router-ssr/.npm/package/npm-shrinkwrap.json @@ -0,0 +1,579 @@ +{ + "dependencies": { + "abab": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/abab/-/abab-1.0.3.tgz", + "from": "abab@>=1.0.0 <2.0.0" + }, + "acorn": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-2.7.0.tgz", + "from": "acorn@>=2.4.0 <3.0.0" + }, + "acorn-globals": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-1.0.9.tgz", + "from": "acorn-globals@>=1.0.4 <2.0.0" + }, + "amdefine": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", + "from": "amdefine@>=0.0.4" + }, + "ansi-regex": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.0.0.tgz", + "from": "ansi-regex@>=2.0.0 <3.0.0" + }, + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "from": "ansi-styles@>=2.2.1 <3.0.0" + }, + "asn1": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz", + "from": "asn1@>=0.2.3 <0.3.0" + }, + "assert-plus": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz", + "from": "assert-plus@>=0.2.0 <0.3.0" + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "from": "asynckit@>=0.4.0 <0.5.0" + }, + "aws-sign2": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz", + "from": "aws-sign2@>=0.6.0 <0.7.0" + }, + "aws4": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.5.0.tgz", + "from": "aws4@>=1.2.1 <2.0.0" + }, + "bcrypt-pbkdf": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.0.tgz", + "from": "bcrypt-pbkdf@>=1.0.0 <2.0.0" + }, + "boolbase": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", + "from": "boolbase@>=1.0.0 <1.1.0" + }, + "boom": { + "version": "2.10.1", + "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz", + "from": "boom@>=2.0.0 <3.0.0" + }, + "caseless": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.11.0.tgz", + "from": "caseless@>=0.11.0 <0.12.0" + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "from": "chalk@>=1.1.1 <2.0.0" + }, + "cheerio": { + "version": "0.20.0", + "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-0.20.0.tgz", + "from": "cheerio@0.20.0" + }, + "combined-stream": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz", + "from": "combined-stream@>=1.0.5 <1.1.0" + }, + "commander": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.9.0.tgz", + "from": "commander@>=2.9.0 <3.0.0" + }, + "cookie": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.2.3.tgz", + "from": "cookie@0.2.3" + }, + "cookie-parser": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/cookie-parser/-/cookie-parser-1.4.1.tgz", + "from": "cookie-parser@1.4.1" + }, + "cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "from": "cookie-signature@1.0.6" + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "from": "core-util-is@>=1.0.0 <1.1.0" + }, + "cryptiles": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz", + "from": "cryptiles@>=2.0.0 <3.0.0" + }, + "css-select": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-1.2.0.tgz", + "from": "css-select@>=1.2.0 <1.3.0" + }, + "css-what": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-2.1.0.tgz", + "from": "css-what@>=2.1.0 <2.2.0" + }, + "cssom": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.1.tgz", + "from": "cssom@>=0.3.0 <0.4.0" + }, + "cssstyle": { + "version": "0.2.37", + "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-0.2.37.tgz", + "from": "cssstyle@>=0.2.29 <0.3.0" + }, + "dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "from": "dashdash@>=1.12.0 <2.0.0", + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "from": "assert-plus@>=1.0.0 <2.0.0" + } + } + }, + "deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "from": "deep-is@>=0.1.3 <0.2.0" + }, + "deepmerge": { + "version": "0.2.10", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-0.2.10.tgz", + "from": "deepmerge@0.2.10" + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "from": "delayed-stream@>=1.0.0 <1.1.0" + }, + "dom-serializer": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.0.tgz", + "from": "dom-serializer@>=0.1.0 <0.2.0", + "dependencies": { + "domelementtype": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.1.3.tgz", + "from": "domelementtype@>=1.1.1 <1.2.0" + } + } + }, + "domelementtype": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.0.tgz", + "from": "domelementtype@>=1.0.0 <2.0.0" + }, + "domhandler": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.3.0.tgz", + "from": "domhandler@>=2.3.0 <2.4.0" + }, + "domutils": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz", + "from": "domutils@1.5.1" + }, + "ecc-jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz", + "from": "ecc-jsbn@>=0.1.1 <0.2.0" + }, + "entities": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.1.tgz", + "from": "entities@>=1.1.1 <1.2.0" + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "from": "escape-string-regexp@>=1.0.2 <2.0.0" + }, + "escodegen": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.8.1.tgz", + "from": "escodegen@>=1.6.1 <2.0.0" + }, + "esprima": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", + "from": "esprima@>=2.7.1 <3.0.0" + }, + "estraverse": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-1.9.3.tgz", + "from": "estraverse@>=1.9.1 <2.0.0" + }, + "esutils": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", + "from": "esutils@>=2.0.2 <3.0.0" + }, + "extend": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.0.tgz", + "from": "extend@>=3.0.0 <3.1.0" + }, + "extsprintf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.0.2.tgz", + "from": "extsprintf@1.0.2" + }, + "fast-levenshtein": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.5.tgz", + "from": "fast-levenshtein@>=2.0.4 <2.1.0" + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "from": "forever-agent@>=0.6.1 <0.7.0" + }, + "form-data": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.1.2.tgz", + "from": "form-data@>=2.1.1 <2.2.0" + }, + "generate-function": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.0.0.tgz", + "from": "generate-function@>=2.0.0 <3.0.0" + }, + "generate-object-property": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/generate-object-property/-/generate-object-property-1.2.0.tgz", + "from": "generate-object-property@>=1.1.0 <2.0.0" + }, + "getpass": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.6.tgz", + "from": "getpass@>=0.1.1 <0.2.0", + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "from": "assert-plus@>=1.0.0 <2.0.0" + } + } + }, + "graceful-readlink": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz", + "from": "graceful-readlink@>=1.0.0" + }, + "har-validator": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-2.0.6.tgz", + "from": "har-validator@>=2.0.6 <2.1.0" + }, + "has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "from": "has-ansi@>=2.0.0 <3.0.0" + }, + "hawk": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz", + "from": "hawk@>=3.1.3 <3.2.0" + }, + "hoek": { + "version": "2.16.3", + "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz", + "from": "hoek@>=2.0.0 <3.0.0" + }, + "htmlparser2": { + "version": "3.8.3", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.8.3.tgz", + "from": "htmlparser2@>=3.8.1 <3.9.0", + "dependencies": { + "entities": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-1.0.0.tgz", + "from": "entities@>=1.0.0 <1.1.0" + } + } + }, + "http-signature": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz", + "from": "http-signature@>=1.1.0 <1.2.0" + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "from": "inherits@>=2.0.1 <2.1.0" + }, + "is-my-json-valid": { + "version": "2.15.0", + "resolved": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.15.0.tgz", + "from": "is-my-json-valid@>=2.12.4 <3.0.0" + }, + "is-property": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz", + "from": "is-property@>=1.0.0 <2.0.0" + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "from": "is-typedarray@>=1.0.0 <1.1.0" + }, + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "from": "isarray@0.0.1" + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "from": "isstream@>=0.1.2 <0.2.0" + }, + "jodid25519": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/jodid25519/-/jodid25519-1.0.2.tgz", + "from": "jodid25519@>=1.0.0 <2.0.0" + }, + "jsbn": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.0.tgz", + "from": "jsbn@>=0.1.0 <0.2.0" + }, + "jsdom": { + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-7.2.2.tgz", + "from": "jsdom@>=7.0.2 <8.0.0" + }, + "json-schema": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", + "from": "json-schema@0.2.3" + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "from": "json-stringify-safe@>=5.0.1 <5.1.0" + }, + "jsonpointer": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-4.0.0.tgz", + "from": "jsonpointer@>=4.0.0 <5.0.0" + }, + "jsprim": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.3.1.tgz", + "from": "jsprim@>=1.2.2 <2.0.0" + }, + "levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "from": "levn@>=0.3.0 <0.4.0" + }, + "lodash": { + "version": "4.17.2", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.2.tgz", + "from": "lodash@>=4.1.0 <5.0.0" + }, + "mime-db": { + "version": "1.25.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.25.0.tgz", + "from": "mime-db@>=1.25.0 <1.26.0" + }, + "mime-types": { + "version": "2.1.13", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.13.tgz", + "from": "mime-types@>=2.1.7 <2.2.0" + }, + "nth-check": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.1.tgz", + "from": "nth-check@>=1.0.1 <1.1.0" + }, + "nwmatcher": { + "version": "1.3.9", + "resolved": "https://registry.npmjs.org/nwmatcher/-/nwmatcher-1.3.9.tgz", + "from": "nwmatcher@>=1.3.7 <2.0.0" + }, + "oauth-sign": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz", + "from": "oauth-sign@>=0.8.1 <0.9.0" + }, + "optionator": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", + "from": "optionator@>=0.8.1 <0.9.0" + }, + "parse5": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-1.5.1.tgz", + "from": "parse5@>=1.5.1 <2.0.0" + }, + "pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "from": "pinkie@>=2.0.0 <3.0.0" + }, + "pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "from": "pinkie-promise@>=2.0.0 <3.0.0" + }, + "prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "from": "prelude-ls@>=1.1.2 <1.2.0" + }, + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "from": "punycode@>=1.4.1 <2.0.0" + }, + "qs": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.3.0.tgz", + "from": "qs@>=6.3.0 <6.4.0" + }, + "readable-stream": { + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "from": "readable-stream@>=1.1.0 <1.2.0" + }, + "request": { + "version": "2.79.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.79.0.tgz", + "from": "request@>=2.55.0 <3.0.0" + }, + "sax": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.1.tgz", + "from": "sax@>=1.1.4 <2.0.0" + }, + "sntp": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz", + "from": "sntp@>=1.0.0 <2.0.0" + }, + "source-map": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.2.0.tgz", + "from": "source-map@>=0.2.0 <0.3.0" + }, + "sshpk": { + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.10.1.tgz", + "from": "sshpk@>=1.7.0 <2.0.0", + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "from": "assert-plus@>=1.0.0 <2.0.0" + } + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "from": "string_decoder@>=0.10.0 <0.11.0" + }, + "stringstream": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", + "from": "stringstream@>=0.0.4 <0.1.0" + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "from": "strip-ansi@>=3.0.0 <4.0.0" + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "from": "supports-color@>=2.0.0 <3.0.0" + }, + "symbol-tree": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.1.4.tgz", + "from": "symbol-tree@>=3.1.0 <4.0.0" + }, + "tough-cookie": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.2.tgz", + "from": "tough-cookie@>=2.2.0 <3.0.0" + }, + "tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "from": "tr46@>=0.0.1 <0.1.0" + }, + "tunnel-agent": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.3.tgz", + "from": "tunnel-agent@>=0.4.1 <0.5.0" + }, + "tweetnacl": { + "version": "0.14.3", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.3.tgz", + "from": "tweetnacl@>=0.14.0 <0.15.0" + }, + "type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "from": "type-check@>=0.3.2 <0.4.0" + }, + "uuid": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.0.0.tgz", + "from": "uuid@>=3.0.0 <4.0.0" + }, + "verror": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.3.6.tgz", + "from": "verror@1.3.6" + }, + "webidl-conversions": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-2.0.1.tgz", + "from": "webidl-conversions@>=2.0.0 <3.0.0" + }, + "whatwg-url-compat": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/whatwg-url-compat/-/whatwg-url-compat-0.6.5.tgz", + "from": "whatwg-url-compat@>=0.6.5 <0.7.0" + }, + "wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "from": "wordwrap@>=1.0.0 <1.1.0" + }, + "xml-name-validator": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-2.0.1.tgz", + "from": "xml-name-validator@>=2.0.1 <3.0.0" + }, + "xtend": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", + "from": "xtend@>=4.0.0 <5.0.0" + } + } +} diff --git a/packages/nova-router/README.md b/packages/_react-router-ssr/README.md similarity index 100% rename from packages/nova-router/README.md rename to packages/_react-router-ssr/README.md diff --git a/packages/nova-router/lib/client.jsx b/packages/_react-router-ssr/lib/client.jsx similarity index 100% rename from packages/nova-router/lib/client.jsx rename to packages/_react-router-ssr/lib/client.jsx diff --git a/packages/nova-router/lib/react-router-ssr.js b/packages/_react-router-ssr/lib/react-router-ssr.js similarity index 100% rename from packages/nova-router/lib/react-router-ssr.js rename to packages/_react-router-ssr/lib/react-router-ssr.js diff --git a/packages/nova-router/lib/server.jsx b/packages/_react-router-ssr/lib/server.jsx similarity index 100% rename from packages/nova-router/lib/server.jsx rename to packages/_react-router-ssr/lib/server.jsx diff --git a/packages/nova-router/lib/ssr_context.js b/packages/_react-router-ssr/lib/ssr_context.js similarity index 100% rename from packages/nova-router/lib/ssr_context.js rename to packages/_react-router-ssr/lib/ssr_context.js diff --git a/packages/nova-router/lib/ssr_data.js b/packages/_react-router-ssr/lib/ssr_data.js similarity index 100% rename from packages/nova-router/lib/ssr_data.js rename to packages/_react-router-ssr/lib/ssr_data.js diff --git a/packages/nova-router/package.js b/packages/_react-router-ssr/package.js similarity index 100% rename from packages/nova-router/package.js rename to packages/_react-router-ssr/package.js diff --git a/packages/nova-router/package.json b/packages/_react-router-ssr/package.json similarity index 100% rename from packages/nova-router/package.json rename to packages/_react-router-ssr/package.json diff --git a/packages/custom-collection-demo/lib/components/Layout.jsx b/packages/custom-collection-demo/lib/components/Layout.jsx deleted file mode 100644 index 7a3c0a753..000000000 --- a/packages/custom-collection-demo/lib/components/Layout.jsx +++ /dev/null @@ -1,30 +0,0 @@ -// /* - -// Wrapper for the Movies components - -// */ - -// import Telescope from 'meteor/nova:lib'; -// import React, { PropTypes, Component } from 'react'; -// import { Accounts } from 'meteor/std:accounts-ui'; -// import { FlashContainer } from "meteor/nova:core"; - -// const Layout = props => { -// return ( -//
- -//
-// -//
- -// - -//
-// {this.props.children} -//
- -//
-// ) -// } - -// export default Layout; \ No newline at end of file diff --git a/packages/customization-demo/client.js b/packages/customization-demo/client.js new file mode 100644 index 000000000..6e3dcfa07 --- /dev/null +++ b/packages/customization-demo/client.js @@ -0,0 +1 @@ +import './lib/modules.js'; diff --git a/packages/my-custom-package/lib/callbacks.js b/packages/customization-demo/lib/callbacks.js similarity index 100% rename from packages/my-custom-package/lib/callbacks.js rename to packages/customization-demo/lib/callbacks.js diff --git a/packages/my-custom-package/lib/components/CustomLogo.jsx b/packages/customization-demo/lib/components/CustomLogo.jsx similarity index 83% rename from packages/my-custom-package/lib/components/CustomLogo.jsx rename to packages/customization-demo/lib/components/CustomLogo.jsx index 7712872af..3c400fe9b 100644 --- a/packages/my-custom-package/lib/components/CustomLogo.jsx +++ b/packages/customization-demo/lib/components/CustomLogo.jsx @@ -7,7 +7,6 @@ it the same way. import Telescope from 'meteor/nova:lib'; import React from 'react'; import { IndexLink } from 'react-router'; -import { withCurrentUser } from 'meteor/nova:core'; import Users from 'meteor/nova:users'; const CustomLogo = ({logoUrl, siteTitle, currentUser}) => { @@ -19,4 +18,4 @@ const CustomLogo = ({logoUrl, siteTitle, currentUser}) => { ) } -Telescope.replaceComponent('Logo', CustomLogo, withCurrentUser); \ No newline at end of file +Telescope.replaceComponent('Logo', CustomLogo); \ No newline at end of file diff --git a/packages/my-custom-package/lib/components/CustomNewsletter.jsx b/packages/customization-demo/lib/components/CustomNewsletter.jsx similarity index 100% rename from packages/my-custom-package/lib/components/CustomNewsletter.jsx rename to packages/customization-demo/lib/components/CustomNewsletter.jsx diff --git a/packages/my-custom-package/lib/components/CustomPostsItem.jsx b/packages/customization-demo/lib/components/CustomPostsItem.jsx similarity index 74% rename from packages/my-custom-package/lib/components/CustomPostsItem.jsx rename to packages/customization-demo/lib/components/CustomPostsItem.jsx index baad638cb..bf79526c5 100644 --- a/packages/my-custom-package/lib/components/CustomPostsItem.jsx +++ b/packages/customization-demo/lib/components/CustomPostsItem.jsx @@ -68,4 +68,51 @@ CustomPostsItem.propTypes = { post: React.PropTypes.object.isRequired }; +CustomPostsItem.fragmentName = 'PostsItemFragment'; +CustomPostsItem.fragment = gql` + fragment PostsItemFragment on Post { + _id + title + url + slug + thumbnailUrl + baseScore + postedAt + sticky + status + categories { + # ...minimumCategoryInfo + _id + name + slug + } + commentCount + commenters { + # ...avatarUserInfo + _id + __displayName + __emailHash + __slug + } + upvoters { + _id + } + downvoters { + _id + } + upvotes # should be asked only for admins? + score # should be asked only for admins? + viewCount # should be asked only for admins? + clickCount # should be asked only for admins? + user { + # ...avatarUserInfo + _id + __displayName + __emailHash + __slug + } + color + } +`; + Telescope.replaceComponent('PostsItem', CustomPostsItem); \ No newline at end of file diff --git a/packages/my-custom-package/lib/components/MyCustomPage.jsx b/packages/customization-demo/lib/components/MyCustomPage.jsx similarity index 100% rename from packages/my-custom-package/lib/components/MyCustomPage.jsx rename to packages/customization-demo/lib/components/MyCustomPage.jsx diff --git a/packages/my-custom-package/lib/custom_fields.js b/packages/customization-demo/lib/custom_fields.js similarity index 71% rename from packages/my-custom-package/lib/custom_fields.js rename to packages/customization-demo/lib/custom_fields.js index 6b57ff736..11f0516cd 100644 --- a/packages/my-custom-package/lib/custom_fields.js +++ b/packages/customization-demo/lib/custom_fields.js @@ -1,5 +1,4 @@ import Posts from "meteor/nova:posts"; -import Users from 'meteor/nova:users'; /* Let's assign a color to each post (why? cause we want to, that's why). @@ -7,13 +6,6 @@ We'll do that by adding a custom field to the Posts collection. Note that this requires our custom package to depend on nova:posts and nova:users. */ -// check if user can create a new post -const canInsert = user => Users.canDo(user, "posts.new"); -// check if user can edit a post -const canEdit = Users.canEdit; - -const alwaysPublic = user => true; - Posts.addField( { fieldName: 'color', @@ -21,9 +13,9 @@ Posts.addField( type: String, control: "select", // use a select form control optional: true, // this field is not required - insertableIf: canInsert, - editableIf: canEdit, - viewableIf: alwaysPublic, + insertableIf: ['default'], + editableIf: ['default'], + viewableIf: ['default'], form: { options: function () { // options for the select form control return [ diff --git a/packages/my-custom-package/lib/emails.js b/packages/customization-demo/lib/emails.js similarity index 100% rename from packages/my-custom-package/lib/emails.js rename to packages/customization-demo/lib/emails.js diff --git a/packages/my-custom-package/lib/groups.js b/packages/customization-demo/lib/groups.js similarity index 100% rename from packages/my-custom-package/lib/groups.js rename to packages/customization-demo/lib/groups.js diff --git a/packages/my-custom-package/lib/intl.js b/packages/customization-demo/lib/i18n.js similarity index 100% rename from packages/my-custom-package/lib/intl.js rename to packages/customization-demo/lib/i18n.js diff --git a/packages/customization-demo/lib/modules.js b/packages/customization-demo/lib/modules.js new file mode 100644 index 000000000..9fb7149f7 --- /dev/null +++ b/packages/customization-demo/lib/modules.js @@ -0,0 +1,14 @@ +/* +Let's import all our files here. +*/ + +import "./callbacks.js" +import "./emails.js" +import "./custom_fields.js" +import "./i18n.js" +import "./groups.js" +import "./routes.jsx" + +import "./components/CustomLogo.jsx"; +import "./components/CustomNewsletter.jsx"; +import "./components/CustomPostsItem.jsx"; \ No newline at end of file diff --git a/packages/my-custom-package/lib/routes.jsx b/packages/customization-demo/lib/routes.jsx similarity index 100% rename from packages/my-custom-package/lib/routes.jsx rename to packages/customization-demo/lib/routes.jsx diff --git a/packages/my-custom-package/lib/server/emails/customEmail.handlebars b/packages/customization-demo/lib/server/emails/customEmail.handlebars similarity index 100% rename from packages/my-custom-package/lib/server/emails/customEmail.handlebars rename to packages/customization-demo/lib/server/emails/customEmail.handlebars diff --git a/packages/my-custom-package/lib/server/emails/customNewPost.handlebars b/packages/customization-demo/lib/server/emails/customNewPost.handlebars similarity index 100% rename from packages/my-custom-package/lib/server/emails/customNewPost.handlebars rename to packages/customization-demo/lib/server/emails/customNewPost.handlebars diff --git a/packages/my-custom-package/lib/server/templates.js b/packages/customization-demo/lib/server/templates.js similarity index 100% rename from packages/my-custom-package/lib/server/templates.js rename to packages/customization-demo/lib/server/templates.js diff --git a/packages/my-custom-package/lib/stylesheets/custom.scss b/packages/customization-demo/lib/stylesheets/custom.scss similarity index 100% rename from packages/my-custom-package/lib/stylesheets/custom.scss rename to packages/customization-demo/lib/stylesheets/custom.scss diff --git a/packages/my-custom-package/package.js b/packages/customization-demo/package.js similarity index 87% rename from packages/my-custom-package/package.js rename to packages/customization-demo/package.js index ca42394bc..23c570979 100644 --- a/packages/my-custom-package/package.js +++ b/packages/customization-demo/package.js @@ -15,6 +15,9 @@ Package.onUse( function(api) { 'nova:users' ]); + api.mainModule('server.js', 'server'); + api.mainModule('client.js', 'client'); + api.addFiles([ 'lib/modules.js' ], ['client', 'server']); diff --git a/packages/customization-demo/server.js b/packages/customization-demo/server.js new file mode 100644 index 000000000..2eb054871 --- /dev/null +++ b/packages/customization-demo/server.js @@ -0,0 +1,2 @@ +import './lib/modules.js'; +import './lib/server/templates.js'; diff --git a/packages/custom-collection-demo/README.md b/packages/framework-demo/README.md similarity index 100% rename from packages/custom-collection-demo/README.md rename to packages/framework-demo/README.md diff --git a/packages/custom-collection-demo/client.js b/packages/framework-demo/client.js similarity index 100% rename from packages/custom-collection-demo/client.js rename to packages/framework-demo/client.js diff --git a/packages/custom-collection-demo/lib/collection.js b/packages/framework-demo/lib/collection.js similarity index 100% rename from packages/custom-collection-demo/lib/collection.js rename to packages/framework-demo/lib/collection.js diff --git a/packages/custom-collection-demo/lib/components/Accounts.jsx b/packages/framework-demo/lib/components/Accounts.jsx similarity index 100% rename from packages/custom-collection-demo/lib/components/Accounts.jsx rename to packages/framework-demo/lib/components/Accounts.jsx diff --git a/packages/custom-collection-demo/lib/components/App.jsx b/packages/framework-demo/lib/components/App.jsx similarity index 100% rename from packages/custom-collection-demo/lib/components/App.jsx rename to packages/framework-demo/lib/components/App.jsx diff --git a/packages/custom-collection-demo/lib/components/MoviesDetails.jsx b/packages/framework-demo/lib/components/MoviesDetails.jsx similarity index 100% rename from packages/custom-collection-demo/lib/components/MoviesDetails.jsx rename to packages/framework-demo/lib/components/MoviesDetails.jsx diff --git a/packages/custom-collection-demo/lib/components/MoviesEditForm.jsx b/packages/framework-demo/lib/components/MoviesEditForm.jsx similarity index 100% rename from packages/custom-collection-demo/lib/components/MoviesEditForm.jsx rename to packages/framework-demo/lib/components/MoviesEditForm.jsx diff --git a/packages/custom-collection-demo/lib/components/MoviesItem.jsx b/packages/framework-demo/lib/components/MoviesItem.jsx similarity index 100% rename from packages/custom-collection-demo/lib/components/MoviesItem.jsx rename to packages/framework-demo/lib/components/MoviesItem.jsx diff --git a/packages/custom-collection-demo/lib/components/MoviesList.jsx b/packages/framework-demo/lib/components/MoviesList.jsx similarity index 100% rename from packages/custom-collection-demo/lib/components/MoviesList.jsx rename to packages/framework-demo/lib/components/MoviesList.jsx diff --git a/packages/custom-collection-demo/lib/components/MoviesNewForm.jsx b/packages/framework-demo/lib/components/MoviesNewForm.jsx similarity index 100% rename from packages/custom-collection-demo/lib/components/MoviesNewForm.jsx rename to packages/framework-demo/lib/components/MoviesNewForm.jsx diff --git a/packages/custom-collection-demo/lib/components/MoviesWrapper.jsx b/packages/framework-demo/lib/components/MoviesWrapper.jsx similarity index 73% rename from packages/custom-collection-demo/lib/components/MoviesWrapper.jsx rename to packages/framework-demo/lib/components/MoviesWrapper.jsx index 4550a9da5..1fad46191 100644 --- a/packages/custom-collection-demo/lib/components/MoviesWrapper.jsx +++ b/packages/framework-demo/lib/components/MoviesWrapper.jsx @@ -4,11 +4,7 @@ Wrapper for the Movies components */ -import Telescope from 'meteor/nova:lib'; import React, { PropTypes, Component } from 'react'; -import NovaForm from 'meteor/nova:forms'; -import { Button } from 'react-bootstrap'; -import { FlashContainer } from 'meteor/nova:core'; import Accounts from './Accounts.jsx'; import MoviesList from './MoviesList.jsx'; diff --git a/packages/custom-collection-demo/lib/i18n.js b/packages/framework-demo/lib/i18n.js similarity index 100% rename from packages/custom-collection-demo/lib/i18n.js rename to packages/framework-demo/lib/i18n.js diff --git a/packages/custom-collection-demo/lib/modules.js b/packages/framework-demo/lib/modules.js similarity index 100% rename from packages/custom-collection-demo/lib/modules.js rename to packages/framework-demo/lib/modules.js diff --git a/packages/custom-collection-demo/lib/mutations.js b/packages/framework-demo/lib/mutations.js similarity index 100% rename from packages/custom-collection-demo/lib/mutations.js rename to packages/framework-demo/lib/mutations.js diff --git a/packages/custom-collection-demo/lib/permissions.js b/packages/framework-demo/lib/permissions.js similarity index 100% rename from packages/custom-collection-demo/lib/permissions.js rename to packages/framework-demo/lib/permissions.js diff --git a/packages/custom-collection-demo/lib/resolvers.js b/packages/framework-demo/lib/resolvers.js similarity index 100% rename from packages/custom-collection-demo/lib/resolvers.js rename to packages/framework-demo/lib/resolvers.js diff --git a/packages/custom-collection-demo/lib/routes.js b/packages/framework-demo/lib/routes.js similarity index 100% rename from packages/custom-collection-demo/lib/routes.js rename to packages/framework-demo/lib/routes.js diff --git a/packages/custom-collection-demo/lib/schema.js b/packages/framework-demo/lib/schema.js similarity index 82% rename from packages/custom-collection-demo/lib/schema.js rename to packages/framework-demo/lib/schema.js index 6e33834a5..21afff9e2 100644 --- a/packages/custom-collection-demo/lib/schema.js +++ b/packages/framework-demo/lib/schema.js @@ -21,10 +21,9 @@ const schema = { name: { label: 'Name', type: String, - control: "text", viewableIf: alwaysPublic, - insertableIf: isLoggedIn, - editableIf: canEdit + insertableIf: ['default'], + editableIf: ['default'], }, createdAt: { type: Date, @@ -37,18 +36,17 @@ const schema = { label: 'Year', type: String, optional: true, - control: "text", viewableIf: alwaysPublic, - insertableIf: isLoggedIn, - editableIf: canEdit + insertableIf: ['default'], + editableIf: ['default'], }, review: { label: 'Review', type: String, control: "textarea", viewableIf: alwaysPublic, - insertableIf: isLoggedIn, - editableIf: canEdit + insertableIf: ['default'], + editableIf: ['default'] }, privateComments: { label: 'Private Comments', @@ -56,15 +54,13 @@ const schema = { optional: true, control: "textarea", viewableIf: alwaysPublic, //fixme - insertableIf: isLoggedIn, - editableIf: canEdit + insertableIf: ['default'], + editableIf: ['default'] }, userId: { type: String, optional: true, viewableIf: alwaysPublic, - insertableIf: isLoggedIn, - hidden: true, resolveAs: 'user: User', } }; diff --git a/packages/custom-collection-demo/lib/seed.js b/packages/framework-demo/lib/seed.js similarity index 100% rename from packages/custom-collection-demo/lib/seed.js rename to packages/framework-demo/lib/seed.js diff --git a/packages/custom-collection-demo/lib/style.css b/packages/framework-demo/lib/style.css similarity index 100% rename from packages/custom-collection-demo/lib/style.css rename to packages/framework-demo/lib/style.css diff --git a/packages/custom-collection-demo/package.js b/packages/framework-demo/package.js similarity index 100% rename from packages/custom-collection-demo/package.js rename to packages/framework-demo/package.js diff --git a/packages/custom-collection-demo/server.js b/packages/framework-demo/server.js similarity index 100% rename from packages/custom-collection-demo/server.js rename to packages/framework-demo/server.js diff --git a/packages/my-custom-package/lib/components.js b/packages/my-custom-package/lib/components.js deleted file mode 100644 index 0ad01ff57..000000000 --- a/packages/my-custom-package/lib/components.js +++ /dev/null @@ -1,9 +0,0 @@ -/* -This file centralizes all our custom component overrides. -*/ - -import Telescope from 'meteor/nova:lib'; - -import "./components/CustomLogo.jsx"; -import "./components/CustomNewsletter.jsx"; -import "./components/CustomPostsItem.jsx"; \ No newline at end of file diff --git a/packages/my-custom-package/lib/modules.js b/packages/my-custom-package/lib/modules.js deleted file mode 100644 index 228ed6731..000000000 --- a/packages/my-custom-package/lib/modules.js +++ /dev/null @@ -1,11 +0,0 @@ -/* -Let's import all our files here. -*/ - -import "./callbacks.js" -import "./emails.js" -import "./components.js" -import "./custom_fields.js" -import "./intl.js" -import "./groups.js" -import "./routes.jsx" \ No newline at end of file diff --git a/packages/nova-comments/package.js b/packages/nova-comments/package.js index 4bdec269d..0fea76a28 100644 --- a/packages/nova-comments/package.js +++ b/packages/nova-comments/package.js @@ -10,7 +10,7 @@ Package.onUse(function (api) { api.versionsFrom(['METEOR@1.0']); api.use([ - 'nova:lib@0.27.4-nova', + 'nova:core@0.27.4-nova', 'nova:posts@0.27.4-nova', 'nova:users@0.27.4-nova' ]); diff --git a/packages/nova-lib/lib/components.js b/packages/nova-lib/lib/components.js new file mode 100644 index 000000000..44bbf32c5 --- /dev/null +++ b/packages/nova-lib/lib/components.js @@ -0,0 +1,82 @@ + +Telescope.components = {}; + +/** + * Register a Telescope component with a name, a raw component than can be extended + * and one or more optional higher order components. + * + * @param {String} name The name of the component to register. + * @param {React Component} rawComponent Interchangeable/extendable component. + * @param {...Function} hocs The HOCs to compose with the raw component. + * @returns {Function|React Component} A component callable with Telescope.components[name] + * + * Note: when a component is registered without higher order component, `hocs` will be + * an empty array, and it's ok! + * See https://github.com/reactjs/redux/blob/master/src/compose.js#L13-L15 + */ +Telescope.registerComponent = (name, rawComponent, ...hocs) => { + // console.log('// registering component'); + // console.log(name); + // console.log('raw component', rawComponent); + // console.log('higher order components', hocs); + + // note: maybe do something to replace connect at the right place, see https://github.com/apollostack/react-apollo/issues/315 + + // compose the raw component with the HOCs given in option + Telescope.components[name] = compose(...hocs)(rawComponent); + + // keep track of the raw component & hocs, so we can extend the component if necessary + Telescope.components[name].rawComponent = rawComponent; + Telescope.components[name].hocs = hocs; + + return Telescope.components[name]; +}; + +/** + * Get a component registered with Telescope.registerComponent(name, component, ...hocs). + * + * @param {String} name The name of the component to get. + * @returns {Function|React Component} A (wrapped) React component + */ +Telescope.getComponent = (name) => { + return Telescope.components[name]; +}; + +/** + * Get the **raw** (original) component registered with Telescope.registerComponent + * without the possible HOCs wrapping it. + * + * @param {String} name The name of the component to get. + * @returns {Function|React Component} An interchangeable/extendable React component + */ +Telescope.getRawComponent = (name) => { + return Telescope.components[name].rawComponent; +}; + +/** + * Replace a Telescope component with the same name with a new component or + * an extension of the raw component and one or more optional higher order components. + * This function keeps track of the previous HOCs and wrap the new HOCs around previous ones + * + * @param {String} name The name of the component to register. + * @param {React Component} rawComponent Interchangeable/extendable component. + * @param {...Function} hocs The HOCs to compose with the raw component. + * @returns {Function|React Component} A component callable with Telescope.components[name] + * + * Note: when a component is registered without higher order component, `hocs` will be + * an empty array, and it's ok! + * See https://github.com/reactjs/redux/blob/master/src/compose.js#L13-L15 + */ +Telescope.replaceComponent = (name, newComponent, ...newHocs) => { + const previousComponent = Telescope.components[name]; + + // xxx : throw an error if the previous component doesn't exist + + // console.log('// replacing component'); + // console.log(name); + // console.log(newComponent); + // console.log('new hocs', newHocs); + // console.log('previous hocs', previousComponent.hocs); + + return Telescope.registerComponent(name, newComponent, ...newHocs, ...previousComponent.hocs); +} diff --git a/packages/nova-lib/lib/config.js b/packages/nova-lib/lib/config.js index 5c458d13c..049774273 100644 --- a/packages/nova-lib/lib/config.js +++ b/packages/nova-lib/lib/config.js @@ -34,90 +34,6 @@ SimpleSchema.extendOptions({ group: Match.Optional(Object) // form fieldset group }); -// ------------------------------------- Components -------------------------------- // - -Telescope.components = {}; - -/** - * Register a Telescope component with a name, a raw component than can be extended - * and one or more optional higher order components. - * - * @param {String} name The name of the component to register. - * @param {React Component} rawComponent Interchangeable/extendable component. - * @param {...Function} hocs The HOCs to compose with the raw component. - * @returns {Function|React Component} A component callable with Telescope.components[name] - * - * Note: when a component is registered without higher order component, `hocs` will be - * an empty array, and it's ok! - * See https://github.com/reactjs/redux/blob/master/src/compose.js#L13-L15 - */ -Telescope.registerComponent = (name, rawComponent, ...hocs) => { - // console.log('// registering component'); - // console.log(name); - // console.log('raw component', rawComponent); - // console.log('higher order components', hocs); - - // note: maybe do something to replace connect at the right place, see https://github.com/apollostack/react-apollo/issues/315 - - // compose the raw component with the HOCs given in option - Telescope.components[name] = compose(...hocs)(rawComponent); - - // keep track of the raw component & hocs, so we can extend the component if necessary - Telescope.components[name].rawComponent = rawComponent; - Telescope.components[name].hocs = hocs; - - return Telescope.components[name]; -}; - -/** - * Get a component registered with Telescope.registerComponent(name, component, ...hocs). - * - * @param {String} name The name of the component to get. - * @returns {Function|React Component} A (wrapped) React component - */ -Telescope.getComponent = (name) => { - return Telescope.components[name]; -}; - -/** - * Get the **raw** (original) component registered with Telescope.registerComponent - * without the possible HOCs wrapping it. - * - * @param {String} name The name of the component to get. - * @returns {Function|React Component} An interchangeable/extendable React component - */ -Telescope.getRawComponent = (name) => { - return Telescope.components[name].rawComponent; -}; - -/** - * Replace a Telescope component with the same name with a new component or - * an extension of the raw component and one or more optional higher order components. - * This function keeps track of the previous HOCs and wrap the new HOCs around previous ones - * - * @param {String} name The name of the component to register. - * @param {React Component} rawComponent Interchangeable/extendable component. - * @param {...Function} hocs The HOCs to compose with the raw component. - * @returns {Function|React Component} A component callable with Telescope.components[name] - * - * Note: when a component is registered without higher order component, `hocs` will be - * an empty array, and it's ok! - * See https://github.com/reactjs/redux/blob/master/src/compose.js#L13-L15 - */ -Telescope.replaceComponent = (name, newComponent, ...newHocs) => { - const previousComponent = Telescope.components[name]; - - // xxx : throw an error if the previous component doesn't exist - - // console.log('// replacing component'); - // console.log(name); - // console.log(newComponent); - // console.log('new hocs', newHocs); - // console.log('previous hocs', previousComponent.hocs); - - return Telescope.registerComponent(name, newComponent, ...newHocs, ...previousComponent.hocs); -} - // ------------------------------------- Subscriptions -------------------------------- // /** diff --git a/packages/nova-lib/lib/modules.js b/packages/nova-lib/lib/modules.js index 4f65af881..38e2a6077 100644 --- a/packages/nova-lib/lib/modules.js +++ b/packages/nova-lib/lib/modules.js @@ -9,5 +9,6 @@ import './deep_extend.js'; import './intl-polyfill.js'; import './graphql.js'; import './icons.js'; +import './components.js'; export default Telescope; \ No newline at end of file diff --git a/packages/nova-settings/README.md b/packages/nova-settings/README.md deleted file mode 100644 index 5ebe668f8..000000000 --- a/packages/nova-settings/README.md +++ /dev/null @@ -1 +0,0 @@ -Telescope settings package, used internally. \ No newline at end of file diff --git a/packages/nova-settings/i18n/ar.i18n.json b/packages/nova-settings/i18n/ar.i18n.json deleted file mode 100644 index 0d6c9553a..000000000 --- a/packages/nova-settings/i18n/ar.i18n.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "title" : "العنوان", - "siteUrl" : "رابط الموقع", - "tagline" : "شعار", - "requireViewInvite" : "مشاهدة مقيدة", - "requirePostInvite" : "مشاركة مقيدة", - "requirePostsApproval" : "موافقة مطلوبة", - "defaultEmail" : "البريد اﻻلكتروني", - "scoreUpdateInterval" : "تحديث النتيجة", - "defaultView" : "مشهد افتراضي", - "postInterval" : "فاصل المشاركات", - "commentInterval" : "فاصل التعليقات", - "maxPostsPerDay" : "العدد اﻻقصى للمشاركات في اليوم", - "startInvitesCount" : "الدعوات منذ البريداية", - "postsPerPage" : "المشاركات في الصفحة", - "logoUrl" : "رابط الشارة", - "logoHeight" : "طول الشارة", - "logoWidth" : "عرض الشارة", - "language" : "اللغة", - "backgroundCSS" : "CSS للخلفية", - "buttonColor" : "لون اﻻزرار", - "buttonTextColor" : "لون نص اﻻزرار", - "headerColor" : "لون الجزء الرأسي", - "headerTextColor" : "لون نص الجزء الراسي", - "twitterAccount" : "حساب تويتر", - "googleAnalyticsId" : "معرف قوقل تحليﻻت", - "mixpanelId" : "ID Mixpanel", - "clickyId" : "ID Clicky", - "footerCode" : "شفرة الجزء السفلي", - "extraCode" : "شفرات زائدة", - "emailFooter" : "الجزء السفلي لﻻيميل", - "notes" : "مﻻحظات", - "debug" : "وضع المعالجة", - "fontUrl" : "رابط الخط", - "fontFamily" : "اسم الخط", - "authMethods" : "أساليب المصادقة", - "faviconUrl" : "رابط فافيكون", - "mailURL" : "رابط اﻻيميل", - "postsLayout" : "مشاركات ﻻيوت", - "general" : "عام", - "invites" : "دعوة", - "scoring" : "النتيجة", - "logo" : "شارة", - "extras" : "إضافات", - "colors" : "اﻻلوان", - "integrations" : "دمج" -} \ No newline at end of file diff --git a/packages/nova-settings/i18n/bg.i18n.json b/packages/nova-settings/i18n/bg.i18n.json deleted file mode 100644 index f4f8d08fb..000000000 --- a/packages/nova-settings/i18n/bg.i18n.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "title" : "Заглавие", - "invites" : "Покани" -} \ No newline at end of file diff --git a/packages/nova-settings/i18n/cs.i18n.json b/packages/nova-settings/i18n/cs.i18n.json deleted file mode 100644 index f995e0da8..000000000 --- a/packages/nova-settings/i18n/cs.i18n.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "settings_saved" : "Nastavení uloženo", - "title" : "Název", - "description" : "Popis", - "siteUrl" : "URL webu", - "tagline" : "Claim aplikace/webu", - "requireViewInvite" : "Vyžadovat pozvánku k zobrazení", - "requirePostInvite" : "Vyžadovat pozvánku pro vložení příspěvku", - "requirePostsApproval" : "Vyžadovat schválení příspěvků", - "defaultEmail" : "Výchozí e-mail", - "scoreUpdateInterval" : "Skóre intervalu aktualizace", - "defaultView" : "Výchozí zobrazení", - "postInterval" : "Interval příspěvku", - "commentInterval" : "Interval komentáře", - "maxPostsPerDay" : "Maximální počet příspěvku za den", - "startInvitesCount" : "Počet pozvánek", - "postsPerPage" : "Příspěvků na stránku", - "logoUrl" : "URL loga", - "logoHeight" : "Výška loga", - "logoWidth" : "Šířka loga", - "language" : "Jazyk", - "backgroundCSS" : "Pozadí webu (CSS)", - "buttonColor" : "Barva tlačítka", - "buttonTextColor" : "Barva textu tlačítka", - "headerColor" : "Barva hlavičky", - "headerTextColor" : "Barva textu hlavičky", - "twitterAccount" : "Twitter účet", - "googleAnalyticsId" : "Google Analytics ID", - "mixpanelId" : "Mixpanel ID", - "clickyId" : "Clicky ID", - "footerCode" : "Kód patičky", - "extraCode" : "Extra kód", - "extraCSS" : "Extra CSS", - "emailFooter" : "Patička e-mailu", - "notes" : "Poznámky", - "debug" : "Režim ladění (debug mode)", - "fontUrl" : "URL fontu", - "fontFamily" : "Font Family", - "authMethods" : "Metody ověřování", - "faviconUrl" : "URL favicony", - "mailURL" : "MailURL", - "postsLayout" : "Layout příspěvků", - "siteImage" : "Obrázek webu", - "accentColor" : "Hlavní barva", - "accentContrastColor" : "Kontrastní hlavní barva", - "secondaryColor" : "Sekundární barva", - "secondaryContrastColor" : "Sekundární kontrastní barva", - "postViews" : "Počet shlédnutí", - "navLayout" : "Layout navigace", - "mailUrl" : "URL mailu", - "general" : "Obecné", - "invites" : "Pozvánky", - "scoring" : "Skóre", - "logo" : "Logo", - "extras" : "Extra", - "colors" : "Barvy", - "integrations" : "Integrace" -} \ No newline at end of file diff --git a/packages/nova-settings/i18n/da.i18n.json b/packages/nova-settings/i18n/da.i18n.json deleted file mode 100644 index bba3ff7f4..000000000 --- a/packages/nova-settings/i18n/da.i18n.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "description" : "Beskrivelse", - "logoHeight" : "Logo Højde", - "logoWidth" : "Logo Bredde", - "language" : "Sprog", - "backgroundCSS" : "Baggrund CSS", - "footerCode" : "Footer kode", - "extraCode" : "Ekstra kode", - "emailFooter" : "Email Footer", - "extras" : "Ekstra" -} \ No newline at end of file diff --git a/packages/nova-settings/i18n/de.i18n.json b/packages/nova-settings/i18n/de.i18n.json deleted file mode 100644 index 76be60678..000000000 --- a/packages/nova-settings/i18n/de.i18n.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "title" : "Titel" -} \ No newline at end of file diff --git a/packages/nova-settings/i18n/el.i18n.json b/packages/nova-settings/i18n/el.i18n.json deleted file mode 100644 index da3f8e598..000000000 --- a/packages/nova-settings/i18n/el.i18n.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "title" : "Τίτλος", - "siteUrl" : "URL Ιστοσελίδας", - "tagline" : "Ετικέτα", - "requireViewInvite" : "Να απαιτείται πρόσκληση για προβολή", - "requirePostInvite" : "Να απαιτείται πρόσκληση για δημοσίευση", - "requirePostsApproval" : "Να απαιτείται έγκριση των δημοσιεύσεων", - "defaultEmail" : "Προεπιλεγμένο Email", - "scoreUpdateInterval" : "Χρόνος ανανέωσης Σκορ", - "defaultView" : "Προεπιλεγμένη Προβολή", - "postInterval" : "Χρόνος ανανέωσης δημοσίευσης", - "commentInterval" : "Χρόνος ανανέωσης σχολίου", - "maxPostsPerDay" : "Μέγιστες δημοσιεύσεις ανα ημέρα", - "postsPerPage" : "Δημοσιεύσεις ανα ημέρα", - "logoUrl" : "URL Λογότυπου", - "logoHeight" : "Υψος Λογότυπου", - "logoWidth" : "Πλάτος Λογότυπου", - "language" : "Γλώσσα", - "buttonColor" : "Χρώμα κουμπιού", - "buttonTextColor" : "Χρώμα κειμένου κουμπιού", - "headerColor" : "Χρώμα Επικεφαλίδας", - "headerTextColor" : "Χρώμα κειμένου Επικεφαλίδας", - "twitterAccount" : "Λογαριασμός Twitter", - "notes" : "Σημειώσεις", - "postsLayout" : "Στύλ Δημοσιεύσεων", - "general" : "Γενικά", - "invites" : "Προσκλήσεις", - "scoring" : "Σκορ", - "logo" : "Λογότυπο", - "extras" : "Extras", - "colors" : "Χρώματα", - "integrations" : "Προσθήκες" -} \ No newline at end of file diff --git a/packages/nova-settings/i18n/en.i18n.json b/packages/nova-settings/i18n/en.i18n.json deleted file mode 100644 index 06ec21d74..000000000 --- a/packages/nova-settings/i18n/en.i18n.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "settings_saved" : "Settings saved", - "title" : "Title", - "description" : "Description", - "siteUrl" : "Site URL", - "tagline" : "Tagline", - "requireViewInvite" : "Require Invite to View", - "requirePostInvite" : "Require Invite to Post", - "requirePostsApproval" : "Require Posts to be Approved", - "defaultEmail" : "Default Email", - "scoreUpdateInterval" : "Score Update Interval", - "defaultView" : "Default View", - "postInterval" : "Post Interval", - "commentInterval" : "Comment Interval", - "maxPostsPerDay" : "Max Posts Per Day", - "startInvitesCount" : "Invites Start Count", - "postsPerPage" : "Posts Per Page", - "logoUrl" : "Logo URL", - "logoHeight" : "Logo Height", - "logoWidth" : "Logo Width", - "language" : "Language", - "backgroundCSS" : "Background CSS", - "buttonColor" : "Button Color", - "buttonTextColor" : "Button Text Color", - "headerColor" : "Header Color", - "headerTextColor" : "Header Text Color", - "twitterAccount" : "Twitter Account", - "googleAnalyticsId" : "Google Analytics ID", - "mixpanelId" : "Mixpanel ID", - "clickyId" : "Clicky ID", - "footerCode" : "Footer Code", - "extraCode" : "Extra Code", - "extraCSS" : "Extra CSS", - "emailFooter" : "Email Footer", - "notes" : "Notes", - "debug" : "Debug Mode", - "fontUrl" : "Font URL", - "fontFamily" : "Font Family", - "authMethods" : "Authentication Methods", - "faviconUrl" : "Favicon URL", - "mailURL" : "MailURL", - "postsLayout" : "Posts Layout", - "siteImage" : "Site Image", - "accentColor" : "Accent Color", - "accentContrastColor" : "Accent Contrast Color", - "secondaryColor" : "Secondary Color", - "secondaryContrastColor" : "Secondary Contrast Color", - "postViews" : "Post Views", - "navLayout" : "Navigation Layout", - "mailUrl" : "Mail URL", - "general" : "General", - "invites" : "Invites", - "scoring" : "Scoring", - "logo" : "Logo", - "extras" : "Extras", - "colors" : "Colors", - "integrations" : "Integrations", - "enableDownvotes" : "Enable Downvotes", - "RSSLinksPointTo" : "RSS Links Point To", - "loadMoreBehavior" : "“Load More” Behavior", - "loadMoreButton" : "”Load More” button", - "infiniteScroll" : "Infinite scroll" -} \ No newline at end of file diff --git a/packages/nova-settings/i18n/es.i18n.json b/packages/nova-settings/i18n/es.i18n.json deleted file mode 100644 index a4a04ad16..000000000 --- a/packages/nova-settings/i18n/es.i18n.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "title" : "Título", - "siteUrl" : "URL del sitio web", - "tagline" : "Lema", - "requireViewInvite" : "Requerir Invitación para Ver", - "requirePostInvite" : "Requerir invitación para Publicar", - "requirePostsApproval" : "Requerir que los Posts sean Aprobados", - "defaultEmail" : "Correo electrónico predeterminado", - "defaultView" : "Vista Predeterminada", - "maxPostsPerDay" : "Número máximo de posts por día", - "postsPerPage" : "Posts por página", - "language" : "Idioma", - "headerColor" : "Color de la cabecera", - "headerTextColor" : "Color del texto en la cabecera\n", - "invites" : "Invitaciones" -} \ No newline at end of file diff --git a/packages/nova-settings/i18n/et.i18n.json b/packages/nova-settings/i18n/et.i18n.json deleted file mode 100644 index 9e1a5dc1e..000000000 --- a/packages/nova-settings/i18n/et.i18n.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "settings_saved" : "Seaded salvestatud", - "title" : "Pealkiri", - "description" : "Kirjeldus", - "siteUrl" : "Saidi URL", - "tagline" : "Märksõnad", - "requireViewInvite" : "Vaatamiseks küsi kutse", - "requirePostInvite" : "Postitamiseks küsi kutse", - "requirePostsApproval" : "Küsi postituste heakskiitu", - "defaultEmail" : "Vaikimisi Email", - "scoreUpdateInterval" : "Skoori Värskendamise Intervall", - "defaultView" : "Vaikimisi Vaade", - "postInterval" : "Postitamise Intervall", - "commentInterval" : "Kommenteerimise Intervall", - "maxPostsPerDay" : "Max Postitusi päevas", - "startInvitesCount" : "Kutsete Arv", - "postsPerPage" : "Postitusi Lehe Kohta", - "logoUrl" : "Logo URL", - "logoHeight" : "Logo Kõrgus", - "logoWidth" : "Logo Laius", - "language" : "Keel", - "backgroundCSS" : "Tausta CSS", - "buttonColor" : "Nupu värv", - "buttonTextColor" : "Nupu teksti värv", - "headerColor" : "Päise värv", - "headerTextColor" : "Päise teksti värv", - "twitterAccount" : "Twitteri konto", - "googleAnalyticsId" : "Google Analytics ID", - "mixpanelId" : "Mixpanel ID", - "clickyId" : "Clicky ID", - "footerCode" : "Jaluse kood", - "extraCode" : "Ekstra kood", - "extraCSS" : "Ekstra CSS", - "emailFooter" : "Emaili jalus", - "notes" : "Märkmed", - "debug" : "Silumisrežiim", - "fontUrl" : "Font URL", - "fontFamily" : "Font Family", - "authMethods" : "Autentimise meetodid", - "faviconUrl" : "Favicon URL", - "mailURL" : "MailURL", - "postsLayout" : "Postituste asetus", - "siteImage" : "Saidi Pilt", - "accentColor" : "Rõhutamise Värv", - "accentContrastColor" : "Rõhutamise Kontrastne Värv", - "secondaryColor" : "Sekundaarne Värv", - "secondaryContrastColor" : "Sekundaarne Kontrastne Värv", - "postViews" : "Postituse Vaatamisi", - "navLayout" : "Navigatsiooni asetus", - "mailUrl" : "Mail URL", - "general" : "Üldine", - "invites" : "Kutsed", - "scoring" : "Skoor", - "logo" : "Logo", - "extras" : "Lisad", - "colors" : "Värvid", - "integrations" : "Integratsioonid", - "enableDownvotes" : "Luba Downvotes", - "RSSLinksPointTo" : "RSS Lingid", - "loadMoreBehavior" : "\"Lae veel\" käitumine", - "loadMoreButton" : "\"Lae veel\" nupp", - "infiniteScroll" : "Lõputu scroll" -} \ No newline at end of file diff --git a/packages/nova-settings/i18n/fa.i18n.json b/packages/nova-settings/i18n/fa.i18n.json deleted file mode 100644 index 6d7f08f02..000000000 --- a/packages/nova-settings/i18n/fa.i18n.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "settings_saved" : "تنظیمات ذخیره شد", - "title" : "عنوان", - "description" : "توضیحات", - "siteUrl" : "آدرس پیوند سامانه", - "tagline" : "خط برچسب", - "requireViewInvite" : "جهت مشاهده, نیاز به دعوت دارد", - "requirePostInvite" : "جهت مشاهده, نیاز به دعوت دارد", - "requirePostsApproval" : "تمام پستها نیاز به بررسی و تایید شدن دارند", - "defaultEmail" : " آدرس ایمیل پیش فرض", - "scoreUpdateInterval" : "فاصله بروز رسانی نمره", - "defaultView" : "نمایش پیش فرض", - "postInterval" : "فاصله زمانی ارسال", - "commentInterval" : "فاصله زمانی نظر", - "maxPostsPerDay" : "ماکزیمم تعداد پست در هر روز", - "startInvitesCount" : "تعداد شروع دعوت کردن", - "postsPerPage" : "تعداد پستها در هر صفحه", - "logoUrl" : "لوگوی پیوند", - "logoHeight" : "آرم ارتفاع", - "logoWidth" : "آرم عرض", - "language" : "زبان", - "backgroundCSS" : "پس زمینه CSS", - "buttonColor" : "رنگ دکمه", - "buttonTextColor" : "رنگ متن دکمه", - "headerColor" : "رنگ سربرگ", - "headerTextColor" : "رنگ متن سربرگ", - "twitterAccount" : "حساب توییتر", - "googleAnalyticsId" : "شناسه گوگل آنالیتیک", - "mixpanelId" : "شناسه میکس پنل", - "clickyId" : "شناسه کلیکی", - "footerCode" : "کد پاورقی", - "extraCode" : "کد اضافی", - "extraCSS" : "کد CSS اضافه", - "emailFooter" : "پست الکترونیک پاورقی", - "notes" : "یادداشتها", - "debug" : "حالت اشکال زدایی", - "fontUrl" : "فونت پیوند", - "fontFamily" : "خانواده فونت", - "authMethods" : "روش های تأیید هویت", - "faviconUrl" : "آیکون Favicon", - "mailURL" : "پیوند ایمیل", - "postsLayout" : "قالب پستها", - "siteImage" : "تصویر سامانه", - "accentColor" : "رنگ انسجامی", - "accentContrastColor" : " انسجام رنگ کنتراستی", - "secondaryColor" : "رنگ دوم", - "secondaryContrastColor" : "رنگ دوم کنتراستی", - "postViews" : "نمایش پستها", - "navLayout" : "قالب مرور صفحات", - "mailUrl" : "پیوند پست الکترونیک", - "general" : "سراسری", - "invites" : "دعوت", - "scoring" : "نمره دهی", - "logo" : "آرم", - "extras" : "افزودنیها", - "colors" : "رنگها", - "integrations" : "ادغام و یکپارچگی" -} \ No newline at end of file diff --git a/packages/nova-settings/i18n/fr.i18n.json b/packages/nova-settings/i18n/fr.i18n.json deleted file mode 100644 index 87d61971d..000000000 --- a/packages/nova-settings/i18n/fr.i18n.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "settings_saved" : "Paramètres sauvegardés", - "title" : "Titre", - "description" : "Description", - "siteUrl" : "URL du site", - "tagline" : "Slogan", - "requireViewInvite" : "Consultation restreinte", - "requirePostInvite" : "Participation restreinte", - "requirePostsApproval" : "Modération obligatoire", - "defaultEmail" : "Email par défaut", - "scoreUpdateInterval" : "Fréquence de mise à jour du score", - "defaultView" : "Vue par défaut", - "postInterval" : "Interval des posts", - "commentInterval" : "Interval des commentaires", - "maxPostsPerDay" : "Max posts par jour", - "startInvitesCount" : "Nombre d'invitations de départ", - "postsPerPage" : "Posts par page", - "logoUrl" : "URL du logo", - "logoHeight" : "Hauteur du logo", - "logoWidth" : "Largeur du logo", - "language" : "Langue", - "backgroundCSS" : "CSS de fond", - "buttonColor" : "Couleur des boutons", - "buttonTextColor" : "Couleur du texte des boutons", - "headerColor" : "Couleur de l'entête", - "headerTextColor" : "Couleur du texte de l'entête", - "twitterAccount" : "Compte Twitter", - "googleAnalyticsId" : "ID Google Analytics", - "mixpanelId" : "ID Mixpanel", - "clickyId" : "ID Clicky", - "footerCode" : "Code du pied de page", - "extraCode" : "Code en plus", - "extraCSS" : "CSS supplémentaire", - "emailFooter" : "Pied de page des mails", - "notes" : "Notes", - "debug" : "Mode Debug", - "fontUrl" : "URL de font", - "fontFamily" : "Famille de font", - "authMethods" : "Méthode d'authentification", - "faviconUrl" : "URL de la favicon", - "mailURL" : "URL du mail", - "postsLayout" : "Disposition des posts", - "siteImage" : "Image du site", - "accentColor" : "Couleur des accents", - "accentContrastColor" : "Couleur du contraste des accents", - "secondaryColor" : "Couleur secondaire", - "secondaryContrastColor" : "Couleur de contraste secondaire", - "postViews" : "Nombre de vues", - "navLayout" : "Disposition de la navigation ", - "mailUrl" : "URL du mail", - "general" : "Général", - "invites" : "Invitations", - "scoring" : "Calcul du score", - "logo" : "Logo", - "extras" : "Extras", - "colors" : "Couleurs", - "integrations" : "Intégrations", - "enableDownvotes" : "Activer les downvotes", - "RSSLinksPointTo" : "Liens RSS ", - "loadMoreBehavior" : "Comportement \"Charger Plus\"", - "loadMoreButton" : "Bouton \"Charger Plus\"", - "infiniteScroll" : "Defiliment infini" -} \ No newline at end of file diff --git a/packages/nova-settings/i18n/hu.i18n.json b/packages/nova-settings/i18n/hu.i18n.json deleted file mode 100644 index 7a73a41bf..000000000 --- a/packages/nova-settings/i18n/hu.i18n.json +++ /dev/null @@ -1,2 +0,0 @@ -{ -} \ No newline at end of file diff --git a/packages/nova-settings/i18n/id.i18n.json b/packages/nova-settings/i18n/id.i18n.json deleted file mode 100644 index 39da2e6dd..000000000 --- a/packages/nova-settings/i18n/id.i18n.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "settings_saved" : "Pengaturan tersimpan", - "title" : "Judul", - "description" : "Deskripsi", - "siteUrl" : "URL situs", - "tagline" : "Tagline", - "requireViewInvite" : "Memerlukan Undangan untuk Melihat", - "requirePostInvite" : "Memerlukan Undangan untuk Memposting", - "requirePostsApproval" : "Memerlukan Persetujuan untuk Postingan Baru ", - "defaultEmail" : "Email Default", - "scoreUpdateInterval" : "Interval Pembaharuan Skor", - "defaultView" : "Tampilan Default", - "postInterval" : "Interval Posting", - "commentInterval" : "Interval Komentar", - "maxPostsPerDay" : "Maksimal Posting per Hari", - "startInvitesCount" : "Hitungan Memulai Undangan", - "postsPerPage" : "Postingan per Halaman", - "logoUrl" : "URL Logo", - "logoHeight" : "Tinggi Logo", - "logoWidth" : "Lebar Logo", - "language" : "Bahasa", - "backgroundCSS" : "Background CSS", - "buttonColor" : "Warna Tombol", - "buttonTextColor" : "Warna Tombol Tulisan", - "headerColor" : "Warna Header", - "headerTextColor" : "Warna Tulisan Header", - "twitterAccount" : "Akun Twitter", - "googleAnalyticsId" : "Google Analytics ID", - "mixpanelId" : "Mixpanel ID", - "clickyId" : "Clicky ID", - "footerCode" : "Kode Footer", - "extraCode" : "Kode tambahan", - "extraCSS" : "Kode CSS Tambahan", - "emailFooter" : "Email Footer", - "notes" : "Catatan", - "debug" : "Modus Debug", - "fontUrl" : "URL Font", - "fontFamily" : "Font Family", - "authMethods" : "Metode otentikasi", - "faviconUrl" : "URL Favicon", - "mailURL" : "MailURL", - "postsLayout" : "Tata Letak Postingan", - "siteImage" : "Gambar Situs", - "accentColor" : "Warna Aksen", - "accentContrastColor" : "Warna Kontras Aksen", - "secondaryColor" : "Warna Sekunder", - "secondaryContrastColor" : "Warna Kontras Sekunder Aksen", - "postViews" : "Tampilan Postingan", - "navLayout" : "Tata Letak Navigasi", - "mailUrl" : "URL Mail", - "general" : "Umum", - "invites" : "Undangan", - "scoring" : "Aturan skor", - "logo" : "Logo", - "extras" : "Ekstra", - "colors" : "Warna", - "integrations" : "Integrasi" -} \ No newline at end of file diff --git a/packages/nova-settings/i18n/it.i18n.json b/packages/nova-settings/i18n/it.i18n.json deleted file mode 100644 index 09b2e133d..000000000 --- a/packages/nova-settings/i18n/it.i18n.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "settings_saved" : "Impostazioni salvate", - "title" : "Titolo", - "description" : "Descrizione", - "siteUrl" : "URL del Sito", - "requireViewInvite" : "Richiedi un Invito per Visualizzare", - "requirePostInvite" : "Richiedi un Invito per Inviare", - "requirePostsApproval" : "Richiedi l'approvazione per i post", - "defaultEmail" : "Email predefinita", - "startInvitesCount" : "Numero iniziale di inviti", - "postsPerPage" : "Post per Pagina", - "logoUrl" : "URL del Logo", - "logoHeight" : "Altezza del Logo", - "logoWidth" : "Larghezza del Logo", - "language" : "Lingua", - "buttonColor" : "Colore Pulsante", - "buttonTextColor" : "Colore Testo Pulsante", - "headerColor" : "Colore Intestazione", - "headerTextColor" : "Colore Testo Intestazione", - "twitterAccount" : "Account Twitter", - "googleAnalyticsId" : "Google Analytics ID", - "mixpanelId" : "Mixpanel ID", - "clickyId" : "Clicky ID", - "notes" : "Note", - "fontUrl" : "URL Carattere", - "fontFamily" : "Famiglia Carattere", - "authMethods" : "Metodi di Autenticazione", - "siteImage" : "Immagine del Sito", - "general" : "Generico", - "invites" : "Inviti", - "scoring" : "Punteggio", - "logo" : "Logo", - "extras" : "Extra", - "colors" : "Colori", - "integrations" : "Integrazioni" -} \ No newline at end of file diff --git a/packages/nova-settings/i18n/ja.i18n.json b/packages/nova-settings/i18n/ja.i18n.json deleted file mode 100644 index 7a73a41bf..000000000 --- a/packages/nova-settings/i18n/ja.i18n.json +++ /dev/null @@ -1,2 +0,0 @@ -{ -} \ No newline at end of file diff --git a/packages/nova-settings/i18n/kk.i18n.json b/packages/nova-settings/i18n/kk.i18n.json deleted file mode 100644 index 7a73a41bf..000000000 --- a/packages/nova-settings/i18n/kk.i18n.json +++ /dev/null @@ -1,2 +0,0 @@ -{ -} \ No newline at end of file diff --git a/packages/nova-settings/i18n/ko.i18n.json b/packages/nova-settings/i18n/ko.i18n.json deleted file mode 100644 index e14765f9c..000000000 --- a/packages/nova-settings/i18n/ko.i18n.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "title" : "제목", - "siteUrl" : "사이트 URL", - "tagline" : "태그 라인", - "defaultEmail" : "기본 이메일", - "logoUrl" : "로고 URL", - "logoHeight" : "로고 세로길이", - "logoWidth" : "로고 가로길이", - "language" : "언어", - "fontUrl" : "폰트 URL", - "fontFamily" : "폰트 (Font Family)", - "faviconUrl" : "파비콘 URL", - "mailURL" : "메일주소(URL)", - "logo" : "로고" -} \ No newline at end of file diff --git a/packages/nova-settings/i18n/lv-LV.i18n.json b/packages/nova-settings/i18n/lv-LV.i18n.json deleted file mode 100644 index 7a73a41bf..000000000 --- a/packages/nova-settings/i18n/lv-LV.i18n.json +++ /dev/null @@ -1,2 +0,0 @@ -{ -} \ No newline at end of file diff --git a/packages/nova-settings/i18n/lv.i18n.json b/packages/nova-settings/i18n/lv.i18n.json deleted file mode 100644 index 7a73a41bf..000000000 --- a/packages/nova-settings/i18n/lv.i18n.json +++ /dev/null @@ -1,2 +0,0 @@ -{ -} \ No newline at end of file diff --git a/packages/nova-settings/i18n/nl.i18n.json b/packages/nova-settings/i18n/nl.i18n.json deleted file mode 100644 index 39a065c42..000000000 --- a/packages/nova-settings/i18n/nl.i18n.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "title" : "Titel", - "description" : "Beschrijving", - "siteUrl" : "Website adres", - "tagline" : "Onderschrift", - "requireViewInvite" : "Uitnodiging verplicht om te lezen", - "requirePostInvite" : "Uitnodiging verplicht om te plaatsen", - "requirePostsApproval" : "Goedkeuring nieuwe artikel", - "defaultEmail" : "Standaard Email", - "scoreUpdateInterval" : "Score verversen interval", - "defaultView" : "Normale weergave", - "postInterval" : "Artikel interval", - "commentInterval" : "Reacties interval", - "maxPostsPerDay" : "Max. artikelen per dag", - "startInvitesCount" : "Begin aantal uitnodigingen", - "postsPerPage" : "Artikelen per pagina", - "logoUrl" : "Logo URL", - "logoHeight" : "Logo hoogte", - "logoWidth" : "Logo breedte", - "language" : "Taal", - "backgroundCSS" : "Achtergrond CSS", - "buttonColor" : "Knop kleur", - "buttonTextColor" : "Knop tekst kleur", - "headerColor" : "Kop kleur", - "headerTextColor" : "Kop tekst kleur", - "twitterAccount" : "Twitter account", - "googleAnalyticsId" : "Google Analytics ID", - "mixpanelId" : "Mixpanel ID", - "clickyId" : "Clicky ID", - "footerCode" : "Footer code", - "extraCode" : "Extra code", - "emailFooter" : "Email footer", - "notes" : "Notities", - "debug" : "Debug modus", - "fontUrl" : "Lettertype URL", - "fontFamily" : "Lettertype familie", - "authMethods" : "Authenticatie methoden", - "faviconUrl" : "Favicon URL", - "mailURL" : "Mail URL", - "postsLayout" : "Artikelen weergave", - "general" : "Algemeen", - "invites" : "Uitnodigingen", - "scoring" : "Score", - "logo" : "Logo", - "extras" : "Extras", - "colors" : "Kleuren", - "integrations" : "Integraties" -} \ No newline at end of file diff --git a/packages/nova-settings/i18n/pl.i18n.json b/packages/nova-settings/i18n/pl.i18n.json deleted file mode 100644 index 4a42a86fc..000000000 --- a/packages/nova-settings/i18n/pl.i18n.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "title" : "Tytuł", - "siteUrl" : "URL strony", - "tagline" : "Podtytuł", - "requireViewInvite" : "Wymagaj zaproszenia żeby przeglądać", - "requirePostInvite" : "Wymagaj zaproszenia żeby pisać", - "requirePostsApproval" : "Zatwierdzanie nowych postów", - "defaultEmail" : "Standardowy Email", - "scoreUpdateInterval" : "Częstotliwość przeliczania punktów", - "defaultView" : "Standardowy widok", - "postInterval" : "Interwał czasowy dla nowych postów", - "commentInterval" : "Interwał czasowy dla nowych komentarzy", - "maxPostsPerDay" : "Maksymalna liczba postów w jednym dniu", - "startInvitesCount" : "Licznik zaproszeń", - "postsPerPage" : "Postów na stronę", - "logoUrl" : "URL Logo", - "logoHeight" : "Wysokość Logo", - "logoWidth" : "Szerokość Logo", - "language" : "Język", - "backgroundCSS" : "Tło CSS", - "buttonColor" : "Kolor przycisków", - "buttonTextColor" : "Kolor tekstu na przyciskach", - "headerColor" : "Kolor dla nagłówka", - "headerTextColor" : "Kolor tekstu dla nagłówka", - "twitterAccount" : "Konto Twitter", - "googleAnalyticsId" : "Google Analytics ID", - "mixpanelId" : "Mixpanel ID", - "clickyId" : "Clicky ID", - "footerCode" : "Kod w stopce", - "extraCode" : "Dodatkowy kod", - "emailFooter" : "Stopka Email", - "notes" : "Notatki", - "debug" : "Debug Mode", - "general" : "Główne", - "invites" : "Zaproszenia", - "scoring" : "Scoring", - "logo" : "Logo", - "extras" : "Extras", - "colors" : "Kolory", - "integrations" : "Integracje" -} \ No newline at end of file diff --git a/packages/nova-settings/i18n/pt-BR.i18n.json b/packages/nova-settings/i18n/pt-BR.i18n.json deleted file mode 100644 index 70cdceb2e..000000000 --- a/packages/nova-settings/i18n/pt-BR.i18n.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "title" : "Título", - "description" : "Descrição", - "siteUrl" : "URL do site", - "tagline" : "Tagline", - "requireViewInvite" : "Exigir Convite para Ver", - "requirePostInvite" : "Exigir Convite para Postar", - "requirePostsApproval" : "Exigir Postagens serem Aprovadas", - "defaultEmail" : "Email Padrão", - "scoreUpdateInterval" : "Definir Intervalo de Atualização", - "defaultView" : "Visão Padrão", - "postInterval" : "Intervalo de Postagens", - "commentInterval" : "Intervalo de Comentários", - "maxPostsPerDay" : "Máx de Postagens Por Dia", - "startInvitesCount" : "Número Inicial de Convites", - "postsPerPage" : "Postagens Por Página", - "logoUrl" : "URL do Logo", - "logoHeight" : "Altura do Logo", - "logoWidth" : "Comprimento do Logo", - "language" : "Linguagem", - "backgroundCSS" : "Background CSS", - "buttonColor" : "Cor do Botão", - "buttonTextColor" : "Cor do Texto do Botão", - "headerColor" : "Cor do Cabeçalho", - "headerTextColor" : "Cor do Texto do Cabeçalho", - "twitterAccount" : "Conta do Twitter", - "googleAnalyticsId" : "ID do Google Analytics", - "mixpanelId" : "ID do Mixpanel", - "clickyId" : "ID do Clicky", - "footerCode" : "Código para o Rodapé", - "extraCode" : "Código Extra", - "emailFooter" : "Rodapé do Email", - "notes" : "Notas", - "debug" : "Modo de Debug", - "fontUrl" : "URL da Fonte", - "fontFamily" : "Família da Fonte", - "authMethods" : "Métodos de Autenticação", - "faviconUrl" : "URL do Favicon", - "mailURL" : "MailURL", - "postsLayout" : "Layout dos Posts", - "general" : "Geral", - "invites" : "Convites", - "scoring" : "Classificação", - "logo" : "Logo", - "extras" : "Extras", - "colors" : "Cores", - "integrations" : "Integrações" -} \ No newline at end of file diff --git a/packages/nova-settings/i18n/ro.i18n.json b/packages/nova-settings/i18n/ro.i18n.json deleted file mode 100644 index 1cc7e18b0..000000000 --- a/packages/nova-settings/i18n/ro.i18n.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "title" : "Titlu", - "invites" : "Invitații trimise" -} \ No newline at end of file diff --git a/packages/nova-settings/i18n/ru.i18n.json b/packages/nova-settings/i18n/ru.i18n.json deleted file mode 100644 index 6307b357a..000000000 --- a/packages/nova-settings/i18n/ru.i18n.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "title" : "Название", - "siteUrl" : "URL сайта", - "tagline" : "Теги", - "requireViewInvite" : "Требуется инвайт для Вида", - "requirePostInvite" : "Требуется инвайт для поста", - "requirePostsApproval" : "Нужно утвердить посты", - "defaultEmail" : "Email по-умолчанию", - "scoreUpdateInterval" : "Интервал обновления очков", - "defaultView" : "Вид по-умолчанию", - "postInterval" : "Интервал между постами", - "commentInterval" : "Интервал между комментариями", - "maxPostsPerDay" : "Максимум постов за день", - "startInvitesCount" : "Приглашает к старту счёта", - "postsPerPage" : "Постов на странице", - "logoUrl" : "URL лого", - "logoHeight" : "Высота лого", - "logoWidth" : "Ширина лого", - "language" : "Язык", - "backgroundCSS" : "CSS фона", - "buttonColor" : "Цвет кнопок", - "buttonTextColor" : "Цвет текста кнопок", - "headerColor" : "Цвет заголовка", - "headerTextColor" : "Цвет текста заголовка", - "twitterAccount" : "Twitter аккаунт", - "googleAnalyticsId" : "Google Analytics ID", - "mixpanelId" : "Mixpanel ID", - "clickyId" : "Clicky ID", - "footerCode" : "Код футера", - "extraCode" : "Дополнительный код", - "emailFooter" : "Email футер", - "notes" : "Замечания", - "debug" : "Режим отладки", - "general" : "Главная", - "invites" : "Инвайты", - "scoring" : "Очки", - "logo" : "Лого", - "extras" : "Дополнения", - "colors" : "Цвета", - "integrations" : "Интеграции" -} \ No newline at end of file diff --git a/packages/nova-settings/i18n/se.i18n.json b/packages/nova-settings/i18n/se.i18n.json deleted file mode 100644 index 1723c9c25..000000000 --- a/packages/nova-settings/i18n/se.i18n.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "title" : "Titel", - "siteUrl" : "Hemside-URL", - "tagline" : "Tagline", - "requireViewInvite" : "Inbjudning krävs för att se", - "requirePostInvite" : "Inbjudning krävs för att skapa inlägg", - "requirePostsApproval" : "Inlägg måste godkännas", - "defaultEmail" : "Standard-E-post", - "scoreUpdateInterval" : "Poänguppdateringsintervall", - "defaultView" : "Standardvy", - "postInterval" : "Inläggsintervall", - "commentInterval" : "Kommentarsinterval", - "maxPostsPerDay" : "Max-inlägg per dag", - "startInvitesCount" : "Startantal för inbjudningar", - "postsPerPage" : "Inlägg per sida", - "logoUrl" : "Logotyp-URL", - "logoHeight" : "Logotyphöjd", - "logoWidth" : "Logotypvidd", - "language" : "Språk", - "backgroundCSS" : "Bakgrunds-CSS", - "buttonColor" : "Knappfärg", - "buttonTextColor" : "Knapptextfärg", - "headerColor" : "Titelområdesfärg", - "headerTextColor" : "Titeltextfärg", - "twitterAccount" : "Twitter-konto", - "googleAnalyticsId" : "Google Analytics ID", - "mixpanelId" : "Mixpanel ID", - "clickyId" : "Clicky ID", - "footerCode" : "Sidfotskod", - "extraCode" : "Extrakod", - "emailFooter" : "Sidfotens E-post", - "notes" : "Anteckningar", - "debug" : "Debug-läge", - "general" : "Allmänt", - "invites" : "Inbjudningar", - "scoring" : "Poäng", - "logo" : "Logga", - "extras" : "Extra", - "colors" : "Färger", - "integrations" : "Integrationer" -} \ No newline at end of file diff --git a/packages/nova-settings/i18n/sl.i18n.json b/packages/nova-settings/i18n/sl.i18n.json deleted file mode 100644 index 65be88982..000000000 --- a/packages/nova-settings/i18n/sl.i18n.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "settings_saved" : "Nastavitve so shranjene", - "title" : "Naslov", - "description" : "Opis", - "siteUrl" : "URL Spletne Strani", - "tagline" : "Naslovno geslo", - "requireViewInvite" : "Zahtevaj Vabilo za Ogled", - "requirePostInvite" : "Zahtevajo Vabilo na Objavo", - "requirePostsApproval" : "Zahtevaj Potrdilo Objave", - "defaultEmail" : "Privzeti Email", - "scoreUpdateInterval" : "Interval Posodobitve Števila Glasov", - "defaultView" : "Privzeti Pogled", - "postInterval" : "Interval Objav", - "commentInterval" : "Interval Komentarjev", - "maxPostsPerDay" : "Max Prispevkov na Dan", - "startInvitesCount" : "Začetno Stanje Vabil", - "postsPerPage" : "Objav na Stran", - "logoUrl" : "URL Logotipa", - "logoHeight" : "Višina Logotipa", - "logoWidth" : "Širina Logotipa", - "language" : "Jezik", - "backgroundCSS" : "CSS Ozadja", - "buttonColor" : "Barva Gumbov", - "buttonTextColor" : "Barva Besedila na Gumbih", - "headerColor" : "Barva Glave", - "headerTextColor" : "Barva Besedila v Glavi", - "twitterAccount" : "Twitter Račun", - "googleAnalyticsId" : "Google Analytics ID", - "mixpanelId" : "Mixpanel ID", - "clickyId" : "Clicky ID", - "footerCode" : "Koda v Nogi", - "extraCode" : "Dodatna Koda", - "extraCSS" : "Dodaten CSS", - "emailFooter" : "Noga Emaila", - "notes" : "Opombe", - "debug" : "Debug Način", - "fontUrl" : "URL Pisave", - "fontFamily" : "Družina Pisave", - "authMethods" : "Metode Preverjanja Pristnosti", - "faviconUrl" : "Favicon URL", - "mailURL" : "MailURL", - "postsLayout" : "Razporeditev Objav", - "siteImage" : "Slika Strani", - "accentColor" : "Barva poudarkov", - "accentContrastColor" : "Kontrast barve poudarkov", - "secondaryColor" : "Sekundarna barva", - "secondaryContrastColor" : "Kontrast senkundarne barve", - "postViews" : "Pregledi objav", - "navLayout" : "Postavitev navigacije", - "mailUrl" : "URL Pošte", - "general" : "Splošno", - "invites" : "Vabila", - "scoring" : "Točkovanje", - "logo" : "Logo", - "extras" : "Dodatno", - "colors" : "Barve", - "integrations" : "Integracije" -} \ No newline at end of file diff --git a/packages/nova-settings/i18n/sv.i18n.json b/packages/nova-settings/i18n/sv.i18n.json deleted file mode 100644 index d736f5b9d..000000000 --- a/packages/nova-settings/i18n/sv.i18n.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "settings_saved" : "Inställningar sparade", - "title" : "Titel", - "description" : "Beskrivning", - "siteUrl" : "Webbadress", - "tagline" : "Tagline", - "requireViewInvite" : "Kräv inbjudning för att visa", - "requirePostInvite" : "Kräv inbjudan för att göra inlägg", - "requirePostsApproval" : "Kräv att inlägg granskas", - "defaultEmail" : "Standard E-post", - "scoreUpdateInterval" : "Uppdateringsintervall för poäng", - "defaultView" : "Standardvy", - "postInterval" : "Inläggsintervall", - "commentInterval" : "Kommentarsintervall", - "maxPostsPerDay" : "Max inlägg per dag", - "startInvitesCount" : "Antal inbjudningar från början", - "postsPerPage" : "Inlägg per sida", - "logoUrl" : "Logga-adress", - "logoHeight" : "Loggahöjd", - "logoWidth" : "Loggabredd", - "language" : "Språk", - "backgroundCSS" : "Bakgrounds-CSS", - "buttonColor" : "Knappfärg", - "buttonTextColor" : "Knapptextfärg", - "headerColor" : "Titelbakgrundsfärg", - "headerTextColor" : "Titeltextfärg", - "twitterAccount" : "Twitter-konto", - "googleAnalyticsId" : "Google Analytics-ID", - "mixpanelId" : "Mixpanel-ID", - "clickyId" : "Clicky-ID", - "footerCode" : "Sidfotskod", - "extraCode" : "Extrakod", - "extraCSS" : "Extra CSS", - "emailFooter" : "E-post-sidfot", - "notes" : "Anteckningar", - "debug" : "Debugläge", - "fontUrl" : "Teckensnittsadress", - "fontFamily" : "Teckensnitt", - "authMethods" : "Autentiseringsmetoder", - "faviconUrl" : "Favicon-webbadress", - "mailURL" : "MailURL", - "postsLayout" : "Inläggslayout", - "siteImage" : "Site-bild", - "accentColor" : "Accentfärg", - "accentContrastColor" : "Accentkontrastfärg", - "secondaryColor" : "Sekundär färg", - "secondaryContrastColor" : "Sekundär kontrastfärg", - "postViews" : "Inläggsvisningar", - "navLayout" : "Navigeringslayout", - "mailUrl" : "E-postadress", - "general" : "Allmänt", - "invites" : "Inbjudningar", - "scoring" : "Poängsättning", - "logo" : "Logga", - "extras" : "Extra", - "colors" : "Färger", - "integrations" : "Integrationer" -} \ No newline at end of file diff --git a/packages/nova-settings/i18n/th.i18n.json b/packages/nova-settings/i18n/th.i18n.json deleted file mode 100644 index 9edc0ae20..000000000 --- a/packages/nova-settings/i18n/th.i18n.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "title" : "ชื่อเรื่อง" -} \ No newline at end of file diff --git a/packages/nova-settings/i18n/tr-TR.i18n.json b/packages/nova-settings/i18n/tr-TR.i18n.json deleted file mode 100644 index 7a73a41bf..000000000 --- a/packages/nova-settings/i18n/tr-TR.i18n.json +++ /dev/null @@ -1,2 +0,0 @@ -{ -} \ No newline at end of file diff --git a/packages/nova-settings/i18n/tr.i18n.json b/packages/nova-settings/i18n/tr.i18n.json deleted file mode 100644 index dc1f821e1..000000000 --- a/packages/nova-settings/i18n/tr.i18n.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "title" : "Başlık", - "description" : "Tanım", - "defaultView" : "Varsayılan Görüntü", - "postInterval" : "Gönderi Aralığı", - "commentInterval" : "Yorum Aralığı\n", - "maxPostsPerDay" : "Maksimum Günlük Ortalama", - "postsPerPage" : "Sayfa Başına Mesaj", - "language" : "Dil", - "backgroundCSS" : "Arkaplan CSS", - "buttonColor" : "Buton Renkleri\n", - "buttonTextColor" : "Buton Metin Rengi\n", - "twitterAccount" : "Twitter Hesabı", - "googleAnalyticsId" : "Google Analytics Kimliği", - "extraCSS" : "Ek CSS", - "siteImage" : "Site imgesi", - "secondaryColor" : "İkincil Renk", - "secondaryContrastColor" : "İkincil Kontrast Rengi", - "invites" : "Davetiyeler", - "enableDownvotes" : "Aşağı oylamaları etkinleştir", - "RSSLinksPointTo" : "RSS bağlantılarının gösterdiği yer", - "loadMoreBehavior" : "\"Daha çok yükle\" Davranışı" -} \ No newline at end of file diff --git a/packages/nova-settings/i18n/vi.i18n.json b/packages/nova-settings/i18n/vi.i18n.json deleted file mode 100644 index d7ae4b827..000000000 --- a/packages/nova-settings/i18n/vi.i18n.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "title" : "Tiêu đề", - "siteUrl" : "Địa chỉ URL", - "invites" : "Mời" -} \ No newline at end of file diff --git a/packages/nova-settings/i18n/zh-CN.i18n.json b/packages/nova-settings/i18n/zh-CN.i18n.json deleted file mode 100644 index dc23c37a8..000000000 --- a/packages/nova-settings/i18n/zh-CN.i18n.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "title" : "标题", - "invites" : "邀请" -} \ No newline at end of file diff --git a/packages/nova-settings/lib/collection.js b/packages/nova-settings/lib/collection.js deleted file mode 100644 index 3858bd958..000000000 --- a/packages/nova-settings/lib/collection.js +++ /dev/null @@ -1,374 +0,0 @@ -import Telescope from 'meteor/nova:lib'; -import Users from 'meteor/nova:users'; - -const isInSettingsJSON = function () { - // settings can either be in settings json's public, or in the special object we publish only for admins for private settings - return typeof Telescope.settings.getFromJSON(this.name) !== "undefined" || typeof Telescope.settings.settingsJSON[this.name] !== "undefined"; -}; - -const getFromJSON = function () { - return Telescope.settings.getFromJSON(this.name) || Telescope.settings.settingsJSON[this.name]; -}; - -Telescope.settings.collection = new Mongo.Collection("settings"); - -const canEdit = user => Users.canDo(user, "settings.edit"); - -Telescope.settings.schema = new SimpleSchema({ - title: { - type: String, - optional: true, - insertableIf: canEdit, - editableIf: canEdit, - publish: true, - form: { - disabled: isInSettingsJSON, - prefill: getFromJSON, - instructions: "Your site's title.", - group: "01_general" - } - }, - siteUrl: { - type: String, - optional: true, - publish: true, - // regEx: SimpleSchema.RegEx.Url, - insertableIf: canEdit, - editableIf: canEdit, - form: { - disabled: isInSettingsJSON, - prefill: getFromJSON, - group: "01_general", - type: "bootstrap-url", - instructions: 'Your site\'s URL (with trailing "/"). Will default to Meteor.absoluteUrl()' - } - }, - tagline: { - type: String, - optional: true, - publish: true, - insertableIf: canEdit, - editableIf: canEdit, - form: { - disabled: isInSettingsJSON, - prefill: getFromJSON, - group: "01_general" - } - }, - description: { - type: String, - optional: true, - publish: true, - insertableIf: canEdit, - editableIf: canEdit, - form: { - disabled: isInSettingsJSON, - prefill: getFromJSON, - group: "01_general", - rows: 5, - instructions: 'A short description used for SEO purposes.' - } - }, - siteImage: { - type: String, - optional: true, - publish: true, - insertableIf: canEdit, - editableIf: canEdit, - regEx: SimpleSchema.RegEx.Url, - form: { - disabled: isInSettingsJSON, - prefill: getFromJSON, - group: "01_general", - instructions: "URL to an image for the open graph image tag for all pages" - } - }, - requireViewInvite: { - type: Boolean, - optional: true, - publish: true, - insertableIf: canEdit, - editableIf: canEdit, - control: "checkbox", - form: { - disabled: isInSettingsJSON, - prefill: getFromJSON, - group: 'invites', - leftLabel: 'Require View Invite' - } - }, - requirePostInvite: { - type: Boolean, - optional: true, - publish: true, - insertableIf: canEdit, - editableIf: canEdit, - control: "checkbox", - form: { - disabled: isInSettingsJSON, - prefill: getFromJSON, - group: 'invites', - leftLabel: 'Require Post Invite' - } - }, - requirePostsApproval: { - type: Boolean, - optional: true, - publish: true, - insertableIf: canEdit, - editableIf: canEdit, - control: "checkbox", - form: { - disabled: isInSettingsJSON, - prefill: getFromJSON, - group: "01_general", - instructions: "Posts must be approved by admin", - leftLabel: "Require Posts Approval" - } - }, - defaultEmail: { - type: String, - optional: true, - insertableIf: canEdit, - editableIf: canEdit, - form: { - disabled: isInSettingsJSON, - prefill: getFromJSON, - group: "06_email", - instructions: 'The address all outgoing emails will be sent from.', - class: "private-field" - } - }, - mailUrl: { - type: String, - optional: true, - insertableIf: canEdit, - editableIf: canEdit, - form: { - disabled: isInSettingsJSON, - prefill: getFromJSON, - group: "06_email", - instructions: 'MAIL_URL environment variable (requires restart).', - class: "private-field" - } - }, - scoreUpdateInterval: { - type: Number, - optional: true, - defaultValue: 30, - insertableIf: canEdit, - editableIf: canEdit, - form: { - disabled: isInSettingsJSON, - prefill: getFromJSON, - group: '01_general', - instructions: 'How often to recalculate scores, in seconds (default to 30)', - class: "private-field" - } - }, - postInterval: { - type: Number, - optional: true, - publish: true, - defaultValue: 30, - insertableIf: canEdit, - editableIf: canEdit, - form: { - disabled: isInSettingsJSON, - prefill: getFromJSON, - group: "02_posts", - instructions: 'Minimum time between posts, in seconds (defaults to 30)' - } - }, - RSSLinksPointTo: { - type: String, - optional: true, - publish: true, - insertableIf: canEdit, - editableIf: canEdit, - control: "radiogroup", - form: { - disabled: isInSettingsJSON, - prefill: getFromJSON, - group: "02_posts", - options: [ - {value: 'page', label: 'Discussion page'}, - {value: 'link', label: 'Outgoing link'} - ] - } - }, - commentInterval: { - type: Number, - optional: true, - publish: true, - defaultValue: 15, - insertableIf: canEdit, - editableIf: canEdit, - form: { - disabled: isInSettingsJSON, - prefill: getFromJSON, - group: "03_comments", - instructions: 'Minimum time between comments, in seconds (defaults to 15)' - } - }, - maxPostsPerDay: { - type: Number, - optional: true, - publish: true, - defaultValue: 30, - insertableIf: canEdit, - editableIf: canEdit, - form: { - disabled: isInSettingsJSON, - prefill: getFromJSON, - group: "02_posts", - instructions: 'Maximum number of posts a user can post in a day (default to 30).' - } - }, - startInvitesCount: { - type: Number, - defaultValue: 3, - optional: true, - publish: true, - insertableIf: canEdit, - editableIf: canEdit, - form: { - disabled: isInSettingsJSON, - prefill: getFromJSON, - group: 'invites' - } - }, - postsPerPage: { - type: Number, - defaultValue: 10, - optional: true, - publish: true, - insertableIf: canEdit, - editableIf: canEdit, - form: { - disabled: isInSettingsJSON, - prefill: getFromJSON, - group: "02_posts" - } - }, - logoUrl: { - type: String, - optional: true, - publish: true, - insertableIf: canEdit, - editableIf: canEdit, - form: { - disabled: isInSettingsJSON, - prefill: getFromJSON, - group: "04_logo" - } - }, - logoHeight: { - type: Number, - optional: true, - publish: true, - insertableIf: canEdit, - editableIf: canEdit, - form: { - disabled: isInSettingsJSON, - prefill: getFromJSON, - group: "04_logo" - } - }, - logoWidth: { - type: Number, - optional: true, - publish: true, - insertableIf: canEdit, - editableIf: canEdit, - form: { - disabled: isInSettingsJSON, - prefill: getFromJSON, - group: "04_logo" - } - }, - faviconUrl: { - type: String, - optional: true, - publish: true, - insertableIf: canEdit, - editableIf: canEdit, - form: { - disabled: isInSettingsJSON, - prefill: getFromJSON, - group: "04_logo" - } - }, - // language: { - // type: String, - // defaultValue: 'en', - // optional: true, - // insertableIf: canEdit, - // editableIf: canEdit, - // form: { - // group: "01_general", - // instructions: 'The app\'s language. Defaults to English.', - // options: function () { - // var languages = _.map(TAPi18n.getLanguages(), function (item, key) { - // return { - // value: key, - // label: item.name - // }; - // }); - // return languages; - // } - // } - // }, - twitterAccount: { - type: String, - optional: true, - publish: true, - insertableIf: canEdit, - editableIf: canEdit, - form: { - disabled: isInSettingsJSON, - prefill: getFromJSON, - group: "07_integrations" - } - }, - facebookPage: { - type: String, - optional: true, - publish: true, - insertableIf: canEdit, - editableIf: canEdit, - form: { - disabled: isInSettingsJSON, - prefill: getFromJSON, - group: "07_integrations" - } - }, - googleAnalyticsId: { - type: String, - optional: true, - publish: true, - insertableIf: canEdit, - editableIf: canEdit, - form: { - disabled: isInSettingsJSON, - prefill: getFromJSON, - group: "07_integrations" - } - }, - locale: { - type: String, - optional: true, - publish: true, - insertableIf: canEdit, - editableIf: canEdit, - form: { - disabled: isInSettingsJSON, - prefill: getFromJSON, - group: "01_general" - } - } -}); - -Telescope.settings.collection.attachSchema(Telescope.settings.schema); - -Telescope.subscriptions.preload("settings"); \ No newline at end of file diff --git a/packages/nova-settings/lib/init.js b/packages/nova-settings/lib/init.js deleted file mode 100644 index e8da188c9..000000000 --- a/packages/nova-settings/lib/init.js +++ /dev/null @@ -1,7 +0,0 @@ -import Telescope from 'meteor/nova:lib'; - -Meteor.startup(function () { - if (Telescope.settings.collection.find().count() === 0) { - Telescope.settings.collection.insert({}); - } -}); \ No newline at end of file diff --git a/packages/nova-settings/lib/methods.js b/packages/nova-settings/lib/methods.js deleted file mode 100644 index 9800a3fc7..000000000 --- a/packages/nova-settings/lib/methods.js +++ /dev/null @@ -1,39 +0,0 @@ -import Telescope from 'meteor/nova:lib'; -import Users from 'meteor/nova:users'; - -Telescope.settings.collection.smartMethods({ - editName: "settings.edit" -}); - -Meteor.methods({ - "settings.getJSON": function () { - if (Users.isAdminById(this.userId)) { - return Meteor.settings; - } else { - return {}; - } - }, - "settings.exportToJSON": function () { - if (Users.isAdminById(this.userId)) { - let settings = Telescope.settings.collection.findOne(); - const schema = Telescope.settings.collection.simpleSchema()._schema; - const publicFields = Telescope.settings.collection.getPublicFields(); - delete settings._id; - settings.public = {}; - _.forEach(settings, (field, key) => { - if (_.contains(publicFields, key)) { - settings.public[key] = field; - delete settings[key]; - } - }); - console.log(JSON.stringify(settings, null, 2)); - return settings; - } - }, - "settings.clear": function () { - if (Users.isAdminById(this.userId)) { - const settings = Telescope.settings.collection.findOne(); - Telescope.settings.collection.update(settings._id, {}, {validate: false}); - } - } -}) \ No newline at end of file diff --git a/packages/nova-settings/lib/server/publications.js b/packages/nova-settings/lib/server/publications.js deleted file mode 100644 index e9d88cd13..000000000 --- a/packages/nova-settings/lib/server/publications.js +++ /dev/null @@ -1,29 +0,0 @@ -// import Telescope from 'meteor/nova:lib'; -// import Users from 'meteor/nova:users'; - -// Meteor.publish('settings', function() { -// var options = {}; -// var privateFields = {}; - -// // look at Settings.simpleSchema._schema to see which fields should be kept private -// _.each(Telescope.settings.collection.simpleSchema()._schema, (property, key) => { -// if (property.private) -// privateFields[key] = false; -// }); - -// options = _.extend(options, { -// fields: privateFields -// }); - -// return Telescope.settings.collection.find({}, options); -// }); - -// Telescope.settings.collection.smartPublish('settings'); - -// Meteor.publish('settings.admin', function() { -// if (Users.isAdminById(this.userId)) { -// return Telescope.settings.collection.find({}, {}); -// } else { -// return []; -// } -// }); diff --git a/packages/nova-settings/package.js b/packages/nova-settings/package.js deleted file mode 100644 index c204683e5..000000000 --- a/packages/nova-settings/package.js +++ /dev/null @@ -1,27 +0,0 @@ -Package.describe({ - name: "nova:settings", - summary: "Telescope settings package – only necessary if you're storing settings in a collection", - version: "0.27.4-nova", - git: "https://github.com/TelescopeJS/Telescope.git" -}); - -Package.onUse(function(api) { - - api.versionsFrom(['METEOR@1.0']); - - api.use([ - 'nova:lib@0.27.4-nova', - 'nova:users@0.27.4-nova' - ]); - - api.addFiles([ - 'lib/collection.js', - 'lib/methods.js', - ], ['server', 'client']); - - api.addFiles([ - 'lib/init.js', - 'lib/server/publications.js', - ], 'server'); - -});