Skip to content

Commit

Permalink
chore: merge upstream/release-1.12.0
Browse files Browse the repository at this point in the history
  • Loading branch information
spencern committed May 21, 2018
2 parents c5c2902 + 7e3ad6e commit 410defd
Show file tree
Hide file tree
Showing 388 changed files with 14,364 additions and 9,182 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,5 @@ imports/plugins/custom/*
!imports/plugins/custom/.gitkeep

.reaction/config.json

coverage/*
1 change: 0 additions & 1 deletion .meteor/packages
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ juliancwirko:[email protected] # CSS post-processing plugin (replaces standard-mi
[email protected] # ReactiveDict whose contents are preserved across Hot Code Push
[email protected] # Meteor transparent reactive programming library
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
Expand Down
64 changes: 42 additions & 22 deletions .reaction/devserver/index.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
import { MongoClient } from "mongodb";
import express from "express";
import mongodb, { MongoClient } from "mongodb";
import createApolloServer from "../../imports/plugins/core/graphql/server/createApolloServer";
import defineCollections from "../../imports/plugins/core/graphql/server/defineCollections";
import methods from "./methods";
import defineCollections from "../../imports/collections/defineCollections";
import mutations from "../../imports/plugins/core/graphql/server/mutations";
import queries from "../../imports/plugins/core/graphql/server/queries";
import setUpFileCollections from "../../imports/plugins/core/files/server/no-meteor/setUpFileCollections";
import methods from "./methods";

const { MONGO_URL } = process.env;
const { MONGO_URL, ROOT_URL } = process.env;
if (!MONGO_URL) throw new Error("You must set MONGO_URL");
if (!ROOT_URL) throw new Error("You must set ROOT_URL");

const lastSlash = MONGO_URL.lastIndexOf("/");
const dbUrl = MONGO_URL.slice(0, lastSlash);
Expand All @@ -23,24 +27,40 @@ MongoClient.connect(dbUrl, (error, client) => {
mongoClient = client;
db = client.db(dbName);
defineCollections(db, collections);
});

/**
* This is a server for development of the GraphQL API without needing
* to run Meteor. After finishing development, you should still test
* the API changes through the Meteor app in case there are any differences.
*/
const app = createApolloServer({
context: {
collections,
methods,
queries
},
debug: true,
graphiql: true
});
const { downloadManager, Media } = setUpFileCollections({
absoluteUrlPrefix: ROOT_URL,
db,
Logger: { info: console.info.bind(console) },
MediaRecords: collections.MediaRecords,
mongodb
});

// Make the Media collection available to resolvers
collections.Media = Media;

/**
* This is a server for development of the GraphQL API without needing
* to run Meteor. After finishing development, you should still test
* the API changes through the Meteor app in case there are any differences.
*/
const app = createApolloServer({
context: {
collections,
methods,
mutations,
queries
},
debug: true,
graphiql: true
});

app.use("/assets/files", downloadManager.connectHandler);

app.use(express.static('public'))

app.listen(PORT, () => {
console.info(`GraphQL listening at http://localhost:${PORT}/graphql-alpha`);
console.info(`GraphiQL UI: http://localhost:${PORT}/graphiql`);
app.listen(PORT, () => {
console.info(`GraphQL listening at http://localhost:${PORT}/graphql-alpha`);
console.info(`GraphiQL UI: http://localhost:${PORT}/graphiql`);
});
});
2 changes: 1 addition & 1 deletion .snyk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities.
version: v1.11.0
version: v1.12.0
# ignores vulnerabilities until expiry date; change duration by modifying expiry date
ignore:
'npm:hoek:20180212':
Expand Down
6 changes: 3 additions & 3 deletions client/collections/countries.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Mongo } from "meteor/mongo";

/**
* Client side collections
* @ignore
* @name Countries
* @memberof Collections/ClientOnly
* @type {MongoCollection}
*/

export const Countries = new Mongo.Collection(null);
5 changes: 3 additions & 2 deletions client/collections/taxEntitycodes.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { Mongo } from "meteor/mongo";

/**
* Client side collections
* @ignore
* @name TaxEntityCodes
* @memberof Collections/ClientOnly
* @type {MongoCollection}
*/
export const TaxEntityCodes = new Mongo.Collection(null);
2 changes: 1 addition & 1 deletion client/modules/core/accounts.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import store from "store";
import Random from "@reactioncommerce/random";
import { Accounts } from "meteor/accounts-base";
import { Session } from "meteor/session";
import { Random } from "meteor/random";

/*
* registerLoginHandler
Expand Down
3 changes: 3 additions & 0 deletions client/modules/core/helpers/apps.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import { Packages, Shops } from "/lib/collections";
* @type {optionHash}
*
* @return {optionHash} returns an array of filtered, structure reactionApps
* ```
* [{
* enabled: true
* label: "Stripe"
Expand All @@ -40,6 +41,8 @@ import { Packages, Shops } from "/lib/collections";
* etc: "additional properties as defined in Packages.registry"
* ...
* }]
* ```
* @ignore
*/

export function Apps(optionHash) {
Expand Down
Loading

0 comments on commit 410defd

Please sign in to comment.