GWicke has uploaded a new change for review.
https://gerrit.wikimedia.org/r/193012
Change subject: Update dependencies
......................................................................
Update dependencies
Change-Id: I5baec227c25e8feb61b1f564b60867da14e84c72
---
M
node_modules/busboy/node_modules/readable-stream/node_modules/inherits/package.json
M node_modules/istanbul/node_modules/async/package.json
M node_modules/istanbul/node_modules/mkdirp/node_modules/minimist/package.json
M node_modules/istanbul/node_modules/which/package.json
M node_modules/mocha/node_modules/commander/package.json
M node_modules/mocha/node_modules/debug/package.json
M node_modules/mocha/node_modules/mkdirp/node_modules/minimist/package.json
M node_modules/mocha/node_modules/mkdirp/package.json
M node_modules/preq/node_modules/bluebird/package.json
M
node_modules/restbase-mod-table-cassandra/node_modules/restify/node_modules/csv/node_modules/csv-parse/package.json
M
node_modules/restbase-mod-table-cassandra/node_modules/restify/node_modules/lru-cache/package.json
M
node_modules/restbase-mod-table-cassandra/node_modules/restify/node_modules/spdy/package.json
M node_modules/service-runner/README.md
M node_modules/service-runner/config.yaml
M node_modules/service-runner/lib/heapwatch.js
M node_modules/service-runner/package.json
M node_modules/service-runner/service-runner.js
M node_modules/service-runner/test/httpserver.js
M node_modules/swagger-ui/node_modules/swagger-client/package.json
19 files changed, 96 insertions(+), 55 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/restbase/deploy
refs/changes/12/193012/1
diff --git
a/node_modules/busboy/node_modules/readable-stream/node_modules/inherits/package.json
b/node_modules/busboy/node_modules/readable-stream/node_modules/inherits/package.json
index 754a114..3d69f4f 100644
---
a/node_modules/busboy/node_modules/readable-stream/node_modules/inherits/package.json
+++
b/node_modules/busboy/node_modules/readable-stream/node_modules/inherits/package.json
@@ -32,7 +32,7 @@
"shasum": "b17d08d326b4423e568eff719f91b0b1cbdf69f1",
"tarball": "http://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz"
},
- "_from": "inherits@2",
+ "_from": "inherits@~2.0.1",
"_npmVersion": "1.3.8",
"_npmUser": {
"name": "isaacs",
diff --git a/node_modules/istanbul/node_modules/async/package.json
b/node_modules/istanbul/node_modules/async/package.json
index bdbe740..9d15cd7 100644
--- a/node_modules/istanbul/node_modules/async/package.json
+++ b/node_modules/istanbul/node_modules/async/package.json
@@ -41,7 +41,7 @@
"shasum": "ac3613b1da9bed1b47510bb4651b8931e47146c7",
"tarball": "http://registry.npmjs.org/async/-/async-0.9.0.tgz"
},
- "_from": "async@~0.9.0",
+ "_from": "[email protected]",
"_npmVersion": "1.4.3",
"_npmUser": {
"name": "caolan",
diff --git
a/node_modules/istanbul/node_modules/mkdirp/node_modules/minimist/package.json
b/node_modules/istanbul/node_modules/mkdirp/node_modules/minimist/package.json
index 7cd80f4..09e9ec4 100644
---
a/node_modules/istanbul/node_modules/mkdirp/node_modules/minimist/package.json
+++
b/node_modules/istanbul/node_modules/mkdirp/node_modules/minimist/package.json
@@ -62,5 +62,6 @@
],
"directories": {},
"_shasum": "857fcabfc3397d2625b8228262e86aa7a011b05d",
- "_resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz"
+ "_resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
+ "readme": "ERROR: No README data found!"
}
diff --git a/node_modules/istanbul/node_modules/which/package.json
b/node_modules/istanbul/node_modules/which/package.json
index ce72dc0..76e41c8 100644
--- a/node_modules/istanbul/node_modules/which/package.json
+++ b/node_modules/istanbul/node_modules/which/package.json
@@ -42,5 +42,6 @@
"tarball": "http://registry.npmjs.org/which/-/which-1.0.9.tgz"
},
"directories": {},
- "_resolved": "https://registry.npmjs.org/which/-/which-1.0.9.tgz"
+ "_resolved": "https://registry.npmjs.org/which/-/which-1.0.9.tgz",
+ "readme": "ERROR: No README data found!"
}
diff --git a/node_modules/mocha/node_modules/commander/package.json
b/node_modules/mocha/node_modules/commander/package.json
index f2b43dd..de917f5 100644
--- a/node_modules/mocha/node_modules/commander/package.json
+++ b/node_modules/mocha/node_modules/commander/package.json
@@ -66,5 +66,6 @@
"tarball": "http://registry.npmjs.org/commander/-/commander-2.3.0.tgz"
},
"directories": {},
- "_resolved": "https://registry.npmjs.org/commander/-/commander-2.3.0.tgz"
+ "_resolved": "https://registry.npmjs.org/commander/-/commander-2.3.0.tgz",
+ "readme": "ERROR: No README data found!"
}
diff --git a/node_modules/mocha/node_modules/debug/package.json
b/node_modules/mocha/node_modules/debug/package.json
index e3c906e..f516035 100644
--- a/node_modules/mocha/node_modules/debug/package.json
+++ b/node_modules/mocha/node_modules/debug/package.json
@@ -66,5 +66,6 @@
"tarball": "http://registry.npmjs.org/debug/-/debug-2.0.0.tgz"
},
"directories": {},
- "_resolved": "https://registry.npmjs.org/debug/-/debug-2.0.0.tgz"
+ "_resolved": "https://registry.npmjs.org/debug/-/debug-2.0.0.tgz",
+ "readme": "ERROR: No README data found!"
}
diff --git
a/node_modules/mocha/node_modules/mkdirp/node_modules/minimist/package.json
b/node_modules/mocha/node_modules/mkdirp/node_modules/minimist/package.json
index 7cd80f4..09e9ec4 100644
--- a/node_modules/mocha/node_modules/mkdirp/node_modules/minimist/package.json
+++ b/node_modules/mocha/node_modules/mkdirp/node_modules/minimist/package.json
@@ -62,5 +62,6 @@
],
"directories": {},
"_shasum": "857fcabfc3397d2625b8228262e86aa7a011b05d",
- "_resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz"
+ "_resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
+ "readme": "ERROR: No README data found!"
}
diff --git a/node_modules/mocha/node_modules/mkdirp/package.json
b/node_modules/mocha/node_modules/mkdirp/package.json
index a6de8f3..b7fe466 100644
--- a/node_modules/mocha/node_modules/mkdirp/package.json
+++ b/node_modules/mocha/node_modules/mkdirp/package.json
@@ -39,7 +39,7 @@
"shasum": "1d73076a6df986cd9344e15e71fcc05a4c9abf12",
"tarball": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.0.tgz"
},
- "_from": "mkdirp@~0.5.0",
+ "_from": "[email protected]",
"_npmVersion": "1.4.3",
"_npmUser": {
"name": "substack",
diff --git a/node_modules/preq/node_modules/bluebird/package.json
b/node_modules/preq/node_modules/bluebird/package.json
index 759de5c..f53de78 100644
--- a/node_modules/preq/node_modules/bluebird/package.json
+++ b/node_modules/preq/node_modules/bluebird/package.json
@@ -74,7 +74,7 @@
"gitHead": "a99cba2657b6fdd6c14be4e5e361e8c66683f5ae",
"_id": "[email protected]",
"_shasum": "b108b6d659a7bb0b88d08a8079c91bcfc43e15a6",
- "_from": "bluebird@^2.7.1",
+ "_from": "bluebird@^2.3.2",
"_npmVersion": "2.5.1",
"_nodeVersion": "1.2.0",
"_npmUser": {
diff --git
a/node_modules/restbase-mod-table-cassandra/node_modules/restify/node_modules/csv/node_modules/csv-parse/package.json
b/node_modules/restbase-mod-table-cassandra/node_modules/restify/node_modules/csv/node_modules/csv-parse/package.json
index e64fbc6..8c77b34 100644
---
a/node_modules/restbase-mod-table-cassandra/node_modules/restify/node_modules/csv/node_modules/csv-parse/package.json
+++
b/node_modules/restbase-mod-table-cassandra/node_modules/restify/node_modules/csv/node_modules/csv-parse/package.json
@@ -119,5 +119,6 @@
"tarball": "http://registry.npmjs.org/csv-parse/-/csv-parse-0.0.9.tgz"
},
"directories": {},
- "_resolved": "https://registry.npmjs.org/csv-parse/-/csv-parse-0.0.9.tgz"
+ "_resolved": "https://registry.npmjs.org/csv-parse/-/csv-parse-0.0.9.tgz",
+ "readme": "ERROR: No README data found!"
}
diff --git
a/node_modules/restbase-mod-table-cassandra/node_modules/restify/node_modules/lru-cache/package.json
b/node_modules/restbase-mod-table-cassandra/node_modules/restify/node_modules/lru-cache/package.json
index 2474729..be2cfc9 100644
---
a/node_modules/restbase-mod-table-cassandra/node_modules/restify/node_modules/lru-cache/package.json
+++
b/node_modules/restbase-mod-table-cassandra/node_modules/restify/node_modules/lru-cache/package.json
@@ -31,7 +31,7 @@
"shasum": "d82388ae9c960becbea0c73bb9eb79b6c6ce9aeb",
"tarball": "http://registry.npmjs.org/lru-cache/-/lru-cache-2.5.0.tgz"
},
- "_from": "lru-cache@2",
+ "_from": "lru-cache@^2.5.0",
"_npmVersion": "1.3.15",
"_npmUser": {
"name": "isaacs",
diff --git
a/node_modules/restbase-mod-table-cassandra/node_modules/restify/node_modules/spdy/package.json
b/node_modules/restbase-mod-table-cassandra/node_modules/restify/node_modules/spdy/package.json
index 5d7020b..839bd7d 100644
---
a/node_modules/restbase-mod-table-cassandra/node_modules/restify/node_modules/spdy/package.json
+++
b/node_modules/restbase-mod-table-cassandra/node_modules/restify/node_modules/spdy/package.json
@@ -80,5 +80,6 @@
"tarball": "http://registry.npmjs.org/spdy/-/spdy-1.30.2.tgz"
},
"directories": {},
- "_resolved": "https://registry.npmjs.org/spdy/-/spdy-1.30.2.tgz"
+ "_resolved": "https://registry.npmjs.org/spdy/-/spdy-1.30.2.tgz",
+ "readme": "ERROR: No README data found!"
}
diff --git a/node_modules/service-runner/README.md
b/node_modules/service-runner/README.md
index a24db6e..95ee2b2 100644
--- a/node_modules/service-runner/README.md
+++ b/node_modules/service-runner/README.md
@@ -1,7 +1,7 @@
# service-runner
Generic nodejs service runner & supervisor
-## Goals
+## Features
- Supervise and cluster node services in a generic manner with a minimal
interface:
```javascript
@@ -9,11 +9,11 @@
var config = options.config;
// Logger instance
var logger = options.logger;
- // Statsd metrics reporter
- var statsd = options.statsd;
+ // Metrics reporter (txstatsd, statsd)
+ var metrics = options.metrics;
// Start the app, returning a promise
- return startApp(config, logger, statsd);
+ return startApp(config, logger, metrics);
}
```
@@ -28,8 +28,8 @@
-h, --help [default: false]
```
- [config loading](#config-loading)
-- flexible logging using bunyan, including logstash support via gelf
-- metric reporting using txstatsd
+- flexible logging using bunyan, including logstash support via gelf:
`logger.log('info/request', { message: 'foo', uri: req.uri })`
+- [metric reporting](#metric-reporting) using txstatsd or statsd:
`statsd.timing('foo.GET.2xx', Date.now() - startTime)`
- heap dumps
## Usage
@@ -64,20 +64,6 @@
- Default top-level config format (**draft**):
```yaml
-# Info about this config. Used for packaging & other purposes.
-info:
- name: parsoid
- version: 0.4.0
- description: Bidirectional conversion service between MediaWiki wikitext and
- HTML5
-
-# Package settings. Modeled on Debian, but likely to transfer to rpm as well.
-packaging:
- depends:
- nodejs: >=0.10.0
- enhances: mediawiki
-
-
# Number of worker processes to spawn.
# Set to 0 to run everything in a single process without clustering.
num_workers: 1
@@ -112,6 +98,46 @@
# more per-service config settings
```
+### Metric reporting
+
+We basically expose the [node-statsd
+interface](https://github.com/sivy/node-statsd):
+
+```javascript
+// Timing: sends a timing command with the specified milliseconds
+options.metrics.timing('response_time', 42);
+
+// Increment: Increments a stat by a value (default is 1)
+options.metrics.increment('my_counter');
+
+// Decrement: Decrements a stat by a value (default is -1)
+options.metrics.decrement('my_counter');
+
+// Histogram: send data for histogram stat
+options.metrics.histogram('my_histogram', 42);
+
+// Gauge: Gauge a stat by a specified amount
+options.metrics.gauge('my_gauge', 123.45);
+
+// Set: Counts unique occurrences of a stat (alias of unique)
+options.metrics.set('my_unique', 'foobar');
+options.metrics.unique('my_unique', 'foobarbaz');
+
+// Incrementing multiple items
+options.metrics.increment(['these', 'are', 'different', 'stats']);
+
+// Sampling, this will sample 25% of the time
+the StatsD Daemon will compensate for sampling
+options.metrics.increment('my_counter', 1, 0.25);
+
+// Tags, this will add user-defined tags to
+the data
+options.metrics.histogram('my_histogram', 42, ['foo', 'bar']);
+```
+
+All metrics are automatically prefixed by the config-provided service name /
+graphite hierachy prefix to ensure a consistent graphite metric hierarchy.
+
# Issue tracking
Please report issues in [the service-runner phabricator
diff --git a/node_modules/service-runner/config.yaml
b/node_modules/service-runner/config.yaml
index 21538b1..efba006 100644
--- a/node_modules/service-runner/config.yaml
+++ b/node_modules/service-runner/config.yaml
@@ -1,17 +1,3 @@
-# Info about this config. Used for packaging & other purposes.
-info:
- name: parsoid
- version: 0.4.0
- description: Bidirectional conversion service between MediaWiki wikitext and
- HTML5
-
-# Package settings. Modeled on Debian, but likely to transfer to rpm as well.
-packaging:
- depends:
- nodejs: '>=0.10.0'
- enhances: mediawiki
-
-
# Number of worker processes to spawn.
# Set to 0 to run everything in a single process without clustering.
# Use 'ncpu' to run as many workers as there are CPU units
@@ -19,7 +5,7 @@
# Log error messages and gracefully restart a worker if v8 reports that it
# uses more heap (note: not RSS) than this many mb.
-worker_heap_limit_mb: 500
+worker_heap_limit_mb: 1
# Logger info
logging:
diff --git a/node_modules/service-runner/lib/heapwatch.js
b/node_modules/service-runner/lib/heapwatch.js
index f196951..ba79735 100644
--- a/node_modules/service-runner/lib/heapwatch.js
+++ b/node_modules/service-runner/lib/heapwatch.js
@@ -24,7 +24,7 @@
if (usage.heapUsed > this.limit) {
this.failCount++;
- if (this.failCount > 5) {
+ if (this.failCount > 3) {
this.logger.log('fatal/service-runner/heap', {
message: 'Heap memory limit exceeded',
limit: this.limit,
@@ -34,6 +34,10 @@
setTimeout(function() {
cluster.worker.disconnect();
}, 1000);
+ // And forcefully exit 60 seconds later
+ setTimeout(function() {
+ process.exit(1);
+ }, 60000);
return;
} else {
this.logger.log('warn/service-runner/heap', {
diff --git a/node_modules/service-runner/package.json
b/node_modules/service-runner/package.json
index e02cb24..1ed823f 100644
--- a/node_modules/service-runner/package.json
+++ b/node_modules/service-runner/package.json
@@ -1,6 +1,6 @@
{
"name": "service-runner",
- "version": "0.1.3",
+ "version": "0.1.4",
"description": "Generic nodejs service supervisor / cluster runner",
"main": "service-runner.js",
"bin": {
@@ -49,10 +49,10 @@
"mocha-lcov-reporter": "0.0.1",
"coveralls": "2.11.2"
},
- "readme": "# service-runner\nGeneric nodejs service runner &
supervisor\n\n## Goals\n- Supervise and cluster node services in a generic
manner with a minimal interface:\n\n```javascript\nmodule.exports = function
(options) {\n var config = options.config;\n // Logger instance\n var
logger = options.logger;\n // Statsd metrics reporter\n var statsd =
options.statsd;\n\n // Start the app, returning a promise\n return
startApp(config, logger, statsd);\n}\n```\n\n- standard command line
parameters:\n```bash\nUsage: node ./service-runner.js [-h|-v]
[--param[=val]]\n\nOptions:\n -n, --num-workers [default: -1]\n -c, --config
[default: \"./config.yaml\"]\n -v, --version [default: false]\n
-h, --help [default: false]\n```\n- [config
loading](#config-loading)\n- flexible logging using bunyan, including logstash
support via gelf\n- metric reporting using txstatsd\n- heap dumps\n\n##
Usage\n```bash\nnpm install --save service-runner\n```\n\nIn package.json,
configure `npm start` to call service-runner:\n```javascript\n \"scripts\":
{\n \"start\": \"service-runner\"\n }\n```\nCreate a `config.yaml` file
following the spec below. Make sure to point the\nmodule parameter to your
service's entry point.\n\nFinally, **start your service with `npm start`**. In
npm >= 2.0 (node 0.12 or iojs), you can also pass parameters to
`service-runner` like this: `npm start -- -c
/etc/yourservice/config.yaml`.\n\nFor node 0.10 support, you can create a small
wrapper script like this:\n```javascript\nvar ServiceRunner =
require('service-runner');\nnew ServiceRunner().run();\n```\n\nWe are also
working on a
[standard\ntemplate](https://github.com/wikimedia/service-template-node) for
node\nservices, which will set up this & other things for you.\n\n### Config
loading\n- Default config locations in a project: `config.yaml` for a
customized config,\n and `config.example.yaml` for the defaults.\n- Default
top-level config format (**draft**):\n\n```yaml\n# Info about this config. Used
for packaging & other purposes.\ninfo: \n name: parsoid\n version: 0.4.0\n
description: Bidirectional conversion service between MediaWiki wikitext and\n
HTML5\n\n# Package settings. Modeled on Debian, but likely to transfer to
rpm as well.\npackaging:\n depends:\n nodejs: >=0.10.0\n enhances:
mediawiki\n\n\n# Number of worker processes to spawn. \n# Set to 0 to run
everything in a single process without clustering.\nnum_workers: 1\n\n# Logger
info\nlogging:\n level: info\n streams:\n # Use gelf-stream -> logstash\n -
type: gelf\n host: logstash1003.eqiad.wmnet\n port: 12201\n\n# Statsd
metrics reporter\nmetrics:\n type: txstatsd\n host: localhost\n port:
8125\n\nservices:\n - name: parsoid\n # a relative path or the name of an
npm package, if different from name\n # module: ./lib/server.js\n\n #
optionally, a version constraint of the npm package\n # version: ^0.4.0\n
\n # per-service config\n conf:\n port: 12345\n interface:
localhost\n # more per-service config settings\n```\n\n# Issue
tracking\n\nPlease report issues in [the service-runner
phabricator\nproject](https://phabricator.wikimedia.org/tag/service-runner/).\n\n#
See also\n- https://github.com/Unitech/PM2/ - A lot of features. Focus on
interactive\n use with commandline tools. Weak on logging (only local log
files). Does\n not support node 0.10's cluster module.\n-
https://github.com/strongloop/strong-agent - commercial license. Focus on\n
profiling and monitoring, although a lot of the functionality is now\n
available in other libraries.\n- http://krakenjs.com/ - Focused more on MVC &
templating rather than\n supervision & modules\n",
+ "readme": "# service-runner\nGeneric nodejs service runner &
supervisor\n\n## Features\n- Supervise and cluster node services in a generic
manner with a minimal interface:\n\n```javascript\nmodule.exports = function
(options) {\n var config = options.config;\n // Logger instance\n var
logger = options.logger;\n // Metrics reporter (txstatsd, statsd)\n var
metrics = options.metrics;\n\n // Start the app, returning a promise\n
return startApp(config, logger, metrics);\n}\n```\n\n- standard command line
parameters:\n```bash\nUsage: node ./service-runner.js [-h|-v]
[--param[=val]]\n\nOptions:\n -n, --num-workers [default: -1]\n -c, --config
[default: \"./config.yaml\"]\n -v, --version [default: false]\n
-h, --help [default: false]\n```\n- [config
loading](#config-loading)\n- flexible logging using bunyan, including logstash
support via gelf: `logger.log('info/request', { message: 'foo', uri: req.uri
})`\n- [metric reporting](#metric-reporting) using txstatsd or statsd:
`statsd.timing('foo.GET.2xx', Date.now() - startTime)`\n- heap dumps\n\n##
Usage\n```bash\nnpm install --save service-runner\n```\n\nIn package.json,
configure `npm start` to call service-runner:\n```javascript\n \"scripts\":
{\n \"start\": \"service-runner\"\n }\n```\nCreate a `config.yaml` file
following the spec below. Make sure to point the\nmodule parameter to your
service's entry point.\n\nFinally, **start your service with `npm start`**. In
npm >= 2.0 (node 0.12 or iojs), you can also pass parameters to
`service-runner` like this: `npm start -- -c
/etc/yourservice/config.yaml`.\n\nFor node 0.10 support, you can create a small
wrapper script like this:\n```javascript\nvar ServiceRunner =
require('service-runner');\nnew ServiceRunner().run();\n```\n\nWe are also
working on a
[standard\ntemplate](https://github.com/wikimedia/service-template-node) for
node\nservices, which will set up this & other things for you.\n\n### Config
loading\n- Default config locations in a project: `config.yaml` for a
customized config,\n and `config.example.yaml` for the defaults.\n- Default
top-level config format (**draft**):\n\n```yaml\n# Number of worker processes
to spawn. \n# Set to 0 to run everything in a single process without
clustering.\nnum_workers: 1\n\n# Logger info\nlogging:\n level: info\n
streams:\n # Use gelf-stream -> logstash\n - type: gelf\n host:
logstash1003.eqiad.wmnet\n port: 12201\n\n# Statsd metrics
reporter\nmetrics:\n type: txstatsd\n host: localhost\n port:
8125\n\nservices:\n - name: parsoid\n # a relative path or the name of an
npm package, if different from name\n # module: ./lib/server.js\n\n #
optionally, a version constraint of the npm package\n # version: ^0.4.0\n
\n # per-service config\n conf:\n port: 12345\n interface:
localhost\n # more per-service config settings\n```\n\n### Metric
reporting\n\nWe basically expose the
[node-statsd\ninterface](https://github.com/sivy/node-statsd):\n\n```javascript\n//
Timing: sends a timing command with the specified
milliseconds\noptions.metrics.timing('response_time', 42);\n\n// Increment:
Increments a stat by a value (default is
1)\noptions.metrics.increment('my_counter');\n\n// Decrement: Decrements a stat
by a value (default is -1)\noptions.metrics.decrement('my_counter');\n\n//
Histogram: send data for histogram
stat\noptions.metrics.histogram('my_histogram', 42);\n\n// Gauge: Gauge a stat
by a specified amount\noptions.metrics.gauge('my_gauge', 123.45);\n\n// Set:
Counts unique occurrences of a stat (alias of
unique)\noptions.metrics.set('my_unique',
'foobar');\noptions.metrics.unique('my_unique', 'foobarbaz');\n\n//
Incrementing multiple items\noptions.metrics.increment(['these', 'are',
'different', 'stats']);\n\n// Sampling, this will sample 25% of the time\nthe
StatsD Daemon will compensate for
sampling\noptions.metrics.increment('my_counter', 1, 0.25);\n\n// Tags, this
will add user-defined tags to\nthe
data\noptions.metrics.histogram('my_histogram', 42, ['foo',
'bar']);\n```\n\nAll metrics are automatically prefixed by the config-provided
service name /\ngraphite hierachy prefix to ensure a consistent graphite metric
hierarchy.\n\n# Issue tracking\n\nPlease report issues in [the service-runner
phabricator\nproject](https://phabricator.wikimedia.org/tag/service-runner/).\n\n#
See also\n- https://github.com/Unitech/PM2/ - A lot of features. Focus on
interactive\n use with commandline tools. Weak on logging (only local log
files). Does\n not support node 0.10's cluster module.\n-
https://github.com/strongloop/strong-agent - commercial license. Focus on\n
profiling and monitoring, although a lot of the functionality is now\n
available in other libraries.\n- http://krakenjs.com/ - Focused more on MVC &
templating rather than\n supervision & modules\n",
"readmeFilename": "README.md",
- "gitHead": "1412e41c3fa065c63cac04b755b3da7d483a113e",
- "_id": "[email protected]",
- "_shasum": "0ee863425caa7f1a367c54b5cc88553709ce1b08",
+ "gitHead": "ba5a2ca6633dc0dcc67af6fa1d067abb51d6cd1e",
+ "_id": "[email protected]",
+ "_shasum": "8e3882f606163067832aff8683b07c2a9aebcbf5",
"_from": "service-runner@^0.1.0"
}
diff --git a/node_modules/service-runner/service-runner.js
b/node_modules/service-runner/service-runner.js
index 93cd175..8ff2084 100755
--- a/node_modules/service-runner/service-runner.js
+++ b/node_modules/service-runner/service-runner.js
@@ -96,6 +96,11 @@
self.config = this._sanitizeConfig(conf, self.options);
return P.resolve(conf);
} else {
+ var package_json = {};
+ try {
+ package_json = require(self._basePath + '/' + 'package.json');
+ } catch (e) {}
+
var configFile = this.options.configFile;
if (/^\./.test(configFile)) {
// resolve relative paths
@@ -105,6 +110,15 @@
.then(function(yamlSource) {
self.config = self._sanitizeConfig(yaml.safeLoad(yamlSource),
self.options);
+
+ // Make sure we have a sane config object by pulling in
+ // package.json info if necessary
+ var config = self.config;
+ config.package = config.package || config.info /* b/c */ || {};
+ var pack = config.package;
+ pack.name = pack.name || package_json.name;
+ pack.description = pack.description || package_json.description;
+ pack.version = pack.version || package_json.version;
})
.catch(function(e) {
console.error('Error while reading config file: ' + e);
diff --git a/node_modules/service-runner/test/httpserver.js
b/node_modules/service-runner/test/httpserver.js
index 4abeac0..9d7dfbf 100644
--- a/node_modules/service-runner/test/httpserver.js
+++ b/node_modules/service-runner/test/httpserver.js
@@ -18,6 +18,9 @@
});
res.end('okay');
}
- }).listen(opts.config.port || 8888, opts.config.interface ||
'0.0.0.0', resolve);
+ })
+ .listen(opts.config.port || 8888,
+ opts.config.interface || '0.0.0.0',
+ resolve);
});
};
diff --git a/node_modules/swagger-ui/node_modules/swagger-client/package.json
b/node_modules/swagger-ui/node_modules/swagger-client/package.json
index af3c72f..4378b3b 100644
--- a/node_modules/swagger-ui/node_modules/swagger-client/package.json
+++ b/node_modules/swagger-ui/node_modules/swagger-client/package.json
@@ -65,5 +65,6 @@
"tarball":
"http://registry.npmjs.org/swagger-client/-/swagger-client-2.1.1-M1.tgz"
},
"directories": {},
- "_resolved":
"https://registry.npmjs.org/swagger-client/-/swagger-client-2.1.1-M1.tgz"
+ "_resolved":
"https://registry.npmjs.org/swagger-client/-/swagger-client-2.1.1-M1.tgz",
+ "readme": "ERROR: No README data found!"
}
--
To view, visit https://gerrit.wikimedia.org/r/193012
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I5baec227c25e8feb61b1f564b60867da14e84c72
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/restbase/deploy
Gerrit-Branch: master
Gerrit-Owner: GWicke <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits