@codingame/monaco-vscode-keybindings-service-override 22.1.9 → 23.0.1

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.
@@ -18,7 +18,7 @@ export declare class CommandService extends Disposable implements ICommandServic
18
18
  readonly onDidExecuteCommand: Event<ICommandEvent>;
19
19
  constructor(_instantiationService: IInstantiationService, _extensionService: IExtensionService, _logService: ILogService);
20
20
  private _activateStar;
21
- executeCommand<T>(id: string, ...args: any[]): Promise<T>;
21
+ executeCommand<T>(id: string, ...args: unknown[]): Promise<T>;
22
22
  private _tryExecuteCommand;
23
23
  dispose(): void;
24
24
  }
@@ -50,39 +50,39 @@ import { getAllUnboundCommands } from '@codingame/monaco-vscode-d609a7d3-bf87-55
50
50
  var WorkbenchKeybindingService_1;
51
51
  function isValidContributedKeyBinding(keyBinding, rejects) {
52
52
  if (!keyBinding) {
53
- rejects.push(( localize(13599, "expected non-empty value.")));
53
+ rejects.push(( localize(13897, "expected non-empty value.")));
54
54
  return false;
55
55
  }
56
56
  if (typeof keyBinding.command !== 'string') {
57
57
  rejects.push(( localize(
58
- 13600,
58
+ 13898,
59
59
  "property `{0}` is mandatory and must be of type `string`",
60
60
  'command'
61
61
  )));
62
62
  return false;
63
63
  }
64
64
  if (keyBinding.key && typeof keyBinding.key !== 'string') {
65
- rejects.push(( localize(13601, "property `{0}` can be omitted or must be of type `string`", 'key')));
65
+ rejects.push(( localize(13899, "property `{0}` can be omitted or must be of type `string`", 'key')));
66
66
  return false;
67
67
  }
68
68
  if (keyBinding.when && typeof keyBinding.when !== 'string') {
69
- rejects.push(( localize(13601, "property `{0}` can be omitted or must be of type `string`", 'when')));
69
+ rejects.push(( localize(13899, "property `{0}` can be omitted or must be of type `string`", 'when')));
70
70
  return false;
71
71
  }
72
72
  if (keyBinding.mac && typeof keyBinding.mac !== 'string') {
73
- rejects.push(( localize(13601, "property `{0}` can be omitted or must be of type `string`", 'mac')));
73
+ rejects.push(( localize(13899, "property `{0}` can be omitted or must be of type `string`", 'mac')));
74
74
  return false;
75
75
  }
76
76
  if (keyBinding.linux && typeof keyBinding.linux !== 'string') {
77
77
  rejects.push(( localize(
78
- 13601,
78
+ 13899,
79
79
  "property `{0}` can be omitted or must be of type `string`",
80
80
  'linux'
81
81
  )));
82
82
  return false;
83
83
  }
84
84
  if (keyBinding.win && typeof keyBinding.win !== 'string') {
85
- rejects.push(( localize(13601, "property `{0}` can be omitted or must be of type `string`", 'win')));
85
+ rejects.push(( localize(13899, "property `{0}` can be omitted or must be of type `string`", 'win')));
86
86
  return false;
87
87
  }
88
88
  return true;
@@ -90,35 +90,36 @@ function isValidContributedKeyBinding(keyBinding, rejects) {
90
90
  const keybindingType = {
91
91
  type: 'object',
92
92
  default: { command: '', key: '' },
93
+ required: ['command', 'key'],
93
94
  properties: {
94
95
  command: {
95
- description: ( localize(13602, 'Identifier of the command to run when keybinding is triggered.')),
96
+ description: ( localize(13900, 'Identifier of the command to run when keybinding is triggered.')),
96
97
  type: 'string'
97
98
  },
98
99
  args: {
99
- description: ( localize(13603, "Arguments to pass to the command to execute."))
100
+ description: ( localize(13901, "Arguments to pass to the command to execute."))
100
101
  },
101
102
  key: {
102
103
  description: ( localize(
103
- 13604,
104
+ 13902,
104
105
  'Key or key sequence (separate keys with plus-sign and sequences with space, e.g. Ctrl+O and Ctrl+L L for a chord).'
105
106
  )),
106
107
  type: 'string'
107
108
  },
108
109
  mac: {
109
- description: ( localize(13605, 'Mac specific key or key sequence.')),
110
+ description: ( localize(13903, 'Mac specific key or key sequence.')),
110
111
  type: 'string'
111
112
  },
112
113
  linux: {
113
- description: ( localize(13606, 'Linux specific key or key sequence.')),
114
+ description: ( localize(13904, 'Linux specific key or key sequence.')),
114
115
  type: 'string'
115
116
  },
116
117
  win: {
117
- description: ( localize(13607, 'Windows specific key or key sequence.')),
118
+ description: ( localize(13905, 'Windows specific key or key sequence.')),
118
119
  type: 'string'
119
120
  },
120
121
  when: {
121
- description: ( localize(13608, 'Condition when the key is active.')),
122
+ description: ( localize(13906, 'Condition when the key is active.')),
122
123
  type: 'string'
123
124
  },
124
125
  }
@@ -127,7 +128,7 @@ const keybindingsExtPoint = ExtensionsRegistry.registerExtensionPoint({
127
128
  extensionPoint: 'keybindings',
128
129
  deps: [commandsExtensionPoint],
129
130
  jsonSchema: {
130
- description: ( localize(13609, "Contributes keybindings.")),
131
+ description: ( localize(13907, "Contributes keybindings.")),
131
132
  oneOf: [
132
133
  keybindingType,
133
134
  {
@@ -515,7 +516,7 @@ let WorkbenchKeybindingService = WorkbenchKeybindingService_1 = class WorkbenchK
515
516
  }
516
517
  if (rejects.length > 0) {
517
518
  collector.error(( localize(
518
- 13610,
519
+ 13908,
519
520
  "Invalid `contributes.{0}`: {1}",
520
521
  keybindingsExtPoint.name,
521
522
  rejects.join('\n')
@@ -603,7 +604,7 @@ let WorkbenchKeybindingService = WorkbenchKeybindingService_1 = class WorkbenchK
603
604
  static _getAllCommandsAsComment(boundCommands) {
604
605
  const unboundCommands = getAllUnboundCommands(boundCommands);
605
606
  const pretty = unboundCommands.sort().join('\n// - ');
606
- return '// ' + ( localize(13611, "Here are other available commands: ")) + '\n// - ' + pretty;
607
+ return '// ' + ( localize(13909, "Here are other available commands: ")) + '\n// - ' + pretty;
607
608
  }
608
609
  mightProducePrintableCharacter(event) {
609
610
  if (event.ctrlKey || event.metaKey || event.altKey) {
@@ -728,7 +729,7 @@ class KeybindingsJsonSchema {
728
729
  this.schema = {
729
730
  id: KeybindingsJsonSchema.schemaId,
730
731
  type: 'array',
731
- title: ( localize(13612, "Keybindings configuration")),
732
+ title: ( localize(13910, "Keybindings configuration")),
732
733
  allowTrailingCommas: true,
733
734
  allowComments: true,
734
735
  definitions: {
@@ -752,7 +753,7 @@ class KeybindingsJsonSchema {
752
753
  'type': 'string',
753
754
  'enum': this.commandsEnum,
754
755
  'enumDescriptions': this.commandsEnumDescriptions,
755
- 'description': ( localize(13613, "Name of the command to execute")),
756
+ 'description': ( localize(13911, "Name of the command to execute")),
756
757
  },
757
758
  'commandType': {
758
759
  'anyOf': [
@@ -763,7 +764,7 @@ class KeybindingsJsonSchema {
763
764
  'type': 'string',
764
765
  'enum': this.removalCommandsEnum,
765
766
  'enumDescriptions': this.commandsEnumDescriptions,
766
- 'description': ( localize(13614, "Name of the command to remove keyboard shortcut for")),
767
+ 'description': ( localize(13912, "Name of the command to remove keyboard shortcut for")),
767
768
  },
768
769
  {
769
770
  'type': 'string'
@@ -781,7 +782,7 @@ class KeybindingsJsonSchema {
781
782
  'properties': {
782
783
  'key': {
783
784
  'type': 'string',
784
- 'description': ( localize(13615, "Key or key sequence (separated by space)")),
785
+ 'description': ( localize(13913, "Key or key sequence (separated by space)")),
785
786
  },
786
787
  'command': {
787
788
  'anyOf': [
@@ -794,7 +795,7 @@ class KeybindingsJsonSchema {
794
795
  'type': 'array'
795
796
  },
796
797
  'errorMessage': ( localize(
797
- 13616,
798
+ 13914,
798
799
  "Incorrect type. Expected \"{0}\". The field 'command' does not support running multiple commands. Use command 'runCommands' to pass it multiple commands to run.",
799
800
  'string'
800
801
  ))
@@ -810,10 +811,10 @@ class KeybindingsJsonSchema {
810
811
  },
811
812
  'when': {
812
813
  'type': 'string',
813
- 'description': ( localize(13617, "Condition when the key is active."))
814
+ 'description': ( localize(13915, "Condition when the key is active."))
814
815
  },
815
816
  'args': {
816
- 'description': ( localize(13618, "Arguments to pass to the command to execute."))
817
+ 'description': ( localize(13916, "Arguments to pass to the command to execute."))
817
818
  }
818
819
  },
819
820
  '$ref': '#/definitions/commandsSchemas'
@@ -833,7 +834,9 @@ class KeybindingsJsonSchema {
833
834
  if (!( knownCommands.has(commandId))) {
834
835
  knownCommands.add(commandId);
835
836
  this.commandsEnum.push(commandId);
836
- this.commandsEnumDescriptions.push(isLocalizedString(description) ? description.value : description);
837
+ this.commandsEnumDescriptions.push(description === undefined
838
+ ? ''
839
+ : (isLocalizedString(description) ? description.value : description));
837
840
  this.removalCommandsEnum.push(`-${commandId}`);
838
841
  }
839
842
  }
@@ -483,12 +483,12 @@ const keyboardConfiguration = {
483
483
  'id': 'keyboard',
484
484
  'order': 15,
485
485
  'type': 'object',
486
- 'title': ( localize(13619, "Keyboard")),
486
+ 'title': ( localize(13917, "Keyboard")),
487
487
  'properties': {
488
488
  'keyboard.layout': {
489
489
  'type': 'string',
490
490
  'default': 'autodetect',
491
- 'description': ( localize(13620, "Control the keyboard layout used in web."))
491
+ 'description': ( localize(13918, "Control the keyboard layout used in web."))
492
492
  }
493
493
  }
494
494
  };