@yahoo/uds-create-config 5.26.0 → 5.27.1

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.
@@ -0,0 +1,18 @@
1
+ /**
2
+ * A schema that still takes a deprecated form but no longer offers it.
3
+ *
4
+ * Parsing accepts `offered` or `deprecated`, so stored data and older config files keep loading.
5
+ * Rendered as JSON Schema, which is what tool signatures, `config/api`, the MCP's input schemas and
6
+ * the docs are built from, it shows only `offered`, so nothing that reads a schema learns the old
7
+ * form.
8
+ */
9
+ import { z } from 'zod';
10
+ /**
11
+ * `read` with every deprecated form shown in the JSON Schema it renders. The schema-version tripwire
12
+ * reads through this, since it guards everything a client accepts, offered or not.
13
+ */
14
+ export declare function includingDeprecated<T>(read: () => T): T;
15
+ export declare function withDeprecated<O extends z.ZodTypeAny, D extends z.ZodTypeAny>({ offered, deprecated, }: {
16
+ offered: O;
17
+ deprecated: D;
18
+ }): z.ZodUnion<readonly [O, D]>;
@@ -0,0 +1,12 @@
1
+ import { z } from "zod";
2
+ function withDeprecated({ offered, deprecated }) {
3
+ const schema = z.union([offered, deprecated]);
4
+ const offeredOnly = () => {
5
+ const { $schema: _dialect, ...json } = z.toJSONSchema(offered, { io: "input" });
6
+ return json;
7
+ };
8
+ schema._zod.toJSONSchema = () => offeredOnly();
9
+ return schema;
10
+ }
11
+ //#endregion
12
+ export { withDeprecated };
@@ -0,0 +1,7 @@
1
+ /**
2
+ * A token's `overrides` also takes a list of `{ on, value }`, which is stored as the record keyed by
3
+ * each override's condition. The stored form is unchanged, so the hop is identity.
4
+ */
5
+ import type { SchemaMigration } from '../framework/schema-version';
6
+ export declare const TOKEN_OVERRIDES_LIST_VERSION = 20261013164300;
7
+ export declare const tokenOverridesListMigration: SchemaMigration;
@@ -0,0 +1,10 @@
1
+ //#region src/migrations/20261013164300_token_overrides_list.ts
2
+ const TOKEN_OVERRIDES_LIST_VERSION = 20261013164300;
3
+ const tokenOverridesListMigration = {
4
+ version: TOKEN_OVERRIDES_LIST_VERSION,
5
+ up(json) {
6
+ return json;
7
+ }
8
+ };
9
+ //#endregion
10
+ export { TOKEN_OVERRIDES_LIST_VERSION, tokenOverridesListMigration };