zapier-platform-cli 15.18.1 → 16.0.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.
Files changed (73) hide show
  1. package/oclif.manifest.json +2316 -1
  2. package/package.json +43 -33
  3. package/scaffold/create.template.ts +64 -0
  4. package/scaffold/resource.template.ts +119 -0
  5. package/scaffold/search.template.ts +63 -0
  6. package/scaffold/test.template.ts +18 -0
  7. package/scaffold/trigger.template.ts +58 -0
  8. package/src/bin/run +4 -4
  9. package/src/bin/run.cmd +0 -3
  10. package/src/generators/index.js +11 -11
  11. package/src/index.js +1 -1
  12. package/src/oclif/ZapierBaseCommand.js +51 -44
  13. package/src/oclif/buildFlags.js +14 -16
  14. package/src/oclif/commands/analytics.js +6 -6
  15. package/src/oclif/commands/build.js +6 -6
  16. package/src/oclif/commands/cache/clear.js +13 -13
  17. package/src/oclif/commands/canary/create.js +27 -20
  18. package/src/oclif/commands/canary/delete.js +26 -16
  19. package/src/oclif/commands/canary/list.js +5 -7
  20. package/src/oclif/commands/convert.js +16 -16
  21. package/src/oclif/commands/delete/version.js +6 -6
  22. package/src/oclif/commands/deprecate.js +10 -11
  23. package/src/oclif/commands/describe.js +5 -5
  24. package/src/oclif/commands/env/get.js +5 -5
  25. package/src/oclif/commands/env/set.js +11 -12
  26. package/src/oclif/commands/env/unset.js +9 -10
  27. package/src/oclif/commands/init.js +12 -13
  28. package/src/oclif/commands/invoke.js +67 -69
  29. package/src/oclif/commands/jobs.js +1 -1
  30. package/src/oclif/commands/link.js +2 -2
  31. package/src/oclif/commands/login.js +15 -15
  32. package/src/oclif/commands/logout.js +1 -1
  33. package/src/oclif/commands/logs.js +9 -9
  34. package/src/oclif/commands/migrate.js +19 -22
  35. package/src/oclif/commands/promote.js +25 -27
  36. package/src/oclif/commands/push.js +2 -2
  37. package/src/oclif/commands/register.js +31 -32
  38. package/src/oclif/commands/scaffold.js +112 -106
  39. package/src/oclif/commands/team/add.js +12 -15
  40. package/src/oclif/commands/team/get.js +2 -2
  41. package/src/oclif/commands/team/remove.js +6 -6
  42. package/src/oclif/commands/test.js +8 -8
  43. package/src/oclif/commands/upload.js +1 -1
  44. package/src/oclif/commands/users/add.js +9 -11
  45. package/src/oclif/commands/users/get.js +7 -7
  46. package/src/oclif/commands/users/links.js +4 -4
  47. package/src/oclif/commands/users/remove.js +8 -9
  48. package/src/oclif/commands/validate.js +29 -21
  49. package/src/oclif/commands/versions.js +26 -1
  50. package/src/oclif/hooks/checkValidNodeVersion.js +1 -1
  51. package/src/oclif/hooks/deprecated.js +1 -1
  52. package/src/oclif/hooks/getAppRegistrationFieldChoices.js +4 -4
  53. package/src/oclif/hooks/renderMarkdownHelp.js +1 -2
  54. package/src/oclif/hooks/versionInfo.js +2 -2
  55. package/src/utils/analytics.js +4 -4
  56. package/src/utils/api.js +26 -29
  57. package/src/utils/ast.js +112 -11
  58. package/src/utils/auth-files-codegen.js +102 -99
  59. package/src/utils/build.js +27 -28
  60. package/src/utils/changelog.js +1 -1
  61. package/src/utils/check-missing-app-info.js +2 -2
  62. package/src/utils/convert.js +26 -20
  63. package/src/utils/credentials.js +1 -1
  64. package/src/utils/display.js +31 -8
  65. package/src/utils/files.js +3 -3
  66. package/src/utils/ignore.js +2 -2
  67. package/src/utils/local.js +1 -1
  68. package/src/utils/metadata.js +1 -1
  69. package/src/utils/misc.js +21 -22
  70. package/src/utils/promisify.js +1 -1
  71. package/src/utils/scaffold.js +293 -40
  72. package/src/utils/team.js +3 -3
  73. package/src/utils/xdg.js +3 -3
@@ -1,5 +1,5 @@
1
+ const { Flags } = require('@oclif/core');
1
2
  const BaseCommand = require('../ZapierBaseCommand');
2
- const { flags } = require('@oclif/command');
3
3
  const { buildFlags } = require('../buildFlags');
4
4
  const { grey } = require('colors/safe');
5
5
  const { pick } = require('lodash');
@@ -8,32 +8,32 @@ const { listLogs } = require('../../utils/api');
8
8
 
9
9
  // pulled out so we can pull these explicitly to send to the server
10
10
  const commandFlags = {
11
- version: flags.string({
11
+ version: Flags.string({
12
12
  char: 'v',
13
13
  description: 'Filter logs to the specified version.',
14
14
  }),
15
- status: flags.string({
15
+ status: Flags.string({
16
16
  char: 's',
17
17
  description: 'Filter logs to only see errors or successes',
18
18
  options: ['any', 'success', 'error'],
19
19
  default: 'any', // this doesn't really need to be a status
20
20
  }),
21
- type: flags.string({
21
+ type: Flags.string({
22
22
  char: 't',
23
23
  description: 'See logs of the specified type',
24
24
  options: ['console', 'bundle', 'http'],
25
25
  default: 'console',
26
26
  }),
27
- detailed: flags.boolean({
27
+ detailed: Flags.boolean({
28
28
  // no char since it conflicts with --debug
29
29
  description: 'See extra info, like request/response body and headers.',
30
30
  }),
31
- user: flags.string({
31
+ user: Flags.string({
32
32
  char: 'u',
33
33
  description: 'Only show logs for this user. Defaults to your account.',
34
34
  default: 'me',
35
35
  }),
36
- limit: flags.integer({
36
+ limit: Flags.integer({
37
37
  description:
38
38
  'Cap the number of logs returned. Max is 50 (also the default)',
39
39
  default: 50,
@@ -102,8 +102,8 @@ class LogsCommand extends BaseCommand {
102
102
  if (this.flags.type === 'http' && !this.flags.detailed) {
103
103
  this.log(
104
104
  grey(
105
- ' TIP: Use `zapier logs --type=http --detailed` to include response information.'
106
- )
105
+ ' TIP: Use `zapier logs --type=http --detailed` to include response information.',
106
+ ),
107
107
  );
108
108
  }
109
109
  }
@@ -1,4 +1,4 @@
1
- const { flags } = require('@oclif/command');
1
+ const { Args, Flags } = require('@oclif/core');
2
2
 
3
3
  const BaseCommand = require('../ZapierBaseCommand');
4
4
  const PromoteCommand = require('./promote');
@@ -24,13 +24,13 @@ class MigrateCommand extends BaseCommand {
24
24
 
25
25
  if (user && account) {
26
26
  this.error(
27
- 'Cannot specify both `--user` and `--account`. Use only one or the other.'
27
+ 'Cannot specify both `--user` and `--account`. Use only one or the other.',
28
28
  );
29
29
  }
30
30
 
31
31
  if ((user || account) && percent !== 100) {
32
32
  this.error(
33
- `Cannot specify both \`PERCENT\` and \`--${flagType}\`. Use only one or the other.`
33
+ `Cannot specify both \`PERCENT\` and \`--${flagType}\`. Use only one or the other.`,
34
34
  );
35
35
  }
36
36
 
@@ -45,12 +45,12 @@ class MigrateCommand extends BaseCommand {
45
45
  toVersion !== app.latest_version
46
46
  ) {
47
47
  this.log(
48
- `You're trying to migrate all the users to ${toVersion}, which is not the current production version.`
48
+ `You're trying to migrate all the users to ${toVersion}, which is not the current production version.`,
49
49
  );
50
50
  promoteFirst = await this.confirm(
51
51
  `Do you want to promote ${toVersion} to production first?`,
52
52
  true,
53
- true
53
+ true,
54
54
  );
55
55
  }
56
56
 
@@ -71,11 +71,11 @@ class MigrateCommand extends BaseCommand {
71
71
  this.startSpinner(
72
72
  `Starting migration from ${fromVersion} to ${toVersion} for ${
73
73
  user || account
74
- }`
74
+ }`,
75
75
  );
76
76
  } else {
77
77
  this.startSpinner(
78
- `Starting migration from ${fromVersion} to ${toVersion} for ${percent}%`
78
+ `Starting migration from ${fromVersion} to ${toVersion} for ${percent}%`,
79
79
  );
80
80
  }
81
81
  if (percent) {
@@ -91,42 +91,39 @@ class MigrateCommand extends BaseCommand {
91
91
  }
92
92
 
93
93
  this.log(
94
- '\nMigration successfully queued, please check `zapier jobs` to track the status. Migrations usually take between 5-10 minutes.'
94
+ '\nMigration successfully queued, please check `zapier jobs` to track the status. Migrations usually take between 5-10 minutes.',
95
95
  );
96
96
  }
97
97
  }
98
98
 
99
99
  MigrateCommand.flags = buildFlags({
100
100
  commandFlags: {
101
- user: flags.string({
101
+ user: Flags.string({
102
102
  description:
103
103
  "Migrates all of a users' Private Zaps within all accounts for which the specified user is a member",
104
104
  }),
105
- account: flags.string({
105
+ account: Flags.string({
106
106
  description:
107
107
  "Migrates all of a users' Zaps, Private & Shared, within all accounts for which the specified user is a member",
108
108
  }),
109
109
  },
110
110
  });
111
111
 
112
- MigrateCommand.args = [
113
- {
114
- name: 'fromVersion',
112
+ MigrateCommand.args = {
113
+ fromVersion: Args.string({
115
114
  required: true,
116
115
  description: 'The version FROM which to migrate users.',
117
- },
118
- {
119
- name: 'toVersion',
116
+ }),
117
+ toVersion: Args.string({
120
118
  required: true,
121
119
  description: 'The version TO which to migrate users.',
122
- },
123
- {
124
- name: 'percent',
120
+ }),
121
+ percent: Args.string({
125
122
  default: 100,
126
123
  description: 'Percentage (between 1 and 100) of users to migrate.',
127
- parse: (input) => parseInt(input, 10),
128
- },
129
- ];
124
+ parse: async (input) => parseInt(input, 10),
125
+ }),
126
+ };
130
127
 
131
128
  MigrateCommand.skipValidInstallCheck = true;
132
129
  MigrateCommand.examples = [
@@ -1,6 +1,6 @@
1
1
  const _ = require('lodash');
2
2
  const colors = require('colors/safe');
3
- const { flags } = require('@oclif/command');
3
+ const { Args, Flags } = require('@oclif/core');
4
4
 
5
5
  const BaseCommand = require('../ZapierBaseCommand');
6
6
  const { buildFlags } = require('../buildFlags');
@@ -37,8 +37,8 @@ const hasAppChangeType = (metadata, changeType) => {
37
37
  metadata?.some(
38
38
  // Existing property name
39
39
  // eslint-disable-next-line camelcase
40
- ({ app_change_type }) => app_change_type === changeType
41
- )
40
+ ({ app_change_type }) => app_change_type === changeType,
41
+ ),
42
42
  );
43
43
  };
44
44
 
@@ -52,19 +52,18 @@ class PromoteCommand extends BaseCommand {
52
52
  const assumeYes = 'yes' in this.flags;
53
53
 
54
54
  let shouldContinue;
55
- const { changelog, appMetadata, issueMetadata } = await getVersionChangelog(
56
- version
57
- );
55
+ const { changelog, appMetadata, issueMetadata } =
56
+ await getVersionChangelog(version);
58
57
 
59
58
  const metadataPromptHelper = `Issues are indicated by ${colors.bold.underline(
60
- '#<issueId>'
59
+ '#<issueId>',
61
60
  )}, and actions by ${colors.bold.underline(
62
- '<trigger|create|search>/<key>'
61
+ '<trigger|create|search>/<key>',
63
62
  )}. Note issue IDs must be numeric and action identifiers are case sensitive.`;
64
63
 
65
64
  if (!changelog) {
66
65
  this.error(`${colors.yellow(
67
- 'Warning!'
66
+ 'Warning!',
68
67
  )} Changelog not found. Please create a CHANGELOG.md file with user-facing descriptions. Example:
69
68
  ${colors.cyan(EXAMPLE_CHANGELOG)}
70
69
  If bugfixes or updates to actions are present, then should be marked on a line that begins with "Update" or "Fix" (case insensitive) and information that contains the identifier.
@@ -81,7 +80,7 @@ ${metadataPromptHelper}`);
81
80
  .filter(({ app_change_type }) => app_change_type === 'FEATURE_UPDATE')
82
81
  .map(
83
82
  ({ action_type, action_key }) =>
84
- `${action_key}/${ACTION_TYPE_MAPPING[action_type]}`
83
+ `${action_key}/${ACTION_TYPE_MAPPING[action_type]}`,
85
84
  );
86
85
 
87
86
  const issueFeatureUpdates =
@@ -95,7 +94,7 @@ ${metadataPromptHelper}`);
95
94
  `Feature updates: ${[
96
95
  ...(appFeatureUpdates ?? []),
97
96
  ...(issueFeatureUpdates ?? []),
98
- ].join(', ')}`
97
+ ].join(', ')}`,
99
98
  );
100
99
  }
101
100
 
@@ -105,7 +104,7 @@ ${metadataPromptHelper}`);
105
104
  .filter(({ app_change_type }) => app_change_type === 'BUGFIX')
106
105
  .map(
107
106
  ({ action_type, action_key }) =>
108
- `${action_key}/${ACTION_TYPE_MAPPING[action_type]}`
107
+ `${action_key}/${ACTION_TYPE_MAPPING[action_type]}`,
109
108
  );
110
109
  const issueBugfixes =
111
110
  issueMetadata &&
@@ -116,8 +115,8 @@ ${metadataPromptHelper}`);
116
115
  if (appBugfixes || issueBugfixes) {
117
116
  this.log(
118
117
  `Bug fixes: ${[...(appBugfixes ?? []), ...(issueBugfixes ?? [])].join(
119
- ', '
120
- )}`
118
+ ', ',
119
+ )}`,
121
120
  );
122
121
  }
123
122
 
@@ -128,7 +127,7 @@ ${metadataPromptHelper}`);
128
127
  !issueBugfixes
129
128
  ) {
130
129
  this.log(
131
- `No metadata was found in the changelog. Remember, you can associate the changelog with issues or triggers/actions.\n\n${metadataPromptHelper}`
130
+ `No metadata was found in the changelog. Remember, you can associate the changelog with issues or triggers/actions.\n\n${metadataPromptHelper}`,
132
131
  );
133
132
  }
134
133
  this.log();
@@ -137,7 +136,7 @@ ${metadataPromptHelper}`);
137
136
  shouldContinue =
138
137
  assumeYes ||
139
138
  (await this.confirm(
140
- 'Would you like to continue promoting with this changelog?'
139
+ 'Would you like to continue promoting with this changelog?',
141
140
  ));
142
141
  }
143
142
 
@@ -146,7 +145,7 @@ ${metadataPromptHelper}`);
146
145
  }
147
146
 
148
147
  this.log(
149
- `Preparing to promote version ${version} of your integration "${app.title}".`
148
+ `Preparing to promote version ${version} of your integration "${app.title}".`,
150
149
  );
151
150
 
152
151
  const isFeatureUpdate =
@@ -178,7 +177,7 @@ ${metadataPromptHelper}`);
178
177
  method: 'POST',
179
178
  body,
180
179
  },
181
- true
180
+ true,
182
181
  );
183
182
  } catch (response) {
184
183
  const activationUrl = _.get(response, ['json', 'activationInfo', 'url']);
@@ -187,8 +186,8 @@ ${metadataPromptHelper}`);
187
186
  this.log('\nGood news! Your integration passes validation.');
188
187
  this.log(
189
188
  `The next step is to visit ${colors.cyan(
190
- activationUrl
191
- )} to request to publish your integration.`
189
+ activationUrl,
190
+ )} to request to publish your integration.`,
192
191
  );
193
192
  } else {
194
193
  this.stopSpinner({ success: false });
@@ -211,7 +210,7 @@ ${metadataPromptHelper}`);
211
210
  this.log(' Promotion successful!');
212
211
  if (!this.flags.invokedFromAnotherCommand) {
213
212
  this.log(
214
- 'Optionally, run the `zapier migrate` command to move users to this version.'
213
+ 'Optionally, run the `zapier migrate` command to move users to this version.',
215
214
  );
216
215
  }
217
216
  }
@@ -219,7 +218,7 @@ ${metadataPromptHelper}`);
219
218
 
220
219
  PromoteCommand.flags = buildFlags({
221
220
  commandFlags: {
222
- yes: flags.boolean({
221
+ yes: Flags.boolean({
223
222
  char: 'y',
224
223
  description:
225
224
  'Automatically answer "yes" to any prompts. Useful if you want to avoid interactive prompts to run this command in CI.',
@@ -227,13 +226,12 @@ PromoteCommand.flags = buildFlags({
227
226
  },
228
227
  });
229
228
 
230
- PromoteCommand.args = [
231
- {
232
- name: 'version',
229
+ PromoteCommand.args = {
230
+ version: Args.string({
233
231
  required: true,
234
232
  description: 'The version you want to promote.',
235
- },
236
- ];
233
+ }),
234
+ };
237
235
 
238
236
  PromoteCommand.skipValidInstallCheck = true;
239
237
  PromoteCommand.examples = ['zapier promote 1.0.0'];
@@ -13,10 +13,10 @@ class PushCommand extends ZapierBaseCommand {
13
13
  skipNpmInstall: this.flags['skip-npm-install'],
14
14
  disableDependencyDetection: this.flags['disable-dependency-detection'],
15
15
  skipValidation: this.flags['skip-validation'],
16
- }
16
+ },
17
17
  );
18
18
  this.log(
19
- `\nPush complete! Built ${BUILD_PATH} and ${SOURCE_PATH} and uploaded them to Zapier.`
19
+ `\nPush complete! Built ${BUILD_PATH} and ${SOURCE_PATH} and uploaded them to Zapier.`,
20
20
  );
21
21
  }
22
22
  }
@@ -1,5 +1,5 @@
1
1
  const colors = require('colors/safe');
2
- const { flags } = require('@oclif/command');
2
+ const { Args, Flags } = require('@oclif/core');
3
3
 
4
4
  const ZapierBaseCommand = require('../ZapierBaseCommand');
5
5
  const {
@@ -29,7 +29,7 @@ class RegisterCommand extends ZapierBaseCommand {
29
29
  this.flags.desc.length > MAX_DESCRIPTION_LENGTH
30
30
  ) {
31
31
  throw new Error(
32
- `Please provide a description that is ${MAX_DESCRIPTION_LENGTH} characters or less.`
32
+ `Please provide a description that is ${MAX_DESCRIPTION_LENGTH} characters or less.`,
33
33
  );
34
34
  }
35
35
 
@@ -38,7 +38,7 @@ class RegisterCommand extends ZapierBaseCommand {
38
38
  this.args.title.length < MIN_TITLE_LENGTH
39
39
  ) {
40
40
  throw new Error(
41
- `Please provide a title that is ${MIN_TITLE_LENGTH} characters or more.`
41
+ `Please provide a title that is ${MIN_TITLE_LENGTH} characters or more.`,
42
42
  );
43
43
  }
44
44
 
@@ -47,7 +47,7 @@ class RegisterCommand extends ZapierBaseCommand {
47
47
  switch (action) {
48
48
  case 'update': {
49
49
  this.startSpinner(
50
- `Updating your existing integration "${appMeta.title}"`
50
+ `Updating your existing integration "${appMeta.title}"`,
51
51
  );
52
52
  await callAPI(`/apps/${this.app.id}`, {
53
53
  method: 'PUT',
@@ -60,7 +60,7 @@ class RegisterCommand extends ZapierBaseCommand {
60
60
 
61
61
  case 'register': {
62
62
  this.startSpinner(
63
- `Registering your new integration "${appMeta.title}"`
63
+ `Registering your new integration "${appMeta.title}"`,
64
64
  );
65
65
  const app = await callAPI('/apps?formId=create', {
66
66
  method: 'POST',
@@ -68,12 +68,12 @@ class RegisterCommand extends ZapierBaseCommand {
68
68
  });
69
69
  this.stopSpinner();
70
70
  this.startSpinner(
71
- `Linking app to current directory with \`${CURRENT_APP_FILE}\``
71
+ `Linking app to current directory with \`${CURRENT_APP_FILE}\``,
72
72
  );
73
73
  await writeLinkedAppConfig(app, process.cwd());
74
74
  this.stopSpinner();
75
75
  this.log(
76
- '\nFinished! Now that your integration is registered with Zapier, you can `zapier push`!'
76
+ '\nFinished! Now that your integration is registered with Zapier, you can `zapier push`!',
77
77
  );
78
78
  break;
79
79
  }
@@ -104,7 +104,7 @@ class RegisterCommand extends ZapierBaseCommand {
104
104
  throw new Error(
105
105
  `${flagValue} is not a valid value for ${flag}. Must be one of the following: ${enumFieldChoices
106
106
  .map((option) => option.value)
107
- .join(', ')}`
107
+ .join(', ')}`,
108
108
  );
109
109
  }
110
110
  }
@@ -131,14 +131,14 @@ class RegisterCommand extends ZapierBaseCommand {
131
131
  if (this.flags.yes) {
132
132
  console.info(
133
133
  colors.yellow(
134
- `-y/--yes flag passed, updating current integration (ID: ${linkedAppId}).`
135
- )
134
+ `-y/--yes flag passed, updating current integration (ID: ${linkedAppId}).`,
135
+ ),
136
136
  );
137
137
  action = actionChoices[0].value;
138
138
  } else {
139
139
  action = await this.promptWithList(
140
140
  `Would you like to update your current integration (ID: ${linkedAppId})?`,
141
- actionChoices
141
+ actionChoices,
142
142
  );
143
143
  }
144
144
  }
@@ -151,7 +151,7 @@ class RegisterCommand extends ZapierBaseCommand {
151
151
  // Block published apps from updating settings
152
152
  if (this.app?.status && isPublished(this.app.status)) {
153
153
  throw new Error(
154
- "You can't edit settings for this integration. To edit your integration details on Zapier's public app directory, email partners@zapier.com."
154
+ "You can't edit settings for this integration. To edit your integration details on Zapier's public app directory, email partners@zapier.com.",
155
155
  );
156
156
  }
157
157
  }
@@ -164,7 +164,7 @@ class RegisterCommand extends ZapierBaseCommand {
164
164
  required: true,
165
165
  charMinimum: MIN_TITLE_LENGTH,
166
166
  default: this.app?.title,
167
- }
167
+ },
168
168
  );
169
169
  }
170
170
 
@@ -176,7 +176,7 @@ class RegisterCommand extends ZapierBaseCommand {
176
176
  required: true,
177
177
  charLimit: MAX_DESCRIPTION_LENGTH,
178
178
  default: this.app?.description,
179
- }
179
+ },
180
180
  );
181
181
  }
182
182
 
@@ -184,7 +184,7 @@ class RegisterCommand extends ZapierBaseCommand {
184
184
  if (!appMeta.homepage_url) {
185
185
  appMeta.homepage_url = await this.prompt(
186
186
  'What is the homepage URL of your app? (optional)',
187
- { default: this.app?.homepage_url }
187
+ { default: this.app?.homepage_url },
188
188
  );
189
189
  }
190
190
 
@@ -193,7 +193,7 @@ class RegisterCommand extends ZapierBaseCommand {
193
193
  appMeta.intention = await this.promptWithList(
194
194
  'Are you building a public or private integration?',
195
195
  this.config.enumFieldChoices.intention,
196
- { default: this.app?.intention }
196
+ { default: this.app?.intention },
197
197
  );
198
198
  }
199
199
 
@@ -203,9 +203,9 @@ class RegisterCommand extends ZapierBaseCommand {
203
203
  "What is your relationship with the app you're integrating with Zapier?",
204
204
  this._getRoleChoicesWithAppTitle(
205
205
  appMeta.title,
206
- this.config.enumFieldChoices.role
206
+ this.config.enumFieldChoices.role,
207
207
  ),
208
- { default: this.app?.role }
208
+ { default: this.app?.role },
209
209
  );
210
210
  }
211
211
 
@@ -214,7 +214,7 @@ class RegisterCommand extends ZapierBaseCommand {
214
214
  appMeta.app_category = await this.promptWithList(
215
215
  'How would you categorize your app?',
216
216
  this.config.enumFieldChoices.app_category,
217
- { default: this.app?.app_category }
217
+ { default: this.app?.app_category },
218
218
  );
219
219
  }
220
220
 
@@ -229,7 +229,7 @@ class RegisterCommand extends ZapierBaseCommand {
229
229
  [
230
230
  { name: 'Yes', value: true },
231
231
  { name: 'No', value: false },
232
- ]
232
+ ],
233
233
  );
234
234
  }
235
235
  }
@@ -252,45 +252,44 @@ class RegisterCommand extends ZapierBaseCommand {
252
252
  }
253
253
 
254
254
  RegisterCommand.skipValidInstallCheck = true;
255
- RegisterCommand.args = [
256
- {
257
- name: 'title',
255
+ RegisterCommand.args = {
256
+ title: Args.string({
258
257
  description:
259
258
  "Your integration's public title. Asked interactively if not present.",
260
- },
261
- ];
259
+ }),
260
+ };
262
261
 
263
262
  RegisterCommand.flags = buildFlags({
264
263
  commandFlags: {
265
- desc: flags.string({
264
+ desc: Flags.string({
266
265
  char: 'D',
267
266
  description: `A sentence describing your app in ${MAX_DESCRIPTION_LENGTH} characters or less, e.g. "Trello is a team collaboration tool to organize tasks and keep projects on track."`,
268
267
  }),
269
- url: flags.string({
268
+ url: Flags.string({
270
269
  char: 'u',
271
270
  description: 'The homepage URL of your app, e.g., https://example.com.',
272
271
  }),
273
- audience: flags.string({
272
+ audience: Flags.string({
274
273
  char: 'a',
275
274
  description: 'Are you building a public or private integration?',
276
275
  }),
277
- role: flags.string({
276
+ role: Flags.string({
278
277
  char: 'r',
279
278
  description:
280
279
  "What is your relationship with the app you're integrating with Zapier?",
281
280
  }),
282
- category: flags.string({
281
+ category: Flags.string({
283
282
  char: 'c',
284
283
  description:
285
284
  "How would you categorize your app? Choose the most appropriate option for your app's core features.",
286
285
  }),
287
- subscribe: flags.boolean({
286
+ subscribe: Flags.boolean({
288
287
  char: 's',
289
288
  description:
290
289
  'Get tips and recommendations about this integration along with our monthly newsletter that details the performance of your integration and the latest Zapier news.',
291
290
  allowNo: true,
292
291
  }),
293
- yes: flags.boolean({
292
+ yes: Flags.boolean({
294
293
  char: 'y',
295
294
  description:
296
295
  'Assume yes for all yes/no prompts. This flag will also update an existing integration (as opposed to registering a new one) if a .zapierapprc file is found.',