@ts-pf/docs 0.1.8 → 0.1.9
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.
- package/README.md +1 -1
- package/dist/docs.d.ts +12 -2
- package/dist/docs.d.ts.map +1 -1
- package/dist/docs.js.map +1 -1
- package/package.json +1 -1
- package/skills/ts-pf-docs/SKILL.md +1 -1
package/README.md
CHANGED
|
@@ -27,7 +27,7 @@ export const contract = router({
|
|
|
27
27
|
})
|
|
28
28
|
```
|
|
29
29
|
|
|
30
|
-
`docs.hidden: true` omits the procedure from `catalog()` unless you pass `filter: () => true`.
|
|
30
|
+
`docs.hidden: true` omits the procedure from `catalog()` unless you pass `filter: () => true`. `docs()` keeps `tags` and `hidden` as literal types when you write them inline (other fields stay `DocsMeta`), so `@ts-pf/mcp`'s `all({ tags })` and hidden filters work in types too.
|
|
31
31
|
|
|
32
32
|
## Generate a catalog
|
|
33
33
|
|
package/dist/docs.d.ts
CHANGED
|
@@ -6,8 +6,18 @@ export interface DocsMeta {
|
|
|
6
6
|
deprecated?: boolean;
|
|
7
7
|
hidden?: boolean;
|
|
8
8
|
}
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
/** `DocsMeta` with `tags` / `hidden` kept literal when given, so `@ts-pf/mcp` can filter on them in types. */
|
|
10
|
+
type TypedDocs<Tags extends string[], Hidden extends boolean> = Omit<DocsMeta, 'tags' | 'hidden'> & ([Tags] extends [never] ? {} : {
|
|
11
|
+
tags: Tags;
|
|
12
|
+
}) & ([Hidden] extends [never] ? {} : {
|
|
13
|
+
hidden: Hidden;
|
|
14
|
+
});
|
|
15
|
+
export declare function docs<const Tags extends string[] = never, const Hidden extends boolean = never>(value: Omit<DocsMeta, 'tags' | 'hidden'> & {
|
|
16
|
+
tags?: Tags;
|
|
17
|
+
hidden?: Hidden;
|
|
18
|
+
}): {
|
|
19
|
+
[DOCS_KEY]: TypedDocs<Tags, Hidden>;
|
|
11
20
|
};
|
|
12
21
|
export declare function getDocs(meta: Record<string, unknown>): DocsMeta | undefined;
|
|
22
|
+
export {};
|
|
13
23
|
//# sourceMappingURL=docs.d.ts.map
|
package/dist/docs.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docs.d.ts","sourceRoot":"","sources":["../src/docs.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,EAAG,MAAe,CAAA;AAEvC,MAAM,WAAW,QAAQ;IACvB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;IACf,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB;AAED,wBAAgB,IAAI,CAAC,KAAK,EAAE,QAAQ,GAAG;IAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"docs.d.ts","sourceRoot":"","sources":["../src/docs.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,EAAG,MAAe,CAAA;AAEvC,MAAM,WAAW,QAAQ;IACvB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;IACf,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB;AAED,8GAA8G;AAC9G,KAAK,SAAS,CAAC,IAAI,SAAS,MAAM,EAAE,EAAE,MAAM,SAAS,OAAO,IAAI,IAAI,CAClE,QAAQ,EACR,MAAM,GAAG,QAAQ,CAClB,GACC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,EAAE,GAAG;IAAE,IAAI,EAAE,IAAI,CAAA;CAAE,CAAC,GAC9C,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,EAAE,GAAG;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,CAAA;AAEtD,wBAAgB,IAAI,CAClB,KAAK,CAAC,IAAI,SAAS,MAAM,EAAE,GAAG,KAAK,EACnC,KAAK,CAAC,MAAM,SAAS,OAAO,GAAG,KAAK,EAEpC,KAAK,EAAE,IAAI,CAAC,QAAQ,EAAE,MAAM,GAAG,QAAQ,CAAC,GAAG;IAAE,IAAI,CAAC,EAAE,IAAI,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,GAC1E;IAAE,CAAC,QAAQ,CAAC,EAAE,SAAS,CAAC,IAAI,EAAE,MAAM,CAAC,CAAA;CAAE,CAEzC;AAED,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,QAAQ,GAAG,SAAS,CAM3E"}
|
package/dist/docs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docs.js","sourceRoot":"","sources":["../src/docs.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,QAAQ,GAAG,MAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"docs.js","sourceRoot":"","sources":["../src/docs.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,QAAQ,GAAG,MAAe,CAAA;AAkBvC,MAAM,UAAU,IAAI,CAIlB,KAA2E;IAE3E,OAAO,EAAE,CAAC,QAAQ,CAAC,EAAE,KAAgC,EAAE,CAAA;AACzD,CAAC;AAED,MAAM,UAAU,OAAO,CAAC,IAA6B;IACnD,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAA;IAC5B,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACxE,OAAO,SAAS,CAAA;IAClB,CAAC;IACD,OAAO,KAAiB,CAAA;AAC1B,CAAC"}
|
package/package.json
CHANGED
|
@@ -29,7 +29,7 @@ if (url.pathname === '/catalog.json') {
|
|
|
29
29
|
}
|
|
30
30
|
```
|
|
31
31
|
|
|
32
|
-
`docs.hidden: true` omits the procedure unless `filter: () => true`. Unconverted schemas become `{ kind: 'unavailable' }` — they do not fail the catalog.
|
|
32
|
+
`docs.hidden: true` omits the procedure unless `filter: () => true`. `docs()` keeps `tags` and `hidden` as literal types when you write them inline (other fields stay `DocsMeta`), so `@ts-pf/mcp`'s `all({ tags })` and hidden filters work in types too. Unconverted schemas become `{ kind: 'unavailable' }` — they do not fail the catalog.
|
|
33
33
|
|
|
34
34
|
## API
|
|
35
35
|
|