Skip to content

Conversation

@JohannesRudolph
Copy link
Member

  • Update action to use node24
  • chore: standardize build configuration and CI workflow
  • Align README: naming conventions and structure with related actions
  • feat: separate auth from register-source, use token file from well-known location
  • test: add token file reading tests and fix dist rebuild
  • feat: support building block run URL input with fallback to payload
  • refactor: break down run() function into smaller, focused functions
  • refactor: extract input extraction and register source logic into functions
  • refactor: make actions/core mockable
  • Refactor GitHub context handling in registerBuildingBlockSource
  • docs: update readme

- Update package.json to specify Node.js 24 runtime
- Standardize build scripts using @vercel/ncc
- Add Node.js native test framework support
- Update tsconfig.json to ES2020 target with consistent compiler options
- Add ci.yml workflow with Node 24, tests, and build verification
- Remove unnecessary Jest dependencies
- Add buildingBlockRunUrl input to action.yml for fetching building block run data
- Update index.ts to handle both URL-based and payload-based inputs
- URL-based input makes a GET request to fetch the building block run object
- Maintains backward compatibility with existing buildingBlockRun payload input
- Extract common logic for parsing building block run data from both sources
- Add tests for building block run parsing from URL and payload sources
- Extract loadTokenFromFile() to handle token file reading and validation
- Extract loadBuildingBlockRunFromBase64() to handle base64 decoding of payload input
- Extract loadBuildingBlockRunFromUrl() to handle HTTP GET requests for URL input
- Add TypeScript interfaces for TokenData and BuildingBlockRun for better type safety
- Simplify run() to orchestrate the helper functions and register the source
- Improves code readability and testability by separating concerns
…ctions

- Extract extractInputs() to handle input parsing and GitHub output setting
- Extract registerSource() to handle the POST request to meshStack API
- Extract buildRequestPayload() to construct the request payload
- Extract buildRequestHeaders() to construct the request headers
- Add TypeScript interfaces for better type safety:
  - BuildingBlockInput: represents individual building block inputs
  - RequestSource: represents the source section of the request payload
  - RequestPayload: represents the complete request payload
  - RequestHeaders: represents all HTTP headers with proper index signature
  - ExtractedInputs: type-safe dictionary for extracted inputs
- Simplify run() to orchestrate the helper functions
- All tests pass
@JohannesRudolph JohannesRudolph merged commit 9170625 into main Dec 10, 2025
2 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.

1 participant