quidproquo-webserver 0.0.9 → 0.0.11

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 (30) hide show
  1. package/lib/actions/genericDataResource/GenericDataResourceActionTypeEnum.d.ts +2 -2
  2. package/lib/actions/genericDataResource/GenericDataResourceActionTypeEnum.js +2 -2
  3. package/lib/config/QPQConfig.d.ts +4 -0
  4. package/lib/config/QPQConfig.js +8 -0
  5. package/lib/config/settings/dns.d.ts +5 -0
  6. package/lib/config/settings/dns.js +9 -0
  7. package/lib/config/settings/route.d.ts +11 -0
  8. package/lib/{serviceInfrastructureDefinitions → config/settings}/route.js +2 -2
  9. package/lib/index.d.ts +3 -7
  10. package/lib/index.js +6 -8
  11. package/lib/utils.d.ts +3 -3
  12. package/lib/utils.js +10 -7
  13. package/package.json +1 -1
  14. package/lib/serviceInfrastructureDefinitions/ServiceInfrastructureConfig.d.ts +0 -9
  15. package/lib/serviceInfrastructureDefinitions/ServiceInfrastructureConfig.js +0 -9
  16. package/lib/serviceInfrastructureDefinitions/dns.d.ts +0 -6
  17. package/lib/serviceInfrastructureDefinitions/dns.js +0 -9
  18. package/lib/serviceInfrastructureDefinitions/route.d.ts +0 -12
  19. package/lib/serviceInfrastructureDefinitions/serviceName.d.ts +0 -6
  20. package/lib/serviceInfrastructureDefinitions/serviceName.js +0 -9
  21. package/lib/types/dnsTypes.d.ts +0 -1
  22. package/lib/types/dnsTypes.js +0 -2
  23. package/lib/types/httpTypes.d.ts +0 -2
  24. package/lib/types/httpTypes.js +0 -2
  25. package/lib/types/routeTypes.d.ts +0 -1
  26. package/lib/types/routeTypes.js +0 -2
  27. package/lib/types/serviceNameTypes.d.ts +0 -1
  28. package/lib/types/serviceNameTypes.js +0 -2
  29. package/lib/types/srcFileTypes.d.ts +0 -2
  30. package/lib/types/srcFileTypes.js +0 -2
@@ -1,5 +1,5 @@
1
1
  export declare enum GenericDataResourceActionTypeEnum {
2
- Put = "@quidproquo-webserver/GenericDataResource/Put",
3
- Scan = "@quidproquo-webserver/GenericDataResource/Scan"
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/GenericDataResource/Put";
7
- GenericDataResourceActionTypeEnum["Scan"] = "@quidproquo-webserver/GenericDataResource/Scan";
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,4 @@
1
+ export declare enum QPQWebServerConfigSettingType {
2
+ Route = "@quidproquo-webserver/config/Route",
3
+ Dns = "@quidproquo-webserver/config/Dns"
4
+ }
@@ -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,5 @@
1
+ import { QPQConfigSetting } from "quidproquo-core";
2
+ export interface DnsQPQWebServerConfigSetting extends QPQConfigSetting {
3
+ dnsBase: string;
4
+ }
5
+ export declare const defineDns: (dnsBase: string) => DnsQPQWebServerConfigSetting;
@@ -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 ServiceInfrastructureConfig_1 = require("./ServiceInfrastructureConfig");
4
+ const QPQConfig_1 = require("../QPQConfig");
5
5
  const defineRoute = (method, path, src, runtime, options = {}) => ({
6
- serviceInfrastructureConfigType: ServiceInfrastructureConfig_1.ServiceInfrastructureConfigType.ROUTE,
6
+ configSettingType: QPQConfig_1.QPQWebServerConfigSettingType.Route,
7
7
  method,
8
8
  path,
9
9
  src,
package/lib/index.d.ts CHANGED
@@ -1,8 +1,4 @@
1
- export { defineRoute } from "./serviceInfrastructureDefinitions/route";
2
- export { defineDns } from "./serviceInfrastructureDefinitions/dns";
3
- export { defineServiceName } from "./serviceInfrastructureDefinitions/serviceName";
4
- export { ServiceInfrastructureConfig, ServiceInfrastructureConfigs, ServiceInfrastructureConfigType, } from "./serviceInfrastructureDefinitions/ServiceInfrastructureConfig";
5
- export { DnsServiceInfrastructureConfig } from "./serviceInfrastructureDefinitions/dns";
6
- export { RouteInfrastructureConfig } from "./serviceInfrastructureDefinitions/route";
7
- export { ServiceNameInfrastructureConfig } from "./serviceInfrastructureDefinitions/serviceName";
1
+ export { defineDns, DnsQPQWebServerConfigSetting } from "./config/settings/dns";
2
+ export { defineRoute, RouteQPQWebServerConfigSetting, } from "./config/settings/route";
3
+ export { QPQWebServerConfigSettingType } from "./config/QPQConfig";
8
4
  export { default as utils } from "./utils";
package/lib/index.js CHANGED
@@ -3,14 +3,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.utils = exports.ServiceInfrastructureConfigType = exports.defineServiceName = exports.defineDns = exports.defineRoute = void 0;
7
- var route_1 = require("./serviceInfrastructureDefinitions/route");
8
- Object.defineProperty(exports, "defineRoute", { enumerable: true, get: function () { return route_1.defineRoute; } });
9
- var dns_1 = require("./serviceInfrastructureDefinitions/dns");
6
+ exports.utils = exports.QPQWebServerConfigSettingType = exports.defineRoute = exports.defineDns = void 0;
7
+ var dns_1 = require("./config/settings/dns");
10
8
  Object.defineProperty(exports, "defineDns", { enumerable: true, get: function () { return dns_1.defineDns; } });
11
- var serviceName_1 = require("./serviceInfrastructureDefinitions/serviceName");
12
- Object.defineProperty(exports, "defineServiceName", { enumerable: true, get: function () { return serviceName_1.defineServiceName; } });
13
- var ServiceInfrastructureConfig_1 = require("./serviceInfrastructureDefinitions/ServiceInfrastructureConfig");
14
- Object.defineProperty(exports, "ServiceInfrastructureConfigType", { enumerable: true, get: function () { return ServiceInfrastructureConfig_1.ServiceInfrastructureConfigType; } });
9
+ var route_1 = require("./config/settings/route");
10
+ Object.defineProperty(exports, "defineRoute", { enumerable: true, get: function () { return route_1.defineRoute; } });
11
+ var QPQConfig_1 = require("./config/QPQConfig");
12
+ Object.defineProperty(exports, "QPQWebServerConfigSettingType", { enumerable: true, get: function () { return QPQConfig_1.QPQWebServerConfigSettingType; } });
15
13
  var utils_1 = require("./utils");
16
14
  Object.defineProperty(exports, "utils", { enumerable: true, get: function () { return __importDefault(utils_1).default; } });
package/lib/utils.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { ServiceInfrastructureConfigType, ServiceInfrastructureConfig, ServiceInfrastructureConfigs } from "./serviceInfrastructureDefinitions/ServiceInfrastructureConfig";
1
+ import { QPQConfig } from "quidproquo-core";
2
+ export declare const getAllSrcEntries: (configs: QPQConfig) => string[];
2
3
  declare const _default: {
3
- getServiceInfrastructureDefinitions: <T extends ServiceInfrastructureConfig>(configs: ServiceInfrastructureConfigs, serviceInfrastructureConfigType: ServiceInfrastructureConfigType) => T[];
4
- getServiceInfrastructureDefinition: <T_1 extends ServiceInfrastructureConfig>(configs: ServiceInfrastructureConfigs, serviceInfrastructureConfigType: ServiceInfrastructureConfigType) => T_1 | undefined;
4
+ getAllSrcEntries: () => void;
5
5
  };
6
6
  export default _default;
package/lib/utils.js CHANGED
@@ -1,12 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const getServiceInfrastructureDefinitions = (configs, serviceInfrastructureConfigType) => {
4
- return configs.filter((c) => c.serviceInfrastructureConfigType === serviceInfrastructureConfigType);
5
- };
6
- const getServiceInfrastructureDefinition = (configs, serviceInfrastructureConfigType) => {
7
- return getServiceInfrastructureDefinitions(configs, serviceInfrastructureConfigType)[0];
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);
8
11
  };
12
+ exports.getAllSrcEntries = getAllSrcEntries;
9
13
  exports.default = {
10
- getServiceInfrastructureDefinitions,
11
- getServiceInfrastructureDefinition,
14
+ getAllSrcEntries: () => { },
12
15
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "quidproquo-webserver",
3
- "version": "0.0.9",
3
+ "version": "0.0.11",
4
4
  "description": "",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.js",
@@ -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;
@@ -1 +0,0 @@
1
- export type DNSPath = string;
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,2 +0,0 @@
1
- export type HTTPMethod = "GET" | "HEAD" | "POST" | "PUT" | "DELETE" | "CONNECT" | "OPTIONS" | "PATCH";
2
- export type HTTPRoute = string;
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1 +0,0 @@
1
- export type RouteOptions = {};
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1 +0,0 @@
1
- export type ServiceName = string;
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,2 +0,0 @@
1
- export type SrcPathname = string;
2
- export type MethodName = string;
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });