@routepact/core 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +0 -36
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -111,42 +111,6 @@ interface ApiRequest<TResource> {
111
111
  }
112
112
  ```
113
113
 
114
- ## Utilities
115
-
116
- ### `buildEndpoint(spec, options)`
117
-
118
- Interpolates path params and appends a query string.
119
-
120
- ```ts
121
- import { buildEndpoint } from "@routepact/core";
122
-
123
- buildEndpoint(PostPacts.getById, { params: { id: "42" } });
124
- // → "/posts/42"
125
-
126
- buildEndpoint(PostPacts.list, { queries: { page: "2", limit: "10" } });
127
- // → "/posts?page=2&limit=10"
128
- ```
129
-
130
- ### `exhaustiveGuard(value)`
131
-
132
- A compile-time exhaustiveness check for `switch` statements. Throws at runtime if an unhandled branch is reached.
133
-
134
- ```ts
135
- import { exhaustiveGuard, type HttpMethod } from "@routepact/core";
136
-
137
- function handle(method: HttpMethod) {
138
- switch (method) {
139
- case "get":
140
- return "GET";
141
- case "post":
142
- return "POST";
143
- // ... etc
144
- default:
145
- exhaustiveGuard(method); // TypeScript errors if a case is missing
146
- }
147
- }
148
- ```
149
-
150
114
  ## Type reference
151
115
 
152
116
  | Type | Description |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@routepact/core",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "Type-safe route spec definitions shared between server and client",
5
5
  "type": "module",
6
6
  "repository": "gitlab:mr5k/routepact",