Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions packages/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,28 @@
"main": "dist/index.js",
"exports": {
".": {
"types": "./src/index.ts",
"types": "./dist/index.d.ts",
"import": "./dist/index.js",
"default": "./dist/index.js"
}
},
"files": [
"dist",
"src"
"dist"
],
"publishConfig": {
"access": "public"
},
"scripts": {
"build": "vite build",
"build": "vite build && tsc -p tsconfig.build.json",
"dev": "vite build --watch",
"lint": "npx @ton-ai-core/vibecode-linter src/",
"lint:tests": "npx @ton-ai-core/vibecode-linter tests/",
"lint:effect": "npx eslint --config eslint.effect-ts-check.config.mjs .",
"lint:types": "./scripts/lint-types.sh",
"check": "tsc --noEmit",
"test": "vitest run",
"typecheck": "tsc --noEmit"
"typecheck": "tsc --noEmit",
"test:consumer": "tsc -p tsconfig.build.json && tsc -p tests/consumer/tsconfig.json"
},
"repository": {
"type": "git",
Expand Down
22 changes: 22 additions & 0 deletions packages/app/tests/consumer/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// Consumer proof: external project imports createClientEffect and compiles with tsc --noEmit.
// This file must compile cleanly with no local module declaration overrides.
import { createClientEffect } from "@prover-coder-ai/openapi-effect"

type Paths = {
"/health": {
get: {
responses: {
200: {
content: {
"application/json": { ok: boolean }
}
}
}
}
}
}

const client = createClientEffect<Paths>()

// Verify .GET exists and returns something (compile-time only)
client.GET("/health")
16 changes: 16 additions & 0 deletions packages/app/tests/consumer/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"compilerOptions": {
"strict": true,
"noEmit": true,
"module": "NodeNext",
"moduleResolution": "NodeNext",
"target": "ES2022",
"lib": ["ES2022", "DOM"],
"verbatimModuleSyntax": true,
"baseUrl": ".",
"paths": {
"@prover-coder-ai/openapi-effect": ["../../dist/index.d.ts"]
}
Comment thread
coderabbitai[bot] marked this conversation as resolved.
},
"include": ["index.ts"]
}
18 changes: 18 additions & 0 deletions packages/app/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"rootDir": "src",
"outDir": "dist",
"declaration": true,
"declarationMap": true,
"emitDeclarationOnly": true,
"lib": ["ES2022", "DOM", "DOM.Iterable"],
"types": ["node"]
},
"include": ["src/**/*"],
"exclude": [
"src/examples/**/*",
"node_modules",
"dist"
]
}
3 changes: 2 additions & 1 deletion packages/app/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
],
"exclude": [
"dist",
"node_modules"
"node_modules",
"tests/consumer"
]
}
Loading