quidproquo-webserver 0.0.89 → 0.0.90

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.
@@ -2,12 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.askGetDomainRoot = void 0;
4
4
  const quidproquo_core_1 = require("quidproquo-core");
5
+ const utils_1 = require("../utils");
5
6
  function* askGetDomainRoot(rootDomain) {
6
7
  const appInfo = yield* (0, quidproquo_core_1.askConfigGetApplicationInfo)();
7
- let domainPrefix = appInfo.environment !== 'production' ? `${appInfo.environment}.` : '';
8
- if (appInfo.feature) {
9
- domainPrefix = `${appInfo.feature}.${domainPrefix}`;
10
- }
11
- return `${domainPrefix}${rootDomain}`;
8
+ return (0, utils_1.getDomainRoot)(rootDomain, appInfo.environment, appInfo.feature);
12
9
  }
13
10
  exports.askGetDomainRoot = askGetDomainRoot;
@@ -23,3 +23,4 @@ export declare const getEnvironmentDomainName: (configs: QPQConfig) => string;
23
23
  export declare const getBaseDomainName: (qpqConfig: QPQConfig) => string;
24
24
  export declare const getServiceDomainName: (qpqConfig: QPQConfig) => string;
25
25
  export declare const getDefaultRouteSettings: (qpqConfig: QPQConfig) => DefaultRouteOptionsQPQWebServerConfigSetting[];
26
+ export declare const getDomainRoot: (rootDomain: string, environment: string, feature?: string) => string;
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.getDefaultRouteSettings = exports.getServiceDomainName = exports.getBaseDomainName = exports.getEnvironmentDomainName = exports.getWebEntryConfigs = exports.getDnsConfigs = exports.getApiConfigs = exports.getSubdomainRedirects = exports.getRedirectApiBuildFullPath = exports.getServiceFunctionFullPath = exports.getApiEntryFullPath = exports.getWebEntrySeoFullPath = exports.getWebEntryFullPath = exports.getWebEntry = exports.getDomainName = exports.getAllSrcEntries = exports.getAllOpenApiSpecs = exports.getAllServiceFunctions = exports.getAllSeo = exports.getAllApiKeyConfigs = exports.getAllRoutesForApi = exports.getAllRoutes = void 0;
26
+ exports.getDomainRoot = exports.getDefaultRouteSettings = exports.getServiceDomainName = exports.getBaseDomainName = exports.getEnvironmentDomainName = exports.getWebEntryConfigs = exports.getDnsConfigs = exports.getApiConfigs = exports.getSubdomainRedirects = exports.getRedirectApiBuildFullPath = exports.getServiceFunctionFullPath = exports.getApiEntryFullPath = exports.getWebEntrySeoFullPath = exports.getWebEntryFullPath = exports.getWebEntry = exports.getDomainName = exports.getAllSrcEntries = exports.getAllOpenApiSpecs = exports.getAllServiceFunctions = exports.getAllSeo = exports.getAllApiKeyConfigs = exports.getAllRoutesForApi = exports.getAllRoutes = void 0;
27
27
  const path = __importStar(require("path"));
28
28
  const quidproquo_core_1 = require("quidproquo-core");
29
29
  const config_1 = require("../config");
@@ -158,3 +158,11 @@ const getDefaultRouteSettings = (qpqConfig) => {
158
158
  return defaultRouteSettings;
159
159
  };
160
160
  exports.getDefaultRouteSettings = getDefaultRouteSettings;
161
+ const getDomainRoot = (rootDomain, environment, feature) => {
162
+ let domainPrefix = environment !== 'production' ? `${environment}.` : '';
163
+ if (feature) {
164
+ domainPrefix = `${feature}.${domainPrefix}`;
165
+ }
166
+ return `${domainPrefix}${rootDomain}`;
167
+ };
168
+ exports.getDomainRoot = getDomainRoot;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "quidproquo-webserver",
3
- "version": "0.0.89",
3
+ "version": "0.0.90",
4
4
  "description": "",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.js",