Skip to content

Conversation

sergio-eliot-rodriguez
Copy link
Collaborator

@sergio-eliot-rodriguez sergio-eliot-rodriguez commented Sep 24, 2025

Implements PDF Munk components (#17850)

Summary by CodeRabbit

  • New Features
    • Capture website screenshots as images.
    • Capture webpages as PDFs with options (paper size, orientation, headers/footers, page size, background).
    • Convert HTML/CSS to images with configurable dimensions.
    • Convert HTML/CSS to PDFs with paper and page size options.
  • Chores
    • Bumped component version to 0.1.0.
    • Added dependency to support HTTP requests.

Copy link

vercel bot commented Sep 24, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
pipedream-docs-redirect-do-not-edit Ignored Ignored Sep 24, 2025 11:15pm

Copy link
Contributor

coderabbitai bot commented Sep 24, 2025

Walkthrough

Adds four new actions for website and HTML conversion to image/PDF, implements a centralized HTTP client in pdf_munk.app.mjs with request helpers and API methods, and updates package.json to version 0.1.0 with a new @pipedream/platform dependency.

Changes

Cohort / File(s) Summary
New actions: website/image/PDF conversions
components/pdf_munk/actions/capture-website-screenshot-into-image/capture-website-screenshot-into-image.mjs, components/pdf_munk/actions/capture-website-screenshot-into-pdf/capture-website-screenshot-into-pdf.mjs, components/pdf_munk/actions/convert-html-to-image/convert-html-to-image.mjs, components/pdf_munk/actions/convert-html-to-pdf/convert-html-to-pdf.mjs
Added four action modules exposing metadata, props, and async run methods delegating to app methods for: website screenshot to image, website to PDF, HTML to image, and HTML to PDF. Each exports a summary and returns the API response.
App client and HTTP helpers
components/pdf_munk/pdf_munk.app.mjs
Introduced _baseUrl, _getHeaders, and _makeRequest helpers using axios from @pipedream/platform. Implemented methods: captureWebsiteScreenshot, captureWebsiteToPdf, convertHtmlToImage, convertHtmlToPdf, all performing POSTs to PDF Munk API.
Package metadata
components/pdf_munk/package.json
Bumped version to 0.1.0 and added dependency: @pipedream/platform ^3.1.0.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor User
  participant Action as Action Module
  participant App as pdf_munk.app.mjs
  participant API as PDF Munk API

  User->>Action: Provide props (e.g., url/html, options)
  rect rgba(200,230,255,0.3)
  note right of Action: New/updated flow
  Action->>App: Call method (e.g., captureWebsiteToPdf({...}))
  App->>App: _getHeaders() / _baseUrl()
  App->>API: POST /{endpoint} with JSON body
  API-->>App: Response (binary/meta)
  end
  App-->>Action: Return response
  Action-->>User: Export $summary and result

  alt Error
    API-->>App: Error response
    App-->>Action: Propagate error
    Action-->>User: Error surfaced by runtime
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Suggested reviewers

  • luancazarine
  • jcortes

Poem

I hop through bytes, ears high with cheer,
From HTML to PDF, the path is clear.
A click, a post, a screenshot spun,
Pages fold where APIs run.
Thump-thump! My paws stamp “ship it” glee —
Carrots for code, and docs set free. 🥕✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Description Check ⚠️ Warning The pull request description “Implements PDF Munk components (#17850)” does not follow the repository’s required template and is missing the mandatory “## WHY” section, as well as details about the changes, motivations, or impact. Without these elements, reviewers lack context to understand the purpose and scope of the implementation. Please update the description to match the template by adding a “## WHY” section explaining the motivation for these components, along with a brief summary of the changes and any relevant background or testing notes.
Title Check ❓ Inconclusive The title “Pdf munk components” is related to the overall addition of PDF Munk functionality but is too generic and does not clearly convey the specific changes introduced, such as new actions for capturing screenshots or converting HTML. It lacks detail needed for a reviewer to quickly grasp the primary enhancements. Please revise the title to succinctly summarize the main change, for example “Add PDF Munk actions for website screenshots and HTML-to-PDF/Image conversion,” so it clearly reflects the key features added.
✅ Passed checks (1 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b52da0e and f896921.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (6)
  • components/pdf_munk/actions/capture-website-screenshot-into-image/capture-website-screenshot-into-image.mjs (1 hunks)
  • components/pdf_munk/actions/capture-website-screenshot-into-pdf/capture-website-screenshot-into-pdf.mjs (1 hunks)
  • components/pdf_munk/actions/convert-html-to-image/convert-html-to-image.mjs (1 hunks)
  • components/pdf_munk/actions/convert-html-to-pdf/convert-html-to-pdf.mjs (1 hunks)
  • components/pdf_munk/package.json (2 hunks)
  • components/pdf_munk/pdf_munk.app.mjs (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2024-12-12T19:23:09.039Z
Learnt from: jcortes
PR: PipedreamHQ/pipedream#14935
File: components/sailpoint/package.json:15-18
Timestamp: 2024-12-12T19:23:09.039Z
Learning: When developing Pipedream components, do not add built-in Node.js modules like `fs` to `package.json` dependencies, as they are native modules provided by the Node.js runtime.

Applied to files:

  • components/pdf_munk/package.json
🧬 Code graph analysis (4)
components/pdf_munk/actions/convert-html-to-image/convert-html-to-image.mjs (3)
components/pdf_munk/actions/capture-website-screenshot-into-image/capture-website-screenshot-into-image.mjs (1)
  • response (20-23)
components/pdf_munk/actions/capture-website-screenshot-into-pdf/capture-website-screenshot-into-pdf.mjs (1)
  • response (83-91)
components/pdf_munk/actions/convert-html-to-pdf/convert-html-to-pdf.mjs (1)
  • response (69-75)
components/pdf_munk/actions/capture-website-screenshot-into-image/capture-website-screenshot-into-image.mjs (3)
components/pdf_munk/actions/capture-website-screenshot-into-pdf/capture-website-screenshot-into-pdf.mjs (1)
  • response (83-91)
components/pdf_munk/actions/convert-html-to-image/convert-html-to-image.mjs (1)
  • response (43-49)
components/pdf_munk/actions/convert-html-to-pdf/convert-html-to-pdf.mjs (1)
  • response (69-75)
components/pdf_munk/actions/convert-html-to-pdf/convert-html-to-pdf.mjs (3)
components/pdf_munk/actions/capture-website-screenshot-into-image/capture-website-screenshot-into-image.mjs (1)
  • response (20-23)
components/pdf_munk/actions/capture-website-screenshot-into-pdf/capture-website-screenshot-into-pdf.mjs (1)
  • response (83-91)
components/pdf_munk/actions/convert-html-to-image/convert-html-to-image.mjs (1)
  • response (43-49)
components/pdf_munk/actions/capture-website-screenshot-into-pdf/capture-website-screenshot-into-pdf.mjs (2)
components/pdf_munk/actions/capture-website-screenshot-into-image/capture-website-screenshot-into-image.mjs (1)
  • response (20-23)
components/pdf_munk/actions/convert-html-to-pdf/convert-html-to-pdf.mjs (1)
  • response (69-75)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: Publish TypeScript components
  • GitHub Check: pnpm publish
  • GitHub Check: Verify TypeScript components
  • GitHub Check: Lint Code Base
🔇 Additional comments (6)
components/pdf_munk/package.json (1)

3-17: Version bump and platform dependency look good

The new actions relying on @pipedream/platform justify bringing it in as a runtime dependency, and the minor version bump aligns with the added functionality.

components/pdf_munk/actions/capture-website-screenshot-into-image/capture-website-screenshot-into-image.mjs (1)

3-27: Action wiring matches the app surface.

The props and run logic cleanly delegate to the app client and surface a clear summary.

components/pdf_munk/actions/capture-website-screenshot-into-pdf/capture-website-screenshot-into-pdf.mjs (1)

3-95: PDF capture action looks well structured.

Good coverage of the configurable props and the hand-off to the shared app client.

components/pdf_munk/pdf_munk.app.mjs (1)

8-118: Shared request helper provides a solid foundation.

Centralizing the HTTP wiring with _makeRequest keeps the individual methods tidy and reusable.

components/pdf_munk/actions/convert-html-to-image/convert-html-to-image.mjs (1)

3-53: HTML→image action aligns with the app client.

Props are clear, defaults make sense, and the run path is straightforward.

components/pdf_munk/actions/convert-html-to-pdf/convert-html-to-pdf.mjs (1)

3-79: HTML→PDF action mirrors the expected flow.

Props mirror the API surface and the run method cleanly delegates to the app helper.

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@pipedream-component-development
Copy link
Collaborator

Thank you so much for submitting this! We've added it to our backlog to review, and our team has been notified.

@pipedream-component-development
Copy link
Collaborator

Thanks for submitting this PR! When we review PRs, we follow the Pipedream component guidelines. If you're not familiar, here's a quick checklist:

@michelle0927 michelle0927 linked an issue Sep 25, 2025 that may be closed by this pull request
@michelle0927 michelle0927 removed the request for review from jcortes September 25, 2025 15:01
@vunguyenhung vunguyenhung merged commit c8d25fa into PipedreamHQ:master Sep 30, 2025
13 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Components] pdf_munk
4 participants