primo-cli 0.1.4 → 0.1.5

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.
@@ -21,7 +21,7 @@ export async function login(options) {
21
21
  if (!server_url) {
22
22
  console.log('');
23
23
  console.log(chalk.red('Server URL required.'));
24
- console.log(chalk.dim(' Pass -s <url>, or run from a workspace whose server.yaml has a `server:` field.'));
24
+ console.log(chalk.dim(' Pass it as the first argument, use -s <url>, or run from a workspace whose server.yaml has a `server:` field.'));
25
25
  console.log('');
26
26
  process.exit(1);
27
27
  }
@@ -75,7 +75,7 @@ export async function pull_site(options) {
75
75
  const sites = sites_data.items || [];
76
76
  if (sites.length === 0) {
77
77
  if (!token) {
78
- spinner.fail(`Not authenticated. Run \`primo login --server ${server}\` first.`);
78
+ spinner.fail(`Not authenticated. Run \`primo login ${server}\` first.`);
79
79
  }
80
80
  else {
81
81
  spinner.fail('No sites visible — your token may be expired. Try `primo login` again.');
package/dist/index.js CHANGED
@@ -115,11 +115,11 @@ library
115
115
  .option('-t, --token <token>', 'Auth token')
116
116
  .action((server, options) => push_library({ ...options, server: server || options.server }));
117
117
  program
118
- .command('login')
118
+ .command('login [server]')
119
119
  .description('Login to hosted CMS')
120
120
  .option('-s, --server <url>', 'Server URL (defaults to `server:` in server.yaml)')
121
121
  .option('-e, --email <email>', 'Email')
122
- .action(login);
122
+ .action((server, options) => login({ ...options, server: server || options.server }));
123
123
  program
124
124
  .command('validate')
125
125
  .description('Validate site structure')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "primo-cli",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "Local development CLI for Primo",
5
5
  "type": "module",
6
6
  "bin": {