mage-remote-run 0.9.0 → 0.11.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.
@@ -8,6 +8,11 @@ export function registerAdobeIoEventsCommands(program) {
8
8
  adobeIoEvents.command('check-configuration')
9
9
  .description('Check Adobe I/O Event configuration')
10
10
  .option('-f, --format <type>', 'Output format (text, json, xml)', 'text')
11
+ .addHelpText('after', `
12
+ Examples:
13
+ $ mage-remote-run adobe-io-event check-configuration
14
+ $ mage-remote-run adobe-io-event check-configuration --format json
15
+ `)
11
16
  .action(async (options) => {
12
17
  try {
13
18
  const client = await createClient();
@@ -12,6 +12,13 @@ export function registerCompanyCommands(program) {
12
12
  .option('--sort-by <field>', 'Field to sort by', 'entity_id')
13
13
  .option('--sort-order <order>', 'Sort order (ASC, DESC)', 'ASC')
14
14
  .option('-f, --format <type>', 'Output format (text, json, xml)', 'text')
15
+ .addHelpText('after', `
16
+ Examples:
17
+ $ mage-remote-run company list
18
+ $ mage-remote-run company list --page 2 --size 50
19
+ $ mage-remote-run company list --sort-by company_name --sort-order DESC
20
+ $ mage-remote-run company list --format json
21
+ `)
15
22
  .action(async (options) => {
16
23
  try {
17
24
  const client = await createClient();
@@ -52,6 +59,11 @@ export function registerCompanyCommands(program) {
52
59
  company.command('show <companyId>')
53
60
  .description('Show company details')
54
61
  .option('-f, --format <type>', 'Output format (text, json, xml)', 'text')
62
+ .addHelpText('after', `
63
+ Examples:
64
+ $ mage-remote-run company show 123
65
+ $ mage-remote-run company show 123 --format json
66
+ `)
55
67
  .action(async (companyId, options) => {
56
68
  try {
57
69
  const client = await createClient();
@@ -6,11 +6,66 @@ import { input, confirm, select } from '@inquirer/prompts';
6
6
  import inquirer from 'inquirer';
7
7
  import chalk from 'chalk';
8
8
 
9
+ // Helper to handle interactive connection configuration and testing
10
+ async function configureAndTestConnection(name, initialSettings = {}) {
11
+ let settings = await askForProfileSettings(initialSettings);
12
+
13
+ while (true) {
14
+ const shouldTest = await confirm({
15
+ message: 'Test connection?',
16
+ default: true
17
+ });
18
+
19
+ if (shouldTest) {
20
+ console.log(chalk.blue(`\nTesting connection "${name}"...`));
21
+ try {
22
+ const client = await createClient(settings);
23
+ const start = Date.now();
24
+ await client.get('V1/store/storeViews');
25
+ const duration = Date.now() - start;
26
+ console.log(chalk.green(`✔ Connection successful! (${duration}ms)`));
27
+ break; // Test passed, proceed to save
28
+ } catch (e) {
29
+ console.error(chalk.red(`✖ Connection failed: ${e.message}`));
30
+ const shouldEdit = await confirm({
31
+ message: 'Connection failed. Do you want to change settings?',
32
+ default: true
33
+ });
34
+
35
+ if (shouldEdit) {
36
+ // Re-ask for settings using current values as defaults
37
+ settings = await askForProfileSettings(settings);
38
+ continue; // Loop back to test
39
+ } else {
40
+ // If they don't want to edit, ask if they want to save anyway
41
+ const saveAnyway = await confirm({
42
+ message: 'Save configuration anyway?',
43
+ default: false
44
+ });
45
+ if (!saveAnyway) {
46
+ return null;
47
+ }
48
+ break; // Break to save
49
+ }
50
+ }
51
+ } else {
52
+ // User skipped test, save
53
+ break;
54
+ }
55
+ }
56
+ return settings;
57
+ }
58
+
59
+
9
60
  export function registerConnectionCommands(program) {
10
61
  const connections = program.command('connection').description('Manage mage-remote-run connection profiles');
11
62
 
12
63
  connections.command('add')
13
64
  .description('Configure a new connection profile')
65
+ .addHelpText('after', `
66
+ Examples:
67
+ $ mage-remote-run connection add
68
+ `)
14
69
  .action(async () => {
15
70
  console.log(chalk.blue('Configure a new connection Profile'));
16
71
  try {
@@ -19,7 +74,11 @@ export function registerConnectionCommands(program) {
19
74
  validate: value => value ? true : 'Name is required'
20
75
  });
21
76
 
22
- const settings = await askForProfileSettings();
77
+ const settings = await configureAndTestConnection(name);
78
+ if (!settings) {
79
+ console.log(chalk.yellow('\nConfiguration cancelled.'));
80
+ return;
81
+ }
23
82
 
24
83
  await addProfile(name, settings);
25
84
  console.log(chalk.green(`\nProfile "${name}" saved successfully!`));
@@ -49,6 +108,10 @@ export function registerConnectionCommands(program) {
49
108
 
50
109
  connections.command('list')
51
110
  .description('List connection profiles')
111
+ .addHelpText('after', `
112
+ Examples:
113
+ $ mage-remote-run connection list
114
+ `)
52
115
  .action(async () => {
53
116
  try {
54
117
  const config = await loadConfig();
@@ -64,6 +127,10 @@ export function registerConnectionCommands(program) {
64
127
 
65
128
  connections.command('search <query>')
66
129
  .description('Search connection profiles')
130
+ .addHelpText('after', `
131
+ Examples:
132
+ $ mage-remote-run connection search production
133
+ `)
67
134
  .action(async (query) => {
68
135
  try {
69
136
  const config = await loadConfig();
@@ -75,6 +142,10 @@ export function registerConnectionCommands(program) {
75
142
 
76
143
  connections.command('delete <name>')
77
144
  .description('Delete a connection profile')
145
+ .addHelpText('after', `
146
+ Examples:
147
+ $ mage-remote-run connection delete "Production"
148
+ `)
78
149
  .action(async (name) => {
79
150
  try {
80
151
  const config = await loadConfig();
@@ -90,15 +161,40 @@ export function registerConnectionCommands(program) {
90
161
  } catch (e) { handleError(e); }
91
162
  });
92
163
 
93
- connections.command('edit <name>')
164
+ connections.command('edit [name]')
94
165
  .description('Edit a connection profile')
166
+ .addHelpText('after', `
167
+ Examples:
168
+ $ mage-remote-run connection edit
169
+ $ mage-remote-run connection edit "Production"
170
+ `)
95
171
  .action(async (name) => {
96
172
  try {
97
173
  const config = await loadConfig();
174
+ const profiles = Object.keys(config.profiles || {});
175
+
176
+ if (profiles.length === 0) {
177
+ console.log(chalk.yellow('No profiles found to edit.'));
178
+ return;
179
+ }
180
+
181
+ if (!name) {
182
+ name = await select({
183
+ message: 'Select Profile to Edit:',
184
+ choices: profiles.map(p => ({ value: p, name: p }))
185
+ });
186
+ }
187
+
98
188
  const profile = config.profiles[name];
99
189
  if (!profile) throw new Error(`Profile ${name} not found`);
100
190
 
101
- const settings = await askForProfileSettings(profile);
191
+ console.log(chalk.blue(`Editing profile "${name}"`));
192
+
193
+ const settings = await configureAndTestConnection(name, profile);
194
+ if (!settings) {
195
+ console.log(chalk.yellow('\nEdit cancelled.'));
196
+ return;
197
+ }
102
198
 
103
199
  config.profiles[name] = settings;
104
200
  await saveConfig(config);
@@ -115,6 +211,11 @@ export function registerConnectionCommands(program) {
115
211
  connections.command('test')
116
212
  .description('Test connection(s)')
117
213
  .option('--all', 'Test all configured connections')
214
+ .addHelpText('after', `
215
+ Examples:
216
+ $ mage-remote-run connection test
217
+ $ mage-remote-run connection test --all
218
+ `)
118
219
  .action(async (options) => {
119
220
  try {
120
221
  const config = await loadConfig();
@@ -171,6 +272,10 @@ export function registerConnectionCommands(program) {
171
272
  });
172
273
  connections.command('status')
173
274
  .description('Show current configuration status')
275
+ .addHelpText('after', `
276
+ Examples:
277
+ $ mage-remote-run connection status
278
+ `)
174
279
  .action(async () => {
175
280
  try {
176
281
  const config = await loadConfig();
@@ -190,7 +295,13 @@ export function registerConnectionCommands(program) {
190
295
  });
191
296
 
192
297
  connections.command('select')
193
- .description('Select the active connection profile')
298
+ .description('Select the active connection profile (aliases: change, switch)')
299
+ .aliases(['switch', 'change'])
300
+ .addHelpText('after', `
301
+ Examples:
302
+ $ mage-remote-run connection select
303
+ $ mage-remote-run connection switch
304
+ `)
194
305
  .action(async () => {
195
306
  try {
196
307
  const config = await loadConfig();
@@ -214,6 +325,10 @@ export function registerConnectionCommands(program) {
214
325
 
215
326
  connections.command('clear-token-cache')
216
327
  .description('Clear cached access tokens')
328
+ .addHelpText('after', `
329
+ Examples:
330
+ $ mage-remote-run connection clear-token-cache
331
+ `)
217
332
  .action(async () => {
218
333
  try {
219
334
  await clearTokenCache();
@@ -223,6 +338,11 @@ export function registerConnectionCommands(program) {
223
338
 
224
339
  connections.command('status-header <state>')
225
340
  .description('Enable or disable the active connection header (on|off)')
341
+ .addHelpText('after', `
342
+ Examples:
343
+ $ mage-remote-run connection status-header on
344
+ $ mage-remote-run connection status-header off
345
+ `)
226
346
  .action(async (state) => {
227
347
  try {
228
348
  if (state !== 'on' && state !== 'off') {
@@ -11,6 +11,12 @@ export function registerCustomersCommands(program) {
11
11
  .option('-p, --page <number>', 'Page number', '1')
12
12
  .option('-s, --size <number>', 'Page size', '20')
13
13
  .option('-f, --format <type>', 'Output format (text, json, xml)', 'text')
14
+ .addHelpText('after', `
15
+ Examples:
16
+ $ mage-remote-run customer list
17
+ $ mage-remote-run customer list --page 2 --size 50
18
+ $ mage-remote-run customer list --format json
19
+ `)
14
20
  .action(async (options) => {
15
21
  try {
16
22
  const client = await createClient();
@@ -41,6 +47,10 @@ export function registerCustomersCommands(program) {
41
47
 
42
48
  customers.command('search <query>')
43
49
  .description('Search customers by email')
50
+ .addHelpText('after', `
51
+ Examples:
52
+ $ mage-remote-run customer search "john@example.com"
53
+ `)
44
54
  .action(async (query) => {
45
55
  try {
46
56
  const client = await createClient();
@@ -56,6 +66,11 @@ export function registerCustomersCommands(program) {
56
66
  });
57
67
 
58
68
  customers.command('edit <id>')
69
+ .description('Edit a customer')
70
+ .addHelpText('after', `
71
+ Examples:
72
+ $ mage-remote-run customer edit 123
73
+ `)
59
74
  .action(async (id) => {
60
75
  try {
61
76
  const client = await createClient();
@@ -84,6 +99,11 @@ export function registerCustomersCommands(program) {
84
99
  customers.command('show <customerId>')
85
100
  .description('Show detailed customer information')
86
101
  .option('-f, --format <type>', 'Output format (text, json, xml)', 'text')
102
+ .addHelpText('after', `
103
+ Examples:
104
+ $ mage-remote-run customer show 123
105
+ $ mage-remote-run customer show 123 --format json
106
+ `)
87
107
  .action(async (customerId, options) => {
88
108
  try {
89
109
  const client = await createClient();
@@ -139,6 +159,11 @@ export function registerCustomersCommands(program) {
139
159
  customers.command('delete <customerId>')
140
160
  .description('Delete a customer')
141
161
  .option('--force', 'Force delete without confirmation')
162
+ .addHelpText('after', `
163
+ Examples:
164
+ $ mage-remote-run customer delete 123
165
+ $ mage-remote-run customer delete 123 --force
166
+ `)
142
167
  .action(async (customerId, options) => {
143
168
  try {
144
169
  if (!options.force) {
@@ -163,6 +188,12 @@ export function registerCustomersCommands(program) {
163
188
  customers.command('confirm [customerId]')
164
189
  .description('Resend customer confirmation email')
165
190
  .option('--redirect-url <url>', 'Redirect URL after confirmation')
191
+ .addHelpText('after', `
192
+ Examples:
193
+ $ mage-remote-run customer confirm 123
194
+ $ mage-remote-run customer confirm 123 --redirect-url "https://example.com/login"
195
+ $ mage-remote-run customer confirm
196
+ `)
166
197
  .action(async (customerId, options) => {
167
198
  try {
168
199
  const client = await createClient();
@@ -215,6 +246,11 @@ export function registerCustomersCommands(program) {
215
246
  .description('List customer groups')
216
247
  .option('-p, --page <number>', 'Page number', '1')
217
248
  .option('-s, --size <number>', 'Page size', '20')
249
+ .addHelpText('after', `
250
+ Examples:
251
+ $ mage-remote-run customer group list
252
+ $ mage-remote-run customer group list --page 1 --size 50
253
+ `)
218
254
  .action(async (options) => {
219
255
  try {
220
256
  const client = await createClient();
@@ -13,6 +13,11 @@ export function registerEavCommands(program) {
13
13
  .option('-p, --page <number>', 'Page number', '1')
14
14
  .option('-s, --size <number>', 'Page size', '20')
15
15
  .option('-f, --format <type>', 'Output format (text, json, xml)', 'text')
16
+ .addHelpText('after', `
17
+ Examples:
18
+ $ mage-remote-run eav attribute-set list
19
+ $ mage-remote-run eav attribute-set list --page 1 --size 50
20
+ `)
16
21
  .action(async (options) => {
17
22
  try {
18
23
  const client = await createClient();
@@ -48,6 +53,10 @@ export function registerEavCommands(program) {
48
53
 
49
54
  attributeSets.command('show <id>')
50
55
  .description('Show attribute set details')
56
+ .addHelpText('after', `
57
+ Examples:
58
+ $ mage-remote-run eav attribute-set show 4
59
+ `)
51
60
  .action(async (id) => {
52
61
  try {
53
62
  const client = await createClient();
@@ -10,6 +10,10 @@ export function registerInventoryCommands(program) {
10
10
 
11
11
  stock.command('list')
12
12
  .description('List inventory stocks')
13
+ .addHelpText('after', `
14
+ Examples:
15
+ $ mage-remote-run inventory stock list
16
+ `)
13
17
  .action(async () => {
14
18
  try {
15
19
  const client = await createClient();
@@ -26,6 +30,10 @@ export function registerInventoryCommands(program) {
26
30
 
27
31
  stock.command('show <stockId>')
28
32
  .description('Show stock details')
33
+ .addHelpText('after', `
34
+ Examples:
35
+ $ mage-remote-run inventory stock show 1
36
+ `)
29
37
  .action(async (stockId) => {
30
38
  try {
31
39
  const client = await createClient();
@@ -46,6 +54,10 @@ export function registerInventoryCommands(program) {
46
54
 
47
55
  inventory.command('resolve-stock <type> <code>')
48
56
  .description('Resolve stock for a sales channel')
57
+ .addHelpText('after', `
58
+ Examples:
59
+ $ mage-remote-run inventory resolve-stock website base
60
+ `)
49
61
  .action(async (type, code) => {
50
62
  try {
51
63
  const client = await createClient();
@@ -61,6 +73,11 @@ export function registerInventoryCommands(program) {
61
73
  .option('-p, --page <number>', 'Page number', '1')
62
74
  .option('-s, --size <number>', 'Page size', '20')
63
75
  .option('-f, --format <type>', 'Output format (text, json, xml)', 'text')
76
+ .addHelpText('after', `
77
+ Examples:
78
+ $ mage-remote-run inventory source list
79
+ $ mage-remote-run inventory source list --page 1 --size 50
80
+ `)
64
81
  .action(async (options) => {
65
82
  try {
66
83
  const client = await createClient();
@@ -93,6 +110,10 @@ export function registerInventoryCommands(program) {
93
110
 
94
111
  ssa.command('list')
95
112
  .description('List available source selection algorithms')
113
+ .addHelpText('after', `
114
+ Examples:
115
+ $ mage-remote-run inventory source selection-algorithm list
116
+ `)
96
117
  .action(async () => {
97
118
  try {
98
119
  const client = await createClient();
@@ -10,6 +10,12 @@ export function registerOrdersCommands(program) {
10
10
  .option('-p, --page <number>', 'Page number', '1')
11
11
  .option('-s, --size <number>', 'Page size', '20')
12
12
  .option('-f, --format <type>', 'Output format (text, json, xml)', 'text')
13
+ .addHelpText('after', `
14
+ Examples:
15
+ $ mage-remote-run order list
16
+ $ mage-remote-run order list --page 1 --size 10
17
+ $ mage-remote-run order list --format json
18
+ `)
13
19
  .action(async (options) => {
14
20
  try {
15
21
  const client = await createClient();
@@ -40,6 +46,10 @@ export function registerOrdersCommands(program) {
40
46
 
41
47
  orders.command('search <query>')
42
48
  .description('Search orders by Increment ID')
49
+ .addHelpText('after', `
50
+ Examples:
51
+ $ mage-remote-run order search 000000001
52
+ `)
43
53
  .action(async (query) => {
44
54
  try {
45
55
  const client = await createClient();
@@ -56,6 +66,10 @@ export function registerOrdersCommands(program) {
56
66
 
57
67
  orders.command('edit <id>')
58
68
  .description('Update order status (via Comment)')
69
+ .addHelpText('after', `
70
+ Examples:
71
+ $ mage-remote-run order edit 123
72
+ `)
59
73
  .action(async (id) => {
60
74
  try {
61
75
  const client = await createClient();
@@ -81,6 +95,11 @@ export function registerOrdersCommands(program) {
81
95
  orders.command('show <identifier>')
82
96
  .description('Show detailed order information by ID or Increment ID')
83
97
  .option('-f, --format <type>', 'Output format (text, json, xml)', 'text')
98
+ .addHelpText('after', `
99
+ Examples:
100
+ $ mage-remote-run order show 123
101
+ $ mage-remote-run order show 000000001
102
+ `)
84
103
  .action(async (identifier, options) => {
85
104
  try {
86
105
  await showOrder(identifier, options.format);
@@ -92,6 +111,11 @@ export function registerOrdersCommands(program) {
92
111
  .option('-p, --page <number>', 'Page number', '1')
93
112
  .option('-z, --size <number>', 'Page size', '20')
94
113
  .option('-s, --select', 'Interactive selection mode')
114
+ .addHelpText('after', `
115
+ Examples:
116
+ $ mage-remote-run order latest
117
+ $ mage-remote-run order latest --size 5 --select
118
+ `)
95
119
  .action(async (options) => {
96
120
  try {
97
121
  const client = await createClient();
@@ -12,6 +12,12 @@ export function registerProductsCommands(program) {
12
12
  .option('--sort-by <field>', 'Field to sort by', 'entity_id')
13
13
  .option('--sort-order <order>', 'Sort order (ASC, DESC)', 'ASC')
14
14
  .option('-f, --format <type>', 'Output format (text, json, xml)', 'text')
15
+ .addHelpText('after', `
16
+ Examples:
17
+ $ mage-remote-run product list
18
+ $ mage-remote-run product list --page 2 --size 50
19
+ $ mage-remote-run product list --sort-by price --sort-order DESC
20
+ `)
15
21
  .action(async (options) => {
16
22
  try {
17
23
  const client = await createClient();
@@ -45,6 +51,11 @@ export function registerProductsCommands(program) {
45
51
  products.command('show <sku>')
46
52
  .description('Show product details')
47
53
  .option('-f, --format <type>', 'Output format (text, json, xml)', 'text')
54
+ .addHelpText('after', `
55
+ Examples:
56
+ $ mage-remote-run product show SKU123
57
+ $ mage-remote-run product show SKU123 --format json
58
+ `)
48
59
  .action(async (sku, options) => {
49
60
  try {
50
61
  const client = await createClient();
@@ -156,6 +167,10 @@ export function registerProductsCommands(program) {
156
167
 
157
168
  types.command('list')
158
169
  .description('List available product types')
170
+ .addHelpText('after', `
171
+ Examples:
172
+ $ mage-remote-run product type list
173
+ `)
159
174
  .action(async () => {
160
175
  try {
161
176
  const client = await createClient();
@@ -171,6 +186,11 @@ export function registerProductsCommands(program) {
171
186
  .description('List product attributes')
172
187
  .option('-p, --page <number>', 'Page number', '1')
173
188
  .option('-s, --size <number>', 'Page size', '20')
189
+ .addHelpText('after', `
190
+ Examples:
191
+ $ mage-remote-run product attribute list
192
+ $ mage-remote-run product attribute list --page 1 --size 50
193
+ `)
174
194
  .action(async (options) => {
175
195
  try {
176
196
  const client = await createClient();
@@ -196,6 +216,10 @@ export function registerProductsCommands(program) {
196
216
  attributes.command('show <attributeCode>')
197
217
  .description('Show product attribute details')
198
218
  .option('-f, --format <type>', 'Output format (text, json, xml)', 'text')
219
+ .addHelpText('after', `
220
+ Examples:
221
+ $ mage-remote-run product attribute show color
222
+ `)
199
223
  .action(async (attributeCode, options) => {
200
224
  try {
201
225
  const client = await createClient();
@@ -271,6 +295,10 @@ export function registerProductsCommands(program) {
271
295
  const attributeTypes = attributes.command('type').description('Manage attribute types');
272
296
  attributeTypes.command('list')
273
297
  .description('List product attribute types')
298
+ .addHelpText('after', `
299
+ Examples:
300
+ $ mage-remote-run product attribute type list
301
+ `)
274
302
  .action(async () => {
275
303
  try {
276
304
  const client = await createClient();
@@ -12,6 +12,11 @@ export function registerStoresCommands(program) {
12
12
  groups.command('list')
13
13
  .description('List store groups')
14
14
  .option('-f, --format <type>', 'Output format (text, json, xml)', 'text')
15
+ .addHelpText('after', `
16
+ Examples:
17
+ $ mage-remote-run store group list
18
+ $ mage-remote-run store group list --format json
19
+ `)
15
20
  .action(async (options) => {
16
21
  try {
17
22
  const client = await createClient();
@@ -37,6 +42,10 @@ export function registerStoresCommands(program) {
37
42
 
38
43
  groups.command('search <query>')
39
44
  .description('Search store groups')
45
+ .addHelpText('after', `
46
+ Examples:
47
+ $ mage-remote-run store group search "Main"
48
+ `)
40
49
  .action(async (query) => {
41
50
  try {
42
51
  const client = await createClient();
@@ -49,6 +58,10 @@ export function registerStoresCommands(program) {
49
58
 
50
59
  groups.command('delete <id>')
51
60
  .description('Delete store group')
61
+ .addHelpText('after', `
62
+ Examples:
63
+ $ mage-remote-run store group delete 2
64
+ `)
52
65
  .action(async (id) => {
53
66
  try {
54
67
  const client = await createClient();
@@ -61,6 +74,10 @@ export function registerStoresCommands(program) {
61
74
 
62
75
  groups.command('edit <id>')
63
76
  .description('Edit store group')
77
+ .addHelpText('after', `
78
+ Examples:
79
+ $ mage-remote-run store group edit 2
80
+ `)
64
81
  .action(async (id) => {
65
82
  try {
66
83
  const client = await createClient();
@@ -85,6 +102,11 @@ export function registerStoresCommands(program) {
85
102
  views.command('list')
86
103
  .description('List store views')
87
104
  .option('-f, --format <type>', 'Output format (text, json, xml)', 'text')
105
+ .addHelpText('after', `
106
+ Examples:
107
+ $ mage-remote-run store view list
108
+ $ mage-remote-run store view list --format json
109
+ `)
88
110
  .action(async (options) => {
89
111
  try {
90
112
  const client = await createClient();
@@ -110,6 +132,10 @@ export function registerStoresCommands(program) {
110
132
 
111
133
  views.command('search <query>')
112
134
  .description('Search store views')
135
+ .addHelpText('after', `
136
+ Examples:
137
+ $ mage-remote-run store view search "default"
138
+ `)
113
139
  .action(async (query) => {
114
140
  try {
115
141
  const client = await createClient();
@@ -122,6 +148,10 @@ export function registerStoresCommands(program) {
122
148
 
123
149
  views.command('delete <id>')
124
150
  .description('Delete store view')
151
+ .addHelpText('after', `
152
+ Examples:
153
+ $ mage-remote-run store view delete 1
154
+ `)
125
155
  .action(async (id) => {
126
156
  try {
127
157
  const client = await createClient();
@@ -134,6 +164,10 @@ export function registerStoresCommands(program) {
134
164
 
135
165
  views.command('edit <id>')
136
166
  .description('Edit store view')
167
+ .addHelpText('after', `
168
+ Examples:
169
+ $ mage-remote-run store view edit 1
170
+ `)
137
171
  .action(async (id) => {
138
172
  try {
139
173
  const client = await createClient();
@@ -157,6 +191,10 @@ export function registerStoresCommands(program) {
157
191
 
158
192
  configs.command('list')
159
193
  .description('List store configurations')
194
+ .addHelpText('after', `
195
+ Examples:
196
+ $ mage-remote-run store config list
197
+ `)
160
198
  .action(async () => {
161
199
  try {
162
200
  const client = await createClient();
@@ -12,6 +12,11 @@ export function registerTaxCommands(program) {
12
12
  .option('-p, --page <number>', 'Page number', '1')
13
13
  .option('-s, --size <number>', 'Page size', '20')
14
14
  .option('-f, --format <type>', 'Output format (text, json, xml)', 'text')
15
+ .addHelpText('after', `
16
+ Examples:
17
+ $ mage-remote-run tax class list
18
+ $ mage-remote-run tax class list --page 1 --size 50
19
+ `)
15
20
  .action(async (options) => {
16
21
  try {
17
22
  const client = await createClient();
@@ -46,6 +51,10 @@ export function registerTaxCommands(program) {
46
51
 
47
52
  taxClass.command('show <id>')
48
53
  .description('Show tax class details')
54
+ .addHelpText('after', `
55
+ Examples:
56
+ $ mage-remote-run tax class show 3
57
+ `)
49
58
  .action(async (id) => {
50
59
  try {
51
60
  const client = await createClient();
@@ -10,6 +10,11 @@ export function registerWebhooksCommands(program) {
10
10
  .option('-p, --page <number>', 'Page number', '1')
11
11
  .option('-s, --size <number>', 'Page size', '20')
12
12
  .option('-f, --format <type>', 'Output format (text, json, xml)', 'text')
13
+ .addHelpText('after', `
14
+ Examples:
15
+ $ mage-remote-run webhook list
16
+ $ mage-remote-run webhook list --format json
17
+ `)
13
18
  .action(async (options) => {
14
19
  try {
15
20
  const client = await createClient();
@@ -9,6 +9,11 @@ export function registerWebsitesCommands(program) {
9
9
  websites.command('list')
10
10
  .description('List all websites')
11
11
  .option('-f, --format <type>', 'Output format (text, json, xml)', 'text')
12
+ .addHelpText('after', `
13
+ Examples:
14
+ $ mage-remote-run website list
15
+ $ mage-remote-run website list --format json
16
+ `)
12
17
  .action(async (options) => {
13
18
  try {
14
19
  const client = await createClient();
@@ -34,6 +39,10 @@ export function registerWebsitesCommands(program) {
34
39
 
35
40
  websites.command('search <query>')
36
41
  .description('Search websites by code or name (local filter)')
42
+ .addHelpText('after', `
43
+ Examples:
44
+ $ mage-remote-run website search "Main"
45
+ `)
37
46
  .action(async (query) => {
38
47
  try {
39
48
  const client = await createClient();
@@ -48,6 +57,10 @@ export function registerWebsitesCommands(program) {
48
57
 
49
58
  websites.command('delete <id>')
50
59
  .description('Delete a website by ID')
60
+ .addHelpText('after', `
61
+ Examples:
62
+ $ mage-remote-run website delete 1
63
+ `)
51
64
  .action(async (id) => {
52
65
  try {
53
66
  const client = await createClient();
@@ -66,6 +79,10 @@ export function registerWebsitesCommands(program) {
66
79
 
67
80
  websites.command('edit <id>')
68
81
  .description('Edit a website')
82
+ .addHelpText('after', `
83
+ Examples:
84
+ $ mage-remote-run website edit 1
85
+ `)
69
86
  .action(async (id) => {
70
87
  try {
71
88
  const client = await createClient();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mage-remote-run",
3
- "version": "0.9.0",
3
+ "version": "0.11.0",
4
4
  "description": "The remote swiss army knife for Magento Open Source, Mage-OS, Adobe Commerce",
5
5
  "main": "index.js",
6
6
  "scripts": {