mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-04-24 22:04:56 +00:00
- Created a new package for JSON Script Example with comprehensive examples demonstrating the full JSON script specification. - Added permissions for viewing, executing, and modifying examples in the JSON Script Example package. - Implemented functions for various expressions, statements, operators, and control flow in the JSON Script Example. - Developed a Storybook configuration for showcasing JSON Script Examples with interactive components. - Established a styles token file for consistent styling across the JSON Script Example package. - Introduced a new Lua Test Framework package with components for running and displaying test results. - Defined permissions for executing and viewing Lua test results, along with configuration and debugging capabilities. - Implemented a comprehensive set of functions for the Lua testing framework, including assertions and mocks. - Created Storybook stories for the Lua Test Framework to demonstrate the test runner and results display. - Added a styles token file for the Lua Test Framework to ensure a cohesive design.
173 lines
4.3 KiB
JSON
173 lines
4.3 KiB
JSON
{
|
|
"$schema": "https://metabuilder.dev/schemas/package-storybook.schema.json",
|
|
"featured": true,
|
|
"title": "GitHub Tools",
|
|
"description": "GitHub Actions viewer, run analysis, and workflow management components",
|
|
"stories": [
|
|
{
|
|
"name": "GitHubViewer",
|
|
"render": "fetch_runs",
|
|
"description": "Main GitHub Actions viewer with runs list and filters",
|
|
"args": {
|
|
"owner": "metabuilder-dev",
|
|
"repo": "metabuilder",
|
|
"workflow": "",
|
|
"token": ""
|
|
}
|
|
},
|
|
{
|
|
"name": "RunListWithData",
|
|
"render": "fetch_runs",
|
|
"description": "Run list populated with sample workflow runs",
|
|
"args": {
|
|
"runs": [
|
|
{
|
|
"id": 1,
|
|
"name": "CI Pipeline",
|
|
"status": "completed",
|
|
"conclusion": "success",
|
|
"head_branch": "main",
|
|
"created_at": "2026-01-02T10:00:00Z"
|
|
},
|
|
{
|
|
"id": 2,
|
|
"name": "CI Pipeline",
|
|
"status": "completed",
|
|
"conclusion": "failure",
|
|
"head_branch": "feature/new-ui",
|
|
"created_at": "2026-01-02T09:30:00Z"
|
|
},
|
|
{
|
|
"id": 3,
|
|
"name": "Deploy Preview",
|
|
"status": "in_progress",
|
|
"conclusion": null,
|
|
"head_branch": "main",
|
|
"created_at": "2026-01-02T10:15:00Z"
|
|
}
|
|
],
|
|
"loading": false
|
|
}
|
|
},
|
|
{
|
|
"name": "AnalysisPanel",
|
|
"render": "analyze",
|
|
"description": "Statistics and analysis dashboard",
|
|
"args": {
|
|
"stats": {
|
|
"total": 150,
|
|
"success": 120,
|
|
"failure": 25,
|
|
"pending": 5,
|
|
"success_rate": 80.0,
|
|
"avg_duration": 245
|
|
},
|
|
"timeRange": "7d"
|
|
}
|
|
},
|
|
{
|
|
"name": "RunDetails",
|
|
"render": "status",
|
|
"description": "Detailed view of a single workflow run",
|
|
"args": {
|
|
"run": {
|
|
"id": 1,
|
|
"name": "CI Pipeline",
|
|
"status": "completed",
|
|
"conclusion": "success",
|
|
"head_branch": "main"
|
|
},
|
|
"jobs": [
|
|
{ "id": 1, "name": "Build", "status": "completed", "conclusion": "success" },
|
|
{ "id": 2, "name": "Test", "status": "completed", "conclusion": "success" },
|
|
{ "id": 3, "name": "Deploy", "status": "completed", "conclusion": "success" }
|
|
],
|
|
"logs": "Running build...\nBuild completed successfully.\nRunning tests...\nAll tests passed."
|
|
}
|
|
},
|
|
{
|
|
"name": "StatusBadges",
|
|
"render": "status",
|
|
"description": "All status badge variants",
|
|
"type": "function"
|
|
}
|
|
],
|
|
"renders": {
|
|
"fetch_runs": {
|
|
"description": "Main viewer with run fetching functionality",
|
|
"featured": true
|
|
},
|
|
"analyze": {
|
|
"description": "Analysis panel with statistics"
|
|
},
|
|
"filter": {
|
|
"description": "Filter controls for runs"
|
|
},
|
|
"status": {
|
|
"description": "Status badge and formatting utilities"
|
|
}
|
|
},
|
|
"defaultContext": {
|
|
"user": {
|
|
"id": "demo-user",
|
|
"username": "demo_user",
|
|
"level": 2,
|
|
"email": "demo@example.com"
|
|
},
|
|
"tenant": {
|
|
"id": "demo-tenant",
|
|
"name": "Demo Organization"
|
|
},
|
|
"config": {
|
|
"owner": "metabuilder-dev",
|
|
"repo": "metabuilder"
|
|
}
|
|
},
|
|
"contextVariants": [
|
|
{
|
|
"name": "Standard User",
|
|
"description": "Can view runs and analyze statistics",
|
|
"context": {
|
|
"user": {
|
|
"username": "user",
|
|
"level": 2
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "Admin",
|
|
"description": "Can view, analyze, and trigger workflows",
|
|
"context": {
|
|
"user": {
|
|
"username": "admin",
|
|
"level": 3
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "Read Only",
|
|
"description": "Public read-only access",
|
|
"context": {
|
|
"user": {
|
|
"username": "guest",
|
|
"level": 1
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"scripts": {
|
|
"renderFunctions": ["fetch_runs", "analyze", "filter", "status"],
|
|
"ignoredScripts": ["tests", "init", "types", "db"]
|
|
},
|
|
"parameters": {
|
|
"layout": "padded",
|
|
"backgrounds": {
|
|
"default": "light",
|
|
"values": [
|
|
{ "name": "light", "value": "#f5f5f5" },
|
|
{ "name": "dark", "value": "#1a1a1a" }
|
|
]
|
|
}
|
|
}
|
|
}
|