@domain-first/project-structure 8.10.1 → 8.12.0

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 (58) hide show
  1. package/README.md +17 -7
  2. package/dist/287.js +406 -788
  3. package/dist/364.js +79 -0
  4. package/dist/38.js +31 -14
  5. package/dist/561.js +179 -96
  6. package/dist/783.js +1147 -0
  7. package/dist/{201.js → 878.js} +465 -2
  8. package/dist/agent-cli.d.ts +17 -6
  9. package/dist/agent-requests.d.ts +82 -8
  10. package/dist/config-file.d.ts +25 -1
  11. package/dist/frontend-cli.d.ts +3 -0
  12. package/dist/frontend-modules.d.ts +14 -0
  13. package/dist/graph.cjs +125 -5
  14. package/dist/graph.js +1 -1
  15. package/dist/index.cjs +3545 -2930
  16. package/dist/index.js +1 -1
  17. package/dist/init.cjs +368 -83
  18. package/dist/init.js +1 -1
  19. package/dist/integration.cjs +3545 -2930
  20. package/dist/integration.js +1 -1
  21. package/dist/integrations/openapi.d.ts +19 -2
  22. package/dist/integrations/orval.d.ts +31 -4
  23. package/dist/integrations/rest-endpoint-generator.d.ts +11 -7
  24. package/dist/integrations/storybook.d.ts +19 -1
  25. package/dist/lint.cjs +159 -22
  26. package/dist/lint.js +2 -2
  27. package/dist/page-router.d.ts +18 -0
  28. package/dist/react-module-move.d.ts +47 -14
  29. package/dist/react.cjs +1645 -999
  30. package/dist/react.js +2 -102
  31. package/dist/rest-adapters.d.ts +13 -0
  32. package/dist/svelte-agent-cli.spec.d.ts +1 -0
  33. package/dist/svelte.cjs +7373 -0
  34. package/dist/svelte.d.ts +2 -0
  35. package/dist/svelte.js +3 -0
  36. package/dist/sveltekit-app.d.ts +7 -0
  37. package/dist/upgrade-steps.d.ts +6 -1
  38. package/dist/upgrade-svelte.d.ts +15 -0
  39. package/dist/upgrade-svelte.spec.d.ts +1 -0
  40. package/dist/upgrade.cjs +307 -42
  41. package/dist/upgrade.js +132 -13
  42. package/dist/use-cases/add-integration.d.ts +1 -1
  43. package/dist/use-cases/delete-react-module.d.ts +4 -4
  44. package/dist/use-cases/index.d.ts +1 -0
  45. package/dist/use-cases/move-react-module.d.ts +2 -2
  46. package/dist/use-cases/rest-endpoint-generator.d.ts +6 -4
  47. package/dist/use-cases/scaffold-svelte-modules.d.ts +27 -0
  48. package/package.json +2 -1
  49. package/skills/df-ps-implement/SKILL.md +3 -3
  50. package/skills/df-ps-plan-feature/SKILL.md +1 -1
  51. package/skills/df-ps-scaffold/SKILL.md +9 -8
  52. package/skills/df-ps-scaffold/references/agent-mode.md +1 -1
  53. package/skills/df-ps-scaffold/references/agent-operations.md +8 -4
  54. package/skills/df-ps-scaffold/references/generators.md +1 -1
  55. package/skills/df-ps-scaffold/references/work-plan.md +1 -1
  56. package/skills/df-ps-svelte/SKILL.md +54 -0
  57. package/skills/df-ps-svelte/references/generators.md +56 -0
  58. package/dist/115.js +0 -615
@@ -204,8 +204,80 @@ export declare const reactRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
204
204
  name: z.ZodString;
205
205
  widgetType: z.ZodOptional<z.ZodEnum<{
206
206
  monolithic: "monolithic";
207
+ headless: "headless";
207
208
  separated: "separated";
209
+ }>>;
210
+ overwrite: z.ZodOptional<z.ZodBoolean>;
211
+ dryRun: z.ZodOptional<z.ZodBoolean>;
212
+ }, z.core.$strict>, z.ZodObject<{
213
+ operation: z.ZodLiteral<"ui-kit-component">;
214
+ name: z.ZodString;
215
+ overwrite: z.ZodOptional<z.ZodBoolean>;
216
+ dryRun: z.ZodOptional<z.ZodBoolean>;
217
+ }, z.core.$strict>, z.ZodObject<{
218
+ operation: z.ZodLiteral<"shared-hook" | "shared-model">;
219
+ name: z.ZodString;
220
+ overwrite: z.ZodOptional<z.ZodBoolean>;
221
+ dryRun: z.ZodOptional<z.ZodBoolean>;
222
+ }, z.core.$strict>, z.ZodObject<{
223
+ operation: z.ZodLiteral<"move-page">;
224
+ module: z.ZodString;
225
+ name: z.ZodString;
226
+ moveRoute: z.ZodOptional<z.ZodBoolean>;
227
+ overwrite: z.ZodOptional<z.ZodBoolean>;
228
+ dryRun: z.ZodOptional<z.ZodBoolean>;
229
+ }, z.core.$strict>, z.ZodObject<{
230
+ operation: z.ZodLiteral<"delete-page">;
231
+ module: z.ZodString;
232
+ deleteRoute: z.ZodOptional<z.ZodBoolean>;
233
+ overwrite: z.ZodOptional<z.ZodBoolean>;
234
+ dryRun: z.ZodOptional<z.ZodBoolean>;
235
+ }, z.core.$strict>, z.ZodObject<{
236
+ operation: z.ZodLiteral<"delete-widget">;
237
+ module: z.ZodString;
238
+ overwrite: z.ZodOptional<z.ZodBoolean>;
239
+ dryRun: z.ZodOptional<z.ZodBoolean>;
240
+ }, z.core.$strict>, z.ZodObject<{
241
+ operation: z.ZodLiteral<"move-ui-kit-component">;
242
+ module: z.ZodString;
243
+ name: z.ZodString;
244
+ overwrite: z.ZodOptional<z.ZodBoolean>;
245
+ dryRun: z.ZodOptional<z.ZodBoolean>;
246
+ }, z.core.$strict>, z.ZodObject<{
247
+ operation: z.ZodLiteral<"move-shared-hook" | "move-shared-model">;
248
+ module: z.ZodString;
249
+ name: z.ZodString;
250
+ overwrite: z.ZodOptional<z.ZodBoolean>;
251
+ dryRun: z.ZodOptional<z.ZodBoolean>;
252
+ }, z.core.$strict>, z.ZodObject<{
253
+ operation: z.ZodLiteral<"delete-ui-kit-component">;
254
+ module: z.ZodString;
255
+ overwrite: z.ZodOptional<z.ZodBoolean>;
256
+ dryRun: z.ZodOptional<z.ZodBoolean>;
257
+ }, z.core.$strict>, z.ZodObject<{
258
+ operation: z.ZodLiteral<"delete-shared-hook" | "delete-shared-model">;
259
+ module: z.ZodString;
260
+ overwrite: z.ZodOptional<z.ZodBoolean>;
261
+ dryRun: z.ZodOptional<z.ZodBoolean>;
262
+ }, z.core.$strict>, z.ZodObject<{
263
+ operation: z.ZodLiteral<"move-widget">;
264
+ module: z.ZodString;
265
+ name: z.ZodString;
266
+ overwrite: z.ZodOptional<z.ZodBoolean>;
267
+ dryRun: z.ZodOptional<z.ZodBoolean>;
268
+ }, z.core.$strict>], "operation">;
269
+ export declare const svelteRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
270
+ operation: z.ZodLiteral<"page">;
271
+ name: z.ZodString;
272
+ overwrite: z.ZodOptional<z.ZodBoolean>;
273
+ dryRun: z.ZodOptional<z.ZodBoolean>;
274
+ }, z.core.$strict>, z.ZodObject<{
275
+ operation: z.ZodLiteral<"widget">;
276
+ name: z.ZodString;
277
+ widgetType: z.ZodOptional<z.ZodEnum<{
278
+ monolithic: "monolithic";
208
279
  headless: "headless";
280
+ separated: "separated";
209
281
  }>>;
210
282
  overwrite: z.ZodOptional<z.ZodBoolean>;
211
283
  dryRun: z.ZodOptional<z.ZodBoolean>;
@@ -215,7 +287,7 @@ export declare const reactRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
215
287
  overwrite: z.ZodOptional<z.ZodBoolean>;
216
288
  dryRun: z.ZodOptional<z.ZodBoolean>;
217
289
  }, z.core.$strict>, z.ZodObject<{
218
- operation: z.ZodLiteral<"shared-hook">;
290
+ operation: z.ZodLiteral<"shared-hook" | "shared-model">;
219
291
  name: z.ZodString;
220
292
  overwrite: z.ZodOptional<z.ZodBoolean>;
221
293
  dryRun: z.ZodOptional<z.ZodBoolean>;
@@ -244,7 +316,7 @@ export declare const reactRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
244
316
  overwrite: z.ZodOptional<z.ZodBoolean>;
245
317
  dryRun: z.ZodOptional<z.ZodBoolean>;
246
318
  }, z.core.$strict>, z.ZodObject<{
247
- operation: z.ZodLiteral<"move-shared-hook">;
319
+ operation: z.ZodLiteral<"move-shared-hook" | "move-shared-model">;
248
320
  module: z.ZodString;
249
321
  name: z.ZodString;
250
322
  overwrite: z.ZodOptional<z.ZodBoolean>;
@@ -255,7 +327,7 @@ export declare const reactRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
255
327
  overwrite: z.ZodOptional<z.ZodBoolean>;
256
328
  dryRun: z.ZodOptional<z.ZodBoolean>;
257
329
  }, z.core.$strict>, z.ZodObject<{
258
- operation: z.ZodLiteral<"delete-shared-hook">;
330
+ operation: z.ZodLiteral<"delete-shared-hook" | "delete-shared-model">;
259
331
  module: z.ZodString;
260
332
  overwrite: z.ZodOptional<z.ZodBoolean>;
261
333
  dryRun: z.ZodOptional<z.ZodBoolean>;
@@ -281,6 +353,7 @@ export declare const integrationRequestSchema: z.ZodObject<{
281
353
  playwright: "playwright";
282
354
  }>>;
283
355
  nextAdapter: z.ZodOptional<z.ZodBoolean>;
356
+ svelteAdapter: z.ZodOptional<z.ZodBoolean>;
284
357
  configureReact: z.ZodOptional<z.ZodBoolean>;
285
358
  replaceTestingLibrary: z.ZodOptional<z.ZodBoolean>;
286
359
  integrationTestTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -302,7 +375,7 @@ export declare const integrationRequestSchema: z.ZodObject<{
302
375
  overwrite: z.ZodOptional<z.ZodBoolean>;
303
376
  dryRun: z.ZodOptional<z.ZodBoolean>;
304
377
  }, z.core.$strict>;
305
- export type AgentCommand = 'df-scaffold' | 'df-react' | 'df-integration';
378
+ export type AgentCommand = 'df-scaffold' | 'df-react' | 'df-svelte' | 'df-integration';
306
379
  export declare const requestSchemaFor: (command: AgentCommand) => z.ZodDiscriminatedUnion<[z.ZodObject<{
307
380
  operation: z.ZodLiteral<"bounded-context">;
308
381
  name: z.ZodString;
@@ -507,8 +580,8 @@ export declare const requestSchemaFor: (command: AgentCommand) => z.ZodDiscrimin
507
580
  name: z.ZodString;
508
581
  widgetType: z.ZodOptional<z.ZodEnum<{
509
582
  monolithic: "monolithic";
510
- separated: "separated";
511
583
  headless: "headless";
584
+ separated: "separated";
512
585
  }>>;
513
586
  overwrite: z.ZodOptional<z.ZodBoolean>;
514
587
  dryRun: z.ZodOptional<z.ZodBoolean>;
@@ -518,7 +591,7 @@ export declare const requestSchemaFor: (command: AgentCommand) => z.ZodDiscrimin
518
591
  overwrite: z.ZodOptional<z.ZodBoolean>;
519
592
  dryRun: z.ZodOptional<z.ZodBoolean>;
520
593
  }, z.core.$strict>, z.ZodObject<{
521
- operation: z.ZodLiteral<"shared-hook">;
594
+ operation: z.ZodLiteral<"shared-hook" | "shared-model">;
522
595
  name: z.ZodString;
523
596
  overwrite: z.ZodOptional<z.ZodBoolean>;
524
597
  dryRun: z.ZodOptional<z.ZodBoolean>;
@@ -547,7 +620,7 @@ export declare const requestSchemaFor: (command: AgentCommand) => z.ZodDiscrimin
547
620
  overwrite: z.ZodOptional<z.ZodBoolean>;
548
621
  dryRun: z.ZodOptional<z.ZodBoolean>;
549
622
  }, z.core.$strict>, z.ZodObject<{
550
- operation: z.ZodLiteral<"move-shared-hook">;
623
+ operation: z.ZodLiteral<"move-shared-hook" | "move-shared-model">;
551
624
  module: z.ZodString;
552
625
  name: z.ZodString;
553
626
  overwrite: z.ZodOptional<z.ZodBoolean>;
@@ -558,7 +631,7 @@ export declare const requestSchemaFor: (command: AgentCommand) => z.ZodDiscrimin
558
631
  overwrite: z.ZodOptional<z.ZodBoolean>;
559
632
  dryRun: z.ZodOptional<z.ZodBoolean>;
560
633
  }, z.core.$strict>, z.ZodObject<{
561
- operation: z.ZodLiteral<"delete-shared-hook">;
634
+ operation: z.ZodLiteral<"delete-shared-hook" | "delete-shared-model">;
562
635
  module: z.ZodString;
563
636
  overwrite: z.ZodOptional<z.ZodBoolean>;
564
637
  dryRun: z.ZodOptional<z.ZodBoolean>;
@@ -583,6 +656,7 @@ export declare const requestSchemaFor: (command: AgentCommand) => z.ZodDiscrimin
583
656
  playwright: "playwright";
584
657
  }>>;
585
658
  nextAdapter: z.ZodOptional<z.ZodBoolean>;
659
+ svelteAdapter: z.ZodOptional<z.ZodBoolean>;
586
660
  configureReact: z.ZodOptional<z.ZodBoolean>;
587
661
  replaceTestingLibrary: z.ZodOptional<z.ZodBoolean>;
588
662
  integrationTestTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -2,7 +2,7 @@ import z from 'zod';
2
2
  /**
3
3
  * `df-lint` checks that `backend.rules.lint` can turn off.
4
4
  */
5
- export declare const lintChecks: readonly ["context-isolation", "shared-kernel", "layers", "dependencies", "react", "clock", "config"];
5
+ export declare const lintChecks: readonly ["context-isolation", "shared-kernel", "layers", "dependencies", "react", "svelte", "clock", "config"];
6
6
  export type LintCheck = (typeof lintChecks)[number];
7
7
  export declare const configFileName = "domain-first.project-structure.config.json";
8
8
  export declare const projectConfigSchema: z.ZodObject<{
@@ -60,6 +60,7 @@ export declare const rulesSchema: z.ZodObject<{
60
60
  layers: "layers";
61
61
  dependencies: "dependencies";
62
62
  react: "react";
63
+ svelte: "svelte";
63
64
  clock: "clock";
64
65
  config: "config";
65
66
  }> & z.core.$partial, z.ZodBoolean>>;
@@ -158,6 +159,7 @@ export declare const backendConfigSchema: z.ZodObject<{
158
159
  layers: "layers";
159
160
  dependencies: "dependencies";
160
161
  react: "react";
162
+ svelte: "svelte";
161
163
  clock: "clock";
162
164
  config: "config";
163
165
  }> & z.core.$partial, z.ZodBoolean>>;
@@ -170,6 +172,13 @@ export declare const reactConfigSchema: z.ZodObject<{
170
172
  }>>;
171
173
  storybookFramework: z.ZodOptional<z.ZodString>;
172
174
  }, z.core.$loose>;
175
+ export declare const svelteConfigSchema: z.ZodObject<{
176
+ framework: z.ZodOptional<z.ZodEnum<{
177
+ svelte: "svelte";
178
+ sveltekit: "sveltekit";
179
+ }>>;
180
+ storybookFramework: z.ZodOptional<z.ZodString>;
181
+ }, z.core.$loose>;
173
182
  export declare const frontendConfigSchema: z.ZodObject<{
174
183
  react: z.ZodOptional<z.ZodObject<{
175
184
  framework: z.ZodOptional<z.ZodEnum<{
@@ -178,6 +187,13 @@ export declare const frontendConfigSchema: z.ZodObject<{
178
187
  }>>;
179
188
  storybookFramework: z.ZodOptional<z.ZodString>;
180
189
  }, z.core.$loose>>;
190
+ svelte: z.ZodOptional<z.ZodObject<{
191
+ framework: z.ZodOptional<z.ZodEnum<{
192
+ svelte: "svelte";
193
+ sveltekit: "sveltekit";
194
+ }>>;
195
+ storybookFramework: z.ZodOptional<z.ZodString>;
196
+ }, z.core.$loose>>;
181
197
  }, z.core.$loose>;
182
198
  export declare const configSchema: z.ZodObject<{
183
199
  project: z.ZodObject<{
@@ -267,6 +283,7 @@ export declare const configSchema: z.ZodObject<{
267
283
  layers: "layers";
268
284
  dependencies: "dependencies";
269
285
  react: "react";
286
+ svelte: "svelte";
270
287
  clock: "clock";
271
288
  config: "config";
272
289
  }> & z.core.$partial, z.ZodBoolean>>;
@@ -280,6 +297,13 @@ export declare const configSchema: z.ZodObject<{
280
297
  }>>;
281
298
  storybookFramework: z.ZodOptional<z.ZodString>;
282
299
  }, z.core.$loose>>;
300
+ svelte: z.ZodOptional<z.ZodObject<{
301
+ framework: z.ZodOptional<z.ZodEnum<{
302
+ svelte: "svelte";
303
+ sveltekit: "sveltekit";
304
+ }>>;
305
+ storybookFramework: z.ZodOptional<z.ZodString>;
306
+ }, z.core.$loose>>;
283
307
  }, z.core.$loose>>;
284
308
  }, z.core.$loose>;
285
309
  export type ProjectConfig = z.infer<typeof configSchema>;
@@ -0,0 +1,3 @@
1
+ import type { FrontendFramework } from './react-module-move';
2
+ /** The interactive menu and agent mode of df-react and df-svelte. */
3
+ export declare const runFrontendCLI: (framework: FrontendFramework) => Promise<void>;
@@ -0,0 +1,14 @@
1
+ import type { Folder } from './file-system';
2
+ import type { FrontendFramework } from './react-module-move';
3
+ /**
4
+ * The operation name of reusable logic: React shared hooks, Svelte shared
5
+ * models (`createN` in `shared/model`).
6
+ */
7
+ export declare const sharedLogicOperation: Record<FrontendFramework, string>;
8
+ /**
9
+ * Operations on frontend modules by their agent operation name; menus and
10
+ * `--request` run the same ones.
11
+ */
12
+ export declare const frontendOperations: (folder: Folder, framework: FrontendFramework) => Record<string, () => Promise<unknown>>;
13
+ /** Menu items of df-react and df-svelte → agent operations. */
14
+ export declare const frontendMenu: (framework: FrontendFramework) => [string, string][];
package/dist/graph.cjs CHANGED
@@ -223,6 +223,7 @@ const lintChecks = [
223
223
  'layers',
224
224
  'dependencies',
225
225
  'react',
226
+ 'svelte',
226
227
  'clock',
227
228
  'config'
228
229
  ];
@@ -267,8 +268,16 @@ const reactConfigSchema = external_zod_default().object({
267
268
  ]).optional(),
268
269
  storybookFramework: external_zod_default().string().optional()
269
270
  }).passthrough();
271
+ const svelteConfigSchema = external_zod_default().object({
272
+ framework: external_zod_default()["enum"]([
273
+ 'svelte',
274
+ 'sveltekit'
275
+ ]).optional(),
276
+ storybookFramework: external_zod_default().string().optional()
277
+ }).passthrough();
270
278
  const frontendConfigSchema = external_zod_default().object({
271
- react: reactConfigSchema.optional()
279
+ react: reactConfigSchema.optional(),
280
+ svelte: svelteConfigSchema.optional()
272
281
  }).passthrough();
273
282
  const configSchema = external_zod_default().object({
274
283
  project: projectConfigSchema,
@@ -355,7 +364,7 @@ const bounded_contexts_boundedContextNames = (contextsFolder)=>{
355
364
  };
356
365
  const bounded_contexts_boundedContextPath = (contextsFolder, name)=>external_node_path_default().join(contextsFolder, ...name.split('/'));
357
366
  const external_node_module_namespaceObject = require("node:module");
358
- const stripJsonComments = (source)=>source.replace(/("(?:\\.|[^"\\])*")|\/\/[^\n]*|\/\*[\s\S]*?\*\//g, (_, text)=>text ? text : '').replace(/,(\s*[}\]])/g, '$1');
367
+ const tsconfig_stripJsonComments = (source)=>source.replace(/("(?:\\.|[^"\\])*")|\/\/[^\n]*|\/\*[\s\S]*?\*\//g, (_, text)=>text ? text : '').replace(/,(\s*[}\]])/g, '$1');
359
368
  const resolveExtends = (fromFile, target)=>{
360
369
  if (target.startsWith('.') || external_node_path_default().isAbsolute(target)) {
361
370
  const resolved = external_node_path_default().resolve(external_node_path_default().dirname(fromFile), target);
@@ -374,7 +383,7 @@ const compilerOption = (configFile, name, seen = new Set())=>{
374
383
  seen.add(configFile);
375
384
  let config;
376
385
  try {
377
- config = JSON.parse(stripJsonComments(external_node_fs_default().readFileSync(configFile, 'utf8')));
386
+ config = JSON.parse(tsconfig_stripJsonComments(external_node_fs_default().readFileSync(configFile, 'utf8')));
378
387
  } catch {
379
388
  return null;
380
389
  }
@@ -388,6 +397,117 @@ const compilerOption = (configFile, name, seen = new Set())=>{
388
397
  if (void 0 !== value) return value;
389
398
  }
390
399
  };
400
+ new Set([
401
+ 'node_modules',
402
+ '.git',
403
+ '.next',
404
+ '.svelte-kit',
405
+ 'dist',
406
+ 'build',
407
+ 'out',
408
+ 'coverage',
409
+ 'storybook-static'
410
+ ]);
411
+ const module_move_escapeRegExp = (value)=>value.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
412
+ const frontendExtensions = {
413
+ react: {
414
+ component: '.tsx',
415
+ hook: '.ts'
416
+ },
417
+ svelte: {
418
+ component: '.svelte',
419
+ hook: '.svelte.ts'
420
+ }
421
+ };
422
+ const react_module_move_frontendLogicNaming = {
423
+ react: {
424
+ prefix: 'use',
425
+ shared: [
426
+ 'hooks'
427
+ ],
428
+ widgetModel: 'hooks'
429
+ },
430
+ svelte: {
431
+ prefix: 'create',
432
+ shared: [
433
+ 'shared',
434
+ 'model'
435
+ ],
436
+ widgetModel: 'model'
437
+ }
438
+ };
439
+ const kindLayouts = (framework)=>{
440
+ const { component, hook } = frontendExtensions[framework];
441
+ const { prefix, shared } = react_module_move_frontendLogicNaming[framework];
442
+ return {
443
+ page: {
444
+ folder: 'pages',
445
+ nested: true,
446
+ inFolder: false,
447
+ ownFile: (fileBase)=>new RegExp(`^${module_move_escapeRegExp(fileBase)}-page(?:\\.|$)`),
448
+ target: (reactFolder, { folders, fileName })=>external_node_path_default().join(reactFolder, 'pages', ...folders, `${fileName}-page${component}`),
449
+ classPrefix: `(${prefix})?`,
450
+ classSuffix: 'Page'
451
+ },
452
+ widget: {
453
+ folder: 'widgets',
454
+ nested: true,
455
+ inFolder: true,
456
+ target: (reactFolder, { folders, folderName })=>external_node_path_default().join(reactFolder, 'widgets', ...folders, folderName),
457
+ classPrefix: `(${prefix})?`,
458
+ classSuffix: 'Widget|UIModel',
459
+ storyTitle: (segments)=>[
460
+ 'Widgets',
461
+ ...segments
462
+ ].join('/')
463
+ },
464
+ 'ui-kit': {
465
+ folder: 'ui-kit',
466
+ nested: false,
467
+ inFolder: true,
468
+ target: (reactFolder, { fileName })=>external_node_path_default().join(reactFolder, 'ui-kit', fileName),
469
+ classPrefix: '()',
470
+ classSuffix: 'Props(?![\\w$])|(?![\\w$])',
471
+ storyTitle: (segments)=>`UI-kit/${segments.join('')}`
472
+ },
473
+ hook: {
474
+ folder: shared.join('/'),
475
+ nested: false,
476
+ inFolder: false,
477
+ ownFile: (fileBase)=>new RegExp(`^${prefix}-${module_move_escapeRegExp(fileBase)}(?:\\.|$)`),
478
+ target: (reactFolder, { fileName })=>external_node_path_default().join(reactFolder, ...shared, `${prefix}-${fileName}${hook}`),
479
+ classPrefix: `(${prefix})`,
480
+ classSuffix: '(?![\\w$])'
481
+ }
482
+ };
483
+ };
484
+ kindLayouts('react');
485
+ kindLayouts('svelte');
486
+ const reactKindTitles = {
487
+ page: [
488
+ 'Page',
489
+ 'pages'
490
+ ],
491
+ widget: [
492
+ 'Widget',
493
+ 'widgets'
494
+ ],
495
+ 'ui-kit': [
496
+ 'UI-kit component',
497
+ 'UI-kit components'
498
+ ],
499
+ hook: [
500
+ 'Shared hook',
501
+ 'shared hooks'
502
+ ]
503
+ };
504
+ ({
505
+ ...reactKindTitles,
506
+ hook: [
507
+ 'Shared model',
508
+ 'shared models'
509
+ ]
510
+ });
391
511
  class UnknownFormatNaming {
392
512
  rawSource;
393
513
  camelCase;
@@ -633,7 +753,7 @@ const wiring_wiredDependencyNames = (source, className)=>{
633
753
  const { openIndex, closeIndex } = wireListRange(source, className);
634
754
  return splitTopLevel(source.slice(openIndex + 1, closeIndex));
635
755
  };
636
- const readAliases = (projectRoot)=>{
756
+ const project_lint_readAliases = (projectRoot)=>{
637
757
  const tsconfig = external_node_path_default().join(projectRoot, 'tsconfig.json');
638
758
  const paths = compilerOption(tsconfig, 'paths');
639
759
  if (!paths || 'object' != typeof paths) return [];
@@ -678,7 +798,7 @@ const projectGraph = (projectRoot, rootFolder)=>{
678
798
  node
679
799
  ]);
680
800
  }
681
- const aliases = readAliases(projectRoot);
801
+ const aliases = project_lint_readAliases(projectRoot);
682
802
  const edges = [];
683
803
  for (const [module, node] of wired){
684
804
  const source = new file_system_File(module.wireFile).data;
package/dist/graph.js CHANGED
@@ -4,7 +4,7 @@ import node_fs from "node:fs";
4
4
  import node_os from "node:os";
5
5
  import node_path from "node:path";
6
6
  import { parseArgs } from "node:util";
7
- import { namedImportFiles, wiring_layers, findWiredModules, ConfigFile, boundedContextPath, outdatedConfigMessage, File, ProjectRoot, wiredDependencyNames, boundedContextNames } from "./201.js";
7
+ import { namedImportFiles, wiring_layers, findWiredModules, ConfigFile, boundedContextPath, outdatedConfigMessage, File, ProjectRoot, wiredDependencyNames, boundedContextNames } from "./878.js";
8
8
  import { readAliases, resolveSpecifier } from "./38.js";
9
9
  const sharedKernel = 'shared-kernel';
10
10
  const contextsOf = boundedContextNames;