@mschauer5/spfx-toolkit 1.0.23 → 1.0.25

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.
@@ -57,8 +57,7 @@ export async function initGlobalPackageJsonWithDefaults(force?: boolean) {
57
57
  'bundle:gulp': 'heft test --clean --production && heft package-solution --production',
58
58
  'bundle:heft': 'heft build --clean && heft package',
59
59
  'serve:heft': 'heft build-watch --serve',
60
- 'serve:gulp': 'gulp serve',
61
- 'install:pnp': '@pnp/graph @pnp/core @pnp/odata @pnp/queryable @pnp/sp'
60
+ 'serve:gulp': 'gulp serve'
62
61
  };
63
62
 
64
63
  const packageJsonContent = await fsPromises.readFile(configPath, 'utf-8');
package/src/index.ts CHANGED
@@ -12,7 +12,7 @@ program
12
12
  .name('Matt Schauer SPFx Toolkit')
13
13
  .description('CLI to help with SPFx development')
14
14
  .addHelpText('beforeAll', chalk.blueBright('Developed by Matt Schauer'))
15
- .version('1.0.23');
15
+ .version('1.0.24');
16
16
 
17
17
  program
18
18
  .command('add-alias')
@@ -29,6 +29,26 @@ program
29
29
  commands.alias.clearAlias(defaultToolkitName);
30
30
  });
31
31
 
32
+ program
33
+ .command('set-repo')
34
+ .description('Set current folder as the default repo location')
35
+ .action(() => {
36
+ commands.repo.SetRepo();
37
+ });
38
+
39
+ program
40
+ .command('repo [args...]')
41
+ .description('Go to repository location')
42
+ .option('-p, --project', 'If set will look in global package.json for matching shortcut to repository')
43
+ .action((args, options) => {
44
+ console.log('options:', options);
45
+ if (options.project) {
46
+ commands.repo.goToRepoFromProject(Array.isArray(args) ? args : []);
47
+ return;
48
+ }
49
+ commands.repo.goToRepo(Array.isArray(args) ? args : []);
50
+ });
51
+
32
52
  program
33
53
  .command('serve')
34
54
  .alias('s')
@@ -78,15 +98,28 @@ program
78
98
  });
79
99
 
80
100
  program
81
- .command('install-script')
82
- .alias('is')
83
- .description('Run an install script from package.json by name')
84
- .addArgument(new commander.Argument('<name>', 'script name in global config or local to install'))
85
-
101
+ .command('install-packages')
102
+ .alias('ips')
103
+ .description('Run an installer package from global package.json by name')
104
+ .addArgument(new commander.Argument('<name>', 'package name in global config to install'))
86
105
  .action((name) => {
87
106
  commands.installer.install(name, true);
88
107
  });
89
108
 
109
+ program
110
+ .command('add-nvmrc')
111
+ .description('Add .nvmrc file with current specified Node version')
112
+ .action(() => {
113
+ commands.nvmrc.addNvmrc();
114
+ });
115
+
116
+ program
117
+ .command('use-nvmrc')
118
+ .description('Use Node version specified in .nvmrc file')
119
+ .action(() => {
120
+ commands.nvmrc.useNvmrc();
121
+ });
122
+
90
123
  program
91
124
  .command('uninstall')
92
125
  .alias('un')
@@ -151,14 +184,26 @@ program
151
184
  .option('-r, --restore', 'Restore from backup eslint file')
152
185
  .action((options) => {
153
186
  if (options.backup) {
154
- commands.eslint.backupEslint();
187
+ commands.env.backupEslint();
155
188
  } else if (options.restore) {
156
- commands.eslint.restoreEslint();
189
+ commands.env.restoreEslint();
157
190
  } else {
158
191
  logger.error('No action specified. Use --backup | -b <OR> --restore | -r');
159
192
  }
160
193
  });
161
194
 
195
+ program
196
+ .command('set-env')
197
+ .description('Set tenantDomain environment variables')
198
+ .addArgument(new commander.Argument('[tenantDomain]', 'Tenant domain to set'))
199
+ .option('-t, --tenant <tenantDomain>', 'Specify the tenant domain')
200
+ .action((tenantDomain, options) => {
201
+ // Prefer positional argument, fallback to option
202
+ const domain = tenantDomain || options.tenant;
203
+
204
+ commands.envCommands.setEnv(domain);
205
+ });
206
+
162
207
  program
163
208
  .command('version')
164
209
  .option('-l, --list', 'List SPFx project versions')
Binary file