quidproquo-webserver 0.0.10 → 0.0.12
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/actions/genericDataResource/GenericDataResourceActionTypeEnum.d.ts +2 -2
- package/lib/actions/genericDataResource/GenericDataResourceActionTypeEnum.js +2 -2
- package/lib/config/QPQConfig.d.ts +4 -0
- package/lib/config/QPQConfig.js +8 -0
- package/lib/config/settings/dns.d.ts +5 -0
- package/lib/config/settings/dns.js +9 -0
- package/lib/config/settings/route.d.ts +11 -0
- package/lib/{serviceInfrastructureDefinitions → config/settings}/route.js +2 -2
- package/lib/index.d.ts +4 -9
- package/lib/index.js +29 -12
- package/lib/qpqWebServerUtils.d.ts +2 -0
- package/lib/qpqWebServerUtils.js +12 -0
- package/package.json +4 -1
- package/lib/serviceInfrastructureDefinitions/ServiceInfrastructureConfig.d.ts +0 -9
- package/lib/serviceInfrastructureDefinitions/ServiceInfrastructureConfig.js +0 -9
- package/lib/serviceInfrastructureDefinitions/dns.d.ts +0 -6
- package/lib/serviceInfrastructureDefinitions/dns.js +0 -9
- package/lib/serviceInfrastructureDefinitions/route.d.ts +0 -12
- package/lib/serviceInfrastructureDefinitions/serviceName.d.ts +0 -6
- package/lib/serviceInfrastructureDefinitions/serviceName.js +0 -9
- package/lib/types/dnsTypes.d.ts +0 -1
- package/lib/types/dnsTypes.js +0 -2
- package/lib/types/httpTypes.d.ts +0 -2
- package/lib/types/httpTypes.js +0 -2
- package/lib/types/routeTypes.d.ts +0 -1
- package/lib/types/routeTypes.js +0 -2
- package/lib/types/serviceNameTypes.d.ts +0 -1
- package/lib/types/serviceNameTypes.js +0 -2
- package/lib/types/srcFileTypes.d.ts +0 -2
- package/lib/types/srcFileTypes.js +0 -2
- package/lib/utils.d.ts +0 -9
- package/lib/utils.js +0 -20
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare enum GenericDataResourceActionTypeEnum {
|
|
2
|
-
Put = "@quidproquo-webserver/
|
|
3
|
-
Scan = "@quidproquo-webserver/
|
|
2
|
+
Put = "@quidproquo-webserver/genericDataResource/Put",
|
|
3
|
+
Scan = "@quidproquo-webserver/genericDataResource/Scan"
|
|
4
4
|
}
|
|
5
5
|
export default GenericDataResourceActionTypeEnum;
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.GenericDataResourceActionTypeEnum = void 0;
|
|
4
4
|
var GenericDataResourceActionTypeEnum;
|
|
5
5
|
(function (GenericDataResourceActionTypeEnum) {
|
|
6
|
-
GenericDataResourceActionTypeEnum["Put"] = "@quidproquo-webserver/
|
|
7
|
-
GenericDataResourceActionTypeEnum["Scan"] = "@quidproquo-webserver/
|
|
6
|
+
GenericDataResourceActionTypeEnum["Put"] = "@quidproquo-webserver/genericDataResource/Put";
|
|
7
|
+
GenericDataResourceActionTypeEnum["Scan"] = "@quidproquo-webserver/genericDataResource/Scan";
|
|
8
8
|
})(GenericDataResourceActionTypeEnum = exports.GenericDataResourceActionTypeEnum || (exports.GenericDataResourceActionTypeEnum = {}));
|
|
9
9
|
exports.default = GenericDataResourceActionTypeEnum;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.QPQWebServerConfigSettingType = void 0;
|
|
4
|
+
var QPQWebServerConfigSettingType;
|
|
5
|
+
(function (QPQWebServerConfigSettingType) {
|
|
6
|
+
QPQWebServerConfigSettingType["Route"] = "@quidproquo-webserver/config/Route";
|
|
7
|
+
QPQWebServerConfigSettingType["Dns"] = "@quidproquo-webserver/config/Dns";
|
|
8
|
+
})(QPQWebServerConfigSettingType = exports.QPQWebServerConfigSettingType || (exports.QPQWebServerConfigSettingType = {}));
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.defineDns = void 0;
|
|
4
|
+
const QPQConfig_1 = require("../QPQConfig");
|
|
5
|
+
const defineDns = (dnsBase) => ({
|
|
6
|
+
configSettingType: QPQConfig_1.QPQWebServerConfigSettingType.Dns,
|
|
7
|
+
dnsBase,
|
|
8
|
+
});
|
|
9
|
+
exports.defineDns = defineDns;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { QPQConfigSetting } from "quidproquo-core";
|
|
2
|
+
export type HTTPMethod = "GET" | "HEAD" | "POST" | "PUT" | "DELETE" | "CONNECT" | "OPTIONS" | "PATCH";
|
|
3
|
+
export type RouteOptions = {};
|
|
4
|
+
export interface RouteQPQWebServerConfigSetting extends QPQConfigSetting {
|
|
5
|
+
method: HTTPMethod;
|
|
6
|
+
path: string;
|
|
7
|
+
src: string;
|
|
8
|
+
runtime: string;
|
|
9
|
+
options: RouteOptions;
|
|
10
|
+
}
|
|
11
|
+
export declare const defineRoute: (method: HTTPMethod, path: string, src: string, runtime: string, options?: RouteOptions) => RouteQPQWebServerConfigSetting;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.defineRoute = void 0;
|
|
4
|
-
const
|
|
4
|
+
const QPQConfig_1 = require("../QPQConfig");
|
|
5
5
|
const defineRoute = (method, path, src, runtime, options = {}) => ({
|
|
6
|
-
|
|
6
|
+
configSettingType: QPQConfig_1.QPQWebServerConfigSettingType.Route,
|
|
7
7
|
method,
|
|
8
8
|
path,
|
|
9
9
|
src,
|
package/lib/index.d.ts
CHANGED
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
4
|
-
export
|
|
5
|
-
export { DnsServiceInfrastructureConfig } from "./serviceInfrastructureDefinitions/dns";
|
|
6
|
-
export { RouteInfrastructureConfig } from "./serviceInfrastructureDefinitions/route";
|
|
7
|
-
export { ServiceNameInfrastructureConfig } from "./serviceInfrastructureDefinitions/serviceName";
|
|
8
|
-
export { SrcPathname } from "./types/srcFileTypes";
|
|
9
|
-
export { default as utils } from "./utils";
|
|
1
|
+
export { defineDns, DnsQPQWebServerConfigSetting } from "./config/settings/dns";
|
|
2
|
+
export { defineRoute, RouteQPQWebServerConfigSetting, } from "./config/settings/route";
|
|
3
|
+
export { QPQWebServerConfigSettingType } from "./config/QPQConfig";
|
|
4
|
+
export * as qpqWebServerUtils from "./qpqWebServerUtils";
|
package/lib/index.js
CHANGED
|
@@ -1,16 +1,33 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
4
24
|
};
|
|
5
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
7
|
-
var
|
|
8
|
-
Object.defineProperty(exports, "defineRoute", { enumerable: true, get: function () { return route_1.defineRoute; } });
|
|
9
|
-
var dns_1 = require("./serviceInfrastructureDefinitions/dns");
|
|
26
|
+
exports.qpqWebServerUtils = exports.QPQWebServerConfigSettingType = exports.defineRoute = exports.defineDns = void 0;
|
|
27
|
+
var dns_1 = require("./config/settings/dns");
|
|
10
28
|
Object.defineProperty(exports, "defineDns", { enumerable: true, get: function () { return dns_1.defineDns; } });
|
|
11
|
-
var
|
|
12
|
-
Object.defineProperty(exports, "
|
|
13
|
-
var
|
|
14
|
-
Object.defineProperty(exports, "
|
|
15
|
-
|
|
16
|
-
Object.defineProperty(exports, "utils", { enumerable: true, get: function () { return __importDefault(utils_1).default; } });
|
|
29
|
+
var route_1 = require("./config/settings/route");
|
|
30
|
+
Object.defineProperty(exports, "defineRoute", { enumerable: true, get: function () { return route_1.defineRoute; } });
|
|
31
|
+
var QPQConfig_1 = require("./config/QPQConfig");
|
|
32
|
+
Object.defineProperty(exports, "QPQWebServerConfigSettingType", { enumerable: true, get: function () { return QPQConfig_1.QPQWebServerConfigSettingType; } });
|
|
33
|
+
exports.qpqWebServerUtils = __importStar(require("./qpqWebServerUtils"));
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getAllSrcEntries = void 0;
|
|
4
|
+
const quidproquo_core_1 = require("quidproquo-core");
|
|
5
|
+
const QPQConfig_1 = require("./config/QPQConfig");
|
|
6
|
+
// Used in bundlers to know where and what to build and index
|
|
7
|
+
// Events, routes, etc
|
|
8
|
+
const getAllSrcEntries = (configs) => {
|
|
9
|
+
const routes = quidproquo_core_1.qpqCoreUtils.getConfigSettings(configs, QPQConfig_1.QPQWebServerConfigSettingType.Route);
|
|
10
|
+
return routes.map((r) => r.src);
|
|
11
|
+
};
|
|
12
|
+
exports.getAllSrcEntries = getAllSrcEntries;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "quidproquo-webserver",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.12",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"types": "./lib/index.d.js",
|
|
@@ -22,6 +22,9 @@
|
|
|
22
22
|
"url": "https://github.com/joe-coady/quidproquo/issues"
|
|
23
23
|
},
|
|
24
24
|
"homepage": "https://github.com/joe-coady/quidproquo#readme",
|
|
25
|
+
"dependencies": {
|
|
26
|
+
"quidproquo-core": "*"
|
|
27
|
+
},
|
|
25
28
|
"devDependencies": {
|
|
26
29
|
"quidproquo-tsconfig": "*",
|
|
27
30
|
"typescript": "^4.9.3"
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export declare enum ServiceInfrastructureConfigType {
|
|
2
|
-
ROUTE = "ROUTE",
|
|
3
|
-
DNS = "DNS",
|
|
4
|
-
SERVICE_NAME = "SERVICE_NAME"
|
|
5
|
-
}
|
|
6
|
-
export interface ServiceInfrastructureConfig {
|
|
7
|
-
serviceInfrastructureConfigType: ServiceInfrastructureConfigType;
|
|
8
|
-
}
|
|
9
|
-
export type ServiceInfrastructureConfigs = ServiceInfrastructureConfig[];
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ServiceInfrastructureConfigType = void 0;
|
|
4
|
-
var ServiceInfrastructureConfigType;
|
|
5
|
-
(function (ServiceInfrastructureConfigType) {
|
|
6
|
-
ServiceInfrastructureConfigType["ROUTE"] = "ROUTE";
|
|
7
|
-
ServiceInfrastructureConfigType["DNS"] = "DNS";
|
|
8
|
-
ServiceInfrastructureConfigType["SERVICE_NAME"] = "SERVICE_NAME";
|
|
9
|
-
})(ServiceInfrastructureConfigType = exports.ServiceInfrastructureConfigType || (exports.ServiceInfrastructureConfigType = {}));
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { DNSPath } from "../types/dnsTypes";
|
|
2
|
-
import { ServiceInfrastructureConfig } from "./ServiceInfrastructureConfig";
|
|
3
|
-
export interface DnsServiceInfrastructureConfig extends ServiceInfrastructureConfig {
|
|
4
|
-
dnsBase: DNSPath;
|
|
5
|
-
}
|
|
6
|
-
export declare const defineDns: (dnsBase: DNSPath) => DnsServiceInfrastructureConfig;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.defineDns = void 0;
|
|
4
|
-
const ServiceInfrastructureConfig_1 = require("./ServiceInfrastructureConfig");
|
|
5
|
-
const defineDns = (dnsBase) => ({
|
|
6
|
-
serviceInfrastructureConfigType: ServiceInfrastructureConfig_1.ServiceInfrastructureConfigType.DNS,
|
|
7
|
-
dnsBase,
|
|
8
|
-
});
|
|
9
|
-
exports.defineDns = defineDns;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { HTTPMethod, HTTPRoute } from "../types/httpTypes";
|
|
2
|
-
import { SrcPathname, MethodName } from "../types/srcFileTypes";
|
|
3
|
-
import { RouteOptions } from "../types/routeTypes";
|
|
4
|
-
import { ServiceInfrastructureConfig } from "./ServiceInfrastructureConfig";
|
|
5
|
-
export interface RouteInfrastructureConfig extends ServiceInfrastructureConfig {
|
|
6
|
-
method: HTTPMethod;
|
|
7
|
-
path: HTTPRoute;
|
|
8
|
-
src: SrcPathname;
|
|
9
|
-
runtime: MethodName;
|
|
10
|
-
options: RouteOptions;
|
|
11
|
-
}
|
|
12
|
-
export declare const defineRoute: (method: HTTPMethod, path: HTTPRoute, src: SrcPathname, runtime: MethodName, options?: RouteOptions) => RouteInfrastructureConfig;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { ServiceName } from "../types/serviceNameTypes";
|
|
2
|
-
import { ServiceInfrastructureConfig } from "./ServiceInfrastructureConfig";
|
|
3
|
-
export interface ServiceNameInfrastructureConfig extends ServiceInfrastructureConfig {
|
|
4
|
-
serviceName: ServiceName;
|
|
5
|
-
}
|
|
6
|
-
export declare const defineServiceName: (serviceName: ServiceName) => ServiceNameInfrastructureConfig;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.defineServiceName = void 0;
|
|
4
|
-
const ServiceInfrastructureConfig_1 = require("./ServiceInfrastructureConfig");
|
|
5
|
-
const defineServiceName = (serviceName) => ({
|
|
6
|
-
serviceInfrastructureConfigType: ServiceInfrastructureConfig_1.ServiceInfrastructureConfigType.SERVICE_NAME,
|
|
7
|
-
serviceName,
|
|
8
|
-
});
|
|
9
|
-
exports.defineServiceName = defineServiceName;
|
package/lib/types/dnsTypes.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type DNSPath = string;
|
package/lib/types/dnsTypes.js
DELETED
package/lib/types/httpTypes.d.ts
DELETED
package/lib/types/httpTypes.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type RouteOptions = {};
|
package/lib/types/routeTypes.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type ServiceName = string;
|
package/lib/utils.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ServiceInfrastructureConfigType, ServiceInfrastructureConfig, ServiceInfrastructureConfigs } from "./serviceInfrastructureDefinitions/ServiceInfrastructureConfig";
|
|
2
|
-
import { SrcPathname } from "./types/srcFileTypes";
|
|
3
|
-
export declare const getAllSrcEntries: (configs: ServiceInfrastructureConfigs) => SrcPathname[];
|
|
4
|
-
declare const _default: {
|
|
5
|
-
getServiceInfrastructureDefinitions: <T extends ServiceInfrastructureConfig>(configs: ServiceInfrastructureConfigs, serviceInfrastructureConfigType: ServiceInfrastructureConfigType) => T[];
|
|
6
|
-
getServiceInfrastructureDefinition: <T_1 extends ServiceInfrastructureConfig>(configs: ServiceInfrastructureConfigs, serviceInfrastructureConfigType: ServiceInfrastructureConfigType) => T_1 | undefined;
|
|
7
|
-
getAllSrcEntries: (configs: ServiceInfrastructureConfigs) => string[];
|
|
8
|
-
};
|
|
9
|
-
export default _default;
|
package/lib/utils.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getAllSrcEntries = void 0;
|
|
4
|
-
const ServiceInfrastructureConfig_1 = require("./serviceInfrastructureDefinitions/ServiceInfrastructureConfig");
|
|
5
|
-
const getServiceInfrastructureDefinitions = (configs, serviceInfrastructureConfigType) => {
|
|
6
|
-
return configs.filter((c) => c.serviceInfrastructureConfigType === serviceInfrastructureConfigType);
|
|
7
|
-
};
|
|
8
|
-
const getServiceInfrastructureDefinition = (configs, serviceInfrastructureConfigType) => {
|
|
9
|
-
return getServiceInfrastructureDefinitions(configs, serviceInfrastructureConfigType)[0];
|
|
10
|
-
};
|
|
11
|
-
const getAllSrcEntries = (configs) => {
|
|
12
|
-
const routes = getServiceInfrastructureDefinitions(configs, ServiceInfrastructureConfig_1.ServiceInfrastructureConfigType.ROUTE);
|
|
13
|
-
return routes.map((r) => r.src);
|
|
14
|
-
};
|
|
15
|
-
exports.getAllSrcEntries = getAllSrcEntries;
|
|
16
|
-
exports.default = {
|
|
17
|
-
getServiceInfrastructureDefinitions,
|
|
18
|
-
getServiceInfrastructureDefinition,
|
|
19
|
-
getAllSrcEntries: exports.getAllSrcEntries,
|
|
20
|
-
};
|