@garyr/pt-cli 0.40.0 → 0.41.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.
@@ -326,29 +326,29 @@ export async function init(targetName: string | undefined, destPath: string | un
326
326
  }
327
327
  // Determine which tasks to include
328
328
  let selectedTaskNames: string[] = [];
329
-
329
+
330
330
  if (options.skipPostConfig) {
331
331
  // Skip entirely
332
332
  selectedTaskNames = [];
333
333
  } else if (options.dryRun) {
334
334
  // In dry-run, select all (for display)
335
- selectedTaskNames = allTasks.map(t => t.command || t.script || '');
335
+ selectedTaskNames = allTasks.map(t => t.command || `./${t.script}` || '');
336
336
  console.log(chalk.yellow(`\n[DRY RUN] Applicable post-config tasks:`));
337
337
  for (const t of allTasks) {
338
338
  const desc = t.description ? ` (${t.description})` : '';
339
- console.log(chalk.gray(` [template] - ${t.command || t.script}${desc}`));
339
+ console.log(chalk.gray(` [template] - ${t.command || `./${t.script}`}${desc}`));
340
340
  }
341
341
  } else if (options.yes) {
342
342
  // All tasks selected
343
- selectedTaskNames = allTasks.map(t => t.command || t.script || '');
343
+ selectedTaskNames = allTasks.map(t => t.command || `./${t.script}` || '');
344
344
  } else if (allTasks.length === 0) {
345
345
  selectedTaskNames = [];
346
346
  } else {
347
347
  // Checkbox prompt
348
348
  const choices: Array<{name: string; value: string; checked?: boolean}> = [];
349
-
349
+
350
350
  for (const t of allTasks) {
351
- const cmd = t.command || t.script || '(no command)';
351
+ const cmd = t.command || `./${t.script}` || '(no command)';
352
352
  const desc = t.description ? ` (${t.description})` : '';
353
353
  choices.push({
354
354
  name: `${cmd}${desc}`,
@@ -356,7 +356,7 @@ export async function init(targetName: string | undefined, destPath: string | un
356
356
  checked: true
357
357
  });
358
358
  }
359
-
359
+
360
360
  const response = await inquirer.prompt({
361
361
  type: 'checkbox',
362
362
  name: 'selected',
@@ -373,7 +373,7 @@ export async function init(targetName: string | undefined, destPath: string | un
373
373
  selectedTaskNames = response.selected || [];
374
374
  }
375
375
 
376
- // Write post_config scripts for selected tasks
376
+ // Write post_config scripts for selected tasks
377
377
  if (selectedTaskNames.length > 0 && !options.dryRun) {
378
378
  let bashContent = '#!/bin/bash\n# Auto-generated post_config script\n\n';
379
379
  let batContent = '@echo off\n:: Auto-generated post_config script\n\n';
@@ -444,4 +444,4 @@ function createStructure(dirPath: string, folders: FolderNode[], dryRun: boolean
444
444
  createStructure(fullDirPath, folder.children, dryRun);
445
445
  }
446
446
  }
447
- }
447
+ }