@forge/cli 0.0.0-experimental-4515339 → 0.0.0-experimental-f85f9b1

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 (47) hide show
  1. package/CHANGELOG.md +435 -6
  2. package/npm-shrinkwrap.json +2101 -2478
  3. package/out/autocomplete/autocomplete-config.json +7 -30
  4. package/out/command-line/command.d.ts +63 -44
  5. package/out/command-line/command.d.ts.map +1 -1
  6. package/out/command-line/command.js +140 -161
  7. package/out/command-line/controller/feedback-controller.d.ts +3 -3
  8. package/out/command-line/controller/feedback-controller.d.ts.map +1 -1
  9. package/out/command-line/controller/feedback-controller.js +3 -4
  10. package/out/command-line/controller/install-controller.d.ts +3 -2
  11. package/out/command-line/controller/install-controller.d.ts.map +1 -1
  12. package/out/command-line/controller/install-controller.js +9 -2
  13. package/out/command-line/dependency-injection.d.ts +1 -1
  14. package/out/command-line/dependency-injection.d.ts.map +1 -1
  15. package/out/command-line/dependency-injection.js +4 -4
  16. package/out/command-line/index.d.ts +1 -2
  17. package/out/command-line/index.d.ts.map +1 -1
  18. package/out/command-line/index.js +4 -24
  19. package/out/command-line/register-app-commands.d.ts +2 -2
  20. package/out/command-line/register-app-commands.d.ts.map +1 -1
  21. package/out/command-line/register-app-commands.js +3 -1
  22. package/out/command-line/register-authentication-command.d.ts +2 -2
  23. package/out/command-line/register-authentication-command.d.ts.map +1 -1
  24. package/out/command-line/register-authentication-command.js +2 -1
  25. package/out/command-line/register-contributors-commands.d.ts.map +1 -1
  26. package/out/command-line/register-contributors-commands.js +4 -1
  27. package/out/command-line/register-installation-commands.d.ts +9 -0
  28. package/out/command-line/register-installation-commands.d.ts.map +1 -1
  29. package/out/command-line/register-installation-commands.js +19 -6
  30. package/out/command-line/register-lint-command.d.ts +0 -1
  31. package/out/command-line/register-lint-command.d.ts.map +1 -1
  32. package/out/command-line/register-lint-command.js +1 -1
  33. package/out/command-line/register-log-commands.d.ts +1 -1
  34. package/out/command-line/register-log-commands.d.ts.map +1 -1
  35. package/out/command-line/register-log-commands.js +4 -6
  36. package/out/command-line/register-providers-commands.d.ts.map +1 -1
  37. package/out/command-line/register-providers-commands.js +2 -1
  38. package/out/command-line/sentry.d.ts +1 -1
  39. package/out/command-line/sentry.d.ts.map +1 -1
  40. package/out/command-line/view/install-view.d.ts +4 -3
  41. package/out/command-line/view/install-view.d.ts.map +1 -1
  42. package/out/command-line/view/install-view.js +10 -4
  43. package/out/service/cached-config-service.d.ts.map +1 -1
  44. package/out/service/cached-config-service.js +3 -0
  45. package/out/service/tunnel-service.d.ts.map +1 -1
  46. package/out/service/tunnel-service.js +2 -0
  47. package/package.json +20 -18
@@ -1,15 +1,11 @@
1
1
  "use strict";
2
- var _a;
3
2
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.Command = exports.WrapperError = void 0;
3
+ exports.getAutocompleteConfig = exports.Command = exports.WrapperError = void 0;
5
4
  const tslib_1 = require("tslib");
6
5
  const commander_1 = tslib_1.__importStar(require("commander"));
7
6
  const semver_1 = tslib_1.__importDefault(require("semver"));
8
7
  const cli_shared_1 = require("@forge/cli-shared");
9
- const cli_shared_2 = require("@forge/cli-shared");
10
- const cli_shared_3 = require("@forge/cli-shared");
11
8
  const environment_1 = require("./environment");
12
- const cli_shared_4 = require("@forge/cli-shared");
13
9
  const version_info_1 = require("./version-info");
14
10
  const anon_user_id_1 = require("./anon-user-id");
15
11
  const errors_1 = require("./errors");
@@ -25,30 +21,22 @@ exports.WrapperError = WrapperError;
25
21
  const isErrorWithAnalytics = (e) => {
26
22
  return e.getAttributes !== undefined;
27
23
  };
24
+ function last(arg) {
25
+ return arg[arg.length - 1];
26
+ }
28
27
  class Command {
29
- constructor(ui, analyticsClient, preCommandController, cliDetails, cmd, expectsArguments = false, analyticsName) {
28
+ constructor(ui, analyticsClient, preCommandController, cliDetails, credentialStore, { cmd, analyticsName, requiresAuthentication, requiresAnalyticsConsent, requiredOptionFlags, preconditionFn }) {
30
29
  this.ui = ui;
31
30
  this.analyticsClient = analyticsClient;
32
31
  this.preCommandController = preCommandController;
33
32
  this.cliDetails = cliDetails;
34
- this.expectsArguments = expectsArguments;
35
- this.analyticsName = analyticsName;
36
- this.requiresAuthentication = true;
37
- this.requiresAnalyticsConsent = true;
33
+ this.credentialStore = credentialStore;
38
34
  this.requiredOptionFlags = [];
39
35
  this.preconditionFn = [];
40
- this.options = [];
41
- this.commands = [];
42
- this.exitOverride = (listener) => {
43
- this.cmd.exitOverride((err) => listener(err));
44
- return this;
45
- };
46
36
  this.actionProcessor = async (cb, ...args) => {
47
- var _b, _c, _d, _e, _f;
48
- if (this.newCommand) {
49
- this.ui.error(new Error(cli_shared_3.Text.deprecate(this.newCommand)));
50
- }
37
+ var _a, _b, _c;
51
38
  const cmdName = this.cmd.name();
39
+ const analyticsName = (_a = this.analyticsName) !== null && _a !== void 0 ? _a : cmdName;
52
40
  let cred = (0, anon_user_id_1.getAnonId)(true);
53
41
  let attributes = {};
54
42
  try {
@@ -59,24 +47,35 @@ class Command {
59
47
  isLatest: this.isLatestVersion()
60
48
  };
61
49
  }
62
- this.analyticsClient.reportCommandInvoke((_b = this.analyticsName) !== null && _b !== void 0 ? _b : cmdName, cred, attributes);
63
- if (!this.expectsArguments && args.length > 2) {
64
- throw new cli_shared_3.ValidationError(cli_shared_3.Text.extraArguments(cmdName));
65
- }
66
- const [options] = args;
67
- if (options === null || options === void 0 ? void 0 : options.nonInteractive) {
50
+ this.analyticsClient.reportCommandInvoke(analyticsName, cred, attributes);
51
+ const options = last(args);
52
+ const nonInteractive = (_b = options.nonInteractive) !== null && _b !== void 0 ? _b : false;
53
+ const json = (_c = options.json) !== null && _c !== void 0 ? _c : false;
54
+ if (nonInteractive) {
68
55
  if (!this.satisfiesNonInteractiveOptions(options)) {
69
- throw new cli_shared_3.ValidationError(cli_shared_3.Text.nonInteractive.error.missingRequiredOption(cmdName, this.requiredOptionFlags));
56
+ throw new cli_shared_1.ValidationError(cli_shared_1.Text.nonInteractive.error.missingRequiredOption(cmdName, this.requiredOptionFlags));
70
57
  }
71
58
  }
72
59
  if (this.requiresAnalyticsConsent) {
73
- await this.preCommandController.verifyAnalyticsPreferences((_c = options === null || options === void 0 ? void 0 : options.nonInteractive) !== null && _c !== void 0 ? _c : false)();
60
+ await this.preCommandController.verifyAnalyticsPreferences(nonInteractive)();
74
61
  }
75
- if (!(options === null || options === void 0 ? void 0 : options.json)) {
62
+ if (!json) {
76
63
  this.checkVersion();
77
64
  }
78
65
  const preconditionCheckAttributes = await this.checkPreconditions(...args);
79
- attributes = Object.assign(Object.assign({}, attributes), preconditionCheckAttributes);
66
+ Object.assign(options, preconditionCheckAttributes);
67
+ const preconditionAnalyticsAttributes = [
68
+ ['appId'],
69
+ ['environment', 'appEnv'],
70
+ ['siteURL', 'site'],
71
+ ['product']
72
+ ];
73
+ for (const [preconditionAttribute, analyticsAttribute] of preconditionAnalyticsAttributes) {
74
+ const value = preconditionCheckAttributes[preconditionAttribute];
75
+ if (value) {
76
+ attributes[analyticsAttribute !== null && analyticsAttribute !== void 0 ? analyticsAttribute : preconditionAttribute] = value;
77
+ }
78
+ }
80
79
  const actualCred = await this.checkAuthentication();
81
80
  if (actualCred) {
82
81
  cred = actualCred;
@@ -88,7 +87,7 @@ class Command {
88
87
  cred = result.creds;
89
88
  }
90
89
  }
91
- this.analyticsClient.reportSuccess((_d = this.analyticsName) !== null && _d !== void 0 ? _d : cmdName, cred, attributes);
90
+ this.analyticsClient.reportSuccess(analyticsName, cred, attributes);
92
91
  }
93
92
  catch (e) {
94
93
  if (isErrorWithAnalytics(e)) {
@@ -97,30 +96,43 @@ class Command {
97
96
  if (attributes.isUserError === undefined) {
98
97
  attributes = Object.assign(Object.assign({}, attributes), { isUserError: false });
99
98
  }
100
- this.analyticsClient.reportInvokeFailure((_e = this.analyticsName) !== null && _e !== void 0 ? _e : cmdName, cred, attributes, e);
99
+ this.analyticsClient.reportInvokeFailure(analyticsName, cred, attributes, e);
101
100
  if (e instanceof errors_1.DeferredErrors) {
102
- e.getErrors().forEach((error) => { var _b; return this.analyticsClient.reportFailure((_b = this.analyticsName) !== null && _b !== void 0 ? _b : cmdName, cred, attributes, error); });
101
+ e.getErrors().forEach((error) => this.analyticsClient.reportFailure(analyticsName, cred, attributes, error));
103
102
  process.exit(1);
104
103
  }
105
104
  else {
106
- this.analyticsClient.reportFailure((_f = this.analyticsName) !== null && _f !== void 0 ? _f : cmdName, cred, attributes, e);
107
- await (0, cli_shared_4.exitOnError)(this.ui, e);
105
+ this.analyticsClient.reportFailure(analyticsName, cred, attributes, e);
106
+ await (0, cli_shared_1.exitOnError)(this.ui, e);
108
107
  }
109
108
  }
110
109
  };
111
- this.outputRelevantHelp = (argv) => {
112
- this.findLastValidCommand(argv).command.outputHelp();
113
- };
114
110
  this.cmd = cmd || new commander_1.default.Command();
111
+ this.analyticsName = analyticsName;
112
+ this.requiresAuthentication = requiresAuthentication !== null && requiresAuthentication !== void 0 ? requiresAuthentication : true;
113
+ this.requiresAnalyticsConsent = requiresAnalyticsConsent !== null && requiresAnalyticsConsent !== void 0 ? requiresAnalyticsConsent : true;
114
+ this.requiredOptionFlags = requiredOptionFlags !== null && requiredOptionFlags !== void 0 ? requiredOptionFlags : [];
115
+ this.preconditionFn = preconditionFn !== null && preconditionFn !== void 0 ? preconditionFn : [];
116
+ this.cmd.exitOverride((err) => {
117
+ throw new WrapperError(err, this.cmd.name());
118
+ });
119
+ this.cmd.configureOutput({
120
+ writeErr: () => { }
121
+ });
115
122
  }
116
123
  get verbose() {
117
124
  return this.cmd.opts().verbose;
118
125
  }
126
+ static program(ui, analyticsClient, preCommandController, cliDetails, credentialStore) {
127
+ var _a;
128
+ const cmd = new Command(ui, analyticsClient, preCommandController, cliDetails, credentialStore, {});
129
+ return cmd.version((_a = cliDetails === null || cliDetails === void 0 ? void 0 : cliDetails.version) !== null && _a !== void 0 ? _a : 'unknown', '--version').option('--verbose', cli_shared_1.Text.optionVerbose);
130
+ }
131
+ clone(overrides) {
132
+ return new Command(this.ui, this.analyticsClient, this.preCommandController, this.cliDetails, this.credentialStore, Object.assign({ cmd: this.cmd, analyticsName: this.analyticsName, requiresAuthentication: this.requiresAuthentication, requiresAnalyticsConsent: this.requiresAnalyticsConsent, requiredOptionFlags: this.requiredOptionFlags, preconditionFn: this.preconditionFn }, overrides));
133
+ }
119
134
  version(str, flags) {
120
135
  this.cmd.version(str, flags);
121
- flags = flags || '-V, --version';
122
- const versionOption = new commander_1.Option(flags, 'output the version number');
123
- this.options.push(versionOption);
124
136
  return this;
125
137
  }
126
138
  command(name, opts) {
@@ -128,14 +140,11 @@ class Command {
128
140
  .command(name, opts)
129
141
  .allowUnknownOption(false)
130
142
  .allowExcessArguments(false);
131
- const trimmedName = name.trim();
132
- const expectsArguments = trimmedName.endsWith(']') || trimmedName.endsWith('>');
133
- const subCommand = new Command(this.ui, this.analyticsClient, this.preCommandController, this.cliDetails, cmd, expectsArguments, Command.concatenateNames(this.analyticsName, cmd.name()));
134
- subCommand.option('--verbose', cli_shared_3.Text.optionVerbose);
135
- subCommand.exitOverride((err) => {
136
- throw new WrapperError(err, subCommand.cmd.name());
137
- });
138
- this.commands.push(subCommand);
143
+ const subCommand = new Command(this.ui, this.analyticsClient, this.preCommandController, this.cliDetails, this.credentialStore, {
144
+ cmd,
145
+ analyticsName: Command.concatenateNames(this.analyticsName, cmd.name())
146
+ }).option('--verbose', cli_shared_1.Text.optionVerbose);
147
+ this.cmd.commands.sort((a, b) => a.name().localeCompare(b.name()));
139
148
  return subCommand;
140
149
  }
141
150
  deprecatedCommand(oldName, newName, stubController) {
@@ -144,61 +153,44 @@ class Command {
144
153
  .requireNoAnalyticsConsent()
145
154
  .action(() => stubController.run({ oldName, newName }));
146
155
  }
147
- getAnalyticsName() {
148
- return this.analyticsName;
149
- }
150
- deprecate(newCommand) {
151
- this.newCommand = newCommand;
152
- return this;
153
- }
154
156
  description(desc) {
155
157
  this.cmd.description(desc);
156
158
  return this;
157
159
  }
158
- option(flags, description, fn, defaultValue) {
159
- this.cmd.option(flags, description, fn, defaultValue);
160
- const option = new commander_1.Option(flags, description);
161
- if (typeof fn === 'function') {
162
- option.default(defaultValue).argParser(fn);
163
- }
164
- else {
165
- option.default(fn);
166
- }
167
- this.options.push(option);
160
+ option(flags, description, defaultValue) {
161
+ this.cmd.option(flags, description, defaultValue);
168
162
  return this;
169
163
  }
170
164
  precondition(fn) {
171
- this.preconditionFn.push(fn);
172
- return this;
165
+ return this.clone({ preconditionFn: [...this.preconditionFn, fn] });
173
166
  }
174
167
  requireManifestFile() {
175
- this.precondition(this.preCommandController.verifyManifestExists());
176
- return this;
168
+ return this.precondition(this.preCommandController.verifyManifestExists());
177
169
  }
178
170
  requireAppId() {
179
- this.precondition(this.preCommandController.verifyManifestExistsWithAppConfig());
180
- return this;
171
+ return this.precondition(this.preCommandController.verifyManifestExistsWithAppConfig());
181
172
  }
182
173
  nonInteractiveOption(...args) {
183
- this.requiredOptionFlags = args;
184
- this.cmd.option('--non-interactive', cli_shared_3.Text.nonInteractive.description);
185
- return this;
174
+ return this.clone({ requiredOptionFlags: args }).option('--non-interactive', cli_shared_1.Text.nonInteractive.description);
186
175
  }
187
176
  action(fn) {
188
- this.cmd.action((...args) => this.actionProcessor(fn, ...args));
177
+ this.cmd.action((...args) => {
178
+ args.pop();
179
+ return this.actionProcessor(fn, ...args);
180
+ });
189
181
  return this;
190
182
  }
191
183
  async parse(argv) {
192
184
  try {
193
185
  this.assertValidArgs(argv);
194
- this.cmd.parse(argv);
186
+ await this.cmd.parseAsync(argv);
195
187
  }
196
188
  catch (err) {
197
189
  if (Command.isHelpTriggered(err)) {
198
190
  if (Command.isError(err)) {
199
191
  this.outputRelevantHelp(argv);
200
192
  }
201
- return Command.reportHelp(this, err);
193
+ return this.reportHelp(err);
202
194
  }
203
195
  if (Command.isVersionTriggered(err)) {
204
196
  return;
@@ -206,58 +198,29 @@ class Command {
206
198
  if (Command.isUnknownCommand(err) || Command.isExcessCommands(err)) {
207
199
  return this.unknownCommand(argv);
208
200
  }
209
- return await (0, cli_shared_4.exitOnError)(this.ui, err);
201
+ return await (0, cli_shared_1.exitOnError)(this.ui, err);
210
202
  }
211
203
  }
212
- getDefinedCommands() {
213
- return this.cmd.commands;
214
- }
215
- getDefinedOptions() {
216
- return this.options;
217
- }
218
- getCmdName() {
219
- return this.cmd.name();
220
- }
221
- getCommands() {
222
- return this.commands;
223
- }
224
204
  environmentOption() {
225
- this.option('-e, --environment [environment]', cli_shared_3.Text.env.option(cli_shared_2.DEFAULT_ENVIRONMENT_OPTION, cli_shared_2.VALID_ENVIRONMENT_OPTIONS));
226
- this.precondition(() => {
227
- this.cmd.opts().environment = (0, environment_1.checkEnvironmentOption)(this.cmd.opts().environment || cli_shared_2.DEFAULT_ENVIRONMENT_OPTION);
228
- return { appEnv: this.cmd.opts().environment };
205
+ return this.option('-e, --environment [environment]', cli_shared_1.Text.env.option(cli_shared_1.DEFAULT_ENVIRONMENT_OPTION, cli_shared_1.VALID_ENVIRONMENT_OPTIONS)).precondition(async (...args) => {
206
+ const environment = (0, environment_1.checkEnvironmentOption)(last(args).environment || cli_shared_1.DEFAULT_ENVIRONMENT_OPTION);
207
+ return { environment };
229
208
  });
230
- return this;
231
- }
232
- siteAndProductOption() {
233
- this.option('-s, --site [site]', cli_shared_3.Text.optionSite);
234
- this.option('-p, --product [product]', cli_shared_3.Text.optionProduct(cli_shared_2.SUPPORTED_PRODUCTS));
235
- this.precondition(() => {
236
- return this.validateContext();
237
- });
238
- return this;
239
209
  }
240
210
  jsonOption() {
241
- this.option('--json', cli_shared_3.Text.optionJson);
242
- return this;
211
+ return this.option('--json', cli_shared_1.Text.optionJson, false);
243
212
  }
244
213
  requireNoAuthentication() {
245
- this.requiresAuthentication = false;
246
- return this;
214
+ return this.clone({ requiresAuthentication: false });
247
215
  }
248
216
  requireNoAnalyticsConsent() {
249
- this.requiresAnalyticsConsent = false;
250
- return this;
217
+ return this.clone({ requiresAnalyticsConsent: false });
251
218
  }
252
219
  satisfiesNonInteractiveOptions(options) {
253
220
  const optionKeys = Object.keys(options);
254
221
  const requiredOptionKeys = [...this.requiredOptionFlags.map((arg) => new commander_1.Option(arg).attributeName())];
255
222
  return requiredOptionKeys.every((requiredOption) => optionKeys.includes(requiredOption));
256
223
  }
257
- configureOutput(obj) {
258
- this.cmd.configureOutput(obj);
259
- return this;
260
- }
261
224
  async checkPreconditions(...args) {
262
225
  let attributes = {};
263
226
  for (const precondition of this.preconditionFn) {
@@ -268,8 +231,7 @@ class Command {
268
231
  }
269
232
  async checkAuthentication() {
270
233
  if (this.requiresAuthentication) {
271
- const credentialsGetter = (0, cli_shared_1.getCredentialStore)(this.ui);
272
- return credentialsGetter.getCredentials();
234
+ return this.credentialStore.getCredentials();
273
235
  }
274
236
  return undefined;
275
237
  }
@@ -281,40 +243,20 @@ class Command {
281
243
  return;
282
244
  }
283
245
  if (semver_1.default.gt(this.cliDetails.latest, this.cliDetails.version)) {
284
- this.ui.warn(cli_shared_3.Text.error.outdatedCLIVersion(this.cliDetails.version, this.cliDetails.latest));
246
+ this.ui.warn(cli_shared_1.Text.error.outdatedCLIVersion(this.cliDetails.version, this.cliDetails.latest));
285
247
  }
286
248
  else if (semver_1.default.gt(this.cliDetails.version, this.cliDetails.latest)) {
287
249
  (0, version_info_1.clearVersionCache)(this.cliDetails.name);
288
250
  }
289
251
  }
290
252
  isLatestVersion() {
291
- if (!this.cliDetails ||
292
- !this.cliDetails.latest ||
293
- !semver_1.default.valid(this.cliDetails.version) ||
294
- !semver_1.default.valid(this.cliDetails.latest)) {
253
+ var _a, _b;
254
+ const version = semver_1.default.valid((_a = this.cliDetails) === null || _a === void 0 ? void 0 : _a.version);
255
+ const latest = semver_1.default.valid((_b = this.cliDetails) === null || _b === void 0 ? void 0 : _b.latest);
256
+ if (!version || !latest) {
295
257
  return false;
296
258
  }
297
- if (semver_1.default.eq(this.cliDetails.version, this.cliDetails.latest)) {
298
- return true;
299
- }
300
- else {
301
- return false;
302
- }
303
- }
304
- async validateContext() {
305
- if (this.cmd.opts().product) {
306
- const capitalizedProduct = (0, cli_shared_2.capitalizeProduct)(this.cmd.opts().product);
307
- if (!(0, cli_shared_2.isSupportedProduct)(capitalizedProduct)) {
308
- throw new cli_shared_3.ValidationError(cli_shared_3.Text.error.invalidProduct);
309
- }
310
- this.cmd.opts().product = capitalizedProduct;
311
- }
312
- let trySite;
313
- if (this.cmd.opts().site) {
314
- trySite = this.cmd.opts().site;
315
- }
316
- this.cmd.opts().site = trySite ? (0, cli_shared_2.validateSite)(trySite, this.cmd.opts().product) : undefined;
317
- return { product: this.cmd.opts().product };
259
+ return semver_1.default.eq(version, latest);
318
260
  }
319
261
  findLastValidCommand(argv) {
320
262
  let command = this.cmd;
@@ -333,6 +275,22 @@ class Command {
333
275
  index: 1
334
276
  };
335
277
  }
278
+ outputRelevantHelp(argv) {
279
+ this.findLastValidCommand(argv).command.outputHelp();
280
+ }
281
+ async reportHelp(cmdError) {
282
+ try {
283
+ let cred = (0, anon_user_id_1.getAnonId)(true);
284
+ try {
285
+ cred = await this.credentialStore.getCredentials();
286
+ }
287
+ catch (noTokenError) {
288
+ }
289
+ this.analyticsClient.reportSuccess('help', cred, { command: cmdError.getCommandName() });
290
+ }
291
+ catch (err) {
292
+ }
293
+ }
336
294
  async unknownCommand(argv) {
337
295
  const errorMessage = [];
338
296
  const { command: lastCommand, index: lastCommandIndex } = this.findLastValidCommand(argv);
@@ -343,14 +301,14 @@ class Command {
343
301
  return cmd._hidden !== true;
344
302
  })
345
303
  .map((cmd) => cmd.name()));
346
- const errorText = cli_shared_3.Text.invalidCmd(argv.slice(2, lastCommandIndex + 2).join(' '));
304
+ const errorText = cli_shared_1.Text.invalidCmd(argv.slice(2, lastCommandIndex + 2).join(' '));
347
305
  if (suggestions.length) {
348
306
  errorMessage.push(`Did you mean:`);
349
307
  const suggestionsPrefixed = suggestions.map((suggestion) => [...argv.slice(2, lastCommandIndex + 1), suggestion].join(' '));
350
308
  errorMessage.push(suggestionsPrefixed.join('\n'));
351
309
  }
352
- errorMessage.push(cli_shared_3.Text.invalidCmdHelp);
353
- return await (0, cli_shared_4.exitOnError)(this.ui, new Error(errorText), errorMessage.join('\n\n'));
310
+ errorMessage.push(cli_shared_1.Text.invalidCmdHelp);
311
+ return await (0, cli_shared_1.exitOnError)(this.ui, new Error(errorText), errorMessage.join('\n\n'));
354
312
  }
355
313
  assertValidArgs(argv) {
356
314
  const args = argv.slice(2);
@@ -370,24 +328,11 @@ class Command {
370
328
  }
371
329
  }
372
330
  }
331
+ getAutocompleteConfig() {
332
+ return getAutocompleteConfig(this.cmd);
333
+ }
373
334
  }
374
335
  exports.Command = Command;
375
- _a = Command;
376
- Command.reportHelp = async (cmd, cmdError) => {
377
- try {
378
- let cred = (0, anon_user_id_1.getAnonId)(true);
379
- try {
380
- const credentialsGetter = (0, cli_shared_1.getCredentialStore)(cmd.ui);
381
- cred = await credentialsGetter.getCredentials();
382
- }
383
- catch (noTokenError) {
384
- }
385
- cmd.analyticsClient.reportSuccess('help', cred, { command: cmdError.getCommandName() });
386
- }
387
- catch (err) {
388
- }
389
- return;
390
- };
391
336
  Command.isError = (cmdError) => {
392
337
  return cmdError.exitCode === 1;
393
338
  };
@@ -406,3 +351,37 @@ Command.isExcessCommands = (cmdError) => {
406
351
  Command.concatenateNames = (parent, subcommand) => {
407
352
  return parent ? `${parent}:${subcommand}` : subcommand;
408
353
  };
354
+ const help = new commander_1.default.Help();
355
+ function getOptionData(option) {
356
+ let requireUserArg = false;
357
+ if (/<*>/.test(option.flags) || /\[*\]/.test(option.flags)) {
358
+ requireUserArg = true;
359
+ }
360
+ return {
361
+ requireUserArg
362
+ };
363
+ }
364
+ function getOptionsData(command) {
365
+ const commandOptions = {};
366
+ for (const opt of help.visibleOptions(command)) {
367
+ if (opt.long !== undefined) {
368
+ commandOptions[opt.long] = getOptionData(opt);
369
+ }
370
+ }
371
+ commandOptions['--help'] = {
372
+ requireUserArg: false
373
+ };
374
+ return commandOptions;
375
+ }
376
+ function getAutocompleteConfig(cmd) {
377
+ const commands = {};
378
+ for (const command of help.visibleCommands(cmd)) {
379
+ if (command.name() === 'help') {
380
+ continue;
381
+ }
382
+ commands[command.name()] = getOptionsData(command);
383
+ }
384
+ const options = getOptionsData(cmd);
385
+ return { commands, options };
386
+ }
387
+ exports.getAutocompleteConfig = getAutocompleteConfig;
@@ -1,9 +1,9 @@
1
- import { UI, FeedbackPostClient } from '@forge/cli-shared';
1
+ import { FeedbackPostClient, CredentialGetter } from '@forge/cli-shared';
2
2
  import { Response } from 'node-fetch';
3
3
  export declare class FeedbackController {
4
- private readonly ui;
4
+ private readonly credentialStore;
5
5
  private readonly feedbackPostClient;
6
- constructor(ui: UI, feedbackPostClient: FeedbackPostClient);
6
+ constructor(credentialStore: CredentialGetter, feedbackPostClient: FeedbackPostClient);
7
7
  sendFeedback(feedback: string): Promise<Response>;
8
8
  }
9
9
  //# sourceMappingURL=feedback-controller.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"feedback-controller.d.ts","sourceRoot":"","sources":["../../../src/command-line/controller/feedback-controller.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,kBAAkB,EAAsB,MAAM,mBAAmB,CAAC;AAC/E,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,qBAAa,kBAAkB;IACjB,OAAO,CAAC,QAAQ,CAAC,EAAE;IAAM,OAAO,CAAC,QAAQ,CAAC,kBAAkB;gBAA3C,EAAE,EAAE,EAAE,EAAmB,kBAAkB,EAAE,kBAAkB;IAE/E,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC;CAQ/D"}
1
+ {"version":3,"file":"feedback-controller.d.ts","sourceRoot":"","sources":["../../../src/command-line/controller/feedback-controller.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACzE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,qBAAa,kBAAkB;IAE3B,OAAO,CAAC,QAAQ,CAAC,eAAe;IAChC,OAAO,CAAC,QAAQ,CAAC,kBAAkB;gBADlB,eAAe,EAAE,gBAAgB,EACjC,kBAAkB,EAAE,kBAAkB;IAG5C,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC;CAQ/D"}
@@ -1,14 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.FeedbackController = void 0;
4
- const cli_shared_1 = require("@forge/cli-shared");
5
4
  class FeedbackController {
6
- constructor(ui, feedbackPostClient) {
7
- this.ui = ui;
5
+ constructor(credentialStore, feedbackPostClient) {
6
+ this.credentialStore = credentialStore;
8
7
  this.feedbackPostClient = feedbackPostClient;
9
8
  }
10
9
  async sendFeedback(feedback) {
11
- const { email } = await (0, cli_shared_1.getCredentialStore)(this.ui).getCredentials();
10
+ const { email } = await this.credentialStore.getCredentials();
12
11
  return this.feedbackPostClient.sendFeedback({
13
12
  summary: feedback.length <= 50 ? feedback : feedback.slice(0, 50) + '...',
14
13
  description: feedback,
@@ -1,5 +1,5 @@
1
1
  /// <reference types="node" />
2
- import { AppConfigProvider, ConfigFile, UI } from '@forge/cli-shared';
2
+ import { AppConfigProvider, ConfigFile, UI, FeatureFlagReader } from '@forge/cli-shared';
3
3
  import { URL } from 'url';
4
4
  import { InstallAppSiteCommand } from '../../installations/install-app-site';
5
5
  import { InstallationService } from '../../service/installation-service';
@@ -22,7 +22,8 @@ export declare class InstallController {
22
22
  private readonly installAppSiteCommand;
23
23
  private readonly installationService;
24
24
  private readonly installView;
25
- constructor(appConfigProvider: AppConfigProvider, configFile: ConfigFile, ui: UI, installAppSiteCommand: InstallAppSiteCommand, installationService: InstallationService, installView: InstallView);
25
+ private readonly featureFlags;
26
+ constructor(appConfigProvider: AppConfigProvider, configFile: ConfigFile, ui: UI, installAppSiteCommand: InstallAppSiteCommand, installationService: InstallationService, installView: InstallView, featureFlags: FeatureFlagReader);
26
27
  private securityPrompt;
27
28
  private installOrUpgrade;
28
29
  private promptForProduct;
@@ -1 +1 @@
1
- {"version":3,"file":"install-controller.d.ts","sourceRoot":"","sources":["../../../src/command-line/controller/install-controller.ts"],"names":[],"mappings":";AAAA,OAAO,EACL,iBAAiB,EACjB,UAAU,EAEV,EAAE,EAUH,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEnD,UAAU,gBAAgB;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,GAAG,CAAC;IACX,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,aAAa,EAAE,OAAO,CAAC;CACxB;AAiBD,qBAAa,iBAAkB,SAAQ,KAAK;gBAC9B,WAAW,EAAE,MAAM;CAGhC;AAQD,qBAAa,iBAAiB;IAE1B,OAAO,CAAC,QAAQ,CAAC,iBAAiB;IAClC,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,EAAE;IACnB,OAAO,CAAC,QAAQ,CAAC,qBAAqB;IACtC,OAAO,CAAC,QAAQ,CAAC,mBAAmB;IACpC,OAAO,CAAC,QAAQ,CAAC,WAAW;gBALX,iBAAiB,EAAE,iBAAiB,EACpC,UAAU,EAAE,UAAU,EACtB,EAAE,EAAE,EAAE,EACN,qBAAqB,EAAE,qBAAqB,EAC5C,mBAAmB,EAAE,mBAAmB,EACxC,WAAW,EAAE,WAAW;YAG7B,cAAc;YAmBd,gBAAgB;YAsChB,gBAAgB;YAKhB,aAAa;YAeb,gBAAgB;IAoB9B,OAAO,CAAC,uCAAuC;IAalC,GAAG,CAAC,EACf,WAAW,EACX,IAAI,EACJ,OAAO,EACP,OAAO,EACP,aAAa,EACb,cAAc,EACf,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;CAuFpC"}
1
+ {"version":3,"file":"install-controller.d.ts","sourceRoot":"","sources":["../../../src/command-line/controller/install-controller.ts"],"names":[],"mappings":";AAAA,OAAO,EACL,iBAAiB,EACjB,UAAU,EAEV,EAAE,EAUF,iBAAiB,EAClB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEnD,UAAU,gBAAgB;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,GAAG,CAAC;IACX,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,aAAa,EAAE,OAAO,CAAC;CACxB;AAiBD,qBAAa,iBAAkB,SAAQ,KAAK;gBAC9B,WAAW,EAAE,MAAM;CAGhC;AAQD,qBAAa,iBAAiB;IAE1B,OAAO,CAAC,QAAQ,CAAC,iBAAiB;IAClC,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,EAAE;IACnB,OAAO,CAAC,QAAQ,CAAC,qBAAqB;IACtC,OAAO,CAAC,QAAQ,CAAC,mBAAmB;IACpC,OAAO,CAAC,QAAQ,CAAC,WAAW;IAC5B,OAAO,CAAC,QAAQ,CAAC,YAAY;gBANZ,iBAAiB,EAAE,iBAAiB,EACpC,UAAU,EAAE,UAAU,EACtB,EAAE,EAAE,EAAE,EACN,qBAAqB,EAAE,qBAAqB,EAC5C,mBAAmB,EAAE,mBAAmB,EACxC,WAAW,EAAE,WAAW,EACxB,YAAY,EAAE,iBAAiB;YAGpC,cAAc;YAmBd,gBAAgB;YAsChB,gBAAgB;YAKhB,aAAa;YAeb,gBAAgB;IAoB9B,OAAO,CAAC,uCAAuC;IAalC,GAAG,CAAC,EACf,WAAW,EACX,IAAI,EACJ,OAAO,EACP,OAAO,EACP,aAAa,EACb,cAAc,EACf,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;CAsGpC"}
@@ -9,13 +9,14 @@ class NoDeploymentError extends Error {
9
9
  }
10
10
  exports.NoDeploymentError = NoDeploymentError;
11
11
  class InstallController {
12
- constructor(appConfigProvider, configFile, ui, installAppSiteCommand, installationService, installView) {
12
+ constructor(appConfigProvider, configFile, ui, installAppSiteCommand, installationService, installView, featureFlags) {
13
13
  this.appConfigProvider = appConfigProvider;
14
14
  this.configFile = configFile;
15
15
  this.ui = ui;
16
16
  this.installAppSiteCommand = installAppSiteCommand;
17
17
  this.installationService = installationService;
18
18
  this.installView = installView;
19
+ this.featureFlags = featureFlags;
19
20
  }
20
21
  async securityPrompt(site) {
21
22
  this.ui.info(cli_shared_1.Text.install.security.banner(site.host));
@@ -114,11 +115,17 @@ class InstallController {
114
115
  if ((0, cli_shared_1.isSecureSite)(site)) {
115
116
  await this.securityPrompt(site);
116
117
  }
118
+ const hasDefaultReadMeScope = await this.featureFlags.readMeScopeAddedByXLS();
119
+ this.ui.debug(`appId ${id} has read:me scope added by default?: ${hasDefaultReadMeScope}`);
117
120
  const environmentPermissions = await this.installationService.getAppEnvironmentPermissions(id, environment);
118
- if (!(environmentPermissions === null || environmentPermissions === void 0 ? void 0 : environmentPermissions.scopes) || environmentPermissions.scopes.length === 0) {
121
+ if (!environmentPermissions ||
122
+ (hasDefaultReadMeScope && (!(environmentPermissions === null || environmentPermissions === void 0 ? void 0 : environmentPermissions.scopes) || environmentPermissions.scopes.length === 0))) {
119
123
  this.ui.error(new NoDeploymentError(environment), { pad: false });
120
124
  return;
121
125
  }
126
+ if (environmentPermissions.scopes === undefined) {
127
+ environmentPermissions.scopes = [];
128
+ }
122
129
  const { scopes: environmentScopes } = environmentPermissions;
123
130
  const [{ permissions }, manifestEgressEntries] = await Promise.all([
124
131
  this.configFile.readConfig(),
@@ -27,7 +27,7 @@ import { StubController } from './controller/stubController';
27
27
  import { PrerequisitesController } from './controller/prerequisites-controller';
28
28
  export declare const getDependencies: (cliDetails: CLIDetails | undefined) => Promise<{
29
29
  ui: CommandLineUI;
30
- cmd: Command;
30
+ cmd: Command<[], import("./command").DefaultOpts>;
31
31
  configFile: ConfigFile;
32
32
  appConfigProvider: import("@forge/cli-shared").AppConfigProvider;
33
33
  graphqlGateway: string;
@@ -1 +1 @@
1
- {"version":3,"file":"dependency-injection.d.ts","sourceRoot":"","sources":["../../src/command-line/dependency-injection.ts"],"names":[],"mappings":"AAMA,OAAO,EASL,UAAU,EACV,aAAa,EAEb,UAAU,EAGV,gBAAgB,EAGhB,kBAAkB,EAUlB,YAAY,EACZ,aAAa,EAOb,kBAAkB,EAIlB,kBAAkB,EACnB,MAAM,mBAAmB,CAAC;AAc3B,OAAO,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAE/E,OAAO,EAML,0BAA0B,EAG3B,MAAM,WAAW,CAAC;AAEnB,OAAO,EAAE,gCAAgC,EAAE,MAAM,sDAAsD,CAAC;AAExG,OAAO,EAAE,+BAA+B,EAAE,MAAM,qDAAqD,CAAC;AACtG,OAAO,EAAE,6BAA6B,EAAE,MAAM,mDAAmD,CAAC;AAIlG,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAG3E,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AACxE,OAAO,EAAE,uBAAuB,EAAE,MAAM,mCAAmC,CAAC;AAC5E,OAAO,EAAE,yBAAyB,EAAE,MAAM,qCAAqC,CAAC;AAMhF,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAC1E,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAIrE,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAQtE,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AAIzE,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAG3E,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAE5D,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAC9E,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAWlE,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAKhF,eAAO,MAAM,eAAe,eAAsB,UAAU,GAAG,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiSvE,CAAC;AAGF,aAAK,WAAW,CAAC,CAAC,IAAI,CAAC,SAAS,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC;AAC3D,oBAAY,YAAY,GAAG,WAAW,CAAC,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"dependency-injection.d.ts","sourceRoot":"","sources":["../../src/command-line/dependency-injection.ts"],"names":[],"mappings":"AAMA,OAAO,EASL,UAAU,EACV,aAAa,EAEb,UAAU,EAGV,gBAAgB,EAGhB,kBAAkB,EAUlB,YAAY,EACZ,aAAa,EAOb,kBAAkB,EAIlB,kBAAkB,EACnB,MAAM,mBAAmB,CAAC;AAc3B,OAAO,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAE/E,OAAO,EAML,0BAA0B,EAG3B,MAAM,WAAW,CAAC;AAEnB,OAAO,EAAE,gCAAgC,EAAE,MAAM,sDAAsD,CAAC;AAExG,OAAO,EAAE,+BAA+B,EAAE,MAAM,qDAAqD,CAAC;AACtG,OAAO,EAAE,6BAA6B,EAAE,MAAM,mDAAmD,CAAC;AAIlG,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAG3E,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AACxE,OAAO,EAAE,uBAAuB,EAAE,MAAM,mCAAmC,CAAC;AAC5E,OAAO,EAAE,yBAAyB,EAAE,MAAM,qCAAqC,CAAC;AAMhF,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAC1E,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAIrE,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAQtE,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AAIzE,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAG3E,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAE5D,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAC9E,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAWlE,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAKhF,eAAO,MAAM,eAAe,eAAsB,UAAU,GAAG,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkSvE,CAAC;AAGF,aAAK,WAAW,CAAC,CAAC,IAAI,CAAC,SAAS,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC;AAC3D,oBAAY,YAAY,GAAG,WAAW,CAAC,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC,CAAC"}
@@ -83,10 +83,10 @@ const getDependencies = async (cliDetails) => {
83
83
  const liteLintService = new lite_lint_service_1.LiteLintService();
84
84
  const analyticsSettingsView = new analytics_settings_view_1.AnalyticsSettingsView(ui);
85
85
  const preCommandController = new pre_command_controller_1.PreCommandController(liteLintService, liteLintView, configFile, cachedConfigService, analyticsSettingsView, settingsView);
86
- cmd = new command_1.Command(ui, analyticsClientReporter, preCommandController, cliDetails);
87
86
  const graphqlGateway = (0, cli_shared_1.getGraphqlGateway)();
88
87
  const credentialStore = (0, cli_shared_1.getCredentialStore)(ui);
89
88
  const authenticator = new cli_shared_1.PersonalTokenAuthenticator(credentialStore);
89
+ cmd = command_1.Command.program(ui, analyticsClientReporter, preCommandController, cliDetails, credentialStore);
90
90
  const featureFlagService = new cli_shared_1.FeatureFlagService(ui, cliDetails, credentialStore, appConfigReader);
91
91
  await (0, sentry_1.initialiseSentry)(featureFlagService, cachedConfigService);
92
92
  const createGraphQLClient = (auth) => {
@@ -144,9 +144,9 @@ const getDependencies = async (cliDetails) => {
144
144
  const getWebTriggerURLCommand = new get_webtrigger_url_1.GetWebTriggerURLCommand(assertiveAppConfigReader, installationsClient, appEnvironmentClient, webTriggerGraphqlClient);
145
145
  const autocompleteController = new autocomplete_controller_1.AutocompleteController(ui);
146
146
  const installationsService = new installation_service_1.InstallationService(assertiveAppConfigReader, installationsClient, installationsClient);
147
- const installView = new install_view_1.InstallView(ui);
148
- const installController = new install_controller_1.InstallController(assertiveAppConfigReader, configFile, ui, installAppSiteCommand, installationsService, installView);
149
- const feedbackController = new feedback_controller_1.FeedbackController(ui, feedbackPostClient);
147
+ const installView = new install_view_1.InstallView(ui, featureFlagService);
148
+ const installController = new install_controller_1.InstallController(assertiveAppConfigReader, configFile, ui, installAppSiteCommand, installationsService, installView, featureFlagService);
149
+ const feedbackController = new feedback_controller_1.FeedbackController(credentialStore, feedbackPostClient);
150
150
  const lintService = new lint_service_1.LintService(configFile, fileReader);
151
151
  const lintView = new lint_view_1.LintView(ui);
152
152
  const lintController = new lint_controller_1.LintController(lintService, lintView);
@@ -1,5 +1,4 @@
1
- import { CLIDetails } from '@forge/cli-shared';
2
1
  import { Dependencies } from './dependency-injection';
3
- export declare const registerCommands: (deps: Dependencies, cliDetails?: CLIDetails) => void;
2
+ export declare function registerCommands(deps: Dependencies): void;
4
3
  export declare const main: () => Promise<void>;
5
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/command-line/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAElE,OAAO,EAAmB,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAwBvE,eAAO,MAAM,gBAAgB,SAAU,YAAY,eAAe,UAAU,KAAG,IAyB9E,CAAC;AAiBF,eAAO,MAAM,IAAI,QAAa,QAAQ,IAAI,CAezC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/command-line/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAmB,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAkBvE,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,YAAY,QAclD;AAQD,eAAO,MAAM,IAAI,QAAa,QAAQ,IAAI,CAczC,CAAC"}