@astryxdesign/cli 0.6.3-canary.17044ab → 0.6.3-canary.1748644

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 (71) hide show
  1. package/api/theme/build/build.mjs +6 -20
  2. package/api/theme/build/build.test.mjs +0 -127
  3. package/authoring/_shared/contract.ts +0 -22
  4. package/authoring/codemod/codemod.doc.mjs +1 -6
  5. package/authoring/codemod/parse.d.mts +8 -8
  6. package/authoring/codemod/parse.mjs +6 -8
  7. package/authoring/config/parse.d.mts +13 -13
  8. package/authoring/config/parse.mjs +8 -8
  9. package/authoring/config/type.ts +3 -3
  10. package/authoring/debug/parse.d.mts +4 -4
  11. package/authoring/debug/parse.mjs +3 -3
  12. package/authoring/doctypes/_schema.d.mts +11 -121
  13. package/authoring/doctypes/_schema.mjs +13 -144
  14. package/authoring/doctypes/base/graph-fields.doc.mjs +4 -11
  15. package/authoring/doctypes/base/type.ts +4 -8
  16. package/authoring/doctypes/command/command.doc.mjs +2 -3
  17. package/authoring/doctypes/command/parse.d.mts +2 -2
  18. package/authoring/doctypes/command/parse.mjs +1 -1
  19. package/authoring/doctypes/command/type.ts +2 -2
  20. package/authoring/doctypes/component/component.doc.mjs +2 -5
  21. package/authoring/doctypes/component/parse.d.mts +2 -2
  22. package/authoring/doctypes/component/parse.mjs +1 -1
  23. package/authoring/doctypes/component/type.ts +1 -1
  24. package/authoring/doctypes/enum/parse.d.mts +2 -2
  25. package/authoring/doctypes/enum/parse.mjs +1 -1
  26. package/authoring/doctypes/enum/type.ts +1 -1
  27. package/authoring/doctypes/function/function.doc.mjs +0 -4
  28. package/authoring/doctypes/function/parse.d.mts +2 -2
  29. package/authoring/doctypes/function/parse.mjs +1 -1
  30. package/authoring/doctypes/function/type.ts +1 -1
  31. package/authoring/doctypes/hook/hook.doc.mjs +0 -4
  32. package/authoring/doctypes/hook/parse.d.mts +2 -2
  33. package/authoring/doctypes/hook/parse.mjs +1 -1
  34. package/authoring/doctypes/hook/type.ts +1 -1
  35. package/authoring/doctypes/legacy.d.mts +6 -6
  36. package/authoring/doctypes/legacy.mjs +3 -3
  37. package/authoring/doctypes/namespace/namespace.doc.mjs +3 -7
  38. package/authoring/doctypes/namespace/parse.d.mts +2 -2
  39. package/authoring/doctypes/namespace/parse.mjs +1 -1
  40. package/authoring/doctypes/namespace/type.ts +2 -2
  41. package/authoring/doctypes/parse.d.mts +18 -18
  42. package/authoring/doctypes/parse.mjs +9 -9
  43. package/authoring/doctypes/reference/parse.d.mts +2 -2
  44. package/authoring/doctypes/reference/parse.mjs +1 -1
  45. package/authoring/doctypes/reference/reference.doc.mjs +2 -6
  46. package/authoring/doctypes/reference/type.ts +1 -1
  47. package/authoring/doctypes/schema/parse.d.mts +2 -2
  48. package/authoring/doctypes/schema/parse.mjs +1 -1
  49. package/authoring/doctypes/schema/type.ts +2 -2
  50. package/authoring/doctypes/template/parse.d.mts +1 -92
  51. package/authoring/doctypes/template/parse.mjs +1 -33
  52. package/authoring/doctypes/template/template.doc.mjs +0 -4
  53. package/authoring/doctypes/template/type.ts +1 -4
  54. package/authoring/doctypes/types.ts +10 -10
  55. package/authoring/gap-report/parse.d.mts +9 -9
  56. package/authoring/gap-report/parse.mjs +6 -6
  57. package/authoring/gap-report/type.ts +1 -1
  58. package/authoring/identity/identity.doc.mjs +2 -3
  59. package/authoring/identity/type.ts +10 -10
  60. package/authoring/index.d.ts +19 -19
  61. package/authoring/integration/parse.d.mts +2 -2
  62. package/authoring/integration/parse.mjs +1 -1
  63. package/authoring/integration/schema.d.mts +4 -4
  64. package/authoring/integration/schema.mjs +3 -3
  65. package/authoring/integration/type.ts +1 -1
  66. package/foundation/discovery/authoring-self-docs.test.mjs +12 -71
  67. package/foundation/discovery/docs-discovery.d.mts +0 -4
  68. package/foundation/discovery/docs-discovery.mjs +2 -16
  69. package/foundation/discovery/docs-discovery.test.mjs +11 -47
  70. package/package.json +9 -9
  71. package/authoring/doctypes/load-contract.test.mjs +0 -207
@@ -12,10 +12,9 @@
12
12
  * - A .d.ts (plus an optional .variants.d.ts for custom prop values)
13
13
  *
14
14
  * It performs the writes and returns a `theme.build` receipt — its `warnings`
15
- * carry override problems, every declaration core's generator dropped because
16
- * its value could not stay one CSS declaration, and any fonts the theme names
17
- * but does not load (font-warning.mjs) — or `null` when the theme produced no
18
- * CSS (nothing to build). Errors throw AstryxError (with
15
+ * carry override problems and any fonts the theme names but does not load
16
+ * (font-warning.mjs) — or `null` when the theme produced no CSS (nothing to
17
+ * build). Errors throw AstryxError (with
19
18
  * a stable code). Human progress is emitted through the shared `logger`
20
19
  * (silent by default), so the CLI keeps its exact output while a programmatic
21
20
  * caller stays quiet.
@@ -2304,15 +2303,7 @@ async function themeBuildInternal(
2304
2303
  const scopeSelector = themeScopeStart(themeDef.name);
2305
2304
  const scopeTo = THEME_SCOPE_TO;
2306
2305
 
2307
- // Older cores ignore this optional collector. Current core writes the same
2308
- // warning text here that runtime callers receive on the console.
2309
- /** @type {string[]} */
2310
- const droppedDeclarations = [];
2311
-
2312
- const {component, prose} = _generateThemeRulesSplit(
2313
- resolvedTheme,
2314
- droppedDeclarations,
2315
- );
2306
+ const {component, prose} = _generateThemeRulesSplit(resolvedTheme);
2316
2307
  const cssParts = [];
2317
2308
  // Prose element defaults always ship — the `<Theme>` runtime
2318
2309
  // (generateThemeCSS) always emits them, so the build must too, or the
@@ -2331,7 +2322,7 @@ async function themeBuildInternal(
2331
2322
  let adaptationCss;
2332
2323
  try {
2333
2324
  adaptationCss = _generateAdaptationCSS
2334
- ? _generateAdaptationCSS(resolvedTheme, droppedDeclarations)
2325
+ ? _generateAdaptationCSS(resolvedTheme)
2335
2326
  : {component: '', prose: ''};
2336
2327
  } catch (error) {
2337
2328
  const message =
@@ -2377,16 +2368,11 @@ async function themeBuildInternal(
2377
2368
  // adaptations on the same resolved leaf.
2378
2369
  let onMediaCss = '';
2379
2370
  if (_generateOnMediaCSS) {
2380
- onMediaCss = _generateOnMediaCSS(resolvedTheme, droppedDeclarations);
2371
+ onMediaCss = _generateOnMediaCSS(resolvedTheme);
2381
2372
  if (onMediaCss) {
2382
2373
  cssParts.push(`@layer astryx-theme {\n${onMediaCss}\n}`);
2383
2374
  }
2384
2375
  }
2385
- for (const message of droppedDeclarations) {
2386
- const w = `Declaration ${message}. The generated CSS omits it; fix the value in the theme source.`;
2387
- warningMessages.push(w);
2388
- logger.warn(` ⚠ ${w}`);
2389
- }
2390
2376
  if (cssParts.length === 0) {
2391
2377
  logger.log('No overrides found — nothing to build.');
2392
2378
  return null;
@@ -206,133 +206,6 @@ describe('themeBuild() — receipt', () => {
206
206
  });
207
207
  });
208
208
 
209
- describe('themeBuild() — dropped declarations reach the receipt', () => {
210
- // Core's generator refuses a declaration whose value would end it early
211
- // (an unquoted `;` or brace, an unclosed string/comment/url). The runtime
212
- // says so on the console; a build has a receipt, so every drop must land in
213
- // `warnings` — a programmatic caller otherwise sees `warnings: []` while the
214
- // CSS silently omits a value the generated JS still carries.
215
- it('reports every dropped declaration, from every generator path, in warnings', async () => {
216
- const themeFile = path.join(tmpDir, 'dropped.mjs');
217
- fs.writeFileSync(
218
- themeFile,
219
- `export default {
220
- name: 'dropped',
221
- tokens: {
222
- '--color-bg': '#0a0a0a } body { background: url(https://example.com/token) ',
223
- },
224
- components: {
225
- button: {
226
- 'variant:secondary': {
227
- backgroundColor: 'red; background-image: url(https://example.com/component)',
228
- ':hover': {color: '"https://example.com/pseudo'},
229
- },
230
- },
231
- },
232
- onDark: {
233
- tokens: {'--color-bg': 'url(https://example.com/dark'},
234
- },
235
- adaptations: {
236
- rules: [
237
- {
238
- when: {pointer: 'coarse'},
239
- value: {tokens: {'--color-bg': 'red /* https://example.com/adaptation'}},
240
- },
241
- ],
242
- },
243
- };\n`,
244
- );
245
-
246
- const warnSpy = vi.spyOn(console, 'warn').mockImplementation(() => {});
247
- let result;
248
- try {
249
- result = await themeBuild('dropped.mjs', {}, {cwd: tmpDir});
250
- // Drops are collected, not printed: the programmatic API stays silent.
251
- expect(warnSpy).not.toHaveBeenCalled();
252
- } finally {
253
- warnSpy.mockRestore();
254
- }
255
-
256
- const css = fs.readFileSync(path.join(tmpDir, 'dropped.css'), 'utf8');
257
- expect(css).not.toContain('example.com');
258
-
259
- const warnings = result?.data.warnings ?? [];
260
- expect(warnings).toHaveLength(5);
261
- expect(warnings).toEqual(
262
- expect.arrayContaining([
263
- expect.stringMatching(
264
- /^Declaration dropped "--color-bg" in tokens: an unquoted "}" would close the rule/,
265
- ),
266
- expect.stringMatching(
267
- /^Declaration dropped "background-color" in components\.button\["variant:secondary"\]: an unquoted ";" would end the declaration/,
268
- ),
269
- expect.stringMatching(
270
- /^Declaration dropped "color" in components\.button\["variant:secondary"\]\[":hover"\]: an unclosed " string/,
271
- ),
272
- expect.stringMatching(
273
- /^Declaration dropped "--color-bg" in onDark\.tokens: an unclosed url\(/,
274
- ),
275
- expect.stringMatching(
276
- /^Declaration dropped "--color-bg" in adaptations\[0\]\.tokens: an unclosed \/\* comment/,
277
- ),
278
- ]),
279
- );
280
- for (const w of warnings) {
281
- expect(w).toContain('The generated CSS omits it');
282
- }
283
- });
284
-
285
- it('generates CSS for legacy null tokens without losing neighboring declarations', async () => {
286
- fs.writeFileSync(
287
- path.join(tmpDir, 'legacy.mjs'),
288
- `export default {
289
- name: 'legacy',
290
- tokens: {'--color-background-body': null, '--spacing-4': 12},
291
- onDark: {tokens: {'--color-background-body': null}},
292
- components: {button: {base: {borderRadius: '4px'}}},
293
- };\n`,
294
- );
295
-
296
- const result = await themeBuild('legacy.mjs', {}, {cwd: tmpDir});
297
- const css = fs.readFileSync(path.join(tmpDir, 'legacy.css'), 'utf8');
298
- expect(css).toContain('--color-background-body: null;');
299
- expect(css).toContain('--spacing-4: 12;');
300
- expect(css).toContain('border-radius: 4px;');
301
- expect(result?.data.warnings).toEqual([]);
302
- });
303
-
304
- it('keeps valid CSS that carries semicolons, and reports nothing', async () => {
305
- const themeFile = path.join(tmpDir, 'kept.mjs');
306
- fs.writeFileSync(
307
- themeFile,
308
- `export default {
309
- name: 'kept',
310
- tokens: {'--font-family-body': 'Gill\\\\ Sans, "Segoe;UI", serif /* ; */'},
311
- components: {
312
- button: {
313
- 'variant:secondary': {
314
- backgroundImage: 'URL(data:image/svg+xml;base64,PHN2Zz4=)',
315
- WebkitLineClamp: '2',
316
- },
317
- },
318
- },
319
- };\n`,
320
- );
321
-
322
- const result = await themeBuild('kept.mjs', {}, {cwd: tmpDir});
323
- const css = fs.readFileSync(path.join(tmpDir, 'kept.css'), 'utf8');
324
-
325
- expect(css).toContain(
326
- '--font-family-body: Gill\\ Sans, "Segoe;UI", serif /* ; */;',
327
- );
328
- expect(css).toContain(
329
- 'background-image: URL(data:image/svg+xml;base64,PHN2Zz4=);',
330
- );
331
- expect(css).toContain('-webkit-line-clamp: 2;');
332
- expect(result?.data.warnings).toEqual([]);
333
- });
334
- });
335
-
336
209
  describe('themeBuild() — nothing to build', () => {
337
210
  it('returns null and writes nothing when the generator yields no CSS', async () => {
338
211
  const themeFile = path.join(tmpDir, 'empty.mjs');
@@ -28,27 +28,5 @@ export type MutuallyAssignable<A, B> = [A] extends [B]
28
28
  : false
29
29
  : false;
30
30
 
31
- /**
32
- * `T` without string or number index signatures, at every depth. A
33
- * `.passthrough()` schema infers one and a hand-written interface never has
34
- * one, so a lock drops them before comparing named fields. Recursive fields
35
- * that a schema casts to their public type compare equal by construction.
36
- */
37
- export type NamedFields<T> = T extends readonly (infer U)[]
38
- ? NamedFields<U>[]
39
- : T extends (...args: never[]) => unknown
40
- ? T
41
- : T extends object
42
- ? {
43
- [
44
- K in keyof T as string extends K
45
- ? never
46
- : number extends K
47
- ? never
48
- : K
49
- ]: NamedFields<T[K]>;
50
- }
51
- : T;
52
-
53
31
  /** Compiles only when `T` is exactly `true`; otherwise a type error. */
54
32
  export type Expect<T extends true> = T;
@@ -63,13 +63,11 @@ export const doc = {
63
63
  name: 'file.path',
64
64
  type: 'string',
65
65
  description: 'Absolute path to the file being transformed.',
66
- required: true,
67
66
  },
68
67
  {
69
68
  name: 'file.source',
70
69
  type: 'string',
71
70
  description: 'The current source contents of the file.',
72
- required: true,
73
71
  },
74
72
  ],
75
73
  },
@@ -83,21 +81,18 @@ export const doc = {
83
81
  type: 'unknown',
84
82
  description:
85
83
  'A jscodeshift instance configured with a parser for the file.',
86
- required: true,
87
84
  },
88
85
  {
89
86
  name: 'api.stats',
90
87
  type: '(...args: unknown[]) => void',
91
88
  description:
92
89
  'Report a statistic (no-op-friendly; provided for jscodeshift parity).',
93
- required: true,
94
90
  },
95
91
  {
96
92
  name: 'api.report',
97
93
  type: '(...args: unknown[]) => void',
98
94
  description:
99
95
  'Report progress (no-op-friendly; provided for jscodeshift parity).',
100
- required: true,
101
96
  },
102
97
  ],
103
98
  },
@@ -105,7 +100,7 @@ export const doc = {
105
100
  },
106
101
  {
107
102
  name: 'type',
108
- type: "'code' | 'config'",
103
+ type: "'code'",
109
104
  description:
110
105
  "Discriminant for the file-transforming variant. Use 'config' for a " +
111
106
  'codemod that rewrites astryx.config.* instead (see notes).',
@@ -5,8 +5,8 @@
5
5
  * Compile-time drift-lock: sealed envelope must infer exactly the public
6
6
  * stamped-codemod union.
7
7
  *
8
- * @typedef {import('../_shared/contract.js').Expect<
9
- * import('../_shared/contract.js').Equal<
8
+ * @typedef {import('../_shared/contract').Expect<
9
+ * import('../_shared/contract').Equal<
10
10
  * z.infer<typeof codemodEnvelopeSchema>,
11
11
  * AstryxCodemod | AstryxConfigCodemod
12
12
  * >
@@ -24,10 +24,10 @@ export function parseCodemod(input: unknown, label?: string): AstryxCodemod | As
24
24
  * Compile-time drift-lock: sealed envelope must infer exactly the public
25
25
  * stamped-codemod union.
26
26
  */
27
- export type _CodemodDriftLock = import("../_shared/contract.js").Expect<import("../_shared/contract.js").Equal<z.infer<typeof codemodEnvelopeSchema>, AstryxCodemod | AstryxConfigCodemod>>;
28
- export type AstryxCodemod = import("./type.js").AstryxCodemod;
29
- export type AstryxConfigCodemod = import("./type.js").AstryxConfigCodemod;
30
- export type AstryxCodemodTransform = import("./type.js").AstryxCodemodTransform;
27
+ export type _CodemodDriftLock = import("../_shared/contract").Expect<import("../_shared/contract").Equal<z.infer<typeof codemodEnvelopeSchema>, AstryxCodemod | AstryxConfigCodemod>>;
28
+ export type AstryxCodemod = import("./type").AstryxCodemod;
29
+ export type AstryxConfigCodemod = import("./type").AstryxConfigCodemod;
30
+ export type AstryxCodemodTransform = import("./type").AstryxCodemodTransform;
31
31
  import { z } from 'zod';
32
32
  /**
33
33
  * The load-boundary contract: a stamped codemod default export, discriminated
@@ -38,13 +38,13 @@ declare const codemodEnvelopeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
38
38
  description: z.ZodOptional<z.ZodString>;
39
39
  isOptional: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
40
40
  fileExtensions: z.ZodOptional<z.ZodArray<z.ZodString>>;
41
- transform: z.ZodType<import("./type.js").AstryxCodemodTransform, any, z.core.$ZodTypeInternals<import("./type.js").AstryxCodemodTransform, any>>;
41
+ transform: z.ZodType<import("./type").AstryxCodemodTransform, any, z.core.$ZodTypeInternals<import("./type").AstryxCodemodTransform, any>>;
42
42
  type: z.ZodLiteral<"code">;
43
43
  }, z.core.$strict>, z.ZodObject<{
44
44
  title: z.ZodString;
45
45
  description: z.ZodOptional<z.ZodString>;
46
46
  isOptional: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
47
- transform: z.ZodType<import("./type.js").AstryxCodemodTransform, any, z.core.$ZodTypeInternals<import("./type.js").AstryxCodemodTransform, any>>;
47
+ transform: z.ZodType<import("./type").AstryxCodemodTransform, any, z.core.$ZodTypeInternals<import("./type").AstryxCodemodTransform, any>>;
48
48
  type: z.ZodLiteral<"config">;
49
49
  }, z.core.$strict>], "type">;
50
50
  export {};
@@ -10,14 +10,12 @@
10
10
  import {z} from 'zod';
11
11
  import {formatZodError} from '../_shared/errors.mjs';
12
12
 
13
- /** @typedef {import('./type.js').AstryxCodemod} AstryxCodemod */
14
- /** @typedef {import('./type.js').AstryxConfigCodemod} AstryxConfigCodemod */
15
- /** @typedef {import('./type.js').AstryxCodemodTransform} AstryxCodemodTransform */
13
+ /** @typedef {import('./type').AstryxCodemod} AstryxCodemod */
14
+ /** @typedef {import('./type').AstryxConfigCodemod} AstryxConfigCodemod */
15
+ /** @typedef {import('./type').AstryxCodemodTransform} AstryxCodemodTransform */
16
16
 
17
17
  const transform = /** @type {z.ZodType<AstryxCodemodTransform>} */ (
18
- z.custom(value => typeof value === 'function', {
19
- message: 'Expected a function',
20
- })
18
+ z.custom(value => typeof value === 'function', {message: 'Expected a function'})
21
19
  );
22
20
 
23
21
  const codeCodemodSchema = z
@@ -54,8 +52,8 @@ const codemodEnvelopeSchema = z.discriminatedUnion('type', [
54
52
  * Compile-time drift-lock: sealed envelope must infer exactly the public
55
53
  * stamped-codemod union.
56
54
  *
57
- * @typedef {import('../_shared/contract.js').Expect<
58
- * import('../_shared/contract.js').Equal<
55
+ * @typedef {import('../_shared/contract').Expect<
56
+ * import('../_shared/contract').Equal<
59
57
  * z.infer<typeof codemodEnvelopeSchema>,
60
58
  * AstryxCodemod | AstryxConfigCodemod
61
59
  * >
@@ -6,8 +6,8 @@
6
6
  * {@link AstryxConfig} type. If they drift, `Equal` becomes `false` and
7
7
  * `Expect<false>` fails the `tsconfig.authoring-contract.json` typecheck.
8
8
  *
9
- * @typedef {import('../_shared/contract.js').Expect<
10
- * import('../_shared/contract.js').MutuallyAssignable<z.infer<typeof configSchema>, AstryxConfig>
9
+ * @typedef {import('../_shared/contract').Expect<
10
+ * import('../_shared/contract').MutuallyAssignable<z.infer<typeof configSchema>, AstryxConfig>
11
11
  * >} _ConfigDriftLock
12
12
  */
13
13
  /**
@@ -23,13 +23,13 @@ export function parseConfig(input: unknown, label?: string): AstryxConfig;
23
23
  * {@link AstryxConfig} type. If they drift, `Equal` becomes `false` and
24
24
  * `Expect<false>` fails the `tsconfig.authoring-contract.json` typecheck.
25
25
  */
26
- export type _ConfigDriftLock = import("../_shared/contract.js").Expect<import("../_shared/contract.js").MutuallyAssignable<z.infer<typeof configSchema>, AstryxConfig>>;
27
- export type AstryxConfig = import("./type.js").AstryxConfig;
28
- export type PostCodemodHook = import("./type.js").PostCodemodHook;
29
- export type XleComponent = import("./type.js").XleComponent;
30
- export type DebugConfig = import("./type.js").DebugConfig;
31
- export type DebugEventHandler = import("../debug/type.js").DebugEventHandler;
32
- export type GapReportHandler = import("../gap-report/type.js").GapReportHandler;
26
+ export type _ConfigDriftLock = import("../_shared/contract").Expect<import("../_shared/contract").MutuallyAssignable<z.infer<typeof configSchema>, AstryxConfig>>;
27
+ export type AstryxConfig = import("./type").AstryxConfig;
28
+ export type PostCodemodHook = import("./type").PostCodemodHook;
29
+ export type XleComponent = import("./type").XleComponent;
30
+ export type DebugConfig = import("./type").DebugConfig;
31
+ export type DebugEventHandler = import("../debug/type").DebugEventHandler;
32
+ export type GapReportHandler = import("../gap-report/type").GapReportHandler;
33
33
  import { z } from 'zod';
34
34
  declare const configSchema: z.ZodObject<{
35
35
  integrations: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -40,14 +40,14 @@ declare const configSchema: z.ZodObject<{
40
40
  buildCommand: z.ZodType<(ctx: {
41
41
  packageDir: string;
42
42
  files: string[];
43
- }) => import("./type.js").PostCodemodCommand | null | undefined | Promise<import("./type.js").PostCodemodCommand | null | undefined>, any, z.core.$ZodTypeInternals<(ctx: {
43
+ }) => import("./type").PostCodemodCommand | null | undefined | Promise<import("./type").PostCodemodCommand | null | undefined>, any, z.core.$ZodTypeInternals<(ctx: {
44
44
  packageDir: string;
45
45
  files: string[];
46
- }) => import("./type.js").PostCodemodCommand | null | undefined | Promise<import("./type.js").PostCodemodCommand | null | undefined>, any>>;
46
+ }) => import("./type").PostCodemodCommand | null | undefined | Promise<import("./type").PostCodemodCommand | null | undefined>, any>>;
47
47
  }, z.core.$strict>>>;
48
48
  }, z.core.$strict>>;
49
- debug: z.ZodOptional<z.ZodType<import("../debug/type.js").DebugEventHandler, any, z.core.$ZodTypeInternals<import("../debug/type.js").DebugEventHandler, any>>>;
50
- gapReport: z.ZodOptional<z.ZodType<import("../gap-report/type.js").GapReportHandler, any, z.core.$ZodTypeInternals<import("../gap-report/type.js").GapReportHandler, any>>>;
49
+ debug: z.ZodOptional<z.ZodType<import("../debug/type").DebugEventHandler, any, z.core.$ZodTypeInternals<import("../debug/type").DebugEventHandler, any>>>;
50
+ gapReport: z.ZodOptional<z.ZodType<import("../gap-report/type").GapReportHandler, any, z.core.$ZodTypeInternals<import("../gap-report/type").GapReportHandler, any>>>;
51
51
  experimental: z.ZodOptional<z.ZodObject<{
52
52
  xle: z.ZodOptional<z.ZodObject<{
53
53
  components: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
@@ -13,12 +13,12 @@ import {z} from 'zod';
13
13
  import {formatZodError} from '../_shared/errors.mjs';
14
14
  import {parseGapReportHandler} from '../gap-report/parse.mjs';
15
15
 
16
- /** @typedef {import('./type.js').AstryxConfig} AstryxConfig */
17
- /** @typedef {import('./type.js').PostCodemodHook} PostCodemodHook */
18
- /** @typedef {import('./type.js').XleComponent} XleComponent */
19
- /** @typedef {import('./type.js').DebugConfig} DebugConfig */
20
- /** @typedef {import('../debug/type.js').DebugEventHandler} DebugEventHandler */
21
- /** @typedef {import('../gap-report/type.js').GapReportHandler} GapReportHandler */
16
+ /** @typedef {import('./type').AstryxConfig} AstryxConfig */
17
+ /** @typedef {import('./type').PostCodemodHook} PostCodemodHook */
18
+ /** @typedef {import('./type').XleComponent} XleComponent */
19
+ /** @typedef {import('./type').DebugConfig} DebugConfig */
20
+ /** @typedef {import('../debug/type').DebugEventHandler} DebugEventHandler */
21
+ /** @typedef {import('../gap-report/type').GapReportHandler} GapReportHandler */
22
22
 
23
23
  // Typed `z.custom` so `z.infer` reproduces the real function type (not `unknown`).
24
24
  const buildCommand = /** @type {z.ZodType<PostCodemodHook['buildCommand']>} */ (
@@ -95,8 +95,8 @@ const configSchema = z
95
95
  * {@link AstryxConfig} type. If they drift, `Equal` becomes `false` and
96
96
  * `Expect<false>` fails the `tsconfig.authoring-contract.json` typecheck.
97
97
  *
98
- * @typedef {import('../_shared/contract.js').Expect<
99
- * import('../_shared/contract.js').MutuallyAssignable<z.infer<typeof configSchema>, AstryxConfig>
98
+ * @typedef {import('../_shared/contract').Expect<
99
+ * import('../_shared/contract').MutuallyAssignable<z.infer<typeof configSchema>, AstryxConfig>
100
100
  * >} _ConfigDriftLock
101
101
  */
102
102
 
@@ -9,8 +9,8 @@
9
9
  * boundary; there is no factory to call.
10
10
  */
11
11
 
12
- import type {DebugEventHandler} from '../debug/type.js';
13
- import type {GapReportHandler} from '../gap-report/type.js';
12
+ import type {DebugEventHandler} from '../debug/type';
13
+ import type {GapReportHandler} from '../gap-report/type';
14
14
 
15
15
  /**
16
16
  * A command to run as part of a post-codemod hook. Returned by a hook's
@@ -21,7 +21,7 @@ export interface PostCodemodCommand {
21
21
  args?: string[];
22
22
  options?: {
23
23
  cwd?: string;
24
- env?: Record<string, string | undefined>;
24
+ env?: NodeJS.ProcessEnv;
25
25
  timeout?: number;
26
26
  };
27
27
  }
@@ -7,8 +7,8 @@
7
7
  * `Expect<false>` fails the `tsconfig.authoring-contract.json` typecheck —
8
8
  * so a field added to the recorder without being published here breaks CI.
9
9
  *
10
- * @typedef {import('../_shared/contract.js').Expect<
11
- * import('../_shared/contract.js').MutuallyAssignable<z.infer<typeof eventSchema>, DebugEvent>
10
+ * @typedef {import('../_shared/contract').Expect<
11
+ * import('../_shared/contract').MutuallyAssignable<z.infer<typeof eventSchema>, DebugEvent>
12
12
  * >} _DebugEventDriftLock
13
13
  */
14
14
  /**
@@ -29,8 +29,8 @@ export function parseDebugEvent(input: unknown, label?: string): DebugEvent;
29
29
  * `Expect<false>` fails the `tsconfig.authoring-contract.json` typecheck —
30
30
  * so a field added to the recorder without being published here breaks CI.
31
31
  */
32
- export type _DebugEventDriftLock = import("../_shared/contract.js").Expect<import("../_shared/contract.js").MutuallyAssignable<z.infer<typeof eventSchema>, DebugEvent>>;
33
- export type DebugEvent = import("./type.js").DebugEvent;
32
+ export type _DebugEventDriftLock = import("../_shared/contract").Expect<import("../_shared/contract").MutuallyAssignable<z.infer<typeof eventSchema>, DebugEvent>>;
33
+ export type DebugEvent = import("./type").DebugEvent;
34
34
  import { z } from 'zod';
35
35
  declare const eventSchema: z.ZodObject<{
36
36
  schemaVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>]>;
@@ -22,7 +22,7 @@
22
22
  import {z} from 'zod';
23
23
  import {formatZodError} from '../_shared/errors.mjs';
24
24
 
25
- /** @typedef {import('./type.js').DebugEvent} DebugEvent */
25
+ /** @typedef {import('./type').DebugEvent} DebugEvent */
26
26
 
27
27
  const outcomeSchema = z.enum([
28
28
  'ok',
@@ -169,8 +169,8 @@ const eventSchema = z
169
169
  * `Expect<false>` fails the `tsconfig.authoring-contract.json` typecheck —
170
170
  * so a field added to the recorder without being published here breaks CI.
171
171
  *
172
- * @typedef {import('../_shared/contract.js').Expect<
173
- * import('../_shared/contract.js').MutuallyAssignable<z.infer<typeof eventSchema>, DebugEvent>
172
+ * @typedef {import('../_shared/contract').Expect<
173
+ * import('../_shared/contract').MutuallyAssignable<z.infer<typeof eventSchema>, DebugEvent>
174
174
  * >} _DebugEventDriftLock
175
175
  */
176
176