@appium/base-driver 8.7.2 → 9.0.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/build/lib/basedriver/capabilities.d.ts +11 -163
- package/build/lib/basedriver/capabilities.d.ts.map +1 -1
- package/build/lib/basedriver/capabilities.js +354 -236
- package/build/lib/basedriver/capabilities.js.map +1 -1
- package/build/lib/basedriver/commands/event.d.ts +7 -6
- package/build/lib/basedriver/commands/event.d.ts.map +1 -1
- package/build/lib/basedriver/commands/event.js +55 -35
- package/build/lib/basedriver/commands/event.js.map +1 -1
- package/build/lib/basedriver/commands/execute.d.ts +7 -6
- package/build/lib/basedriver/commands/execute.d.ts.map +1 -1
- package/build/lib/basedriver/commands/execute.js +66 -58
- package/build/lib/basedriver/commands/execute.js.map +1 -1
- package/build/lib/basedriver/commands/find.d.ts +9 -7
- package/build/lib/basedriver/commands/find.d.ts.map +1 -1
- package/build/lib/basedriver/commands/find.js +102 -54
- package/build/lib/basedriver/commands/find.js.map +1 -1
- package/build/lib/basedriver/commands/index.d.ts +3 -7
- package/build/lib/basedriver/commands/index.d.ts.map +1 -1
- package/build/lib/basedriver/commands/index.js +30 -33
- package/build/lib/basedriver/commands/index.js.map +1 -1
- package/build/lib/basedriver/commands/log.d.ts +8 -9
- package/build/lib/basedriver/commands/log.d.ts.map +1 -1
- package/build/lib/basedriver/commands/log.js +54 -38
- package/build/lib/basedriver/commands/log.js.map +1 -1
- package/build/lib/basedriver/commands/session.d.ts +7 -6
- package/build/lib/basedriver/commands/session.d.ts.map +1 -1
- package/build/lib/basedriver/commands/session.js +46 -39
- package/build/lib/basedriver/commands/session.js.map +1 -1
- package/build/lib/basedriver/commands/settings.d.ts +7 -7
- package/build/lib/basedriver/commands/settings.d.ts.map +1 -1
- package/build/lib/basedriver/commands/settings.js +35 -28
- package/build/lib/basedriver/commands/settings.js.map +1 -1
- package/build/lib/basedriver/commands/timeout.d.ts +7 -5
- package/build/lib/basedriver/commands/timeout.d.ts.map +1 -1
- package/build/lib/basedriver/commands/timeout.js +144 -162
- package/build/lib/basedriver/commands/timeout.js.map +1 -1
- package/build/lib/basedriver/core.d.ts +6 -157
- package/build/lib/basedriver/core.d.ts.map +1 -1
- package/build/lib/basedriver/core.js +361 -230
- package/build/lib/basedriver/core.js.map +1 -1
- package/build/lib/basedriver/desired-caps.js +80 -110
- package/build/lib/basedriver/desired-caps.js.map +1 -1
- package/build/lib/basedriver/device-settings.js +57 -62
- package/build/lib/basedriver/device-settings.js.map +1 -1
- package/build/lib/basedriver/driver.d.ts +21 -267
- package/build/lib/basedriver/driver.d.ts.map +1 -1
- package/build/lib/basedriver/driver.js +362 -258
- package/build/lib/basedriver/driver.js.map +1 -1
- package/build/lib/basedriver/helpers.js +500 -495
- package/build/lib/basedriver/helpers.js.map +1 -1
- package/build/lib/basedriver/logger.d.ts +1 -1
- package/build/lib/basedriver/logger.d.ts.map +1 -1
- package/build/lib/basedriver/logger.js +5 -15
- package/build/lib/basedriver/logger.js.map +1 -1
- package/build/lib/constants.js +14 -14
- package/build/lib/constants.js.map +1 -1
- package/build/lib/express/crash.js +8 -15
- package/build/lib/express/crash.js.map +1 -1
- package/build/lib/express/express-logging.js +49 -59
- package/build/lib/express/express-logging.js.map +1 -1
- package/build/lib/express/idempotency.js +125 -177
- package/build/lib/express/idempotency.js.map +1 -1
- package/build/lib/express/logger.d.ts +1 -1
- package/build/lib/express/logger.d.ts.map +1 -1
- package/build/lib/express/logger.js +5 -15
- package/build/lib/express/logger.js.map +1 -1
- package/build/lib/express/middleware.js +82 -107
- package/build/lib/express/middleware.js.map +1 -1
- package/build/lib/express/server.d.ts +17 -5
- package/build/lib/express/server.d.ts.map +1 -1
- package/build/lib/express/server.js +259 -224
- package/build/lib/express/server.js.map +1 -1
- package/build/lib/express/static.js +64 -81
- package/build/lib/express/static.js.map +1 -1
- package/build/lib/express/websocket.js +115 -87
- package/build/lib/express/websocket.js.map +1 -1
- package/build/lib/helpers/capabilities.d.ts +1 -59
- package/build/lib/helpers/capabilities.d.ts.map +1 -1
- package/build/lib/helpers/capabilities.js +72 -69
- package/build/lib/helpers/capabilities.js.map +1 -1
- package/build/lib/index.js +64 -180
- package/build/lib/index.js.map +1 -1
- package/build/lib/jsonwp-proxy/protocol-converter.js +215 -227
- package/build/lib/jsonwp-proxy/protocol-converter.js.map +1 -1
- package/build/lib/jsonwp-proxy/proxy.d.ts.map +1 -1
- package/build/lib/jsonwp-proxy/proxy.js +355 -393
- package/build/lib/jsonwp-proxy/proxy.js.map +1 -1
- package/build/lib/jsonwp-status/status.js +119 -130
- package/build/lib/jsonwp-status/status.js.map +1 -1
- package/build/lib/protocol/errors.d.ts +135 -32
- package/build/lib/protocol/errors.d.ts.map +1 -1
- package/build/lib/protocol/errors.js +871 -919
- package/build/lib/protocol/errors.js.map +1 -1
- package/build/lib/protocol/helpers.js +37 -37
- package/build/lib/protocol/helpers.js.map +1 -1
- package/build/lib/protocol/index.js +22 -109
- package/build/lib/protocol/index.js.map +1 -1
- package/build/lib/protocol/protocol.js +394 -350
- package/build/lib/protocol/protocol.js.map +1 -1
- package/build/lib/protocol/routes.d.ts +1238 -4
- package/build/lib/protocol/routes.d.ts.map +1 -1
- package/build/lib/protocol/routes.js +964 -1327
- package/build/lib/protocol/routes.js.map +1 -1
- package/build/lib/protocol/validators.js +32 -39
- package/build/lib/protocol/validators.js.map +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/lib/basedriver/capabilities.js +80 -39
- package/lib/basedriver/commands/event.js +10 -5
- package/lib/basedriver/commands/execute.js +14 -9
- package/lib/basedriver/commands/find.js +18 -12
- package/lib/basedriver/commands/index.js +21 -16
- package/lib/basedriver/commands/log.js +24 -18
- package/lib/basedriver/commands/session.js +10 -5
- package/lib/basedriver/commands/settings.js +9 -6
- package/lib/basedriver/commands/timeout.js +10 -4
- package/lib/basedriver/core.js +2 -3
- package/lib/basedriver/driver.js +29 -18
- package/lib/express/server.js +6 -3
- package/lib/protocol/errors.js +155 -44
- package/lib/protocol/routes.js +11 -7
- package/package.json +14 -16
|
@@ -1,126 +1,101 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
});
|
|
6
|
-
exports.allowCrossDomain =
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
exports.
|
|
12
|
-
Object.defineProperty(exports, "handleIdempotency", {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function () {
|
|
15
|
-
return _idempotency.handleIdempotency;
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
require("source-map-support/register");
|
|
20
|
-
|
|
21
|
-
var _lodash = _interopRequireDefault(require("lodash"));
|
|
22
|
-
|
|
23
|
-
var _logger = _interopRequireDefault(require("./logger"));
|
|
24
|
-
|
|
25
|
-
var _protocol = require("../protocol");
|
|
26
|
-
|
|
27
|
-
var _idempotency = require("./idempotency");
|
|
28
|
-
|
|
29
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
30
|
-
|
|
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
|
+
exports.catch404Handler = exports.handleIdempotency = exports.allowCrossDomainAsyncExecute = exports.catchAllHandler = exports.defaultToJSONContentType = exports.fixPythonContentType = exports.allowCrossDomain = void 0;
|
|
7
|
+
const lodash_1 = __importDefault(require("lodash"));
|
|
8
|
+
const logger_1 = __importDefault(require("./logger"));
|
|
9
|
+
const protocol_1 = require("../protocol");
|
|
10
|
+
const idempotency_1 = require("./idempotency");
|
|
11
|
+
Object.defineProperty(exports, "handleIdempotency", { enumerable: true, get: function () { return idempotency_1.handleIdempotency; } });
|
|
31
12
|
function allowCrossDomain(req, res, next) {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
13
|
+
try {
|
|
14
|
+
res.header('Access-Control-Allow-Origin', '*');
|
|
15
|
+
res.header('Access-Control-Allow-Methods', 'GET, POST, PUT, OPTIONS, DELETE');
|
|
16
|
+
res.header('Access-Control-Allow-Headers', 'Cache-Control, Pragma, Origin, X-Requested-With, Content-Type, Accept, User-Agent');
|
|
17
|
+
// need to respond 200 to OPTIONS
|
|
18
|
+
if ('OPTIONS' === req.method) {
|
|
19
|
+
return res.sendStatus(200);
|
|
20
|
+
}
|
|
39
21
|
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
next();
|
|
22
|
+
catch (err) {
|
|
23
|
+
logger_1.default.error(`Unexpected error: ${err.stack}`);
|
|
24
|
+
}
|
|
25
|
+
next();
|
|
45
26
|
}
|
|
46
|
-
|
|
27
|
+
exports.allowCrossDomain = allowCrossDomain;
|
|
47
28
|
function allowCrossDomainAsyncExecute(basePath) {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
29
|
+
return (req, res, next) => {
|
|
30
|
+
// there are two paths for async responses, so cover both
|
|
31
|
+
// https://regex101.com/r/txYiEz/1
|
|
32
|
+
const receiveAsyncResponseRegExp = new RegExp(`${lodash_1.default.escapeRegExp(basePath)}/session/[a-f0-9-]+/(appium/)?receive_async_response`);
|
|
33
|
+
if (!receiveAsyncResponseRegExp.test(req.url)) {
|
|
34
|
+
return next();
|
|
35
|
+
}
|
|
36
|
+
allowCrossDomain(req, res, next);
|
|
37
|
+
};
|
|
57
38
|
}
|
|
58
|
-
|
|
39
|
+
exports.allowCrossDomainAsyncExecute = allowCrossDomainAsyncExecute;
|
|
59
40
|
function fixPythonContentType(basePath) {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
41
|
+
return (req, res, next) => {
|
|
42
|
+
// hack because python client library gives us wrong content-type
|
|
43
|
+
if (new RegExp(`^${lodash_1.default.escapeRegExp(basePath)}`).test(req.path) &&
|
|
44
|
+
/^Python/.test(req.headers['user-agent'])) {
|
|
45
|
+
if (req.headers['content-type'] === 'application/x-www-form-urlencoded') {
|
|
46
|
+
req.headers['content-type'] = 'application/json; charset=utf-8';
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
next();
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
exports.fixPythonContentType = fixPythonContentType;
|
|
53
|
+
function defaultToJSONContentType(req, res, next) {
|
|
54
|
+
if (!req.headers['content-type']) {
|
|
63
55
|
req.headers['content-type'] = 'application/json; charset=utf-8';
|
|
64
|
-
}
|
|
65
56
|
}
|
|
66
|
-
|
|
67
57
|
next();
|
|
68
|
-
};
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
function defaultToJSONContentType(req, res, next) {
|
|
72
|
-
if (!req.headers['content-type']) {
|
|
73
|
-
req.headers['content-type'] = 'application/json; charset=utf-8';
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
next();
|
|
77
58
|
}
|
|
78
|
-
|
|
59
|
+
exports.defaultToJSONContentType = defaultToJSONContentType;
|
|
79
60
|
function catchAllHandler(err, req, res, next) {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
_logger.default.error(`Uncaught error: ${err.message}`);
|
|
85
|
-
|
|
86
|
-
_logger.default.error('Sending generic error response');
|
|
87
|
-
|
|
88
|
-
const error = _protocol.errors.UnknownError;
|
|
89
|
-
res.status(error.w3cStatus()).json(patchWithSessionId(req, {
|
|
90
|
-
status: error.code(),
|
|
91
|
-
value: {
|
|
92
|
-
error: error.error(),
|
|
93
|
-
message: `An unknown server-side error occurred while processing the command: ${err.message}`,
|
|
94
|
-
stacktrace: err.stack
|
|
61
|
+
if (res.headersSent) {
|
|
62
|
+
return next(err);
|
|
95
63
|
}
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
64
|
+
logger_1.default.error(`Uncaught error: ${err.message}`);
|
|
65
|
+
logger_1.default.error('Sending generic error response');
|
|
66
|
+
const error = protocol_1.errors.UnknownError;
|
|
67
|
+
res.status(error.w3cStatus()).json(patchWithSessionId(req, {
|
|
68
|
+
status: error.code(),
|
|
69
|
+
value: {
|
|
70
|
+
error: error.error(),
|
|
71
|
+
message: `An unknown server-side error occurred while processing the command: ${err.message}`,
|
|
72
|
+
stacktrace: err.stack,
|
|
73
|
+
},
|
|
74
|
+
}));
|
|
75
|
+
logger_1.default.error(err);
|
|
99
76
|
}
|
|
100
|
-
|
|
77
|
+
exports.catchAllHandler = catchAllHandler;
|
|
101
78
|
function catch404Handler(req, res) {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
79
|
+
logger_1.default.debug(`No route found for ${req.url}`);
|
|
80
|
+
const error = protocol_1.errors.UnknownCommandError;
|
|
81
|
+
res.status(error.w3cStatus()).json(patchWithSessionId(req, {
|
|
82
|
+
status: error.code(),
|
|
83
|
+
value: {
|
|
84
|
+
error: error.error(),
|
|
85
|
+
message: 'The requested resource could not be found, or a request was ' +
|
|
86
|
+
'received using an HTTP method that is not supported by the mapped ' +
|
|
87
|
+
'resource',
|
|
88
|
+
stacktrace: '',
|
|
89
|
+
},
|
|
90
|
+
}));
|
|
113
91
|
}
|
|
114
|
-
|
|
92
|
+
exports.catch404Handler = catch404Handler;
|
|
115
93
|
const SESSION_ID_PATTERN = /\/session\/([^/]+)/;
|
|
116
|
-
|
|
117
94
|
function patchWithSessionId(req, body) {
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
return body;
|
|
95
|
+
const match = SESSION_ID_PATTERN.exec(req.url);
|
|
96
|
+
if (match) {
|
|
97
|
+
body.sessionId = match[1];
|
|
98
|
+
}
|
|
99
|
+
return body;
|
|
125
100
|
}
|
|
126
|
-
//# sourceMappingURL=
|
|
101
|
+
//# sourceMappingURL=middleware.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"middleware.js","
|
|
1
|
+
{"version":3,"file":"middleware.js","sourceRoot":"","sources":["../../../lib/express/middleware.js"],"names":[],"mappings":";;;;;;AAAA,oDAAuB;AACvB,sDAA2B;AAC3B,0CAAmC;AACnC,+CAAgD;AAgH9C,kGAhHM,+BAAiB,OAgHN;AA9GnB,SAAS,gBAAgB,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI;IACtC,IAAI;QACF,GAAG,CAAC,MAAM,CAAC,6BAA6B,EAAE,GAAG,CAAC,CAAC;QAC/C,GAAG,CAAC,MAAM,CAAC,8BAA8B,EAAE,iCAAiC,CAAC,CAAC;QAC9E,GAAG,CAAC,MAAM,CACR,8BAA8B,EAC9B,mFAAmF,CACpF,CAAC;QAEF,iCAAiC;QACjC,IAAI,SAAS,KAAK,GAAG,CAAC,MAAM,EAAE;YAC5B,OAAO,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;SAC5B;KACF;IAAC,OAAO,GAAG,EAAE;QACZ,gBAAG,CAAC,KAAK,CAAC,qBAAqB,GAAG,CAAC,KAAK,EAAE,CAAC,CAAC;KAC7C;IACD,IAAI,EAAE,CAAC;AACT,CAAC;AAwFC,4CAAgB;AAtFlB,SAAS,4BAA4B,CAAC,QAAQ;IAC5C,OAAO,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;QACxB,yDAAyD;QACzD,kCAAkC;QAClC,MAAM,0BAA0B,GAAG,IAAI,MAAM,CAC3C,GAAG,gBAAC,CAAC,YAAY,CAAC,QAAQ,CAAC,sDAAsD,CAClF,CAAC;QACF,IAAI,CAAC,0BAA0B,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CA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,7 +21,7 @@ export type StartServerOpts = {
|
|
|
21
21
|
};
|
|
22
22
|
export type AppiumServer = import('@appium/types').AppiumServer;
|
|
23
23
|
export type AppiumServerSocket = import('@appium/types').AppiumServerSocket;
|
|
24
|
-
export type MethodMap = import('@appium/types').MethodMap
|
|
24
|
+
export type MethodMap = import('@appium/types').MethodMap<import('@appium/types').ExternalDriver>;
|
|
25
25
|
/**
|
|
26
26
|
* Options for {@linkcode configureHttp }
|
|
27
27
|
*/
|
|
@@ -45,11 +45,15 @@ export type ConfigureHttpOpts = {
|
|
|
45
45
|
export type ServerOpts = {
|
|
46
46
|
routeConfiguringFunction: RouteConfiguringFunction;
|
|
47
47
|
port: number;
|
|
48
|
-
cliArgs
|
|
48
|
+
cliArgs?: import("@appium/types").ServerArgs | undefined;
|
|
49
49
|
hostname?: string | undefined;
|
|
50
50
|
allowCors?: boolean | undefined;
|
|
51
51
|
basePath?: string | undefined;
|
|
52
|
-
extraMethodMap?:
|
|
52
|
+
extraMethodMap?: Readonly<Record<string, {
|
|
53
|
+
GET?: import("@appium/types").MethodDef<import("@appium/types").ExternalDriver<typeof import("@appium/types").BASE_DESIRED_CAP_CONSTRAINTS>> | undefined;
|
|
54
|
+
POST?: import("@appium/types").MethodDef<import("@appium/types").ExternalDriver<typeof import("@appium/types").BASE_DESIRED_CAP_CONSTRAINTS>> | undefined;
|
|
55
|
+
DELETE?: import("@appium/types").MethodDef<import("@appium/types").ExternalDriver<typeof import("@appium/types").BASE_DESIRED_CAP_CONSTRAINTS>> | undefined;
|
|
56
|
+
}>> | undefined;
|
|
53
57
|
serverUpdaters?: import("@appium/types").UpdateServerCallback[] | undefined;
|
|
54
58
|
keepAliveTimeout?: number | undefined;
|
|
55
59
|
};
|
|
@@ -62,7 +66,11 @@ export type RouteConfiguringFunction = (app: import('express').Express, opts?: R
|
|
|
62
66
|
*/
|
|
63
67
|
export type RouteConfiguringFunctionOpts = {
|
|
64
68
|
basePath?: string | undefined;
|
|
65
|
-
extraMethodMap?:
|
|
69
|
+
extraMethodMap?: Readonly<Record<string, {
|
|
70
|
+
GET?: import("@appium/types").MethodDef<import("@appium/types").ExternalDriver<typeof import("@appium/types").BASE_DESIRED_CAP_CONSTRAINTS>> | undefined;
|
|
71
|
+
POST?: import("@appium/types").MethodDef<import("@appium/types").ExternalDriver<typeof import("@appium/types").BASE_DESIRED_CAP_CONSTRAINTS>> | undefined;
|
|
72
|
+
DELETE?: import("@appium/types").MethodDef<import("@appium/types").ExternalDriver<typeof import("@appium/types").BASE_DESIRED_CAP_CONSTRAINTS>> | undefined;
|
|
73
|
+
}>> | undefined;
|
|
66
74
|
};
|
|
67
75
|
/**
|
|
68
76
|
* Options for {@linkcode configureServer }
|
|
@@ -72,7 +80,11 @@ export type ConfigureServerOpts = {
|
|
|
72
80
|
addRoutes: RouteConfiguringFunction;
|
|
73
81
|
allowCors?: boolean | undefined;
|
|
74
82
|
basePath?: string | undefined;
|
|
75
|
-
extraMethodMap?:
|
|
83
|
+
extraMethodMap?: Readonly<Record<string, {
|
|
84
|
+
GET?: import("@appium/types").MethodDef<import("@appium/types").ExternalDriver<typeof import("@appium/types").BASE_DESIRED_CAP_CONSTRAINTS>> | undefined;
|
|
85
|
+
POST?: import("@appium/types").MethodDef<import("@appium/types").ExternalDriver<typeof import("@appium/types").BASE_DESIRED_CAP_CONSTRAINTS>> | undefined;
|
|
86
|
+
DELETE?: import("@appium/types").MethodDef<import("@appium/types").ExternalDriver<typeof import("@appium/types").BASE_DESIRED_CAP_CONSTRAINTS>> | undefined;
|
|
87
|
+
}>> | undefined;
|
|
76
88
|
};
|
|
77
89
|
/**
|
|
78
90
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../../lib/express/server.js"],"names":[],"mappings":";;;;;;;gBA8Qc,OAAO,MAAM,EAAE,MAAM;;;;UACrB,MAAM;;;;sBACN,MAAM;;;;;;2BAKP,OAAO,eAAe,EAAE,YAAY;iCACpC,OAAO,eAAe,EAAE,kBAAkB;
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../../lib/express/server.js"],"names":[],"mappings":";;;;;;;gBA8Qc,OAAO,MAAM,EAAE,MAAM;;;;UACrB,MAAM;;;;sBACN,MAAM;;;;;;2BAKP,OAAO,eAAe,EAAE,YAAY;iCACpC,OAAO,eAAe,EAAE,kBAAkB;wBAI1C,OAAO,eAAe,EAAE,SAAS,CAAC,OAAO,eAAe,EAAE,cAAc,CAAC;;;;;;;;gBAMxE,OAAO,MAAM,EAAE,MAAM;;;;qBACZ,GAAG,KAAK,IAAI;;;;sBACrB,MAAM;;;;;;8BAMN,wBAAwB;UACxB,MAAM;;;;;;;;;;;;;;;;6CAaT,OAAO,SAAS,EAAE,OAAO,sDAEvB,IAAI;;;;;;;;;;;;;;;;SAaH,OAAO,SAAS,EAAE,OAAO;eACzB,wBAAwB;;;;;;;;;AAtStC;;;;GAIG;AACH,6BAHW,UAAU,GACR,QAAQ,YAAY,CAAC,CAsDjC;AAED;;;GAGG;AACH,0FAFW,mBAAmB,QA+C7B;AAsGD;;;;GAIG;AACH,4CAHW,MAAM,GACJ,MAAM,CAkBlB"}
|