Socket
Socket
Sign inDemoInstall

quidproquo-webserver

Package Overview
Dependencies
Maintainers
1
Versions
226
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

quidproquo-webserver - npm Package Compare versions

Comparing version 0.0.171 to 0.0.172

10

lib/commonjs/config/settings/api.d.ts
import { QPQConfigSetting, QPQConfigAdvancedSettings } from 'quidproquo-core';
export interface QPQConfigAdvancedApiSettings extends QPQConfigAdvancedSettings {
onRootDomain?: boolean;
apiName?: string;
subDomain?: string;
buildPath?: string;
cloudflareApiKeySecretName?: string;

@@ -9,8 +9,8 @@ }

apiSubdomain: string;
onRootDomain: boolean;
rootDomain: string;
apiName: string;
buildPath: string;
buildPath?: string;
deprecated: boolean;
cloudflareApiKeySecretName?: string;
}
export declare const defineApi: (apiSubdomain: string, buildPath: string, options?: QPQConfigAdvancedApiSettings) => ApiQPQWebServerConfigSetting;
export declare const defineApi: (apiName: string, rootDomain: string, options?: QPQConfigAdvancedApiSettings) => ApiQPQWebServerConfigSetting;

@@ -5,11 +5,10 @@ "use strict";

const QPQConfig_1 = require("../QPQConfig");
const defineApi = (apiSubdomain, buildPath, options) => {
const defineApi = (apiName, rootDomain, options) => {
return {
configSettingType: QPQConfig_1.QPQWebServerConfigSettingType.Api,
uniqueKey: apiSubdomain,
apiSubdomain,
buildPath,
// advanced
onRootDomain: (options === null || options === void 0 ? void 0 : options.onRootDomain) || false,
apiName: (options === null || options === void 0 ? void 0 : options.apiName) || 'api',
uniqueKey: apiName,
apiSubdomain: (options === null || options === void 0 ? void 0 : options.subDomain) || apiName,
buildPath: options === null || options === void 0 ? void 0 : options.buildPath,
rootDomain,
apiName: apiName,
deprecated: (options === null || options === void 0 ? void 0 : options.deprecated) || false,

@@ -16,0 +15,0 @@ cloudflareApiKeySecretName: options === null || options === void 0 ? void 0 : options.cloudflareApiKeySecretName,

@@ -7,3 +7,4 @@ import { QPQConfigSetting, QPQConfigAdvancedSettings } from 'quidproquo-core';

subdomain?: string;
rootDomain: string;
}
export declare const defineCertificate: (onRootDomain: boolean, subdomain?: string, options?: QPQConfigAdvancedCertificateSettings) => CertificateQPQWebServerConfigSetting;
export declare const defineCertificate: (onRootDomain: boolean, rootDomain: string, subdomain?: string, options?: QPQConfigAdvancedCertificateSettings) => CertificateQPQWebServerConfigSetting;

@@ -5,3 +5,3 @@ "use strict";

const QPQConfig_1 = require("../QPQConfig");
const defineCertificate = (onRootDomain, subdomain, options) => ({
const defineCertificate = (onRootDomain, rootDomain, subdomain, options) => ({
configSettingType: QPQConfig_1.QPQWebServerConfigSettingType.Certificate,

@@ -11,3 +11,4 @@ uniqueKey: `${onRootDomain}${subdomain}`,

subdomain,
rootDomain,
});
exports.defineCertificate = defineCertificate;

@@ -7,2 +7,2 @@ import { QPQConfig, QPQConfigAdvancedSettings } from 'quidproquo-core';

}
export declare const defineLogs: (buildPath: string, webFilesPath: string, advancedSettings?: QPQConfigAdvancedLogSettings) => QPQConfig;
export declare const defineLogs: (buildPath: string, webFilesPath: string, rootDomain: string, advancedSettings?: QPQConfigAdvancedLogSettings) => QPQConfig;

@@ -13,3 +13,3 @@ "use strict";

const logResourceName = 'qpq-logs';
const defineLogs = (buildPath, webFilesPath, advancedSettings) => {
const defineLogs = (buildPath, webFilesPath, rootDomain, advancedSettings) => {
const routeAuthSettings = {

@@ -82,2 +82,3 @@ routeAuthSettings: {

onRootDomain: false,
rootDomain,
},

@@ -84,0 +85,0 @@ ignoreCache: ['index.html', 'index.js'],

@@ -6,2 +6,3 @@ import { QPQConfigSetting, QPQConfigAdvancedSettings } from 'quidproquo-core';

onRootDomain: boolean;
rootDomain: string;
}

@@ -16,3 +17,3 @@ export interface StorageDriveOptions {

storageDrive?: StorageDriveOptions;
domain?: WebDomainOptions;
domain: WebDomainOptions;
cacheSettingsName?: string;

@@ -38,2 +39,2 @@ indexRoot?: string;

}
export declare const defineWebEntry: (name: string, options?: QPQConfigAdvancedWebEntrySettings) => WebEntryQPQWebServerConfigSetting;
export declare const defineWebEntry: (name: string, options: QPQConfigAdvancedWebEntrySettings) => WebEntryQPQWebServerConfigSetting;

@@ -15,5 +15,3 @@ "use strict";

},
domain: (options === null || options === void 0 ? void 0 : options.domain) || {
onRootDomain: true,
},
domain: options.domain,
buildPath: options === null || options === void 0 ? void 0 : options.buildPath,

@@ -20,0 +18,0 @@ seoBuildPath: options === null || options === void 0 ? void 0 : options.seoBuildPath,

@@ -14,2 +14,3 @@ import { QPQConfigSetting, QPQConfigAdvancedSettings, QpqSourceEntry } from 'quidproquo-core';

apiSubdomain: string;
rootDomain: string;
onRootDomain: boolean;

@@ -22,2 +23,2 @@ apiName: string;

}
export declare const defineWebsocket: (apiSubdomain: string, buildPath: string, eventProcessors: QpqWebSocketEventProcessors, options?: QPQConfigAdvancedWebSocketSettings) => WebSocketQPQWebServerConfigSetting;
export declare const defineWebsocket: (apiSubdomain: string, rootDomain: string, buildPath: string, eventProcessors: QpqWebSocketEventProcessors, options?: QPQConfigAdvancedWebSocketSettings) => WebSocketQPQWebServerConfigSetting;

@@ -5,7 +5,8 @@ "use strict";

const QPQConfig_1 = require("../QPQConfig");
const defineWebsocket = (apiSubdomain, buildPath, eventProcessors, options) => {
const defineWebsocket = (apiSubdomain, rootDomain, buildPath, eventProcessors, options) => {
return {
configSettingType: QPQConfig_1.QPQWebServerConfigSettingType.WebSocket,
uniqueKey: apiSubdomain,
uniqueKey: `${apiSubdomain}.${rootDomain}`,
apiSubdomain,
rootDomain,
buildPath,

@@ -12,0 +13,0 @@ eventProcessors,

@@ -31,4 +31,8 @@ import { QPQConfig } from 'quidproquo-core';

export declare const getServiceDomainName: (qpqConfig: QPQConfig) => string;
export declare const resolveApexDomainNameFromDomainConfig: (qpqConfig: QPQConfig, rootDomain: string, onRootDomain: boolean) => string;
export declare const constructServiceDomainName: (rootDomain: string, environment: string, service: string, feature?: string) => string;
export declare const constructEnvironmentDomainName: (environment: string, domain: string) => string;
export declare const getDefaultRouteSettings: (qpqConfig: QPQConfig) => DefaultRouteOptionsQPQWebServerConfigSetting[];
export declare const getDomainRoot: (rootDomain: string, environment: string, feature?: string) => string;
export declare const resolveDomainRoot: (rootDomain: string, qpqConfig: QPQConfig) => string;
export declare const getWebsocketSettings: (qpqConfig: QPQConfig) => WebSocketQPQWebServerConfigSetting[];

@@ -26,3 +26,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.getWebsocketSettings = exports.getDomainRoot = exports.getDefaultRouteSettings = exports.getServiceDomainName = exports.getBaseDomainName = exports.getEnvironmentDomainName = exports.getCacheConfigByName = exports.getAllOwnedCertifcateConfigs = exports.getAllOwnedCacheConfigs = exports.getWebEntryConfigs = exports.getDnsConfigs = exports.getApiConfigs = exports.getSubdomainRedirects = exports.getRedirectApiBuildFullPath = exports.getServiceFunctionFullPath = exports.getWebsocketEntryByApiName = exports.getWebsocketEntryFullPath = exports.getApiEntryFullPath = exports.getWebEntrySeoFullPath = exports.getWebEntryFullPath = exports.getWebEntry = exports.getDomainName = exports.getAllSrcEntries = exports.getAllWebsocketSrcEntries = exports.getAllOpenApiSpecs = exports.getAllServiceFunctions = exports.getAllSeo = exports.getAllApiKeyConfigs = exports.getAllRoutesForApi = exports.getAllRoutes = void 0;
exports.getWebsocketSettings = exports.resolveDomainRoot = exports.getDomainRoot = exports.getDefaultRouteSettings = exports.constructEnvironmentDomainName = exports.constructServiceDomainName = exports.resolveApexDomainNameFromDomainConfig = exports.getServiceDomainName = exports.getBaseDomainName = exports.getEnvironmentDomainName = exports.getCacheConfigByName = exports.getAllOwnedCertifcateConfigs = exports.getAllOwnedCacheConfigs = exports.getWebEntryConfigs = exports.getDnsConfigs = exports.getApiConfigs = exports.getSubdomainRedirects = exports.getRedirectApiBuildFullPath = exports.getServiceFunctionFullPath = exports.getWebsocketEntryByApiName = exports.getWebsocketEntryFullPath = exports.getApiEntryFullPath = exports.getWebEntrySeoFullPath = exports.getWebEntryFullPath = exports.getWebEntry = exports.getDomainName = exports.getAllSrcEntries = exports.getAllWebsocketSrcEntries = exports.getAllOpenApiSpecs = exports.getAllServiceFunctions = exports.getAllSeo = exports.getAllApiKeyConfigs = exports.getAllRoutesForApi = exports.getAllRoutes = void 0;
const path = __importStar(require("path"));

@@ -205,2 +205,23 @@ const quidproquo_core_1 = require("quidproquo-core");

exports.getServiceDomainName = getServiceDomainName;
const resolveApexDomainNameFromDomainConfig = (qpqConfig, rootDomain, onRootDomain) => {
const feature = quidproquo_core_1.qpqCoreUtils.getApplicationModuleFeature(qpqConfig);
const environment = quidproquo_core_1.qpqCoreUtils.getApplicationModuleEnvironment(qpqConfig);
const apexDomain = onRootDomain
? (0, exports.getDomainRoot)(rootDomain, environment, feature)
: (0, exports.constructServiceDomainName)(rootDomain, environment, quidproquo_core_1.qpqCoreUtils.getApplicationModuleName(qpqConfig), feature);
return apexDomain;
};
exports.resolveApexDomainNameFromDomainConfig = resolveApexDomainNameFromDomainConfig;
const constructServiceDomainName = (rootDomain, environment, service, feature) => {
const domainBase = (0, exports.getDomainRoot)(rootDomain, environment, feature);
return `${service}.${domainBase}`;
};
exports.constructServiceDomainName = constructServiceDomainName;
const constructEnvironmentDomainName = (environment, domain) => {
if (environment === 'production') {
return domain;
}
return `${environment}.${domain}`;
};
exports.constructEnvironmentDomainName = constructEnvironmentDomainName;
const getDefaultRouteSettings = (qpqConfig) => {

@@ -219,2 +240,7 @@ const defaultRouteSettings = quidproquo_core_1.qpqCoreUtils.getConfigSettings(qpqConfig, config_1.QPQWebServerConfigSettingType.DefaultRouteOptions) || [];

exports.getDomainRoot = getDomainRoot;
const resolveDomainRoot = (rootDomain, qpqConfig) => {
const domain = (0, exports.getDomainRoot)(rootDomain, quidproquo_core_1.qpqCoreUtils.getApplicationModuleEnvironment(qpqConfig), quidproquo_core_1.qpqCoreUtils.getApplicationModuleFeature(qpqConfig));
return domain;
};
exports.resolveDomainRoot = resolveDomainRoot;
const getWebsocketSettings = (qpqConfig) => {

@@ -221,0 +247,0 @@ const websocketSettings = quidproquo_core_1.qpqCoreUtils.getConfigSettings(qpqConfig, config_1.QPQWebServerConfigSettingType.WebSocket) || [];

{
"name": "quidproquo-webserver",
"version": "0.0.171",
"version": "0.0.172",
"description": "",

@@ -28,8 +28,8 @@ "main": "./lib/commonjs/index.js",

"dependencies": {
"quidproquo-core": "0.0.171"
"quidproquo-core": "0.0.172"
},
"devDependencies": {
"quidproquo-tsconfig": "0.0.171",
"quidproquo-tsconfig": "0.0.172",
"typescript": "^4.9.3"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc