@appland/appmap 3.18.2 → 3.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +26 -0
- package/built/appmap.html +1 -1
- package/built/main.js.LICENSE.txt +4 -4
- package/built/main.js.map +1 -1
- package/built/package.json +3 -2
- package/built/src/cmds/agentInstaller/agentInstaller.js +1 -1
- package/built/src/cmds/agentInstaller/agentInstaller.js.map +1 -1
- package/built/src/cmds/agentInstaller/agentInstallerProcedure.js +1 -1
- package/built/src/cmds/agentInstaller/agentInstallerProcedure.js.map +1 -1
- package/built/src/cmds/agentInstaller/agentProcedure.js +6 -6
- package/built/src/cmds/agentInstaller/agentProcedure.js.map +1 -1
- package/built/src/cmds/agentInstaller/commandRunner.js +4 -4
- package/built/src/cmds/agentInstaller/commandRunner.js.map +1 -1
- package/built/src/cmds/agentInstaller/commandUtil.js +1 -1
- package/built/src/cmds/agentInstaller/commandUtil.js.map +1 -1
- package/built/src/cmds/agentInstaller/gradleInstaller.js +29 -8
- package/built/src/cmds/agentInstaller/gradleInstaller.js.map +1 -1
- package/built/src/cmds/agentInstaller/install-agent.js +4 -4
- package/built/src/cmds/agentInstaller/install-agent.js.map +1 -1
- package/built/src/cmds/agentInstaller/javaBuildToolInstaller.js +3 -3
- package/built/src/cmds/agentInstaller/javaBuildToolInstaller.js.map +1 -1
- package/built/src/cmds/agentInstaller/javaScriptAgentInstaller.js +7 -7
- package/built/src/cmds/agentInstaller/javaScriptAgentInstaller.js.map +1 -1
- package/built/src/cmds/agentInstaller/mavenInstaller.js +5 -5
- package/built/src/cmds/agentInstaller/mavenInstaller.js.map +1 -1
- package/built/src/cmds/agentInstaller/projectConfiguration.js +7 -7
- package/built/src/cmds/agentInstaller/projectConfiguration.js.map +1 -1
- package/built/src/cmds/agentInstaller/pythonAgentInstaller.js +8 -8
- package/built/src/cmds/agentInstaller/pythonAgentInstaller.js.map +1 -1
- package/built/src/cmds/agentInstaller/rubyAgentInstaller.js +5 -5
- package/built/src/cmds/agentInstaller/rubyAgentInstaller.js.map +1 -1
- package/built/src/cmds/agentInstaller/sourceUtil.js +1 -1
- package/built/src/cmds/agentInstaller/sourceUtil.js.map +1 -1
- package/built/src/cmds/agentInstaller/status.js +2 -2
- package/built/src/cmds/agentInstaller/status.js.map +1 -1
- package/built/src/cmds/errors.js +1 -1
- package/built/src/cmds/errors.js.map +1 -1
- package/built/src/cmds/open/open.js +4 -4
- package/built/src/cmds/open/open.js.map +1 -1
- package/built/src/cmds/open/openers.js +3 -3
- package/built/src/cmds/open/openers.js.map +1 -1
- package/built/src/cmds/open/serveAndOpenAppMap.js +13 -13
- package/built/src/cmds/open/serveAndOpenAppMap.js.map +1 -1
- package/built/src/cmds/open/showAppMap.js +1 -1
- package/built/src/cmds/open/showAppMap.js.map +1 -1
- package/built/src/cmds/prune/prune.js +2 -2
- package/built/src/cmds/prune/prune.js.map +1 -1
- package/built/src/cmds/prune/pruneAppMap.js +1 -1
- package/built/src/cmds/prune/pruneAppMap.js.map +1 -1
- package/built/src/cmds/record/configureConnection.js +3 -3
- package/built/src/cmds/record/configureConnection.js.map +1 -1
- package/built/src/cmds/record/configureRemainingRequestOptions.js +1 -1
- package/built/src/cmds/record/configureRemainingRequestOptions.js.map +1 -1
- package/built/src/cmds/record/confirmProcessCharacteristics.js +3 -3
- package/built/src/cmds/record/confirmProcessCharacteristics.js.map +1 -1
- package/built/src/cmds/record/intro.js +1 -1
- package/built/src/cmds/record/intro.js.map +1 -1
- package/built/src/cmds/record/record.js +7 -7
- package/built/src/cmds/record/record.js.map +1 -1
- package/built/src/cmds/record/testConnection.js +1 -1
- package/built/src/cmds/record/testConnection.js.map +1 -1
- package/built/src/cmds/runCommand.js +1 -1
- package/built/src/cmds/runCommand.js.map +1 -1
- package/built/src/cmds/userInteraction.js +3 -3
- package/built/src/cmds/userInteraction.js.map +1 -1
- package/built/src/fingerprint/canonicalize/sqlTables.js +1 -1
- package/built/src/fingerprint/canonicalize/sqlTables.js.map +1 -1
- package/built/src/fingerprint/canonicalize/trace.js +1 -1
- package/built/src/fingerprint/canonicalize/trace.js.map +1 -1
- package/built/src/functionStats.js +1 -0
- package/built/src/functionStats.js.map +1 -1
- package/built/src/openapi/command.js +35 -19
- package/built/src/openapi/command.js.map +1 -1
- package/built/src/openapi/index.js +28 -0
- package/built/src/openapi/index.js.map +1 -0
- package/built/src/openapi/method.js +54 -49
- package/built/src/openapi/method.js.map +1 -1
- package/built/src/openapi/model.js +19 -22
- package/built/src/openapi/model.js.map +1 -1
- package/built/src/openapi/objectSchema.js +47 -0
- package/built/src/openapi/objectSchema.js.map +1 -0
- package/built/src/openapi/parseHTTPServerRequests.js +11 -0
- package/built/src/openapi/parseHTTPServerRequests.js.map +1 -0
- package/built/src/openapi/path.js +13 -14
- package/built/src/openapi/path.js.map +1 -1
- package/built/src/openapi/provider.js +73 -0
- package/built/src/openapi/provider.js.map +1 -0
- package/built/src/openapi/response.js +37 -13
- package/built/src/openapi/response.js.map +1 -1
- package/built/src/openapi/rpcRequest.js +87 -0
- package/built/src/openapi/rpcRequest.js.map +1 -0
- package/built/src/openapi/schemaInferrer.js +59 -0
- package/built/src/openapi/schemaInferrer.js.map +1 -0
- package/built/src/openapi/securitySchemes.js +14 -39
- package/built/src/openapi/securitySchemes.js.map +1 -1
- package/built/src/openapi/statusCodes.js +68 -0
- package/built/src/openapi/statusCodes.js.map +1 -0
- package/built/src/openapi/util.js +67 -47
- package/built/src/openapi/util.js.map +1 -1
- package/built/src/service/config/validator.js +5 -3
- package/built/src/service/config/validator.js.map +1 -1
- package/built/src/telemetry.js +5 -5
- package/built/src/telemetry.js.map +1 -1
- package/package.json +4 -3
- package/built/src/openapi/schema.js +0 -34
- package/built/src/openapi/schema.js.map +0 -1
- package/built/src/openapi/settings.js +0 -10
- package/built/src/openapi/settings.js.map +0 -1
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const method_1 = __importDefault(require("./method"));
|
|
3
7
|
class Path {
|
|
4
|
-
constructor(
|
|
5
|
-
this.securitySchemes = securitySchemes;
|
|
8
|
+
constructor() {
|
|
6
9
|
this.methods = {};
|
|
7
10
|
}
|
|
8
11
|
openapi() {
|
|
@@ -10,26 +13,22 @@ class Path {
|
|
|
10
13
|
.sort()
|
|
11
14
|
.reduce((memo, method) => {
|
|
12
15
|
// eslint-disable-next-line no-param-reassign
|
|
13
|
-
memo[method] =
|
|
16
|
+
memo[method] =
|
|
17
|
+
this.methods[method].openapi();
|
|
14
18
|
return memo;
|
|
15
19
|
}, {});
|
|
16
20
|
}
|
|
17
|
-
|
|
18
|
-
const method =
|
|
21
|
+
addRpcRequest(rpcRequest) {
|
|
22
|
+
const method = rpcRequest.requestMethod;
|
|
19
23
|
if (!method) {
|
|
20
24
|
return;
|
|
21
25
|
}
|
|
22
|
-
this.addMethod(method, event);
|
|
23
|
-
}
|
|
24
|
-
addMethod(method, event) {
|
|
25
|
-
// eslint-disable-next-line no-param-reassign
|
|
26
|
-
method = method.toLowerCase();
|
|
27
26
|
if (!this.methods[method]) {
|
|
28
|
-
this.methods[method] = new
|
|
27
|
+
this.methods[method] = new method_1.default();
|
|
29
28
|
}
|
|
30
29
|
const methodObj = this.methods[method];
|
|
31
|
-
methodObj.
|
|
30
|
+
methodObj.addRpcRequest(rpcRequest);
|
|
32
31
|
}
|
|
33
32
|
}
|
|
34
|
-
|
|
33
|
+
exports.default = Path;
|
|
35
34
|
//# sourceMappingURL=path.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"path.js","sourceRoot":"","sources":["../../../src/openapi/path.
|
|
1
|
+
{"version":3,"file":"path.js","sourceRoot":"","sources":["../../../src/openapi/path.ts"],"names":[],"mappings":";;;;;AACA,sDAA8B;AAG9B,MAAqB,IAAI;IAAzB;QACE,YAAO,GAA2B,EAAE,CAAC;IAyBvC,CAAC;IAvBC,OAAO;QACL,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC;aAC7B,IAAI,EAAE;aACN,MAAM,CAAC,CAAC,IAAI,EAAE,MAAc,EAAE,EAAE;YAC/B,6CAA6C;YAC7C,IAAI,CAAC,MAA+B,CAAC;gBACnC,IAAI,CAAC,OAAO,CAAC,MAA+B,CAAC,CAAC,OAAO,EAAE,CAAC;YAC1D,OAAO,IAAI,CAAC;QACd,CAAC,EAAE,EAA8D,CAAC,CAAC;IACvE,CAAC;IAED,aAAa,CAAC,UAAsB;QAClC,MAAM,MAAM,GAAG,UAAU,CAAC,aAAa,CAAC;QACxC,IAAI,CAAC,MAAM,EAAE;YACX,OAAO;SACR;QAED,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE;YACzB,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,IAAI,gBAAM,EAAE,CAAC;SACrC;QACD,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QACvC,SAAS,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;IACtC,CAAC;CACF;AA1BD,uBA0BC"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const js_yaml_1 = require("js-yaml");
|
|
7
|
+
const url_1 = require("url");
|
|
8
|
+
const http_1 = __importDefault(require("http"));
|
|
9
|
+
const https_1 = __importDefault(require("https"));
|
|
10
|
+
const promises_1 = require("fs/promises");
|
|
11
|
+
const URLLoader = (protocol) => {
|
|
12
|
+
return (url) => {
|
|
13
|
+
return new Promise((resolve, reject) => {
|
|
14
|
+
protocol
|
|
15
|
+
.get(url)
|
|
16
|
+
.on('response', (response) => {
|
|
17
|
+
if (response.statusCode !== 200) {
|
|
18
|
+
return reject(`${response.statusCode} ${response.statusMessage}`);
|
|
19
|
+
}
|
|
20
|
+
const data = [];
|
|
21
|
+
response
|
|
22
|
+
.on('data', (chunk) => {
|
|
23
|
+
data.push(Buffer.from(chunk));
|
|
24
|
+
})
|
|
25
|
+
.on('end', () => {
|
|
26
|
+
resolve(Buffer.concat(data));
|
|
27
|
+
});
|
|
28
|
+
})
|
|
29
|
+
.on('error', reject);
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
const FileLoader = (url) => {
|
|
34
|
+
return (0, promises_1.readFile)(url.pathname);
|
|
35
|
+
};
|
|
36
|
+
const ProtocolLoader = {
|
|
37
|
+
'http:': URLLoader(http_1.default),
|
|
38
|
+
'https:': URLLoader(https_1.default),
|
|
39
|
+
'file:': FileLoader,
|
|
40
|
+
};
|
|
41
|
+
const fetch = (urlStr) => {
|
|
42
|
+
const url = new url_1.URL(urlStr);
|
|
43
|
+
const loader = ProtocolLoader[url.protocol];
|
|
44
|
+
if (!loader) {
|
|
45
|
+
throw new Error(`No schema loader for protocol ${url.protocol}`);
|
|
46
|
+
}
|
|
47
|
+
return loader(url);
|
|
48
|
+
};
|
|
49
|
+
const SchemaCache = {};
|
|
50
|
+
const schemaCache = async (key, fn) => {
|
|
51
|
+
const cachedResult = SchemaCache[key];
|
|
52
|
+
if (cachedResult) {
|
|
53
|
+
return cachedResult;
|
|
54
|
+
}
|
|
55
|
+
const result = await fn(key);
|
|
56
|
+
SchemaCache[key] = result;
|
|
57
|
+
return result;
|
|
58
|
+
};
|
|
59
|
+
const fetchSchema = async (sourceURL) => {
|
|
60
|
+
return schemaCache(sourceURL, async (sourceURL) => {
|
|
61
|
+
const data = await fetch(sourceURL);
|
|
62
|
+
return (0, js_yaml_1.load)(data.toString());
|
|
63
|
+
});
|
|
64
|
+
};
|
|
65
|
+
const lookup = async (host, openapiSchemata) => {
|
|
66
|
+
const sourceURL = openapiSchemata[host];
|
|
67
|
+
if (!sourceURL) {
|
|
68
|
+
throw new Error(`No OpenAPI schema URL configured for host ${host}. Available hosts are: ${Object.keys(openapiSchemata).join(', ')}`);
|
|
69
|
+
}
|
|
70
|
+
return await fetchSchema(sourceURL);
|
|
71
|
+
};
|
|
72
|
+
exports.default = lookup;
|
|
73
|
+
//# sourceMappingURL=provider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provider.js","sourceRoot":"","sources":["../../../src/openapi/provider.ts"],"names":[],"mappings":";;;;;AAAA,qCAA+B;AAC/B,6BAA0B;AAE1B,gDAA6C;AAC7C,kDAA0B;AAC1B,0CAAuC;AAIvC,MAAM,SAAS,GAAG,CAAC,QAAa,EAAE,EAAE;IAClC,OAAO,CAAC,GAAQ,EAAmB,EAAE;QACnC,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACrC,QAAQ;iBACL,GAAG,CAAC,GAAG,CAAC;iBACR,EAAE,CAAC,UAAU,EAAE,CAAC,QAAyB,EAAE,EAAE;gBAC5C,IAAI,QAAQ,CAAC,UAAU,KAAK,GAAG,EAAE;oBAC/B,OAAO,MAAM,CAAC,GAAG,QAAQ,CAAC,UAAU,IAAI,QAAQ,CAAC,aAAa,EAAE,CAAC,CAAC;iBACnE;gBAED,MAAM,IAAI,GAAa,EAAE,CAAC;gBAC1B,QAAQ;qBACL,EAAE,CAAC,MAAM,EAAE,CAAC,KAAa,EAAE,EAAE;oBAC5B,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;gBAChC,CAAC,CAAC;qBACD,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE;oBACd,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,C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AC,SAAS,EAAE,KAAK,EAAE,SAAiB,EAAE,EAAE;QACxD,MAAM,IAAI,GAAG,MAAM,KAAK,CAAC,SAAS,CAAC,CAAC;QACpC,OAAO,IAAA,cAAI,EAAC,IAAI,CAAC,QAAQ,EAAE,CAAuB,CAAC;IACrD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,KAAK,EAClB,IAAY,EACZ,eAAuC,EACV,EAAE;IAC/B,MAAM,SAAS,GAAG,eAAe,CAAC,IAAI,CAAC,CAAC;IACxC,IAAI,CAAC,SAAS,EAAE;QACd,MAAM,IAAI,KAAK,CACb,6CAA6C,IAAI,0BAA0B,MAAM,CAAC,IAAI,CACpF,eAAe,CAChB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CACf,CAAC;KACH;IACD,OAAO,MAAM,WAAW,CAAC,SAAS,CAAC,CAAC;AACtC,CAAC,CAAC;AAEF,kBAAe,MAAM,CAAC"}
|
|
@@ -1,29 +1,53 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const statusCodes_1 = __importDefault(require("./statusCodes"));
|
|
7
|
+
const schemaInferrer_1 = __importDefault(require("./schemaInferrer"));
|
|
3
8
|
class Response {
|
|
4
9
|
constructor(statusCode) {
|
|
5
|
-
this.statusCode =
|
|
6
|
-
this.
|
|
10
|
+
this.statusCode = statusCode;
|
|
11
|
+
this.rpcRequests = [];
|
|
7
12
|
}
|
|
8
13
|
openapi() {
|
|
9
14
|
// eslint-disable-next-line arrow-body-style
|
|
10
|
-
const
|
|
11
|
-
return this.
|
|
12
|
-
.
|
|
13
|
-
.
|
|
15
|
+
const contentTypes = () => {
|
|
16
|
+
return this.rpcRequests
|
|
17
|
+
.map((rpcRequest) => rpcRequest.responseContentType)
|
|
18
|
+
.filter((ct) => ct)
|
|
19
|
+
.map((ct) => ct.split(';')[0]);
|
|
14
20
|
};
|
|
15
|
-
const
|
|
21
|
+
const schemata = {};
|
|
22
|
+
this.rpcRequests.forEach((rpcRequest) => {
|
|
23
|
+
const returnValue = rpcRequest.returnValue;
|
|
24
|
+
if (!returnValue)
|
|
25
|
+
return;
|
|
26
|
+
if (rpcRequest.responseContentType) {
|
|
27
|
+
const mimeType = rpcRequest.responseContentType.split(';')[0];
|
|
28
|
+
if (!schemata[mimeType]) {
|
|
29
|
+
schemata[mimeType] = new schemaInferrer_1.default();
|
|
30
|
+
}
|
|
31
|
+
schemata[mimeType].addExample(returnValue);
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
const content = [...new Set(contentTypes())]
|
|
16
35
|
.sort()
|
|
17
36
|
.reduce((memo, mimeType) => {
|
|
18
|
-
// eslint-disable-next-line no-param-reassign
|
|
19
37
|
memo[mimeType] = {};
|
|
38
|
+
if (!schemata[mimeType])
|
|
39
|
+
return memo;
|
|
40
|
+
// eslint-disable-next-line no-param-reassign
|
|
41
|
+
const schema = schemata[mimeType].openapi();
|
|
42
|
+
if (schema)
|
|
43
|
+
memo[mimeType].schema = schema;
|
|
20
44
|
return memo;
|
|
21
45
|
}, {});
|
|
22
|
-
return { content, description:
|
|
46
|
+
return { content, description: statusCodes_1.default[this.statusCode] };
|
|
23
47
|
}
|
|
24
|
-
|
|
25
|
-
this.
|
|
48
|
+
addRpcRequest(rpcRequest) {
|
|
49
|
+
this.rpcRequests.push(rpcRequest);
|
|
26
50
|
}
|
|
27
51
|
}
|
|
28
|
-
|
|
52
|
+
exports.default = Response;
|
|
29
53
|
//# sourceMappingURL=response.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"response.js","sourceRoot":"","sources":["../../../src/openapi/response.
|
|
1
|
+
{"version":3,"file":"response.js","sourceRoot":"","sources":["../../../src/openapi/response.ts"],"names":[],"mappings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ACzB,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC;YAEpB,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC;gBAAE,OAAO,IAAI,CAAC;YAErC,6CAA6C;YAC7C,MAAM,MAAM,GAAG,QAAQ,CAAC,QAAQ,CAAC,CAAC,OAAO,EAAE,CAAC;YAC5C,IAAI,MAAM;gBAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,MAAM,GAAG,MAAM,CAAC;YAE3C,OAAO,IAAI,CAAC;QACd,CAAC,EAAE,EAA+C,CAAC,CAAC;QACtD,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,qBAAW,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC;IAChE,CAAC;IAED,aAAa,CAAC,UAAsB;QAClC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACpC,CAAC;CACF;AAhDD,2BAgDC"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.rpcRequestForEvent = void 0;
|
|
4
|
+
const url_1 = require("url");
|
|
5
|
+
const util_1 = require("./util");
|
|
6
|
+
class ServerRPCRequest {
|
|
7
|
+
constructor(event) {
|
|
8
|
+
this.event = event;
|
|
9
|
+
}
|
|
10
|
+
get status() {
|
|
11
|
+
return this.event.httpServerResponse.status;
|
|
12
|
+
}
|
|
13
|
+
get parameters() {
|
|
14
|
+
return this.event.message || [];
|
|
15
|
+
}
|
|
16
|
+
get returnValue() {
|
|
17
|
+
return this.event.returnValue;
|
|
18
|
+
}
|
|
19
|
+
get requestHeaders() {
|
|
20
|
+
var _a;
|
|
21
|
+
return ((_a = this.event.httpServerRequest) === null || _a === void 0 ? void 0 : _a.headers) || {};
|
|
22
|
+
}
|
|
23
|
+
get responseHeaders() {
|
|
24
|
+
var _a;
|
|
25
|
+
return ((_a = this.event.httpServerResponse) === null || _a === void 0 ? void 0 : _a.headers) || {};
|
|
26
|
+
}
|
|
27
|
+
get requestContentType() {
|
|
28
|
+
return this.event.requestContentType;
|
|
29
|
+
}
|
|
30
|
+
get responseContentType() {
|
|
31
|
+
return this.event.responseContentType;
|
|
32
|
+
}
|
|
33
|
+
get requestMethod() {
|
|
34
|
+
var _a;
|
|
35
|
+
return (_a = this.event.requestMethod) === null || _a === void 0 ? void 0 : _a.toLowerCase();
|
|
36
|
+
}
|
|
37
|
+
get requestPath() {
|
|
38
|
+
return (0, util_1.ensureString)(this.event.httpServerRequest.normalized_path_info ||
|
|
39
|
+
this.event.httpServerRequest.path_info);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
class ClientRPCRequest {
|
|
43
|
+
constructor(event) {
|
|
44
|
+
this.event = event;
|
|
45
|
+
}
|
|
46
|
+
get status() {
|
|
47
|
+
return this.event.httpClientResponse.status;
|
|
48
|
+
}
|
|
49
|
+
get parameters() {
|
|
50
|
+
return this.event.parameters || [];
|
|
51
|
+
}
|
|
52
|
+
get returnValue() {
|
|
53
|
+
return this.event.returnValue;
|
|
54
|
+
}
|
|
55
|
+
get requestHeaders() {
|
|
56
|
+
var _a;
|
|
57
|
+
return ((_a = this.event.httpClientRequest) === null || _a === void 0 ? void 0 : _a.headers) || {};
|
|
58
|
+
}
|
|
59
|
+
get responseHeaders() {
|
|
60
|
+
var _a;
|
|
61
|
+
return ((_a = this.event.httpClientResponse) === null || _a === void 0 ? void 0 : _a.headers) || {};
|
|
62
|
+
}
|
|
63
|
+
get requestContentType() {
|
|
64
|
+
return this.event.requestContentType;
|
|
65
|
+
}
|
|
66
|
+
get responseContentType() {
|
|
67
|
+
return this.event.responseContentType;
|
|
68
|
+
}
|
|
69
|
+
get requestMethod() {
|
|
70
|
+
var _a;
|
|
71
|
+
return (_a = this.event.requestMethod) === null || _a === void 0 ? void 0 : _a.toLowerCase();
|
|
72
|
+
}
|
|
73
|
+
get requestPath() {
|
|
74
|
+
// TODO: Back-substitute query parameters into the URL.
|
|
75
|
+
return new url_1.URL(this.event.httpClientRequest.url).pathname;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
function rpcRequestForEvent(event) {
|
|
79
|
+
if (event.httpServerRequest && event.httpServerResponse) {
|
|
80
|
+
return new ServerRPCRequest(event);
|
|
81
|
+
}
|
|
82
|
+
else if (event.httpClientRequest && event.httpClientResponse) {
|
|
83
|
+
return new ClientRPCRequest(event);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
exports.rpcRequestForEvent = rpcRequestForEvent;
|
|
87
|
+
//# sourceMappingURL=rpcRequest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rpcRequest.js","sourceRoot":"","sources":["../../../src/openapi/rpcRequest.ts"],"names":[],"mappings":";;;AAEA,6BAA0B;AAC1B,iCAAsC;AActC,MAAM,gBAAgB;IACpB,YAAoB,KAAY;QAAZ,UAAK,GAAL,KAAK,CAAO;IAAG,CAAC;IAEpC,IAAI,MAAM;QACR,OAAO,IAAI,CAAC,KAAK,CAAC,kBAAmB,CAAC,MAAM,CAAC;IAC/C,CAAC;IAED,IAAI,UAAU;QACZ,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,IAAI,EAAE,CAAC;IAClC,CAAC;IAED,IAAI,WAAW;QACb,OAAO,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC;IAChC,CAAC;IAED,IAAI,cAAc;;QAChB,OAAO,CAAA,MAAA,IAAI,CAAC,KAAK,CAAC,iBAAiB,0CAAE,OAAO,KAAI,EAAE,CAAC;IACrD,CAAC;IAED,IAAI,eAAe;;QACjB,OAAO,CAAA,MAAA,IAAI,CAAC,KAAK,CAAC,kBAAkB,0CAAE,OAAO,KAAI,EAAE,CAAC;IACtD,CAAC;IAED,IAAI,kBAAkB;QACpB,OAAO,IAAI,CAAC,KAAK,CAAC,kBAAmB,CAAC;IACxC,CAAC;IAED,IAAI,mBAAmB;QACrB,OAAO,IAAI,CAAC,KAAK,CAA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AAC,iBAAkB,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC;IAC7D,CAAC;CACF;AAED,SAAgB,kBAAkB,CAAC,KAAY;IAC7C,IAAI,KAAK,CAAC,iBAAiB,IAAI,KAAK,CAAC,kBAAkB,EAAE;QACvD,OAAO,IAAI,gBAAgB,CAAC,KAAK,CAAC,CAAC;KACpC;SAAM,IAAI,KAAK,CAAC,iBAAiB,IAAI,KAAK,CAAC,kBAAkB,EAAE;QAC9D,OAAO,IAAI,gBAAgB,CAAC,KAAK,CAAC,CAAC;KACpC;AACH,CAAC;AAND,gDAMC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const util_1 = require("./util");
|
|
4
|
+
function mergeProperties(a, b) {
|
|
5
|
+
a || (a = {});
|
|
6
|
+
b || (b = {});
|
|
7
|
+
return Object.keys(a)
|
|
8
|
+
.concat(Object.keys(b))
|
|
9
|
+
.reduce((memo, key) => {
|
|
10
|
+
memo[key] = mergeType(a[key] || {}, b[key] || {});
|
|
11
|
+
return memo;
|
|
12
|
+
}, {});
|
|
13
|
+
}
|
|
14
|
+
// Merge type, items and properties of schema objects.
|
|
15
|
+
function mergeType(a, b) {
|
|
16
|
+
var _a, _b, _c, _d;
|
|
17
|
+
if (b === null || b === undefined)
|
|
18
|
+
return a;
|
|
19
|
+
const result = Object.assign({}, a);
|
|
20
|
+
if (!a.type) {
|
|
21
|
+
result.type = b.type;
|
|
22
|
+
}
|
|
23
|
+
else if (b.type === 'array') {
|
|
24
|
+
result.type = 'array';
|
|
25
|
+
}
|
|
26
|
+
else if (b.type === 'object') {
|
|
27
|
+
result.type = 'object';
|
|
28
|
+
}
|
|
29
|
+
if (a.items || b.items) {
|
|
30
|
+
result.items = mergeType(a.items || {}, b.items);
|
|
31
|
+
if (((_a = a.items) === null || _a === void 0 ? void 0 : _a.properties) || ((_b = b.items) === null || _b === void 0 ? void 0 : _b.properties)) {
|
|
32
|
+
result.items.properties = mergeProperties((_c = a.items) === null || _c === void 0 ? void 0 : _c.properties, (_d = b.items) === null || _d === void 0 ? void 0 : _d.properties);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
if (a.properties || b.properties) {
|
|
37
|
+
result.properties = mergeProperties(a.properties, b.properties);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
return result;
|
|
41
|
+
}
|
|
42
|
+
class SchemaInferrer {
|
|
43
|
+
constructor() {
|
|
44
|
+
this.examples = [];
|
|
45
|
+
}
|
|
46
|
+
openapi() {
|
|
47
|
+
if (this.examples.length === 0)
|
|
48
|
+
return;
|
|
49
|
+
return this.examples.reduce((memo, example) => {
|
|
50
|
+
const schema = (0, util_1.messageToOpenAPISchema)(example);
|
|
51
|
+
return mergeType(memo, schema);
|
|
52
|
+
}, {});
|
|
53
|
+
}
|
|
54
|
+
addExample(value) {
|
|
55
|
+
this.examples.push(value);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
exports.default = SchemaInferrer;
|
|
59
|
+
//# sourceMappingURL=schemaInferrer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemaInferrer.js","sourceRoot":"","sources":["../../../src/openapi/schemaInferrer.ts"],"names":[],"mappings":";;AAEA,iCAAgD;AAEhD,SAAS,eAAe,CAAC,CAAM,EAAE,CAAM;IACrC,CAAC,KAAD,CAAC,GAAK,EAAE,EAAC;IACT,CAAC,KAAD,CAAC,GAAK,EAAE,EAAC;IAET,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;SAClB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;SACtB,MAAM,CAAC,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE;QACpB,IAAI,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,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AO,MAAM,CAAC;AAChB,CAAC;AAED,MAAqB,cAAc;IAGjC;QACE,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;IACrB,CAAC;IAED,OAAO;QACL,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO;QAEvC,OAAO,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE;YAC5C,MAAM,MAAM,GAAG,IAAA,6BAAsB,EAAC,OAAO,CAAC,CAAC;YAC/C,OAAO,SAAS,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QACjC,CAAC,EAAE,EAAS,CAAC,CAAC;IAChB,CAAC;IAED,UAAU,CAAC,KAAgB;QACzB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC5B,CAAC;CACF;AAnBD,iCAmBC"}
|
|
@@ -1,56 +1,31 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
if (tokens.length === 1) {
|
|
5
|
-
return {
|
|
6
|
-
schemeId: 'api_key',
|
|
7
|
-
scheme: {
|
|
8
|
-
type: 'apiKey',
|
|
9
|
-
name: 'authorization',
|
|
10
|
-
in: 'header',
|
|
11
|
-
},
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
const schemeId = tokens[0].toLowerCase();
|
|
15
|
-
return {
|
|
16
|
-
schemeId,
|
|
17
|
-
scheme: {
|
|
18
|
-
type: 'http',
|
|
19
|
-
scheme: schemeId,
|
|
20
|
-
},
|
|
21
|
-
};
|
|
22
|
-
}
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const util_1 = require("./util");
|
|
23
4
|
class SecuritySchemes {
|
|
24
5
|
constructor() {
|
|
25
|
-
this.
|
|
6
|
+
this.rpcRequests = [];
|
|
26
7
|
}
|
|
27
8
|
/**
|
|
28
9
|
* Adds an event to the security schemes, and assigns a security scheme id.
|
|
29
10
|
* If the event has no detectable security scheme, this function returns null.
|
|
30
11
|
*
|
|
31
|
-
* @param {Event} event
|
|
32
12
|
* @returns the security scheme id for the event, or null.
|
|
33
13
|
*/
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
if (!authorization) {
|
|
37
|
-
return null;
|
|
38
|
-
}
|
|
39
|
-
const { schemeId, scheme } = parseScheme(authorization);
|
|
40
|
-
if (!this.schemes[schemeId]) {
|
|
41
|
-
this.schemes[schemeId] = scheme;
|
|
42
|
-
}
|
|
43
|
-
return schemeId;
|
|
14
|
+
addRpcRequest(rpcRequest) {
|
|
15
|
+
this.rpcRequests.push(rpcRequest);
|
|
44
16
|
}
|
|
45
17
|
openapi() {
|
|
46
|
-
return
|
|
47
|
-
.
|
|
48
|
-
.
|
|
49
|
-
|
|
50
|
-
|
|
18
|
+
return this.rpcRequests
|
|
19
|
+
.map((rpcRequest) => rpcRequest.requestHeaders['Authorization'])
|
|
20
|
+
.filter((authorization) => authorization)
|
|
21
|
+
.reduce((memo, authorization) => {
|
|
22
|
+
const scheme = (0, util_1.parseScheme)(authorization);
|
|
23
|
+
if (!memo[scheme.schemeId]) {
|
|
24
|
+
memo[scheme.schemeId] = scheme.scheme;
|
|
25
|
+
}
|
|
51
26
|
return memo;
|
|
52
27
|
}, {});
|
|
53
28
|
}
|
|
54
29
|
}
|
|
55
|
-
|
|
30
|
+
exports.default = SecuritySchemes;
|
|
56
31
|
//# sourceMappingURL=securitySchemes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"securitySchemes.js","sourceRoot":"","sources":["../../../src/openapi/securitySchemes.
|
|
1
|
+
{"version":3,"file":"securitySchemes.js","sourceRoot":"","sources":["../../../src/openapi/securitySchemes.ts"],"names":[],"mappings":";;AAEA,iCAAqC;AAErC,MAAqB,eAAe;IAApC;QACE,gBAAW,GAAiB,EAAE,CAAC;IAwBjC,CAAC;IAtBC;;;;;OAKG;IACH,aAAa,CAAC,UAAsB;QAClC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACpC,CAAC;IAED,OAAO;QACL,OAAO,IAAI,CAAC,WAAW;aACpB,GAAG,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,cAAc,CAAC,eAAe,CAAC,CAAC;aAC/D,MAAM,CAAC,CAAC,aAAa,EAAE,EAAE,CAAC,aAAa,CAAC;aACxC,MAAM,CAAC,CAAC,IAAI,EAAE,aAAa,EAAE,EAAE;YAC9B,MAAM,MAAM,GAAG,IAAA,kBAAW,EAAC,aAAa,CAAC,CAAC;YAC1C,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE;gBAC1B,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC;aACvC;YACD,OAAO,IAAI,CAAC;QACd,CAAC,EAAE,EAAoD,CAAC,CAAC;IAC7D,CAAC;CACF;AAzBD,kCAyBC"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
// https://github.com/nodejs/node/blob/f1653cc9b80b521ef5b129537ce1df9098bbdc1b/lib/_http_server.js#L18-L81
|
|
4
|
+
exports.default = {
|
|
5
|
+
100: 'Continue',
|
|
6
|
+
101: 'Switching Protocols',
|
|
7
|
+
102: 'Processing',
|
|
8
|
+
200: 'OK',
|
|
9
|
+
201: 'Created',
|
|
10
|
+
202: 'Accepted',
|
|
11
|
+
203: 'Non-Authoritative Information',
|
|
12
|
+
204: 'No Content',
|
|
13
|
+
205: 'Reset Content',
|
|
14
|
+
206: 'Partial Content',
|
|
15
|
+
207: 'Multi-Status',
|
|
16
|
+
208: 'Already Reported',
|
|
17
|
+
226: 'IM Used',
|
|
18
|
+
300: 'Multiple Choices',
|
|
19
|
+
301: 'Moved Permanently',
|
|
20
|
+
302: 'Found',
|
|
21
|
+
303: 'See Other',
|
|
22
|
+
304: 'Not Modified',
|
|
23
|
+
305: 'Use Proxy',
|
|
24
|
+
307: 'Temporary Redirect',
|
|
25
|
+
308: 'Permanent Redirect',
|
|
26
|
+
400: 'Bad Request',
|
|
27
|
+
401: 'Unauthorized',
|
|
28
|
+
402: 'Payment Required',
|
|
29
|
+
403: 'Forbidden',
|
|
30
|
+
404: 'Not Found',
|
|
31
|
+
405: 'Method Not Allowed',
|
|
32
|
+
406: 'Not Acceptable',
|
|
33
|
+
407: 'Proxy Authentication Required',
|
|
34
|
+
408: 'Request Timeout',
|
|
35
|
+
409: 'Conflict',
|
|
36
|
+
410: 'Gone',
|
|
37
|
+
411: 'Length Required',
|
|
38
|
+
412: 'Precondition Failed',
|
|
39
|
+
413: 'Payload Too Large',
|
|
40
|
+
414: 'URI Too Long',
|
|
41
|
+
415: 'Unsupported Media Type',
|
|
42
|
+
416: 'Range Not Satisfiable',
|
|
43
|
+
417: 'Expectation Failed',
|
|
44
|
+
418: "I'm a teapot",
|
|
45
|
+
421: 'Misdirected Request',
|
|
46
|
+
422: 'Unprocessable Entity',
|
|
47
|
+
423: 'Locked',
|
|
48
|
+
424: 'Failed Dependency',
|
|
49
|
+
425: 'Unordered Collection',
|
|
50
|
+
426: 'Upgrade Required',
|
|
51
|
+
428: 'Precondition Required',
|
|
52
|
+
429: 'Too Many Requests',
|
|
53
|
+
431: 'Request Header Fields Too Large',
|
|
54
|
+
451: 'Unavailable For Legal Reasons',
|
|
55
|
+
500: 'Internal Server Error',
|
|
56
|
+
501: 'Not Implemented',
|
|
57
|
+
502: 'Bad Gateway',
|
|
58
|
+
503: 'Service Unavailable',
|
|
59
|
+
504: 'Gateway Timeout',
|
|
60
|
+
505: 'HTTP Version Not Supported',
|
|
61
|
+
506: 'Variant Also Negotiates',
|
|
62
|
+
507: 'Insufficient Storage',
|
|
63
|
+
508: 'Loop Detected',
|
|
64
|
+
509: 'Bandwidth Limit Exceeded',
|
|
65
|
+
510: 'Not Extended',
|
|
66
|
+
511: 'Network Authentication Required',
|
|
67
|
+
};
|
|
68
|
+
//# sourceMappingURL=statusCodes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"statusCodes.js","sourceRoot":"","sources":["../../../src/openapi/statusCodes.ts"],"names":[],"mappings":";;AAAA,2GAA2G;AAC3G,kBAAe;IACb,GAAG,EAAE,UAAU;IACf,GAAG,EAAE,qBAAqB;IAC1B,GAAG,EAAE,YAAY;IACjB,GAAG,EAAE,IAAI;IACT,GAAG,EAAE,SAAS;IACd,GAAG,EAAE,UAAU;IACf,GAAG,EAAE,+BAA+B;IACpC,GAAG,EAAE,YAAY;IACjB,GAAG,EAAE,eAAe;IACpB,GAAG,EAAE,iBAAiB;IACtB,GAAG,EAAE,cAAc;IACnB,GAAG,EAAE,kBAAkB;IACvB,GAAG,EAAE,SAAS;IACd,GAAG,EAAE,kBAAkB;IACvB,GAAG,EAAE,mBAAmB;IACxB,GAAG,EAAE,OAAO;IACZ,GAAG,EAAE,WAAW;IAChB,GAAG,EAAE,cAAc;IACnB,GAAG,EAAE,WAAW;IAChB,GAAG,EAAE,oBAAoB;IACzB,GAAG,EAAE,oBAAoB;IACzB,GAAG,EAAE,aAAa;IAClB,GAAG,EAAE,cAAc;IACnB,GAAG,EAAE,kBAAkB;IACvB,GAAG,EAAE,WAAW;IAChB,GAAG,EAAE,WAAW;IAChB,GAAG,EAAE,oBAAoB;IACzB,GAAG,EAAE,gBAAgB;IACrB,GAAG,EAAE,+BAA+B;IACpC,GAAG,EAAE,iBAAiB;IACtB,GAAG,EAAE,UAAU;IACf,GAAG,EAAE,MAAM;IACX,GAAG,EAAE,iBAAiB;IACtB,GAAG,EAAE,qBAAqB;IAC1B,GAAG,EAAE,mBAAmB;IACxB,GAAG,EAAE,cAAc;IACnB,GAAG,EAAE,wBAAwB;IAC7B,GAAG,EAAE,uBAAuB;IAC5B,GAAG,EAAE,oBAAoB;IACzB,GAAG,EAAE,cAAc;IACnB,GAAG,EAAE,qB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