@solid-stack/mason 1.0.25 → 1.0.26

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/dist/index.cjs CHANGED
@@ -2,8 +2,8 @@
2
2
 
3
3
  var fs4 = require('fs');
4
4
  var path2 = require('path');
5
- var p15 = require('@clack/prompts');
6
- var pc15 = require('picocolors');
5
+ var p16 = require('@clack/prompts');
6
+ var pc16 = require('picocolors');
7
7
  var url = require('url');
8
8
  var child_process = require('child_process');
9
9
  var crypto = require('crypto');
@@ -33,8 +33,8 @@ function _interopNamespace(e) {
33
33
 
34
34
  var fs4__default = /*#__PURE__*/_interopDefault(fs4);
35
35
  var path2__default = /*#__PURE__*/_interopDefault(path2);
36
- var p15__namespace = /*#__PURE__*/_interopNamespace(p15);
37
- var pc15__default = /*#__PURE__*/_interopDefault(pc15);
36
+ var p16__namespace = /*#__PURE__*/_interopNamespace(p16);
37
+ var pc16__default = /*#__PURE__*/_interopDefault(pc16);
38
38
  var Handlebars__default = /*#__PURE__*/_interopDefault(Handlebars);
39
39
 
40
40
  // src/utils/formatting.ts
@@ -141,17 +141,17 @@ function writeFileSafely(absolutePath, content, options = {}) {
141
141
  function printGeneratedFiles(files, isDryRun = false) {
142
142
  console.log("");
143
143
  if (isDryRun) {
144
- p15__namespace.log.warn(pc15__default.default.yellow(pc15__default.default.bold("[DRY RUN PREVIEW] No files were written to disk.")));
144
+ p16__namespace.log.warn(pc16__default.default.yellow(pc16__default.default.bold("[DRY RUN PREVIEW] No files were written to disk.")));
145
145
  }
146
146
  for (const f of files) {
147
147
  if (f.action === "created") {
148
- p15__namespace.log.success(`${pc15__default.default.bold(f.relativePath)} ${pc15__default.default.dim("(created)")}`);
148
+ p16__namespace.log.success(`${pc16__default.default.bold(f.relativePath)} ${pc16__default.default.dim("(created)")}`);
149
149
  } else if (f.action === "overwritten") {
150
- p15__namespace.log.warn(`${pc15__default.default.bold(f.relativePath)} ${pc15__default.default.dim("(overwritten)")}`);
150
+ p16__namespace.log.warn(`${pc16__default.default.bold(f.relativePath)} ${pc16__default.default.dim("(overwritten)")}`);
151
151
  } else if (f.action === "skipped") {
152
- p15__namespace.log.info(`${pc15__default.default.dim(f.relativePath)} ${pc15__default.default.dim("(skipped - already exists, pass -o to overwrite)")}`);
152
+ p16__namespace.log.info(`${pc16__default.default.dim(f.relativePath)} ${pc16__default.default.dim("(skipped - already exists, pass -o to overwrite)")}`);
153
153
  } else {
154
- p15__namespace.log.info(`${pc15__default.default.bold(f.relativePath)} ${pc15__default.default.dim("(preview)")}`);
154
+ p16__namespace.log.info(`${pc16__default.default.bold(f.relativePath)} ${pc16__default.default.dim("(preview)")}`);
155
155
  }
156
156
  }
157
157
  }
@@ -353,23 +353,23 @@ var PromptCancelledError = class extends Error {
353
353
  }
354
354
  };
355
355
  function handleCancel(result) {
356
- if (p15__namespace.isCancel(result)) {
357
- p15__namespace.cancel("Operation cancelled.");
356
+ if (p16__namespace.isCancel(result)) {
357
+ p16__namespace.cancel("Operation cancelled.");
358
358
  throw new PromptCancelledError();
359
359
  }
360
360
  return result;
361
361
  }
362
362
  function printBanner() {
363
363
  console.log("");
364
- p15__namespace.intro(pc15__default.default.bgCyan(pc15__default.default.black(" @solid-stack/mason ")));
364
+ p16__namespace.intro(pc16__default.default.bgCyan(pc16__default.default.black(" @solid-stack/mason ")));
365
365
  }
366
366
  async function promptProperties(options = {}) {
367
367
  const properties = options.defaults ? [...options.defaults] : [];
368
368
  if (properties.length > 0) {
369
- const summary = properties.map((p18) => `${p18.name}: ${p18.type}${p18.optional ? "?" : ""}`).join(", ");
370
- p15__namespace.log.info(pc15__default.default.dim(`Pre-configured fields: ${summary}`));
369
+ const summary = properties.map((p19) => `${p19.name}: ${p19.type}${p19.optional ? "?" : ""}`).join(", ");
370
+ p16__namespace.log.info(pc16__default.default.dim(`Pre-configured fields: ${summary}`));
371
371
  const addMore = handleCancel(
372
- await p15__namespace.confirm({
372
+ await p16__namespace.confirm({
373
373
  message: "Would you like to add custom fields/properties?",
374
374
  initialValue: false
375
375
  })
@@ -378,10 +378,10 @@ async function promptProperties(options = {}) {
378
378
  return properties;
379
379
  }
380
380
  }
381
- p15__namespace.log.info(pc15__default.default.cyan("Enter properties (leave name blank when finished):"));
381
+ p16__namespace.log.info(pc16__default.default.cyan("Enter properties (leave name blank when finished):"));
382
382
  while (true) {
383
383
  const name = handleCancel(
384
- await p15__namespace.text({
384
+ await p16__namespace.text({
385
385
  message: "Property name (or press Enter to finish):",
386
386
  placeholder: "e.g. title, email, status"
387
387
  })
@@ -390,7 +390,7 @@ async function promptProperties(options = {}) {
390
390
  break;
391
391
  }
392
392
  const type = handleCancel(
393
- await p15__namespace.select({
393
+ await p16__namespace.select({
394
394
  message: `Type for property "${name.trim()}":`,
395
395
  options: [
396
396
  { value: "string", label: "string" },
@@ -407,7 +407,7 @@ async function promptProperties(options = {}) {
407
407
  let finalType = type;
408
408
  if (type === "custom") {
409
409
  finalType = handleCancel(
410
- await p15__namespace.text({
410
+ await p16__namespace.text({
411
411
  message: `Enter custom type for "${name.trim()}":`,
412
412
  placeholder: "e.g. UserRole, string | null",
413
413
  validate: (val) => val && val.trim() ? void 0 : "Type cannot be empty"
@@ -415,7 +415,7 @@ async function promptProperties(options = {}) {
415
415
  );
416
416
  }
417
417
  const optional = handleCancel(
418
- await p15__namespace.confirm({
418
+ await p16__namespace.confirm({
419
419
  message: `Is "${name.trim()}" optional?`,
420
420
  initialValue: false
421
421
  })
@@ -425,8 +425,8 @@ async function promptProperties(options = {}) {
425
425
  type: finalType.trim(),
426
426
  optional
427
427
  });
428
- p15__namespace.log.success(
429
- pc15__default.default.green(`Added: ${name.trim()}${optional ? "?" : ""}: ${finalType.trim()}`)
428
+ p16__namespace.log.success(
429
+ pc16__default.default.green(`Added: ${name.trim()}${optional ? "?" : ""}: ${finalType.trim()}`)
430
430
  );
431
431
  }
432
432
  return properties;
@@ -634,8 +634,8 @@ function getMissingNpmPackages(projectRoot, requiredPackages) {
634
634
  ...Object.keys(pkg.devDependencies || {}),
635
635
  ...Object.keys(pkg.peerDependencies || {})
636
636
  ]);
637
- return requiredPackages.filter((p18) => {
638
- const nameOnly = p18.startsWith("@") ? `@${p18.slice(1).split("@")[0] || ""}` : p18.split("@")[0] || p18;
637
+ return requiredPackages.filter((p19) => {
638
+ const nameOnly = p19.startsWith("@") ? `@${p19.slice(1).split("@")[0] || ""}` : p19.split("@")[0] || p19;
639
639
  return !installed.has(nameOnly);
640
640
  });
641
641
  } catch {
@@ -660,7 +660,7 @@ function installNpmPackages(projectRoot, packages, pm) {
660
660
  installCmd = `npm install ${packages.join(" ")}`;
661
661
  break;
662
662
  }
663
- p15__namespace.log.info(`Installing missing dependencies with ${manager}: ${pc15__default.default.cyan(packages.join(", "))}`);
663
+ p16__namespace.log.info(`Installing missing dependencies with ${manager}: ${pc16__default.default.cyan(packages.join(", "))}`);
664
664
  child_process.execSync(installCmd, {
665
665
  cwd: projectRoot,
666
666
  stdio: "inherit"
@@ -862,7 +862,7 @@ function generateInterfaceCode(ifaceName, kind = "abstractClass", entityName, me
862
862
  const idKey = `${entityKey}Id`;
863
863
  const listKey = `${entityKey}s`;
864
864
  const formattedCustomMethods = customMethods.map((m) => {
865
- const params = m.params && m.params.length > 0 ? m.params.map((p18) => `${p18.name}: ${p18.type}`).join("; ") : "";
865
+ const params = m.params && m.params.length > 0 ? m.params.map((p19) => `${p19.name}: ${p19.type}`).join("; ") : "";
866
866
  const returnType = m.returnType ? `Promise<${m.returnType}>` : "Promise<void>";
867
867
  return {
868
868
  name: m.name,
@@ -1443,22 +1443,22 @@ function generateUseCaseCode(useCaseName, dependencies = [], inputProps = [], ou
1443
1443
  from: /^I[A-Z]/.test(dep) ? `../domain/${dep}.js` : `./${dep}.js`
1444
1444
  }));
1445
1445
  const domainTypesToImport = new Set(domainImports);
1446
- for (const p18 of [...inputProps, ...outputProps]) {
1447
- const rawType = p18.type.trim();
1446
+ for (const p19 of [...inputProps, ...outputProps]) {
1447
+ const rawType = p19.type.trim();
1448
1448
  const baseType = rawType.replace(/\[\]$/, "").trim();
1449
1449
  if (!primitiveTypes.has(baseType) && /^[A-Z][A-Za-z0-9_]*$/.test(baseType) && !dependencies.includes(baseType)) {
1450
1450
  domainTypesToImport.add(baseType);
1451
1451
  }
1452
1452
  }
1453
- const formattedInputProps = inputProps.map((p18) => ({
1454
- name: p18.name,
1455
- optional: p18.optional,
1456
- type: p18.optional && !p18.type.includes("undefined") ? `${p18.type} | undefined` : p18.type
1453
+ const formattedInputProps = inputProps.map((p19) => ({
1454
+ name: p19.name,
1455
+ optional: p19.optional,
1456
+ type: p19.optional && !p19.type.includes("undefined") ? `${p19.type} | undefined` : p19.type
1457
1457
  }));
1458
- const formattedOutputProps = outputProps.map((p18) => ({
1459
- name: p18.name,
1460
- optional: p18.optional,
1461
- type: p18.optional && !p18.type.includes("undefined") ? `${p18.type} | undefined` : p18.type
1458
+ const formattedOutputProps = outputProps.map((p19) => ({
1459
+ name: p19.name,
1460
+ optional: p19.optional,
1461
+ type: p19.optional && !p19.type.includes("undefined") ? `${p19.type} | undefined` : p19.type
1462
1462
  }));
1463
1463
  const formattedDeps = dependencies.map((dep) => ({
1464
1464
  key: toCamelCase(dep),
@@ -2133,7 +2133,7 @@ async function runFeatureCommand(featureNameArg, flags = {}) {
2133
2133
  }
2134
2134
  if (!name) {
2135
2135
  name = handleCancel(
2136
- await p15__namespace.text({
2136
+ await p16__namespace.text({
2137
2137
  message: "What is the feature name?",
2138
2138
  placeholder: "e.g. users, auth, orders, billing",
2139
2139
  validate: (val) => {
@@ -2149,7 +2149,7 @@ async function runFeatureCommand(featureNameArg, flags = {}) {
2149
2149
  let targetDirRel = defaultDir;
2150
2150
  if (!flags.yes && !flags.target && !flags.dest) {
2151
2151
  targetDirRel = handleCancel(
2152
- await p15__namespace.text({
2152
+ await p16__namespace.text({
2153
2153
  message: "Target directory for the feature:",
2154
2154
  initialValue: defaultDir,
2155
2155
  defaultValue: defaultDir
@@ -2171,14 +2171,14 @@ async function runFeatureCommand(featureNameArg, flags = {}) {
2171
2171
  const customUseCases = [];
2172
2172
  if (!flags.yes) {
2173
2173
  includeExpress = handleCancel(
2174
- await p15__namespace.confirm({
2174
+ await p16__namespace.confirm({
2175
2175
  message: "Include Express Presentation layer (pxExpress routes & handlers)?",
2176
2176
  initialValue: true
2177
2177
  })
2178
2178
  );
2179
2179
  if (includeExpress) {
2180
2180
  routePath = handleCancel(
2181
- await p15__namespace.text({
2181
+ await p16__namespace.text({
2182
2182
  message: "Express route prefix:",
2183
2183
  initialValue: `/${normalizedName}`,
2184
2184
  defaultValue: `/${normalizedName}`
@@ -2186,14 +2186,14 @@ async function runFeatureCommand(featureNameArg, flags = {}) {
2186
2186
  ).trim();
2187
2187
  }
2188
2188
  includeDomain = handleCancel(
2189
- await p15__namespace.confirm({
2189
+ await p16__namespace.confirm({
2190
2190
  message: "Include Domain Entity/Entities?",
2191
2191
  initialValue: true
2192
2192
  })
2193
2193
  );
2194
2194
  if (includeDomain) {
2195
2195
  const domainInput = handleCancel(
2196
- await p15__namespace.text({
2196
+ await p16__namespace.text({
2197
2197
  message: "Domain entity name(s) (comma-separated):",
2198
2198
  initialValue: defaultEntity,
2199
2199
  defaultValue: defaultEntity,
@@ -2212,21 +2212,21 @@ async function runFeatureCommand(featureNameArg, flags = {}) {
2212
2212
  entityNames = [defaultEntity];
2213
2213
  }
2214
2214
  includeInterface = handleCancel(
2215
- await p15__namespace.confirm({
2215
+ await p16__namespace.confirm({
2216
2216
  message: `Include Domain Repository interface(s) for ${entityNames.join(", ")}?`,
2217
2217
  initialValue: true
2218
2218
  })
2219
2219
  );
2220
2220
  if (includeInterface) {
2221
2221
  includeInfra = handleCancel(
2222
- await p15__namespace.confirm({
2222
+ await p16__namespace.confirm({
2223
2223
  message: `Include Infrastructure Stub implementation(s) for ${entityNames.join(", ")}?`,
2224
2224
  initialValue: true
2225
2225
  })
2226
2226
  );
2227
2227
  }
2228
2228
  includeUseCase = handleCancel(
2229
- await p15__namespace.confirm({
2229
+ await p16__namespace.confirm({
2230
2230
  message: "Include Domain Use Cases?",
2231
2231
  initialValue: true
2232
2232
  })
@@ -2240,7 +2240,7 @@ async function runFeatureCommand(featureNameArg, flags = {}) {
2240
2240
  { value: "delete", label: "Delete (Delete<Entity>)", hint: "DELETE /:id" }
2241
2241
  ];
2242
2242
  crudOperations = handleCancel(
2243
- await p15__namespace.multiselect({
2243
+ await p16__namespace.multiselect({
2244
2244
  message: "Select standard CRUD use cases to generate:",
2245
2245
  options: crudChoices,
2246
2246
  initialValues: ["create", "read", "list", "update", "delete"],
@@ -2248,13 +2248,13 @@ async function runFeatureCommand(featureNameArg, flags = {}) {
2248
2248
  })
2249
2249
  );
2250
2250
  includeTests = handleCancel(
2251
- await p15__namespace.confirm({
2251
+ await p16__namespace.confirm({
2252
2252
  message: "Generate Vitest unit tests for use cases?",
2253
2253
  initialValue: true
2254
2254
  })
2255
2255
  );
2256
2256
  const wantCustom = handleCancel(
2257
- await p15__namespace.confirm({
2257
+ await p16__namespace.confirm({
2258
2258
  message: "Do you want to add any custom use cases to this feature?",
2259
2259
  initialValue: false
2260
2260
  })
@@ -2264,7 +2264,7 @@ async function runFeatureCommand(featureNameArg, flags = {}) {
2264
2264
  const availableIfaces = entityNames.map((e) => `I${e}Repository`);
2265
2265
  while (addMore) {
2266
2266
  const customName = handleCancel(
2267
- await p15__namespace.text({
2267
+ await p16__namespace.text({
2268
2268
  message: "Custom Use Case name:",
2269
2269
  placeholder: "e.g. ResetPassword, VerifyEmail, AssignRole",
2270
2270
  validate: (v) => v && v.trim() ? void 0 : "Use Case name cannot be empty"
@@ -2274,7 +2274,7 @@ async function runFeatureCommand(featureNameArg, flags = {}) {
2274
2274
  let selectedDeps = [];
2275
2275
  if (availableIfaces.length > 0) {
2276
2276
  selectedDeps = handleCancel(
2277
- await p15__namespace.multiselect({
2277
+ await p16__namespace.multiselect({
2278
2278
  message: `Select domain interfaces to inject into ${customUcName}:`,
2279
2279
  options: availableIfaces.map((i) => ({ value: i, label: i })),
2280
2280
  required: false
@@ -2283,7 +2283,7 @@ async function runFeatureCommand(featureNameArg, flags = {}) {
2283
2283
  }
2284
2284
  let customInputProps = [];
2285
2285
  const hasInput = handleCancel(
2286
- await p15__namespace.confirm({
2286
+ await p16__namespace.confirm({
2287
2287
  message: `Does ${customUcName} accept input arguments?`,
2288
2288
  initialValue: true
2289
2289
  })
@@ -2294,7 +2294,7 @@ async function runFeatureCommand(featureNameArg, flags = {}) {
2294
2294
  }
2295
2295
  let customOutputProps = [];
2296
2296
  const hasCustomOutput = handleCancel(
2297
- await p15__namespace.confirm({
2297
+ await p16__namespace.confirm({
2298
2298
  message: `Does ${customUcName} return custom output data?`,
2299
2299
  initialValue: false
2300
2300
  })
@@ -2304,7 +2304,7 @@ async function runFeatureCommand(featureNameArg, flags = {}) {
2304
2304
  });
2305
2305
  }
2306
2306
  const customIncludeTest = handleCancel(
2307
- await p15__namespace.confirm({
2307
+ await p16__namespace.confirm({
2308
2308
  message: `Generate Vitest unit test for ${customUcName}?`,
2309
2309
  initialValue: true
2310
2310
  })
@@ -2314,14 +2314,14 @@ async function runFeatureCommand(featureNameArg, flags = {}) {
2314
2314
  let customHttpPath = `/${toKebabCase(customUcName)}`;
2315
2315
  if (includeExpress) {
2316
2316
  customCreateHttp = handleCancel(
2317
- await p15__namespace.confirm({
2317
+ await p16__namespace.confirm({
2318
2318
  message: `Generate a matching ExpressRoute HTTP handler for ${customUcName}?`,
2319
2319
  initialValue: true
2320
2320
  })
2321
2321
  );
2322
2322
  if (customCreateHttp) {
2323
2323
  customHttpMethod = handleCancel(
2324
- await p15__namespace.select({
2324
+ await p16__namespace.select({
2325
2325
  message: "HTTP method for route:",
2326
2326
  options: [
2327
2327
  { value: "post", label: "POST" },
@@ -2334,7 +2334,7 @@ async function runFeatureCommand(featureNameArg, flags = {}) {
2334
2334
  })
2335
2335
  );
2336
2336
  customHttpPath = handleCancel(
2337
- await p15__namespace.text({
2337
+ await p16__namespace.text({
2338
2338
  message: "Route subpath (relative to feature prefix):",
2339
2339
  initialValue: `/${toKebabCase(customUcName)}`,
2340
2340
  defaultValue: `/${toKebabCase(customUcName)}`
@@ -2355,7 +2355,7 @@ async function runFeatureCommand(featureNameArg, flags = {}) {
2355
2355
  validationFields: customInputProps
2356
2356
  });
2357
2357
  addMore = handleCancel(
2358
- await p15__namespace.confirm({
2358
+ await p16__namespace.confirm({
2359
2359
  message: "Add another custom use case?",
2360
2360
  initialValue: false
2361
2361
  })
@@ -2364,7 +2364,7 @@ async function runFeatureCommand(featureNameArg, flags = {}) {
2364
2364
  }
2365
2365
  }
2366
2366
  includeDiProvider = handleCancel(
2367
- await p15__namespace.confirm({
2367
+ await p16__namespace.confirm({
2368
2368
  message: "Generate / update feature DI provider (diProvider.ts)?",
2369
2369
  initialValue: true
2370
2370
  })
@@ -2376,8 +2376,8 @@ async function runFeatureCommand(featureNameArg, flags = {}) {
2376
2376
  entityNames = [defaultEntity];
2377
2377
  }
2378
2378
  }
2379
- const s = p15__namespace.spinner();
2380
- s.start(`Generating feature '${pc15__default.default.cyan(normalizedName)}'...`);
2379
+ const s = p16__namespace.spinner();
2380
+ s.start(`Generating feature '${pc16__default.default.cyan(normalizedName)}'...`);
2381
2381
  const options = {
2382
2382
  name: normalizedName,
2383
2383
  projectRoot,
@@ -2423,8 +2423,8 @@ async function runFeatureCommand(featureNameArg, flags = {}) {
2423
2423
  }
2424
2424
  s.stop("Feature scaffolded successfully!");
2425
2425
  printGeneratedFiles(files, options.dryRun);
2426
- p15__namespace.outro(
2427
- pc15__default.default.green(
2426
+ p16__namespace.outro(
2427
+ pc16__default.default.green(
2428
2428
  `\u2713 Feature '${normalizedName}' initialized in ${path2__default.default.relative(projectRoot, targetDir)} (uncommitted, unregistered)`
2429
2429
  )
2430
2430
  );
@@ -2538,7 +2538,7 @@ async function runSharedCommand(sharedNameArg, flags = {}) {
2538
2538
  }
2539
2539
  if (!name) {
2540
2540
  name = handleCancel(
2541
- await p15__namespace.text({
2541
+ await p16__namespace.text({
2542
2542
  message: "What is the shared module name?",
2543
2543
  placeholder: "e.g. hasher, time, uuid, cache, logger",
2544
2544
  validate: (val) => {
@@ -2554,7 +2554,7 @@ async function runSharedCommand(sharedNameArg, flags = {}) {
2554
2554
  let targetDirRel = defaultDir;
2555
2555
  if (!flags.yes && !flags.target && !flags.dest) {
2556
2556
  targetDirRel = handleCancel(
2557
- await p15__namespace.text({
2557
+ await p16__namespace.text({
2558
2558
  message: "Target directory for the shared module:",
2559
2559
  initialValue: defaultDir,
2560
2560
  defaultValue: defaultDir
@@ -2566,21 +2566,21 @@ async function runSharedCommand(sharedNameArg, flags = {}) {
2566
2566
  let includeStub = true;
2567
2567
  if (!flags.yes) {
2568
2568
  description = handleCancel(
2569
- await p15__namespace.text({
2569
+ await p16__namespace.text({
2570
2570
  message: "Module description (optional):",
2571
2571
  placeholder: "e.g. In-memory caching and Redis port abstraction",
2572
2572
  initialValue: ""
2573
2573
  })
2574
2574
  ).trim();
2575
2575
  includeStub = handleCancel(
2576
- await p15__namespace.confirm({
2576
+ await p16__namespace.confirm({
2577
2577
  message: "Include stub implementation in infrastructure/?",
2578
2578
  initialValue: true
2579
2579
  })
2580
2580
  );
2581
2581
  }
2582
- const s = p15__namespace.spinner();
2583
- s.start(`Generating shared module '${pc15__default.default.cyan(normalizedName)}'...`);
2582
+ const s = p16__namespace.spinner();
2583
+ s.start(`Generating shared module '${pc16__default.default.cyan(normalizedName)}'...`);
2584
2584
  const files = generateShared({
2585
2585
  name: normalizedName,
2586
2586
  description,
@@ -2593,8 +2593,8 @@ async function runSharedCommand(sharedNameArg, flags = {}) {
2593
2593
  });
2594
2594
  s.stop("Shared module generated successfully!");
2595
2595
  printGeneratedFiles(files, Boolean(flags.dryRun));
2596
- p15__namespace.outro(
2597
- pc15__default.default.green(
2596
+ p16__namespace.outro(
2597
+ pc16__default.default.green(
2598
2598
  `\u2713 Shared module '${normalizedName}' initialized in ${path2__default.default.relative(projectRoot, targetDir)} (uncommitted, unregistered)`
2599
2599
  )
2600
2600
  );
@@ -2608,14 +2608,14 @@ async function runUseCaseCommand(useCaseNameArg, flags = {}) {
2608
2608
  const featureOptions = existingFeatures.map((f) => ({ value: f, label: f }));
2609
2609
  featureOptions.push({ value: "__custom__", label: "\u270F\uFE0F Enter custom feature name..." });
2610
2610
  const selected = handleCancel(
2611
- await p15__namespace.select({
2611
+ await p16__namespace.select({
2612
2612
  message: "Select target feature:",
2613
2613
  options: featureOptions
2614
2614
  })
2615
2615
  );
2616
2616
  if (selected === "__custom__") {
2617
2617
  feature = handleCancel(
2618
- await p15__namespace.text({
2618
+ await p16__namespace.text({
2619
2619
  message: "Enter feature name:",
2620
2620
  validate: (v) => v && v.trim() ? void 0 : "Feature name cannot be empty"
2621
2621
  })
@@ -2625,7 +2625,7 @@ async function runUseCaseCommand(useCaseNameArg, flags = {}) {
2625
2625
  }
2626
2626
  } else {
2627
2627
  feature = handleCancel(
2628
- await p15__namespace.text({
2628
+ await p16__namespace.text({
2629
2629
  message: "Enter target feature name:",
2630
2630
  validate: (v) => v && v.trim() ? void 0 : "Feature name cannot be empty"
2631
2631
  })
@@ -2636,7 +2636,7 @@ async function runUseCaseCommand(useCaseNameArg, flags = {}) {
2636
2636
  let name = useCaseNameArg?.trim();
2637
2637
  if (!name) {
2638
2638
  name = handleCancel(
2639
- await p15__namespace.text({
2639
+ await p16__namespace.text({
2640
2640
  message: "Use Case name:",
2641
2641
  placeholder: "e.g. CreateUser, GetUser, CancelOrder",
2642
2642
  validate: (v) => v && v.trim() ? void 0 : "Use Case name cannot be empty"
@@ -2652,7 +2652,7 @@ async function runUseCaseCommand(useCaseNameArg, flags = {}) {
2652
2652
  label: i.name
2653
2653
  }));
2654
2654
  selectedDeps = handleCancel(
2655
- await p15__namespace.multiselect({
2655
+ await p16__namespace.multiselect({
2656
2656
  message: "Select domain interfaces to inject into use case:",
2657
2657
  options: multiOptions,
2658
2658
  required: false
@@ -2667,7 +2667,7 @@ async function runUseCaseCommand(useCaseNameArg, flags = {}) {
2667
2667
  let httpPath = "/";
2668
2668
  if (!flags.yes) {
2669
2669
  const hasInput = handleCancel(
2670
- await p15__namespace.confirm({
2670
+ await p16__namespace.confirm({
2671
2671
  message: "Does this use case accept input arguments?",
2672
2672
  initialValue: true
2673
2673
  })
@@ -2677,7 +2677,7 @@ async function runUseCaseCommand(useCaseNameArg, flags = {}) {
2677
2677
  });
2678
2678
  }
2679
2679
  const hasCustomOutput = handleCancel(
2680
- await p15__namespace.confirm({
2680
+ await p16__namespace.confirm({
2681
2681
  message: "Does this use case return custom output data?",
2682
2682
  initialValue: false
2683
2683
  })
@@ -2687,20 +2687,20 @@ async function runUseCaseCommand(useCaseNameArg, flags = {}) {
2687
2687
  });
2688
2688
  }
2689
2689
  includeTest = handleCancel(
2690
- await p15__namespace.confirm({
2690
+ await p16__namespace.confirm({
2691
2691
  message: "Generate Vitest unit test skeleton (.test.ts)?",
2692
2692
  initialValue: true
2693
2693
  })
2694
2694
  );
2695
2695
  createHttp = handleCancel(
2696
- await p15__namespace.confirm({
2696
+ await p16__namespace.confirm({
2697
2697
  message: "Generate a matching ExpressRoute HTTP handler?",
2698
2698
  initialValue: false
2699
2699
  })
2700
2700
  );
2701
2701
  if (createHttp) {
2702
2702
  httpMethod = handleCancel(
2703
- await p15__namespace.select({
2703
+ await p16__namespace.select({
2704
2704
  message: "HTTP method for route:",
2705
2705
  options: [
2706
2706
  { value: "post", label: "POST" },
@@ -2713,7 +2713,7 @@ async function runUseCaseCommand(useCaseNameArg, flags = {}) {
2713
2713
  })
2714
2714
  );
2715
2715
  httpPath = handleCancel(
2716
- await p15__namespace.text({
2716
+ await p16__namespace.text({
2717
2717
  message: "Route subpath (relative to feature prefix):",
2718
2718
  initialValue: "/",
2719
2719
  defaultValue: "/"
@@ -2721,8 +2721,8 @@ async function runUseCaseCommand(useCaseNameArg, flags = {}) {
2721
2721
  ).trim();
2722
2722
  }
2723
2723
  }
2724
- const s = p15__namespace.spinner();
2725
- s.start(`Generating use case '${pc15__default.default.cyan(ucName)}'...`);
2724
+ const s = p16__namespace.spinner();
2725
+ s.start(`Generating use case '${pc16__default.default.cyan(ucName)}'...`);
2726
2726
  const options = {
2727
2727
  name: ucName,
2728
2728
  feature,
@@ -2754,7 +2754,7 @@ async function runUseCaseCommand(useCaseNameArg, flags = {}) {
2754
2754
  }
2755
2755
  s.stop("Use case generated successfully!");
2756
2756
  printGeneratedFiles(files, options.dryRun);
2757
- p15__namespace.outro(pc15__default.default.green(`Use case '${ucName}' created in feature '${feature}'!`));
2757
+ p16__namespace.outro(pc16__default.default.green(`Use case '${ucName}' created in feature '${feature}'!`));
2758
2758
  }
2759
2759
  async function runDomainCommand(domainNameArg, flags = {}) {
2760
2760
  const projectRoot = findProjectRoot();
@@ -2765,14 +2765,14 @@ async function runDomainCommand(domainNameArg, flags = {}) {
2765
2765
  const featureOptions = existingFeatures.map((f) => ({ value: f, label: f }));
2766
2766
  featureOptions.push({ value: "__custom__", label: "\u270F\uFE0F Enter custom feature name..." });
2767
2767
  const selected = handleCancel(
2768
- await p15__namespace.select({
2768
+ await p16__namespace.select({
2769
2769
  message: "Select target feature:",
2770
2770
  options: featureOptions
2771
2771
  })
2772
2772
  );
2773
2773
  if (selected === "__custom__") {
2774
2774
  feature = handleCancel(
2775
- await p15__namespace.text({
2775
+ await p16__namespace.text({
2776
2776
  message: "Enter feature name:",
2777
2777
  validate: (v) => v && v.trim() ? void 0 : "Feature name cannot be empty"
2778
2778
  })
@@ -2782,7 +2782,7 @@ async function runDomainCommand(domainNameArg, flags = {}) {
2782
2782
  }
2783
2783
  } else {
2784
2784
  feature = handleCancel(
2785
- await p15__namespace.text({
2785
+ await p16__namespace.text({
2786
2786
  message: "Enter target feature name:",
2787
2787
  validate: (v) => v && v.trim() ? void 0 : "Feature name cannot be empty"
2788
2788
  })
@@ -2793,7 +2793,7 @@ async function runDomainCommand(domainNameArg, flags = {}) {
2793
2793
  let name = domainNameArg?.trim();
2794
2794
  if (!name) {
2795
2795
  name = handleCancel(
2796
- await p15__namespace.text({
2796
+ await p16__namespace.text({
2797
2797
  message: "Domain model / entity name:",
2798
2798
  placeholder: "e.g. User, Order, Product, Address",
2799
2799
  validate: (v) => v && v.trim() ? void 0 : "Domain name cannot be empty"
@@ -2805,7 +2805,7 @@ async function runDomainCommand(domainNameArg, flags = {}) {
2805
2805
  let properties = [];
2806
2806
  if (!flags.yes) {
2807
2807
  kind = handleCancel(
2808
- await p15__namespace.select({
2808
+ await p16__namespace.select({
2809
2809
  message: "Select domain model type:",
2810
2810
  options: [
2811
2811
  { value: "interface", label: "TypeScript Interface (pure data structure)" },
@@ -2824,8 +2824,8 @@ async function runDomainCommand(domainNameArg, flags = {}) {
2824
2824
  defaults: kind === "valueObject" ? [{ name: "value", type: "string" }] : defaultProps
2825
2825
  });
2826
2826
  }
2827
- const s = p15__namespace.spinner();
2828
- s.start(`Generating domain model '${pc15__default.default.cyan(entityName)}'...`);
2827
+ const s = p16__namespace.spinner();
2828
+ s.start(`Generating domain model '${pc16__default.default.cyan(entityName)}'...`);
2829
2829
  const options = {
2830
2830
  name: entityName,
2831
2831
  feature,
@@ -2838,7 +2838,7 @@ async function runDomainCommand(domainNameArg, flags = {}) {
2838
2838
  const file = generateDomain(options);
2839
2839
  s.stop("Domain model generated successfully!");
2840
2840
  printGeneratedFiles([file], options.dryRun);
2841
- p15__namespace.outro(pc15__default.default.green(`Domain model '${entityName}' created in feature '${feature}'!`));
2841
+ p16__namespace.outro(pc16__default.default.green(`Domain model '${entityName}' created in feature '${feature}'!`));
2842
2842
  }
2843
2843
  async function runInfrastructureCommand(classNameArg, flags = {}) {
2844
2844
  const projectRoot = findProjectRoot();
@@ -2847,7 +2847,7 @@ async function runInfrastructureCommand(classNameArg, flags = {}) {
2847
2847
  let feature = flags.feature?.trim();
2848
2848
  if (!flags.yes && !flags.global && !flags.feature) {
2849
2849
  scope = handleCancel(
2850
- await p15__namespace.select({
2850
+ await p16__namespace.select({
2851
2851
  message: "Where should this infrastructure implementation be placed?",
2852
2852
  options: [
2853
2853
  { value: "feature", label: "Feature-level (features/<feature>/infrastructure)" },
@@ -2862,14 +2862,14 @@ async function runInfrastructureCommand(classNameArg, flags = {}) {
2862
2862
  const featureOptions = existingFeatures.map((f) => ({ value: f, label: f }));
2863
2863
  featureOptions.push({ value: "__custom__", label: "\u270F\uFE0F Enter custom feature name..." });
2864
2864
  const selected = handleCancel(
2865
- await p15__namespace.select({
2865
+ await p16__namespace.select({
2866
2866
  message: "Select target feature:",
2867
2867
  options: featureOptions
2868
2868
  })
2869
2869
  );
2870
2870
  if (selected === "__custom__") {
2871
2871
  feature = handleCancel(
2872
- await p15__namespace.text({
2872
+ await p16__namespace.text({
2873
2873
  message: "Enter feature name:",
2874
2874
  validate: (v) => v && v.trim() ? void 0 : "Feature name cannot be empty"
2875
2875
  })
@@ -2879,7 +2879,7 @@ async function runInfrastructureCommand(classNameArg, flags = {}) {
2879
2879
  }
2880
2880
  } else {
2881
2881
  feature = handleCancel(
2882
- await p15__namespace.text({
2882
+ await p16__namespace.text({
2883
2883
  message: "Enter target feature name:",
2884
2884
  validate: (v) => v && v.trim() ? void 0 : "Feature name cannot be empty"
2885
2885
  })
@@ -2892,7 +2892,7 @@ async function runInfrastructureCommand(classNameArg, flags = {}) {
2892
2892
  let name = classNameArg?.trim();
2893
2893
  if (!name) {
2894
2894
  name = handleCancel(
2895
- await p15__namespace.text({
2895
+ await p16__namespace.text({
2896
2896
  message: "Infrastructure class name:",
2897
2897
  placeholder: "e.g. StubUserRepository, PostgresUserRepository, S3FileStorage",
2898
2898
  validate: (v) => v && v.trim() ? void 0 : "Class name cannot be empty"
@@ -2911,7 +2911,7 @@ async function runInfrastructureCommand(classNameArg, flags = {}) {
2911
2911
  (i) => className.toLowerCase().includes(removeInterfacePrefix(i.name).toLowerCase())
2912
2912
  );
2913
2913
  const ifaceChoice = handleCancel(
2914
- await p15__namespace.select({
2914
+ await p16__namespace.select({
2915
2915
  message: "Does this class implement a domain interface or abstract class?",
2916
2916
  options: [
2917
2917
  ...interfaces.map((i) => ({ value: i.name, label: i.name })),
@@ -2923,7 +2923,7 @@ async function runInfrastructureCommand(classNameArg, flags = {}) {
2923
2923
  );
2924
2924
  if (ifaceChoice === "__custom__") {
2925
2925
  implementsInterface = handleCancel(
2926
- await p15__namespace.text({
2926
+ await p16__namespace.text({
2927
2927
  message: "Enter interface or abstract class name:",
2928
2928
  placeholder: "e.g. IUserRepository, BaseStorageAdapter",
2929
2929
  validate: (v) => v && v.trim() ? void 0 : "Name cannot be empty"
@@ -2934,14 +2934,14 @@ async function runInfrastructureCommand(classNameArg, flags = {}) {
2934
2934
  }
2935
2935
  } else {
2936
2936
  const wantImpl = handleCancel(
2937
- await p15__namespace.confirm({
2937
+ await p16__namespace.confirm({
2938
2938
  message: "Does this class implement a domain interface or abstract class?",
2939
2939
  initialValue: false
2940
2940
  })
2941
2941
  );
2942
2942
  if (wantImpl) {
2943
2943
  implementsInterface = handleCancel(
2944
- await p15__namespace.text({
2944
+ await p16__namespace.text({
2945
2945
  message: "Enter interface or abstract class name:",
2946
2946
  placeholder: "e.g. IUserRepository, BaseStorageAdapter",
2947
2947
  validate: (v) => v && v.trim() ? void 0 : "Name cannot be empty"
@@ -2961,7 +2961,7 @@ async function runInfrastructureCommand(classNameArg, flags = {}) {
2961
2961
  const allInterfaces = listDomainInterfaces(projectRoot);
2962
2962
  if (allInterfaces.length > 0) {
2963
2963
  const ifaceChoice = handleCancel(
2964
- await p15__namespace.select({
2964
+ await p16__namespace.select({
2965
2965
  message: "Does this class implement an interface or abstract class?",
2966
2966
  options: [
2967
2967
  ...allInterfaces.map((i) => ({ value: i.name, label: `${i.name} (${i.feature})` })),
@@ -2973,7 +2973,7 @@ async function runInfrastructureCommand(classNameArg, flags = {}) {
2973
2973
  );
2974
2974
  if (ifaceChoice === "__custom__") {
2975
2975
  implementsInterface = handleCancel(
2976
- await p15__namespace.text({
2976
+ await p16__namespace.text({
2977
2977
  message: "Enter interface or abstract class name:",
2978
2978
  placeholder: "e.g. IAuthRepository",
2979
2979
  validate: (v) => v && v.trim() ? void 0 : "Name cannot be empty"
@@ -2986,7 +2986,7 @@ async function runInfrastructureCommand(classNameArg, flags = {}) {
2986
2986
  }
2987
2987
  if (!flags.yes && !flags.kind) {
2988
2988
  kind = handleCancel(
2989
- await p15__namespace.select({
2989
+ await p16__namespace.select({
2990
2990
  message: "Select implementation kind:",
2991
2991
  options: [
2992
2992
  { value: "stub", label: "In-Memory Stub (with in-memory store and test helper methods)" },
@@ -2997,7 +2997,7 @@ async function runInfrastructureCommand(classNameArg, flags = {}) {
2997
2997
  );
2998
2998
  if (scope === "feature" && feature && implementsInterface) {
2999
2999
  registerInProvider = handleCancel(
3000
- await p15__namespace.confirm({
3000
+ await p16__namespace.confirm({
3001
3001
  message: "Register this implementation in feature diProvider.ts?",
3002
3002
  initialValue: true
3003
3003
  })
@@ -3006,8 +3006,8 @@ async function runInfrastructureCommand(classNameArg, flags = {}) {
3006
3006
  } else if (flags.yes && scope === "feature" && feature && implementsInterface) {
3007
3007
  registerInProvider = !flags.noProvider;
3008
3008
  }
3009
- const s = p15__namespace.spinner();
3010
- s.start(`Generating infrastructure class '${pc15__default.default.cyan(className)}'...`);
3009
+ const s = p16__namespace.spinner();
3010
+ s.start(`Generating infrastructure class '${pc16__default.default.cyan(className)}'...`);
3011
3011
  const files = [];
3012
3012
  const options = {
3013
3013
  name: className,
@@ -3042,7 +3042,7 @@ async function runInfrastructureCommand(classNameArg, flags = {}) {
3042
3042
  }
3043
3043
  s.stop("Infrastructure class generated successfully!");
3044
3044
  printGeneratedFiles(files, options.dryRun);
3045
- p15__namespace.outro(pc15__default.default.green(`Infrastructure class '${className}' created!`));
3045
+ p16__namespace.outro(pc16__default.default.green(`Infrastructure class '${className}' created!`));
3046
3046
  }
3047
3047
  async function runInterfaceCommand(interfaceNameArg, flags = {}) {
3048
3048
  const projectRoot = findProjectRoot();
@@ -3053,14 +3053,14 @@ async function runInterfaceCommand(interfaceNameArg, flags = {}) {
3053
3053
  const featureOptions = existingFeatures.map((f) => ({ value: f, label: f }));
3054
3054
  featureOptions.push({ value: "__custom__", label: "\u270F\uFE0F Enter custom feature name..." });
3055
3055
  const selected = handleCancel(
3056
- await p15__namespace.select({
3056
+ await p16__namespace.select({
3057
3057
  message: "Select target feature:",
3058
3058
  options: featureOptions
3059
3059
  })
3060
3060
  );
3061
3061
  if (selected === "__custom__") {
3062
3062
  feature = handleCancel(
3063
- await p15__namespace.text({
3063
+ await p16__namespace.text({
3064
3064
  message: "Enter feature name:",
3065
3065
  validate: (v) => v && v.trim() ? void 0 : "Feature name cannot be empty"
3066
3066
  })
@@ -3070,7 +3070,7 @@ async function runInterfaceCommand(interfaceNameArg, flags = {}) {
3070
3070
  }
3071
3071
  } else {
3072
3072
  feature = handleCancel(
3073
- await p15__namespace.text({
3073
+ await p16__namespace.text({
3074
3074
  message: "Enter target feature name:",
3075
3075
  validate: (v) => v && v.trim() ? void 0 : "Feature name cannot be empty"
3076
3076
  })
@@ -3081,7 +3081,7 @@ async function runInterfaceCommand(interfaceNameArg, flags = {}) {
3081
3081
  let name = interfaceNameArg?.trim();
3082
3082
  if (!name) {
3083
3083
  name = handleCancel(
3084
- await p15__namespace.text({
3084
+ await p16__namespace.text({
3085
3085
  message: "Domain interface name:",
3086
3086
  placeholder: "e.g. IUserRepository, IPaymentService",
3087
3087
  validate: (v) => v && v.trim() ? void 0 : "Interface name cannot be empty"
@@ -3099,7 +3099,7 @@ async function runInterfaceCommand(interfaceNameArg, flags = {}) {
3099
3099
  if (!flags.yes) {
3100
3100
  if (existingEntities.length > 0) {
3101
3101
  const selectedEntity = handleCancel(
3102
- await p15__namespace.select({
3102
+ await p16__namespace.select({
3103
3103
  message: "Select domain entity associated with this interface:",
3104
3104
  options: [
3105
3105
  ...existingEntities.map((e) => ({ value: e.name, label: e.name })),
@@ -3110,7 +3110,7 @@ async function runInterfaceCommand(interfaceNameArg, flags = {}) {
3110
3110
  );
3111
3111
  if (selectedEntity === "__custom__") {
3112
3112
  entityName = handleCancel(
3113
- await p15__namespace.text({
3113
+ await p16__namespace.text({
3114
3114
  message: "Enter entity name:",
3115
3115
  defaultValue: removeInterfacePrefix(ifaceName).replace(/Repository$|Service$/, "")
3116
3116
  })
@@ -3120,7 +3120,7 @@ async function runInterfaceCommand(interfaceNameArg, flags = {}) {
3120
3120
  }
3121
3121
  }
3122
3122
  kind = handleCancel(
3123
- await p15__namespace.select({
3123
+ await p16__namespace.select({
3124
3124
  message: "Interface definition style:",
3125
3125
  options: [
3126
3126
  { value: "abstractClass", label: "Abstract Class (Recommended - acts as DI token & type)" },
@@ -3130,7 +3130,7 @@ async function runInterfaceCommand(interfaceNameArg, flags = {}) {
3130
3130
  })
3131
3131
  );
3132
3132
  methodsPreset = handleCancel(
3133
- await p15__namespace.select({
3133
+ await p16__namespace.select({
3134
3134
  message: "Method signature preset:",
3135
3135
  options: [
3136
3136
  { value: "crud", label: "Standard CRUD (GetById, List, Create, Update, Delete)" },
@@ -3140,22 +3140,22 @@ async function runInterfaceCommand(interfaceNameArg, flags = {}) {
3140
3140
  })
3141
3141
  );
3142
3142
  generateStub = handleCancel(
3143
- await p15__namespace.confirm({
3143
+ await p16__namespace.confirm({
3144
3144
  message: "Auto-generate Infrastructure Stub implementation?",
3145
3145
  initialValue: true
3146
3146
  })
3147
3147
  );
3148
3148
  if (generateStub) {
3149
3149
  registerInProvider = handleCancel(
3150
- await p15__namespace.confirm({
3150
+ await p16__namespace.confirm({
3151
3151
  message: "Auto-register interface & stub in feature diProvider.ts?",
3152
3152
  initialValue: true
3153
3153
  })
3154
3154
  );
3155
3155
  }
3156
3156
  }
3157
- const s = p15__namespace.spinner();
3158
- s.start(`Generating interface '${pc15__default.default.cyan(ifaceName)}'...`);
3157
+ const s = p16__namespace.spinner();
3158
+ s.start(`Generating interface '${pc16__default.default.cyan(ifaceName)}'...`);
3159
3159
  const files = [];
3160
3160
  const options = {
3161
3161
  name: ifaceName,
@@ -3204,7 +3204,7 @@ async function runInterfaceCommand(interfaceNameArg, flags = {}) {
3204
3204
  }
3205
3205
  s.stop("Interface generated successfully!");
3206
3206
  printGeneratedFiles(files, options.dryRun);
3207
- p15__namespace.outro(pc15__default.default.green(`Interface '${ifaceName}' created in feature '${feature}'!`));
3207
+ p16__namespace.outro(pc16__default.default.green(`Interface '${ifaceName}' created in feature '${feature}'!`));
3208
3208
  }
3209
3209
  async function runHttpHandlerCommand(handlerNameArg, flags = {}) {
3210
3210
  const projectRoot = findProjectRoot();
@@ -3215,14 +3215,14 @@ async function runHttpHandlerCommand(handlerNameArg, flags = {}) {
3215
3215
  const featureOptions = existingFeatures.map((f) => ({ value: f, label: f }));
3216
3216
  featureOptions.push({ value: "__custom__", label: "\u270F\uFE0F Enter custom feature name..." });
3217
3217
  const selected = handleCancel(
3218
- await p15__namespace.select({
3218
+ await p16__namespace.select({
3219
3219
  message: "Select target feature:",
3220
3220
  options: featureOptions
3221
3221
  })
3222
3222
  );
3223
3223
  if (selected === "__custom__") {
3224
3224
  feature = handleCancel(
3225
- await p15__namespace.text({
3225
+ await p16__namespace.text({
3226
3226
  message: "Enter feature name:",
3227
3227
  validate: (v) => v && v.trim() ? void 0 : "Feature name cannot be empty"
3228
3228
  })
@@ -3232,7 +3232,7 @@ async function runHttpHandlerCommand(handlerNameArg, flags = {}) {
3232
3232
  }
3233
3233
  } else {
3234
3234
  feature = handleCancel(
3235
- await p15__namespace.text({
3235
+ await p16__namespace.text({
3236
3236
  message: "Enter target feature name:",
3237
3237
  validate: (v) => v && v.trim() ? void 0 : "Feature name cannot be empty"
3238
3238
  })
@@ -3243,7 +3243,7 @@ async function runHttpHandlerCommand(handlerNameArg, flags = {}) {
3243
3243
  let name = handlerNameArg?.trim();
3244
3244
  if (!name) {
3245
3245
  name = handleCancel(
3246
- await p15__namespace.text({
3246
+ await p16__namespace.text({
3247
3247
  message: "HTTP Route Handler class name:",
3248
3248
  placeholder: "e.g. CreateUserHttp, GetUserHttp, HealthHttp",
3249
3249
  validate: (v) => v && v.trim() ? void 0 : "Handler name cannot be empty"
@@ -3262,7 +3262,7 @@ async function runHttpHandlerCommand(handlerNameArg, flags = {}) {
3262
3262
  let validationFields = [];
3263
3263
  if (!flags.yes) {
3264
3264
  method = handleCancel(
3265
- await p15__namespace.select({
3265
+ await p16__namespace.select({
3266
3266
  message: "HTTP Method:",
3267
3267
  options: [
3268
3268
  { value: "get", label: "GET" },
@@ -3276,7 +3276,7 @@ async function runHttpHandlerCommand(handlerNameArg, flags = {}) {
3276
3276
  );
3277
3277
  const defaultPath = method === "get" ? "/" : "/";
3278
3278
  subPath = handleCancel(
3279
- await p15__namespace.text({
3279
+ await p16__namespace.text({
3280
3280
  message: "Route subpath (relative to feature prefix):",
3281
3281
  initialValue: defaultPath,
3282
3282
  defaultValue: defaultPath
@@ -3287,7 +3287,7 @@ async function runHttpHandlerCommand(handlerNameArg, flags = {}) {
3287
3287
  const ucOptions = useCases.map((u) => ({ value: u.name, label: u.name }));
3288
3288
  ucOptions.push({ value: "__none__", label: "None / Standalone Handler" });
3289
3289
  const chosenUc = handleCancel(
3290
- await p15__namespace.select({
3290
+ await p16__namespace.select({
3291
3291
  message: "Connect this handler to a domain Use Case?",
3292
3292
  options: ucOptions,
3293
3293
  initialValue: ucOptions[0]?.value
@@ -3298,7 +3298,7 @@ async function runHttpHandlerCommand(handlerNameArg, flags = {}) {
3298
3298
  }
3299
3299
  }
3300
3300
  includeValidation = handleCancel(
3301
- await p15__namespace.confirm({
3301
+ await p16__namespace.confirm({
3302
3302
  message: "Include Zod inbound request validation?",
3303
3303
  initialValue: method !== "delete"
3304
3304
  })
@@ -3306,7 +3306,7 @@ async function runHttpHandlerCommand(handlerNameArg, flags = {}) {
3306
3306
  if (includeValidation) {
3307
3307
  const defaultSource = method === "get" ? "query" : "body";
3308
3308
  validationSource = handleCancel(
3309
- await p15__namespace.select({
3309
+ await p16__namespace.select({
3310
3310
  message: "Validation data source:",
3311
3311
  options: [
3312
3312
  { value: "body", label: "req.body (for POST / PUT / PATCH payloads)" },
@@ -3320,8 +3320,8 @@ async function runHttpHandlerCommand(handlerNameArg, flags = {}) {
3320
3320
  });
3321
3321
  }
3322
3322
  }
3323
- const s = p15__namespace.spinner();
3324
- s.start(`Generating HTTP handler '${pc15__default.default.cyan(className)}'...`);
3323
+ const s = p16__namespace.spinner();
3324
+ s.start(`Generating HTTP handler '${pc16__default.default.cyan(className)}'...`);
3325
3325
  const options = {
3326
3326
  name: className,
3327
3327
  feature,
@@ -3339,7 +3339,7 @@ async function runHttpHandlerCommand(handlerNameArg, flags = {}) {
3339
3339
  const files = generateHttpHandler(options);
3340
3340
  s.stop("HTTP handler generated successfully!");
3341
3341
  printGeneratedFiles(files, options.dryRun);
3342
- p15__namespace.outro(pc15__default.default.green(`HTTP handler '${className}' created in feature '${feature}'!`));
3342
+ p16__namespace.outro(pc16__default.default.green(`HTTP handler '${className}' created in feature '${feature}'!`));
3343
3343
  }
3344
3344
  function generateInjectableCode(className, dependencies = [], methods = [], implementsInterface) {
3345
3345
  const formattedDeps = dependencies.map((dep) => ({
@@ -3349,7 +3349,7 @@ function generateInjectableCode(className, dependencies = [], methods = [], impl
3349
3349
  const formattedMethods = methods.map((m) => {
3350
3350
  const isAsync = m.async !== false;
3351
3351
  const retType = m.returnType ? isAsync ? `Promise<${m.returnType}>` : m.returnType : isAsync ? "Promise<void>" : "void";
3352
- const params = m.params && m.params.length > 0 ? m.params.map((p18) => `${p18.name}: ${p18.type}`).join(", ") : "";
3352
+ const params = m.params && m.params.length > 0 ? m.params.map((p19) => `${p19.name}: ${p19.type}`).join(", ") : "";
3353
3353
  return {
3354
3354
  name: m.name,
3355
3355
  isAsync,
@@ -3419,7 +3419,7 @@ async function runInjectableCommand(classNameArg, flags = {}) {
3419
3419
  let name = classNameArg?.trim();
3420
3420
  if (!name) {
3421
3421
  name = handleCancel(
3422
- await p15__namespace.text({
3422
+ await p16__namespace.text({
3423
3423
  message: "Injectable class name:",
3424
3424
  placeholder: "e.g. PasswordHasher, TokenService, UserTransformer",
3425
3425
  validate: (v) => v && v.trim() ? void 0 : "Class name cannot be empty"
@@ -3432,7 +3432,7 @@ async function runInjectableCommand(classNameArg, flags = {}) {
3432
3432
  let customPath;
3433
3433
  if (!flags.yes) {
3434
3434
  location = handleCancel(
3435
- await p15__namespace.select({
3435
+ await p16__namespace.select({
3436
3436
  message: "Select target architectural location:",
3437
3437
  options: [
3438
3438
  { value: "feature-service", label: "Feature Service (features/<feature>/services/)" },
@@ -3450,14 +3450,14 @@ async function runInjectableCommand(classNameArg, flags = {}) {
3450
3450
  const featureOptions = existingFeatures.map((f) => ({ value: f, label: f }));
3451
3451
  featureOptions.push({ value: "__custom__", label: "\u270F\uFE0F Enter custom feature name..." });
3452
3452
  const selected = handleCancel(
3453
- await p15__namespace.select({
3453
+ await p16__namespace.select({
3454
3454
  message: "Select target feature:",
3455
3455
  options: featureOptions
3456
3456
  })
3457
3457
  );
3458
3458
  if (selected === "__custom__") {
3459
3459
  feature = handleCancel(
3460
- await p15__namespace.text({
3460
+ await p16__namespace.text({
3461
3461
  message: "Enter feature name:",
3462
3462
  validate: (v) => v && v.trim() ? void 0 : "Feature name cannot be empty"
3463
3463
  })
@@ -3467,7 +3467,7 @@ async function runInjectableCommand(classNameArg, flags = {}) {
3467
3467
  }
3468
3468
  } else {
3469
3469
  feature = handleCancel(
3470
- await p15__namespace.text({
3470
+ await p16__namespace.text({
3471
3471
  message: "Enter target feature name:",
3472
3472
  validate: (v) => v && v.trim() ? void 0 : "Feature name cannot be empty"
3473
3473
  })
@@ -3477,7 +3477,7 @@ async function runInjectableCommand(classNameArg, flags = {}) {
3477
3477
  feature = toCamelCase(feature);
3478
3478
  } else if (location === "custom") {
3479
3479
  customPath = handleCancel(
3480
- await p15__namespace.text({
3480
+ await p16__namespace.text({
3481
3481
  message: "Enter destination directory path:",
3482
3482
  placeholder: "e.g. src/services or lib/utils",
3483
3483
  validate: (v) => v && v.trim() ? void 0 : "Path cannot be empty"
@@ -3488,14 +3488,14 @@ async function runInjectableCommand(classNameArg, flags = {}) {
3488
3488
  let generateInterface2 = false;
3489
3489
  if (!flags.yes) {
3490
3490
  generateInterface2 = handleCancel(
3491
- await p15__namespace.confirm({
3491
+ await p16__namespace.confirm({
3492
3492
  message: `Generate abstract class interface (I${className}) as runtime DI token?`,
3493
3493
  initialValue: false
3494
3494
  })
3495
3495
  );
3496
3496
  }
3497
- const s = p15__namespace.spinner();
3498
- s.start(`Generating injectable '${pc15__default.default.cyan(className)}'...`);
3497
+ const s = p16__namespace.spinner();
3498
+ s.start(`Generating injectable '${pc16__default.default.cyan(className)}'...`);
3499
3499
  const options = {
3500
3500
  name: className,
3501
3501
  feature,
@@ -3509,17 +3509,17 @@ async function runInjectableCommand(classNameArg, flags = {}) {
3509
3509
  const files = generateInjectable(options);
3510
3510
  s.stop("Injectable class generated successfully!");
3511
3511
  printGeneratedFiles(files, options.dryRun);
3512
- p15__namespace.outro(pc15__default.default.green(`Injectable '${className}' created successfully!`));
3512
+ p16__namespace.outro(pc16__default.default.green(`Injectable '${className}' created successfully!`));
3513
3513
  }
3514
3514
  async function runEnvCommand(flags = {}) {
3515
3515
  const projectRoot = flags.cwd || flags.targetDir || findProjectRoot();
3516
- const s = p15__namespace.spinner();
3516
+ const s = p16__namespace.spinner();
3517
3517
  s.start("Scanning for .example environment files...");
3518
3518
  const files = fs4__default.default.readdirSync(projectRoot);
3519
3519
  const exampleFiles = files.filter((file) => file.startsWith(".env") && file.endsWith(".example")).sort();
3520
3520
  if (exampleFiles.length === 0) {
3521
3521
  s.stop("No .example files found.");
3522
- p15__namespace.log.info(pc15__default.default.yellow(`No files matching '.env*.example' were found in ${projectRoot}`));
3522
+ p16__namespace.log.info(pc16__default.default.yellow(`No files matching '.env*.example' were found in ${projectRoot}`));
3523
3523
  return [];
3524
3524
  }
3525
3525
  s.message(`Found ${exampleFiles.length} template(s). Generating...`);
@@ -3538,7 +3538,46 @@ async function runEnvCommand(flags = {}) {
3538
3538
  }
3539
3539
  s.stop("Environment files processed!");
3540
3540
  printGeneratedFiles(generatedFiles, Boolean(flags.dryRun));
3541
- p15__namespace.outro(pc15__default.default.green("\u2713 Local environment files are ready!"));
3541
+ p16__namespace.outro(pc16__default.default.green("\u2713 Local environment files are ready!"));
3542
+ return generatedFiles;
3543
+ }
3544
+ async function runEnvExamplesCommand(flags = {}) {
3545
+ const projectRoot = flags.cwd || flags.targetDir || findProjectRoot();
3546
+ const s = p16__namespace.spinner();
3547
+ s.start("Scanning for local environment files...");
3548
+ const files = fs4__default.default.readdirSync(projectRoot, { withFileTypes: true });
3549
+ const envFiles = files.filter((dirent) => dirent.isFile() && dirent.name.startsWith(".env") && !dirent.name.endsWith(".example")).map((dirent) => dirent.name).sort();
3550
+ if (envFiles.length === 0) {
3551
+ s.stop("No local .env files found.");
3552
+ p16__namespace.log.info(pc16__default.default.yellow(`No files matching '.env*' were found in ${projectRoot}`));
3553
+ return [];
3554
+ }
3555
+ s.message(`Found ${envFiles.length} local .env file(s). Generating templates...`);
3556
+ const generatedFiles = [];
3557
+ for (const envFile of envFiles) {
3558
+ const sourcePath = path2__default.default.join(projectRoot, envFile);
3559
+ const targetFile = `${envFile}.example`;
3560
+ const targetPath = path2__default.default.join(projectRoot, targetFile);
3561
+ const content = fs4__default.default.readFileSync(sourcePath, "utf-8");
3562
+ const redactedContent = content.split(/\r?\n/).map((line) => {
3563
+ const trimmed = line.trim();
3564
+ if (trimmed.startsWith("#") || !trimmed) return line;
3565
+ const eqIndex = line.indexOf("=");
3566
+ if (eqIndex !== -1) {
3567
+ return line.substring(0, eqIndex + 1);
3568
+ }
3569
+ return line;
3570
+ }).join("\n");
3571
+ const genFile = writeFileSafely(targetPath, redactedContent, {
3572
+ projectRoot,
3573
+ dryRun: Boolean(flags.dryRun),
3574
+ overwrite: Boolean(flags.overwrite)
3575
+ });
3576
+ generatedFiles.push(genFile);
3577
+ }
3578
+ s.stop("Environment example templates generated!");
3579
+ printGeneratedFiles(generatedFiles, Boolean(flags.dryRun));
3580
+ p16__namespace.outro(pc16__default.default.green("\u2713 .env*.example files are up to date and safely redacted!"));
3542
3581
  return generatedFiles;
3543
3582
  }
3544
3583
 
@@ -3546,7 +3585,7 @@ async function runEnvCommand(flags = {}) {
3546
3585
  async function runInteractiveMenu(flags = {}) {
3547
3586
  printBanner();
3548
3587
  const choice = handleCancel(
3549
- await p15__namespace.select({
3588
+ await p16__namespace.select({
3550
3589
  message: "What would you like to create in your architecture?",
3551
3590
  options: [
3552
3591
  {
@@ -3592,7 +3631,12 @@ async function runInteractiveMenu(flags = {}) {
3592
3631
  {
3593
3632
  value: "env",
3594
3633
  label: "Generate Env Files",
3595
- hint: "Clone .env*.example files to local .env equivalents"
3634
+ hint: "Clone .env*.example files to local .env equivalents (Setup)"
3635
+ },
3636
+ {
3637
+ value: "envExamples",
3638
+ label: "Sync Env Examples",
3639
+ hint: "Safely clone and redact local .env files to .example templates (Sync)"
3596
3640
  }
3597
3641
  ]
3598
3642
  })
@@ -3625,6 +3669,9 @@ async function runInteractiveMenu(flags = {}) {
3625
3669
  case "env":
3626
3670
  await runEnvCommand(flags);
3627
3671
  break;
3672
+ case "envExamples":
3673
+ await runEnvExamplesCommand({ ...flags, overwrite: flags.overwrite ?? true });
3674
+ break;
3628
3675
  }
3629
3676
  }
3630
3677
 
@@ -3662,8 +3709,8 @@ async function handleCreate(type, name, flags = {}) {
3662
3709
  await runInjectableCommand(name, flags);
3663
3710
  break;
3664
3711
  default:
3665
- p15__namespace.log.error(
3666
- pc15__default.default.red(
3712
+ p16__namespace.log.error(
3713
+ pc16__default.default.red(
3667
3714
  `Unknown component type: "${type}". Allowed types: feature, shared, usecase, domain, infrastructure, interface, httpHandler, injectable.`
3668
3715
  )
3669
3716
  );
@@ -3671,9 +3718,9 @@ async function handleCreate(type, name, flags = {}) {
3671
3718
  }
3672
3719
  }
3673
3720
  var importPrompts = {
3674
- select: p15__namespace.select,
3675
- text: p15__namespace.text,
3676
- confirm: p15__namespace.confirm
3721
+ select: p16__namespace.select,
3722
+ text: p16__namespace.text,
3723
+ confirm: p16__namespace.confirm
3677
3724
  };
3678
3725
  function isTestFile(filePath) {
3679
3726
  const normalized = filePath.replace(/\\/g, "/");
@@ -3783,19 +3830,19 @@ async function handleImport(typeArg, nameArg, flags = {}) {
3783
3830
  );
3784
3831
  }
3785
3832
  if (type !== "shared" && type !== "feature") {
3786
- p15__namespace.log.error(pc15__default.default.red(`Invalid module type: "${typeArg}". Must be "shared" or "feature".`));
3833
+ p16__namespace.log.error(pc16__default.default.red(`Invalid module type: "${typeArg}". Must be "shared" or "feature".`));
3787
3834
  process.exit(1);
3788
3835
  }
3789
3836
  const registryBase = getRegistryBase(projectRoot, flags.registry);
3790
- const s = p15__namespace.spinner();
3791
- s.start(`Connecting to registry at ${pc15__default.default.dim(registryBase)}...`);
3837
+ const s = p16__namespace.spinner();
3838
+ s.start(`Connecting to registry at ${pc16__default.default.dim(registryBase)}...`);
3792
3839
  let index;
3793
3840
  try {
3794
3841
  index = await fetchRegistryIndex(registryBase);
3795
3842
  s.stop("Registry index loaded.");
3796
3843
  } catch (err) {
3797
- s.stop(pc15__default.default.red("Failed to load registry index."));
3798
- p15__namespace.log.error(pc15__default.default.red(err.message || String(err)));
3844
+ s.stop(pc16__default.default.red("Failed to load registry index."));
3845
+ p16__namespace.log.error(pc16__default.default.red(err.message || String(err)));
3799
3846
  process.exit(1);
3800
3847
  }
3801
3848
  const availableList = type === "shared" ? index.shared : index.features;
@@ -3803,7 +3850,7 @@ async function handleImport(typeArg, nameArg, flags = {}) {
3803
3850
  let name = nameArg?.trim();
3804
3851
  if (!name) {
3805
3852
  if (availableList.length === 0) {
3806
- p15__namespace.log.warn(`No ${type} modules available in the registry.`);
3853
+ p16__namespace.log.warn(`No ${type} modules available in the registry.`);
3807
3854
  return;
3808
3855
  }
3809
3856
  name = handleCancel(
@@ -3819,9 +3866,9 @@ async function handleImport(typeArg, nameArg, flags = {}) {
3819
3866
  }
3820
3867
  if (!candidateNames.includes(name)) {
3821
3868
  const closest = findClosestMatch(name, candidateNames);
3822
- p15__namespace.log.error(pc15__default.default.red(`\u274C Module '${name}' not found in the ${type} registry.`));
3869
+ p16__namespace.log.error(pc16__default.default.red(`\u274C Module '${name}' not found in the ${type} registry.`));
3823
3870
  if (closest) {
3824
- p15__namespace.log.info(pc15__default.default.yellow(`Did you mean '${pc15__default.default.cyan(closest)}'?`));
3871
+ p16__namespace.log.info(pc16__default.default.yellow(`Did you mean '${pc16__default.default.cyan(closest)}'?`));
3825
3872
  }
3826
3873
  process.exit(1);
3827
3874
  }
@@ -3833,7 +3880,7 @@ async function handleImport(typeArg, nameArg, flags = {}) {
3833
3880
  try {
3834
3881
  manifest = await fetchModuleManifest(registryBase, modType, modName);
3835
3882
  } catch (err) {
3836
- p15__namespace.log.error(pc15__default.default.red(`Failed to fetch manifest for ${modType} '${modName}': ${err.message}`));
3883
+ p16__namespace.log.error(pc16__default.default.red(`Failed to fetch manifest for ${modType} '${modName}': ${err.message}`));
3837
3884
  process.exit(1);
3838
3885
  }
3839
3886
  nodes.set(key, {
@@ -3873,7 +3920,7 @@ async function handleImport(typeArg, nameArg, flags = {}) {
3873
3920
  buildTopologicalOrder(rootKey);
3874
3921
  const resolutions = /* @__PURE__ */ new Map();
3875
3922
  const globalAliasMap = /* @__PURE__ */ new Map();
3876
- p15__namespace.log.step(`Importing ${type}: ${pc15__default.default.cyan(name)}...`);
3923
+ p16__namespace.log.step(`Importing ${type}: ${pc16__default.default.cyan(name)}...`);
3877
3924
  for (const key of orderedKeys) {
3878
3925
  const node = nodes.get(key);
3879
3926
  const { type: modType, name: registryName, manifest } = node;
@@ -3905,8 +3952,8 @@ async function handleImport(typeArg, nameArg, flags = {}) {
3905
3952
  const programmaticPointTo = pointToMap[registryName] || pointToMap[`${modType}/${registryName}`];
3906
3953
  if (programmaticPointTo) {
3907
3954
  if (!checkModuleExists(projectRoot, modType, programmaticPointTo)) {
3908
- p15__namespace.log.error(
3909
- pc15__default.default.red(
3955
+ p16__namespace.log.error(
3956
+ pc16__default.default.red(
3910
3957
  `Module '${programmaticPointTo}' specified in --point-to does not exist in ${folder}.`
3911
3958
  )
3912
3959
  );
@@ -3914,7 +3961,7 @@ async function handleImport(typeArg, nameArg, flags = {}) {
3914
3961
  }
3915
3962
  globalAliasMap.set(`@/${folder}/${registryName}/`, `@/${folder}/${programmaticPointTo}/`);
3916
3963
  globalAliasMap.set(`@/${folder}/${registryName}`, `@/${folder}/${programmaticPointTo}`);
3917
- p15__namespace.log.step(`Pointing '${modType}/${registryName}' to existing '${folder}/${programmaticPointTo}'`);
3964
+ p16__namespace.log.step(`Pointing '${modType}/${registryName}' to existing '${folder}/${programmaticPointTo}'`);
3918
3965
  resolutions.set(key, {
3919
3966
  type: modType,
3920
3967
  registryName,
@@ -3930,7 +3977,7 @@ async function handleImport(typeArg, nameArg, flags = {}) {
3930
3977
  globalAliasMap.set(`@/${folder}/${registryName}`, `@/${folder}/${programmaticAlias}`);
3931
3978
  const baseDir = getModuleBaseDir(projectRoot, modType);
3932
3979
  const displayDest = path2__default.default.relative(projectRoot, path2__default.default.join(baseDir, programmaticAlias));
3933
- p15__namespace.log.step(`Importing '${registryName}' into '${displayDest}'...`);
3980
+ p16__namespace.log.step(`Importing '${registryName}' into '${displayDest}'...`);
3934
3981
  resolutions.set(key, {
3935
3982
  type: modType,
3936
3983
  registryName,
@@ -3942,7 +3989,7 @@ async function handleImport(typeArg, nameArg, flags = {}) {
3942
3989
  }
3943
3990
  const existingDir = getExistingModuleDir(projectRoot, modType, registryName);
3944
3991
  if (!existingDir) {
3945
- p15__namespace.log.info(` \u21B3 Resolving required ${modType} dependency: ${pc15__default.default.cyan(registryName)}`);
3992
+ p16__namespace.log.info(` \u21B3 Resolving required ${modType} dependency: ${pc16__default.default.cyan(registryName)}`);
3946
3993
  resolutions.set(key, {
3947
3994
  type: modType,
3948
3995
  registryName,
@@ -3958,7 +4005,7 @@ async function handleImport(typeArg, nameArg, flags = {}) {
3958
4005
  const remoteIntegrity = manifest.integrity || entry?.integrity;
3959
4006
  const localHash = computeDirectoryHash(existingDir);
3960
4007
  if (remoteIntegrity && localHash === remoteIntegrity) {
3961
- p15__namespace.log.step(`\u2713 ${modType}/${registryName} is up to date (reusing existing)`);
4008
+ p16__namespace.log.step(`\u2713 ${modType}/${registryName} is up to date (reusing existing)`);
3962
4009
  resolutions.set(key, {
3963
4010
  type: modType,
3964
4011
  registryName,
@@ -3969,7 +4016,7 @@ async function handleImport(typeArg, nameArg, flags = {}) {
3969
4016
  continue;
3970
4017
  }
3971
4018
  if (flags.overwrite) {
3972
- p15__namespace.log.step(`Overwriting '${modType}/${registryName}' with registry version (--overwrite)...`);
4019
+ p16__namespace.log.step(`Overwriting '${modType}/${registryName}' with registry version (--overwrite)...`);
3973
4020
  resolutions.set(key, {
3974
4021
  type: modType,
3975
4022
  registryName,
@@ -3980,7 +4027,7 @@ async function handleImport(typeArg, nameArg, flags = {}) {
3980
4027
  continue;
3981
4028
  }
3982
4029
  if (flags.yes) {
3983
- p15__namespace.log.info(`Using existing '${modType}/${registryName}'`);
4030
+ p16__namespace.log.info(`Using existing '${modType}/${registryName}'`);
3984
4031
  resolutions.set(key, {
3985
4032
  type: modType,
3986
4033
  registryName,
@@ -4014,7 +4061,7 @@ async function handleImport(typeArg, nameArg, flags = {}) {
4014
4061
  })
4015
4062
  );
4016
4063
  if (choice === "keep_existing" || choice === "use_existing") {
4017
- p15__namespace.log.step(`Skipping '${modType}/${registryName}' (keeping existing)`);
4064
+ p16__namespace.log.step(`Skipping '${modType}/${registryName}' (keeping existing)`);
4018
4065
  resolutions.set(key, {
4019
4066
  type: modType,
4020
4067
  registryName,
@@ -4086,7 +4133,7 @@ async function handleImport(typeArg, nameArg, flags = {}) {
4086
4133
  chosenName = chosenName.replace(/^@\/(shared|features)\//, "").replace(/^(src\/)?(shared|features)\//, "").replace(/^\/+|\/+$/g, "").trim();
4087
4134
  globalAliasMap.set(`@/${folder}/${registryName}/`, `@/${folder}/${chosenName}/`);
4088
4135
  globalAliasMap.set(`@/${folder}/${registryName}`, `@/${folder}/${chosenName}`);
4089
- p15__namespace.log.step(`Pointing '${modType}/${registryName}' to existing '${folder}/${chosenName}'`);
4136
+ p16__namespace.log.step(`Pointing '${modType}/${registryName}' to existing '${folder}/${chosenName}'`);
4090
4137
  resolutions.set(key, {
4091
4138
  type: modType,
4092
4139
  registryName,
@@ -4118,7 +4165,7 @@ async function handleImport(typeArg, nameArg, flags = {}) {
4118
4165
  globalAliasMap.set(`@/${folder}/${registryName}`, `@/${folder}/${newName}`);
4119
4166
  const baseDir = getModuleBaseDir(projectRoot, modType);
4120
4167
  const displayDest = path2__default.default.relative(projectRoot, path2__default.default.join(baseDir, newName));
4121
- p15__namespace.log.step(`Importing '${registryName}' into '${displayDest}'...`);
4168
+ p16__namespace.log.step(`Importing '${registryName}' into '${displayDest}'...`);
4122
4169
  resolutions.set(key, {
4123
4170
  type: modType,
4124
4171
  registryName,
@@ -4129,7 +4176,7 @@ async function handleImport(typeArg, nameArg, flags = {}) {
4129
4176
  continue;
4130
4177
  }
4131
4178
  if (choice === "overwrite") {
4132
- p15__namespace.log.step(`Overwriting '${modType}/${registryName}' with registry version...`);
4179
+ p16__namespace.log.step(`Overwriting '${modType}/${registryName}' with registry version...`);
4133
4180
  resolutions.set(key, {
4134
4181
  type: modType,
4135
4182
  registryName,
@@ -4172,8 +4219,8 @@ async function handleImport(typeArg, nameArg, flags = {}) {
4172
4219
  const targetDir = path2__default.default.join(getModuleBaseDir(projectRoot, res.type), res.targetName);
4173
4220
  const isOverwrite = Boolean(flags.overwrite || res.action === "overwrite");
4174
4221
  if (key !== rootKey) {
4175
- p15__namespace.log.step(
4176
- `Importing ${res.type}: ${pc15__default.default.cyan(res.targetName)}${res.targetName !== res.registryName ? pc15__default.default.dim(` (from ${res.registryName})`) : ""}...`
4222
+ p16__namespace.log.step(
4223
+ `Importing ${res.type}: ${pc16__default.default.cyan(res.targetName)}${res.targetName !== res.registryName ? pc16__default.default.dim(` (from ${res.registryName})`) : ""}...`
4177
4224
  );
4178
4225
  }
4179
4226
  if (res.action === "overwrite" && !flags.dryRun) {
@@ -4191,8 +4238,8 @@ async function handleImport(typeArg, nameArg, flags = {}) {
4191
4238
  const remoteFilePath = `${folder}/${res.registryName}/${file}`;
4192
4239
  const localFilePath = path2__default.default.join(targetDir, file);
4193
4240
  if (fs4__default.default.existsSync(localFilePath) && !isOverwrite) {
4194
- p15__namespace.log.warn(
4195
- ` \u21B3 Skipping existing file: ${pc15__default.default.dim(path2__default.default.relative(projectRoot, localFilePath))} (use --overwrite to replace)`
4241
+ p16__namespace.log.warn(
4242
+ ` \u21B3 Skipping existing file: ${pc16__default.default.dim(path2__default.default.relative(projectRoot, localFilePath))} (use --overwrite to replace)`
4196
4243
  );
4197
4244
  continue;
4198
4245
  }
@@ -4204,18 +4251,18 @@ async function handleImport(typeArg, nameArg, flags = {}) {
4204
4251
  }
4205
4252
  const displayPath = path2__default.default.relative(projectRoot, localFilePath);
4206
4253
  totalWrittenFiles.push(displayPath);
4207
- p15__namespace.log.message(` ${pc15__default.default.green("+")} ${displayPath}`);
4254
+ p16__namespace.log.message(` ${pc16__default.default.green("+")} ${displayPath}`);
4208
4255
  }
4209
4256
  }
4210
4257
  const missingNpm = getMissingNpmPackages(projectRoot, Array.from(requiredNpmPackages));
4211
4258
  if (missingNpm.length > 0) {
4212
4259
  if (flags.skipInstall || flags.dryRun) {
4213
- p15__namespace.log.info(`Required npm dependencies to install: ${pc15__default.default.cyan(missingNpm.join(", "))}`);
4260
+ p16__namespace.log.info(`Required npm dependencies to install: ${pc16__default.default.cyan(missingNpm.join(", "))}`);
4214
4261
  } else {
4215
4262
  try {
4216
4263
  installNpmPackages(projectRoot, missingNpm);
4217
4264
  } catch (err) {
4218
- p15__namespace.log.warn(
4265
+ p16__namespace.log.warn(
4219
4266
  `Could not automatically install packages (${err.message}). Please run: npm install ${missingNpm.join(
4220
4267
  " "
4221
4268
  )}`
@@ -4224,13 +4271,13 @@ async function handleImport(typeArg, nameArg, flags = {}) {
4224
4271
  }
4225
4272
  }
4226
4273
  if (flags.dryRun) {
4227
- p15__namespace.log.info(pc15__default.default.yellow("Dry run complete: No files were written to disk."));
4274
+ p16__namespace.log.info(pc16__default.default.yellow("Dry run complete: No files were written to disk."));
4228
4275
  } else {
4229
4276
  const rootRes = resolutions.get(rootKey);
4230
4277
  const baseDir = getModuleBaseDir(projectRoot, type);
4231
4278
  const displayTarget = path2__default.default.relative(projectRoot, path2__default.default.join(baseDir, rootRes.targetName));
4232
- p15__namespace.log.success(
4233
- pc15__default.default.green(
4279
+ p16__namespace.log.success(
4280
+ pc16__default.default.green(
4234
4281
  `Successfully imported ${type} '${name}' (${totalWrittenFiles.length} file${totalWrittenFiles.length === 1 ? "" : "s"} placed in ${displayTarget})`
4235
4282
  )
4236
4283
  );
@@ -4453,10 +4500,10 @@ var FeatureDependencyGraph = class {
4453
4500
  if (cycle) return cycle;
4454
4501
  } else if (inStack.has(next)) {
4455
4502
  const cycle = [next];
4456
- let p18 = curr;
4457
- while (p18 !== next) {
4458
- cycle.push(p18);
4459
- p18 = parent.get(p18) || next;
4503
+ let p19 = curr;
4504
+ while (p19 !== next) {
4505
+ cycle.push(p19);
4506
+ p19 = parent.get(p19) || next;
4460
4507
  }
4461
4508
  cycle.push(next);
4462
4509
  cycle.reverse();
@@ -5358,15 +5405,15 @@ ${compiledDetails}
5358
5405
  // src/commands/lint.ts
5359
5406
  function formatViolation(v) {
5360
5407
  const lines = [];
5361
- lines.push(pc15__default.default.underline(pc15__default.default.cyan(v.relativePath)) + pc15__default.default.dim(":") + pc15__default.default.yellow(String(v.line)));
5408
+ lines.push(pc16__default.default.underline(pc16__default.default.cyan(v.relativePath)) + pc16__default.default.dim(":") + pc16__default.default.yellow(String(v.line)));
5362
5409
  const gutter = `${String(v.line).padStart(4, " ")} | `;
5363
- lines.push(pc15__default.default.dim(gutter) + v.code);
5410
+ lines.push(pc16__default.default.dim(gutter) + v.code);
5364
5411
  const categoryShort = v.category.replace(" Violation", "");
5365
5412
  lines.push(
5366
- " " + pc15__default.default.red(pc15__default.default.bold("\u2716")) + " " + pc15__default.default.red(`[${categoryShort}]`) + " " + v.advice
5413
+ " " + pc16__default.default.red(pc16__default.default.bold("\u2716")) + " " + pc16__default.default.red(`[${categoryShort}]`) + " " + v.advice
5367
5414
  );
5368
5415
  if (v.fixExample?.good) {
5369
- lines.push(" " + pc15__default.default.dim("\u2192") + " " + pc15__default.default.dim(v.fixExample.good));
5416
+ lines.push(" " + pc16__default.default.dim("\u2192") + " " + pc16__default.default.dim(v.fixExample.good));
5370
5417
  }
5371
5418
  return lines.join("\n");
5372
5419
  }
@@ -5391,7 +5438,7 @@ async function handleLint(flags = {}) {
5391
5438
  console.log("");
5392
5439
  }
5393
5440
  console.log(
5394
- pc15__default.default.red(
5441
+ pc16__default.default.red(
5395
5442
  `\u2716 Dependency rules check failed with ${summary.totalViolations} error${summary.totalViolations > 1 ? "s" : ""} across ${summary.violatedFeatures} feature${summary.violatedFeatures > 1 ? "s" : ""} (${summary.totalFeatures} features scanned).`
5396
5443
  )
5397
5444
  );
@@ -5410,7 +5457,7 @@ ${compiledDetails}
5410
5457
  }
5411
5458
  if (!quiet) {
5412
5459
  console.log(
5413
- pc15__default.default.green(
5460
+ pc16__default.default.green(
5414
5461
  `\u2714 Dependency rules verified across ${summary.totalFeatures} feature${summary.totalFeatures === 1 ? "" : "s"}.`
5415
5462
  )
5416
5463
  );
@@ -5425,7 +5472,7 @@ ${compiledDetails}
5425
5472
  console.log(formatViolation(v));
5426
5473
  console.log("");
5427
5474
  }
5428
- console.log(pc15__default.default.red(`\u2716 Dependency rules check failed (1 error).`));
5475
+ console.log(pc16__default.default.red(`\u2716 Dependency rules check failed (1 error).`));
5429
5476
  console.log("");
5430
5477
  }
5431
5478
  }
@@ -5435,33 +5482,42 @@ ${compiledDetails}
5435
5482
  async function handleInit(type, flags = {}) {
5436
5483
  if (!type) {
5437
5484
  const choice = handleCancel(
5438
- await p15__namespace.select({
5485
+ await p16__namespace.select({
5439
5486
  message: "What would you like to initialize?",
5440
5487
  options: [
5441
5488
  {
5442
5489
  value: "env",
5443
5490
  label: "Environment Files",
5444
5491
  hint: "Generate local .env files from .env*.example templates"
5492
+ },
5493
+ {
5494
+ value: "env-examples",
5495
+ label: "Sync Env Examples",
5496
+ hint: "Safely clone and redact local .env files to .example templates"
5445
5497
  }
5446
5498
  ]
5447
5499
  })
5448
5500
  );
5449
5501
  if (choice === "env") {
5450
5502
  await runEnvCommand(flags);
5503
+ } else if (choice === "env-examples") {
5504
+ await runEnvExamplesCommand(flags);
5451
5505
  }
5452
5506
  return;
5453
5507
  }
5454
5508
  const normalized = type.trim().toLowerCase();
5455
5509
  if (normalized === "env") {
5456
5510
  await runEnvCommand(flags);
5511
+ } else if (normalized === "env-examples" || normalized === "envexamples") {
5512
+ await runEnvExamplesCommand(flags);
5457
5513
  } else {
5458
- p15__namespace.log.error(
5459
- pc15__default.default.red(
5460
- `Unknown init target: "${type}". Allowed targets: env.`
5514
+ p16__namespace.log.error(
5515
+ pc16__default.default.red(
5516
+ `Unknown init target: "${type}". Allowed targets: env, env-examples.`
5461
5517
  )
5462
5518
  );
5463
5519
  if (process.env.VITEST) {
5464
- throw new Error(`Unknown init target: "${type}". Allowed targets: env.`);
5520
+ throw new Error(`Unknown init target: "${type}". Allowed targets: env, env-examples.`);
5465
5521
  }
5466
5522
  process.exit(1);
5467
5523
  }
@@ -5472,8 +5528,8 @@ function createCli() {
5472
5528
  const cli = cac.cac("mason");
5473
5529
  cli.command("[...args]", "Interactive scaffolding and import wizard").option("-d, --dry-run", "Preview changes without writing to disk").option("-o, --overwrite", "Overwrite existing files").option("-y, --yes", "Accept defaults and skip interactive prompts").option("--registry", "Run in registry mode").option("--point-to <mapping>", "Point a dependency to an existing local module (e.g. --point-to time:mytime)").option("--alias <mapping>", "Import a dependency fresh under an alias name (e.g. --alias time:time-mason)").option("--tests", "Include test files (use --no-tests to exclude)").action(async (args, flags) => {
5474
5530
  if (args && args.length > 0) {
5475
- p15__namespace.log.error(
5476
- pc15__default.default.red(
5531
+ p16__namespace.log.error(
5532
+ pc16__default.default.red(
5477
5533
  `Unknown command: "${args.join(" ")}". Use --help to list available commands.`
5478
5534
  )
5479
5535
  );
@@ -5484,7 +5540,7 @@ function createCli() {
5484
5540
  const mode = getEffectiveMode(projectRoot, flags);
5485
5541
  if (mode === "registry") {
5486
5542
  const choice2 = handleCancel(
5487
- await p15__namespace.select({
5543
+ await p16__namespace.select({
5488
5544
  message: "\u{1F3DB}\uFE0F Mason (Registry Mode): What would you like to scaffold?",
5489
5545
  options: [
5490
5546
  {
@@ -5527,7 +5583,7 @@ function createCli() {
5527
5583
  return;
5528
5584
  }
5529
5585
  const choice = handleCancel(
5530
- await p15__namespace.select({
5586
+ await p16__namespace.select({
5531
5587
  message: "\u{1F9F1} Mason: What would you like to do?",
5532
5588
  options: [
5533
5589
  {
@@ -5610,14 +5666,24 @@ function createCli() {
5610
5666
  });
5611
5667
  cli.command(
5612
5668
  "init [type]",
5613
- "Initialize project configurations and resources (e.g. 'mason init env')"
5614
- ).option("-d, --dry-run", "Preview changes without writing to disk").option("-o, --overwrite", "Overwrite existing .env files").example("mason init env").example("mason init env --overwrite").example("mason init env --dry-run").action(async (type, flags = {}) => {
5669
+ "Initialize project configurations and resources (e.g. 'mason init env', 'mason init env-examples')"
5670
+ ).option("-d, --dry-run", "Preview changes without writing to disk").option("-o, --overwrite", "Overwrite existing files").example("mason init env").example("mason init env --overwrite").example("mason init env --dry-run").example("mason init env-examples").example("mason init env-examples --overwrite").example("mason init env-examples --dry-run").action(async (type, flags = {}) => {
5615
5671
  try {
5616
5672
  await handleInit(type, flags);
5617
5673
  } catch (err) {
5618
5674
  handleCliError(err);
5619
5675
  }
5620
5676
  });
5677
+ cli.command(
5678
+ "env-examples",
5679
+ "Shorthand for 'mason init env-examples'"
5680
+ ).option("-d, --dry-run", "Preview changes without writing to disk").option("-o, --overwrite", "Overwrite existing .env*.example files").action(async (flags = {}) => {
5681
+ try {
5682
+ await handleInit("env-examples", flags);
5683
+ } catch (err) {
5684
+ handleCliError(err);
5685
+ }
5686
+ });
5621
5687
  const createSubtypes = [
5622
5688
  "feature",
5623
5689
  "shared",
@@ -5649,7 +5715,7 @@ function handleCliError(err) {
5649
5715
  process.exit(0);
5650
5716
  }
5651
5717
  const message = err instanceof Error ? err.message : String(err);
5652
- p15__namespace.log.error(pc15__default.default.red(`Error: ${message}`));
5718
+ p16__namespace.log.error(pc16__default.default.red(`Error: ${message}`));
5653
5719
  if (process.env.VITEST) {
5654
5720
  throw err;
5655
5721
  }
@@ -5738,6 +5804,7 @@ exports.resolveFeaturesDir = resolveFeaturesDir;
5738
5804
  exports.resolveSharedDir = resolveSharedDir;
5739
5805
  exports.runCli = runCli;
5740
5806
  exports.runEnvCommand = runEnvCommand;
5807
+ exports.runEnvExamplesCommand = runEnvExamplesCommand;
5741
5808
  exports.runSharedCommand = runSharedCommand;
5742
5809
  exports.stubInfraTemplate = stubInfraTemplate;
5743
5810
  exports.synthesizeCrudMethods = synthesizeCrudMethods;