Skip to content

Fix TypeScript compilation errors in examples#497

Merged
xuyushun441-sys merged 4 commits intomainfrom
copilot/fix-issue-with-action-run
Feb 3, 2026
Merged

Fix TypeScript compilation errors in examples#497
xuyushun441-sys merged 4 commits intomainfrom
copilot/fix-issue-with-action-run

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 3, 2026

CI build failing due to TypeScript errors in examples/features and incorrect import paths in examples/guide-cli and examples/plugin-crm.

Changes

Dependency & Exports

  • Added @objectstack/runtime to examples/features/package.json
  • Exported RouteEntry type from runtime package

Type Safety in examples/features

  • registry-example.ts: Type guard for metadata.pluginSource access
    // Before: api.metadata?.pluginSource !== undefined
    // After: api.metadata && 'pluginSource' in api.metadata && api.metadata.pluginSource !== undefined
  • middleware-example.ts: Added Middleware type to forEach callback, enabled: true to all registrations
  • rest-server-example.ts:
    • Type annotations for route parameter and newUser variable
    • Type cast for MockProtocolProvider (avoid full interface implementation in example)
    • Added required config fields: objectParamStyle, cacheTtl, defaultAtomic

Import Path Corrections

  • examples/plugin-crm/objectstack.config.ts: Fixed import path from ../../plugin-bi to ../plugin-bi
  • examples/guide-cli/objectstack.config.ts:
    • Fixed import path from ../../plugin-advanced-crm to ../plugin-crm
    • Added required manifest field for app configuration
    • Simplified plugin references (removed broken CRMPlugin import)

All example files now compile with strict TypeScript checks and the full build passes successfully.

Original prompt

引用: https://github.com/objectstack-ai/spec/actions/runs/21613247653/job/62286470867#step:8:1


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@vercel
Copy link
Copy Markdown

vercel bot commented Feb 3, 2026

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

Project Deployment Actions Updated (UTC)
spec Ready Ready Preview, Comment Feb 3, 2026 4:15am

Request Review

Copilot AI and others added 2 commits February 3, 2026 02:36
- Add @objectstack/runtime dependency to examples/features package.json
- Export RouteEntry type from runtime package
- Fix pluginSource property access in registry-example.ts
- Add type annotations to middleware parameter in middleware-example.ts
- Add enabled field to all middleware registrations
- Fix MockProtocolProvider type casting in rest-server-example.ts
- Add missing config fields (objectParamStyle, cacheTtl, defaultAtomic)
- Add type annotation to newUser variable
- Add RouteEntry type to route parameter

Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Rename 'req' to 'request' in batch operation methods for better code clarity

Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix issue with action run step Fix TypeScript compilation errors in examples/features Feb 3, 2026
Copilot AI requested a review from hotlong February 3, 2026 02:42
@github-actions github-actions bot added dependencies Pull requests that update a dependency file size/s labels Feb 3, 2026
@hotlong
Copy link
Copy Markdown
Contributor

hotlong commented Feb 3, 2026

@copilot fix build

- Fix plugin-crm import path: ../../plugin-bi -> ../plugin-bi
- Fix guide-cli import path: ../../plugin-advanced-crm -> ../plugin-crm
- Add manifest to guide-cli config (required for all apps)
- Remove broken CRMPlugin import from guide-cli (simplify example)

Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Feb 3, 2026

@copilot fix build

Fixed in commit 7305cdf. The build was failing because:

  1. examples/guide-cli had an incorrect import path (../../plugin-advanced-crm../plugin-crm)
  2. examples/plugin-crm had an incorrect import path (../../plugin-bi../plugin-bi)
  3. examples/guide-cli was missing a required manifest field

All builds now pass successfully. ✅

Copilot AI changed the title Fix TypeScript compilation errors in examples/features Fix TypeScript compilation errors in examples Feb 3, 2026
@xuyushun441-sys xuyushun441-sys marked this pull request as ready for review February 3, 2026 04:33
@xuyushun441-sys xuyushun441-sys merged commit 690d666 into main Feb 3, 2026
10 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file size/s

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants