quidproquo-webserver 0.1.18 → 0.1.20
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/README.md +1 -2
- package/lib/commonjs/actionProcessor/api/getHttpApiEventAutoRespondActionProcessor.js +7 -5
- package/lib/commonjs/actionProcessor/api/getHttpApiEventAutoRespondActionProcessor.js.map +1 -1
- package/lib/commonjs/actions/dns/DnsActionType.d.ts +3 -1
- package/lib/commonjs/actions/dns/DnsActionType.js +2 -0
- package/lib/commonjs/actions/dns/DnsActionType.js.map +1 -1
- package/lib/commonjs/actions/dns/askDnsList.d.ts +2 -1
- package/lib/commonjs/actions/dns/askDnsList.js +1 -0
- package/lib/commonjs/actions/dns/askDnsList.js.map +1 -1
- package/lib/commonjs/actions/dns/askDnsResolveHosts.d.ts +9 -0
- package/lib/commonjs/actions/dns/askDnsResolveHosts.js +11 -0
- package/lib/commonjs/actions/dns/askDnsResolveHosts.js.map +1 -0
- package/lib/commonjs/actions/dns/index.d.ts +1 -0
- package/lib/commonjs/actions/dns/index.js +1 -0
- package/lib/commonjs/actions/dns/index.js.map +1 -1
- package/lib/commonjs/actions/index.d.ts +1 -1
- package/lib/commonjs/actions/index.js +1 -1
- package/lib/commonjs/actions/index.js.map +1 -1
- package/lib/commonjs/actions/openApi/OpenApiActionType.d.ts +3 -0
- package/lib/commonjs/actions/openApi/OpenApiActionType.js +8 -0
- package/lib/commonjs/actions/openApi/OpenApiActionType.js.map +1 -0
- package/lib/commonjs/actions/openApi/askOpenApiGetDocument.d.ts +9 -0
- package/lib/commonjs/actions/openApi/askOpenApiGetDocument.js +12 -0
- package/lib/commonjs/actions/openApi/askOpenApiGetDocument.js.map +1 -0
- package/lib/commonjs/actions/openApi/index.d.ts +2 -0
- package/lib/commonjs/actions/{openApiSpec → openApi}/index.js +2 -2
- package/lib/commonjs/actions/openApi/index.js.map +1 -0
- package/lib/commonjs/config/QPQConfig.d.ts +0 -1
- package/lib/commonjs/config/QPQConfig.js +0 -1
- package/lib/commonjs/config/QPQConfig.js.map +1 -1
- package/lib/commonjs/config/settings/api.d.ts +1 -2
- package/lib/commonjs/config/settings/api.js +1 -2
- package/lib/commonjs/config/settings/api.js.map +1 -1
- package/lib/commonjs/config/settings/dns.d.ts +15 -5
- package/lib/commonjs/config/settings/dns.js +10 -5
- package/lib/commonjs/config/settings/dns.js.map +1 -1
- package/lib/commonjs/config/settings/domainProxy.d.ts +0 -1
- package/lib/commonjs/config/settings/domainProxy.js.map +1 -1
- package/lib/commonjs/config/settings/emailSender.d.ts +3 -4
- package/lib/commonjs/config/settings/emailSender.js +5 -7
- package/lib/commonjs/config/settings/emailSender.js.map +1 -1
- package/lib/commonjs/config/settings/index.d.ts +0 -1
- package/lib/commonjs/config/settings/index.js +0 -1
- package/lib/commonjs/config/settings/index.js.map +1 -1
- package/lib/commonjs/config/settings/route.d.ts +2 -0
- package/lib/commonjs/config/settings/route.js.map +1 -1
- package/lib/commonjs/config/settings/webEntry.d.ts +0 -1
- package/lib/commonjs/config/settings/webEntry.js.map +1 -1
- package/lib/commonjs/config/settings/websocket.d.ts +1 -2
- package/lib/commonjs/config/settings/websocket.js +3 -12
- package/lib/commonjs/config/settings/websocket.js.map +1 -1
- package/lib/commonjs/config/types/JsonSchema.d.ts +1 -0
- package/lib/commonjs/config/types/JsonSchema.js +3 -0
- package/lib/commonjs/config/types/JsonSchema.js.map +1 -0
- package/lib/commonjs/config/types/RouteSchema.d.ts +10 -0
- package/lib/commonjs/config/types/RouteSchema.js +3 -0
- package/lib/commonjs/config/types/RouteSchema.js.map +1 -0
- package/lib/commonjs/config/types/index.d.ts +2 -0
- package/lib/commonjs/config/types/index.js +2 -0
- package/lib/commonjs/config/types/index.js.map +1 -1
- package/lib/commonjs/configUtils/dns/getDnsConfig.d.ts +4 -0
- package/lib/commonjs/configUtils/dns/getDnsConfig.js +16 -0
- package/lib/commonjs/configUtils/dns/getDnsConfig.js.map +1 -0
- package/lib/commonjs/configUtils/dns/getPrimaryRootDomain.d.ts +3 -0
- package/lib/commonjs/configUtils/dns/getPrimaryRootDomain.js +8 -0
- package/lib/commonjs/configUtils/dns/getPrimaryRootDomain.js.map +1 -0
- package/lib/commonjs/configUtils/dns/getRootDomains.d.ts +3 -0
- package/lib/commonjs/configUtils/dns/getRootDomains.js +8 -0
- package/lib/commonjs/configUtils/dns/getRootDomains.js.map +1 -0
- package/lib/commonjs/configUtils/dns/index.d.ts +3 -0
- package/lib/commonjs/configUtils/dns/index.js +20 -0
- package/lib/commonjs/configUtils/dns/index.js.map +1 -0
- package/lib/commonjs/configUtils/index.d.ts +2 -0
- package/lib/commonjs/configUtils/index.js +19 -0
- package/lib/commonjs/configUtils/index.js.map +1 -0
- package/lib/commonjs/configUtils/storageDrive/getStorageDriveCorsSettingsByName.d.ts +4 -0
- package/lib/commonjs/configUtils/storageDrive/getStorageDriveCorsSettingsByName.js +14 -0
- package/lib/commonjs/configUtils/storageDrive/getStorageDriveCorsSettingsByName.js.map +1 -0
- package/lib/commonjs/configUtils/storageDrive/index.d.ts +1 -0
- package/lib/commonjs/configUtils/storageDrive/index.js +18 -0
- package/lib/commonjs/configUtils/storageDrive/index.js.map +1 -0
- package/lib/commonjs/domain/index.d.ts +2 -0
- package/lib/commonjs/domain/index.js +19 -0
- package/lib/commonjs/domain/index.js.map +1 -0
- package/lib/commonjs/domain/logic/host/findRootDomainForHost.d.ts +6 -0
- package/lib/commonjs/domain/logic/host/findRootDomainForHost.js +19 -0
- package/lib/commonjs/domain/logic/host/findRootDomainForHost.js.map +1 -0
- package/lib/commonjs/domain/logic/host/getDomainTargetKey.d.ts +3 -0
- package/lib/commonjs/domain/logic/host/getDomainTargetKey.js +7 -0
- package/lib/commonjs/domain/logic/host/getDomainTargetKey.js.map +1 -0
- package/lib/commonjs/domain/logic/host/index.d.ts +6 -0
- package/lib/commonjs/domain/logic/host/index.js +23 -0
- package/lib/commonjs/domain/logic/host/index.js.map +1 -0
- package/lib/commonjs/domain/logic/host/resolveHostForRequestHost.d.ts +9 -0
- package/lib/commonjs/domain/logic/host/resolveHostForRequestHost.js +21 -0
- package/lib/commonjs/domain/logic/host/resolveHostForRequestHost.js.map +1 -0
- package/lib/commonjs/domain/logic/host/resolveHostForRoot.d.ts +5 -0
- package/lib/commonjs/domain/logic/host/resolveHostForRoot.js +15 -0
- package/lib/commonjs/domain/logic/host/resolveHostForRoot.js.map +1 -0
- package/lib/commonjs/domain/logic/host/resolveHosts.d.ts +9 -0
- package/lib/commonjs/domain/logic/host/resolveHosts.js +27 -0
- package/lib/commonjs/domain/logic/host/resolveHosts.js.map +1 -0
- package/lib/commonjs/domain/logic/host/resolvePrimaryHost.d.ts +5 -0
- package/lib/commonjs/domain/logic/host/resolvePrimaryHost.js +14 -0
- package/lib/commonjs/domain/logic/host/resolvePrimaryHost.js.map +1 -0
- package/lib/commonjs/domain/logic/index.d.ts +3 -0
- package/lib/commonjs/domain/logic/index.js +20 -0
- package/lib/commonjs/domain/logic/index.js.map +1 -0
- package/lib/commonjs/domain/logic/origin/getStorageDriveCorsAllowedOrigins.d.ts +4 -0
- package/lib/commonjs/domain/logic/origin/getStorageDriveCorsAllowedOrigins.js +9 -0
- package/lib/commonjs/domain/logic/origin/getStorageDriveCorsAllowedOrigins.js.map +1 -0
- package/lib/commonjs/domain/logic/origin/index.d.ts +4 -0
- package/lib/commonjs/domain/logic/origin/index.js +21 -0
- package/lib/commonjs/domain/logic/origin/index.js.map +1 -0
- package/lib/commonjs/domain/logic/origin/resolveContentSecurityPolicyEntry.d.ts +9 -0
- package/lib/commonjs/domain/logic/origin/resolveContentSecurityPolicyEntry.js +20 -0
- package/lib/commonjs/domain/logic/origin/resolveContentSecurityPolicyEntry.js.map +1 -0
- package/lib/commonjs/domain/logic/origin/resolveOrigins.d.ts +8 -0
- package/lib/commonjs/domain/logic/origin/resolveOrigins.js +20 -0
- package/lib/commonjs/domain/logic/origin/resolveOrigins.js.map +1 -0
- package/lib/commonjs/domain/logic/origin/resolveServiceScopedCorsAllowedOrigins.d.ts +8 -0
- package/lib/commonjs/domain/logic/origin/resolveServiceScopedCorsAllowedOrigins.js +21 -0
- package/lib/commonjs/domain/logic/origin/resolveServiceScopedCorsAllowedOrigins.js.map +1 -0
- package/lib/commonjs/domain/logic/resolver/getDomainResolver.d.ts +4 -0
- package/lib/commonjs/domain/logic/resolver/getDomainResolver.js +20 -0
- package/lib/commonjs/domain/logic/resolver/getDomainResolver.js.map +1 -0
- package/lib/commonjs/domain/logic/resolver/index.d.ts +4 -0
- package/lib/commonjs/domain/logic/resolver/index.js +21 -0
- package/lib/commonjs/domain/logic/resolver/index.js.map +1 -0
- package/lib/commonjs/domain/logic/resolver/isLocalhostRootDomain.d.ts +2 -0
- package/lib/commonjs/domain/logic/resolver/isLocalhostRootDomain.js +7 -0
- package/lib/commonjs/domain/logic/resolver/isLocalhostRootDomain.js.map +1 -0
- package/lib/commonjs/domain/logic/resolver/loadDomainResolver.d.ts +8 -0
- package/lib/commonjs/domain/logic/resolver/loadDomainResolver.js +33 -0
- package/lib/commonjs/domain/logic/resolver/loadDomainResolver.js.map +1 -0
- package/lib/commonjs/domain/logic/resolver/validateResolvedHost.d.ts +3 -0
- package/lib/commonjs/domain/logic/resolver/validateResolvedHost.js +13 -0
- package/lib/commonjs/domain/logic/resolver/validateResolvedHost.js.map +1 -0
- package/lib/commonjs/domain/resolvers/defaultDomainResolver.d.ts +3 -0
- package/lib/commonjs/domain/resolvers/defaultDomainResolver.js +11 -0
- package/lib/commonjs/domain/resolvers/defaultDomainResolver.js.map +1 -0
- package/lib/commonjs/domain/resolvers/index.d.ts +2 -0
- package/lib/commonjs/domain/resolvers/index.js +19 -0
- package/lib/commonjs/domain/resolvers/index.js.map +1 -0
- package/lib/commonjs/domain/resolvers/localhostDomainResolver.d.ts +3 -0
- package/lib/commonjs/domain/resolvers/localhostDomainResolver.js +8 -0
- package/lib/commonjs/domain/resolvers/localhostDomainResolver.js.map +1 -0
- package/lib/commonjs/domain/types/DomainResolver.d.ts +10 -0
- package/lib/commonjs/domain/types/DomainResolver.js +3 -0
- package/lib/commonjs/domain/types/DomainResolver.js.map +1 -0
- package/lib/commonjs/domain/types/DomainScope.d.ts +13 -0
- package/lib/commonjs/domain/types/DomainScope.js +3 -0
- package/lib/commonjs/domain/types/DomainScope.js.map +1 -0
- package/lib/commonjs/domain/types/DomainTarget.d.ts +5 -0
- package/lib/commonjs/domain/types/DomainTarget.js +3 -0
- package/lib/commonjs/domain/types/DomainTarget.js.map +1 -0
- package/lib/commonjs/domain/types/index.d.ts +3 -0
- package/lib/commonjs/domain/types/index.js +20 -0
- package/lib/commonjs/domain/types/index.js.map +1 -0
- package/lib/commonjs/index.d.ts +1 -0
- package/lib/commonjs/index.js +1 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/stories/index.d.ts +0 -1
- package/lib/commonjs/stories/index.js +0 -1
- package/lib/commonjs/stories/index.js.map +1 -1
- package/lib/commonjs/types/OpenApiDocument.d.ts +60 -0
- package/lib/commonjs/types/OpenApiDocument.js +3 -0
- package/lib/commonjs/types/OpenApiDocument.js.map +1 -0
- package/lib/commonjs/types/index.d.ts +1 -0
- package/lib/commonjs/types/index.js +1 -0
- package/lib/commonjs/types/index.js.map +1 -1
- package/lib/commonjs/utils/headerUtils.d.ts +5 -4
- package/lib/commonjs/utils/headerUtils.js +16 -29
- package/lib/commonjs/utils/headerUtils.js.map +1 -1
- package/lib/commonjs/utils/index.d.ts +3 -0
- package/lib/commonjs/utils/index.js +3 -0
- package/lib/commonjs/utils/index.js.map +1 -1
- package/lib/commonjs/utils/mergeRouteUtils.js +3 -0
- package/lib/commonjs/utils/mergeRouteUtils.js.map +1 -1
- package/lib/commonjs/utils/openApi/OpenApiDocumentOptions.d.ts +2 -0
- package/lib/commonjs/utils/openApi/OpenApiDocumentOptions.js +3 -0
- package/lib/commonjs/utils/openApi/OpenApiDocumentOptions.js.map +1 -0
- package/lib/commonjs/utils/openApi/buildOpenApiDocument.d.ts +5 -0
- package/lib/commonjs/utils/openApi/buildOpenApiDocument.js +55 -0
- package/lib/commonjs/utils/openApi/buildOpenApiDocument.js.map +1 -0
- package/lib/commonjs/utils/openApi/buildOpenApiOperation.d.ts +4 -0
- package/lib/commonjs/utils/openApi/buildOpenApiOperation.js +45 -0
- package/lib/commonjs/utils/openApi/buildOpenApiOperation.js.map +1 -0
- package/lib/commonjs/utils/openApi/buildOpenApiPathParameters.d.ts +2 -0
- package/lib/commonjs/utils/openApi/buildOpenApiPathParameters.js +13 -0
- package/lib/commonjs/utils/openApi/buildOpenApiPathParameters.js.map +1 -0
- package/lib/commonjs/utils/openApi/buildOpenApiQueryParameters.d.ts +3 -0
- package/lib/commonjs/utils/openApi/buildOpenApiQueryParameters.js +25 -0
- package/lib/commonjs/utils/openApi/buildOpenApiQueryParameters.js.map +1 -0
- package/lib/commonjs/utils/openApi/buildOpenApiSecurity.d.ts +4 -0
- package/lib/commonjs/utils/openApi/buildOpenApiSecurity.js +24 -0
- package/lib/commonjs/utils/openApi/buildOpenApiSecurity.js.map +1 -0
- package/lib/commonjs/utils/openApi/index.d.ts +7 -0
- package/lib/commonjs/utils/openApi/index.js +24 -0
- package/lib/commonjs/utils/openApi/index.js.map +1 -0
- package/lib/commonjs/utils/openApi/openApiSecuritySchemeNames.d.ts +2 -0
- package/lib/commonjs/utils/openApi/openApiSecuritySchemeNames.js +7 -0
- package/lib/commonjs/utils/openApi/openApiSecuritySchemeNames.js.map +1 -0
- package/lib/commonjs/utils/qpqConfigAccessorsUtils.d.ts +1 -34
- package/lib/commonjs/utils/qpqConfigAccessorsUtils.js +7 -114
- package/lib/commonjs/utils/qpqConfigAccessorsUtils.js.map +1 -1
- package/lib/esm/actionProcessor/api/getHttpApiEventAutoRespondActionProcessor.js +6 -4
- package/lib/esm/actionProcessor/api/getHttpApiEventAutoRespondActionProcessor.js.map +1 -1
- package/lib/esm/actions/dns/DnsActionType.d.ts +3 -1
- package/lib/esm/actions/dns/DnsActionType.js +2 -0
- package/lib/esm/actions/dns/DnsActionType.js.map +1 -1
- package/lib/esm/actions/dns/askDnsList.d.ts +2 -1
- package/lib/esm/actions/dns/askDnsList.js +1 -0
- package/lib/esm/actions/dns/askDnsList.js.map +1 -1
- package/lib/esm/actions/dns/askDnsResolveHosts.d.ts +9 -0
- package/lib/esm/actions/dns/askDnsResolveHosts.js +8 -0
- package/lib/esm/actions/dns/askDnsResolveHosts.js.map +1 -0
- package/lib/esm/actions/dns/index.d.ts +1 -0
- package/lib/esm/actions/dns/index.js +1 -0
- package/lib/esm/actions/dns/index.js.map +1 -1
- package/lib/esm/actions/index.d.ts +1 -1
- package/lib/esm/actions/index.js +1 -1
- package/lib/esm/actions/index.js.map +1 -1
- package/lib/esm/actions/openApi/OpenApiActionType.d.ts +3 -0
- package/lib/esm/actions/openApi/OpenApiActionType.js +5 -0
- package/lib/esm/actions/openApi/OpenApiActionType.js.map +1 -0
- package/lib/esm/actions/openApi/askOpenApiGetDocument.d.ts +9 -0
- package/lib/esm/actions/openApi/askOpenApiGetDocument.js +9 -0
- package/lib/esm/actions/openApi/askOpenApiGetDocument.js.map +1 -0
- package/lib/esm/actions/openApi/index.d.ts +2 -0
- package/lib/esm/actions/openApi/index.js +3 -0
- package/lib/esm/actions/openApi/index.js.map +1 -0
- package/lib/esm/config/QPQConfig.d.ts +0 -1
- package/lib/esm/config/QPQConfig.js +0 -1
- package/lib/esm/config/QPQConfig.js.map +1 -1
- package/lib/esm/config/settings/api.d.ts +1 -2
- package/lib/esm/config/settings/api.js +1 -2
- package/lib/esm/config/settings/api.js.map +1 -1
- package/lib/esm/config/settings/dns.d.ts +15 -5
- package/lib/esm/config/settings/dns.js +10 -5
- package/lib/esm/config/settings/dns.js.map +1 -1
- package/lib/esm/config/settings/domainProxy.d.ts +0 -1
- package/lib/esm/config/settings/domainProxy.js.map +1 -1
- package/lib/esm/config/settings/emailSender.d.ts +3 -4
- package/lib/esm/config/settings/emailSender.js +5 -7
- package/lib/esm/config/settings/emailSender.js.map +1 -1
- package/lib/esm/config/settings/index.d.ts +0 -1
- package/lib/esm/config/settings/index.js +0 -1
- package/lib/esm/config/settings/index.js.map +1 -1
- package/lib/esm/config/settings/route.d.ts +2 -0
- package/lib/esm/config/settings/route.js.map +1 -1
- package/lib/esm/config/settings/webEntry.d.ts +0 -1
- package/lib/esm/config/settings/webEntry.js.map +1 -1
- package/lib/esm/config/settings/websocket.d.ts +1 -2
- package/lib/esm/config/settings/websocket.js +3 -12
- package/lib/esm/config/settings/websocket.js.map +1 -1
- package/lib/esm/config/types/JsonSchema.d.ts +1 -0
- package/lib/esm/config/types/JsonSchema.js +2 -0
- package/lib/esm/config/types/JsonSchema.js.map +1 -0
- package/lib/esm/config/types/RouteSchema.d.ts +10 -0
- package/lib/esm/config/types/RouteSchema.js +2 -0
- package/lib/esm/config/types/RouteSchema.js.map +1 -0
- package/lib/esm/config/types/index.d.ts +2 -0
- package/lib/esm/config/types/index.js +2 -0
- package/lib/esm/config/types/index.js.map +1 -1
- package/lib/esm/configUtils/dns/getDnsConfig.d.ts +4 -0
- package/lib/esm/configUtils/dns/getDnsConfig.js +11 -0
- package/lib/esm/configUtils/dns/getDnsConfig.js.map +1 -0
- package/lib/esm/configUtils/dns/getPrimaryRootDomain.d.ts +3 -0
- package/lib/esm/configUtils/dns/getPrimaryRootDomain.js +4 -0
- package/lib/esm/configUtils/dns/getPrimaryRootDomain.js.map +1 -0
- package/lib/esm/configUtils/dns/getRootDomains.d.ts +3 -0
- package/lib/esm/configUtils/dns/getRootDomains.js +4 -0
- package/lib/esm/configUtils/dns/getRootDomains.js.map +1 -0
- package/lib/esm/configUtils/dns/index.d.ts +3 -0
- package/lib/esm/configUtils/dns/index.js +4 -0
- package/lib/esm/configUtils/dns/index.js.map +1 -0
- package/lib/esm/configUtils/index.d.ts +2 -0
- package/lib/esm/configUtils/index.js +3 -0
- package/lib/esm/configUtils/index.js.map +1 -0
- package/lib/esm/configUtils/storageDrive/getStorageDriveCorsSettingsByName.d.ts +4 -0
- package/lib/esm/configUtils/storageDrive/getStorageDriveCorsSettingsByName.js +7 -0
- package/lib/esm/configUtils/storageDrive/getStorageDriveCorsSettingsByName.js.map +1 -0
- package/lib/esm/configUtils/storageDrive/index.d.ts +1 -0
- package/lib/esm/configUtils/storageDrive/index.js +2 -0
- package/lib/esm/configUtils/storageDrive/index.js.map +1 -0
- package/lib/esm/domain/index.d.ts +2 -0
- package/lib/esm/domain/index.js +3 -0
- package/lib/esm/domain/index.js.map +1 -0
- package/lib/esm/domain/logic/host/findRootDomainForHost.d.ts +6 -0
- package/lib/esm/domain/logic/host/findRootDomainForHost.js +14 -0
- package/lib/esm/domain/logic/host/findRootDomainForHost.js.map +1 -0
- package/lib/esm/domain/logic/host/getDomainTargetKey.d.ts +3 -0
- package/lib/esm/domain/logic/host/getDomainTargetKey.js +3 -0
- package/lib/esm/domain/logic/host/getDomainTargetKey.js.map +1 -0
- package/lib/esm/domain/logic/host/index.d.ts +6 -0
- package/lib/esm/domain/logic/host/index.js +7 -0
- package/lib/esm/domain/logic/host/index.js.map +1 -0
- package/lib/esm/domain/logic/host/resolveHostForRequestHost.d.ts +9 -0
- package/lib/esm/domain/logic/host/resolveHostForRequestHost.js +16 -0
- package/lib/esm/domain/logic/host/resolveHostForRequestHost.js.map +1 -0
- package/lib/esm/domain/logic/host/resolveHostForRoot.d.ts +5 -0
- package/lib/esm/domain/logic/host/resolveHostForRoot.js +11 -0
- package/lib/esm/domain/logic/host/resolveHostForRoot.js.map +1 -0
- package/lib/esm/domain/logic/host/resolveHosts.d.ts +9 -0
- package/lib/esm/domain/logic/host/resolveHosts.js +23 -0
- package/lib/esm/domain/logic/host/resolveHosts.js.map +1 -0
- package/lib/esm/domain/logic/host/resolvePrimaryHost.d.ts +5 -0
- package/lib/esm/domain/logic/host/resolvePrimaryHost.js +10 -0
- package/lib/esm/domain/logic/host/resolvePrimaryHost.js.map +1 -0
- package/lib/esm/domain/logic/index.d.ts +3 -0
- package/lib/esm/domain/logic/index.js +4 -0
- package/lib/esm/domain/logic/index.js.map +1 -0
- package/lib/esm/domain/logic/origin/getStorageDriveCorsAllowedOrigins.d.ts +4 -0
- package/lib/esm/domain/logic/origin/getStorageDriveCorsAllowedOrigins.js +5 -0
- package/lib/esm/domain/logic/origin/getStorageDriveCorsAllowedOrigins.js.map +1 -0
- package/lib/esm/domain/logic/origin/index.d.ts +4 -0
- package/lib/esm/domain/logic/origin/index.js +5 -0
- package/lib/esm/domain/logic/origin/index.js.map +1 -0
- package/lib/esm/domain/logic/origin/resolveContentSecurityPolicyEntry.d.ts +9 -0
- package/lib/esm/domain/logic/origin/resolveContentSecurityPolicyEntry.js +16 -0
- package/lib/esm/domain/logic/origin/resolveContentSecurityPolicyEntry.js.map +1 -0
- package/lib/esm/domain/logic/origin/resolveOrigins.d.ts +8 -0
- package/lib/esm/domain/logic/origin/resolveOrigins.js +16 -0
- package/lib/esm/domain/logic/origin/resolveOrigins.js.map +1 -0
- package/lib/esm/domain/logic/origin/resolveServiceScopedCorsAllowedOrigins.d.ts +8 -0
- package/lib/esm/domain/logic/origin/resolveServiceScopedCorsAllowedOrigins.js +17 -0
- package/lib/esm/domain/logic/origin/resolveServiceScopedCorsAllowedOrigins.js.map +1 -0
- package/lib/esm/domain/logic/resolver/getDomainResolver.d.ts +4 -0
- package/lib/esm/domain/logic/resolver/getDomainResolver.js +16 -0
- package/lib/esm/domain/logic/resolver/getDomainResolver.js.map +1 -0
- package/lib/esm/domain/logic/resolver/index.d.ts +4 -0
- package/lib/esm/domain/logic/resolver/index.js +5 -0
- package/lib/esm/domain/logic/resolver/index.js.map +1 -0
- package/lib/esm/domain/logic/resolver/isLocalhostRootDomain.d.ts +2 -0
- package/lib/esm/domain/logic/resolver/isLocalhostRootDomain.js +3 -0
- package/lib/esm/domain/logic/resolver/isLocalhostRootDomain.js.map +1 -0
- package/lib/esm/domain/logic/resolver/loadDomainResolver.d.ts +8 -0
- package/lib/esm/domain/logic/resolver/loadDomainResolver.js +19 -0
- package/lib/esm/domain/logic/resolver/loadDomainResolver.js.map +1 -0
- package/lib/esm/domain/logic/resolver/validateResolvedHost.d.ts +3 -0
- package/lib/esm/domain/logic/resolver/validateResolvedHost.js +9 -0
- package/lib/esm/domain/logic/resolver/validateResolvedHost.js.map +1 -0
- package/lib/esm/domain/resolvers/defaultDomainResolver.d.ts +3 -0
- package/lib/esm/domain/resolvers/defaultDomainResolver.js +8 -0
- package/lib/esm/domain/resolvers/defaultDomainResolver.js.map +1 -0
- package/lib/esm/domain/resolvers/index.d.ts +2 -0
- package/lib/esm/domain/resolvers/index.js +3 -0
- package/lib/esm/domain/resolvers/index.js.map +1 -0
- package/lib/esm/domain/resolvers/localhostDomainResolver.d.ts +3 -0
- package/lib/esm/domain/resolvers/localhostDomainResolver.js +5 -0
- package/lib/esm/domain/resolvers/localhostDomainResolver.js.map +1 -0
- package/lib/esm/domain/types/DomainResolver.d.ts +10 -0
- package/lib/esm/domain/types/DomainResolver.js +2 -0
- package/lib/esm/domain/types/DomainResolver.js.map +1 -0
- package/lib/esm/domain/types/DomainScope.d.ts +13 -0
- package/lib/esm/domain/types/DomainScope.js +2 -0
- package/lib/esm/domain/types/DomainScope.js.map +1 -0
- package/lib/esm/domain/types/DomainTarget.d.ts +5 -0
- package/lib/esm/domain/types/DomainTarget.js +2 -0
- package/lib/esm/domain/types/DomainTarget.js.map +1 -0
- package/lib/esm/domain/types/index.d.ts +3 -0
- package/lib/esm/domain/types/index.js +4 -0
- package/lib/esm/domain/types/index.js.map +1 -0
- package/lib/esm/index.d.ts +1 -0
- package/lib/esm/index.js +1 -0
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/stories/index.d.ts +0 -1
- package/lib/esm/stories/index.js +0 -1
- package/lib/esm/stories/index.js.map +1 -1
- package/lib/esm/types/OpenApiDocument.d.ts +60 -0
- package/lib/esm/types/OpenApiDocument.js +2 -0
- package/lib/esm/types/OpenApiDocument.js.map +1 -0
- package/lib/esm/types/index.d.ts +1 -0
- package/lib/esm/types/index.js +1 -0
- package/lib/esm/types/index.js.map +1 -1
- package/lib/esm/utils/headerUtils.d.ts +5 -4
- package/lib/esm/utils/headerUtils.js +16 -28
- package/lib/esm/utils/headerUtils.js.map +1 -1
- package/lib/esm/utils/index.d.ts +3 -0
- package/lib/esm/utils/index.js +3 -0
- package/lib/esm/utils/index.js.map +1 -1
- package/lib/esm/utils/mergeRouteUtils.js +2 -0
- package/lib/esm/utils/mergeRouteUtils.js.map +1 -1
- package/lib/esm/utils/openApi/OpenApiDocumentOptions.d.ts +2 -0
- package/lib/esm/utils/openApi/OpenApiDocumentOptions.js +2 -0
- package/lib/esm/utils/openApi/OpenApiDocumentOptions.js.map +1 -0
- package/lib/esm/utils/openApi/buildOpenApiDocument.d.ts +5 -0
- package/lib/esm/utils/openApi/buildOpenApiDocument.js +50 -0
- package/lib/esm/utils/openApi/buildOpenApiDocument.js.map +1 -0
- package/lib/esm/utils/openApi/buildOpenApiOperation.d.ts +4 -0
- package/lib/esm/utils/openApi/buildOpenApiOperation.js +40 -0
- package/lib/esm/utils/openApi/buildOpenApiOperation.js.map +1 -0
- package/lib/esm/utils/openApi/buildOpenApiPathParameters.d.ts +2 -0
- package/lib/esm/utils/openApi/buildOpenApiPathParameters.js +9 -0
- package/lib/esm/utils/openApi/buildOpenApiPathParameters.js.map +1 -0
- package/lib/esm/utils/openApi/buildOpenApiQueryParameters.d.ts +3 -0
- package/lib/esm/utils/openApi/buildOpenApiQueryParameters.js +21 -0
- package/lib/esm/utils/openApi/buildOpenApiQueryParameters.js.map +1 -0
- package/lib/esm/utils/openApi/buildOpenApiSecurity.d.ts +4 -0
- package/lib/esm/utils/openApi/buildOpenApiSecurity.js +19 -0
- package/lib/esm/utils/openApi/buildOpenApiSecurity.js.map +1 -0
- package/lib/esm/utils/openApi/index.d.ts +7 -0
- package/lib/esm/utils/openApi/index.js +8 -0
- package/lib/esm/utils/openApi/index.js.map +1 -0
- package/lib/esm/utils/openApi/openApiSecuritySchemeNames.d.ts +2 -0
- package/lib/esm/utils/openApi/openApiSecuritySchemeNames.js +4 -0
- package/lib/esm/utils/openApi/openApiSecuritySchemeNames.js.map +1 -0
- package/lib/esm/utils/qpqConfigAccessorsUtils.d.ts +1 -34
- package/lib/esm/utils/qpqConfigAccessorsUtils.js +5 -100
- package/lib/esm/utils/qpqConfigAccessorsUtils.js.map +1 -1
- package/package.json +3 -3
- package/lib/commonjs/actions/openApiSpec/OpenApiSpecActionType.d.ts +0 -3
- package/lib/commonjs/actions/openApiSpec/OpenApiSpecActionType.js +0 -8
- package/lib/commonjs/actions/openApiSpec/OpenApiSpecActionType.js.map +0 -1
- package/lib/commonjs/actions/openApiSpec/askGetOpenApiSpec.d.ts +0 -2
- package/lib/commonjs/actions/openApiSpec/askGetOpenApiSpec.js +0 -9
- package/lib/commonjs/actions/openApiSpec/askGetOpenApiSpec.js.map +0 -1
- package/lib/commonjs/actions/openApiSpec/index.d.ts +0 -2
- package/lib/commonjs/actions/openApiSpec/index.js.map +0 -1
- package/lib/commonjs/config/settings/openApi.d.ts +0 -5
- package/lib/commonjs/config/settings/openApi.js +0 -13
- package/lib/commonjs/config/settings/openApi.js.map +0 -1
- package/lib/commonjs/stories/askGetDomainRoot.d.ts +0 -2
- package/lib/commonjs/stories/askGetDomainRoot.js +0 -22
- package/lib/commonjs/stories/askGetDomainRoot.js.map +0 -1
- package/lib/esm/actions/openApiSpec/OpenApiSpecActionType.d.ts +0 -3
- package/lib/esm/actions/openApiSpec/OpenApiSpecActionType.js +0 -5
- package/lib/esm/actions/openApiSpec/OpenApiSpecActionType.js.map +0 -1
- package/lib/esm/actions/openApiSpec/askGetOpenApiSpec.d.ts +0 -2
- package/lib/esm/actions/openApiSpec/askGetOpenApiSpec.js +0 -6
- package/lib/esm/actions/openApiSpec/askGetOpenApiSpec.js.map +0 -1
- package/lib/esm/actions/openApiSpec/index.d.ts +0 -2
- package/lib/esm/actions/openApiSpec/index.js +0 -3
- package/lib/esm/actions/openApiSpec/index.js.map +0 -1
- package/lib/esm/config/settings/openApi.d.ts +0 -5
- package/lib/esm/config/settings/openApi.js +0 -9
- package/lib/esm/config/settings/openApi.js.map +0 -1
- package/lib/esm/stories/askGetDomainRoot.d.ts +0 -2
- package/lib/esm/stories/askGetDomainRoot.js +0 -18
- package/lib/esm/stories/askGetDomainRoot.js.map +0 -1
package/README.md
CHANGED
|
@@ -21,10 +21,9 @@ npm install quidproquo-webserver
|
|
|
21
21
|
| `dns` | Record lookups and management |
|
|
22
22
|
| `serviceFunction` | Invoking a function on another service |
|
|
23
23
|
| `routeAuthValidation`, `apiKeyValidation` | Auth and api key checks in front of a route |
|
|
24
|
-
| `openApiSpec` | Generating and serving an OpenAPI document |
|
|
25
24
|
| `genericDataResource`, `admin` | Data resources and the admin surface |
|
|
26
25
|
|
|
27
|
-
**Config settings** in `src/config/settings/`, the `define*` helpers you compose into a service config: `defineRoute`, `defineApi`, `defineWebEntry`, `defineWebsocket`, `defineDns`, `defineCertificate`, `defineEmailSender`, `defineApiKey`, `
|
|
26
|
+
**Config settings** in `src/config/settings/`, the `define*` helpers you compose into a service config: `defineRoute`, `defineApi`, `defineWebEntry`, `defineWebsocket`, `defineDns`, `defineCertificate`, `defineEmailSender`, `defineApiKey`, `defineCache`, `defineSeo`, `defineSeed`, `defineMigration`, `defineDomainProxy`, `defineSubdomainRedirect`, `defineServiceFunction`, and the auth system helpers.
|
|
28
27
|
|
|
29
28
|
A service config is a plain array. The deploy packages read it to build infrastructure, and the dev server reads the same array to run the service locally.
|
|
30
29
|
|
|
@@ -11,6 +11,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.getHttpApiEventAutoRespondActionProcessor = void 0;
|
|
13
13
|
const quidproquo_core_1 = require("quidproquo-core");
|
|
14
|
+
const loadDomainResolver_1 = require("../../domain/logic/resolver/loadDomainResolver");
|
|
14
15
|
const askValidateRouteAuth_1 = require("../../stories/askValidateRouteAuth");
|
|
15
16
|
const HTTPEvent_1 = require("../../types/HTTPEvent");
|
|
16
17
|
const headerUtils_1 = require("../../utils/headerUtils");
|
|
@@ -21,7 +22,8 @@ const fileUploadErrorHttpStatusMap = {
|
|
|
21
22
|
[HTTPEvent_1.FileUploadErrorTypeEnum.disallowedMimeType]: 415,
|
|
22
23
|
[HTTPEvent_1.FileUploadErrorTypeEnum.malformed]: 400,
|
|
23
24
|
};
|
|
24
|
-
const getProcessAutoRespond = (qpqConfig) => {
|
|
25
|
+
const getProcessAutoRespond = (qpqConfig, loader) => __awaiter(void 0, void 0, void 0, function* () {
|
|
26
|
+
const domainResolver = yield (0, loadDomainResolver_1.loadDomainResolver)(qpqConfig, loader);
|
|
25
27
|
const validateAuth = (0, quidproquo_core_1.getProcessCustomImplementation)(qpqConfig, askValidateRouteAuth_1.askValidateRouteAuth, 'API Auth Validation', null, () => new Date().toISOString(), quidproquo_core_1.generateUuid);
|
|
26
28
|
return (_a, session_1, actionProcessorList_1, logger_1, updateSession_1, dynamicModuleLoader_1) => __awaiter(void 0, [_a, session_1, actionProcessorList_1, logger_1, updateSession_1, dynamicModuleLoader_1], void 0, function* ({ qpqEventRecord: rawEventRecord, matchResult }, session, actionProcessorList, logger, updateSession, dynamicModuleLoader) {
|
|
27
29
|
var _b;
|
|
@@ -34,7 +36,7 @@ const getProcessAutoRespond = (qpqConfig) => {
|
|
|
34
36
|
status: 200,
|
|
35
37
|
isBase64Encoded: false,
|
|
36
38
|
body: '',
|
|
37
|
-
headers: (0, headerUtils_1.getCorsHeaders)(qpqConfig, matchResult.config || {}, qpqEventRecord.headers),
|
|
39
|
+
headers: (0, headerUtils_1.getCorsHeaders)(qpqConfig, matchResult.config || {}, qpqEventRecord.headers, domainResolver),
|
|
38
40
|
});
|
|
39
41
|
}
|
|
40
42
|
const authPayload = {
|
|
@@ -53,7 +55,7 @@ const getProcessAutoRespond = (qpqConfig) => {
|
|
|
53
55
|
body: JSON.stringify({
|
|
54
56
|
message: 'You are unauthorized to access this resource',
|
|
55
57
|
}),
|
|
56
|
-
headers: (0, headerUtils_1.getCorsHeaders)(qpqConfig, matchResult.config || {}, qpqEventRecord.headers),
|
|
58
|
+
headers: (0, headerUtils_1.getCorsHeaders)(qpqConfig, matchResult.config || {}, qpqEventRecord.headers, domainResolver),
|
|
57
59
|
});
|
|
58
60
|
}
|
|
59
61
|
// Reject invalid multipart uploads before the route story runs (after auth, so a 401 wins)
|
|
@@ -65,11 +67,11 @@ const getProcessAutoRespond = (qpqConfig) => {
|
|
|
65
67
|
errorType: qpqEventRecord.fileUploadError.errorType,
|
|
66
68
|
errorText: qpqEventRecord.fileUploadError.message,
|
|
67
69
|
}),
|
|
68
|
-
headers: (0, headerUtils_1.getCorsHeaders)(qpqConfig, matchResult.config || {}, qpqEventRecord.headers),
|
|
70
|
+
headers: (0, headerUtils_1.getCorsHeaders)(qpqConfig, matchResult.config || {}, qpqEventRecord.headers, domainResolver),
|
|
69
71
|
});
|
|
70
72
|
}
|
|
71
73
|
return (0, quidproquo_core_1.actionResult)(null);
|
|
72
74
|
});
|
|
73
|
-
};
|
|
75
|
+
});
|
|
74
76
|
exports.getHttpApiEventAutoRespondActionProcessor = (0, quidproquo_core_1.createActionProcessor)(quidproquo_core_1.askEventAutoRespondBase, getProcessAutoRespond);
|
|
75
77
|
//# sourceMappingURL=getHttpApiEventAutoRespondActionProcessor.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getHttpApiEventAutoRespondActionProcessor.js","sourceRoot":"","sources":["../../../../src/actionProcessor/api/getHttpApiEventAutoRespondActionProcessor.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"getHttpApiEventAutoRespondActionProcessor.js","sourceRoot":"","sources":["../../../../src/actionProcessor/api/getHttpApiEventAutoRespondActionProcessor.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAYyB;AAGzB,uFAAoF;AACpF,6EAAoG;AACpG,qDAA8F;AAC9F,yDAAyD;AAIzD,MAAM,4BAA4B,GAA4C;IAC5E,CAAC,mCAAuB,CAAC,YAAY,CAAC,EAAE,GAAG;IAC3C,CAAC,mCAAuB,CAAC,YAAY,CAAC,EAAE,GAAG;IAC3C,CAAC,mCAAuB,CAAC,aAAa,CAAC,EAAE,GAAG;IAC5C,CAAC,mCAAuB,CAAC,kBAAkB,CAAC,EAAE,GAAG;IACjD,CAAC,mCAAuB,CAAC,SAAS,CAAC,EAAE,GAAG;CACzC,CAAC;AAEF,MAAM,qBAAqB,GAAG,CAAO,SAAoB,EAAE,MAA2B,EAAyD,EAAE;IAC/I,MAAM,cAAc,GAAG,MAAM,IAAA,uCAAkB,EAAC,SAAS,EAAE,MAAM,CAAC,CAAC;IAEnE,MAAM,YAAY,GAAG,IAAA,gDAA8B,EACjD,SAAS,EACT,2CAAoB,EACpB,qBAAqB,EACrB,IAAI,EACJ,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,EAC9B,8BAAY,CACb,CAAC;IAEF,OAAO,yFAAkI,EAAE,gIAA7H,EAAE,cAAc,EAAE,cAAc,EAAE,WAAW,EAAE,EAAE,OAAO,EAAE,mBAAmB,EAAE,MAAM,EAAE,aAAa,EAAE,mBAAmB;;QACrI,iFAAiF;QACjF,+CAA+C;QAC/C,MAAM,cAAc,GAAG,cAA2B,CAAC;QACnD,yCAAyC;QACzC,IAAI,cAAc,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;YACxC,OAAO,IAAA,8BAAY,EAAC;gBAClB,MAAM,EAAE,GAAG;gBACX,eAAe,EAAE,KAAK;gBACtB,IAAI,EAAE,EAAE;gBACR,OAAO,EAAE,IAAA,4BAAc,EAAC,SAAS,EAAE,WAAW,CAAC,MAAM,IAAI,EAAE,EAAE,cAAc,CAAC,OAAO,EAAE,cAAc,CAAC;aACrG,CAAC,CAAC;QACL,CAAC;QAED,MAAM,WAAW,GAA6B;YAC5C,KAAK,EAAE,cAAc;YACrB,iBAAiB,EAAE,MAAA,WAAW,CAAC,MAAM,0CAAE,iBAAiB;SACzD,CAAC;QAEF,uEAAuE;QACvE,0EAA0E;QAC1E,yEAAyE;QACzE,MAAM,yBAAyB,GAAG,MAAM,IAAA,8CAA4B,EAAC,SAAS,EAAE,WAAW,CAAC,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,CAAC,CAAC;QAE/I,MAAM,CAAC,SAAS,EAAE,SAAS,CAAC,GAAG,MAAM,YAAY,CAAC,WAAW,EAAE,OAAO,EAAE,yBAAyB,EAAE,MAAM,EAAE,aAAa,EAAE,mBAAmB,CAAC,CAAC;QAE/I,IAAI,SAAS,IAAI,CAAC,SAAS,EAAE,CAAC;YAC5B,OAAO,IAAA,8BAAY,EAAC;gBAClB,MAAM,EAAE,GAAG;gBACX,eAAe,EAAE,KAAK;gBACtB,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;oBACnB,OAAO,EAAE,8CAA8C;iBACxD,CAAC;gBACF,OAAO,EAAE,IAAA,4BAAc,EAAC,SAAS,EAAE,WAAW,CAAC,MAAM,IAAI,EAAE,EAAE,cAAc,CAAC,OAAO,EAAE,cAAc,CAAC;aACrG,CAAC,CAAC;QACL,CAAC;QAED,2FAA2F;QAC3F,IAAI,cAAc,CAAC,eAAe,EAAE,CAAC;YACnC,OAAO,IAAA,8BAAY,EAAC;gBAClB,MAAM,EAAE,4BAA4B,CAAC,cAAc,CAAC,eAAe,CAAC,SAAS,CAAC,IAAI,GAAG;gBACrF,eAAe,EAAE,KAAK;gBACtB,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;oBACnB,SAAS,EAAE,cAAc,CAAC,eAAe,CAAC,SAAS;oBACnD,SAAS,EAAE,cAAc,CAAC,eAAe,CAAC,OAAO;iBAClD,CAAC;gBACF,OAAO,EAAE,IAAA,4BAAc,EAAC,SAAS,EAAE,WAAW,CAAC,MAAM,IAAI,EAAE,EAAE,cAAc,CAAC,OAAO,EAAE,cAAc,CAAC;aACrG,CAAC,CAAC;QACL,CAAC;QAED,OAAO,IAAA,8BAAY,EAAC,IAAI,CAAC,CAAC;IAC5B,CAAC,CAAA,CAAC;AACJ,CAAC,CAAA,CAAC;AAEW,QAAA,yCAAyC,GAAG,IAAA,uCAAqB,EAAC,yCAAuB,EAAE,qBAAqB,CAAC,CAAC","sourcesContent":["import {\n actionResult,\n askEventAutoRespondBase,\n createActionProcessor,\n DynamicModuleLoader,\n EventActionType,\n generateUuid,\n getProcessCustomImplementation,\n MatchStoryResult,\n mergeRuntimeActionProcessors,\n ProcessorFor,\n QPQConfig,\n} from 'quidproquo-core';\n\nimport { RouteOptions } from '../../config/settings/route';\nimport { loadDomainResolver } from '../../domain/logic/resolver/loadDomainResolver';\nimport { askValidateRouteAuth, ValidateRouteAuthPayload } from '../../stories/askValidateRouteAuth';\nimport { FileUploadErrorTypeEnum, HTTPEvent, HTTPEventResponse } from '../../types/HTTPEvent';\nimport { getCorsHeaders } from '../../utils/headerUtils';\n\ntype InternalMatchResult = MatchStoryResult<any, RouteOptions>;\n\nconst fileUploadErrorHttpStatusMap: Record<FileUploadErrorTypeEnum, number> = {\n [FileUploadErrorTypeEnum.fileTooLarge]: 413,\n [FileUploadErrorTypeEnum.tooManyFiles]: 413,\n [FileUploadErrorTypeEnum.tooManyFields]: 400,\n [FileUploadErrorTypeEnum.disallowedMimeType]: 415,\n [FileUploadErrorTypeEnum.malformed]: 400,\n};\n\nconst getProcessAutoRespond = async (qpqConfig: QPQConfig, loader: DynamicModuleLoader): Promise<ProcessorFor<typeof askEventAutoRespondBase>> => {\n const domainResolver = await loadDomainResolver(qpqConfig, loader);\n\n const validateAuth = getProcessCustomImplementation<any>(\n qpqConfig,\n askValidateRouteAuth,\n 'API Auth Validation',\n null,\n () => new Date().toISOString(),\n generateUuid,\n );\n\n return async ({ qpqEventRecord: rawEventRecord, matchResult }, session, actionProcessorList, logger, updateSession, dynamicModuleLoader) => {\n // This processor is registered only for the http api event source, so the base's\n // source-agnostic record is an HTTPEvent here.\n const qpqEventRecord = rawEventRecord as HTTPEvent;\n // Just auto respond for options requests\n if (qpqEventRecord.method === 'OPTIONS') {\n return actionResult({\n status: 200,\n isBase64Encoded: false,\n body: '',\n headers: getCorsHeaders(qpqConfig, matchResult.config || {}, qpqEventRecord.headers, domainResolver),\n });\n }\n\n const authPayload: ValidateRouteAuthPayload = {\n event: qpqEventRecord,\n routeAuthSettings: matchResult.config?.routeAuthSettings,\n };\n\n // The matched route's processor overrides must be visible HERE, in the\n // framework preamble: auth decode runs before the route story, so without\n // this merge a per-route auth override would never see its own requests.\n const mergedActionProcessorList = await mergeRuntimeActionProcessors(qpqConfig, matchResult.runtime, actionProcessorList, dynamicModuleLoader);\n\n const [authValid, authError] = await validateAuth(authPayload, session, mergedActionProcessorList, logger, updateSession, dynamicModuleLoader);\n\n if (authError || !authValid) {\n return actionResult({\n status: 401,\n isBase64Encoded: false,\n body: JSON.stringify({\n message: 'You are unauthorized to access this resource',\n }),\n headers: getCorsHeaders(qpqConfig, matchResult.config || {}, qpqEventRecord.headers, domainResolver),\n });\n }\n\n // Reject invalid multipart uploads before the route story runs (after auth, so a 401 wins)\n if (qpqEventRecord.fileUploadError) {\n return actionResult({\n status: fileUploadErrorHttpStatusMap[qpqEventRecord.fileUploadError.errorType] || 400,\n isBase64Encoded: false,\n body: JSON.stringify({\n errorType: qpqEventRecord.fileUploadError.errorType,\n errorText: qpqEventRecord.fileUploadError.message,\n }),\n headers: getCorsHeaders(qpqConfig, matchResult.config || {}, qpqEventRecord.headers, domainResolver),\n });\n }\n\n return actionResult(null);\n };\n};\n\nexport const getHttpApiEventAutoRespondActionProcessor = createActionProcessor(askEventAutoRespondBase, getProcessAutoRespond);\n"]}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.DnsActionType = void 0;
|
|
4
|
+
/** Action types for reading the service's declared domains from a story. */
|
|
4
5
|
var DnsActionType;
|
|
5
6
|
(function (DnsActionType) {
|
|
6
7
|
DnsActionType["List"] = "@quidproquo-webserver/Dns/List";
|
|
8
|
+
DnsActionType["ResolveHosts"] = "@quidproquo-webserver/Dns/ResolveHosts";
|
|
7
9
|
})(DnsActionType || (exports.DnsActionType = DnsActionType = {}));
|
|
8
10
|
//# sourceMappingURL=DnsActionType.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DnsActionType.js","sourceRoot":"","sources":["../../../../src/actions/dns/DnsActionType.ts"],"names":[],"mappings":";;;AAAA,IAAY,
|
|
1
|
+
{"version":3,"file":"DnsActionType.js","sourceRoot":"","sources":["../../../../src/actions/dns/DnsActionType.ts"],"names":[],"mappings":";;;AAAA,4EAA4E;AAC5E,IAAY,aAGX;AAHD,WAAY,aAAa;IACvB,wDAAuC,CAAA;IACvC,wEAAuD,CAAA;AACzD,CAAC,EAHW,aAAa,6BAAb,aAAa,QAGxB","sourcesContent":["/** Action types for reading the service's declared domains from a story. */\nexport enum DnsActionType {\n List = '@quidproquo-webserver/Dns/List',\n ResolveHosts = '@quidproquo-webserver/Dns/ResolveHosts',\n}\n"]}
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
import { DnsActionType } from './DnsActionType';
|
|
2
|
-
|
|
2
|
+
/** The root domains the service declared with defineDns, primary first; empty without a domain. */
|
|
3
|
+
export declare const askDnsList: import("quidproquo-core").ActionRequesterFunction<DnsActionType.List, [], undefined, string[], never>;
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.askDnsList = void 0;
|
|
4
4
|
const quidproquo_core_1 = require("quidproquo-core");
|
|
5
5
|
const DnsActionType_1 = require("./DnsActionType");
|
|
6
|
+
/** The root domains the service declared with defineDns, primary first; empty without a domain. */
|
|
6
7
|
exports.askDnsList = (0, quidproquo_core_1.createActionRequester)()({
|
|
7
8
|
actionType: DnsActionType_1.DnsActionType.List,
|
|
8
9
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"askDnsList.js","sourceRoot":"","sources":["../../../../src/actions/dns/askDnsList.ts"],"names":[],"mappings":";;;AAAA,qDAAwD;AAExD,mDAAgD;
|
|
1
|
+
{"version":3,"file":"askDnsList.js","sourceRoot":"","sources":["../../../../src/actions/dns/askDnsList.ts"],"names":[],"mappings":";;;AAAA,qDAAwD;AAExD,mDAAgD;AAEhD,mGAAmG;AACtF,QAAA,UAAU,GAAG,IAAA,uCAAqB,GAAY,CAAC;IAC1D,UAAU,EAAE,6BAAa,CAAC,IAAI;CAC/B,CAAC,CAAC","sourcesContent":["import { createActionRequester } from 'quidproquo-core';\n\nimport { DnsActionType } from './DnsActionType';\n\n/** The root domains the service declared with defineDns, primary first; empty without a domain. */\nexport const askDnsList = createActionRequester<string[]>()({\n actionType: DnsActionType.List,\n});\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Action } from 'quidproquo-core';
|
|
2
|
+
import { DomainTarget } from '../../domain/types/DomainTarget';
|
|
3
|
+
import { DnsActionType } from './DnsActionType';
|
|
4
|
+
export interface DnsResolveHostsAction extends Action<DomainTarget> {
|
|
5
|
+
type: DnsActionType.ResolveHosts;
|
|
6
|
+
payload: DomainTarget;
|
|
7
|
+
}
|
|
8
|
+
/** Hosts for a target on every root, primary first. Only targets declared in config resolve; others throw. */
|
|
9
|
+
export declare const askDnsResolveHosts: import("quidproquo-core").ActionRequesterFunction<DnsActionType.ResolveHosts, [target?: DomainTarget | undefined], DomainTarget, string[], never>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.askDnsResolveHosts = void 0;
|
|
4
|
+
const quidproquo_core_1 = require("quidproquo-core");
|
|
5
|
+
const DnsActionType_1 = require("./DnsActionType");
|
|
6
|
+
/** Hosts for a target on every root, primary first. Only targets declared in config resolve; others throw. */
|
|
7
|
+
exports.askDnsResolveHosts = (0, quidproquo_core_1.createActionRequester)()({
|
|
8
|
+
actionType: DnsActionType_1.DnsActionType.ResolveHosts,
|
|
9
|
+
getPayload: (target = {}) => target,
|
|
10
|
+
});
|
|
11
|
+
//# sourceMappingURL=askDnsResolveHosts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"askDnsResolveHosts.js","sourceRoot":"","sources":["../../../../src/actions/dns/askDnsResolveHosts.ts"],"names":[],"mappings":";;;AAAA,qDAAgE;AAGhE,mDAAgD;AAOhD,8GAA8G;AACjG,QAAA,kBAAkB,GAAG,IAAA,uCAAqB,GAAY,CAAC;IAClE,UAAU,EAAE,6BAAa,CAAC,YAAY;IACtC,UAAU,EAAE,CAAC,SAAuB,EAAE,EAAE,EAAE,CAAC,MAAM;CAClD,CAAC,CAAC","sourcesContent":["import { Action, createActionRequester } from 'quidproquo-core';\n\nimport { DomainTarget } from '../../domain/types/DomainTarget';\nimport { DnsActionType } from './DnsActionType';\n\nexport interface DnsResolveHostsAction extends Action<DomainTarget> {\n type: DnsActionType.ResolveHosts;\n payload: DomainTarget;\n}\n\n/** Hosts for a target on every root, primary first. Only targets declared in config resolve; others throw. */\nexport const askDnsResolveHosts = createActionRequester<string[]>()({\n actionType: DnsActionType.ResolveHosts,\n getPayload: (target: DomainTarget = {}) => target,\n});\n"]}
|
|
@@ -15,5 +15,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./askDnsList"), exports);
|
|
18
|
+
__exportStar(require("./askDnsResolveHosts"), exports);
|
|
18
19
|
__exportStar(require("./DnsActionType"), exports);
|
|
19
20
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/actions/dns/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,kDAAgC","sourcesContent":["export * from './askDnsList';\nexport * from './DnsActionType';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/actions/dns/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,uDAAqC;AACrC,kDAAgC","sourcesContent":["export * from './askDnsList';\nexport * from './askDnsResolveHosts';\nexport * from './DnsActionType';\n"]}
|
|
@@ -4,7 +4,7 @@ export * from './apiKeyValidation';
|
|
|
4
4
|
export * from './dns';
|
|
5
5
|
export * from './email';
|
|
6
6
|
export * from './genericDataResource';
|
|
7
|
-
export * from './
|
|
7
|
+
export * from './openApi';
|
|
8
8
|
export * from './routeAuthValidation';
|
|
9
9
|
export * from './serviceFunction';
|
|
10
10
|
export * from './webEntry';
|
|
@@ -20,7 +20,7 @@ __exportStar(require("./apiKeyValidation"), exports);
|
|
|
20
20
|
__exportStar(require("./dns"), exports);
|
|
21
21
|
__exportStar(require("./email"), exports);
|
|
22
22
|
__exportStar(require("./genericDataResource"), exports);
|
|
23
|
-
__exportStar(require("./
|
|
23
|
+
__exportStar(require("./openApi"), exports);
|
|
24
24
|
__exportStar(require("./routeAuthValidation"), exports);
|
|
25
25
|
__exportStar(require("./serviceFunction"), exports);
|
|
26
26
|
__exportStar(require("./webEntry"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/actions/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,wCAAsB;AACtB,qDAAmC;AACnC,wCAAsB;AACtB,0CAAwB;AACxB,wDAAsC;AACtC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/actions/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,wCAAsB;AACtB,qDAAmC;AACnC,wCAAsB;AACtB,0CAAwB;AACxB,wDAAsC;AACtC,4CAA0B;AAC1B,wDAAsC;AACtC,oDAAkC;AAClC,6CAA2B;AAC3B,8CAA4B","sourcesContent":["export * from './admin';\nexport * from './api';\nexport * from './apiKeyValidation';\nexport * from './dns';\nexport * from './email';\nexport * from './genericDataResource';\nexport * from './openApi';\nexport * from './routeAuthValidation';\nexport * from './serviceFunction';\nexport * from './webEntry';\nexport * from './websocket';\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OpenApiActionType = void 0;
|
|
4
|
+
var OpenApiActionType;
|
|
5
|
+
(function (OpenApiActionType) {
|
|
6
|
+
OpenApiActionType["GetDocument"] = "@quidproquo-webserver/OpenApi/GetDocument";
|
|
7
|
+
})(OpenApiActionType || (exports.OpenApiActionType = OpenApiActionType = {}));
|
|
8
|
+
//# sourceMappingURL=OpenApiActionType.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OpenApiActionType.js","sourceRoot":"","sources":["../../../../src/actions/openApi/OpenApiActionType.ts"],"names":[],"mappings":";;;AAAA,IAAY,iBAEX;AAFD,WAAY,iBAAiB;IAC3B,8EAAyD,CAAA;AAC3D,CAAC,EAFW,iBAAiB,iCAAjB,iBAAiB,QAE5B","sourcesContent":["export enum OpenApiActionType {\n GetDocument = '@quidproquo-webserver/OpenApi/GetDocument',\n}\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { OpenApiDocument } from '../../types/OpenApiDocument';
|
|
2
|
+
import { OpenApiDocumentOptions } from '../../utils/openApi/OpenApiDocumentOptions';
|
|
3
|
+
import { OpenApiActionType } from './OpenApiActionType';
|
|
4
|
+
export type OpenApiGetDocumentActionPayload = {
|
|
5
|
+
options: OpenApiDocumentOptions;
|
|
6
|
+
};
|
|
7
|
+
export declare const askOpenApiGetDocument: import("quidproquo-core").ActionRequesterFunction<OpenApiActionType, [options?: Partial<import("../../types/OpenApiDocument").OpenApiInfo> | undefined], {
|
|
8
|
+
options: Partial<import("../../types/OpenApiDocument").OpenApiInfo>;
|
|
9
|
+
}, OpenApiDocument, never>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.askOpenApiGetDocument = void 0;
|
|
4
|
+
const quidproquo_core_1 = require("quidproquo-core");
|
|
5
|
+
const OpenApiActionType_1 = require("./OpenApiActionType");
|
|
6
|
+
// Stories never see the service config, so building the document is an action:
|
|
7
|
+
// the processor holds the config and does the walk.
|
|
8
|
+
exports.askOpenApiGetDocument = (0, quidproquo_core_1.createActionRequester)()({
|
|
9
|
+
actionType: OpenApiActionType_1.OpenApiActionType.GetDocument,
|
|
10
|
+
getPayload: (options = {}) => ({ options }),
|
|
11
|
+
});
|
|
12
|
+
//# sourceMappingURL=askOpenApiGetDocument.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"askOpenApiGetDocument.js","sourceRoot":"","sources":["../../../../src/actions/openApi/askOpenApiGetDocument.ts"],"names":[],"mappings":";;;AAAA,qDAAwD;AAIxD,2DAAwD;AAMxD,+EAA+E;AAC/E,oDAAoD;AACvC,QAAA,qBAAqB,GAAG,IAAA,uCAAqB,GAAmB,CAAC;IAC5E,UAAU,EAAE,qCAAiB,CAAC,WAAW;IACzC,UAAU,EAAE,CAAC,UAAkC,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC;CACpE,CAAC,CAAC","sourcesContent":["import { createActionRequester } from 'quidproquo-core';\n\nimport { OpenApiDocument } from '../../types/OpenApiDocument';\nimport { OpenApiDocumentOptions } from '../../utils/openApi/OpenApiDocumentOptions';\nimport { OpenApiActionType } from './OpenApiActionType';\n\nexport type OpenApiGetDocumentActionPayload = {\n options: OpenApiDocumentOptions;\n};\n\n// Stories never see the service config, so building the document is an action:\n// the processor holds the config and does the walk.\nexport const askOpenApiGetDocument = createActionRequester<OpenApiDocument>()({\n actionType: OpenApiActionType.GetDocument,\n getPayload: (options: OpenApiDocumentOptions = {}) => ({ options }),\n});\n"]}
|
|
@@ -14,6 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./
|
|
18
|
-
__exportStar(require("./
|
|
17
|
+
__exportStar(require("./askOpenApiGetDocument"), exports);
|
|
18
|
+
__exportStar(require("./OpenApiActionType"), exports);
|
|
19
19
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/actions/openApi/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAAwC;AACxC,sDAAoC","sourcesContent":["export * from './askOpenApiGetDocument';\nexport * from './OpenApiActionType';\n"]}
|
|
@@ -3,7 +3,6 @@ export declare enum QPQWebServerConfigSettingType {
|
|
|
3
3
|
DefaultRouteOptions = "@quidproquo-webserver/config/DefaultRouteOptions",
|
|
4
4
|
Dns = "@quidproquo-webserver/config/Dns",
|
|
5
5
|
EmailSender = "@quidproquo-webserver/config/EmailSender",
|
|
6
|
-
OpenApi = "@quidproquo-webserver/config/OpenApi",
|
|
7
6
|
Seo = "@quidproquo-webserver/config/Seo",
|
|
8
7
|
SubdomainRedirect = "@quidproquo-webserver/config/SubdomainRedirect",
|
|
9
8
|
WebEntry = "@quidproquo-webserver/config/WebEntry",
|
|
@@ -7,7 +7,6 @@ var QPQWebServerConfigSettingType;
|
|
|
7
7
|
QPQWebServerConfigSettingType["DefaultRouteOptions"] = "@quidproquo-webserver/config/DefaultRouteOptions";
|
|
8
8
|
QPQWebServerConfigSettingType["Dns"] = "@quidproquo-webserver/config/Dns";
|
|
9
9
|
QPQWebServerConfigSettingType["EmailSender"] = "@quidproquo-webserver/config/EmailSender";
|
|
10
|
-
QPQWebServerConfigSettingType["OpenApi"] = "@quidproquo-webserver/config/OpenApi";
|
|
11
10
|
QPQWebServerConfigSettingType["Seo"] = "@quidproquo-webserver/config/Seo";
|
|
12
11
|
QPQWebServerConfigSettingType["SubdomainRedirect"] = "@quidproquo-webserver/config/SubdomainRedirect";
|
|
13
12
|
QPQWebServerConfigSettingType["WebEntry"] = "@quidproquo-webserver/config/WebEntry";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QPQConfig.js","sourceRoot":"","sources":["../../../src/config/QPQConfig.ts"],"names":[],"mappings":";;;AAAA,IAAY,
|
|
1
|
+
{"version":3,"file":"QPQConfig.js","sourceRoot":"","sources":["../../../src/config/QPQConfig.ts"],"names":[],"mappings":";;;AAAA,IAAY,6BAiBX;AAjBD,WAAY,6BAA6B;IACvC,6EAA4C,CAAA;IAC5C,yGAAwE,CAAA;IACxE,yEAAwC,CAAA;IACxC,yFAAwD,CAAA;IACxD,yEAAwC,CAAA;IACxC,qGAAoE,CAAA;IACpE,mFAAkD,CAAA;IAClD,yEAAwC,CAAA;IACxC,+EAA8C,CAAA;IAC9C,iGAAgE,CAAA;IAChE,qFAAoD,CAAA;IACpD,6EAA4C,CAAA;IAC5C,yFAAwD,CAAA;IACxD,yFAAwD,CAAA;IACxD,mHAAkF,CAAA;IAClF,uGAAsE,CAAA;AACxE,CAAC,EAjBW,6BAA6B,6CAA7B,6BAA6B,QAiBxC","sourcesContent":["export enum QPQWebServerConfigSettingType {\n Route = '@quidproquo-webserver/config/Route',\n DefaultRouteOptions = '@quidproquo-webserver/config/DefaultRouteOptions',\n Dns = '@quidproquo-webserver/config/Dns',\n EmailSender = '@quidproquo-webserver/config/EmailSender',\n Seo = '@quidproquo-webserver/config/Seo',\n SubdomainRedirect = '@quidproquo-webserver/config/SubdomainRedirect',\n WebEntry = '@quidproquo-webserver/config/WebEntry',\n Api = '@quidproquo-webserver/config/Api',\n ApiKey = '@quidproquo-webserver/config/ApiKey',\n ServiceFunction = '@quidproquo-webserver/config/ServiceFunction',\n WebSocket = '@quidproquo-webserver/config/WebSocket',\n Cache = '@quidproquo-webserver/config/Cache',\n Certificate = '@quidproquo-webserver/config/Certificate',\n DomainProxy = '@quidproquo-webserver/config/DomainProxy',\n StorageDriveCorsSettings = '@quidproquo-webserver/config/StorageDriveCorsSettings',\n FileUploadSettings = '@quidproquo-webserver/config/FileUploadSettings',\n}\n\n// TODO: move this somewhere better\nexport interface CacheSettings {\n minTTLInSeconds: number;\n maxTTLInSeconds: number;\n defaultTTLInSeconds: number;\n mustRevalidate: boolean;\n}\n"]}
|
|
@@ -7,11 +7,10 @@ export interface QPQConfigAdvancedApiSettings extends QPQConfigAdvancedSettings
|
|
|
7
7
|
}
|
|
8
8
|
export interface ApiQPQWebServerConfigSetting extends QPQConfigSetting {
|
|
9
9
|
apiSubdomain: string;
|
|
10
|
-
rootDomain: string;
|
|
11
10
|
apiName: string;
|
|
12
11
|
deprecated: boolean;
|
|
13
12
|
cloudflareApiKeySecretName?: string;
|
|
14
13
|
virtualNetworkName?: string;
|
|
15
14
|
maxConcurrentExecutions?: number;
|
|
16
15
|
}
|
|
17
|
-
export declare const defineApi: (apiName: string,
|
|
16
|
+
export declare const defineApi: (apiName: string, options?: QPQConfigAdvancedApiSettings) => ApiQPQWebServerConfigSetting;
|
|
@@ -2,12 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.defineApi = void 0;
|
|
4
4
|
const QPQConfig_1 = require("../QPQConfig");
|
|
5
|
-
const defineApi = (apiName,
|
|
5
|
+
const defineApi = (apiName, options) => {
|
|
6
6
|
return {
|
|
7
7
|
configSettingType: QPQConfig_1.QPQWebServerConfigSettingType.Api,
|
|
8
8
|
uniqueKey: apiName,
|
|
9
9
|
apiSubdomain: (options === null || options === void 0 ? void 0 : options.subDomain) || apiName,
|
|
10
|
-
rootDomain,
|
|
11
10
|
apiName: apiName,
|
|
12
11
|
deprecated: (options === null || options === void 0 ? void 0 : options.deprecated) || false,
|
|
13
12
|
cloudflareApiKeySecretName: options === null || options === void 0 ? void 0 : options.cloudflareApiKeySecretName,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.js","sourceRoot":"","sources":["../../../../src/config/settings/api.ts"],"names":[],"mappings":";;;AAEA,4CAA6D;
|
|
1
|
+
{"version":3,"file":"api.js","sourceRoot":"","sources":["../../../../src/config/settings/api.ts"],"names":[],"mappings":";;;AAEA,4CAA6D;AA4BtD,MAAM,SAAS,GAAG,CAAC,OAAe,EAAE,OAAsC,EAAgC,EAAE;IACjH,OAAO;QACL,iBAAiB,EAAE,yCAA6B,CAAC,GAAG;QACpD,SAAS,EAAE,OAAO;QAElB,YAAY,EAAE,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,SAAS,KAAI,OAAO;QAE3C,OAAO,EAAE,OAAO;QAEhB,UAAU,EAAE,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,UAAU,KAAI,KAAK;QAExC,0BAA0B,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,0BAA0B;QAE/D,kBAAkB,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,kBAAkB;QAE/C,uBAAuB,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,uBAAuB;KAC1D,CAAC;AACJ,CAAC,CAAC;AAjBW,QAAA,SAAS,aAiBpB","sourcesContent":["import { QPQConfigAdvancedSettings, QPQConfigSetting } from 'quidproquo-core';\n\nimport { QPQWebServerConfigSettingType } from '../QPQConfig';\n\nexport interface QPQConfigAdvancedApiSettings extends QPQConfigAdvancedSettings {\n subDomain?: string;\n cloudflareApiKeySecretName?: string;\n virtualNetworkName?: string;\n\n // Cap (and guarantee) on this api's concurrent requests: never throttled below\n // it, never scales above it. One compute unit serves every route on the api,\n // so this bounds the api as a whole. Free, but carved out of the deploy\n // account's shared concurrency pool.\n maxConcurrentExecutions?: number;\n}\n\nexport interface ApiQPQWebServerConfigSetting extends QPQConfigSetting {\n apiSubdomain: string;\n\n apiName: string;\n\n deprecated: boolean;\n\n cloudflareApiKeySecretName?: string;\n\n virtualNetworkName?: string;\n\n maxConcurrentExecutions?: number;\n}\n\nexport const defineApi = (apiName: string, options?: QPQConfigAdvancedApiSettings): ApiQPQWebServerConfigSetting => {\n return {\n configSettingType: QPQWebServerConfigSettingType.Api,\n uniqueKey: apiName,\n\n apiSubdomain: options?.subDomain || apiName,\n\n apiName: apiName,\n\n deprecated: options?.deprecated || false,\n\n cloudflareApiKeySecretName: options?.cloudflareApiKeySecretName,\n\n virtualNetworkName: options?.virtualNetworkName,\n\n maxConcurrentExecutions: options?.maxConcurrentExecutions,\n };\n};\n"]}
|
|
@@ -1,5 +1,15 @@
|
|
|
1
|
-
import { QPQConfigSetting } from 'quidproquo-core';
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
}
|
|
5
|
-
|
|
1
|
+
import { QPQConfigSetting, QpqPureFunction } from 'quidproquo-core';
|
|
2
|
+
export type QPQConfigAdvancedDnsSettings = {
|
|
3
|
+
resolver?: QpqPureFunction;
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* The app's root domains, primary first. `resolver` points at the app's hostname shape: the
|
|
7
|
+
* deploy tooling requires it, the runtime loads it through the dynamic module loader, and
|
|
8
|
+
* every site resolves hosts with `resolveHosts(qpqConfig, target, resolver)`.
|
|
9
|
+
*/
|
|
10
|
+
export type DnsQPQWebServerConfigSetting = QPQConfigSetting & {
|
|
11
|
+
rootDomains: string[];
|
|
12
|
+
resolver?: QpqPureFunction;
|
|
13
|
+
};
|
|
14
|
+
/** One per service. Omit the resolver for the default `sub.service.feature.env.root` shape. */
|
|
15
|
+
export declare const defineDns: (rootDomains: string | string[], options?: QPQConfigAdvancedDnsSettings) => DnsQPQWebServerConfigSetting;
|
|
@@ -2,10 +2,15 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.defineDns = void 0;
|
|
4
4
|
const QPQConfig_1 = require("../QPQConfig");
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
/** One per service. Omit the resolver for the default `sub.service.feature.env.root` shape. */
|
|
6
|
+
const defineDns = (rootDomains, options) => {
|
|
7
|
+
const roots = Array.isArray(rootDomains) ? rootDomains : [rootDomains];
|
|
8
|
+
return {
|
|
9
|
+
configSettingType: QPQConfig_1.QPQWebServerConfigSettingType.Dns,
|
|
10
|
+
uniqueKey: roots.join('|'),
|
|
11
|
+
rootDomains: roots,
|
|
12
|
+
resolver: options === null || options === void 0 ? void 0 : options.resolver,
|
|
13
|
+
};
|
|
14
|
+
};
|
|
10
15
|
exports.defineDns = defineDns;
|
|
11
16
|
//# sourceMappingURL=dns.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dns.js","sourceRoot":"","sources":["../../../../src/config/settings/dns.ts"],"names":[],"mappings":";;;AAEA,4CAA6D;
|
|
1
|
+
{"version":3,"file":"dns.js","sourceRoot":"","sources":["../../../../src/config/settings/dns.ts"],"names":[],"mappings":";;;AAEA,4CAA6D;AAiB7D,+FAA+F;AACxF,MAAM,SAAS,GAAG,CAAC,WAA8B,EAAE,OAAsC,EAAgC,EAAE;IAChI,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC;IAEvE,OAAO;QACL,iBAAiB,EAAE,yCAA6B,CAAC,GAAG;QACpD,SAAS,EAAE,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC;QAE1B,WAAW,EAAE,KAAK;QAClB,QAAQ,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,QAAQ;KAC5B,CAAC;AACJ,CAAC,CAAC;AAVW,QAAA,SAAS,aAUpB","sourcesContent":["import { QPQConfigSetting, QpqPureFunction } from 'quidproquo-core';\n\nimport { QPQWebServerConfigSettingType } from '../QPQConfig';\n\nexport type QPQConfigAdvancedDnsSettings = {\n // Pointer to the app's DomainResolver export (a pure function, no actions).\n resolver?: QpqPureFunction;\n};\n\n/**\n * The app's root domains, primary first. `resolver` points at the app's hostname shape: the\n * deploy tooling requires it, the runtime loads it through the dynamic module loader, and\n * every site resolves hosts with `resolveHosts(qpqConfig, target, resolver)`.\n */\nexport type DnsQPQWebServerConfigSetting = QPQConfigSetting & {\n rootDomains: string[];\n resolver?: QpqPureFunction;\n};\n\n/** One per service. Omit the resolver for the default `sub.service.feature.env.root` shape. */\nexport const defineDns = (rootDomains: string | string[], options?: QPQConfigAdvancedDnsSettings): DnsQPQWebServerConfigSetting => {\n const roots = Array.isArray(rootDomains) ? rootDomains : [rootDomains];\n\n return {\n configSettingType: QPQWebServerConfigSettingType.Dns,\n uniqueKey: roots.join('|'),\n\n rootDomains: roots,\n resolver: options?.resolver,\n };\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"domainProxy.js","sourceRoot":"","sources":["../../../../src/config/settings/domainProxy.ts"],"names":[],"mappings":";;;AAEA,4CAA6D;AAE7D,IAAY,+BAOX;AAPD,WAAY,+BAA+B;IACzC,iBAAiB;IACjB,4DAAyB,CAAA;IACzB,2CAA2C;IAC3C,0EAAuC,CAAA;IACvC,oCAAoC;IACpC,0DAAuB,CAAA;AACzB,CAAC,EAPW,+BAA+B,+CAA/B,+BAA+B,QAO1C;
|
|
1
|
+
{"version":3,"file":"domainProxy.js","sourceRoot":"","sources":["../../../../src/config/settings/domainProxy.ts"],"names":[],"mappings":";;;AAEA,4CAA6D;AAE7D,IAAY,+BAOX;AAPD,WAAY,+BAA+B;IACzC,iBAAiB;IACjB,4DAAyB,CAAA;IACzB,2CAA2C;IAC3C,0EAAuC,CAAA;IACvC,oCAAoC;IACpC,0DAAuB,CAAA;AACzB,CAAC,EAPW,+BAA+B,+CAA/B,+BAA+B,QAO1C;AA+BM,MAAM,iBAAiB,GAAG,CAAC,IAAY,EAAE,OAA6C,EAAwC,EAAE,CAAC,CAAC;IACvI,iBAAiB,EAAE,yCAA6B,CAAC,WAAW;IAC5D,SAAS,EAAE,IAAI;IAEf,IAAI;IAEJ,eAAe,EAAE,OAAO,CAAC,eAAe;IAExC,MAAM,EAAE,OAAO,CAAC,MAAM;IAEtB,WAAW,EAAE,OAAO,CAAC,WAAW,IAAI,EAAE;IAEtC,iBAAiB,EAAE,OAAO,CAAC,iBAAiB;IAE5C,+BAA+B,EAAE,OAAO,CAAC,+BAA+B;CACzE,CAAC,CAAC;AAfU,QAAA,iBAAiB,qBAe3B","sourcesContent":["import { QPQConfigAdvancedSettings, QPQConfigSetting } from 'quidproquo-core';\n\nimport { QPQWebServerConfigSettingType } from '../QPQConfig';\n\nexport enum DomainProxyViewerProtocolPolicy {\n /** HTTPS only */\n HTTPS_ONLY = 'https-only',\n /** Will redirect HTTP requests to HTTPS */\n REDIRECT_TO_HTTPS = 'redirect-to-https',\n /** Both HTTP and HTTPS supported */\n ALLOW_ALL = 'allow-all',\n}\n\nexport interface DomainProxyDomainOptions {\n subDomainNames?: string[];\n onRootDomain: boolean;\n}\n\nexport interface QPQConfigAdvancedDomainProxySettings extends QPQConfigAdvancedSettings {\n httpProxyDomain: string;\n\n domain: DomainProxyDomainOptions;\n\n cacheSettingsName?: string;\n\n ignoreCache?: string[];\n\n domainProxyViewerProtocolPolicy: DomainProxyViewerProtocolPolicy;\n}\n\nexport interface DomainProxyQPQWebServerConfigSetting extends QPQConfigSetting {\n name: string;\n\n domainProxyViewerProtocolPolicy: DomainProxyViewerProtocolPolicy;\n\n domain: DomainProxyDomainOptions;\n httpProxyDomain: string;\n\n cacheSettingsName?: string;\n ignoreCache: string[];\n}\n\nexport const defineDomainProxy = (name: string, options: QPQConfigAdvancedDomainProxySettings): DomainProxyQPQWebServerConfigSetting => ({\n configSettingType: QPQWebServerConfigSettingType.DomainProxy,\n uniqueKey: name,\n\n name,\n\n httpProxyDomain: options.httpProxyDomain,\n\n domain: options.domain,\n\n ignoreCache: options.ignoreCache || [],\n\n cacheSettingsName: options.cacheSettingsName,\n\n domainProxyViewerProtocolPolicy: options.domainProxyViewerProtocolPolicy,\n});\n"]}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { QPQConfigSetting } from 'quidproquo-core';
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export declare const defineEmailSender: (rootDomain: string) => EmailSenderQPQWebServerConfigSetting;
|
|
2
|
+
export type EmailSenderQPQWebServerConfigSetting = QPQConfigSetting;
|
|
3
|
+
/** Sends from the app's root domains (defineDns); one per service. */
|
|
4
|
+
export declare const defineEmailSender: () => EmailSenderQPQWebServerConfigSetting;
|
|
@@ -2,12 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.defineEmailSender = void 0;
|
|
4
4
|
const QPQConfig_1 = require("../QPQConfig");
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
};
|
|
11
|
-
};
|
|
5
|
+
/** Sends from the app's root domains (defineDns); one per service. */
|
|
6
|
+
const defineEmailSender = () => ({
|
|
7
|
+
configSettingType: QPQConfig_1.QPQWebServerConfigSettingType.EmailSender,
|
|
8
|
+
uniqueKey: 'emailSender',
|
|
9
|
+
});
|
|
12
10
|
exports.defineEmailSender = defineEmailSender;
|
|
13
11
|
//# sourceMappingURL=emailSender.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"emailSender.js","sourceRoot":"","sources":["../../../../src/config/settings/emailSender.ts"],"names":[],"mappings":";;;AAEA,4CAA6D;
|
|
1
|
+
{"version":3,"file":"emailSender.js","sourceRoot":"","sources":["../../../../src/config/settings/emailSender.ts"],"names":[],"mappings":";;;AAEA,4CAA6D;AAI7D,sEAAsE;AAC/D,MAAM,iBAAiB,GAAG,GAAyC,EAAE,CAAC,CAAC;IAC5E,iBAAiB,EAAE,yCAA6B,CAAC,WAAW;IAC5D,SAAS,EAAE,aAAa;CACzB,CAAC,CAAC;AAHU,QAAA,iBAAiB,qBAG3B","sourcesContent":["import { QPQConfigSetting } from 'quidproquo-core';\n\nimport { QPQWebServerConfigSettingType } from '../QPQConfig';\n\nexport type EmailSenderQPQWebServerConfigSetting = QPQConfigSetting;\n\n/** Sends from the app's root domains (defineDns); one per service. */\nexport const defineEmailSender = (): EmailSenderQPQWebServerConfigSetting => ({\n configSettingType: QPQWebServerConfigSettingType.EmailSender,\n uniqueKey: 'emailSender',\n});\n"]}
|
|
@@ -25,7 +25,6 @@ __exportStar(require("./domainProxy"), exports);
|
|
|
25
25
|
__exportStar(require("./emailSender"), exports);
|
|
26
26
|
__exportStar(require("./fileUploadSettings"), exports);
|
|
27
27
|
__exportStar(require("./migration"), exports);
|
|
28
|
-
__exportStar(require("./openApi"), exports);
|
|
29
28
|
__exportStar(require("./route"), exports);
|
|
30
29
|
__exportStar(require("./seed"), exports);
|
|
31
30
|
__exportStar(require("./seo"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/config/settings/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wCAAsB;AACtB,2CAAyB;AACzB,0CAAwB;AACxB,gDAA8B;AAC9B,wDAAsC;AACtC,qDAAmC;AACnC,wCAAsB;AACtB,gDAA8B;AAC9B,gDAA8B;AAC9B,uDAAqC;AACrC,8CAA4B;AAC5B,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/config/settings/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wCAAsB;AACtB,2CAAyB;AACzB,0CAAwB;AACxB,gDAA8B;AAC9B,wDAAsC;AACtC,qDAAmC;AACnC,wCAAsB;AACtB,gDAA8B;AAC9B,gDAA8B;AAC9B,uDAAqC;AACrC,8CAA4B;AAC5B,0CAAwB;AACxB,yCAAuB;AACvB,wCAAsB;AACtB,oDAAkC;AAClC,6DAA2C;AAC3C,sDAAoC;AACpC,6CAA2B;AAC3B,8CAA4B","sourcesContent":["export * from './api';\nexport * from './apiKey';\nexport * from './cache';\nexport * from './certificate';\nexport * from './defaultRouteOptions';\nexport * from './defineAuthSystem';\nexport * from './dns';\nexport * from './domainProxy';\nexport * from './emailSender';\nexport * from './fileUploadSettings';\nexport * from './migration';\nexport * from './route';\nexport * from './seed';\nexport * from './seo';\nexport * from './serviceFunction';\nexport * from './storageDriveCorsSettings';\nexport * from './subdomainRedirect';\nexport * from './webEntry';\nexport * from './websocket';\n"]}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { HTTPMethod, QPQConfigSetting, QpqFunctionRuntime } from 'quidproquo-core';
|
|
2
|
+
import { RouteSchema } from '../types/RouteSchema';
|
|
2
3
|
import { ApiKeyReference } from './apiKey';
|
|
3
4
|
interface GenericRouteAuthSettings<T> {
|
|
4
5
|
userDirectoryName?: string;
|
|
@@ -26,6 +27,7 @@ export interface ServiceAllowedOrigin {
|
|
|
26
27
|
export interface GenericRouteOptions<T> {
|
|
27
28
|
allowedOrigins?: (string | ServiceAllowedOrigin)[];
|
|
28
29
|
routeAuthSettings?: GenericRouteAuthSettings<T>;
|
|
30
|
+
schema?: RouteSchema;
|
|
29
31
|
}
|
|
30
32
|
export type RouteAuthSettings = GenericRouteAuthSettings<ApiKeyReference>;
|
|
31
33
|
export type RouteOptions = GenericRouteOptions<ApiKeyReference>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"route.js","sourceRoot":"","sources":["../../../../src/config/settings/route.ts"],"names":[],"mappings":";;;AAAA,qDAAuH;AAEvH,4CAA6D;
|
|
1
|
+
{"version":3,"file":"route.js","sourceRoot":"","sources":["../../../../src/config/settings/route.ts"],"names":[],"mappings":";;;AAAA,qDAAuH;AAEvH,4CAA6D;AAsDtD,MAAM,WAAW,GAAG,CACzB,MAAkB,EAClB,IAAY,EACZ,OAA2B,EAC3B,UAAyD,EAAE,EAC3B,EAAE;IAClC,MAAM,iBAAiB,GAAG,OAAO,CAAC,iBAAiB,IAAI,EAAE,CAAC;IAC1D,MAAM,OAAO,GAAG,iBAAiB,CAAC,OAAO,IAAI,EAAE,CAAC;IAChD,MAAM,UAAU,mCACX,OAAO,KACV,iBAAiB,kCACZ,iBAAiB,KACpB,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,MAE7F,CAAC;IAEF,OAAO;QACL,iBAAiB,EAAE,yCAA6B,CAAC,KAAK;QACtD,SAAS,EAAE,IAAA,oDAAkC,EAAC,OAAO,CAAC;QAEtD,MAAM;QACN,IAAI;QACJ,OAAO;QACP,OAAO,EAAE,UAAU;KACpB,CAAC;AACJ,CAAC,CAAC;AAzBW,QAAA,WAAW,eAyBtB","sourcesContent":["import { getUniqueKeyFromQpqFunctionRuntime, HTTPMethod, QPQConfigSetting, QpqFunctionRuntime } from 'quidproquo-core';\n\nimport { QPQWebServerConfigSettingType } from '../QPQConfig';\nimport { RouteSchema } from '../types/RouteSchema';\nimport { ApiKeyReference } from './apiKey';\n\ninterface GenericRouteAuthSettings<T> {\n userDirectoryName?: string;\n\n scopes?: string[];\n\n apiKeys?: T[];\n}\n\nexport interface ServiceAllowedOrigin {\n /**\n * The name of the api subdomain name for the given service\n */\n api: string;\n /**\n * The domain name the service is hosted on, if left undefined, the domain name of this service will be used\n */\n domain?: string;\n /**\n * The service name, as seen in the subdomain\n */\n service?: string;\n\n /**\n * The protocol to use, defaults to https\n */\n protocol?: 'http' | 'https';\n}\n\nexport interface GenericRouteOptions<T> {\n allowedOrigins?: (string | ServiceAllowedOrigin)[];\n\n routeAuthSettings?: GenericRouteAuthSettings<T>;\n\n // Request and response shapes for validation and the generated OpenAPI document\n schema?: RouteSchema;\n}\n\n// TODO: Probably clean up the types here\n// The idea is just so we can let the user define apiKeys as strings not objects\n// But let the internal logic always use objects\nexport type RouteAuthSettings = GenericRouteAuthSettings<ApiKeyReference>;\nexport type RouteOptions = GenericRouteOptions<ApiKeyReference>;\n\nexport interface RouteQPQWebServerConfigSetting extends QPQConfigSetting {\n method: HTTPMethod;\n path: string;\n runtime: QpqFunctionRuntime;\n options: RouteOptions;\n}\n\nexport const defineRoute = (\n method: HTTPMethod,\n path: string,\n runtime: QpqFunctionRuntime,\n options: GenericRouteOptions<ApiKeyReference | string> = {},\n): RouteQPQWebServerConfigSetting => {\n const routeAuthSettings = options.routeAuthSettings || {};\n const apiKeys = routeAuthSettings.apiKeys || [];\n const newOptions = {\n ...options,\n routeAuthSettings: {\n ...routeAuthSettings,\n apiKeys: apiKeys.map((apiKey) => (typeof apiKey === 'string' ? { name: apiKey } : apiKey)),\n },\n };\n\n return {\n configSettingType: QPQWebServerConfigSettingType.Route,\n uniqueKey: getUniqueKeyFromQpqFunctionRuntime(runtime),\n\n method,\n path,\n runtime,\n options: newOptions,\n };\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webEntry.js","sourceRoot":"","sources":["../../../../src/config/settings/webEntry.ts"],"names":[],"mappings":";;;AAEA,4CAA6D;
|
|
1
|
+
{"version":3,"file":"webEntry.js","sourceRoot":"","sources":["../../../../src/config/settings/webEntry.ts"],"names":[],"mappings":";;;AAEA,4CAA6D;AA2DtD,MAAM,cAAc,GAAG,CAAC,IAAY,EAAE,OAA0C,EAAqC,EAAE;;IAAC,OAAA,CAAC;QAC9H,iBAAiB,EAAE,yCAA6B,CAAC,QAAQ;QACzD,SAAS,EAAE,IAAI;QAEf,IAAI;QACJ,SAAS,EAAE,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,SAAS,KAAI,YAAY;QAE7C,YAAY,EAAE,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,YAAY,KAAI;YACrC,UAAU,EAAE,IAAI;SACjB;QAED,MAAM,EAAE,OAAO,CAAC,MAAM;QAEtB,SAAS,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,SAAS;QAE7B,WAAW,EAAE,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,WAAW,KAAI,EAAE;QAEvC,aAAa,EAAE,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,aAAa,mCAAI,IAAI;QAE7C,eAAe,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,eAAe;QAEzC,0BAA0B,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,0BAA0B;QAE/D,iBAAiB,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,iBAAiB;QAE7C,kBAAkB,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,kBAAkB;KAChD,CAAC,CAAA;CAAA,CAAC;AA1BU,QAAA,cAAc,kBA0BxB","sourcesContent":["import { QPQConfigAdvancedSettings, QPQConfigSetting } from 'quidproquo-core';\n\nimport { QPQWebServerConfigSettingType } from '../QPQConfig';\nimport { ResponseSecurityHeaders } from '../types/ResponseSecurityHeaders';\n\nexport interface WebDomainOptions {\n subDomainName?: string;\n onRootDomain: boolean;\n}\n\nexport interface StorageDriveOptions {\n sourceStorageDrive?: string;\n autoUpload: boolean;\n}\n\nexport interface QPQConfigAdvancedWebEntrySettings extends QPQConfigAdvancedSettings {\n buildPath?: string;\n\n storageDrive?: StorageDriveOptions;\n\n domain: WebDomainOptions;\n\n cacheSettingsName?: string;\n indexRoot?: string;\n ignoreCache?: string[];\n\n compressFiles?: boolean;\n\n cloudflareApiKeySecretName?: string;\n\n securityHeaders?: ResponseSecurityHeaders;\n\n /**\n * Browser origins allowed to cross-origin `fetch` this web entry's (public,\n * static) assets. Leave undefined to scope to this service's own domain\n * (`https://<domain>` + `https://*.<domain>`); pass `['*']` to allow any\n * origin (e.g. serving assets as a public CDN / cross-origin fonts).\n */\n corsAllowedOrigins?: string[];\n}\n\nexport interface WebEntryQPQWebServerConfigSetting extends QPQConfigSetting {\n name: string;\n indexRoot: string;\n\n storageDrive: StorageDriveOptions;\n domain: WebDomainOptions;\n\n buildPath?: string;\n cacheSettingsName?: string;\n ignoreCache: string[];\n\n compressFiles: boolean;\n\n cloudflareApiKeySecretName?: string;\n\n securityHeaders?: ResponseSecurityHeaders;\n\n corsAllowedOrigins?: string[];\n}\n\nexport const defineWebEntry = (name: string, options: QPQConfigAdvancedWebEntrySettings): WebEntryQPQWebServerConfigSetting => ({\n configSettingType: QPQWebServerConfigSettingType.WebEntry,\n uniqueKey: name,\n\n name,\n indexRoot: options?.indexRoot || 'index.html',\n\n storageDrive: options?.storageDrive || {\n autoUpload: true,\n },\n\n domain: options.domain,\n\n buildPath: options?.buildPath,\n\n ignoreCache: options?.ignoreCache || [],\n\n compressFiles: options?.compressFiles ?? true,\n\n securityHeaders: options?.securityHeaders,\n\n cloudflareApiKeySecretName: options?.cloudflareApiKeySecretName,\n\n cacheSettingsName: options?.cacheSettingsName,\n\n corsAllowedOrigins: options?.corsAllowedOrigins,\n});\n"]}
|
|
@@ -13,7 +13,6 @@ export interface QPQConfigAdvancedWebSocketSettings extends QPQConfigAdvancedSet
|
|
|
13
13
|
}
|
|
14
14
|
export interface WebSocketQPQWebServerConfigSetting extends QPQConfigSetting {
|
|
15
15
|
apiSubdomain: string;
|
|
16
|
-
rootDomain: string;
|
|
17
16
|
onRootDomain: boolean;
|
|
18
17
|
apiName: string;
|
|
19
18
|
eventProcessors: QpqWebSocketEventProcessors;
|
|
@@ -21,4 +20,4 @@ export interface WebSocketQPQWebServerConfigSetting extends QPQConfigSetting {
|
|
|
21
20
|
cloudflareApiKeySecretName?: string;
|
|
22
21
|
maxConcurrentExecutions?: number;
|
|
23
22
|
}
|
|
24
|
-
export declare const defineWebsocket: (apiSubdomain: string,
|
|
23
|
+
export declare const defineWebsocket: (apiSubdomain: string, eventProcessors: QpqWebSocketEventProcessors, options?: QPQConfigAdvancedWebSocketSettings) => WebSocketQPQWebServerConfigSetting;
|