quidproquo-dev-server 0.0.230 → 0.0.232
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/lib/commonjs/allServiceConfig.d.ts +1 -1
- package/lib/commonjs/allServiceConfig.js +6 -5
- package/lib/commonjs/config/settings/defineDevServerConfig.js +1 -1
- package/lib/commonjs/getActionProcessor/core/event/express/api/getEventGetStorySessionActionProcessor.js +27 -1
- package/lib/commonjs/getActionProcessor/core/event/express/api/index.d.ts +1 -1
- package/lib/commonjs/implementations/route.d.ts +1 -1
- package/lib/commonjs/implementations/route.js +20 -19
- package/lib/commonjs/main.js +10 -9
- package/lib/commonjs/types/ExpressEvent.d.ts +1 -1
- package/lib/esm/allServiceConfig.d.ts +1 -1
- package/lib/esm/allServiceConfig.js +2 -1
- package/lib/esm/config/settings/defineDevServerConfig.js +1 -1
- package/lib/esm/getActionProcessor/core/event/express/api/getEventGetStorySessionActionProcessor.js +32 -1
- package/lib/esm/getActionProcessor/core/event/express/api/index.d.ts +1 -1
- package/lib/esm/implementations/route.d.ts +1 -1
- package/lib/esm/implementations/route.js +2 -1
- package/lib/esm/main.js +2 -1
- package/lib/esm/types/ExpressEvent.d.ts +1 -1
- package/package.json +6 -6
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getAllServiceConfigs = void 0;
|
|
4
|
-
const
|
|
4
|
+
const quidproquo_core_1 = require("quidproquo-core");
|
|
5
|
+
const quidproquo_webserver_1 = require("quidproquo-webserver");
|
|
5
6
|
// Create an async function to fetch all services
|
|
6
7
|
function getAllServiceConfigs(devServerConfig) {
|
|
7
8
|
// Clone it
|
|
@@ -16,14 +17,14 @@ function getAllServiceConfigs(devServerConfig) {
|
|
|
16
17
|
// const appSettings = qpqCoreUtils.getApplicationModuleSetting(qpqConfig);
|
|
17
18
|
// appSettings.feature = undefined;
|
|
18
19
|
// appSettings.environment = 'production';
|
|
19
|
-
const baseDomain =
|
|
20
|
+
const baseDomain = quidproquo_webserver_1.qpqWebServerUtils.getDomainRoot(rootDomain, quidproquo_core_1.qpqCoreUtils.getApplicationModuleEnvironment(qpqConfig), quidproquo_core_1.qpqCoreUtils.getApplicationModuleFeature(qpqConfig));
|
|
20
21
|
// Change the domain
|
|
21
|
-
const dnsConfigs =
|
|
22
|
+
const dnsConfigs = quidproquo_webserver_1.qpqWebServerUtils.getDnsConfigs(qpqConfig);
|
|
22
23
|
for (const dnsConfig of dnsConfigs) {
|
|
23
24
|
dnsConfig.dnsBase = rootDomain;
|
|
24
25
|
}
|
|
25
26
|
// Expose global cors headers
|
|
26
|
-
const defaultRouteSettings =
|
|
27
|
+
const defaultRouteSettings = quidproquo_webserver_1.qpqWebServerUtils.getDefaultRouteSettings(qpqConfig);
|
|
27
28
|
for (const getDefaultRouteSetting of defaultRouteSettings) {
|
|
28
29
|
getDefaultRouteSetting.routeOptions.allowedOrigins = [
|
|
29
30
|
...(getDefaultRouteSetting.routeOptions.allowedOrigins || []),
|
|
@@ -32,7 +33,7 @@ function getAllServiceConfigs(devServerConfig) {
|
|
|
32
33
|
];
|
|
33
34
|
}
|
|
34
35
|
// Expose global cors headers
|
|
35
|
-
const routes =
|
|
36
|
+
const routes = quidproquo_webserver_1.qpqWebServerUtils.getAllRoutes(qpqConfig);
|
|
36
37
|
for (const route of routes) {
|
|
37
38
|
route.options.allowedOrigins = [...(route.options.allowedOrigins || []), `http://${baseDomain}`, '*'];
|
|
38
39
|
}
|
|
@@ -11,7 +11,7 @@ const defineDevServerConfig = (buildPath, advancedSettings) => {
|
|
|
11
11
|
const onlyDeploySafe = (_a = advancedSettings === null || advancedSettings === void 0 ? void 0 : advancedSettings.onlyDeploySafe) !== null && _a !== void 0 ? _a : true;
|
|
12
12
|
const vpcList = (advancedSettings === null || advancedSettings === void 0 ? void 0 : advancedSettings.vpcList) || [];
|
|
13
13
|
const pathToRuntime = path_1.default.join(__dirname, '../../entry/serviceFunction/runCypherQuery');
|
|
14
|
-
const graphAccessConfigs = vpcList.map((vpcName) => (0, quidproquo_webserver_1.defineServiceFunction)(
|
|
14
|
+
const graphAccessConfigs = vpcList.map((vpcName) => (0, quidproquo_webserver_1.defineServiceFunction)(`full@${pathToRuntime}::runCypherQuery`, {
|
|
15
15
|
virtualNetworkName: vpcName,
|
|
16
16
|
functionName: `graphQuery${vpcName}`,
|
|
17
17
|
}));
|
|
@@ -13,7 +13,33 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
14
|
exports.getEventGetStorySessionActionProcessor = void 0;
|
|
15
15
|
const quidproquo_core_1 = require("quidproquo-core");
|
|
16
|
-
const
|
|
16
|
+
const quidproquo_actionprocessor_awslambda_1 = require("quidproquo-actionprocessor-awslambda");
|
|
17
|
+
const quidproquo_webserver_1 = require("quidproquo-webserver");
|
|
18
|
+
const getProcessGetStorySession = (qpqConfig) => {
|
|
19
|
+
return ({ matchStoryResult, qpqEventRecord }, session) => __awaiter(void 0, void 0, void 0, function* () {
|
|
20
|
+
var _a, _b;
|
|
21
|
+
const accessToken = quidproquo_webserver_1.qpqWebServerUtils.getAccessTokenFromHeaders(qpqEventRecord.headers);
|
|
22
|
+
if (!accessToken) {
|
|
23
|
+
return (0, quidproquo_core_1.actionResult)(void 0);
|
|
24
|
+
}
|
|
25
|
+
// if this endpoint has no auth settings, BUT we do have an access token
|
|
26
|
+
// then we want to just attempt to extract info for logs, but we will say that its
|
|
27
|
+
// wasValid = false
|
|
28
|
+
if (!((_b = (_a = matchStoryResult.config) === null || _a === void 0 ? void 0 : _a.routeAuthSettings) === null || _b === void 0 ? void 0 : _b.userDirectoryName)) {
|
|
29
|
+
// If this endpoint is unauthenticated, then we will just decode it, and say it wasnt valid, for logs
|
|
30
|
+
const info = quidproquo_webserver_1.qpqWebServerUtils.decodeJWT(accessToken);
|
|
31
|
+
return (0, quidproquo_core_1.actionResult)(Object.assign(Object.assign({}, session), { decodedAccessToken: {
|
|
32
|
+
exp: (info === null || info === void 0 ? void 0 : info.exp) || 0,
|
|
33
|
+
userDirectory: '',
|
|
34
|
+
userId: (info === null || info === void 0 ? void 0 : info.sub) || (info === null || info === void 0 ? void 0 : info.id) || (info === null || info === void 0 ? void 0 : info.userId) || (info === null || info === void 0 ? void 0 : info.username) || '',
|
|
35
|
+
username: (info === null || info === void 0 ? void 0 : info.username) || (info === null || info === void 0 ? void 0 : info.userId) || (info === null || info === void 0 ? void 0 : info.sub) || (info === null || info === void 0 ? void 0 : info.id) || '',
|
|
36
|
+
wasValid: false,
|
|
37
|
+
} }));
|
|
38
|
+
}
|
|
39
|
+
const decodedAccessToken = yield (0, quidproquo_actionprocessor_awslambda_1.decodeAccessToken)(matchStoryResult.config.routeAuthSettings.userDirectoryName, qpqConfig, accessToken, true);
|
|
40
|
+
return (0, quidproquo_core_1.actionResult)(Object.assign(Object.assign({}, session), { decodedAccessToken }));
|
|
41
|
+
});
|
|
42
|
+
};
|
|
17
43
|
const getEventGetStorySessionActionProcessor = (qpqConfig) => __awaiter(void 0, void 0, void 0, function* () {
|
|
18
44
|
return ({
|
|
19
45
|
[quidproquo_core_1.EventActionType.GetStorySession]: getProcessGetStorySession(qpqConfig),
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ActionProcessorListResolver } from 'quidproquo';
|
|
1
|
+
import { ActionProcessorListResolver } from 'quidproquo-core';
|
|
2
2
|
export declare const getExpressApiEventEventProcessor: ActionProcessorListResolver;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { DynamicModuleLoader, QPQConfig } from 'quidproquo';
|
|
1
|
+
import { DynamicModuleLoader, QPQConfig } from 'quidproquo-core';
|
|
2
2
|
import { ExpressEvent, ExpressEventResponse } from '../types';
|
|
3
3
|
export declare const route: (expressEvent: ExpressEvent, qpqConfig: QPQConfig, dynamicModuleLoader: DynamicModuleLoader) => Promise<ExpressEventResponse>;
|
|
@@ -11,7 +11,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.route = void 0;
|
|
13
13
|
const crypto_1 = require("crypto");
|
|
14
|
-
const
|
|
14
|
+
const quidproquo_core_1 = require("quidproquo-core");
|
|
15
|
+
const quidproquo_webserver_1 = require("quidproquo-webserver");
|
|
15
16
|
const quidproquo_actionprocessor_awslambda_1 = require("quidproquo-actionprocessor-awslambda");
|
|
16
17
|
const quidproquo_actionprocessor_node_1 = require("quidproquo-actionprocessor-node");
|
|
17
18
|
const getActionProcessor_1 = require("../getActionProcessor");
|
|
@@ -19,30 +20,30 @@ const actionProcessor_1 = require("../actionProcessor");
|
|
|
19
20
|
// TODO: Make this a util or something based on server time or something..
|
|
20
21
|
const getDateNow = () => new Date().toISOString();
|
|
21
22
|
const ErrorTypeHttpResponseMap = {
|
|
22
|
-
[
|
|
23
|
-
[
|
|
24
|
-
[
|
|
25
|
-
[
|
|
26
|
-
[
|
|
27
|
-
[
|
|
28
|
-
[
|
|
29
|
-
[
|
|
30
|
-
[
|
|
31
|
-
[
|
|
32
|
-
[
|
|
33
|
-
[
|
|
34
|
-
[
|
|
23
|
+
[quidproquo_core_1.ErrorTypeEnum.BadRequest]: 400,
|
|
24
|
+
[quidproquo_core_1.ErrorTypeEnum.Unauthorized]: 401,
|
|
25
|
+
[quidproquo_core_1.ErrorTypeEnum.PaymentRequired]: 402,
|
|
26
|
+
[quidproquo_core_1.ErrorTypeEnum.Forbidden]: 403,
|
|
27
|
+
[quidproquo_core_1.ErrorTypeEnum.NotFound]: 404,
|
|
28
|
+
[quidproquo_core_1.ErrorTypeEnum.TimeOut]: 408,
|
|
29
|
+
[quidproquo_core_1.ErrorTypeEnum.Conflict]: 409,
|
|
30
|
+
[quidproquo_core_1.ErrorTypeEnum.UnsupportedMediaType]: 415,
|
|
31
|
+
[quidproquo_core_1.ErrorTypeEnum.OutOfResources]: 500,
|
|
32
|
+
[quidproquo_core_1.ErrorTypeEnum.GenericError]: 500,
|
|
33
|
+
[quidproquo_core_1.ErrorTypeEnum.NotImplemented]: 501,
|
|
34
|
+
[quidproquo_core_1.ErrorTypeEnum.NoContent]: 204,
|
|
35
|
+
[quidproquo_core_1.ErrorTypeEnum.Invalid]: 422,
|
|
35
36
|
};
|
|
36
37
|
const route = (expressEvent, qpqConfig, dynamicModuleLoader) => __awaiter(void 0, void 0, void 0, function* () {
|
|
37
|
-
const serviceName =
|
|
38
|
-
const resolveStory = (0,
|
|
38
|
+
const serviceName = quidproquo_core_1.qpqCoreUtils.getApplicationModuleName(qpqConfig);
|
|
39
|
+
const resolveStory = (0, quidproquo_core_1.createRuntime)(qpqConfig, {
|
|
39
40
|
depth: 0,
|
|
40
|
-
accessToken:
|
|
41
|
+
accessToken: quidproquo_webserver_1.qpqWebServerUtils.getAccessTokenFromHeaders(expressEvent.headers),
|
|
41
42
|
context: {},
|
|
42
43
|
}, () => __awaiter(void 0, void 0, void 0, function* () {
|
|
43
44
|
return (Object.assign(Object.assign(Object.assign(Object.assign({}, (yield (0, quidproquo_actionprocessor_awslambda_1.getAwsActionProcessors)(qpqConfig, dynamicModuleLoader))), (yield (0, getActionProcessor_1.getExpressApiEventEventProcessor)(qpqConfig, dynamicModuleLoader))), (yield (0, actionProcessor_1.getGraphDatabaseActionProcessor)(qpqConfig, dynamicModuleLoader))), (yield (0, quidproquo_actionprocessor_node_1.getCustomActionActionProcessor)(qpqConfig, dynamicModuleLoader))));
|
|
44
|
-
}), getDateNow, (0, quidproquo_actionprocessor_awslambda_1.getLogger)(qpqConfig), `${serviceName}::${(0, crypto_1.randomUUID)()}`,
|
|
45
|
-
const result = yield resolveStory(
|
|
45
|
+
}), getDateNow, (0, quidproquo_actionprocessor_awslambda_1.getLogger)(qpqConfig), `${serviceName}::${(0, crypto_1.randomUUID)()}`, quidproquo_core_1.QpqRuntimeType.API, dynamicModuleLoader, []);
|
|
46
|
+
const result = yield resolveStory(quidproquo_core_1.askProcessEvent, [expressEvent]);
|
|
46
47
|
// Run the callback
|
|
47
48
|
if (!result.error) {
|
|
48
49
|
const response = {
|
package/lib/commonjs/main.js
CHANGED
|
@@ -19,15 +19,16 @@ const body_parser_1 = __importDefault(require("body-parser"));
|
|
|
19
19
|
const express_1 = __importDefault(require("express"));
|
|
20
20
|
const multer_1 = __importDefault(require("multer"));
|
|
21
21
|
const path_1 = __importDefault(require("path"));
|
|
22
|
-
const
|
|
22
|
+
const quidproquo_core_1 = require("quidproquo-core");
|
|
23
|
+
const quidproquo_webserver_1 = require("quidproquo-webserver");
|
|
23
24
|
const implementations_1 = require("./implementations");
|
|
24
25
|
const allServiceConfig_1 = require("./allServiceConfig");
|
|
25
|
-
const getServiceBaseDomain = (qpqConfig, devServerConfig) =>
|
|
26
|
+
const getServiceBaseDomain = (qpqConfig, devServerConfig) => quidproquo_webserver_1.qpqWebServerUtils.getDomainRoot(`${devServerConfig.serverDomain}:${devServerConfig.serverPort}`, quidproquo_core_1.qpqCoreUtils.getApplicationModuleEnvironment(qpqConfig), quidproquo_core_1.qpqCoreUtils.getApplicationModuleFeature(qpqConfig));
|
|
26
27
|
const getApiDomainsFromConfig = (qpqConfig, devServerConfig) => {
|
|
27
28
|
const baseDomain = getServiceBaseDomain(qpqConfig, devServerConfig);
|
|
28
|
-
const serviceName =
|
|
29
|
+
const serviceName = quidproquo_core_1.qpqCoreUtils.getApplicationModuleName(qpqConfig);
|
|
29
30
|
// Get apis
|
|
30
|
-
const apiConfigs =
|
|
31
|
+
const apiConfigs = quidproquo_webserver_1.qpqWebServerUtils.getApiConfigs(qpqConfig);
|
|
31
32
|
const apiDomains = apiConfigs.map((apiConfig) => ({
|
|
32
33
|
apiName: apiConfig.apiName,
|
|
33
34
|
service: serviceName,
|
|
@@ -39,7 +40,7 @@ const getApiDomainsFromConfig = (qpqConfig, devServerConfig) => {
|
|
|
39
40
|
return apiDomains;
|
|
40
41
|
};
|
|
41
42
|
const getDynamicModuleLoader = (qpqConfig, devServerConfig) => {
|
|
42
|
-
const serviceName =
|
|
43
|
+
const serviceName = quidproquo_core_1.qpqCoreUtils.getApplicationModuleName(qpqConfig);
|
|
43
44
|
return (runtime) => __awaiter(void 0, void 0, void 0, function* () { return devServerConfig.dynamicModuleLoader(serviceName, runtime); });
|
|
44
45
|
};
|
|
45
46
|
const startDevServer = (devServerConfig) => __awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -57,7 +58,7 @@ const startDevServer = (devServerConfig) => __awaiter(void 0, void 0, void 0, fu
|
|
|
57
58
|
res.header('Access-Control-Allow-Methods', '*');
|
|
58
59
|
res.header('Access-Control-Allow-Origin', '*');
|
|
59
60
|
res.header('Access-Control-Allow-Credentials', 'false');
|
|
60
|
-
const serviceList = allServiceConfig.map((qpqConfig) =>
|
|
61
|
+
const serviceList = allServiceConfig.map((qpqConfig) => quidproquo_core_1.qpqCoreUtils.getApplicationModuleName(qpqConfig)).map((name) => `api/${name}`);
|
|
61
62
|
res.json(serviceList);
|
|
62
63
|
});
|
|
63
64
|
app.use(express_1.default.json());
|
|
@@ -85,13 +86,13 @@ const startDevServer = (devServerConfig) => __awaiter(void 0, void 0, void 0, fu
|
|
|
85
86
|
res.header('Access-Control-Allow-Credentials', 'false');
|
|
86
87
|
// TODO: Get list of services from config dynamically
|
|
87
88
|
const serviceLog = req.body;
|
|
88
|
-
let runtimeModule =
|
|
89
|
-
if (serviceLog.runtimeType ===
|
|
89
|
+
let runtimeModule = quidproquo_core_1.askProcessEvent;
|
|
90
|
+
if (serviceLog.runtimeType === quidproquo_core_1.QpqRuntimeType.EXECUTE_STORY) {
|
|
90
91
|
const [srcEntry, module] = serviceLog.tags[0].split('::');
|
|
91
92
|
const loadedModule = yield devServerConfig.dynamicModuleLoader(serviceLog.moduleName, srcEntry);
|
|
92
93
|
runtimeModule = loadedModule[module];
|
|
93
94
|
}
|
|
94
|
-
const result = yield (0,
|
|
95
|
+
const result = yield (0, quidproquo_core_1.qpqExecuteLog)(serviceLog, runtimeModule);
|
|
95
96
|
res.json(result);
|
|
96
97
|
}));
|
|
97
98
|
// Proxy for all services
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { qpqCoreUtils
|
|
1
|
+
import { qpqCoreUtils } from 'quidproquo-core';
|
|
2
|
+
import { qpqWebServerUtils } from 'quidproquo-webserver';
|
|
2
3
|
// Create an async function to fetch all services
|
|
3
4
|
export function getAllServiceConfigs(devServerConfig) {
|
|
4
5
|
// Clone it
|
|
@@ -4,7 +4,7 @@ export const defineDevServerConfig = (buildPath, advancedSettings) => {
|
|
|
4
4
|
const onlyDeploySafe = advancedSettings?.onlyDeploySafe ?? true;
|
|
5
5
|
const vpcList = advancedSettings?.vpcList || [];
|
|
6
6
|
const pathToRuntime = path.join(__dirname, '../../entry/serviceFunction/runCypherQuery');
|
|
7
|
-
const graphAccessConfigs = vpcList.map((vpcName) => defineServiceFunction(
|
|
7
|
+
const graphAccessConfigs = vpcList.map((vpcName) => defineServiceFunction(`full@${pathToRuntime}::runCypherQuery`, {
|
|
8
8
|
virtualNetworkName: vpcName,
|
|
9
9
|
functionName: `graphQuery${vpcName}`,
|
|
10
10
|
}));
|
package/lib/esm/getActionProcessor/core/event/express/api/getEventGetStorySessionActionProcessor.js
CHANGED
|
@@ -1,7 +1,38 @@
|
|
|
1
1
|
/* eslint-disable no-void */
|
|
2
2
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
3
3
|
import { actionResult, EventActionType, } from 'quidproquo-core';
|
|
4
|
-
|
|
4
|
+
import { decodeAccessToken } from 'quidproquo-actionprocessor-awslambda';
|
|
5
|
+
import { qpqWebServerUtils } from 'quidproquo-webserver';
|
|
6
|
+
const getProcessGetStorySession = (qpqConfig) => {
|
|
7
|
+
return async ({ matchStoryResult, qpqEventRecord }, session) => {
|
|
8
|
+
const accessToken = qpqWebServerUtils.getAccessTokenFromHeaders(qpqEventRecord.headers);
|
|
9
|
+
if (!accessToken) {
|
|
10
|
+
return actionResult(void 0);
|
|
11
|
+
}
|
|
12
|
+
// if this endpoint has no auth settings, BUT we do have an access token
|
|
13
|
+
// then we want to just attempt to extract info for logs, but we will say that its
|
|
14
|
+
// wasValid = false
|
|
15
|
+
if (!matchStoryResult.config?.routeAuthSettings?.userDirectoryName) {
|
|
16
|
+
// If this endpoint is unauthenticated, then we will just decode it, and say it wasnt valid, for logs
|
|
17
|
+
const info = qpqWebServerUtils.decodeJWT(accessToken);
|
|
18
|
+
return actionResult({
|
|
19
|
+
...session,
|
|
20
|
+
decodedAccessToken: {
|
|
21
|
+
exp: info?.exp || 0,
|
|
22
|
+
userDirectory: '',
|
|
23
|
+
userId: info?.sub || info?.id || info?.userId || info?.username || '',
|
|
24
|
+
username: info?.username || info?.userId || info?.sub || info?.id || '',
|
|
25
|
+
wasValid: false,
|
|
26
|
+
},
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
const decodedAccessToken = await decodeAccessToken(matchStoryResult.config.routeAuthSettings.userDirectoryName, qpqConfig, accessToken, true);
|
|
30
|
+
return actionResult({
|
|
31
|
+
...session,
|
|
32
|
+
decodedAccessToken,
|
|
33
|
+
});
|
|
34
|
+
};
|
|
35
|
+
};
|
|
5
36
|
export const getEventGetStorySessionActionProcessor = async (qpqConfig) => ({
|
|
6
37
|
[EventActionType.GetStorySession]: getProcessGetStorySession(qpqConfig),
|
|
7
38
|
});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ActionProcessorListResolver } from 'quidproquo';
|
|
1
|
+
import { ActionProcessorListResolver } from 'quidproquo-core';
|
|
2
2
|
export declare const getExpressApiEventEventProcessor: ActionProcessorListResolver;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { DynamicModuleLoader, QPQConfig } from 'quidproquo';
|
|
1
|
+
import { DynamicModuleLoader, QPQConfig } from 'quidproquo-core';
|
|
2
2
|
import { ExpressEvent, ExpressEventResponse } from '../types';
|
|
3
3
|
export declare const route: (expressEvent: ExpressEvent, qpqConfig: QPQConfig, dynamicModuleLoader: DynamicModuleLoader) => Promise<ExpressEventResponse>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { randomUUID } from 'crypto';
|
|
2
|
-
import { askProcessEvent, createRuntime, ErrorTypeEnum, qpqCoreUtils, QpqRuntimeType
|
|
2
|
+
import { askProcessEvent, createRuntime, ErrorTypeEnum, qpqCoreUtils, QpqRuntimeType } from 'quidproquo-core';
|
|
3
|
+
import { qpqWebServerUtils } from 'quidproquo-webserver';
|
|
3
4
|
import { getAwsActionProcessors, getLogger } from 'quidproquo-actionprocessor-awslambda';
|
|
4
5
|
import { getCustomActionActionProcessor } from 'quidproquo-actionprocessor-node';
|
|
5
6
|
import { getExpressApiEventEventProcessor } from '../getActionProcessor';
|
package/lib/esm/main.js
CHANGED
|
@@ -4,7 +4,8 @@ import bodyParser from 'body-parser';
|
|
|
4
4
|
import express from 'express';
|
|
5
5
|
import multer from 'multer';
|
|
6
6
|
import path from 'path';
|
|
7
|
-
import { askProcessEvent, qpqCoreUtils, qpqExecuteLog, QpqRuntimeType
|
|
7
|
+
import { askProcessEvent, qpqCoreUtils, qpqExecuteLog, QpqRuntimeType } from 'quidproquo-core';
|
|
8
|
+
import { qpqWebServerUtils } from 'quidproquo-webserver';
|
|
8
9
|
import { route } from './implementations';
|
|
9
10
|
import { getAllServiceConfigs } from './allServiceConfig';
|
|
10
11
|
const getServiceBaseDomain = (qpqConfig, devServerConfig) => qpqWebServerUtils.getDomainRoot(`${devServerConfig.serverDomain}:${devServerConfig.serverPort}`, qpqCoreUtils.getApplicationModuleEnvironment(qpqConfig), qpqCoreUtils.getApplicationModuleFeature(qpqConfig));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "quidproquo-dev-server",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.232",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./lib/commonjs/index.js",
|
|
6
6
|
"module": "./lib/esm/index.js",
|
|
@@ -30,14 +30,14 @@
|
|
|
30
30
|
"homepage": "https://github.com/joe-coady/quidproquo#readme",
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"multer": "^1.4.5-lts.1",
|
|
33
|
-
"quidproquo-core": "0.0.
|
|
34
|
-
"quidproquo-webserver": "0.0.
|
|
35
|
-
"quidproquo-actionprocessor-awslambda": "0.0.
|
|
36
|
-
"quidproquo-actionprocessor-node": "0.0.
|
|
33
|
+
"quidproquo-core": "0.0.232",
|
|
34
|
+
"quidproquo-webserver": "0.0.232",
|
|
35
|
+
"quidproquo-actionprocessor-awslambda": "0.0.232",
|
|
36
|
+
"quidproquo-actionprocessor-node": "0.0.232"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@types/multer": "^1.4.12",
|
|
40
|
-
"quidproquo-tsconfig": "0.0.
|
|
40
|
+
"quidproquo-tsconfig": "0.0.232",
|
|
41
41
|
"typescript": "^4.9.3"
|
|
42
42
|
}
|
|
43
43
|
}
|