@astryxdesign/cli 0.1.6-canary.e8d4c3f → 0.1.6-canary.eb23da7

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.
@@ -1,47 +0,0 @@
1
- // Copyright (c) Meta Platforms, Inc. and affiliates.
2
-
3
- /**
4
- * @file Template load-boundary schemas.
5
- *
6
- * The Zod schemas that integration template discovery runs a module's default
7
- * export through (see `loadModuleWithSchema`). Kept free of any
8
- * `@astryxdesign/core` import so the hot path that loads them (template
9
- * discovery, `astryx init`) does not require core's built `dist/`. The
10
- * authoring factories live in `@astryxdesign/core/authoring` and are re-exported
11
- * from `../template.mjs` for the public `@astryxdesign/cli/template` surface.
12
- */
13
-
14
- import {z} from 'zod';
15
-
16
- const PreviewSchema = z
17
- .object({
18
- image: z.string().optional(),
19
- aspectRatio: z.string().optional(),
20
- })
21
- .strict();
22
-
23
- /**
24
- * Shared authored-template shape. `type` is injected by the create* helpers,
25
- * so authors never write it. Inline source/sourceFile are intentionally NOT
26
- * part of v1 — a template's source is the required same-stem sibling file.
27
- * Exported so integration template discovery can validate the stamped result.
28
- */
29
- export const BaseTemplateSchema = z
30
- .object({
31
- name: z.string().min(1, 'name is required'),
32
- description: z.string().min(1, 'description is required'),
33
- category: z.string().optional(),
34
- componentsUsed: z.array(z.string()).optional(),
35
- preview: PreviewSchema.optional(),
36
- })
37
- .strict();
38
-
39
- /**
40
- * The metadata envelope integration template discovery validates: a stamped
41
- * template doc. This is the LOAD-boundary contract — a hand-written plain
42
- * object that matches this shape is accepted (discovery does not check "was it
43
- * made by the factory", only the shape).
44
- */
45
- export const TemplateEnvelopeSchema = BaseTemplateSchema.extend({
46
- type: z.enum(['page', 'block']),
47
- });