diff --git a/CHANGELOG.md b/CHANGELOG.md index e69de29bb..693cef42b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -0,0 +1 @@ +- Fix issue where v2 TS users couldn't compile their code because of unexported types. (#1033) diff --git a/src/cloud-functions.ts b/src/cloud-functions.ts index d2de0504c..d07676432 100644 --- a/src/cloud-functions.ts +++ b/src/cloud-functions.ts @@ -37,7 +37,7 @@ import { durationFromSeconds, serviceAccountFromShorthand, } from './common/encoding'; -import { ManifestEndpoint, ManifestRequiredAPI } from './common/manifest'; +import { ManifestEndpoint, ManifestRequiredAPI } from './runtime/manifest'; /** @hidden */ const WILDCARD_REGEX = new RegExp('{[^/{}]*}', 'g'); diff --git a/src/common/manifest.ts b/src/common/manifest.ts deleted file mode 100644 index e807cdc8f..000000000 --- a/src/common/manifest.ts +++ /dev/null @@ -1,83 +0,0 @@ -// The MIT License (MIT) -// -// Copyright (c) 2021 Firebase -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. -/** - * An definition of a function as appears in the Manifest. - */ -export interface ManifestEndpoint { - entryPoint?: string; - region?: string[]; - platform?: string; - availableMemoryMb?: number; - maxInstances?: number; - minInstances?: number; - concurrency?: number; - serviceAccountEmail?: string; - timeoutSeconds?: number; - vpc?: { - connector: string; - egressSettings?: string; - }; - labels?: Record; - ingressSettings?: string; - environmentVariables?: Record; - - httpsTrigger?: { - invoker?: string[]; - }; - - callableTrigger?: {}; - - eventTrigger?: { - eventFilters: Record; - eventType: string; - retry: boolean; - region?: string; - serviceAccountEmail?: string; - }; - - scheduleTrigger?: { - schedule?: string; - timezone?: string; - retryConfig?: { - retryCount?: number; - maxRetryDuration?: string; - minBackoffDuration?: string; - maxBackoffDuration?: string; - maxDoublings?: number; - }; - }; -} - -export interface ManifestRequiredAPI { - api: string; - reason: string; -} - -/** - * @internal - * An definition of a function deployment as appears in the Manifest. - **/ -export interface ManifestStack { - specVersion: 'v1alpha1'; - requiredAPIs: ManifestRequiredAPI[]; - endpoints: Record; -} diff --git a/src/providers/https.ts b/src/providers/https.ts index ae646fa02..dc62458a7 100644 --- a/src/providers/https.ts +++ b/src/providers/https.ts @@ -33,7 +33,7 @@ import { convertInvoker, copyIfPresent, } from '../common/encoding'; -import { ManifestEndpoint, ManifestRequiredAPI } from '../common/manifest'; +import { ManifestEndpoint, ManifestRequiredAPI } from '../runtime/manifest'; import { CallableContext, FunctionsErrorCode, diff --git a/src/runtime/manifest.ts b/src/runtime/manifest.ts index 379e61a4f..656a0c5d1 100644 --- a/src/runtime/manifest.ts +++ b/src/runtime/manifest.ts @@ -20,7 +20,6 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. /** - * @internal * An definition of a function as appears in the Manifest. */ export interface ManifestEndpoint { @@ -68,14 +67,12 @@ export interface ManifestEndpoint { }; } -/* @internal */ export interface ManifestRequiredAPI { api: string; reason: string; } /** - * @internal * An definition of a function deployment as appears in the Manifest. **/ export interface ManifestStack { diff --git a/src/v2/providers/alerts/alerts.ts b/src/v2/providers/alerts/alerts.ts index 8c2699795..b1501ed0e 100644 --- a/src/v2/providers/alerts/alerts.ts +++ b/src/v2/providers/alerts/alerts.ts @@ -1,4 +1,4 @@ -import { ManifestEndpoint } from '../../../common/manifest'; +import { ManifestEndpoint } from '../../../runtime/manifest'; import { CloudEvent, CloudFunction } from '../../core'; import * as options from '../../options';