@appland/appmap 3.25.3 → 3.25.4

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.
Files changed (38) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/built/package.json +2 -3
  3. package/built/src/cli.js +20 -1
  4. package/built/src/cli.js.map +1 -1
  5. package/built/src/{openapi/command.js → cmds/openapi.js} +7 -11
  6. package/built/src/cmds/openapi.js.map +1 -0
  7. package/built/src/fingerprint/fingerprinter.js +16 -3
  8. package/built/src/fingerprint/fingerprinter.js.map +1 -1
  9. package/built/src/utils.js +75 -27
  10. package/built/src/utils.js.map +1 -1
  11. package/package.json +2 -3
  12. package/built/src/openapi/command.js.map +0 -1
  13. package/built/src/openapi/index.js +0 -28
  14. package/built/src/openapi/index.js.map +0 -1
  15. package/built/src/openapi/method.js +0 -121
  16. package/built/src/openapi/method.js.map +0 -1
  17. package/built/src/openapi/model.js +0 -47
  18. package/built/src/openapi/model.js.map +0 -1
  19. package/built/src/openapi/objectSchema.js +0 -47
  20. package/built/src/openapi/objectSchema.js.map +0 -1
  21. package/built/src/openapi/parseHTTPServerRequests.js +0 -11
  22. package/built/src/openapi/parseHTTPServerRequests.js.map +0 -1
  23. package/built/src/openapi/path.js +0 -34
  24. package/built/src/openapi/path.js.map +0 -1
  25. package/built/src/openapi/provider.js +0 -73
  26. package/built/src/openapi/provider.js.map +0 -1
  27. package/built/src/openapi/response.js +0 -53
  28. package/built/src/openapi/response.js.map +0 -1
  29. package/built/src/openapi/rpcRequest.js +0 -87
  30. package/built/src/openapi/rpcRequest.js.map +0 -1
  31. package/built/src/openapi/schemaInferrer.js +0 -59
  32. package/built/src/openapi/schemaInferrer.js.map +0 -1
  33. package/built/src/openapi/securitySchemes.js +0 -31
  34. package/built/src/openapi/securitySchemes.js.map +0 -1
  35. package/built/src/openapi/statusCodes.js +0 -68
  36. package/built/src/openapi/statusCodes.js.map +0 -1
  37. package/built/src/openapi/util.js +0 -131
  38. package/built/src/openapi/util.js.map +0 -1
@@ -1,68 +0,0 @@
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
@@ -1 +0,0 @@
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,qBAAqB;IAC1B,GAAG,EAAE,sBAAsB;IAC3B,GAAG,EAAE,QAAQ;IACb,GAAG,EAAE,mBAAmB;IACxB,GAAG,EAAE,sBAAsB;IAC3B,GAAG,EAAE,kBAAkB;IACvB,GAAG,EAAE,uBAAuB;IAC5B,GAAG,EAAE,mBAAmB;IACxB,GAAG,EAAE,iCAAiC;IACtC,GAAG,EAAE,+BAA+B;IACpC,GAAG,EAAE,uBAAuB;IAC5B,GAAG,EAAE,iBAAiB;IACtB,GAAG,EAAE,aAAa;IAClB,GAAG,EAAE,qBAAqB;IAC1B,GAAG,EAAE,iBAAiB;IACtB,GAAG,EAAE,4BAA4B;IACjC,GAAG,EAAE,yBAAyB;IAC9B,GAAG,EAAE,sBAAsB;IAC3B,GAAG,EAAE,eAAe;IACpB,GAAG,EAAE,0BAA0B;IAC/B,GAAG,EAAE,cAAc;IACnB,GAAG,EAAE,iCAAiC;CACb,CAAC"}
@@ -1,131 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.parseScheme = exports.messageToOpenAPISchema = exports.ensureString = void 0;
4
- const utils_1 = require("../utils");
5
- const unrecognizedTypes = new Set();
6
- function parseScheme(authorization) {
7
- const tokens = authorization.split(/\s/);
8
- if (tokens.length === 1) {
9
- return {
10
- schemeId: 'api_key',
11
- scheme: {
12
- type: 'apiKey',
13
- name: 'authorization',
14
- in: 'header',
15
- },
16
- };
17
- }
18
- const schemeId = tokens[0].toLowerCase();
19
- return {
20
- schemeId,
21
- scheme: {
22
- type: 'http',
23
- scheme: schemeId,
24
- },
25
- };
26
- }
27
- exports.parseScheme = parseScheme;
28
- function classNameToOpenAPIType(className) {
29
- if (!className || className === '') {
30
- return 'unknown';
31
- }
32
- const mapRubyType = (t) => {
33
- switch (t) {
34
- case 'array':
35
- case 'sequel::postgres::pgarray':
36
- return 'array';
37
- case 'hash':
38
- case 'sequel::postgres::jsonbhash':
39
- case 'activesupport::hashwithindifferentaccess':
40
- return 'object';
41
- case 'integer':
42
- return 'integer';
43
- case 'float':
44
- case 'numeric':
45
- return 'number';
46
- case 'trueclass':
47
- case 'falseclass':
48
- return 'boolean';
49
- case 'nilclass':
50
- return 'unknown';
51
- case 'string':
52
- return 'string';
53
- }
54
- };
55
- const mapPythonType = (t) => {
56
- if (!t.startsWith('builtins.')) {
57
- return;
58
- }
59
- switch (t.substr(9)) {
60
- case 'bool':
61
- return 'boolean';
62
- case 'dict':
63
- return 'object';
64
- case 'int':
65
- return 'integer';
66
- case 'list':
67
- return 'array';
68
- case 'str':
69
- return 'string';
70
- }
71
- };
72
- const mapJavaType = (t) => {
73
- switch (t) {
74
- case 'java.lang.string':
75
- return 'string';
76
- }
77
- };
78
- const mapper = (t) => mapRubyType(t) || mapPythonType(t) || mapJavaType(t);
79
- const mapped = mapper(className.toLowerCase());
80
- if (!mapped && !unrecognizedTypes.has(className)) {
81
- if ((0, utils_1.verbose)()) {
82
- console.warn(`Warning: Don't know how to map "${className}" to an OpenAPI type. You'll need to update the generated file.`);
83
- }
84
- unrecognizedTypes.add(className);
85
- return 'object';
86
- }
87
- return mapped;
88
- }
89
- function messageToOpenAPISchema(message) {
90
- const type = classNameToOpenAPIType(message.class);
91
- if (type === 'unknown')
92
- return;
93
- const result = { type };
94
- if (message.properties) {
95
- const properties = message.properties.reduce((memo, msgProperty) => {
96
- const type = classNameToOpenAPIType(msgProperty.class);
97
- if (type === 'array') {
98
- // eslint-disable-next-line no-param-reassign
99
- memo[msgProperty.name] = { type };
100
- }
101
- else if (type !== 'unknown') {
102
- // eslint-disable-next-line no-param-reassign
103
- memo[msgProperty.name] = {
104
- type,
105
- };
106
- }
107
- return memo;
108
- }, {});
109
- if (type === 'array') {
110
- result.items = { type: 'object', properties };
111
- }
112
- else {
113
- result.properties = properties;
114
- }
115
- }
116
- else {
117
- if (type === 'array') {
118
- result.items = { type: 'string' };
119
- }
120
- }
121
- return result;
122
- }
123
- exports.messageToOpenAPISchema = messageToOpenAPISchema;
124
- function ensureString(value) {
125
- if (Array.isArray(value)) {
126
- return value.join('');
127
- }
128
- return value.toString();
129
- }
130
- exports.ensureString = ensureString;
131
- //# sourceMappingURL=util.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"util.js","sourceRoot":"","sources":["../../../src/openapi/util.ts"],"names":[],"mappings":";;;AAEA,oCAAmC;AAEnC,MAAM,iBAAiB,GAAG,IAAI,GAAG,EAAE,CAAC;AAOpC,SAAS,WAAW,CAAC,aAAqB;IACxC,MAAM,MAAM,GAAG,aAAa,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACzC,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE;QACvB,OAAO;YACL,QAAQ,EAAE,SAAS;YACnB,MAAM,EAAE;gBACN,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,eAAe;gBACrB,EAAE,EAAE,QAAQ;aACqB;SACpC,CAAC;KACH;IAED,MAAM,QAAQ,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;IACzC,OAAO;QACL,QAAQ;QACR,MAAM,EAAE;YACN,IAAI,EAAE,MAAM;YACZ,MAAM,EAAE,QAAQ;SACe;KAClC,CAAC;AACJ,CAAC;AAsH8C,kCAAW;AApH1D,SAAS,sBAAsB,CAAC,SAAS;IACvC,IAAI,CAAC,SAAS,IAAI,SAAS,KAAK,EAAE,EAAE;QAClC,OAAO,SAAS,CAAC;KAClB;IAED,MAAM,WAAW,GAAG,CAAC,CAAS,EAAsB,EAAE;QACpD,QAAQ,CAAC,EAAE;YACT,KAAK,OAAO,CAAC;YACb,KAAK,2BAA2B;gBAC9B,OAAO,OAAO,CAAC;YACjB,KAAK,MAAM,CAAC;YACZ,KAAK,6BAA6B,CAAC;YACnC,KAAK,0CAA0C;gBAC7C,OAAO,Q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