@mapples/cli 0.0.14 → 0.0.16

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.js CHANGED
@@ -76525,28 +76525,36 @@ const promptForConfig = async () => {
76525
76525
  return config;
76526
76526
  };
76527
76527
  const promptForSyncOptions = async () => {
76528
- const { syncOptions } = await inquirer.prompt([
76528
+ const { scope } = await inquirer.prompt([
76529
76529
  {
76530
- type: 'checkbox',
76531
- name: 'syncOptions',
76530
+ type: 'list',
76531
+ name: 'scope',
76532
76532
  message: 'What would you like to sync?',
76533
- choices: ['All (pages, style, assets)', 'Pages', 'Style', 'Assets'],
76534
- default: ['All (pages, style, assets)'],
76533
+ choices: [
76534
+ { name: 'All', value: 'all' },
76535
+ { name: 'Select', value: 'select' },
76536
+ ],
76537
+ default: 'all',
76535
76538
  },
76536
76539
  ]);
76537
- const selectedOptions = [];
76538
- if (syncOptions.includes('All (pages, style, assets)')) {
76540
+ if (scope === 'all') {
76539
76541
  return ['pages', 'style', 'assets'];
76540
76542
  }
76541
- if (syncOptions.includes('Pages')) {
76543
+ const { components } = await inquirer.prompt([
76544
+ {
76545
+ type: 'checkbox',
76546
+ name: 'components',
76547
+ message: 'Select components to sync:',
76548
+ choices: ['Pages', 'Style', 'Assets'],
76549
+ },
76550
+ ]);
76551
+ const selectedOptions = [];
76552
+ if (components.includes('Pages'))
76542
76553
  selectedOptions.push('pages');
76543
- }
76544
- if (syncOptions.includes('Style')) {
76554
+ if (components.includes('Style'))
76545
76555
  selectedOptions.push('style');
76546
- }
76547
- if (syncOptions.includes('Assets')) {
76556
+ if (components.includes('Assets'))
76548
76557
  selectedOptions.push('assets');
76549
- }
76550
76558
  return selectedOptions;
76551
76559
  };
76552
76560
  const executeSyncOperations$1 = async (syncOptions) => {
@@ -76657,31 +76665,38 @@ const initProject = async (configPath) => {
76657
76665
  };
76658
76666
 
76659
76667
  const promptForComponentSelection = async () => {
76668
+ const { scope } = await inquirer.prompt([
76669
+ {
76670
+ type: 'list',
76671
+ name: 'scope',
76672
+ message: 'What would you like to sync?',
76673
+ choices: [
76674
+ { name: 'All', value: 'all' },
76675
+ { name: 'Select', value: 'select' },
76676
+ ],
76677
+ default: 'all',
76678
+ },
76679
+ ]);
76680
+ if (scope === 'all') {
76681
+ return ['pages', 'style', 'assets', 'packages'];
76682
+ }
76660
76683
  const { components } = await inquirer.prompt([
76661
76684
  {
76662
76685
  type: 'checkbox',
76663
76686
  name: 'components',
76664
- message: 'What would you like to sync?',
76665
- choices: ['All (pages, style, assets, packages)', 'Pages', 'Style', 'Assets', 'Packages'],
76666
- default: ['All (pages, style, assets, packages)'],
76687
+ message: 'Select components to sync:',
76688
+ choices: ['Pages', 'Style', 'Assets', 'Packages'],
76667
76689
  },
76668
76690
  ]);
76669
76691
  const selectedComponents = [];
76670
- if (components.includes('All (pages, style, assets, packages)')) {
76671
- return ['pages', 'style', 'assets', 'packages'];
76672
- }
76673
- if (components.includes('Pages')) {
76692
+ if (components.includes('Pages'))
76674
76693
  selectedComponents.push('pages');
76675
- }
76676
- if (components.includes('Style')) {
76694
+ if (components.includes('Style'))
76677
76695
  selectedComponents.push('style');
76678
- }
76679
- if (components.includes('Assets')) {
76696
+ if (components.includes('Assets'))
76680
76697
  selectedComponents.push('assets');
76681
- }
76682
- if (components.includes('Packages')) {
76698
+ if (components.includes('Packages'))
76683
76699
  selectedComponents.push('packages');
76684
- }
76685
76700
  return selectedComponents;
76686
76701
  };
76687
76702
  const executeSyncOperations = async (components, configPath) => {