Add support for blackbox testing the API for the orchestrator with dredd

This requires some shenanigans with the headers of the response, since
Feathers/Express likes to augment the Content-Type with the charset field. The
charset field throws dredd off for some silly reason, so this might trimming in
some express middleware later
This commit is contained in:
R Tyler Croy 2019-07-03 11:46:26 -07:00
parent 21a4ebadcc
commit a841198910
No known key found for this signature in database
GPG Key ID: E5C92681BEF6CEA2
5 changed files with 142 additions and 224 deletions

View File

@ -14,7 +14,6 @@ externalDocs:
description: 'Find out more about Otto'
url: 'https://github.com/rtyler/otto'
basePath: '/v1'
tags:
schemes:
- 'http'
paths:
@ -25,20 +24,25 @@ paths:
Return the full execution manifest for the given agent to execute.
operationId: 'fetchManifest'
produces:
- 'application/json'
- 'application/json'
parameters:
- name: agentId
in: path
type: string
required: true
type: string
x-example: otto-agent-1
responses:
200:
description: 'Agent ID found and manifest generated'
# https://github.com/apiaryio/dredd/issues/553#issuecomment-412265413
headers:
Content-Type:
type: string
default: application/json; charset=utf-8
schema:
$ref: '#/definitions/Manifest'
400:
description: 'Invalid request'
securityDefinitions:
definitions:
Manifest:
type: object
@ -56,7 +60,7 @@ definitions:
type: array
items:
$ref: '#/definitions/Operation'
examples:
x-example:
self: 'otto-agent-1'
services:
$ref: '#/definitions/Service'

View File

@ -3,8 +3,8 @@ dry-run: null
hookfiles: null
language: nodejs
require: null
server: ./target/debug/eventbus
server-wait: 3
server: node build/services/orchestrator/src
server-wait: 1
init: false
custom: {}
names: false
@ -17,7 +17,7 @@ user: null
inline-errors: false
details: false
method: []
loglevel: warning
loglevel: error
path: []
hooks-worker-timeout: 5000
hooks-worker-connect-timeout: 1500
@ -28,5 +28,5 @@ hooks-worker-term-retry: 500
hooks-worker-handler-host: 127.0.0.1
hooks-worker-handler-port: 61321
config: ./dredd.yml
blueprint: apispec/eventbus.yml
endpoint: 'http://127.0.0.1:8080'
blueprint: ./apispec/orchestrator.yml
endpoint: 'http://127.0.0.1:3030/'

302
package-lock.json generated
View File

@ -637,11 +637,6 @@
"resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-12.0.12.tgz",
"integrity": "sha512-SOhuU4wNBxhhTHxYaiG5NY4HBhDIDnJF60GU+2LqHAdKKer86//e4yg69aENCtQ04n0ovz+tq2YPME5t5yp4pw=="
},
"JSONSelect": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/JSONSelect/-/JSONSelect-0.4.0.tgz",
"integrity": "sha1-oI7cxn6z/L6Z7WMIVTRKDPKCu40="
},
"abab": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/abab/-/abab-2.0.0.tgz",
@ -743,6 +738,14 @@
"resolved": "https://registry.npmjs.org/api-blueprint-http-formatter/-/api-blueprint-http-formatter-0.0.1.tgz",
"integrity": "sha1-Kn6zz4LewX2jYi/tt+oLLTBpybc="
},
"api-elements": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/api-elements/-/api-elements-0.2.1.tgz",
"integrity": "sha512-HrpqZwzqVTU/d+6Xh+Urpup7GtLg0MSc2hVA0/kD9BAh2615RBJOu4tkLj6ytEdnubuVfQKz2ViUUHY29U+F7g==",
"requires": {
"minim": "^0.23.4"
}
},
"argparse": {
"version": "1.0.10",
"resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
@ -1214,11 +1217,6 @@
"resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz",
"integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ=="
},
"cjson": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/cjson/-/cjson-0.2.1.tgz",
"integrity": "sha1-c82KrWXZ4VBfmvF0TTt5wVJ2gqU="
},
"class-utils": {
"version": "0.3.6",
"resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz",
@ -1339,9 +1337,9 @@
"integrity": "sha1-+IiQMGhcfE/54qVZ9Qd+t2qBb5Y="
},
"colors": {
"version": "0.5.1",
"resolved": "https://registry.npmjs.org/colors/-/colors-0.5.1.tgz",
"integrity": "sha1-fQAj6usVTo7p/Oddy5I9DtFmd3Q="
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz",
"integrity": "sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs="
},
"colorspace": {
"version": "1.1.2",
@ -1501,9 +1499,9 @@
"integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40="
},
"core-js": {
"version": "2.6.8",
"resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.8.tgz",
"integrity": "sha512-RWlREFU74TEkdXzyl1bka66O3kYp8jeTXrvJZDzVVMH8AiHUSOFpL1yfhQJ+wHocAm1m+4971W1PPzfLuCv1vg=="
"version": "2.6.9",
"resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.9.tgz",
"integrity": "sha512-HOpZf6eXmnl7la+cUdMnLvUxKNqLUzJvgIziQ0DiF3JwSImNphIqdGqzj6hIKyX04MmV0poclQ7+wjWvxQyR2A=="
},
"core-util-is": {
"version": "1.0.2",
@ -1767,21 +1765,21 @@
"integrity": "sha512-pYxfDYpued//QpnLIm4Avk7rsNtAtQkUES2cwAYSvD/wd2pKD71gN2Ebj3e7klzXwjocvE8c5vx/1fxwpqmSxA=="
},
"dredd": {
"version": "11.1.4",
"resolved": "https://registry.npmjs.org/dredd/-/dredd-11.1.4.tgz",
"integrity": "sha512-631RsifLqnBPwTgSNasXMaTx0+59xmFR1iBnomxC3mYQpjp3xTsfIWw/HUK+t/KEEn2IQ5dF6RGwIxlSlL+xyg==",
"version": "11.2.9",
"resolved": "https://registry.npmjs.org/dredd/-/dredd-11.2.9.tgz",
"integrity": "sha512-bSyLJ4b19iSg3wkJQUb7YZzQA/cg30cvYfzbpvcVqQQYiXPMT4ML95pufr2vbef4Dl/DbS80Koz8prdiUqCwog==",
"requires": {
"async": "2.6.2",
"async": "3.1.0",
"caseless": "0.12.0",
"chai": "4.2.0",
"clone": "2.1.2",
"cross-spawn": "6.0.5",
"dredd-transactions": "8.1.3",
"gavel": "3.1.2",
"dredd-transactions": "9.0.2",
"gavel": "5.0.0",
"glob": "7.1.4",
"html": "1.0.0",
"htmlencode": "0.0.4",
"inquirer": "6.3.1",
"inquirer": "6.4.1",
"js-yaml": "3.13.1",
"make-dir": "3.0.0",
"markdown-it": "8.4.2",
@ -1796,10 +1794,10 @@
"winston": "2.4.0"
},
"dependencies": {
"colors": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz",
"integrity": "sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs="
"async": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/async/-/async-3.1.0.tgz",
"integrity": "sha512-4vx/aaY6j/j3Lw3fbCHNWP0pPaTCew3F6F3hYyl/tHs/ndmV1q7NW9T5yuJ2XAGwdQrP+6Wu20x06U4APo/iQQ=="
},
"winston": {
"version": "2.4.0",
@ -1824,14 +1822,14 @@
}
},
"dredd-transactions": {
"version": "8.1.3",
"resolved": "https://registry.npmjs.org/dredd-transactions/-/dredd-transactions-8.1.3.tgz",
"integrity": "sha512-+utgc8QwFOq52yE5RxEknFW8luKqpBS2O41dZYe0XF8+CCPWPFmsW8rUNFRAzYWbAySxjjGc9Y9Htrdi412j1Q==",
"version": "9.0.2",
"resolved": "https://registry.npmjs.org/dredd-transactions/-/dredd-transactions-9.0.2.tgz",
"integrity": "sha512-CrkADP7qiU9j8NX120WKWXdPNfOaGl8dJQKHAN+oMl8EM04uWbGaOxGvwC2BBcBqmIgcckrvqDDjZ50pYqpKEA==",
"requires": {
"fury": "3.0.0-beta.10",
"fury-adapter-apib-parser": "0.14.0",
"fury-adapter-oas3-parser": "0.7.4",
"fury-adapter-swagger": "0.25.1",
"fury": "3.0.0-beta.11",
"fury-adapter-apib-parser": "0.15.0",
"fury-adapter-oas3-parser": "0.8.1",
"fury-adapter-swagger": "0.26.0",
"uri-template": "1.0.1"
},
"dependencies": {
@ -1847,11 +1845,11 @@
}
},
"drafter.js": {
"version": "3.0.0-pre.4",
"version": "3.0.0-pre.7",
"bundled": true
},
"fury-adapter-apib-parser": {
"version": "0.14.0",
"version": "0.15.0",
"bundled": true,
"requires": {
"deckardcain": "^0.4.0",
@ -1865,11 +1863,6 @@
"resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz",
"integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI="
},
"ebnf-parser": {
"version": "0.1.10",
"resolved": "https://registry.npmjs.org/ebnf-parser/-/ebnf-parser-0.1.10.tgz",
"integrity": "sha1-zR9rpHfFY4xAyX7ZtXLbW6tdgzE="
},
"ecc-jsbn": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz",
@ -1957,19 +1950,21 @@
"integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ="
},
"escodegen": {
"version": "0.0.21",
"resolved": "https://registry.npmjs.org/escodegen/-/escodegen-0.0.21.tgz",
"integrity": "sha1-U9ZSz6EDA4gnlFilJmxf/HCcY8M=",
"version": "1.11.1",
"resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.11.1.tgz",
"integrity": "sha512-JwiqFD9KdGVVpeuRa68yU3zZnBEOcPs0nKW7wZzXky8Z7tffdYUHbe11bPCV5jYlK6DVdKLWLm0f5I/QlL0Kmw==",
"requires": {
"esprima": "~1.0.2",
"estraverse": "~0.0.4",
"source-map": ">= 0.1.2"
"esprima": "^3.1.3",
"estraverse": "^4.2.0",
"esutils": "^2.0.2",
"optionator": "^0.8.1",
"source-map": "~0.6.1"
},
"dependencies": {
"esprima": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/esprima/-/esprima-1.0.4.tgz",
"integrity": "sha1-n1V+CPw7TSbs6d00+Pv0drYlha0="
"version": "3.1.3",
"resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz",
"integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM="
}
}
},
@ -1979,9 +1974,9 @@
"integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A=="
},
"estraverse": {
"version": "0.0.4",
"resolved": "https://registry.npmjs.org/estraverse/-/estraverse-0.0.4.tgz",
"integrity": "sha1-AaCTLf7ldGhKWYr1pnw7+bZCjbI="
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz",
"integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM="
},
"esutils": {
"version": "2.0.2",
@ -2903,32 +2898,31 @@
"integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="
},
"fury": {
"version": "3.0.0-beta.10",
"resolved": "https://registry.npmjs.org/fury/-/fury-3.0.0-beta.10.tgz",
"integrity": "sha512-FMB0tVX4IIk2RUnnnqK1LqCaw2gcB1FWK5l9ccaFlR/esb3moiiWGHL446ouEs0mLROTNVqI3pfTnLXPgfVr0w==",
"version": "3.0.0-beta.11",
"resolved": "https://registry.npmjs.org/fury/-/fury-3.0.0-beta.11.tgz",
"integrity": "sha512-DPXm64QrJyle3va9wMERTjmuInWUtAhRD/8f8FGl8oH6aO+gREf4yVGWpYNDy+RdKpbvMWl+9utiJfXDgCVEdw==",
"requires": {
"minim": "^0.23.1",
"minim-parse-result": "^0.11.1"
"api-elements": "^0.2.0"
}
},
"fury-adapter-oas3-parser": {
"version": "0.7.4",
"resolved": "https://registry.npmjs.org/fury-adapter-oas3-parser/-/fury-adapter-oas3-parser-0.7.4.tgz",
"integrity": "sha512-NP7uef3+z6+ws/KEJXMAVEeNPiwGbND0yUOZFPkpH13j1aMK5KZrq9JC9dUhWJOzH2uOmVg2uJ/lvkEvv2GnaQ==",
"version": "0.8.1",
"resolved": "https://registry.npmjs.org/fury-adapter-oas3-parser/-/fury-adapter-oas3-parser-0.8.1.tgz",
"integrity": "sha512-JHZ37FbOovhJmN74UXGOA73OsTlX3nuADy493/Xhn1AaGPVeKLhZjAIiJUbHnUh6ZSYdkVN7VKKN8VXtUuC7kw==",
"requires": {
"media-typer": "^1.0.1",
"content-type": "^1.0.4",
"ramda": "0.26.1",
"yaml-js": "^0.2.3"
}
},
"fury-adapter-swagger": {
"version": "0.25.1",
"resolved": "https://registry.npmjs.org/fury-adapter-swagger/-/fury-adapter-swagger-0.25.1.tgz",
"integrity": "sha512-k1kYXEbJPoDB4Fa+vHWQfFAlk5Gpc2XjZSqGMTTSYscZZSH/DPETEPbozXubNmWxGj5feekhBPqb5qRlXsiStA==",
"version": "0.26.0",
"resolved": "https://registry.npmjs.org/fury-adapter-swagger/-/fury-adapter-swagger-0.26.0.tgz",
"integrity": "sha512-TRVVDQotsxeV9gFLyo/K0tYYD3l7ewpSlymDsJ0bSNK0/5z1ZBplqbmPnRVTYAi6nW4IwrM2UG3hHcz2tBRyxA==",
"requires": {
"content-type": "^1.0.4",
"js-yaml": "^3.12.0",
"json-schema-faker": "0.5.0-rc16",
"json-schema-faker": "0.5.0-rc17",
"lodash": "^4.17.0",
"media-typer": "^1.0.1",
"object.values": "^1.1.0",
@ -2938,12 +2932,12 @@
}
},
"gavel": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/gavel/-/gavel-3.1.2.tgz",
"integrity": "sha512-fClZULLHQ7daOUYnC95c3OtQjGIckkB7/uNmUeLH4MiAIIjc1m9B1dbt/A5ZhJ5e/qA/8Ym9CxseeUHPl+Kh3A==",
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/gavel/-/gavel-5.0.0.tgz",
"integrity": "sha512-mAlGsE1zEnsMxyzDT77uQvfDYQGWBlaYzWKXPsbrBMxTWKhBI1aU6UoDdGT+22VuJzmT2Ltmc8zMdNHD7jq4gQ==",
"requires": {
"amanda": "1.0.1",
"async": "2.6.1",
"async": "3.0.1",
"caseless": "0.12.0",
"clone": "2.1.2",
"commander": "2.20.0",
@ -2959,12 +2953,9 @@
},
"dependencies": {
"async": {
"version": "2.6.1",
"resolved": "https://registry.npmjs.org/async/-/async-2.6.1.tgz",
"integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==",
"requires": {
"lodash": "^4.17.10"
}
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/async/-/async-3.0.1.tgz",
"integrity": "sha512-ZswD8vwPtmBZzbn9xyi8XBQWXH3AvOQ43Za1KWYq7JeycrZuUYzx01KvHcVbXltjqH4y0MWrQ33008uLTqXuDw=="
},
"media-typer": {
"version": "1.0.2",
@ -3348,9 +3339,9 @@
"integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw=="
},
"inquirer": {
"version": "6.3.1",
"resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.3.1.tgz",
"integrity": "sha512-MmL624rfkFt4TG9y/Jvmt8vdmOo836U7Y0Hxr2aFk3RelZEGX4Igk0KabWrcaaZaTv9uzglOqWh1Vly+FAWAXA==",
"version": "6.4.1",
"resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.4.1.tgz",
"integrity": "sha512-/Jw+qPZx4EDYsaT6uz7F4GJRNFMRdKNeUZw3ZnKV8lyuUgz/YWRCSUAJMZSVhSq4Ec0R2oYnyi6b3d4JXcL5Nw==",
"requires": {
"ansi-escapes": "^3.2.0",
"chalk": "^2.4.2",
@ -4134,37 +4125,6 @@
}
}
},
"jison": {
"version": "0.4.13",
"resolved": "https://registry.npmjs.org/jison/-/jison-0.4.13.tgz",
"integrity": "sha1-kEFwfWIkE2f1iDRTK58ZwsNvrHg=",
"requires": {
"JSONSelect": "0.4.0",
"cjson": "~0.2.1",
"ebnf-parser": "~0.1.9",
"escodegen": "0.0.21",
"esprima": "1.0.x",
"jison-lex": "0.2.x",
"lex-parser": "~0.1.3",
"nomnom": "1.5.2"
},
"dependencies": {
"esprima": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/esprima/-/esprima-1.0.4.tgz",
"integrity": "sha1-n1V+CPw7TSbs6d00+Pv0drYlha0="
}
}
},
"jison-lex": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/jison-lex/-/jison-lex-0.2.1.tgz",
"integrity": "sha1-rEuBXozOUTLrErXfz+jXB7iETf4=",
"requires": {
"lex-parser": "0.1.x",
"nomnom": "1.5.2"
}
},
"jju": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/jju/-/jju-1.4.0.tgz",
@ -4284,24 +4244,23 @@
"integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM="
},
"json-schema-faker": {
"version": "0.5.0-rc16",
"resolved": "https://registry.npmjs.org/json-schema-faker/-/json-schema-faker-0.5.0-rc16.tgz",
"integrity": "sha512-pDGpYWf3UjwhEBDfRot8q9eWQdekTb2BmykpX0QCqSV/pkniyIWnRa8+/oUWyK4h+1wRqUKoKx14JqIIrTW9LA==",
"version": "0.5.0-rc17",
"resolved": "https://registry.npmjs.org/json-schema-faker/-/json-schema-faker-0.5.0-rc17.tgz",
"integrity": "sha512-ZQSLPpnsGiMBuPOHi09cAzhsiIeOcs5im2GAQ2P6XKyWOuetO8eYdYCP/kW7VVU891Ucan0/dl8GYbRA6pf9gw==",
"requires": {
"json-schema-ref-parser": "^5.0.0",
"jsonpath": "^1.0.0",
"json-schema-ref-parser": "^6.0.2",
"jsonpath": "^1.0.1",
"randexp": "^0.5.3"
}
},
"json-schema-ref-parser": {
"version": "5.1.3",
"resolved": "https://registry.npmjs.org/json-schema-ref-parser/-/json-schema-ref-parser-5.1.3.tgz",
"integrity": "sha512-CpDFlBwz/6la78hZxyB9FECVKGYjIIl3Ms3KLqFj99W7IIb7D00/RDgc++IGB4BBALl0QRhh5m4q5WNSopvLtQ==",
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/json-schema-ref-parser/-/json-schema-ref-parser-6.1.0.tgz",
"integrity": "sha512-pXe9H1m6IgIpXmE5JSb8epilNTGsmTb2iPohAXpOdhqGFbQjNeHHsZxU+C8w6T81GZxSPFLeUoqDJmzxx5IGuw==",
"requires": {
"call-me-maybe": "^1.0.1",
"debug": "^3.1.0",
"js-yaml": "^3.12.0",
"ono": "^4.0.6"
"js-yaml": "^3.12.1",
"ono": "^4.0.11"
}
},
"json-schema-traverse": {
@ -4330,12 +4289,11 @@
}
},
"jsonpath": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/jsonpath/-/jsonpath-1.0.1.tgz",
"integrity": "sha512-HY5kSg82LHIs0r0h9gYBwpNc1w1qGY0qJ7al01W1bJltsN2lp+mjjA/a79gXWuvD6Xf8oPkD2d5uKMZQXTGzqA==",
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/jsonpath/-/jsonpath-1.0.2.tgz",
"integrity": "sha512-rmzlgFZiQPc6q4HDyK8s9Qb4oxBnI5sF61y/Co5PV0lc3q2bIuRsNdueVbhoSHdKM4fxeimphOAtfz47yjCfeA==",
"requires": {
"esprima": "1.2.2",
"jison": "0.4.13",
"static-eval": "2.0.2",
"underscore": "1.7.0"
},
@ -4421,11 +4379,6 @@
"type-check": "~0.3.2"
}
},
"lex-parser": {
"version": "0.1.4",
"resolved": "https://registry.npmjs.org/lex-parser/-/lex-parser-0.1.4.tgz",
"integrity": "sha1-ZMTwJfF/1Tv7RXY/rrFvAVp0dVA="
},
"linkify-it": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-2.1.0.tgz",
@ -4524,9 +4477,9 @@
},
"dependencies": {
"semver": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/semver/-/semver-6.1.0.tgz",
"integrity": "sha512-kCqEOOHoBcFs/2Ccuk4Xarm/KiWRSLEX9CAZF8xkJ6ZPlIoTZ8V5f7J16vYLJqDbR7KrxTJpR2lqjIEm2Qx9cQ=="
"version": "6.1.2",
"resolved": "https://registry.npmjs.org/semver/-/semver-6.1.2.tgz",
"integrity": "sha512-z4PqiCpomGtWj8633oeAdXm1Kn1W++3T8epkZYnwiVgIYIJ0QHszhInYSJTYxebByQH7KVCEAn8R9duzZW2PhQ=="
}
}
},
@ -4665,26 +4618,13 @@
"integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ=="
},
"minim": {
"version": "0.23.3",
"resolved": "https://registry.npmjs.org/minim/-/minim-0.23.3.tgz",
"integrity": "sha512-izjIa8+KsQUBugaDlDQtcQ8hoWx7OOzSzZy6iDWprL38LwUTDSmrWkBKtnyjXNdt/xq9hjF51UmYQ3bcmSJ8gw==",
"version": "0.23.4",
"resolved": "https://registry.npmjs.org/minim/-/minim-0.23.4.tgz",
"integrity": "sha512-hmtDywnQq8WBI7yTi9Yqy/q9m6RjqviuIPMYY2NOmbVI96R4nNznrLn7Uda+JvI58HidRG5TQUfHPMce/6Kr/Q==",
"requires": {
"lodash": "^4.15.0"
}
},
"minim-api-description": {
"version": "0.9.1",
"resolved": "https://registry.npmjs.org/minim-api-description/-/minim-api-description-0.9.1.tgz",
"integrity": "sha512-quwtvcbd5X75Z60GYwgLOcSlKZyr+cnwzusCMXHmSInn0mHBwTBB63Vfk753wLs6g/yR+mt8/WYgiTVMzpA+XA=="
},
"minim-parse-result": {
"version": "0.11.1",
"resolved": "https://registry.npmjs.org/minim-parse-result/-/minim-parse-result-0.11.1.tgz",
"integrity": "sha512-M2OcK3kAncIEoL7dHpWH6ICjVbgVQJjU45Wf35/8xExlRhUXOMgw9cg8BPSA4/DSk5KAntMpfM+HOqQsYp/OeA==",
"requires": {
"minim-api-description": "^0.9.1"
}
},
"minimatch": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
@ -4840,22 +4780,6 @@
"update-notifier": "^2.5.0"
}
},
"nomnom": {
"version": "1.5.2",
"resolved": "https://registry.npmjs.org/nomnom/-/nomnom-1.5.2.tgz",
"integrity": "sha1-9DRUSKhTz71cDSYyDyR3qwUm/i8=",
"requires": {
"colors": "0.5.x",
"underscore": "1.1.x"
},
"dependencies": {
"underscore": {
"version": "1.1.7",
"resolved": "https://registry.npmjs.org/underscore/-/underscore-1.1.7.tgz",
"integrity": "sha1-QLq4S60Z0jAJbo1u9ii/8FXYPbA="
}
}
},
"nopt": {
"version": "1.0.10",
"resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz",
@ -5942,9 +5866,9 @@
}
},
"source-map": {
"version": "0.7.3",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz",
"integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==",
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
"optional": true
},
"source-map-resolve": {
@ -6058,36 +5982,6 @@
"integrity": "sha512-N/D219Hcr2bPjLxPiV+TQE++Tsmrady7TqAJugLy7Xk1EumfDWS/f5dtBbkRCGE7wKKXuYockQoj8Rm2/pVKyg==",
"requires": {
"escodegen": "^1.8.1"
},
"dependencies": {
"escodegen": {
"version": "1.11.1",
"resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.11.1.tgz",
"integrity": "sha512-JwiqFD9KdGVVpeuRa68yU3zZnBEOcPs0nKW7wZzXky8Z7tffdYUHbe11bPCV5jYlK6DVdKLWLm0f5I/QlL0Kmw==",
"requires": {
"esprima": "^3.1.3",
"estraverse": "^4.2.0",
"esutils": "^2.0.2",
"optionator": "^0.8.1",
"source-map": "~0.6.1"
}
},
"esprima": {
"version": "3.1.3",
"resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz",
"integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM="
},
"estraverse": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz",
"integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM="
},
"source-map": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
"optional": true
}
}
},
"static-extend": {
@ -6220,18 +6114,6 @@
"swagger-methods": "^1.0.8",
"swagger-schema-official": "2.0.0-bab6bed",
"z-schema": "^3.24.2"
},
"dependencies": {
"json-schema-ref-parser": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/json-schema-ref-parser/-/json-schema-ref-parser-6.1.0.tgz",
"integrity": "sha512-pXe9H1m6IgIpXmE5JSb8epilNTGsmTb2iPohAXpOdhqGFbQjNeHHsZxU+C8w6T81GZxSPFLeUoqDJmzxx5IGuw==",
"requires": {
"call-me-maybe": "^1.0.1",
"js-yaml": "^3.12.1",
"ono": "^4.0.11"
}
}
}
},
"swagger-schema-official": {

View File

@ -15,7 +15,7 @@
"@types/jest": "^24.0.15",
"compression": "^1.7.4",
"cors": "^2.8.5",
"dredd": "^11.1.4",
"dredd": "^11.2.9",
"helmet": "^3.18.0",
"jest": "^24.8.0",
"module-alias": "^2.2.0",
@ -41,8 +41,8 @@
"url": "https://github.com/rtyler/otto/issues"
},
"homepage": "https://github.com/rtyler/otto#readme",
"_moduleAliases" : {
"@root" : ".",
"@otto" : "build/lib/src/"
"_moduleAliases": {
"@root": ".",
"@otto": "build/lib/src/"
}
}

View File

@ -19,4 +19,36 @@ app.configure((app) => {
});
});
app.configure(express.rest());
app.configure((app : feathers.Application) => {
const service = {
get: (id : feathers.Id) => {
logger.info(`Invoking get for ${id}`);
const response = {
self: id,
services: {
datastore: 'http://localhost:3031/',
},
ops: [
{
id: '0xdeadbeef',
context: '0x1',
type: 'RUNPROC',
data: {
script: 'echo "Hello World"',
env: {},
timeout_s: 600,
},
},
],
};
return Promise.resolve(response);
},
};
app.use('/v1/manifest', service);
});
serveApp(app);