Skip to content

Commit 449c36f

Browse files
committed
Merge pull request #152 from 10gen/connect-updates
🚧 Connect updates
2 parents 903cc35 + 2347514 commit 449c36f

File tree

14 files changed

+175
-168
lines changed

14 files changed

+175
-168
lines changed

gulpfile.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,9 @@ gulp.task('build:pages', function() {
191191
* ## electron
192192
*/
193193
gulp.task('electron:start', function() {
194-
var child = spawn(path.resolve(platform.ELECTRON), []);
194+
var child = spawn(path.resolve(platform.ELECTRON), [], {
195+
env: process.env
196+
});
195197
child.stderr.pipe(process.stderr);
196198
child.stdout.pipe(process.stdout);
197199
child.on('exit', function(code) {

package.json

Lines changed: 36 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -71,80 +71,77 @@
7171
"ampersand-input-view": "^5.0.0",
7272
"ampersand-rest-collection": "^5.0.0",
7373
"debug": "^2.2.0",
74-
"electron-squirrel-startup": "^0.1.2",
74+
"electron-squirrel-startup": "^0.1.4",
7575
"mongodb-collection-model": "^0.1.0",
76-
"mongodb-connection-model": "^0.0.3",
77-
"mongodb-instance-model": "^0.2.0",
76+
"mongodb-connection-model": "^1.0.2",
77+
"mongodb-instance-model": "^0.2.3",
7878
"mongodb-ns": "^1.0.0",
79-
"scout-server": "http://bin.mongodb.org/js/scout-server/v0.2.4/scout-server-0.2.4.tar.gz"
79+
"scout-server": "http://bin.mongodb.org/js/scout-server/v0.3.1/scout-server-0.3.1.tar.gz"
8080
},
8181
"devDependencies": {
8282
"ampersand-app": "^1.0.4",
83-
"ampersand-collection": "^1.4.5",
83+
"ampersand-collection": "^1.5.0",
8484
"ampersand-collection-filterable": "^0.2.1",
8585
"ampersand-collection-lodash-mixin": "^2.0.1",
86-
"ampersand-collection-rest-mixin": "^4.2.0",
87-
"ampersand-model": "^5.0.3",
86+
"ampersand-collection-rest-mixin": "^5.0.0",
87+
"ampersand-model": "^6.0.2",
8888
"ampersand-router": "^3.0.2",
8989
"ampersand-sync-localforage": "^0.1.1",
90-
"ampersand-view": "^8.0.0",
90+
"ampersand-view": "^8.0.1",
9191
"ampersand-view-switcher": "^2.0.0",
9292
"backoff": "^2.4.1",
9393
"bootstrap": "https://github.com/twbs/bootstrap/archive/v3.3.5.tar.gz",
94-
"browserify": "^10.2.4",
94+
"browserify": "^11.2.0",
9595
"bugsnag-js": "^2.4.8",
9696
"chalk": "^1.1.1",
97-
"d3": "^3.5.5",
98-
"del": "^1.2.0",
97+
"d3": "^3.5.6",
98+
"del": "^2.0.2",
9999
"domready": "^1.0.8",
100100
"electron-installer-dmg": "^0.1.0",
101101
"electron-installer-squirrel-windows": "^0.4.0",
102-
"electron-packager": "^5.0.0",
103-
"eslint": "^0.24.1",
104-
"eslint-config-mongodb-js": "^0.1.4",
102+
"electron-packager": "^5.1.0",
103+
"eslint": "^1.6.0",
104+
"eslint-config-mongodb-js": "^0.1.6",
105105
"event-stream": "^3.3.1",
106106
"figures": "^1.4.0",
107-
"font-awesome": "https://github.com/FortAwesome/Font-Awesome/archive/v4.3.0.tar.gz",
108-
"glob": "^5.0.14",
107+
"font-awesome": "https://github.com/FortAwesome/Font-Awesome/archive/v4.4.0.tar.gz",
108+
"glob": "^5.0.15",
109109
"gulp": "^3.9.0",
110-
"gulp-jade": "^1.0.1",
110+
"gulp-jade": "^1.1.0",
111111
"gulp-less": "^3.0.3",
112-
"gulp-shell": "^0.4.2",
113-
"gulp-sourcemaps": "^1.5.2",
112+
"gulp-shell": "^0.5.0",
113+
"gulp-sourcemaps": "^1.6.0",
114114
"gulp-util": "^3.0.6",
115115
"gulp-watch": "^4.3.5",
116116
"gulp-webserver": "^0.9.1",
117117
"jade": "^1.11.0",
118-
"jadeify": "^4.3.0",
118+
"jadeify": "^4.4.0",
119119
"jquery": "^2.1.4",
120120
"local-links": "^1.4.0",
121-
"lodash": "^3.9.3",
122-
"merge-stream": "^0.1.7",
123-
"mocha": "^2.2.5",
124-
"moment": "^2.10.3",
125-
"mongodb-extended-json": "^1.3.1",
121+
"lodash": "^3.10.1",
122+
"merge-stream": "^1.0.0",
123+
"mocha": "^2.3.3",
124+
"moment": "^2.10.6",
125+
"mongodb-extended-json": "^1.5.2",
126126
"mongodb-js-fmt": "^0.0.3",
127127
"mongodb-js-precommit": "^0.2.2",
128-
"mongodb-language-model": "^0.2.1",
128+
"mongodb-language-model": "^0.2.3",
129129
"mongodb-schema": "^3.3.0",
130130
"mousetrap": "^1.5.3",
131-
"nightmare": "^1.8.2",
132-
"node-notifier": "^4.2.3",
131+
"node-notifier": "^4.3.1",
133132
"numeral": "^1.5.3",
134-
"octicons": "https://github.com/github/octicons/archive/v2.2.0.tar.gz",
135-
"phantomjs": "^1.9.17",
136-
"phantomjs-polyfill": "0.0.1",
137-
"pluralize": "^1.1.2",
138-
"pre-commit": "^1.0.10",
139-
"qs": "^3.1.0",
140-
"raf": "^3.0.0",
141-
"run-sequence": "^1.1.2",
142-
"run-series": "^1.1.2",
143-
"scout-client": "http://bin.mongodb.org/js/scout-client/v0.1.8/scout-client-0.1.8.tar.gz",
133+
"octicons": "https://github.com/github/octicons/archive/v3.1.0.tar.gz",
134+
"pluralize": "^1.2.1",
135+
"pre-commit": "^1.1.1",
136+
"qs": "^5.2.0",
137+
"raf": "^3.1.0",
138+
"run-sequence": "^1.1.4",
139+
"run-series": "^1.1.4",
140+
"scout-client": "http://bin.mongodb.org/js/scout-client/v0.2.0/scout-client-0.2.0.tar.gz",
144141
"stream-combiner2": "^1.0.2",
145142
"uuid": "^2.0.1",
146143
"vinyl-buffer": "^1.0.0",
147144
"vinyl-source-stream": "^1.1.0",
148-
"watchify": "^3.2.3"
145+
"watchify": "^3.4.0"
149146
}
150147
}

src/bugsnag.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,6 @@ module.exports = bugsnag;
3939
* https://github.com/bugsnag/bugsnag-js#user
4040
*/
4141
module.exports.listen = function listen() {
42-
if (!process.env.NODE_ENV) {
43-
process.env.NODE_ENV = 'development';
44-
}
45-
4642
_.assign(bugsnag, {
4743
apiKey: TOKEN,
4844
autoNotify: true,

src/connect/auth-fields.js

Lines changed: 33 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ var inputTemplate = require('./input-default.jade');
1414
/**
1515
* Input field for username. Stores its result in `mongodb_username`.
1616
*/
17-
var username = new InputView({
17+
var mongodb_username = new InputView({
1818
template: inputTemplate,
1919
name: 'mongodb_username',
2020
label: 'Username',
@@ -25,9 +25,9 @@ var username = new InputView({
2525
/**
2626
* Input field for authentication database. Stores its result in `database_name`.
2727
*/
28-
var database_name = new InputView({
28+
var mongodb_database_name = new InputView({
2929
template: inputTemplate,
30-
name: 'database_name',
30+
name: 'mongodb_database_name',
3131
label: 'Authentication Database',
3232
placeholder: 'admin',
3333
required: false
@@ -37,7 +37,7 @@ var database_name = new InputView({
3737
* Input field for password. Stores its result in `mongodb_password`. Uses type='password' to
3838
* hide input.
3939
*/
40-
var password = new InputView({
40+
var mongodb_password = new InputView({
4141
template: inputTemplate,
4242
type: 'password',
4343
name: 'mongodb_password',
@@ -49,34 +49,46 @@ var password = new InputView({
4949
/**
5050
* Input field for GSSAPI service name (Kerberos). Stores its result in `gssapi_service_name`.
5151
*/
52-
var service_name = new InputView({
52+
var kerberos_service_name = new InputView({
5353
template: inputTemplate,
54-
name: 'gssapi_service_name',
54+
name: 'kerberos_service_name',
5555
label: 'Kerberos Service Name',
56+
placeholder: 'mongodb',
57+
required: false
58+
});
59+
60+
var kerberos_principal = new InputView({
61+
template: inputTemplate,
62+
name: 'kerberos_principal',
63+
label: 'Kerberos Principal',
5664
placeholder: '',
5765
required: true
5866
});
5967

68+
var kerberos_password = new InputView({
69+
template: inputTemplate,
70+
type: 'password',
71+
name: 'kerberos_password',
72+
label: 'Password',
73+
placeholder: '',
74+
required: false
75+
});
6076

6177
/**
6278
* Define fields for each auth method here
6379
*/
6480
module.exports = {
65-
'SCRAM-SHA-1': [
66-
username,
67-
password,
68-
database_name
81+
NONE: [],
82+
MONGODB: [
83+
mongodb_username,
84+
mongodb_password,
85+
mongodb_database_name
6986
],
70-
GSSAPI: [
71-
username,
72-
service_name
87+
KERBEROS: [
88+
kerberos_service_name,
89+
kerberos_principal,
90+
kerberos_password
7391
],
74-
75-
'MONGODB-X509': [
76-
// @todo what do we need here? nothing?
77-
],
78-
79-
PLAIN: [
80-
// @todo what do we need here? username/pw?
81-
]
92+
X509: [],
93+
LDAP: []
8294
};

src/connect/connect-form-view.js

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -31,22 +31,11 @@ var ConnectFormView = FormView.extend({
3131
// clean up the form values here, e.g. conversion to numbers etc.
3232

3333
// get auth mechanism from parent view
34-
obj.auth_mechanism = this.parent.authMethod;
35-
36-
// is SSL enabled (options are open)
37-
obj.ssl = this.parent.sslOpen;
34+
obj.authentication = this.parent.authMethod;
3835

3936
// fill in all default fields
4037
obj.hostname = obj.hostname || 'localhost';
41-
obj.port = obj.port || 27017;
42-
43-
// port number must be numeric
44-
obj.port = Number(obj.port);
45-
46-
if (obj.auth_mechanism) {
47-
// default fields for auth
48-
obj.database_name = obj.database_name || 'admin';
49-
}
38+
obj.port = parseInt(obj.port || 27017, 10);
5039

5140
return obj;
5241
},

0 commit comments

Comments
 (0)