Skip to content

Commit 74e44ad

Browse files
authored
Merge pull request #35 from stevenlabrie/StevensBranch
Completely packaged notarized and distributed QLens 1.0
2 parents 2254caa + f5fe532 commit 74e44ad

File tree

8 files changed

+33
-49
lines changed

8 files changed

+33
-49
lines changed

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
node_modules/
22
dist/
3-
electron-builder.json
3+
electron-builder.json
4+
.env
5+
notarize.js
6+
entitlements.plist
7+
build-res/

app/src/Components/MongoDBURI.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
import React, { useState, useEffect } from "react"; // userEffect to fetch instead of component mount
1+
import React, {useState,useEffect} from "react"; // userEffect to fetch instead of component mount
22
import '../public/index.css';
33

44
// input field for the mongoDB uri
5-
const MongoDBURI = ({schemaData, uriData, submitbtn, geturi}) => {
5+
const MongoDBURI = ({submitbtn, geturi, toggleInput}) => {
66
return (
77
<div className="formContainer">
88
<div className="formClass">
99
<form className="form__group field">
10-
<input className="form__field" type="input" onChange={geturi} id='name' placeholder=" Input Your MongoDB URI"/>
10+
<input className="form__field" type="input" onChange= {geturi} id='name' placeholder=" Input Your MongoDB URI" disabled={toggleInput}/>
1111
<label className="form__label"> MongoDB URI </label>
1212
<input className="URISubmitButton" type="submit" value="Submit" onClick={submitbtn} style={{display: "none"}}/>
1313
</form>

app/src/Components/MongoSchemaIDE.js

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ const _ = require('lodash');
1212
const MongoSchemaIDE = ({schemaData, selectedSchemaData, graphQLSchema}) => {
1313
const [data, setData] = useState([]);
1414
const [graphData, setGraphData] = useState({});
15-
// console.log('SELECTED SCHEMAS WOAAAAA', graphQLSchema);
16-
// console.log("UPDATED ROOTQUERY OBJ+++", graphQLSchema)
1715
// iterates over the graphQLSchema and removes the double quotes
1816
const eliminateQuotes = (obj) => {
1917
let str = '';
@@ -22,9 +20,9 @@ const MongoSchemaIDE = ({schemaData, selectedSchemaData, graphQLSchema}) => {
2220
}
2321
return str;
2422
}
23+
// function creates a new line to format the schemas
2524
const newLinePillar = (str) => {
2625
if (str === undefined) return;
27-
// console.log(str);
2826
let newStr = '';
2927
let array = str.split('');
3028
for (let i = 0; i < array.length; i+=1) {
@@ -39,6 +37,7 @@ const MongoSchemaIDE = ({schemaData, selectedSchemaData, graphQLSchema}) => {
3937
}
4038
return newStr;
4139
}
40+
// adds a new line where there is a comma
4241
const newLineComma = (str) => {
4342
let newStr = '';
4443
let array = str.split('');
@@ -63,18 +62,13 @@ const MongoSchemaIDE = ({schemaData, selectedSchemaData, graphQLSchema}) => {
6362
const newTypes = eliminateQuotes(graphQLSchema.types);
6463
const newQueries = eliminateQuotes(graphQLSchema.queries);
6564
const commaLessMutation = eliminateQuotes(graphQLSchema.mutation);
66-
// const typeQ = newLinePillar(newTypes);
6765
const rootQ = newLinePillar(newQueries);
6866
const formattedTypes = newLinePillar(newTypes);
6967
const rootM = newLinePillar(commaLessMutation);
70-
// const typeOutput = newLineComma(newTypes);
71-
// const mutationNL = newLineComma(commaLessMutation);
7268
const combineQueries = (query1, query2, query3) => {
7369
return query1 + query2 + query3;
7470
}
7571
const combined = combineQueries(formattedTypes, rootQ, rootM);
76-
// console.log('ROOTQ =========>', rootQ)
77-
// const newS =
7872
return(
7973
<div className="codeboxContainer">
8074
<Tabs>
@@ -96,8 +90,6 @@ const MongoSchemaIDE = ({schemaData, selectedSchemaData, graphQLSchema}) => {
9690
lineWrapping: true,
9791
theme: 'dracula',
9892
lineNumbers: true,
99-
// lineSeparator: ",",
100-
// autoCloseBrackets: true,
10193
cursorScrollMargin: 48,
10294
indentUnit: 2,
10395
tabSize: 2,
@@ -118,13 +110,12 @@ const MongoSchemaIDE = ({schemaData, selectedSchemaData, graphQLSchema}) => {
118110
lineWrapping: true,
119111
theme: 'dracula',
120112
lineNumbers: true,
121-
// autoCloseBrackets: true,
122113
cursorScrollMargin: 48,
123114
indentUnit: 2,
124115
tabSize: 2,
125116
styleActiveLine: true,
126117
smartIndent: true,
127-
// lineSeparator: ",",
118+
128119
}}
129120
/>
130121
</div>

app/src/public/codemirror.css

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,4 @@
11

2-
/* .codeboxContainer {
3-
display: grid;
4-
grid-template-columns: 1fr 1fr;
5-
grid-template-rows: 1fr;
6-
gap: 0px 0px;
7-
grid-template-areas:
8-
". .";
9-
height: 75vh;
10-
} */
11-
122
.codebox {
133
border: 1px solid black;
144
}

app/src/public/custom-tree.css

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,4 @@
1010

1111
.node__leaf > circle {
1212
fill: green;
13-
14-
/* Let's also make the radius of leaf nodes larger */
1513
}

electron-builder.json

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
{
22
"appId": "com.QLens.app",
3-
"publish":
3+
"afterSign": "notarize.js",
4+
"publish": [
45
{
5-
"provider": "github",
6-
"token": "0b26911bfe3e37f5cb71f9f06525494dabc5548e"
7-
},
6+
"provider": "github",
7+
"owner": "oslabs-beta",
8+
"repo": "QLens",
9+
"token": "680c09ac62533c95f7cf3c593e0474363be3eff8"
10+
}
11+
],
812
"asar": true,
913
"productName": "QLens",
1014
"directories": {
@@ -29,6 +33,7 @@
2933
],
3034
"extraResources": ["./extraResources/**"],
3135
"dmg": {
36+
"sign": false,
3237
"background": null,
3338
"backgroundColor": "#ffffff",
3439
"window": {
@@ -50,7 +55,11 @@
5055
},
5156
"mac": {
5257
"target": "dmg",
53-
"category": "public.app-category.utilities"
58+
"category": "public.app-category.utilities",
59+
"hardenedRuntime": true,
60+
"gatekeeperAssess": false,
61+
"entitlements": "entitlements.plist",
62+
"entitlementsInherit": "entitlements.plist"
5463
},
5564
"win": {
5665
"target": "nsis"

package-lock.json

Lines changed: 3 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "QLens",
3-
"version": "1.0.0",
3+
"version": "1.0.1",
44
"description": "Open source tool to extract metadata from your MongoDB database to generate GraphQL schemas, resolvers and server setup, enhancing developer's productivity.",
55
"main": "app/electron.js",
66
"homepage": "./",
@@ -21,15 +21,12 @@
2121
"publish-lin": "npm run build && electron-builder -l --publish always",
2222
"deploy": "npm run build && electron-builder -mwl --publish always"
2323
},
24-
"repository": {
25-
"type": "git",
26-
"url": "git+https://github.com/stevenlabrie/QLens.git"
27-
},
24+
"repository": "github:oslabs-beta/QLens",
2825
"keywords": [],
2926
"author": {
3027
"name": "Judy Tan, Jake Diorio, Steven LaBrie, Cho Yee Win Aung",
3128
"email": "[email protected]",
32-
"url": "http://qlensapp.com/"
29+
"url": "https://qlensapp.com/"
3330
},
3431
"contributors": [
3532
{
@@ -91,9 +88,11 @@
9188
"codemirror": "^5.59.2",
9289
"cors": "^2.8.5",
9390
"d3": "^6.5.0",
91+
"dotenv": "^8.2.0",
9492
"electron-devtools-installer": "^3.1.1",
9593
"electron-fetch": "^1.7.3",
9694
"electron-is-dev": "^1.2.0",
95+
"electron-notarize": "^1.0.0",
9796
"electron-updater": "^4.3.5",
9897
"enzyme": "^3.11.0",
9998
"enzyme-adapter-react-16": "^1.15.6",

0 commit comments

Comments
 (0)