@codingame/monaco-vscode-walkthrough-service-override 4.5.1 → 4.5.2

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 (17) hide show
  1. package/package.json +2 -2
  2. package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.contribution.js +50 -107
  3. package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.js +138 -249
  4. package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedColors.js +8 -35
  5. package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedExtensionPoint.js +61 -116
  6. package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedIcons.js +5 -4
  7. package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedInput.js +3 -6
  8. package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedService.js +74 -77
  9. package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/startupPage.js +29 -32
  10. package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/common/gettingStartedContent.js +147 -498
  11. package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/common/media/notebookProfile.js +4 -15
  12. package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/common/media/theme_picker.js +6 -25
  13. package/vscode/src/vs/workbench/contrib/welcomeWalkthrough/browser/editor/editorWalkThrough.js +5 -12
  14. package/vscode/src/vs/workbench/contrib/welcomeWalkthrough/browser/walkThrough.contribution.js +5 -12
  15. package/vscode/src/vs/workbench/contrib/welcomeWalkthrough/browser/walkThroughPart.js +24 -31
  16. package/vscode/src/vs/workbench/contrib/welcomeWalkthrough/common/walkThroughContentProvider.js +2 -2
  17. package/vscode/src/vs/workbench/contrib/welcomeWalkthrough/common/walkThroughUtils.js +4 -3
@@ -29,14 +29,11 @@ import { IWorkspaceContextService } from 'vscode/vscode/vs/platform/workspace/co
29
29
  import { CancellationTokenSource } from 'vscode/vscode/vs/base/common/cancellation';
30
30
  import { getDefaultIconPath } from 'vscode/vscode/vs/workbench/services/extensionManagement/common/extensionManagement';
31
31
 
32
- const HasMultipleNewFileEntries = ( new RawContextKey('hasMultipleNewFileEntries', false));
32
+ const _moduleId = "vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedService";
33
+ const HasMultipleNewFileEntries = ( (new RawContextKey('hasMultipleNewFileEntries', false)));
33
34
  const hiddenEntriesConfigurationKey = 'workbench.welcomePage.hiddenCategories';
34
35
  const walkthroughMetadataConfigurationKey = 'workbench.welcomePage.walkthroughMetadata';
35
- const BUILT_IN_SOURCE = ( localizeWithPath(
36
- 'vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedService',
37
- 'builtin',
38
- "Built-In"
39
- ));
36
+ const BUILT_IN_SOURCE = ( localizeWithPath(_moduleId, 0, "Built-In"));
40
37
  const DAYS = 24 * 60 * 60 * 1000;
41
38
  const NEW_WALKTHROUGH_TIME = 7 * DAYS;
42
39
  let WalkthroughsService = class WalkthroughsService extends Disposable {
@@ -54,26 +51,26 @@ let WalkthroughsService = class WalkthroughsService extends Disposable {
54
51
  this.viewsService = viewsService;
55
52
  this.telemetryService = telemetryService;
56
53
  this.tasExperimentService = tasExperimentService;
57
- this._onDidAddWalkthrough = ( new Emitter());
54
+ this._onDidAddWalkthrough = ( (new Emitter()));
58
55
  this.onDidAddWalkthrough = this._onDidAddWalkthrough.event;
59
- this._onDidRemoveWalkthrough = ( new Emitter());
56
+ this._onDidRemoveWalkthrough = ( (new Emitter()));
60
57
  this.onDidRemoveWalkthrough = this._onDidRemoveWalkthrough.event;
61
- this._onDidChangeWalkthrough = ( new Emitter());
58
+ this._onDidChangeWalkthrough = ( (new Emitter()));
62
59
  this.onDidChangeWalkthrough = this._onDidChangeWalkthrough.event;
63
- this._onDidProgressStep = ( new Emitter());
60
+ this._onDidProgressStep = ( (new Emitter()));
64
61
  this.onDidProgressStep = this._onDidProgressStep.event;
65
- this.sessionEvents = ( new Set());
66
- this.completionListeners = ( new Map());
67
- this.gettingStartedContributions = ( new Map());
68
- this.steps = ( new Map());
69
- this.sessionInstalledExtensions = ( new Set());
70
- this.categoryVisibilityContextKeys = ( new Set());
71
- this.stepCompletionContextKeyExpressions = ( new Set());
72
- this.stepCompletionContextKeys = ( new Set());
73
- this.metadata = ( new Map(
62
+ this.sessionEvents = ( (new Set()));
63
+ this.completionListeners = ( (new Map()));
64
+ this.gettingStartedContributions = ( (new Map()));
65
+ this.steps = ( (new Map()));
66
+ this.sessionInstalledExtensions = ( (new Set()));
67
+ this.categoryVisibilityContextKeys = ( (new Set()));
68
+ this.stepCompletionContextKeyExpressions = ( (new Set()));
69
+ this.stepCompletionContextKeys = ( (new Set()));
70
+ this.metadata = ( (new Map(
74
71
  JSON.parse(this.storageService.get(walkthroughMetadataConfigurationKey, 0 , '[]'))
75
- ));
76
- this.memento = ( new Memento('gettingStartedService', this.storageService));
72
+ )));
73
+ this.memento = ( (new Memento('gettingStartedService', this.storageService)));
77
74
  this.stepProgress = this.memento.getMemento(0 , 0 );
78
75
  this.initCompletionEventListeners();
79
76
  HasMultipleNewFileEntries.bindTo(this.contextService).set(false);
@@ -87,7 +84,7 @@ let WalkthroughsService = class WalkthroughsService extends Disposable {
87
84
  order: walkthroughs.length - index,
88
85
  source: BUILT_IN_SOURCE,
89
86
  when: ContextKeyExpr.deserialize(category.when) ?? ContextKeyExpr.true(),
90
- steps: ( category.content.steps.map((step, index) => {
87
+ steps: ( (category.content.steps.map((step, index) => {
91
88
  return ({
92
89
  ...step,
93
90
  completionEvents: step.completionEvents ?? [],
@@ -110,11 +107,11 @@ let WalkthroughsService = class WalkthroughsService extends Disposable {
110
107
  : {
111
108
  type: 'markdown',
112
109
  path: convertInternalMediaPathToFileURI(step.media.path).with({ query: JSON.stringify({ moduleId: 'vs/workbench/contrib/welcomeGettingStarted/common/media/' + step.media.path }) }),
113
- base: ( FileAccess.asFileUri('vs/workbench/contrib/welcomeGettingStarted/common/media/')),
114
- root: ( FileAccess.asFileUri('vs/workbench/contrib/welcomeGettingStarted/common/media/')),
110
+ base: ( (FileAccess.asFileUri('vs/workbench/contrib/welcomeGettingStarted/common/media/'))),
111
+ root: ( (FileAccess.asFileUri('vs/workbench/contrib/welcomeGettingStarted/common/media/'))),
115
112
  }
116
113
  });
117
- }))
114
+ })))
118
115
  });
119
116
  });
120
117
  walkthroughsExtensionPoint.setHandler((_, { added, removed }) => {
@@ -138,7 +135,7 @@ let WalkthroughsService = class WalkthroughsService extends Disposable {
138
135
  this._register(this.contextService.onDidChangeContext(event => {
139
136
  if (event.affectsSome(this.stepCompletionContextKeys)) {
140
137
  this.stepCompletionContextKeyExpressions.forEach(expression => {
141
- if (event.affectsSome(( new Set(( expression.keys())))) && this.contextService.contextMatchesRules(expression)) {
138
+ if (event.affectsSome(( (new Set( (expression.keys()))))) && this.contextService.contextMatchesRules(expression)) {
142
139
  this.progressByEvent(`onContext:` + expression.serialize());
143
140
  }
144
141
  });
@@ -165,17 +162,17 @@ let WalkthroughsService = class WalkthroughsService extends Disposable {
165
162
  const walkthrough = this.gettingStartedContributions.get(id);
166
163
  const prior = this.metadata.get(id);
167
164
  if (prior && walkthrough) {
168
- this.metadata.set(id, { ...prior, manaullyOpened: true, stepIDs: ( walkthrough.steps.map(s => s.id)) });
165
+ this.metadata.set(id, { ...prior, manaullyOpened: true, stepIDs: ( (walkthrough.steps.map(s => s.id))) });
169
166
  }
170
167
  this.storageService.store(walkthroughMetadataConfigurationKey, JSON.stringify([...this.metadata.entries()]), 0 , 0 );
171
168
  }
172
169
  async registerExtensionWalkthroughContributions(extension) {
173
170
  const convertExtensionPathToFileURI = (path) => path.startsWith('https://')
174
- ? ( URI.parse(path, true))
171
+ ? ( (URI.parse(path, true)))
175
172
  : FileAccess.uriToFileUri(joinPath(extension.extensionLocation, path));
176
173
  const convertExtensionRelativePathsToBrowserURIs = (path) => {
177
174
  const convertPath = (path) => path.startsWith('https://')
178
- ? ( URI.parse(path, true))
175
+ ? ( (URI.parse(path, true)))
179
176
  : FileAccess.uriToBrowserUri(joinPath(extension.extensionLocation, path));
180
177
  if (typeof path === 'string') {
181
178
  const converted = convertPath(path);
@@ -199,13 +196,13 @@ let WalkthroughsService = class WalkthroughsService extends Disposable {
199
196
  const categoryID = extension.identifier.value + '#' + walkthrough.id;
200
197
  const isNewlyInstalled = !this.metadata.get(categoryID);
201
198
  if (isNewlyInstalled) {
202
- this.metadata.set(categoryID, { firstSeen: +( new Date()), stepIDs: walkthrough.steps?.map(s => s.id) ?? [], manaullyOpened: false });
199
+ this.metadata.set(categoryID, { firstSeen: +( (new Date())), stepIDs: walkthrough.steps?.map(s => s.id) ?? [], manaullyOpened: false });
203
200
  }
204
201
  const override = await Promise.race([
205
202
  this.tasExperimentService?.getTreatment(`gettingStarted.overrideCategory.${extension.identifier.value + '.' + walkthrough.id}.when`),
206
- ( new Promise(resolve => setTimeout(() => resolve(walkthrough.when), 5000)))
203
+ ( (new Promise(resolve => setTimeout(() => resolve(walkthrough.when), 5000))))
207
204
  ]);
208
- if (( this.sessionInstalledExtensions.has(extension.identifier.value.toLowerCase()))
205
+ if (( (this.sessionInstalledExtensions.has(extension.identifier.value.toLowerCase())))
209
206
  && this.contextService.contextMatchesRules(ContextKeyExpr.deserialize(override ?? walkthrough.when) ?? ContextKeyExpr.true())) {
210
207
  this.sessionInstalledExtensions.delete(extension.identifier.value.toLowerCase());
211
208
  if (index < sectionToOpenIndex && isNewlyInstalled) {
@@ -213,7 +210,7 @@ let WalkthroughsService = class WalkthroughsService extends Disposable {
213
210
  sectionToOpenIndex = index;
214
211
  }
215
212
  }
216
- const steps = ( (walkthrough.steps ?? []).map((step, index) => {
213
+ const steps = ( ((walkthrough.steps ?? []).map((step, index) => {
217
214
  const description = parseDescription(step.description || '');
218
215
  const fullyQualifiedID = extension.identifier.value + '#' + walkthrough.id + '#' + step.id;
219
216
  let media;
@@ -243,7 +240,7 @@ let WalkthroughsService = class WalkthroughsService extends Disposable {
243
240
  };
244
241
  }
245
242
  else {
246
- throw new Error('Unknown walkthrough format detected for ' + fullyQualifiedID);
243
+ throw ( (new Error('Unknown walkthrough format detected for ' + fullyQualifiedID)));
247
244
  }
248
245
  return ({
249
246
  description,
@@ -255,11 +252,11 @@ let WalkthroughsService = class WalkthroughsService extends Disposable {
255
252
  category: categoryID,
256
253
  order: index,
257
254
  });
258
- }));
255
+ })));
259
256
  let isFeatured = false;
260
257
  if (walkthrough.featuredFor) {
261
- const folders = ( this.workspaceContextService.getWorkspace().folders.map(f => f.uri));
262
- const token = ( new CancellationTokenSource());
258
+ const folders = ( (this.workspaceContextService.getWorkspace().folders.map(f => f.uri)));
259
+ const token = ( (new CancellationTokenSource()));
263
260
  setTimeout(() => token.cancel(), 2000);
264
261
  isFeatured = await this.instantiationService.invokeFunction(a => checkGlobFileExists(a, folders, walkthrough.featuredFor, token.token));
265
262
  }
@@ -275,7 +272,7 @@ let WalkthroughsService = class WalkthroughsService extends Disposable {
275
272
  icon: {
276
273
  type: 'image',
277
274
  path: iconStr
278
- ? ( FileAccess.uriToBrowserUri(joinPath(extension.extensionLocation, iconStr)).toString(true))
275
+ ? ( (FileAccess.uriToBrowserUri(joinPath(extension.extensionLocation, iconStr)).toString(true)))
279
276
  : getDefaultIconPath()
280
277
  },
281
278
  when: ContextKeyExpr.deserialize(override ?? walkthrough.when) ?? ContextKeyExpr.true(),
@@ -311,8 +308,8 @@ let WalkthroughsService = class WalkthroughsService extends Disposable {
311
308
  return this.resolveWalkthrough(walkthrough);
312
309
  }
313
310
  getWalkthroughs() {
314
- const registeredCategories = [...( this.gettingStartedContributions.values())];
315
- const categoriesWithCompletion = ( ( registeredCategories
311
+ const registeredCategories = [...( (this.gettingStartedContributions.values()))];
312
+ const categoriesWithCompletion = ( (( (registeredCategories
316
313
  .map(category => {
317
314
  return {
318
315
  ...category,
@@ -321,26 +318,26 @@ let WalkthroughsService = class WalkthroughsService extends Disposable {
321
318
  steps: category.steps
322
319
  }
323
320
  };
324
- }))
321
+ })))
325
322
  .filter(category => category.content.type !== 'steps' || category.content.steps.length)
326
- .map(category => this.resolveWalkthrough(category)));
323
+ .map(category => this.resolveWalkthrough(category))));
327
324
  return categoriesWithCompletion;
328
325
  }
329
326
  resolveWalkthrough(category) {
330
- const stepsWithProgress = ( category.steps.map(step => this.getStepProgress(step)));
327
+ const stepsWithProgress = ( (category.steps.map(step => this.getStepProgress(step))));
331
328
  const hasOpened = this.metadata.get(category.id)?.manaullyOpened;
332
329
  const firstSeenDate = this.metadata.get(category.id)?.firstSeen;
333
- const isNew = firstSeenDate && firstSeenDate > (+( new Date()) - NEW_WALKTHROUGH_TIME);
330
+ const isNew = firstSeenDate && firstSeenDate > (+( (new Date())) - NEW_WALKTHROUGH_TIME);
334
331
  const lastStepIDs = this.metadata.get(category.id)?.stepIDs;
335
332
  const rawCategory = this.gettingStartedContributions.get(category.id);
336
333
  if (!rawCategory) {
337
334
  throw Error('Could not find walkthrough with id ' + category.id);
338
335
  }
339
- const currentStepIds = ( rawCategory.steps.map(s => s.id));
340
- const hasNewSteps = lastStepIDs && (currentStepIds.length !== lastStepIDs.length || ( currentStepIds.some((id, index) => id !== lastStepIDs[index])));
336
+ const currentStepIds = ( (rawCategory.steps.map(s => s.id)));
337
+ const hasNewSteps = lastStepIDs && (currentStepIds.length !== lastStepIDs.length || ( (currentStepIds.some((id, index) => id !== lastStepIDs[index]))));
341
338
  let recencyBonus = 0;
342
339
  if (firstSeenDate) {
343
- const currentDate = +( new Date());
340
+ const currentDate = +( (new Date()));
344
341
  const timeSinceFirstSeen = currentDate - firstSeenDate;
345
342
  recencyBonus = Math.max(0, (NEW_WALKTHROUGH_TIME - timeSinceFirstSeen) / NEW_WALKTHROUGH_TIME);
346
343
  }
@@ -378,7 +375,7 @@ let WalkthroughsService = class WalkthroughsService extends Disposable {
378
375
  this._onDidProgressStep.fire(this.getStepProgress(step));
379
376
  }
380
377
  progressByEvent(event) {
381
- if (( this.sessionEvents.has(event))) {
378
+ if (( (this.sessionEvents.has(event)))) {
382
379
  return;
383
380
  }
384
381
  this.sessionEvents.add(event);
@@ -387,7 +384,7 @@ let WalkthroughsService = class WalkthroughsService extends Disposable {
387
384
  registerWalkthrough(walkthoughDescriptor) {
388
385
  this._registerWalkthrough({
389
386
  ...walkthoughDescriptor,
390
- steps: ( walkthoughDescriptor.steps.map(step => ({ ...step, description: parseDescription(step.description) })))
387
+ steps: ( (walkthoughDescriptor.steps.map(step => ({ ...step, description: parseDescription(step.description) }))))
391
388
  });
392
389
  }
393
390
  _registerWalkthrough(walkthroughDescriptor) {
@@ -398,14 +395,14 @@ let WalkthroughsService = class WalkthroughsService extends Disposable {
398
395
  }
399
396
  this.gettingStartedContributions.set(walkthroughDescriptor.id, walkthroughDescriptor);
400
397
  walkthroughDescriptor.steps.forEach(step => {
401
- if (( this.steps.has(step.id))) {
398
+ if (( (this.steps.has(step.id)))) {
402
399
  throw Error('Attempting to register step with id ' + step.id + ' twice. Second is dropped.');
403
400
  }
404
401
  this.steps.set(step.id, step);
405
- ( step.when.keys()).forEach(key => this.categoryVisibilityContextKeys.add(key));
402
+ ( (step.when.keys())).forEach(key => this.categoryVisibilityContextKeys.add(key));
406
403
  this.registerDoneListeners(step);
407
404
  });
408
- ( walkthroughDescriptor.when.keys()).forEach(key => this.categoryVisibilityContextKeys.add(key));
405
+ ( (walkthroughDescriptor.when.keys())).forEach(key => this.categoryVisibilityContextKeys.add(key));
409
406
  }
410
407
  registerDoneListeners(step) {
411
408
  if (step.doneOn) {
@@ -413,9 +410,9 @@ let WalkthroughsService = class WalkthroughsService extends Disposable {
413
410
  return;
414
411
  }
415
412
  if (!step.completionEvents.length) {
416
- step.completionEvents = coalesce(flatten(( step.description
413
+ step.completionEvents = coalesce(flatten(( (step.description
417
414
  .filter(linkedText => linkedText.nodes.length === 1)
418
- .map(linkedText => ( linkedText.nodes
415
+ .map(linkedText => ( (linkedText.nodes
419
416
  .filter(((node) => typeof node !== 'string'))
420
417
  .map(({ href }) => {
421
418
  if (href.startsWith('command:')) {
@@ -425,7 +422,7 @@ let WalkthroughsService = class WalkthroughsService extends Disposable {
425
422
  return 'onLink:' + href;
426
423
  }
427
424
  return undefined;
428
- }))))));
425
+ }))))))));
429
426
  }
430
427
  if (!step.completionEvents.length) {
431
428
  step.completionEvents.push('stepSelected');
@@ -446,7 +443,7 @@ let WalkthroughsService = class WalkthroughsService extends Disposable {
446
443
  const expression = ContextKeyExpr.deserialize(argument);
447
444
  if (expression) {
448
445
  this.stepCompletionContextKeyExpressions.add(expression);
449
- ( expression.keys()).forEach(key => this.stepCompletionContextKeys.add(key));
446
+ ( (expression.keys())).forEach(key => this.stepCompletionContextKeys.add(key));
450
447
  event = eventType + ':' + expression.serialize();
451
448
  if (this.contextService.contextMatchesRules(expression)) {
452
449
  this.sessionEvents.add(event);
@@ -476,8 +473,8 @@ let WalkthroughsService = class WalkthroughsService extends Disposable {
476
473
  }
477
474
  }
478
475
  registerCompletionListener(event, step) {
479
- if (!( this.completionListeners.has(event))) {
480
- this.completionListeners.set(event, ( new Set()));
476
+ if (!( (this.completionListeners.has(event)))) {
477
+ this.completionListeners.set(event, ( (new Set())));
481
478
  }
482
479
  this.completionListeners.get(event)?.add(step.id);
483
480
  }
@@ -489,27 +486,27 @@ let WalkthroughsService = class WalkthroughsService extends Disposable {
489
486
  return step;
490
487
  }
491
488
  };
492
- WalkthroughsService = ( __decorate([
493
- ( __param(0, IStorageService)),
494
- ( __param(1, ICommandService)),
495
- ( __param(2, IInstantiationService)),
496
- ( __param(3, IWorkspaceContextService)),
497
- ( __param(4, IContextKeyService)),
498
- ( __param(5, IUserDataSyncEnablementService)),
499
- ( __param(6, IConfigurationService)),
500
- ( __param(7, IExtensionManagementService)),
501
- ( __param(8, IHostService)),
502
- ( __param(9, IViewsService)),
503
- ( __param(10, ITelemetryService)),
504
- ( __param(11, IWorkbenchAssignmentService))
505
- ], WalkthroughsService));
506
- const parseDescription = (desc) => ( desc.split('\n').filter(x => x).map(text => parseLinkedText(text)));
489
+ WalkthroughsService = ( (__decorate([
490
+ ( (__param(0, IStorageService))),
491
+ ( (__param(1, ICommandService))),
492
+ ( (__param(2, IInstantiationService))),
493
+ ( (__param(3, IWorkspaceContextService))),
494
+ ( (__param(4, IContextKeyService))),
495
+ ( (__param(5, IUserDataSyncEnablementService))),
496
+ ( (__param(6, IConfigurationService))),
497
+ ( (__param(7, IExtensionManagementService))),
498
+ ( (__param(8, IHostService))),
499
+ ( (__param(9, IViewsService))),
500
+ ( (__param(10, ITelemetryService))),
501
+ ( (__param(11, IWorkbenchAssignmentService)))
502
+ ], WalkthroughsService)));
503
+ const parseDescription = (desc) => ( (desc.split('\n').filter(x => x).map(text => parseLinkedText(text))));
507
504
  const convertInternalMediaPathToFileURI = (path) => path.startsWith('https://')
508
- ? ( URI.parse(path, true))
509
- : ( FileAccess.asFileUri(`vs/workbench/contrib/welcomeGettingStarted/common/media/${path}`));
505
+ ? ( (URI.parse(path, true)))
506
+ : ( (FileAccess.asFileUri(`vs/workbench/contrib/welcomeGettingStarted/common/media/${path}`)));
510
507
  const convertInternalMediaPathToBrowserURI = (path) => path.startsWith('https://')
511
- ? ( URI.parse(path, true))
512
- : ( FileAccess.asBrowserUri(`vs/workbench/contrib/welcomeGettingStarted/common/media/${path}`));
508
+ ? ( (URI.parse(path, true)))
509
+ : ( (FileAccess.asBrowserUri(`vs/workbench/contrib/welcomeGettingStarted/common/media/${path}`)));
513
510
  const convertInternalMediaPathsToBrowserURIs = (path) => {
514
511
  if (typeof path === 'string') {
515
512
  const converted = convertInternalMediaPathToBrowserURI(path);
@@ -23,6 +23,7 @@ import { localizeWithPath } from 'vscode/vscode/vs/nls';
23
23
  import { RegisteredEditorPriority } from 'vscode/vscode/vs/workbench/services/editor/common/editorResolverService';
24
24
  import { IEditorResolverService } from 'vscode/vscode/vs/workbench/services/editor/common/editorResolverService.service';
25
25
 
26
+ const _moduleId = "vs/workbench/contrib/welcomeGettingStarted/browser/startupPage";
26
27
  const restoreWalkthroughsConfigurationKey = 'workbench.welcomePage.restorableWalkthroughs';
27
28
  const configurationKey = 'workbench.startupEditor';
28
29
  const oldConfigurationKey = 'workbench.welcome.enabled';
@@ -33,11 +34,7 @@ let StartupPageEditorResolverContribution = class StartupPageEditorResolverContr
33
34
  this.instantiationService = instantiationService;
34
35
  editorResolverService.registerEditor(`${GettingStartedInput.RESOURCE.scheme}:/**`, {
35
36
  id: GettingStartedInput.ID,
36
- label: ( localizeWithPath(
37
- 'vs/workbench/contrib/welcomeGettingStarted/browser/startupPage',
38
- 'welcome.displayName',
39
- "Welcome Page"
40
- )),
37
+ label: ( localizeWithPath(_moduleId, 0, "Welcome Page")),
41
38
  priority: RegisteredEditorPriority.builtin,
42
39
  }, {
43
40
  singlePerResource: false,
@@ -55,10 +52,10 @@ let StartupPageEditorResolverContribution = class StartupPageEditorResolverContr
55
52
  });
56
53
  }
57
54
  };
58
- StartupPageEditorResolverContribution = ( __decorate([
59
- ( __param(0, IInstantiationService)),
60
- ( __param(1, IEditorResolverService))
61
- ], StartupPageEditorResolverContribution));
55
+ StartupPageEditorResolverContribution = ( (__decorate([
56
+ ( (__param(0, IInstantiationService))),
57
+ ( (__param(1, IEditorResolverService)))
58
+ ], StartupPageEditorResolverContribution)));
62
59
  let StartupPageRunnerContribution = class StartupPageRunnerContribution {
63
60
  static { this.ID = 'workbench.contrib.startupPageRunner'; }
64
61
  constructor(configurationService, editorService, workingCopyBackupService, fileService, contextService, lifecycleService, layoutService, productService, commandService, environmentService, storageService, logService, notificationService) {
@@ -126,7 +123,7 @@ let StartupPageRunnerContribution = class StartupPageRunnerContribution {
126
123
  else {
127
124
  const restoreData = JSON.parse(toRestore);
128
125
  const currentWorkspace = this.contextService.getWorkspace();
129
- if (restoreData.folder === UNKNOWN_EMPTY_WINDOW_WORKSPACE.id || restoreData.folder === ( currentWorkspace.folders[0].uri.toString())) {
126
+ if (restoreData.folder === UNKNOWN_EMPTY_WINDOW_WORKSPACE.id || restoreData.folder === ( (currentWorkspace.folders[0].uri.toString()))) {
130
127
  this.editorService.openEditor({
131
128
  resource: GettingStartedInput.RESOURCE,
132
129
  options: { selectedCategory: restoreData.category, selectedStep: restoreData.step, pinned: false },
@@ -138,10 +135,10 @@ let StartupPageRunnerContribution = class StartupPageRunnerContribution {
138
135
  return false;
139
136
  }
140
137
  async openReadme() {
141
- const readmes = coalesce(await Promise.all(( this.contextService.getWorkspace().folders.map(async (folder) => {
138
+ const readmes = coalesce(await Promise.all(( (this.contextService.getWorkspace().folders.map(async (folder) => {
142
139
  const folderUri = folder.uri;
143
140
  const folderStat = await this.fileService.resolve(folderUri).catch(onUnexpectedError);
144
- const files = folderStat?.children ? ( folderStat.children.map(child => child.name)).sort() : [];
141
+ const files = folderStat?.children ? ( (folderStat.children.map(child => child.name))).sort() : [];
145
142
  const file = files.find(file => file.toLowerCase() === 'readme.md') || files.find(file => file.toLowerCase().startsWith('readme'));
146
143
  if (file) {
147
144
  return joinPath(folderUri, file);
@@ -149,20 +146,20 @@ let StartupPageRunnerContribution = class StartupPageRunnerContribution {
149
146
  else {
150
147
  return undefined;
151
148
  }
152
- }))));
149
+ })))));
153
150
  if (!this.editorService.activeEditor) {
154
151
  if (readmes.length) {
155
152
  const isMarkDown = (readme) => readme.path.toLowerCase().endsWith('.md');
156
153
  await Promise.all([
157
154
  this.commandService.executeCommand('markdown.showPreview', null, readmes.filter(isMarkDown), { locked: true }).catch(error => {
158
155
  this.notificationService.error(( localizeWithPath(
159
- 'vs/workbench/contrib/welcomeGettingStarted/browser/startupPage',
160
- 'startupPage.markdownPreviewError',
156
+ _moduleId,
157
+ 1,
161
158
  'Could not open markdown preview: {0}.\n\nPlease make sure the markdown extension is enabled.',
162
159
  error.message
163
160
  )));
164
161
  }),
165
- this.editorService.openEditors(( readmes.filter(readme => !isMarkDown(readme)).map(readme => ({ resource: readme })))),
162
+ this.editorService.openEditors(( (readmes.filter(readme => !isMarkDown(readme)).map(readme => ({ resource: readme }))))),
166
163
  ]);
167
164
  }
168
165
  else {
@@ -173,7 +170,7 @@ let StartupPageRunnerContribution = class StartupPageRunnerContribution {
173
170
  async openGettingStarted(showTelemetryNotice) {
174
171
  const startupEditorTypeID = gettingStartedInputTypeId;
175
172
  const editor = this.editorService.activeEditor;
176
- if (editor?.typeId === startupEditorTypeID || ( this.editorService.editors.some(e => e.typeId === startupEditorTypeID))) {
173
+ if (editor?.typeId === startupEditorTypeID || ( (this.editorService.editors.some(e => e.typeId === startupEditorTypeID)))) {
177
174
  return;
178
175
  }
179
176
  const options = editor ? { pinned: false, index: 0 } : { pinned: false };
@@ -185,21 +182,21 @@ let StartupPageRunnerContribution = class StartupPageRunnerContribution {
185
182
  }
186
183
  }
187
184
  };
188
- StartupPageRunnerContribution = ( __decorate([
189
- ( __param(0, IConfigurationService)),
190
- ( __param(1, IEditorService)),
191
- ( __param(2, IWorkingCopyBackupService)),
192
- ( __param(3, IFileService)),
193
- ( __param(4, IWorkspaceContextService)),
194
- ( __param(5, ILifecycleService)),
195
- ( __param(6, IWorkbenchLayoutService)),
196
- ( __param(7, IProductService)),
197
- ( __param(8, ICommandService)),
198
- ( __param(9, IWorkbenchEnvironmentService)),
199
- ( __param(10, IStorageService)),
200
- ( __param(11, ILogService)),
201
- ( __param(12, INotificationService))
202
- ], StartupPageRunnerContribution));
185
+ StartupPageRunnerContribution = ( (__decorate([
186
+ ( (__param(0, IConfigurationService))),
187
+ ( (__param(1, IEditorService))),
188
+ ( (__param(2, IWorkingCopyBackupService))),
189
+ ( (__param(3, IFileService))),
190
+ ( (__param(4, IWorkspaceContextService))),
191
+ ( (__param(5, ILifecycleService))),
192
+ ( (__param(6, IWorkbenchLayoutService))),
193
+ ( (__param(7, IProductService))),
194
+ ( (__param(8, ICommandService))),
195
+ ( (__param(9, IWorkbenchEnvironmentService))),
196
+ ( (__param(10, IStorageService))),
197
+ ( (__param(11, ILogService))),
198
+ ( (__param(12, INotificationService)))
199
+ ], StartupPageRunnerContribution)));
203
200
  function isStartupPageEnabled(configurationService, contextService, environmentService) {
204
201
  if (environmentService.skipWelcome) {
205
202
  return false;