fork of hey-api/openapi-ts because I need some additional things

Merge pull request #2797 from hey-api/ci/examples-fix

ci: correctly build and test examples

authored by

Lubos and committed by
GitHub
d880b9e6 5538531a

+4 -12
+2 -2
.github/workflows/ci.yml
··· 39 39 40 40 - name: Build examples 41 41 if: matrix.node-version == '24.10.0' && matrix.os == 'ubuntu-latest' 42 - run: pnpm build --filter="@examples/**" 42 + run: pnpm build --filter="@example/**" 43 43 44 44 - name: Run linter 45 45 run: pnpm lint ··· 52 52 53 53 - name: Test examples 54 54 if: matrix.node-version == '24.10.0' && matrix.os == 'ubuntu-latest' 55 - run: pnpm test --filter="@examples/**" 55 + run: pnpm test --filter="@example/**" 56 56 57 57 - name: Publish preview packages 58 58 if: github.event_name == 'pull_request' && matrix.node-version == '24.10.0' && matrix.os == 'ubuntu-latest'
+1 -5
packages/openapi-ts/src/plugins/@hey-api/typescript/plugin.ts
··· 9 9 import { stringCase } from '../../../utils/stringCase'; 10 10 import { fieldName } from '../../shared/utils/case'; 11 11 import { createSchemaComment } from '../../shared/utils/schema'; 12 + import type { SchemaWithType } from '../../zod/shared/types'; 12 13 import { createClientOptions } from './clientOptions'; 13 14 import { exportType } from './export'; 14 15 import { operationToType } from './operation'; 15 16 import type { HeyApiTypeScriptPlugin } from './types'; 16 17 import { webhookToType } from './webhook'; 17 18 import { createWebhooks } from './webhooks'; 18 - 19 - interface SchemaWithType<T extends Required<IR.SchemaObject>['type']> 20 - extends Omit<IR.SchemaObject, 'type'> { 21 - type: Extract<Required<IR.SchemaObject>['type'], T>; 22 - } 23 19 24 20 const arrayTypeToIdentifier = ({ 25 21 plugin,
+1 -5
packages/openapi-ts/src/plugins/valibot/plugin.ts
··· 10 10 import { numberRegExp } from '../../utils/regexp'; 11 11 import { pathToSymbolResourceType } from '../shared/utils/meta'; 12 12 import { createSchemaComment } from '../shared/utils/schema'; 13 + import type { SchemaWithType } from '../zod/shared/types'; 13 14 import { identifiers } from './constants'; 14 15 import { 15 16 INTEGER_FORMATS, ··· 20 21 import { operationToValibotSchema } from './operation'; 21 22 import type { ValibotPlugin } from './types'; 22 23 import { webhookToValibotSchema } from './webhook'; 23 - 24 - interface SchemaWithType<T extends Required<IR.SchemaObject>['type']> 25 - extends Omit<IR.SchemaObject, 'type'> { 26 - type: Extract<Required<IR.SchemaObject>['type'], T>; 27 - } 28 24 29 25 export interface State { 30 26 circularReferenceTracker: Set<string>;