@domain-first/project-structure 8.3.0 → 8.5.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.
- package/README.md +5 -4
- package/dist/287.js +118 -30
- package/dist/38.js +23 -11
- package/dist/561.js +59 -33
- package/dist/870.js +2 -1
- package/dist/agent-cli.d.ts +24 -2
- package/dist/agent-requests.d.ts +44 -0
- package/dist/config-file.d.ts +4 -1
- package/dist/graph.cjs +2 -1
- package/dist/index.cjs +148 -33
- package/dist/init.cjs +2 -1
- package/dist/integration.cjs +177 -62
- package/dist/lint.cjs +27 -13
- package/dist/lint.js +2 -1
- package/dist/react-module-move.d.ts +26 -3
- package/dist/react.cjs +190 -63
- package/dist/react.js +13 -1
- package/dist/upgrade-steps.d.ts +1 -1
- package/dist/upgrade.cjs +2 -1
- package/package.json +1 -1
- package/skills/df-ps-implement/SKILL.md +2 -1
- package/skills/df-ps-react/SKILL.md +4 -4
- package/skills/df-ps-react/references/generators.md +4 -0
- package/skills/df-ps-scaffold/SKILL.md +1 -1
- package/skills/df-ps-scaffold/references/agent-operations.md +4 -0
- package/skills/df-ps-scaffold/references/choosing-components.md +2 -1
- package/skills/df-ps-scaffold/references/units/port.md +2 -2
package/dist/react.cjs
CHANGED
|
@@ -370,7 +370,8 @@ const lintChecks = [
|
|
|
370
370
|
'layers',
|
|
371
371
|
'dependencies',
|
|
372
372
|
'react',
|
|
373
|
-
'clock'
|
|
373
|
+
'clock',
|
|
374
|
+
'config'
|
|
374
375
|
];
|
|
375
376
|
const config_file_configFileName = 'domain-first.project-structure.config.json';
|
|
376
377
|
const projectConfigSchema = external_zod_default().object({
|
|
@@ -3127,68 +3128,68 @@ const named = {
|
|
|
3127
3128
|
...agent_requests_owner,
|
|
3128
3129
|
name: agent_requests_name
|
|
3129
3130
|
};
|
|
3130
|
-
const
|
|
3131
|
+
const agent_requests_operation = (value, shape)=>external_zod_default().strictObject({
|
|
3131
3132
|
operation: external_zod_default().literal(value),
|
|
3132
3133
|
...shape
|
|
3133
3134
|
});
|
|
3134
3135
|
const scaffoldRequestSchema = external_zod_default().discriminatedUnion('operation', [
|
|
3135
|
-
|
|
3136
|
+
agent_requests_operation('bounded-context', {
|
|
3136
3137
|
...common,
|
|
3137
3138
|
name: agent_requests_name.refine((value)=>'shared-kernel' !== value, 'shared-kernel is reserved for the Shared Kernel.')
|
|
3138
3139
|
}),
|
|
3139
|
-
|
|
3140
|
+
agent_requests_operation('aggregate', {
|
|
3140
3141
|
...named,
|
|
3141
3142
|
withRepository: external_zod_default().boolean().optional(),
|
|
3142
3143
|
implementation: agent_requests_implementation.optional(),
|
|
3143
3144
|
testImplementation: agent_requests_implementation.optional(),
|
|
3144
3145
|
...agent_requests_wired
|
|
3145
3146
|
}),
|
|
3146
|
-
|
|
3147
|
+
agent_requests_operation('entity', {
|
|
3147
3148
|
...named,
|
|
3148
3149
|
aggregate: agent_requests_name.optional()
|
|
3149
3150
|
}),
|
|
3150
|
-
|
|
3151
|
+
agent_requests_operation('value-object', {
|
|
3151
3152
|
...named,
|
|
3152
3153
|
aggregate: agent_requests_name.optional()
|
|
3153
3154
|
}),
|
|
3154
|
-
|
|
3155
|
+
agent_requests_operation('error', {
|
|
3155
3156
|
...named,
|
|
3156
3157
|
namespace: agent_requests_name.optional()
|
|
3157
3158
|
}),
|
|
3158
|
-
|
|
3159
|
-
|
|
3159
|
+
agent_requests_operation('error-namespace', named),
|
|
3160
|
+
agent_requests_operation('domain-service', {
|
|
3160
3161
|
...named,
|
|
3161
3162
|
...agent_requests_wired
|
|
3162
3163
|
}),
|
|
3163
|
-
|
|
3164
|
+
agent_requests_operation('application-service', {
|
|
3164
3165
|
...named,
|
|
3165
3166
|
...agent_requests_wired
|
|
3166
3167
|
}),
|
|
3167
|
-
|
|
3168
|
+
agent_requests_operation('infrastructure-service', {
|
|
3168
3169
|
...named,
|
|
3169
3170
|
...agent_requests_wired
|
|
3170
3171
|
}),
|
|
3171
|
-
|
|
3172
|
+
agent_requests_operation('presentation-service', {
|
|
3172
3173
|
...named,
|
|
3173
3174
|
...agent_requests_wired
|
|
3174
3175
|
}),
|
|
3175
|
-
|
|
3176
|
+
agent_requests_operation('use-case', {
|
|
3176
3177
|
...named,
|
|
3177
3178
|
...agent_requests_wired
|
|
3178
3179
|
}),
|
|
3179
|
-
|
|
3180
|
+
agent_requests_operation('command', {
|
|
3180
3181
|
...named,
|
|
3181
3182
|
...agent_requests_implementations
|
|
3182
3183
|
}),
|
|
3183
|
-
|
|
3184
|
+
agent_requests_operation('query', {
|
|
3184
3185
|
...named,
|
|
3185
3186
|
...agent_requests_implementations
|
|
3186
3187
|
}),
|
|
3187
|
-
|
|
3188
|
+
agent_requests_operation('port', {
|
|
3188
3189
|
...named,
|
|
3189
3190
|
...agent_requests_implementations
|
|
3190
3191
|
}),
|
|
3191
|
-
|
|
3192
|
+
agent_requests_operation('implementation', {
|
|
3192
3193
|
...common,
|
|
3193
3194
|
...agent_requests_owner,
|
|
3194
3195
|
contract: agent_requests_id.describe('Exact contract ID from --describe.'),
|
|
@@ -3196,7 +3197,7 @@ const scaffoldRequestSchema = external_zod_default().discriminatedUnion('operati
|
|
|
3196
3197
|
environments: external_zod_default().array(agent_requests_name).min(1).optional().describe('Required when the contract wire is envBranchedWire; omit it otherwise.'),
|
|
3197
3198
|
...agent_requests_wired
|
|
3198
3199
|
}),
|
|
3199
|
-
|
|
3200
|
+
agent_requests_operation('endpoint', {
|
|
3200
3201
|
...common,
|
|
3201
3202
|
...agent_requests_owner,
|
|
3202
3203
|
controller: agent_requests_name,
|
|
@@ -3210,18 +3211,18 @@ const scaffoldRequestSchema = external_zod_default().discriminatedUnion('operati
|
|
|
3210
3211
|
path: external_zod_default().string().regex(/^(?:\/?(?:[a-zA-Z0-9_-]+|:[a-zA-Z][a-zA-Z0-9_]*))*\/?$/),
|
|
3211
3212
|
handler: agent_requests_id.optional().describe('Exact handler module ID from --describe. Required when the context has wired queries, commands or use cases; omit it otherwise.')
|
|
3212
3213
|
}),
|
|
3213
|
-
|
|
3214
|
+
agent_requests_operation('wire-dependency', {
|
|
3214
3215
|
...common,
|
|
3215
3216
|
...agent_requests_owner,
|
|
3216
3217
|
module: agent_requests_id.describe('Exact wiring target ID, including implementation class, from --describe.'),
|
|
3217
3218
|
dependencies: agent_requests_dependencies
|
|
3218
3219
|
}),
|
|
3219
|
-
|
|
3220
|
+
agent_requests_operation('delete', {
|
|
3220
3221
|
...common,
|
|
3221
3222
|
...agent_requests_owner,
|
|
3222
3223
|
module: agent_requests_id.describe('Exact unit ID from --describe. Refused while other files use it.')
|
|
3223
3224
|
}),
|
|
3224
|
-
|
|
3225
|
+
agent_requests_operation('move', {
|
|
3225
3226
|
...common,
|
|
3226
3227
|
...agent_requests_owner,
|
|
3227
3228
|
module: agent_requests_id.describe('Exact unit ID from --describe.'),
|
|
@@ -3231,11 +3232,11 @@ const scaffoldRequestSchema = external_zod_default().discriminatedUnion('operati
|
|
|
3231
3232
|
})
|
|
3232
3233
|
]);
|
|
3233
3234
|
const reactRequestSchema = external_zod_default().discriminatedUnion('operation', [
|
|
3234
|
-
|
|
3235
|
+
agent_requests_operation('page', {
|
|
3235
3236
|
...common,
|
|
3236
3237
|
name: agent_requests_nestedName
|
|
3237
3238
|
}),
|
|
3238
|
-
|
|
3239
|
+
agent_requests_operation('widget', {
|
|
3239
3240
|
...common,
|
|
3240
3241
|
name: agent_requests_nestedName,
|
|
3241
3242
|
widgetType: external_zod_default()["enum"]([
|
|
@@ -3244,37 +3245,55 @@ const reactRequestSchema = external_zod_default().discriminatedUnion('operation'
|
|
|
3244
3245
|
'headless'
|
|
3245
3246
|
]).optional()
|
|
3246
3247
|
}),
|
|
3247
|
-
|
|
3248
|
+
agent_requests_operation('ui-kit-component', {
|
|
3248
3249
|
...common,
|
|
3249
3250
|
name: agent_requests_name
|
|
3250
3251
|
}),
|
|
3251
|
-
|
|
3252
|
+
agent_requests_operation('shared-hook', {
|
|
3252
3253
|
...common,
|
|
3253
3254
|
name: agent_requests_name
|
|
3254
3255
|
}),
|
|
3255
|
-
|
|
3256
|
+
agent_requests_operation('move-page', {
|
|
3256
3257
|
...common,
|
|
3257
3258
|
module: agent_requests_nestedName,
|
|
3258
3259
|
name: agent_requests_nestedName,
|
|
3259
3260
|
moveRoute: external_zod_default().boolean().optional().describe('With Next.js and a route at the page path: move it too (default true). Omit it without such a route.')
|
|
3260
3261
|
}),
|
|
3261
|
-
|
|
3262
|
+
agent_requests_operation('delete-page', {
|
|
3262
3263
|
...common,
|
|
3263
3264
|
module: agent_requests_nestedName,
|
|
3264
3265
|
deleteRoute: external_zod_default().boolean().optional().describe("With Next.js and the page's own route: delete it too (default true). Omit it without such a route.")
|
|
3265
3266
|
}),
|
|
3266
|
-
|
|
3267
|
+
agent_requests_operation('delete-widget', {
|
|
3267
3268
|
...common,
|
|
3268
3269
|
module: agent_requests_nestedName
|
|
3269
3270
|
}),
|
|
3270
|
-
|
|
3271
|
+
agent_requests_operation('move-ui-kit-component', {
|
|
3272
|
+
...common,
|
|
3273
|
+
module: agent_requests_name,
|
|
3274
|
+
name: agent_requests_name
|
|
3275
|
+
}),
|
|
3276
|
+
agent_requests_operation('move-shared-hook', {
|
|
3277
|
+
...common,
|
|
3278
|
+
module: agent_requests_name,
|
|
3279
|
+
name: agent_requests_name
|
|
3280
|
+
}),
|
|
3281
|
+
agent_requests_operation('delete-ui-kit-component', {
|
|
3282
|
+
...common,
|
|
3283
|
+
module: agent_requests_name
|
|
3284
|
+
}),
|
|
3285
|
+
agent_requests_operation('delete-shared-hook', {
|
|
3286
|
+
...common,
|
|
3287
|
+
module: agent_requests_name
|
|
3288
|
+
}),
|
|
3289
|
+
agent_requests_operation('move-widget', {
|
|
3271
3290
|
...common,
|
|
3272
3291
|
module: agent_requests_nestedName,
|
|
3273
3292
|
name: agent_requests_nestedName
|
|
3274
3293
|
})
|
|
3275
3294
|
]);
|
|
3276
3295
|
const agent_requests_relativePath = external_zod_default().string().regex(/^[a-zA-Z0-9_.-]+(?:\/[a-zA-Z0-9_.-]+)*$/).refine((value)=>!value.split('/').some((part)=>'.' === part || '..' === part), 'Use a project-relative path without . or .. segments.');
|
|
3277
|
-
const integrationRequestSchema =
|
|
3296
|
+
const integrationRequestSchema = agent_requests_operation('add', {
|
|
3278
3297
|
...common,
|
|
3279
3298
|
integrations: external_zod_default().array(external_zod_default()["enum"](integrationIds)).min(1),
|
|
3280
3299
|
nextAdapter: external_zod_default().boolean().optional(),
|
|
@@ -3972,6 +3991,66 @@ const inMemoryRepositoryWiring = (ownerFolder, unit, wireFile)=>(implementation,
|
|
|
3972
3991
|
wireInMemoryDb(wireFile, implementation.className);
|
|
3973
3992
|
return true;
|
|
3974
3993
|
};
|
|
3994
|
+
const reactKindLayouts = {
|
|
3995
|
+
page: {
|
|
3996
|
+
folder: 'pages',
|
|
3997
|
+
nested: true,
|
|
3998
|
+
inFolder: false,
|
|
3999
|
+
ownFile: (fileBase)=>new RegExp(`^${escapeRegExp(fileBase)}-page(?:\\.|$)`),
|
|
4000
|
+
target: (reactFolder, { folders, fileName })=>external_node_path_default().join(reactFolder, 'pages', ...folders, `${fileName}-page.tsx`),
|
|
4001
|
+
classPrefix: '(use)?',
|
|
4002
|
+
classSuffix: 'Page'
|
|
4003
|
+
},
|
|
4004
|
+
widget: {
|
|
4005
|
+
folder: 'widgets',
|
|
4006
|
+
nested: true,
|
|
4007
|
+
inFolder: true,
|
|
4008
|
+
target: (reactFolder, { folders, folderName })=>external_node_path_default().join(reactFolder, 'widgets', ...folders, folderName),
|
|
4009
|
+
classPrefix: '(use)?',
|
|
4010
|
+
classSuffix: 'Widget|UIModel',
|
|
4011
|
+
storyTitle: (segments)=>[
|
|
4012
|
+
'Widgets',
|
|
4013
|
+
...segments
|
|
4014
|
+
].join('/')
|
|
4015
|
+
},
|
|
4016
|
+
'ui-kit': {
|
|
4017
|
+
folder: 'ui-kit',
|
|
4018
|
+
nested: false,
|
|
4019
|
+
inFolder: true,
|
|
4020
|
+
target: (reactFolder, { fileName })=>external_node_path_default().join(reactFolder, 'ui-kit', fileName),
|
|
4021
|
+
classPrefix: '()',
|
|
4022
|
+
classSuffix: 'Props(?![\\w$])|(?![\\w$])',
|
|
4023
|
+
storyTitle: (segments)=>`UI-kit/${segments.join('')}`
|
|
4024
|
+
},
|
|
4025
|
+
hook: {
|
|
4026
|
+
folder: 'hooks',
|
|
4027
|
+
nested: false,
|
|
4028
|
+
inFolder: false,
|
|
4029
|
+
ownFile: (fileBase)=>new RegExp(`^use-${escapeRegExp(fileBase)}(?:\\.|$)`),
|
|
4030
|
+
target: (reactFolder, { fileName })=>external_node_path_default().join(reactFolder, 'hooks', `use-${fileName}.ts`),
|
|
4031
|
+
classPrefix: '(use)',
|
|
4032
|
+
classSuffix: '(?![\\w$])'
|
|
4033
|
+
}
|
|
4034
|
+
};
|
|
4035
|
+
const reactKindTitles = {
|
|
4036
|
+
page: [
|
|
4037
|
+
'Page',
|
|
4038
|
+
'pages'
|
|
4039
|
+
],
|
|
4040
|
+
widget: [
|
|
4041
|
+
'Widget',
|
|
4042
|
+
'widgets'
|
|
4043
|
+
],
|
|
4044
|
+
'ui-kit': [
|
|
4045
|
+
'UI-kit component',
|
|
4046
|
+
'UI-kit components'
|
|
4047
|
+
],
|
|
4048
|
+
hook: [
|
|
4049
|
+
'Shared hook',
|
|
4050
|
+
'shared hooks'
|
|
4051
|
+
]
|
|
4052
|
+
};
|
|
4053
|
+
const reactModuleName = (kind, rawName)=>'hook' === kind ? rawName.trim().replace(/^use-/, '') : rawName;
|
|
3975
4054
|
const react_module_move_nestedName = (folders, fileBase)=>{
|
|
3976
4055
|
const prefix = `${folders.join('-')}-`;
|
|
3977
4056
|
const last = folders.length && fileBase.startsWith(prefix) ? fileBase.slice(prefix.length) : fileBase;
|
|
@@ -3985,8 +4064,36 @@ const declaredClassName = (filePath, suffix, name)=>{
|
|
|
3985
4064
|
const declared = content.match(new RegExp(`export\\s+(?:const|function)\\s+(\\w+)${suffix}\\b`))?.[1];
|
|
3986
4065
|
return declared ?? new NestedName(name).ClassName;
|
|
3987
4066
|
};
|
|
4067
|
+
const findUiKit = (reactFolder)=>{
|
|
4068
|
+
const root = external_node_path_default().join(reactFolder, 'ui-kit');
|
|
4069
|
+
if (!external_node_fs_default().existsSync(root)) return [];
|
|
4070
|
+
return external_node_fs_default().readdirSync(root, {
|
|
4071
|
+
withFileTypes: true
|
|
4072
|
+
}).filter((entry)=>entry.isDirectory() && external_node_fs_default().existsSync(external_node_path_default().join(root, entry.name, `${entry.name}.tsx`))).map(({ name })=>({
|
|
4073
|
+
kind: 'ui-kit',
|
|
4074
|
+
name,
|
|
4075
|
+
path: external_node_path_default().join(root, name),
|
|
4076
|
+
fileBase: name,
|
|
4077
|
+
ClassName: declaredClassName(external_node_path_default().join(root, name, `${name}.tsx`), '', name)
|
|
4078
|
+
}));
|
|
4079
|
+
};
|
|
4080
|
+
const findHooks = (reactFolder)=>{
|
|
4081
|
+
const root = external_node_path_default().join(reactFolder, 'hooks');
|
|
4082
|
+
if (!external_node_fs_default().existsSync(root)) return [];
|
|
4083
|
+
return external_node_fs_default().readdirSync(root).filter((file)=>/^use-.+\.tsx?$/.test(file) && !/\.(spec|test)\./.test(file)).map((file)=>{
|
|
4084
|
+
const name = file.replace(/^use-/, '').replace(/\.tsx?$/, '');
|
|
4085
|
+
const content = external_node_fs_default().readFileSync(external_node_path_default().join(root, file), 'utf8');
|
|
4086
|
+
return {
|
|
4087
|
+
kind: 'hook',
|
|
4088
|
+
name,
|
|
4089
|
+
path: external_node_path_default().join(root, file),
|
|
4090
|
+
fileBase: name,
|
|
4091
|
+
ClassName: content.match(/export\s+(?:const|function)\s+use(\w+)\b/)?.[1] ?? new NestedName(name).ClassName
|
|
4092
|
+
};
|
|
4093
|
+
});
|
|
4094
|
+
};
|
|
3988
4095
|
const findReactModules = (reactFolder, kind)=>{
|
|
3989
|
-
const modules = 'page' === kind ? module_move_walk(external_node_path_default().join(reactFolder, 'pages')).filter((file)=>file.endsWith('-page.tsx')).map((file)=>{
|
|
4096
|
+
const modules = 'ui-kit' === kind ? findUiKit(reactFolder) : 'hook' === kind ? findHooks(reactFolder) : 'page' === kind ? module_move_walk(external_node_path_default().join(reactFolder, 'pages')).filter((file)=>file.endsWith('-page.tsx')).map((file)=>{
|
|
3990
4097
|
const folders = external_node_path_default().relative(external_node_path_default().join(reactFolder, 'pages'), external_node_path_default().dirname(file)).split(external_node_path_default().sep).filter((segment)=>!!segment);
|
|
3991
4098
|
const fileBase = external_node_path_default().basename(file, '-page.tsx');
|
|
3992
4099
|
const name = react_module_move_nestedName(folders, fileBase);
|
|
@@ -4010,13 +4117,11 @@ const findReactModules = (reactFolder, kind)=>{
|
|
|
4010
4117
|
});
|
|
4011
4118
|
return modules.sort((a, b)=>a.name.localeCompare(b.name));
|
|
4012
4119
|
};
|
|
4013
|
-
const react_module_move_targetPath = (reactFolder, module, rawName)=>
|
|
4014
|
-
const { folders, folderName, fileName } = new NestedName(rawName);
|
|
4015
|
-
return 'page' === module.kind ? external_node_path_default().join(reactFolder, 'pages', ...folders, `${fileName}-page.tsx`) : external_node_path_default().join(reactFolder, 'widgets', ...folders, folderName);
|
|
4016
|
-
};
|
|
4120
|
+
const react_module_move_targetPath = (reactFolder, module, rawName)=>reactKindLayouts[module.kind].target(reactFolder, new NestedName(reactModuleName(module.kind, rawName)));
|
|
4017
4121
|
const validateMove = (reactFolder, module, rawName)=>{
|
|
4018
4122
|
const nameError = NestedName.validate(rawName);
|
|
4019
4123
|
if (true !== nameError) return nameError;
|
|
4124
|
+
if (!reactKindLayouts[module.kind].nested && /[\\/]/.test(rawName)) return 'UI-kit components and shared hooks have no folders: enter a name without "/"';
|
|
4020
4125
|
const target = react_module_move_targetPath(reactFolder, module, rawName);
|
|
4021
4126
|
if (target !== module.path && external_node_fs_default().existsSync(target)) return `${external_node_path_default().relative(reactFolder, target)} already exists`;
|
|
4022
4127
|
if (target.startsWith(`${module.path}${external_node_path_default().sep}`)) return 'A widget cannot be moved into itself';
|
|
@@ -4030,13 +4135,14 @@ const routeFiles = (folder)=>external_node_fs_default().existsSync(folder) ? ext
|
|
|
4030
4135
|
withFileTypes: true
|
|
4031
4136
|
}).filter((entry)=>entry.isFile()).map((entry)=>external_node_path_default().join(folder, entry.name)) : [];
|
|
4032
4137
|
const moveReactModule = (projectRoot, reactFolder, module, rawName, route)=>{
|
|
4033
|
-
const
|
|
4138
|
+
const layout = reactKindLayouts[module.kind];
|
|
4139
|
+
const newName = new NestedName(reactModuleName(module.kind, rawName));
|
|
4034
4140
|
const target = react_module_move_targetPath(reactFolder, module, rawName);
|
|
4035
4141
|
const newClassName = newName.ClassName;
|
|
4036
|
-
const renameFile = (name)=>name.replace(new RegExp(`^(use-)?${escapeRegExp(module.fileBase)}(?=[-.])`), (_, use = '')=>`${use}${newName.fileName}`);
|
|
4037
|
-
const oldFolder =
|
|
4038
|
-
const newFolder =
|
|
4039
|
-
const ownsPath = (candidate)=>
|
|
4142
|
+
const renameFile = (name)=>name.replace(new RegExp(`^(use-)?${escapeRegExp(module.fileBase)}(?=[-.]|$)`), (_, use = '')=>`${use}${newName.fileName}`);
|
|
4143
|
+
const oldFolder = layout.inFolder ? module.path : external_node_path_default().dirname(module.path);
|
|
4144
|
+
const newFolder = layout.inFolder ? target : external_node_path_default().dirname(target);
|
|
4145
|
+
const ownsPath = (candidate)=>layout.inFolder ? candidate === oldFolder || candidate.startsWith(`${oldFolder}${external_node_path_default().sep}`) : external_node_path_default().dirname(candidate) === oldFolder && layout.ownFile(module.fileBase).test(external_node_path_default().basename(candidate));
|
|
4040
4146
|
const routeFileSet = new Set(route ? routeFiles(route.from) : []);
|
|
4041
4147
|
const routeTarget = (candidate)=>{
|
|
4042
4148
|
if (!route) return;
|
|
@@ -4056,7 +4162,7 @@ const moveReactModule = (projectRoot, reactFolder, module, rawName, route)=>{
|
|
|
4056
4162
|
segments[last] = renameFile(segments[last]);
|
|
4057
4163
|
return external_node_path_default().join(newFolder, ...segments);
|
|
4058
4164
|
};
|
|
4059
|
-
const moduleFiles =
|
|
4165
|
+
const moduleFiles = reactModuleFiles(module);
|
|
4060
4166
|
const moves = new Map([
|
|
4061
4167
|
...moduleFiles,
|
|
4062
4168
|
...routeFileSet
|
|
@@ -4064,14 +4170,14 @@ const moveReactModule = (projectRoot, reactFolder, module, rawName, route)=>{
|
|
|
4064
4170
|
file,
|
|
4065
4171
|
movedPath(file) ?? file
|
|
4066
4172
|
]));
|
|
4067
|
-
const
|
|
4068
|
-
const
|
|
4069
|
-
|
|
4070
|
-
|
|
4071
|
-
const
|
|
4072
|
-
|
|
4073
|
-
|
|
4074
|
-
].
|
|
4173
|
+
const classPattern = new RegExp(`(?<![\\w$])${layout.classPrefix}${escapeRegExp(module.ClassName)}(?=${layout.classSuffix})`, 'g');
|
|
4174
|
+
const oldTitle = layout.storyTitle?.('ui-kit' === module.kind ? [
|
|
4175
|
+
module.ClassName
|
|
4176
|
+
] : module.name.split('/').map((segment)=>new NestedName(segment).ClassName));
|
|
4177
|
+
const titlePattern = oldTitle && new RegExp(`(['"\`])${escapeRegExp(oldTitle)}\\1`, 'g');
|
|
4178
|
+
const newTitle = layout.storyTitle?.('ui-kit' === module.kind ? [
|
|
4179
|
+
newClassName
|
|
4180
|
+
] : newName.classNameSegments);
|
|
4075
4181
|
return stageModuleMove({
|
|
4076
4182
|
projectRoot,
|
|
4077
4183
|
stopAt: reactFolder,
|
|
@@ -4079,8 +4185,8 @@ const moveReactModule = (projectRoot, reactFolder, module, rawName, route)=>{
|
|
|
4079
4185
|
moves,
|
|
4080
4186
|
movedPath,
|
|
4081
4187
|
rename: (content, { moved })=>{
|
|
4082
|
-
const renamed = content.replace(classPattern, (_, use
|
|
4083
|
-
return moved &&
|
|
4188
|
+
const renamed = content.replace(classPattern, (_, use)=>`${use ?? ''}${newClassName}`);
|
|
4189
|
+
return moved && titlePattern ? renamed.replace(titlePattern, (_, quote)=>`${quote}${newTitle}${quote}`) : renamed;
|
|
4084
4190
|
}
|
|
4085
4191
|
});
|
|
4086
4192
|
};
|
|
@@ -4090,9 +4196,10 @@ const pageRouteFolder = (appFolder, page)=>{
|
|
|
4090
4196
|
return external_node_fs_default().existsSync(routePage) && new RegExp(`(?<![\\w$])${page.ClassName}Page(?![\\w$])`).test(external_node_fs_default().readFileSync(routePage, 'utf8')) ? folder : void 0;
|
|
4091
4197
|
};
|
|
4092
4198
|
const reactModuleFiles = (module)=>{
|
|
4093
|
-
|
|
4199
|
+
const layout = reactKindLayouts[module.kind];
|
|
4200
|
+
if (layout.inFolder) return module_move_walk(module.path);
|
|
4094
4201
|
const folder = external_node_path_default().dirname(module.path);
|
|
4095
|
-
const own =
|
|
4202
|
+
const own = layout.ownFile(module.fileBase);
|
|
4096
4203
|
return external_node_fs_default().readdirSync(folder, {
|
|
4097
4204
|
withFileTypes: true
|
|
4098
4205
|
}).filter((entry)=>entry.isFile() && own.test(entry.name)).map((entry)=>external_node_path_default().join(folder, entry.name));
|
|
@@ -4106,7 +4213,7 @@ const deleteReactModule = (projectRoot, reactFolder, module, route)=>{
|
|
|
4106
4213
|
...routeFileList
|
|
4107
4214
|
]);
|
|
4108
4215
|
const stems = new Set(moduleFiles.map((file)=>file.replace(codeExtension, '')));
|
|
4109
|
-
const isModule = (resolved)=>stems.has(resolved) ||
|
|
4216
|
+
const isModule = (resolved)=>stems.has(resolved) || reactKindLayouts[module.kind].inFolder && (resolved === module.path || resolved.startsWith(`${module.path}${external_node_path_default().sep}`));
|
|
4110
4217
|
const { codeFiles, resolve } = projectImports(projectRoot);
|
|
4111
4218
|
const relative = (file)=>toPosix(external_node_path_default().relative(projectRoot, file));
|
|
4112
4219
|
const usedBy = [];
|
|
@@ -4197,11 +4304,11 @@ const deleteBackendUnitUseCase = async (ownerFolder)=>{
|
|
|
4197
4304
|
const deleteReactModuleUseCase = async (presentationReactFolder, kind)=>{
|
|
4198
4305
|
const reactFolder = presentationReactFolder.path;
|
|
4199
4306
|
const modules = findReactModules(reactFolder, kind);
|
|
4200
|
-
if (!modules.length) return void report(`No ${kind}
|
|
4307
|
+
if (!modules.length) return void report(`No ${reactKindTitles[kind][1]} generated by df-react were found.`);
|
|
4201
4308
|
const module = await interaction_select({
|
|
4202
4309
|
key: 'module',
|
|
4203
4310
|
id: (value)=>value.name,
|
|
4204
|
-
message:
|
|
4311
|
+
message: `${reactKindTitles[kind][0]} to delete:`,
|
|
4205
4312
|
choices: modules.map((value)=>({
|
|
4206
4313
|
name: value.name,
|
|
4207
4314
|
value,
|
|
@@ -4367,11 +4474,11 @@ const promptRouteMove = async (root, page, newName)=>{
|
|
|
4367
4474
|
const moveReactModuleUseCase = async (presentationReactFolder, kind)=>{
|
|
4368
4475
|
const reactFolder = presentationReactFolder.path;
|
|
4369
4476
|
const modules = findReactModules(reactFolder, kind);
|
|
4370
|
-
if (!modules.length) return void report(`No ${kind}
|
|
4477
|
+
if (!modules.length) return void report(`No ${reactKindTitles[kind][1]} generated by df-react were found.`);
|
|
4371
4478
|
const module = await interaction_select({
|
|
4372
4479
|
key: 'module',
|
|
4373
4480
|
id: (value)=>value.name,
|
|
4374
|
-
message:
|
|
4481
|
+
message: `${reactKindTitles[kind][0]}:`,
|
|
4375
4482
|
choices: modules.map((value)=>({
|
|
4376
4483
|
name: value.name,
|
|
4377
4484
|
value,
|
|
@@ -4380,7 +4487,7 @@ const moveReactModuleUseCase = async (presentationReactFolder, kind)=>{
|
|
|
4380
4487
|
});
|
|
4381
4488
|
const name = await interaction_input({
|
|
4382
4489
|
key: 'name',
|
|
4383
|
-
message: 'New name (folders split by "/"):',
|
|
4490
|
+
message: reactKindLayouts[kind].nested ? 'New name (folders split by "/"):' : 'New name:',
|
|
4384
4491
|
default: module.name,
|
|
4385
4492
|
validate: (value)=>validateMove(reactFolder, module, value)
|
|
4386
4493
|
});
|
|
@@ -5736,7 +5843,9 @@ const describeAgentCommand = (command)=>{
|
|
|
5736
5843
|
integrations: integrationDescriptionsSafe(configured),
|
|
5737
5844
|
reactModules: config?.frontend?.react ? [
|
|
5738
5845
|
'page',
|
|
5739
|
-
'widget'
|
|
5846
|
+
'widget',
|
|
5847
|
+
'ui-kit',
|
|
5848
|
+
'hook'
|
|
5740
5849
|
].flatMap((kind)=>findReactModules(external_node_path_default().join(root, config.project.rootFolder, 'presentation/react'), kind).map((module)=>({
|
|
5741
5850
|
kind,
|
|
5742
5851
|
name: module.name,
|
|
@@ -5846,7 +5955,9 @@ const executeReact = async (request)=>{
|
|
|
5846
5955
|
config_file_ConfigFile.Instance.data.project.rootFolder,
|
|
5847
5956
|
'presentation/react'
|
|
5848
5957
|
]);
|
|
5849
|
-
|
|
5958
|
+
const kindOf = (operation)=>operation.endsWith('-page') ? 'page' : operation.endsWith('-widget') ? 'widget' : operation.endsWith('-ui-kit-component') ? 'ui-kit' : operation.endsWith('-shared-hook') ? 'hook' : void 0;
|
|
5959
|
+
const kind = /^(move|delete)-/.test(request.operation) ? kindOf(request.operation) : void 0;
|
|
5960
|
+
if (kind && !findReactModules(folder.path, kind).length) throw new RequestError('TARGET_NOT_FOUND', `No React ${reactKindTitles[kind][1]} here.`);
|
|
5850
5961
|
const actions = {
|
|
5851
5962
|
page: ()=>scaffoldReactPage(folder),
|
|
5852
5963
|
widget: ()=>scaffoldReactWidget(folder),
|
|
@@ -5855,7 +5966,11 @@ const executeReact = async (request)=>{
|
|
|
5855
5966
|
'move-page': ()=>moveReactModuleUseCase(folder, 'page'),
|
|
5856
5967
|
'move-widget': ()=>moveReactModuleUseCase(folder, 'widget'),
|
|
5857
5968
|
'delete-page': ()=>deleteReactModuleUseCase(folder, 'page'),
|
|
5858
|
-
'delete-widget': ()=>deleteReactModuleUseCase(folder, 'widget')
|
|
5969
|
+
'delete-widget': ()=>deleteReactModuleUseCase(folder, 'widget'),
|
|
5970
|
+
'move-ui-kit-component': ()=>moveReactModuleUseCase(folder, 'ui-kit'),
|
|
5971
|
+
'move-shared-hook': ()=>moveReactModuleUseCase(folder, 'hook'),
|
|
5972
|
+
'delete-ui-kit-component': ()=>deleteReactModuleUseCase(folder, 'ui-kit'),
|
|
5973
|
+
'delete-shared-hook': ()=>deleteReactModuleUseCase(folder, 'hook')
|
|
5859
5974
|
};
|
|
5860
5975
|
return actions[request.operation]();
|
|
5861
5976
|
};
|
|
@@ -6014,8 +6129,12 @@ Options:
|
|
|
6014
6129
|
'New shared hook',
|
|
6015
6130
|
'Move or rename widget',
|
|
6016
6131
|
'Move or rename page',
|
|
6132
|
+
'Move or rename UI-kit component',
|
|
6133
|
+
'Move or rename shared hook',
|
|
6017
6134
|
'Delete widget',
|
|
6018
|
-
'Delete page'
|
|
6135
|
+
'Delete page',
|
|
6136
|
+
'Delete UI-kit component',
|
|
6137
|
+
'Delete shared hook'
|
|
6019
6138
|
]
|
|
6020
6139
|
});
|
|
6021
6140
|
switch(action){
|
|
@@ -6035,6 +6154,14 @@ Options:
|
|
|
6035
6154
|
return void await deleteReactModuleUseCase(reactFolder, 'widget');
|
|
6036
6155
|
case 'Delete page':
|
|
6037
6156
|
return void await deleteReactModuleUseCase(reactFolder, 'page');
|
|
6157
|
+
case 'Move or rename UI-kit component':
|
|
6158
|
+
return void await moveReactModuleUseCase(reactFolder, 'ui-kit');
|
|
6159
|
+
case 'Move or rename shared hook':
|
|
6160
|
+
return void await moveReactModuleUseCase(reactFolder, 'hook');
|
|
6161
|
+
case 'Delete UI-kit component':
|
|
6162
|
+
return void await deleteReactModuleUseCase(reactFolder, 'ui-kit');
|
|
6163
|
+
case 'Delete shared hook':
|
|
6164
|
+
return void await deleteReactModuleUseCase(reactFolder, 'hook');
|
|
6038
6165
|
default:
|
|
6039
6166
|
return;
|
|
6040
6167
|
}
|
package/dist/react.js
CHANGED
|
@@ -55,8 +55,12 @@ Options:
|
|
|
55
55
|
'New shared hook',
|
|
56
56
|
'Move or rename widget',
|
|
57
57
|
'Move or rename page',
|
|
58
|
+
'Move or rename UI-kit component',
|
|
59
|
+
'Move or rename shared hook',
|
|
58
60
|
'Delete widget',
|
|
59
|
-
'Delete page'
|
|
61
|
+
'Delete page',
|
|
62
|
+
'Delete UI-kit component',
|
|
63
|
+
'Delete shared hook'
|
|
60
64
|
]
|
|
61
65
|
});
|
|
62
66
|
switch(action){
|
|
@@ -76,6 +80,14 @@ Options:
|
|
|
76
80
|
return void await deleteReactModuleUseCase(reactFolder, 'widget');
|
|
77
81
|
case 'Delete page':
|
|
78
82
|
return void await deleteReactModuleUseCase(reactFolder, 'page');
|
|
83
|
+
case 'Move or rename UI-kit component':
|
|
84
|
+
return void await moveReactModuleUseCase(reactFolder, 'ui-kit');
|
|
85
|
+
case 'Move or rename shared hook':
|
|
86
|
+
return void await moveReactModuleUseCase(reactFolder, 'hook');
|
|
87
|
+
case 'Delete UI-kit component':
|
|
88
|
+
return void await deleteReactModuleUseCase(reactFolder, 'ui-kit');
|
|
89
|
+
case 'Delete shared hook':
|
|
90
|
+
return void await deleteReactModuleUseCase(reactFolder, 'hook');
|
|
79
91
|
default:
|
|
80
92
|
return;
|
|
81
93
|
}
|
package/dist/upgrade-steps.d.ts
CHANGED
|
@@ -65,7 +65,7 @@ export declare const planUpgrade: (config: unknown, acceptOptional?: (step: Plan
|
|
|
65
65
|
add?: ("queries" | "commands" | "use-cases" | "application-ports" | "repositories" | "domain-services" | "application-services" | "infrastructure-services" | "presentation-services")[] | undefined;
|
|
66
66
|
remove?: ("queries" | "commands" | "use-cases" | "application-ports" | "repositories" | "domain-services" | "application-services" | "infrastructure-services" | "presentation-services")[] | undefined;
|
|
67
67
|
}>> | undefined;
|
|
68
|
-
lint?: Partial<Record<"context-isolation" | "shared-kernel" | "layers" | "dependencies" | "react" | "clock", boolean>> | undefined;
|
|
68
|
+
lint?: Partial<Record<"context-isolation" | "shared-kernel" | "layers" | "dependencies" | "react" | "clock" | "config", boolean>> | undefined;
|
|
69
69
|
} | undefined;
|
|
70
70
|
} | undefined;
|
|
71
71
|
frontend?: {
|
package/dist/upgrade.cjs
CHANGED
package/package.json
CHANGED
|
@@ -42,7 +42,8 @@ Run it from the project root; `rootFolder` defaults to the config's. It resolves
|
|
|
42
42
|
- imports against the layers ("Ground rules"; specs excluded);
|
|
43
43
|
- module files importing kinds the project's dependency rules don't allow (a use case importing a use case, a query importing a command, …), and wired dependencies they don't allow ("Wiring" below, `df-ps-scaffold` rule 3); an implementation importing its own contract is fine;
|
|
44
44
|
- a widget importing another widget (a widget = the nearest folder under `presentation/react/widgets/` with a `*-widget.tsx`, nested widgets included), UI-kit importing widgets, pages or contexts, shared hooks importing UI-kit, widgets, pages or contexts;
|
|
45
|
-
- `new Date()` / `Date.now()` in domain or application (use the `clock` port)
|
|
45
|
+
- `new Date()` / `Date.now()` in domain or application (use the `clock` port);
|
|
46
|
+
- `process.env` / `import.meta.env` in domain or application (use the `config` port).
|
|
46
47
|
|
|
47
48
|
It exits with 1 when anything is found. Checks turned off in the config (`backend.rules.lint`) aren't reported; don't turn checks off yourself.
|
|
48
49
|
|
|
@@ -41,7 +41,7 @@ A business element goes to UI-kit only when several widgets contain the same ele
|
|
|
41
41
|
|
|
42
42
|
## Running df-react
|
|
43
43
|
|
|
44
|
-
Prefer `npx df-react --describe` and `npx df-react --request` JSON. The installed schema lists operations (`page`, `widget`, `ui-kit-component`, `shared-hook`, `move-page`, `move-widget`, `delete-page`, `delete-widget`), fields and current React modules. For example:
|
|
44
|
+
Prefer `npx df-react --describe` and `npx df-react --request` JSON. The installed schema lists operations (`page`, `widget`, `ui-kit-component`, `shared-hook`, `move-page`, `move-widget`, `delete-page`, `delete-widget`, `move-ui-kit-component`, `move-shared-hook`, `delete-ui-kit-component`, `delete-shared-hook`), fields and current React modules. For example:
|
|
45
45
|
|
|
46
46
|
```bash
|
|
47
47
|
npx df-react --request '{"operation":"widget","name":"cart","widgetType":"separated"}'
|
|
@@ -54,15 +54,15 @@ node <df-ps-scaffold-skill-dir>/scripts/drive.mjs --bin df-react [--cwd <dir>] [
|
|
|
54
54
|
node <df-ps-scaffold-skill-dir>/scripts/drive.mjs --bin df-react "pick:New widget" text:cart "pick:with separated ui"
|
|
55
55
|
```
|
|
56
56
|
|
|
57
|
-
Steps and checks are the same as for `df-scaffold` ("Legacy interactive driver" in `df-ps-scaffold`). Its menu: `New widget`, `New page`, `New UI-kit component`, `New shared hook`, `Move or rename widget`, `Move or rename page`, `Delete widget`, `Delete page`. Prompts and output of each: `references/generators.md`.
|
|
57
|
+
Steps and checks are the same as for `df-scaffold` ("Legacy interactive driver" in `df-ps-scaffold`). Its menu: `New widget`, `New page`, `New UI-kit component`, `New shared hook`, `Move or rename widget`, `Move or rename page`, `Move or rename UI-kit component`, `Move or rename shared hook`, `Delete widget`, `Delete page`, `Delete UI-kit component`, `Delete shared hook`. Prompts and output of each: `references/generators.md`.
|
|
58
58
|
|
|
59
59
|
If the CLI cannot run, report the failure and give the user the prepared JSON command (a menu path only for a legacy CLI). Never hand-write its output.
|
|
60
60
|
|
|
61
61
|
### Moving and renaming
|
|
62
62
|
|
|
63
|
-
Moving or renaming a page or widget is a df-react run (`Move or rename page` / `Move or rename widget`): it creates the files at the new paths, so it needs an approved plan. With Next.js, moving a page can also move its App Router route and so change its URL: state in the plan whether the route moves (`moveRoute`), and ask the user when the request doesn't say. Don't move, rename, or copy their files by hand, and don't rename their `<Name>Page…`, `<Name>Widget…`, or `use<Name>UIModel` by hand: df-react keeps file names, code names, story titles, and imports in sync. List each move as a plan row (Type `page move` / `widget move`, Name `old → new`).
|
|
63
|
+
Moving or renaming a page or widget is a df-react run (`Move or rename page` / `Move or rename widget`): it creates the files at the new paths, so it needs an approved plan. With Next.js, moving a page can also move its App Router route and so change its URL: state in the plan whether the route moves (`moveRoute`), and ask the user when the request doesn't say. Don't move, rename, or copy their files by hand, and don't rename their `<Name>Page…`, `<Name>Widget…`, or `use<Name>UIModel` by hand: df-react keeps file names, code names, story titles, and imports in sync. List each move as a plan row (Type `page move` / `widget move` / `ui-kit component move` / `hook move`, Name `old → new`). UI-kit components and shared hooks move and rename the same way (`move-ui-kit-component`, `move-shared-hook`), without folders: their files, `<Name>` / `<Name>Props` / `use<Name>`, story titles and imports follow.
|
|
64
64
|
|
|
65
|
-
Deleting a page or widget is a df-react run too (`Delete page` / `Delete widget`, JSON `delete-page` / `delete-widget`) and needs an approved plan (Type `page delete` / `widget delete`). It is refused while other files import the module (`DELETE_NOT_ALLOWED` with `details.usedBy`): remove those uses first, or delete the importing module first. With Next.js, deleting a page can also delete its own route and so its URL: state it in the plan (`deleteRoute`), and ask the user when the request doesn't say. Never delete their files by hand.
|
|
65
|
+
Deleting a page or widget is a df-react run too (`Delete page` / `Delete widget`, JSON `delete-page` / `delete-widget`) and needs an approved plan (Type `page delete` / `widget delete`); so is deleting a UI-kit component or shared hook (`delete-ui-kit-component`, `delete-shared-hook`; Type `ui-kit component delete` / `hook delete`). It is refused while other files import the module (`DELETE_NOT_ALLOWED` with `details.usedBy`): remove those uses first, or delete the importing module first. With Next.js, deleting a page can also delete its own route and so its URL: state it in the plan (`deleteRoute`), and ask the user when the request doesn't say. Never delete their files by hand.
|
|
66
66
|
|
|
67
67
|
### Files you may create by hand
|
|
68
68
|
|
|
@@ -25,6 +25,10 @@ Page and widget names may have folders before them: `text:admin/panel/users` →
|
|
|
25
25
|
|
|
26
26
|
Move or rename a page or a widget only with df-react, never by hand: `"pick:Move or rename widget" "pick:admin/users" text:team/users "yes"` (`Move or rename page` for pages; the list shows nested names, the default new name is the current one). It moves the widget folder (or the page with its `<name>-page.*` files), renames files and `<Name>Widget…` / `use<Name>UIModel` / `<Name>Page…` to the new name, updates a generated story title and every import of the module (relative and `tsconfig` aliases; importers of barrels re-exporting it get the renamed classes), and fixes relative imports inside it. Before `Apply?` it prints the files to move and to update; check them. An existing target or a move into itself is rejected.
|
|
27
27
|
|
|
28
|
+
## Move, rename or delete a UI-kit component / shared hook
|
|
29
|
+
|
|
30
|
+
The same runs exist for them: `"pick:Move or rename UI-kit component" pick:button text:primary-button yes`, `"pick:Move or rename shared hook" pick:debounce text:throttle yes`, `"pick:Delete UI-kit component" pick:badge yes`, `"pick:Delete shared hook" pick:toggle yes`. Names have no folders; a hook's name is entered without `use-`. A move renames the folder or `use-<name>.*` files, `<Name>` / `<Name>Props` / `use<Name>`, the `UI-kit/<Name>` story title and every import; a delete is refused while other files import the module.
|
|
31
|
+
|
|
28
32
|
## Delete page / widget
|
|
29
33
|
|
|
30
34
|
Delete a page or a widget only with df-react: `"pick:Delete widget" "pick:orders/filters" yes` (`Delete page` for pages; with Next.js and the page's own route, a `yes`/`no` for deleting the route comes before `Delete?`). It deletes the widget folder (or the page with its `<name>-page.*` files) and, if confirmed, the route folder's own files. It refuses while other files import the module and lists them; nothing changes then.
|
|
@@ -88,7 +88,7 @@ Reply "ok" to start.
|
|
|
88
88
|
- **Scaffolding** has one block per owner, in run order: new contexts first, marked `(new)` (and `(provisional)` with the reason when ownership is a reversible default), then existing contexts, `shared-kernel`, React last.
|
|
89
89
|
- **Why here**: one short sentence on why this owner, not another: the data or rule the context owns; for `shared-kernel`, why several contexts share it; for React, why the UI changes.
|
|
90
90
|
- **What will be scaffolded**: one table per owner, one row per `df-scaffold`/`df-react` run. Layers in order domain → application → infrastructure → presentation, the layer in bold only on its first row. Repositories go with their aggregate in domain; commands, queries and ports in application (their implementations are Details); endpoints and React modules in presentation.
|
|
91
|
-
- **Type**: the unit: aggregate, entity, value object, error, error namespace, service, port, command, query, use case, implementation, endpoint, wire dependency, move, delete; for React: page, widget, ui-kit component, hook, page move, widget move, page delete, widget delete.
|
|
91
|
+
- **Type**: the unit: aggregate, entity, value object, error, error namespace, service, port, command, query, use case, implementation, endpoint, wire dependency, move, delete; for React: page, widget, ui-kit component, hook, page move, widget move, ui-kit component move, hook move, page delete, widget delete, ui-kit component delete, hook delete.
|
|
92
92
|
- **Name**: the entered name; for a move `old → new`; for an implementation the contract; for wire dependency the module.
|
|
93
93
|
- **Details**: only what changes behavior: implementation types (`(saved)` when saved for future runs), the test implementation, dependencies (`deps: OrderRepository`), environments, widget type, the endpoint's handler, whether a Next.js route moves (`route moves: /a → /b`). No file paths, no CLI menu paths.
|
|
94
94
|
- **Why**: at most six words: why this kind of module (`choosing-components.md`).
|