Skip to content

fix execute script#61

Merged
eluce2 merged 1 commit intomainfrom
08-12-fix_execute_script
Aug 12, 2025
Merged

fix execute script#61
eluce2 merged 1 commit intomainfrom
08-12-fix_execute_script

Conversation

@eluce2
Copy link
Collaborator

@eluce2 eluce2 commented Aug 12, 2025

Summary by CodeRabbit

  • New Features

    • Added executeScript to the Data API client to run scripts directly.
    • Layout is now inferred from the client, so you no longer need to pass it when executing scripts.
    • Supports optional script parameters.
  • Tests

    • Updated tests to reflect layout inference in executeScript.
  • Chores

    • Added changeset for a patch release.

@vercel
Copy link

vercel bot commented Aug 12, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Project Deployment Preview Updated (UTC)
proofkit-docs Failed Aug 12, 2025 2:30pm

@eluce2 eluce2 marked this pull request as ready for review August 12, 2025 14:30
Copy link
Collaborator Author

eluce2 commented Aug 12, 2025

This stack of pull requests is managed by Graphite. Learn more about stacking.

@eluce2 eluce2 merged commit f3fa14e into main Aug 12, 2025
1 of 3 checks passed
@coderabbitai
Copy link

coderabbitai bot commented Aug 12, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Introduces executeScript support across the fmdapi package: adds ExecuteScriptOptions and Adapter.executeScript in core, relocates the type from fetch-base, wires a client wrapper that injects the current layout, updates tests to omit layout, and adds a changeset for a patch release.

Changes

Cohort / File(s) Summary
Release notes
/.changeset/old-pots-lose.md
Adds patch changeset for @proofkit/fmdapi: executeScript infers layout from client.
Adapter core API
/packages/fmdapi/src/adapters/core.ts
Adds ExecuteScriptOptions type and executeScript method to Adapter interface; imports ScriptParams/ScriptResponse.
Fetch adapter base refactor
/packages/fmdapi/src/adapters/fetch-base.ts
Removes local ExecuteScriptOptions type; imports it from core; updates imports accordingly.
Client API wiring
/packages/fmdapi/src/client.ts
Imports ExecuteScriptOptions; adds ExecuteScriptArgs (Omit<…,"layout">); implements _executeScript injecting current layout; exposes executeScript on returned API; destructures executeScript from adapter.
Tests update
/packages/fmdapi/tests/client-methods.test.ts
Updates executeScript test to omit explicit layout argument, relying on client’s layout.

Sequence Diagram(s)

sequenceDiagram
  actor Caller
  participant Client as DataApi Client
  participant Adapter
  participant Server as FM Data API

  Caller->>Client: executeScript({script, scriptParam})
  Client->>Client: Inject current layout
  Client->>Adapter: executeScript({layout, script, scriptParam})
  Adapter->>Server: POST /scripts with payload
  Server-->>Adapter: ScriptResponse
  Adapter-->>Client: ScriptResponse
  Client-->>Caller: ScriptResponse
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~15–20 minutes


📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 865e618 and a29ca94.

📒 Files selected for processing (5)
  • .changeset/old-pots-lose.md (1 hunks)
  • packages/fmdapi/src/adapters/core.ts (3 hunks)
  • packages/fmdapi/src/adapters/fetch-base.ts (1 hunks)
  • packages/fmdapi/src/client.ts (5 hunks)
  • packages/fmdapi/tests/client-methods.test.ts (0 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch 08-12-fix_execute_script

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

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.

1 participant