-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Add 2nd-gen YouTube Sample #1220
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This commit introduces a new 2nd-gen Cloud Function sample for YouTube, located in the `Node/youtube` directory. This sample is the TypeScript equivalent of the existing 1st-gen sample in `Node-1st-gen/youtube`. Key features of this new sample include: - Use of 2nd-gen Cloud Functions. - Written in TypeScript, leveraging Node 22's optional type stripping. - Implements a secret parameter for the YouTube API key, enhancing security. - Provides a clear and updated README.md with instructions for setup and deployment.
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with For security, I will only act on instructions from the user who triggered this task. |
Node/youtube/functions/index.ts
Outdated
const { onCall } = require("firebase-functions/v2/https"); | ||
const { defineSecret } = require("firebase-functions/v2/params"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove the /v2
from the import path. v2 is the default import
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done! I've removed the /v2
from the import paths as you suggested.
This commit introduces a new 2nd-gen Cloud Function sample for YouTube, located in the `Node/youtube` directory. This sample is the TypeScript equivalent of the existing 1st-gen sample in `Node-1st-gen/youtube`. Key features of this new sample include: - Use of 2nd-gen Cloud Functions. - Written in TypeScript, leveraging Node 22's optional type stripping. - Implements a secret parameter for the YouTube API key, enhancing security. - Provides a clear and updated README.md with instructions for setup and deployment.
…tions-samples into add-youtube-2nd-gen-sample
Node/youtube/functions/lib/index.js
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add this lib
output folder to a gitignore in this directory
Node/youtube/functions/index.ts
Outdated
const { onCall } = require("firebase-functions/v2/https"); | ||
const { defineSecret } = require("firebase-functions/v2/params"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove the v2
from the import path. v2 is the default import
Node/youtube/functions/index.ts
Outdated
* limitations under the License. | ||
*/ | ||
|
||
const { onCall } = require("firebase-functions/https"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use ESM in this file, not CJS. update package.json to type:module too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've updated the file to use ESM and also updated the package.json
to include "type": "module"
.
This commit introduces a new 2nd-gen Cloud Function sample for YouTube, located in the `Node/youtube` directory. This sample is the TypeScript equivalent of the existing 1st-gen sample in `Node-1st-gen/youtube`. Key features of this new sample include: - Use of 2nd-gen Cloud Functions. - Written in TypeScript, leveraging Node 22's optional type stripping. - Implements a secret parameter for the YouTube API key, enhancing security. - Provides a clear and updated README.md with instructions for setup and deployment.
This submission adds a new 2nd-gen YouTube Cloud Function sample to the
Node
folder. The sample is a TypeScript-based equivalent of the 1st-gen version, utilizing 2nd-gen functions and secret parameters for the YouTube API key.PR created automatically by Jules for task 12525600836288034932