Skip to content

Commit

Permalink
Refactor Cloud Functions samples.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmdobry committed Nov 16, 2016
1 parent eeeaa98 commit f7b29b3
Show file tree
Hide file tree
Showing 94 changed files with 3,083 additions and 2,545 deletions.
9 changes: 3 additions & 6 deletions appengine/analytics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,10 @@
},
"scripts": {
"start": "node app.js",
"test": "mocha -R spec -t 120000 --require intelli-espower-loader ../../test/_setup.js test/*.test.js"
"test": "cd ..; npm run t -- appengine/analytics/test/*.test.js"
},
"dependencies": {
"express": "^4.14.0",
"request": "^2.75.0"
},
"devDependencies": {
"mocha": "^3.1.0"
"express": "4.14.0",
"request": "2.78.0"
}
}
11 changes: 4 additions & 7 deletions appengine/bower/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,11 @@
},
"scripts": {
"postinstall": "bower install --config.interactive=false",
"test": "mocha -R spec -t 120000 --require intelli-espower-loader ../../test/_setup.js test/*.test.js"
"test": "cd ..; npm run t -- appengine/analytics/test/*.test.js"
},
"dependencies": {
"bower": "^1.7.9",
"express": "^4.14.0",
"pug": "^2.0.0-beta6"
},
"devDependencies": {
"mocha": "^3.1.0"
"bower": "1.8.0",
"express": "4.14.0",
"pug": "2.0.0-beta6"
}
}
11 changes: 4 additions & 7 deletions appengine/cloudsql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,11 @@
"node": ">=4.3.2"
},
"scripts": {
"test": "mocha -R spec -t 120000 --require intelli-espower-loader ../../test/_setup.js test/*.test.js"
"test": "cd ..; npm run t -- appengine/analytics/test/*.test.js"
},
"dependencies": {
"express": "^4.14.0",
"mysql": "^2.11.1",
"prompt": "^1.0.0"
},
"devDependencies": {
"mocha": "^3.1.0"
"express": "4.14.0",
"mysql": "2.12.0",
"prompt": "1.0.0"
}
}
2 changes: 1 addition & 1 deletion appengine/datastore/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ function getVisits (callback) {
callback(err);
return;
}
callback(null, entities.map((entity) => `Time: ${entity.data.timestamp}, AddrHash: ${entity.data.userIp}`));
callback(null, entities.map((entity) => `Time: ${entity.timestamp}, AddrHash: ${entity.userIp}`));
});
}
// [END getVisits]
Expand Down
9 changes: 3 additions & 6 deletions appengine/datastore/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,10 @@
},
"scripts": {
"start": "node app.js",
"test": "mocha -R spec -t 120000 --require intelli-espower-loader ../../test/_setup.js test/*.test.js"
"test": "cd ..; npm run t -- appengine/analytics/test/*.test.js"
},
"dependencies": {
"@google-cloud/datastore": "^0.4.0",
"express": "^4.14.0"
},
"devDependencies": {
"mocha": "^3.1.0"
"@google-cloud/datastore": "0.5.0",
"express": "4.14.0"
}
}
6 changes: 2 additions & 4 deletions appengine/datastore/test/app.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,8 @@ function getSample () {
const expressMock = sinon.stub().returns(testApp);
const resultsMock = [
{
data: {
timestamp: `1234`,
userIp: `abcd`
}
timestamp: `1234`,
userIp: `abcd`
}
];
const queryMock = {
Expand Down
7 changes: 2 additions & 5 deletions appengine/disk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,9 @@
},
"scripts": {
"start": "node app.js",
"test": "mocha -R spec -t 120000 --require intelli-espower-loader ../../test/_setup.js test/*.test.js"
"test": "cd ..; npm run t -- appengine/analytics/test/*.test.js"
},
"dependencies": {
"express": "^4.14.0"
},
"devDependencies": {
"mocha": "^3.1.0"
"express": "4.14.0"
}
}
11 changes: 4 additions & 7 deletions appengine/endpoints/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,14 @@
"license": "Apache Version 2.0",
"author": "Google Inc.",
"engines": {
"node": "~4.2"
"node": ">=4.3.2"
},
"scripts": {
"start": "node app.js",
"test": "mocha -R spec -t 120000 --require intelli-espower-loader ../../test/_setup.js test/*.test.js"
"test": "cd ..; npm run t -- appengine/analytics/test/*.test.js"
},
"dependencies": {
"express": "^4.13.4",
"body-parser": "^1.15.0"
},
"devDependencies": {
"mocha": "^2.5.3"
"express": "4.14.0",
"body-parser": "1.15.2"
}
}
9 changes: 3 additions & 6 deletions appengine/errorreporting/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,10 @@
},
"scripts": {
"start": "node app.js",
"test": "mocha -R spec -t 120000 --require intelli-espower-loader ../../test/_setup.js test/*.test.js"
"test": "cd ..; npm run t -- appengine/analytics/test/*.test.js"
},
"dependencies": {
"express": "^4.14.0",
"winston": "^2.2.0"
},
"devDependencies": {
"mocha": "^3.1.0"
"express": "4.14.0",
"winston": "2.3.0"
}
}
15 changes: 6 additions & 9 deletions appengine/express-memcached-session/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,13 @@
},
"scripts": {
"start": "node server.js",
"test": "mocha -R spec -t 1000 --require intelli-espower-loader ../../test/_setup.js test/*.test.js"
"test": "cd ..; npm run t -- appengine/analytics/test/*.test.js"
},
"dependencies": {
"connect-memjs": "^0.1.0",
"cookie-parser": "^1.4.3",
"express": "^4.14.0",
"express-session": "^1.14.2",
"public-ip": "^2.0.1"
},
"devDependencies": {
"mocha": "^3.1.2"
"connect-memjs": "0.1.0",
"cookie-parser": "1.4.3",
"express": "4.14.0",
"express-session": "1.14.2",
"public-ip": "2.0.1"
}
}
19 changes: 8 additions & 11 deletions appengine/express/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,15 @@
},
"scripts": {
"start": "node ./bin/www",
"test": "mocha -R spec -t 1000 --require intelli-espower-loader ../../test/_setup.js test/*.test.js"
"test": "cd ..; npm run t -- appengine/analytics/test/*.test.js"
},
"dependencies": {
"body-parser": "^1.15.2",
"cookie-parser": "^1.4.3",
"debug": "^2.3.2",
"express": "^4.14.0",
"morgan": "^1.7.0",
"pug": "^2.0.0-beta6",
"serve-favicon": "^2.3.0"
},
"devDependencies": {
"mocha": "^3.1.2"
"body-parser": "1.15.2",
"cookie-parser": "1.4.3",
"debug": "2.3.2",
"express": "4.14.0",
"morgan": "1.7.0",
"pug": "2.0.0-beta6",
"serve-favicon": "2.3.0"
}
}
2 changes: 1 addition & 1 deletion appengine/extending-runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
"start": "node app.js"
},
"dependencies": {
"express": "^4.14.0"
"express": "4.14.0"
}
}
2 changes: 1 addition & 1 deletion appengine/geddy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
"debug": "geddy --debug"
},
"dependencies": {
"geddy": "^13.0.8"
"geddy": "13.0.8"
}
}
26 changes: 13 additions & 13 deletions appengine/grunt/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,18 @@
"postinstall": "grunt build"
},
"dependencies": {
"body-parser": "^1.15.2",
"cookie-parser": "^1.4.3",
"debug": "^2.2.0",
"express": "^4.14.0",
"grunt": "^1.0.1",
"grunt-cli": "^1.2.0",
"grunt-contrib-clean": "^1.0.0",
"grunt-contrib-cssmin": "^1.0.2",
"grunt-contrib-jshint": "^1.0.0",
"grunt-contrib-watch": "^1.0.0",
"morgan": "^1.7.0",
"pug": "^2.0.0-beta6",
"serve-favicon": "^2.3.0"
"body-parser": "1.15.2",
"cookie-parser": "1.4.3",
"debug": "2.3.2",
"express": "4.14.0",
"grunt": "1.0.1",
"grunt-cli": "1.2.0",
"grunt-contrib-clean": "1.0.0",
"grunt-contrib-cssmin": "1.0.2",
"grunt-contrib-jshint": "1.0.0",
"grunt-contrib-watch": "1.0.0",
"morgan": "1.7.0",
"pug": "2.0.0-beta6",
"serve-favicon": "2.3.0"
}
}
2 changes: 1 addition & 1 deletion appengine/hapi/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
"start": "node index.js"
},
"dependencies": {
"hapi": "^15.1.1"
"hapi": "15.2.0"
}
}
2 changes: 1 addition & 1 deletion appengine/hello-world/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
"start": "node app.js"
},
"dependencies": {
"express": "^4.14.0"
"express": "4.14.0"
}
}
2 changes: 1 addition & 1 deletion appengine/koa/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
"start": "node --harmony app.js"
},
"dependencies": {
"koa": "^1.2.4"
"koa": "1.2.4"
}
}
6 changes: 3 additions & 3 deletions appengine/logging/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"start": "node app.js"
},
"dependencies": {
"express": "^4.14.0",
"winston": "^2.2.0",
"winston-gae": "^0.1.0"
"express": "4.14.0",
"winston": "2.3.0",
"winston-gae": "0.1.0"
}
}
21 changes: 10 additions & 11 deletions appengine/loopback/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,17 @@
},
"scripts": {
"pretest": "jshint .",
"start": "node server/server.js",
"deploy": "gcloud app deploy"
"start": "node server/server.js"
},
"dependencies": {
"compression": "^1.0.3",
"cors": "^2.5.2",
"errorhandler": "^1.1.1",
"jshint": "^2.5.6",
"loopback": "^2.14.0",
"loopback-boot": "^2.6.5",
"loopback-datasource-juggler": "^2.19.0",
"loopback-explorer": "^1.1.0",
"serve-favicon": "^2.0.1"
"compression": "1.0.3",
"cors": "2.5.2",
"errorhandler": "1.1.1",
"jshint": "2.5.6",
"loopback": "2.14.0",
"loopback-boot": "2.6.5",
"loopback-datasource-juggler": "2.19.0",
"loopback-explorer": "1.1.0",
"serve-favicon": "2.0.1"
}
}
13 changes: 6 additions & 7 deletions appengine/mailgun/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,15 @@
"license": "Apache Version 2.0",
"author": "Google Inc.",
"engines": {
"node": "~4.2"
"node": ">=4.3.2"
},
"scripts": {
"start": "node app.js",
"deploy": "gcloud app deploy"
"start": "node app.js"
},
"dependencies": {
"body-parser": "^1.15.2",
"express": "^4.14.0",
"mailgun": "^0.5.0",
"pug": "^2.0.0-beta6"
"body-parser": "1.15.2",
"express": "4.14.0",
"mailgun": "0.5.0",
"pug": "2.0.0-beta6"
}
}
13 changes: 6 additions & 7 deletions appengine/mailjet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,15 @@
"license": "Apache Version 2.0",
"author": "Google Inc.",
"engines": {
"node": "~4.2"
"node": ">=4.3.2"
},
"scripts": {
"start": "node app.js",
"deploy": "gcloud app deploy"
"start": "node app.js"
},
"dependencies": {
"body-parser": "^1.14.2",
"express": "^4.13.4",
"jade": "^1.11.0",
"node-mailjet": "^1.1.0"
"body-parser": "1.15.2",
"express": "4.14.0",
"jade": "1.11.0",
"node-mailjet": "1.1.0"
}
}
4 changes: 2 additions & 2 deletions appengine/memcached/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"start": "node app.js"
},
"dependencies": {
"express": "^4.14.0",
"memjs": "^0.10.0"
"express": "4.14.0",
"memjs": "0.10.0"
}
}
4 changes: 2 additions & 2 deletions appengine/mongodb/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"node": ">=4.3.2"
},
"dependencies": {
"nconf": "^0.8.4",
"mongodb": "^2.2.10"
"nconf": "0.8.4",
"mongodb": "2.2.11"
}
}
6 changes: 3 additions & 3 deletions appengine/parse-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"node": ">=4.3.2"
},
"dependencies": {
"express": "^4.14.0",
"parse-server": "^2.2.22",
"nconf": "^0.8.4"
"express": "4.14.0",
"parse-server": "2.2.22",
"nconf": "0.8.4"
}
}
Loading

0 comments on commit f7b29b3

Please sign in to comment.