Skip to content

[BUG] Published npm package missing generated/ types - paths resolves to any #19

Description

@bburda

Bug report

Steps to reproduce

  1. npm install @selfpatch/ros2-medkit-client-ts@0.1.1
  2. Import paths type: import type { paths } from '@selfpatch/ros2-medkit-client-ts'
  3. Test with a non-existent path:
type HasFake = '/this/does/not/exist' extends keyof paths ? true : false;
const test: HasFake = true; // no error - paths is any

Expected behavior

paths should be a typed record of all API endpoints from the OpenAPI spec. keyof paths should only include actual endpoint paths like /apps, /updates, etc.

Actual behavior

paths resolves to any because the import chain is broken:

  • dist/types.d.ts imports from '../generated/schema.js'
  • package.json has "files": ["dist"] so generated/ is excluded from the npm tarball
  • Consumers with skipLibCheck: true get silent any - zero type safety on all client calls

The generated/schema.d.ts exists in the repo and is correctly generated by CI, it just never makes it into the published package.

Fix

Add "generated" to the "files" array in clients/typescript/package.json, bump version, and push. CI will auto-publish.

Environment

  • ros2_medkit_clients version: 0.1.1
  • Spec version: 0.4.0
  • OS: N/A (packaging issue)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions