Skip to content

Refactor: import shared types from @metacall/protocol to resolve TODOs (#30)#113

Open
madhavkapila wants to merge 2 commits intometacall:masterfrom
madhavkapila:fix-faas-30
Open

Refactor: import shared types from @metacall/protocol to resolve TODOs (#30)#113
madhavkapila wants to merge 2 commits intometacall:masterfrom
madhavkapila:fix-faas-30

Conversation

@madhavkapila
Copy link
Copy Markdown

Summary

Following the recent merge of protocol #46, the FaaS controllers still contained legacy duplicated types and custom file-walking logic marked with // TODO: Unify this with metacall/protocol.

This PR removes that technical debt by synchronizing the FaaS HTTP request interfaces and dependency installation logic directly with the canonical @metacall/protocol exports. It also bumps the protocol dependency to @0.1.27 and adds "skipLibCheck": true to tsconfig.json to bypass compilation errors caused by the updated axios DOM types included in the new protocol version.

Related issue

Fixes #30

Type of change

  • Bug fix
  • New feature
  • Documentation
  • Chore / Refactoring
  • Breaking change

How to test

Steps to verify the change locally:

  1. Checkout the branch.
  2. Run npm install to pull the updated @metacall/protocol dependency.
  3. Run npm run lint and npm run build to verify the types compile cleanly and the skipLibCheck bypasses the axios conflict.
  4. Run npm run integration to verify functionality.

Checklist

  • I have read the contributing guidelines
  • I added tests that prove my fix is effective or that my feature works
  • I updated documentation if necessary

Notes for reviewers

Important CI Note: The npm run integration test will fail with Exit Code 5 (Error: Unexpected end of form in busboy).

This is a pre-existing bug on upstream/master. I investigated the failure locally and found it is caused by form-data miscalculating the Content-Length of the Archiver stream sent by the CLI, which truncates the zip data over the network and aborts the stream.

I kept this PR strictly focused on closing the technical debt for #30. I have written up a full root-cause analysis for the stream bug and will open a dedicated issue + PR in the @metacall/protocol repository shortly to fix the payload buffering and get the FaaS pipeline completely green again.

Release notes

Refactored FaaS controllers and installation utilities to consume canonical types and file-walking methods directly from @metacall/protocol.

metacall#30)

- Replaces duplicated local types in deploy, delete, and repository controllers with protocol imports.
- Replaces custom file/runner scanning logic in install.ts with protocol's detectRunners and findFilesPath.
- Bumps @metacall/protocol dependency to latest to support newly exported types.
…s and resolved linting and formatting errors
@madhavkapila madhavkapila marked this pull request as ready for review March 6, 2026 22:42
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.

Refractor the existing controllers

1 participant