From e702fde45f4d6e8d50a1331a819edd41f3efd7f5 Mon Sep 17 00:00:00 2001 From: Thomas Bouldin Date: Tue, 10 May 2022 11:03:20 -0700 Subject: [PATCH 1/3] Add package docs and copyright headers --- src/bin/firebase-functions.ts | 23 ++++++++++++++++ src/common/encoding.ts | 22 +++++++++++++++ src/logger/common.ts | 22 +++++++++++++++ src/logger/compat.ts | 22 +++++++++++++++ src/logger/index.ts | 22 +++++++++++++++ src/v2/core.ts | 5 ++++ src/v2/index.ts | 10 ++++++- src/v2/options.ts | 5 ++++ src/v2/params/index.ts | 27 ++++++++++++++++++- src/v2/params/types.ts | 22 +++++++++++++++ src/v2/providers/alerts/alerts.ts | 22 +++++++++++++++ src/v2/providers/alerts/appDistribution.ts | 27 +++++++++++++++++++ src/v2/providers/alerts/billing.ts | 27 +++++++++++++++++++ src/v2/providers/alerts/crashlytics.ts | 27 +++++++++++++++++++ src/v2/providers/alerts/index.ts | 29 ++++++++++++++++++++ src/v2/providers/eventarc.ts | 8 ++++++ src/v2/providers/https.ts | 5 ++++ src/v2/providers/identity.ts | 27 +++++++++++++++++++ src/v2/providers/pubsub.ts | 31 ++++++++++++++++++++++ src/v2/providers/storage.ts | 5 ++++ src/v2/providers/tasks.ts | 5 ++++ 21 files changed, 391 insertions(+), 2 deletions(-) diff --git a/src/bin/firebase-functions.ts b/src/bin/firebase-functions.ts index 4b4eba900..426fa496a 100644 --- a/src/bin/firebase-functions.ts +++ b/src/bin/firebase-functions.ts @@ -1,5 +1,28 @@ #!/usr/bin/env node +// The MIT License (MIT) +// +// Copyright (c) 2017 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. + + import * as express from 'express'; import { loadStack } from '../runtime/loader'; diff --git a/src/common/encoding.ts b/src/common/encoding.ts index 8960b5ddc..2ac83a207 100644 --- a/src/common/encoding.ts +++ b/src/common/encoding.ts @@ -1,3 +1,25 @@ +// The MIT License (MIT) +// +// Copyright (c) 2017 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. + // Copied from firebase-tools/src/gcp/proto /** diff --git a/src/logger/common.ts b/src/logger/common.ts index f7ff0de78..020883bbb 100644 --- a/src/logger/common.ts +++ b/src/logger/common.ts @@ -1,3 +1,25 @@ +// The MIT License (MIT) +// +// Copyright (c) 2017 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. + // Determine if structured logs are supported (node >= 10). If something goes wrong, // assume no since unstructured is safer. /** @hidden */ diff --git a/src/logger/compat.ts b/src/logger/compat.ts index 4239221f0..7300a197b 100644 --- a/src/logger/compat.ts +++ b/src/logger/compat.ts @@ -1,3 +1,25 @@ +// The MIT License (MIT) +// +// Copyright (c) 2017 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. + import { format } from 'util'; import { CONSOLE_SEVERITY, diff --git a/src/logger/index.ts b/src/logger/index.ts index 9bb43725f..02750f845 100644 --- a/src/logger/index.ts +++ b/src/logger/index.ts @@ -1,3 +1,25 @@ +// The MIT License (MIT) +// +// Copyright (c) 2017 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. + import { format } from 'util'; import { diff --git a/src/v2/core.ts b/src/v2/core.ts index 54d61ff1c..f8f559c9e 100644 --- a/src/v2/core.ts +++ b/src/v2/core.ts @@ -20,6 +20,11 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. +/** + * Core functionality of the Firebase Functions v2 SDK. + * @packageDocumentation + */ + import { ManifestEndpoint } from '../runtime/manifest'; /** @internal */ diff --git a/src/v2/index.ts b/src/v2/index.ts index 31070b4dc..33ba21614 100644 --- a/src/v2/index.ts +++ b/src/v2/index.ts @@ -20,6 +20,14 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. +/** + * The V2 API for Cloud Functions for Firebase. + * This SDK also supports deep imports. For example, the namespace + * 'pubsub' is available at 'firebase-functions/v2' or is directly importable + * from 'firebase-functions/v2/pubsub'. + * @packageDocumentation + */ + import * as logger from '../logger'; import * as params from './params'; import * as alerts from './providers/alerts'; @@ -32,10 +40,10 @@ import * as tasks from './providers/tasks'; export { alerts, + storage, https, identity, pubsub, - storage, logger, params, tasks, diff --git a/src/v2/options.ts b/src/v2/options.ts index c4e3cd7de..305be75a2 100644 --- a/src/v2/options.ts +++ b/src/v2/options.ts @@ -20,6 +20,11 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. +/** + * Options to configure cloud functions. + * @packageDocumentation + */ + import { convertIfPresent, copyIfPresent, diff --git a/src/v2/params/index.ts b/src/v2/params/index.ts index f4ea32b53..d7582e479 100644 --- a/src/v2/params/index.ts +++ b/src/v2/params/index.ts @@ -1,4 +1,29 @@ -/** @hidden */ +// The MIT License (MIT) +// +// Copyright (c) 2017 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. + +/** + * @hidden + * @alpha + */ import { BooleanParam, FloatParam, diff --git a/src/v2/params/types.ts b/src/v2/params/types.ts index c345cf654..55624e80e 100644 --- a/src/v2/params/types.ts +++ b/src/v2/params/types.ts @@ -1,3 +1,25 @@ +// The MIT License (MIT) +// +// Copyright (c) 2017 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. + /** @hidden */ type ParamValueType = 'string' | 'list' | 'boolean' | 'int' | 'float' | 'json'; diff --git a/src/v2/providers/alerts/alerts.ts b/src/v2/providers/alerts/alerts.ts index df800fadb..66e3f373b 100644 --- a/src/v2/providers/alerts/alerts.ts +++ b/src/v2/providers/alerts/alerts.ts @@ -1,3 +1,25 @@ +// The MIT License (MIT) +// +// Copyright (c) 2017 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. + import { ManifestEndpoint } from '../../../runtime/manifest'; import { CloudEvent, CloudFunction } from '../../core'; import * as options from '../../options'; diff --git a/src/v2/providers/alerts/appDistribution.ts b/src/v2/providers/alerts/appDistribution.ts index e22f847c0..a415b9851 100644 --- a/src/v2/providers/alerts/appDistribution.ts +++ b/src/v2/providers/alerts/appDistribution.ts @@ -1,3 +1,30 @@ +// The MIT License (MIT) +// +// Copyright (c) 2017 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. + +/** + * Cloud functions to handle Firebase App Distribution events from Firebase Alerts. + * @packageDocumentation + */ + import { CloudEvent, CloudFunction } from '../../core'; import * as options from '../../options'; import { FirebaseAlertData, getEndpointAnnotation } from './alerts'; diff --git a/src/v2/providers/alerts/billing.ts b/src/v2/providers/alerts/billing.ts index 4439546a5..fccbd198f 100644 --- a/src/v2/providers/alerts/billing.ts +++ b/src/v2/providers/alerts/billing.ts @@ -1,3 +1,30 @@ +// The MIT License (MIT) +// +// Copyright (c) 2017 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. + +/** + * Cloud functions to handle billing events from Firebase Alerts. + * @packageDocumentation + */ + import { FirebaseAlertData, getEndpointAnnotation } from '.'; import { CloudEvent, CloudFunction } from '../../core'; import * as options from '../../options'; diff --git a/src/v2/providers/alerts/crashlytics.ts b/src/v2/providers/alerts/crashlytics.ts index 1cbe13760..d74c52c87 100644 --- a/src/v2/providers/alerts/crashlytics.ts +++ b/src/v2/providers/alerts/crashlytics.ts @@ -1,3 +1,30 @@ +// The MIT License (MIT) +// +// Copyright (c) 2017 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. + +/** + * Cloud functions to handle Crashlytics events from Firebase Alerts. + * @packageDocumentation + */ + import { FirebaseAlertData, getEndpointAnnotation } from '.'; import { CloudEvent, CloudFunction } from '../../core'; import * as options from '../../options'; diff --git a/src/v2/providers/alerts/index.ts b/src/v2/providers/alerts/index.ts index ecf90a422..3958288c6 100644 --- a/src/v2/providers/alerts/index.ts +++ b/src/v2/providers/alerts/index.ts @@ -1,3 +1,32 @@ +// The MIT License (MIT) +// +// Copyright (c) 2017 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. + +/** + * Cloud functions to handle events from Firebase Alerts. + * Subpackages give stronger typing to specific services which + * notify users via Firebase Alerts. + * @packageDocumentation + */ + import * as appDistribution from './appDistribution'; import * as billing from './billing'; import * as crashlytics from './crashlytics'; diff --git a/src/v2/providers/eventarc.ts b/src/v2/providers/eventarc.ts index fd56e714f..b62af5d1d 100644 --- a/src/v2/providers/eventarc.ts +++ b/src/v2/providers/eventarc.ts @@ -20,6 +20,14 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. +/** + * Cloud functions to integrate directly with Eventarc. + * @packageDocumentation + */ + +/** Cloud functions to integrate directly with Eventarc. */ +declare namespace eventarc {} + import { convertIfPresent, copyIfPresent } from '../../common/encoding'; import { ManifestEndpoint } from '../../runtime/manifest'; import { CloudEvent, CloudFunction } from '../core'; diff --git a/src/v2/providers/https.ts b/src/v2/providers/https.ts index 3cd095e94..e36f8b952 100644 --- a/src/v2/providers/https.ts +++ b/src/v2/providers/https.ts @@ -20,6 +20,11 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. +/** + * Cloud functions to handle HTTPS request or callable RPCs. + * @packageDocumentation + */ + import * as cors from 'cors'; import * as express from 'express'; import { convertIfPresent, convertInvoker } from '../../common/encoding'; diff --git a/src/v2/providers/identity.ts b/src/v2/providers/identity.ts index 798a39212..a2c8f900a 100644 --- a/src/v2/providers/identity.ts +++ b/src/v2/providers/identity.ts @@ -1,3 +1,30 @@ +// The MIT License (MIT) +// +// Copyright (c) 2017 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. + +/** + * Cloud functions to handle events from Google Cloud Identity Platform. + * @packageDocumentation + */ + import { BlockingFunction } from '../../cloud-functions'; import { AuthBlockingEvent, diff --git a/src/v2/providers/pubsub.ts b/src/v2/providers/pubsub.ts index 62a5ba4a1..7506f6ed2 100644 --- a/src/v2/providers/pubsub.ts +++ b/src/v2/providers/pubsub.ts @@ -1,3 +1,30 @@ +// The MIT License (MIT) +// +// Copyright (c) 2017 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. + +/** + * Cloud functions to handle events from Google Cloud Pub/Sub. + * @packageDocumentation + */ + import { copyIfPresent } from '../../common/encoding'; import { ManifestEndpoint } from '../../runtime/manifest'; import { CloudEvent, CloudFunction } from '../core'; @@ -37,6 +64,10 @@ export class Message { /** @hidden */ private _json: T; + /** + * @hidden + * @alpha + */ constructor(data: any) { this.messageId = data.messageId; this.data = data.data; diff --git a/src/v2/providers/storage.ts b/src/v2/providers/storage.ts index 27e6d01dc..6834863ca 100644 --- a/src/v2/providers/storage.ts +++ b/src/v2/providers/storage.ts @@ -20,6 +20,11 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. +/** + * Cloud functions to handle events from Google Cloud Storage. + * @packageDocumentation + */ + import { copyIfPresent } from '../../common/encoding'; import { firebaseConfig } from '../../config'; import { ManifestEndpoint } from '../../runtime/manifest'; diff --git a/src/v2/providers/tasks.ts b/src/v2/providers/tasks.ts index b45de3361..fe7bc697f 100644 --- a/src/v2/providers/tasks.ts +++ b/src/v2/providers/tasks.ts @@ -20,6 +20,11 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. +/** + * Cloud functions to handle Tasks enqueued with Google Cloud Tasks. + * @packageDocumentation + */ + import { convertIfPresent, convertInvoker, From ff836a0bc01bf9726301de3dc3c1f449fd6d22c4 Mon Sep 17 00:00:00 2001 From: Thomas Bouldin Date: Tue, 10 May 2022 11:21:12 -0700 Subject: [PATCH 2/3] Run formatter --- docgen/toc.ts | 4 ++-- src/bin/firebase-functions.ts | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/docgen/toc.ts b/docgen/toc.ts index d552a9cba..24cc58092 100644 --- a/docgen/toc.ts +++ b/docgen/toc.ts @@ -21,9 +21,9 @@ import { writeFileSync } from 'fs'; import { resolve } from 'path'; -import yargs from 'yargs'; -import * as yaml from 'js-yaml'; import { FileSystem } from '@rushstack/node-core-library'; +import * as yaml from 'js-yaml'; +import yargs from 'yargs'; export interface TocGenerationOptions { inputFolder: string; diff --git a/src/bin/firebase-functions.ts b/src/bin/firebase-functions.ts index 426fa496a..156fe1952 100644 --- a/src/bin/firebase-functions.ts +++ b/src/bin/firebase-functions.ts @@ -22,7 +22,6 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. - import * as express from 'express'; import { loadStack } from '../runtime/loader'; From 94ec7b49ef6436fa2fb881e21e0068f335ebcf42 Mon Sep 17 00:00:00 2001 From: Thomas Bouldin Date: Tue, 10 May 2022 11:35:26 -0700 Subject: [PATCH 3/3] Fix copyright date --- src/bin/firebase-functions.ts | 2 +- src/common/encoding.ts | 2 +- src/v2/index.ts | 2 +- src/v2/params/index.ts | 2 +- src/v2/params/types.ts | 2 +- src/v2/providers/alerts/alerts.ts | 2 +- src/v2/providers/alerts/appDistribution.ts | 2 +- src/v2/providers/alerts/billing.ts | 2 +- src/v2/providers/alerts/crashlytics.ts | 2 +- src/v2/providers/alerts/index.ts | 2 +- src/v2/providers/identity.ts | 2 +- src/v2/providers/pubsub.ts | 2 +- src/v2/providers/storage.ts | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/bin/firebase-functions.ts b/src/bin/firebase-functions.ts index 156fe1952..646433fec 100644 --- a/src/bin/firebase-functions.ts +++ b/src/bin/firebase-functions.ts @@ -2,7 +2,7 @@ // The MIT License (MIT) // -// Copyright (c) 2017 Firebase +// Copyright (c) 2022 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 diff --git a/src/common/encoding.ts b/src/common/encoding.ts index 2ac83a207..554c5fcb1 100644 --- a/src/common/encoding.ts +++ b/src/common/encoding.ts @@ -1,6 +1,6 @@ // The MIT License (MIT) // -// Copyright (c) 2017 Firebase +// 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 diff --git a/src/v2/index.ts b/src/v2/index.ts index 33ba21614..fb8b061ed 100644 --- a/src/v2/index.ts +++ b/src/v2/index.ts @@ -1,6 +1,6 @@ // The MIT License (MIT) // -// Copyright (c) 2021 Firebase +// Copyright (c) 2022 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 diff --git a/src/v2/params/index.ts b/src/v2/params/index.ts index d7582e479..bf45e8c45 100644 --- a/src/v2/params/index.ts +++ b/src/v2/params/index.ts @@ -1,6 +1,6 @@ // The MIT License (MIT) // -// Copyright (c) 2017 Firebase +// 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 diff --git a/src/v2/params/types.ts b/src/v2/params/types.ts index 55624e80e..9612dc8dc 100644 --- a/src/v2/params/types.ts +++ b/src/v2/params/types.ts @@ -1,6 +1,6 @@ // The MIT License (MIT) // -// Copyright (c) 2017 Firebase +// 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 diff --git a/src/v2/providers/alerts/alerts.ts b/src/v2/providers/alerts/alerts.ts index 66e3f373b..f553bc3a5 100644 --- a/src/v2/providers/alerts/alerts.ts +++ b/src/v2/providers/alerts/alerts.ts @@ -1,6 +1,6 @@ // The MIT License (MIT) // -// Copyright (c) 2017 Firebase +// Copyright (c) 2022 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 diff --git a/src/v2/providers/alerts/appDistribution.ts b/src/v2/providers/alerts/appDistribution.ts index a415b9851..ea5d50847 100644 --- a/src/v2/providers/alerts/appDistribution.ts +++ b/src/v2/providers/alerts/appDistribution.ts @@ -1,6 +1,6 @@ // The MIT License (MIT) // -// Copyright (c) 2017 Firebase +// Copyright (c) 2022 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 diff --git a/src/v2/providers/alerts/billing.ts b/src/v2/providers/alerts/billing.ts index fccbd198f..272517e8f 100644 --- a/src/v2/providers/alerts/billing.ts +++ b/src/v2/providers/alerts/billing.ts @@ -1,6 +1,6 @@ // The MIT License (MIT) // -// Copyright (c) 2017 Firebase +// Copyright (c) 2022 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 diff --git a/src/v2/providers/alerts/crashlytics.ts b/src/v2/providers/alerts/crashlytics.ts index d74c52c87..699418cdc 100644 --- a/src/v2/providers/alerts/crashlytics.ts +++ b/src/v2/providers/alerts/crashlytics.ts @@ -1,6 +1,6 @@ // The MIT License (MIT) // -// Copyright (c) 2017 Firebase +// Copyright (c) 2022 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 diff --git a/src/v2/providers/alerts/index.ts b/src/v2/providers/alerts/index.ts index 3958288c6..d16ef00fe 100644 --- a/src/v2/providers/alerts/index.ts +++ b/src/v2/providers/alerts/index.ts @@ -1,6 +1,6 @@ // The MIT License (MIT) // -// Copyright (c) 2017 Firebase +// Copyright (c) 2022 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 diff --git a/src/v2/providers/identity.ts b/src/v2/providers/identity.ts index a2c8f900a..9b7ce6c94 100644 --- a/src/v2/providers/identity.ts +++ b/src/v2/providers/identity.ts @@ -1,6 +1,6 @@ // The MIT License (MIT) // -// Copyright (c) 2017 Firebase +// Copyright (c) 2022 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 diff --git a/src/v2/providers/pubsub.ts b/src/v2/providers/pubsub.ts index 7506f6ed2..bdf6f0aa7 100644 --- a/src/v2/providers/pubsub.ts +++ b/src/v2/providers/pubsub.ts @@ -1,6 +1,6 @@ // The MIT License (MIT) // -// Copyright (c) 2017 Firebase +// Copyright (c) 2022 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 diff --git a/src/v2/providers/storage.ts b/src/v2/providers/storage.ts index 6834863ca..9943396e6 100644 --- a/src/v2/providers/storage.ts +++ b/src/v2/providers/storage.ts @@ -1,6 +1,6 @@ // The MIT License (MIT) // -// Copyright (c) 2017 Firebase +// Copyright (c) 2022 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