@forge/cli-shared 10.0.1-next.4 → 10.1.0-next.10

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 (37) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/out/apps/get-app-owner.d.ts.map +1 -1
  3. package/out/auth/personal/me-graphql-client.d.ts +1 -3
  4. package/out/auth/personal/me-graphql-client.d.ts.map +1 -1
  5. package/out/auth/personal/me-graphql-client.js +2 -4
  6. package/out/auth/personal/user-repository.d.ts +1 -3
  7. package/out/auth/personal/user-repository.d.ts.map +1 -1
  8. package/out/auth/personal/user-repository.js +2 -4
  9. package/out/graphql/gql/graphql.d.ts +114 -16
  10. package/out/graphql/gql/graphql.d.ts.map +1 -1
  11. package/out/service/bridge-script-service.d.ts +1 -1
  12. package/out/service/bridge-script-service.d.ts.map +1 -1
  13. package/out/service/bridge-script-service.js +3 -3
  14. package/out/service/iframe-resizer-script-service.d.ts +1 -1
  15. package/out/service/iframe-resizer-script-service.d.ts.map +1 -1
  16. package/out/service/iframe-resizer-script-service.js +3 -3
  17. package/out/service/statsig-service.d.ts +13 -2
  18. package/out/service/statsig-service.d.ts.map +1 -1
  19. package/out/service/statsig-service.js +90 -2
  20. package/out/service/supported-products-service.d.ts +8 -16
  21. package/out/service/supported-products-service.d.ts.map +1 -1
  22. package/out/service/supported-products-service.js +24 -60
  23. package/out/shared/error-handling.d.ts +2 -0
  24. package/out/shared/error-handling.d.ts.map +1 -1
  25. package/out/shared/error-handling.js +6 -1
  26. package/out/shared/forge-cli-attribution.d.ts +4 -0
  27. package/out/shared/forge-cli-attribution.d.ts.map +1 -1
  28. package/out/shared/forge-cli-attribution.js +15 -1
  29. package/out/shared/load-html.d.ts +3 -0
  30. package/out/shared/load-html.d.ts.map +1 -0
  31. package/out/shared/load-html.js +4 -0
  32. package/out/shared/test.d.ts.map +1 -1
  33. package/out/shared/test.js +1 -1
  34. package/out/ui/command-line-ui.d.ts +2 -0
  35. package/out/ui/command-line-ui.d.ts.map +1 -1
  36. package/out/ui/command-line-ui.js +13 -2
  37. package/package.json +3 -2
@@ -46,6 +46,8 @@ export class CommandLineUI {
46
46
  insideProgress = false;
47
47
  statsigService;
48
48
  cachedSpinnerConfig = 'dots';
49
+ customSpinnerRequested = false;
50
+ showsConfiguredSpinner = false;
49
51
  static HINT_ROTATION_INTERVAL_MS = 7000;
50
52
  hintLine;
51
53
  hintTimer;
@@ -67,7 +69,6 @@ export class CommandLineUI {
67
69
  }
68
70
  setStatsigService(statsigService) {
69
71
  this.statsigService = statsigService;
70
- this.initCustomSpinner();
71
72
  }
72
73
  seasonalSpinnerEffectsEnabled() {
73
74
  if (process.env.FORGE_DISABLE_SEASONAL_EFFECTS) {
@@ -79,19 +80,26 @@ export class CommandLineUI {
79
80
  return true;
80
81
  }
81
82
  initCustomSpinner() {
82
- if (!this.seasonalSpinnerEffectsEnabled() || !this.statsigService) {
83
+ if (this.customSpinnerRequested || !this.seasonalSpinnerEffectsEnabled() || !this.statsigService) {
83
84
  return;
84
85
  }
86
+ this.customSpinnerRequested = true;
85
87
  this.statsigService
86
88
  .getCustomSpinnerConfig()
87
89
  .then((frames) => {
88
90
  if (frames && frames.length > 0) {
89
91
  this.cachedSpinnerConfig = { interval: 300, frames };
92
+ if (this.spinner.isSpinning && this.showsConfiguredSpinner) {
93
+ this.spinner.spinner = this.cachedSpinnerConfig;
94
+ this.spinner.stop();
95
+ this.spinner.start();
96
+ }
90
97
  }
91
98
  })
92
99
  .catch(() => this.debug(Text.settings.customEffects.setupError));
93
100
  }
94
101
  getSpinner() {
102
+ this.initCustomSpinner();
95
103
  return this.cachedSpinnerConfig;
96
104
  }
97
105
  async prompt(questions, initialAnswers) {
@@ -122,6 +130,7 @@ export class CommandLineUI {
122
130
  this.addedProgressPadding = false;
123
131
  if (!this.debugEnabled) {
124
132
  this.spinner.spinner = this.getSpinner();
133
+ this.showsConfiguredSpinner = true;
125
134
  this.spinner.text = '';
126
135
  this.spinner.start();
127
136
  }
@@ -205,6 +214,7 @@ export class CommandLineUI {
205
214
  this.log(animateEllipsis ? waitText + ELLIPSIS_FRAMES[ELLIPSIS_FRAMES.length - 1] : waitText, ProgressLogType.startText);
206
215
  }
207
216
  else {
217
+ this.showsConfiguredSpinner = false;
208
218
  this.spinner.spinner = animateEllipsis
209
219
  ? { interval: ELLIPSIS_INTERVAL_MS, frames: ELLIPSIS_FRAMES.map((ellipsis) => waitText + ellipsis) }
210
220
  : { interval: 9999, frames: [''] };
@@ -229,6 +239,7 @@ export class CommandLineUI {
229
239
  this.addedProgressPadding = false;
230
240
  if (!this.debugEnabled) {
231
241
  this.spinner.spinner = this.getSpinner();
242
+ this.showsConfiguredSpinner = true;
232
243
  this.spinner.text = '';
233
244
  this.spinner.start();
234
245
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forge/cli-shared",
3
- "version": "10.0.1-next.4",
3
+ "version": "10.1.0-next.10",
4
4
  "description": "Common functionality for Forge CLI",
5
5
  "author": "Atlassian",
6
6
  "license": "SEE LICENSE IN LICENSE.txt",
@@ -14,7 +14,8 @@
14
14
  "prebuild": "yarn generate-graphql-types"
15
15
  },
16
16
  "dependencies": {
17
- "@forge/manifest": "13.9.2-next.0",
17
+ "@atlaskit/feature-gate-js-client": "^6.0.0",
18
+ "@forge/manifest": "13.9.2-next.1",
18
19
  "@forge/util": "4.1.0",
19
20
  "@forge/i18n": "1.0.2",
20
21
  "@sentry/node": "7.106.0",