@codingame/monaco-vscode-15626ec7-b165-51e1-8caf-7bcc2ae9b95a-common 12.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.
package/empty.js ADDED
@@ -0,0 +1 @@
1
+ export {}
package/package.json ADDED
@@ -0,0 +1,36 @@
1
+ {
2
+ "name": "@codingame/monaco-vscode-15626ec7-b165-51e1-8caf-7bcc2ae9b95a-common",
3
+ "version": "12.0.0",
4
+ "private": false,
5
+ "description": "VSCode public API plugged on the monaco editor - common package (explorer, files)",
6
+ "keywords": [],
7
+ "author": {
8
+ "name": "CodinGame",
9
+ "url": "http://www.codingame.com"
10
+ },
11
+ "license": "MIT",
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "git+ssh://git@github.com/CodinGame/monaco-vscode-api.git"
15
+ },
16
+ "type": "module",
17
+ "dependencies": {
18
+ "@codingame/monaco-vscode-2e67e044-0db9-5fa6-8bd1-3737a7d586d4-common": "12.0.0",
19
+ "vscode": "npm:@codingame/monaco-vscode-api@12.0.0"
20
+ },
21
+ "peerDependencies": {},
22
+ "peerDependenciesMeta": {},
23
+ "exports": {
24
+ ".": {
25
+ "default": "./empty.js"
26
+ },
27
+ "./vscode/*": {
28
+ "default": "./vscode/src/*.js",
29
+ "types": "./vscode/src/*.d.ts"
30
+ },
31
+ "./*": {
32
+ "default": "./*.js",
33
+ "types": "./*.d.ts"
34
+ }
35
+ }
36
+ }
@@ -0,0 +1,427 @@
1
+
2
+ import { isNative, isWeb } from 'vscode/vscode/vs/base/common/platform';
3
+ import { editorConfigurationBaseNode } from 'vscode/vscode/vs/editor/common/config/editorConfigurationSchema';
4
+ import { localize } from 'vscode/vscode/vs/nls';
5
+ import { Extensions, ConfigurationScope } from 'vscode/vscode/vs/platform/configuration/common/configurationRegistry';
6
+ import { HotExitConfiguration, FILES_EXCLUDE_CONFIG, FILES_ASSOCIATIONS_CONFIG, AutoSaveConfiguration, FILES_READONLY_INCLUDE_CONFIG, FILES_READONLY_EXCLUDE_CONFIG, FILES_READONLY_FROM_PERMISSIONS_CONFIG } from 'vscode/vscode/vs/platform/files/common/files';
7
+ import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
8
+ import { SUPPORTED_ENCODINGS, GUESSABLE_ENCODINGS } from '@codingame/monaco-vscode-2e67e044-0db9-5fa6-8bd1-3737a7d586d4-common/vscode/vs/workbench/services/textfile/common/encoding';
9
+
10
+ const configurationRegistry = ( Registry.as(Extensions.Configuration));
11
+ const hotExitConfiguration = isNative ?
12
+ {
13
+ 'type': 'string',
14
+ 'scope': ConfigurationScope.APPLICATION,
15
+ 'enum': [HotExitConfiguration.OFF, HotExitConfiguration.ON_EXIT, HotExitConfiguration.ON_EXIT_AND_WINDOW_CLOSE],
16
+ 'default': HotExitConfiguration.ON_EXIT,
17
+ 'markdownEnumDescriptions': [
18
+ ( localize(
19
+ 6546,
20
+ 'Disable hot exit. A prompt will show when attempting to close a window with editors that have unsaved changes.'
21
+ )),
22
+ ( localize(
23
+ 6547,
24
+ 'Hot exit will be triggered when the last window is closed on Windows/Linux or when the `workbench.action.quit` command is triggered (command palette, keybinding, menu). All windows without folders opened will be restored upon next launch. A list of previously opened windows with unsaved files can be accessed via `File > Open Recent > More...`'
25
+ )),
26
+ ( localize(
27
+ 6548,
28
+ 'Hot exit will be triggered when the last window is closed on Windows/Linux or when the `workbench.action.quit` command is triggered (command palette, keybinding, menu), and also for any window with a folder opened regardless of whether it\'s the last window. All windows without folders opened will be restored upon next launch. A list of previously opened windows with unsaved files can be accessed via `File > Open Recent > More...`'
29
+ ))
30
+ ],
31
+ 'markdownDescription': ( localize(
32
+ 6549,
33
+ "[Hot Exit](https://aka.ms/vscode-hot-exit) controls whether unsaved files are remembered between sessions, allowing the save prompt when exiting the editor to be skipped.",
34
+ HotExitConfiguration.ON_EXIT,
35
+ HotExitConfiguration.ON_EXIT_AND_WINDOW_CLOSE
36
+ ))
37
+ } : {
38
+ 'type': 'string',
39
+ 'scope': ConfigurationScope.APPLICATION,
40
+ 'enum': [HotExitConfiguration.OFF, HotExitConfiguration.ON_EXIT_AND_WINDOW_CLOSE],
41
+ 'default': HotExitConfiguration.ON_EXIT_AND_WINDOW_CLOSE,
42
+ 'markdownEnumDescriptions': [
43
+ ( localize(
44
+ 6546,
45
+ 'Disable hot exit. A prompt will show when attempting to close a window with editors that have unsaved changes.'
46
+ )),
47
+ ( localize(
48
+ 6550,
49
+ 'Hot exit will be triggered when the browser quits or the window or tab is closed.'
50
+ ))
51
+ ],
52
+ 'markdownDescription': ( localize(
53
+ 6549,
54
+ "[Hot Exit](https://aka.ms/vscode-hot-exit) controls whether unsaved files are remembered between sessions, allowing the save prompt when exiting the editor to be skipped.",
55
+ HotExitConfiguration.ON_EXIT,
56
+ HotExitConfiguration.ON_EXIT_AND_WINDOW_CLOSE
57
+ ))
58
+ };
59
+ configurationRegistry.registerConfiguration({
60
+ 'id': 'files',
61
+ 'order': 9,
62
+ 'title': ( localize(6551, "Files")),
63
+ 'type': 'object',
64
+ 'properties': {
65
+ [FILES_EXCLUDE_CONFIG]: {
66
+ 'type': 'object',
67
+ 'markdownDescription': ( localize(
68
+ 6552,
69
+ "Configure [glob patterns](https://aka.ms/vscode-glob-patterns) for excluding files and folders. For example, the File Explorer decides which files and folders to show or hide based on this setting. Refer to the `#search.exclude#` setting to define search-specific excludes. Refer to the `#explorer.excludeGitIgnore#` setting for ignoring files based on your `.gitignore`."
70
+ )),
71
+ 'default': {
72
+ ...{ '**/.git': true, '**/.svn': true, '**/.hg': true, '**/CVS': true, '**/.DS_Store': true, '**/Thumbs.db': true },
73
+ ...(isWeb ? { '**/*.crswap': true } : undefined)
74
+ },
75
+ 'scope': ConfigurationScope.RESOURCE,
76
+ 'additionalProperties': {
77
+ 'anyOf': [
78
+ {
79
+ 'type': 'boolean',
80
+ 'enum': [true, false],
81
+ 'enumDescriptions': [( localize(6553, "Enable the pattern.")), ( localize(6554, "Disable the pattern."))],
82
+ 'description': ( localize(
83
+ 6555,
84
+ "The glob pattern to match file paths against. Set to true or false to enable or disable the pattern."
85
+ )),
86
+ },
87
+ {
88
+ 'type': 'object',
89
+ 'properties': {
90
+ 'when': {
91
+ 'type': 'string',
92
+ 'pattern': '\\w*\\$\\(basename\\)\\w*',
93
+ 'default': '$(basename).ext',
94
+ 'markdownDescription': ( localize(
95
+ 6556,
96
+ "Additional check on the siblings of a matching file. Use \\$(basename) as variable for the matching file name."
97
+ ))
98
+ }
99
+ }
100
+ }
101
+ ]
102
+ }
103
+ },
104
+ [FILES_ASSOCIATIONS_CONFIG]: {
105
+ 'type': 'object',
106
+ 'markdownDescription': ( localize(
107
+ 6557,
108
+ "Configure [glob patterns](https://aka.ms/vscode-glob-patterns) of file associations to languages (for example `\"*.extension\": \"html\"`). Patterns will match on the absolute path of a file if they contain a path separator and will match on the name of the file otherwise. These have precedence over the default associations of the languages installed."
109
+ )),
110
+ 'additionalProperties': {
111
+ 'type': 'string'
112
+ }
113
+ },
114
+ 'files.encoding': {
115
+ 'type': 'string',
116
+ 'enum': ( Object.keys(SUPPORTED_ENCODINGS)),
117
+ 'default': 'utf8',
118
+ 'description': ( localize(
119
+ 6558,
120
+ "The default character set encoding to use when reading and writing files. This setting can also be configured per language."
121
+ )),
122
+ 'scope': ConfigurationScope.LANGUAGE_OVERRIDABLE,
123
+ 'enumDescriptions': ( ( Object.keys(SUPPORTED_ENCODINGS)).map(key => SUPPORTED_ENCODINGS[key].labelLong)),
124
+ 'enumItemLabels': ( ( Object.keys(SUPPORTED_ENCODINGS)).map(key => SUPPORTED_ENCODINGS[key].labelLong))
125
+ },
126
+ 'files.autoGuessEncoding': {
127
+ 'type': 'boolean',
128
+ 'default': false,
129
+ 'markdownDescription': ( localize(
130
+ 6559,
131
+ "When enabled, the editor will attempt to guess the character set encoding when opening files. This setting can also be configured per language. Note, this setting is not respected by text search. Only {0} is respected.",
132
+ '`#files.encoding#`'
133
+ )),
134
+ 'scope': ConfigurationScope.LANGUAGE_OVERRIDABLE
135
+ },
136
+ 'files.candidateGuessEncodings': {
137
+ 'type': 'array',
138
+ 'items': {
139
+ 'type': 'string',
140
+ 'enum': ( Object.keys(GUESSABLE_ENCODINGS)),
141
+ 'enumDescriptions': ( ( Object.keys(GUESSABLE_ENCODINGS)).map(key => GUESSABLE_ENCODINGS[key].labelLong))
142
+ },
143
+ 'default': [],
144
+ 'markdownDescription': ( localize(
145
+ 6560,
146
+ "List of character set encodings that the editor should attempt to guess in the order they are listed. In case it cannot be determined, {0} is respected",
147
+ '`#files.encoding#`'
148
+ )),
149
+ 'scope': ConfigurationScope.LANGUAGE_OVERRIDABLE
150
+ },
151
+ 'files.eol': {
152
+ 'type': 'string',
153
+ 'enum': [
154
+ '\n',
155
+ '\r\n',
156
+ 'auto'
157
+ ],
158
+ 'enumDescriptions': [
159
+ ( localize(6561, "LF")),
160
+ ( localize(6562, "CRLF")),
161
+ ( localize(6563, "Uses operating system specific end of line character."))
162
+ ],
163
+ 'default': 'auto',
164
+ 'description': ( localize(6564, "The default end of line character.")),
165
+ 'scope': ConfigurationScope.LANGUAGE_OVERRIDABLE
166
+ },
167
+ 'files.enableTrash': {
168
+ 'type': 'boolean',
169
+ 'default': true,
170
+ 'description': ( localize(
171
+ 6565,
172
+ "Moves files/folders to the OS trash (recycle bin on Windows) when deleting. Disabling this will delete files/folders permanently."
173
+ ))
174
+ },
175
+ 'files.trimTrailingWhitespace': {
176
+ 'type': 'boolean',
177
+ 'default': false,
178
+ 'description': ( localize(6566, "When enabled, will trim trailing whitespace when saving a file.")),
179
+ 'scope': ConfigurationScope.LANGUAGE_OVERRIDABLE
180
+ },
181
+ 'files.trimTrailingWhitespaceInRegexAndStrings': {
182
+ 'type': 'boolean',
183
+ 'default': true,
184
+ 'description': ( localize(
185
+ 6567,
186
+ "When enabled, trailing whitespace will be removed from multiline strings and regexes will be removed on save or when executing 'editor.action.trimTrailingWhitespace'. This can cause whitespace to not be trimmed from lines when there isn't up-to-date token information."
187
+ )),
188
+ 'scope': ConfigurationScope.LANGUAGE_OVERRIDABLE
189
+ },
190
+ 'files.insertFinalNewline': {
191
+ 'type': 'boolean',
192
+ 'default': false,
193
+ 'description': ( localize(
194
+ 6568,
195
+ "When enabled, insert a final new line at the end of the file when saving it."
196
+ )),
197
+ 'scope': ConfigurationScope.LANGUAGE_OVERRIDABLE
198
+ },
199
+ 'files.trimFinalNewlines': {
200
+ 'type': 'boolean',
201
+ 'default': false,
202
+ 'description': ( localize(
203
+ 6569,
204
+ "When enabled, will trim all new lines after the final new line at the end of the file when saving it."
205
+ )),
206
+ scope: ConfigurationScope.LANGUAGE_OVERRIDABLE,
207
+ },
208
+ 'files.autoSave': {
209
+ 'type': 'string',
210
+ 'enum': [AutoSaveConfiguration.OFF, AutoSaveConfiguration.AFTER_DELAY, AutoSaveConfiguration.ON_FOCUS_CHANGE, AutoSaveConfiguration.ON_WINDOW_CHANGE],
211
+ 'markdownEnumDescriptions': [
212
+ ( localize(6570, "An editor with changes is never automatically saved.")),
213
+ ( localize(
214
+ 6571,
215
+ "An editor with changes is automatically saved after the configured `#files.autoSaveDelay#`."
216
+ )),
217
+ ( localize(
218
+ 6572,
219
+ "An editor with changes is automatically saved when the editor loses focus."
220
+ )),
221
+ ( localize(
222
+ 6573,
223
+ "An editor with changes is automatically saved when the window loses focus."
224
+ ))
225
+ ],
226
+ 'default': isWeb ? AutoSaveConfiguration.AFTER_DELAY : AutoSaveConfiguration.OFF,
227
+ 'markdownDescription': ( localize(
228
+ 6574,
229
+ "Controls [auto save](https://code.visualstudio.com/docs/editor/codebasics#_save-auto-save) of editors that have unsaved changes.",
230
+ AutoSaveConfiguration.OFF,
231
+ AutoSaveConfiguration.AFTER_DELAY,
232
+ AutoSaveConfiguration.ON_FOCUS_CHANGE,
233
+ AutoSaveConfiguration.ON_WINDOW_CHANGE,
234
+ AutoSaveConfiguration.AFTER_DELAY
235
+ )),
236
+ scope: ConfigurationScope.LANGUAGE_OVERRIDABLE
237
+ },
238
+ 'files.autoSaveDelay': {
239
+ 'type': 'number',
240
+ 'default': 1000,
241
+ 'minimum': 0,
242
+ 'markdownDescription': ( localize(
243
+ 6575,
244
+ "Controls the delay in milliseconds after which an editor with unsaved changes is saved automatically. Only applies when `#files.autoSave#` is set to `{0}`.",
245
+ AutoSaveConfiguration.AFTER_DELAY
246
+ )),
247
+ scope: ConfigurationScope.LANGUAGE_OVERRIDABLE
248
+ },
249
+ 'files.autoSaveWorkspaceFilesOnly': {
250
+ 'type': 'boolean',
251
+ 'default': false,
252
+ 'markdownDescription': ( localize(
253
+ 6576,
254
+ "When enabled, will limit [auto save](https://code.visualstudio.com/docs/editor/codebasics#_save-auto-save) of editors to files that are inside the opened workspace. Only applies when {0} is enabled.",
255
+ '`#files.autoSave#`'
256
+ )),
257
+ scope: ConfigurationScope.LANGUAGE_OVERRIDABLE
258
+ },
259
+ 'files.autoSaveWhenNoErrors': {
260
+ 'type': 'boolean',
261
+ 'default': false,
262
+ 'markdownDescription': ( localize(
263
+ 6577,
264
+ "When enabled, will limit [auto save](https://code.visualstudio.com/docs/editor/codebasics#_save-auto-save) of editors to files that have no errors reported in them at the time the auto save is triggered. Only applies when {0} is enabled.",
265
+ '`#files.autoSave#`'
266
+ )),
267
+ scope: ConfigurationScope.LANGUAGE_OVERRIDABLE
268
+ },
269
+ 'files.watcherExclude': {
270
+ 'type': 'object',
271
+ 'patternProperties': {
272
+ '.*': { 'type': 'boolean' }
273
+ },
274
+ 'default': { '**/.git/objects/**': true, '**/.git/subtree-cache/**': true, '**/.hg/store/**': true },
275
+ 'markdownDescription': ( localize(
276
+ 6578,
277
+ "Configure paths or [glob patterns](https://aka.ms/vscode-glob-patterns) to exclude from file watching. Paths can either be relative to the watched folder or absolute. Glob patterns are matched relative from the watched folder. When you experience the file watcher process consuming a lot of CPU, make sure to exclude large folders that are of less interest (such as build output folders)."
278
+ )),
279
+ 'scope': ConfigurationScope.RESOURCE
280
+ },
281
+ 'files.watcherInclude': {
282
+ 'type': 'array',
283
+ 'items': {
284
+ 'type': 'string'
285
+ },
286
+ 'default': [],
287
+ 'description': ( localize(
288
+ 6579,
289
+ "Configure extra paths to watch for changes inside the workspace. By default, all workspace folders will be watched recursively, except for folders that are symbolic links. You can explicitly add absolute or relative paths to support watching folders that are symbolic links. Relative paths will be resolved to an absolute path using the currently opened workspace."
290
+ )),
291
+ 'scope': ConfigurationScope.RESOURCE
292
+ },
293
+ 'files.hotExit': hotExitConfiguration,
294
+ 'files.defaultLanguage': {
295
+ 'type': 'string',
296
+ 'markdownDescription': ( localize(
297
+ 6580,
298
+ "The default language identifier that is assigned to new files. If configured to `${activeEditorLanguage}`, will use the language identifier of the currently active text editor if any."
299
+ ))
300
+ },
301
+ [FILES_READONLY_INCLUDE_CONFIG]: {
302
+ 'type': 'object',
303
+ 'patternProperties': {
304
+ '.*': { 'type': 'boolean' }
305
+ },
306
+ 'default': {},
307
+ 'markdownDescription': ( localize(
308
+ 6581,
309
+ "Configure paths or [glob patterns](https://aka.ms/vscode-glob-patterns) to mark as read-only. Glob patterns are always evaluated relative to the path of the workspace folder unless they are absolute paths. You can exclude matching paths via the `#files.readonlyExclude#` setting. Files from readonly file system providers will always be read-only independent of this setting."
310
+ )),
311
+ 'scope': ConfigurationScope.RESOURCE
312
+ },
313
+ [FILES_READONLY_EXCLUDE_CONFIG]: {
314
+ 'type': 'object',
315
+ 'patternProperties': {
316
+ '.*': { 'type': 'boolean' }
317
+ },
318
+ 'default': {},
319
+ 'markdownDescription': ( localize(
320
+ 6582,
321
+ "Configure paths or [glob patterns](https://aka.ms/vscode-glob-patterns) to exclude from being marked as read-only if they match as a result of the `#files.readonlyInclude#` setting. Glob patterns are always evaluated relative to the path of the workspace folder unless they are absolute paths. Files from readonly file system providers will always be read-only independent of this setting."
322
+ )),
323
+ 'scope': ConfigurationScope.RESOURCE
324
+ },
325
+ [FILES_READONLY_FROM_PERMISSIONS_CONFIG]: {
326
+ 'type': 'boolean',
327
+ 'markdownDescription': ( localize(
328
+ 6583,
329
+ "Marks files as read-only when their file permissions indicate as such. This can be overridden via `#files.readonlyInclude#` and `#files.readonlyExclude#` settings."
330
+ )),
331
+ 'default': false
332
+ },
333
+ 'files.restoreUndoStack': {
334
+ 'type': 'boolean',
335
+ 'description': ( localize(6584, "Restore the undo stack when a file is reopened.")),
336
+ 'default': true
337
+ },
338
+ 'files.saveConflictResolution': {
339
+ 'type': 'string',
340
+ 'enum': [
341
+ 'askUser',
342
+ 'overwriteFileOnDisk'
343
+ ],
344
+ 'enumDescriptions': [
345
+ ( localize(
346
+ 6585,
347
+ "Will refuse to save and ask for resolving the save conflict manually."
348
+ )),
349
+ ( localize(
350
+ 6586,
351
+ "Will resolve the save conflict by overwriting the file on disk with the changes in the editor."
352
+ ))
353
+ ],
354
+ 'description': ( localize(
355
+ 6587,
356
+ "A save conflict can occur when a file is saved to disk that was changed by another program in the meantime. To prevent data loss, the user is asked to compare the changes in the editor with the version on disk. This setting should only be changed if you frequently encounter save conflict errors and may result in data loss if used without caution."
357
+ )),
358
+ 'default': 'askUser',
359
+ 'scope': ConfigurationScope.LANGUAGE_OVERRIDABLE
360
+ },
361
+ 'files.dialog.defaultPath': {
362
+ 'type': 'string',
363
+ 'pattern': '^((\\/|\\\\\\\\|[a-zA-Z]:\\\\).*)?$',
364
+ 'patternErrorMessage': ( localize(
365
+ 6588,
366
+ "Default path for file dialogs must be an absolute path (e.g. C:\\\\myFolder or /myFolder)."
367
+ )),
368
+ 'description': ( localize(
369
+ 6589,
370
+ "Default path for file dialogs, overriding user's home path. Only used in the absence of a context-specific path, such as most recently opened file or folder."
371
+ )),
372
+ 'scope': ConfigurationScope.MACHINE
373
+ },
374
+ 'files.simpleDialog.enable': {
375
+ 'type': 'boolean',
376
+ 'description': ( localize(
377
+ 6590,
378
+ "Enables the simple file dialog for opening and saving files and folders. The simple file dialog replaces the system file dialog when enabled."
379
+ )),
380
+ 'default': false
381
+ },
382
+ 'files.participants.timeout': {
383
+ type: 'number',
384
+ default: 60000,
385
+ markdownDescription: ( localize(
386
+ 6591,
387
+ "Timeout in milliseconds after which file participants for create, rename, and delete are cancelled. Use `0` to disable participants."
388
+ )),
389
+ }
390
+ }
391
+ });
392
+ configurationRegistry.registerConfiguration({
393
+ ...editorConfigurationBaseNode,
394
+ properties: {
395
+ 'editor.formatOnSave': {
396
+ 'type': 'boolean',
397
+ 'markdownDescription': ( localize(
398
+ 6592,
399
+ "Format a file on save. A formatter must be available and the editor must not be shutting down. When {0} is set to `afterDelay`, the file will only be formatted when saved explicitly.",
400
+ '`#files.autoSave#`'
401
+ )),
402
+ 'scope': ConfigurationScope.LANGUAGE_OVERRIDABLE,
403
+ },
404
+ 'editor.formatOnSaveMode': {
405
+ 'type': 'string',
406
+ 'default': 'file',
407
+ 'enum': [
408
+ 'file',
409
+ 'modifications',
410
+ 'modificationsIfAvailable'
411
+ ],
412
+ 'enumDescriptions': [
413
+ ( localize(6593, "Format the whole file.")),
414
+ ( localize(6594, "Format modifications (requires source control).")),
415
+ ( localize(
416
+ 6595,
417
+ "Will attempt to format modifications only (requires source control). If source control can't be used, then the whole file will be formatted."
418
+ )),
419
+ ],
420
+ 'markdownDescription': ( localize(
421
+ 6596,
422
+ "Controls if format on save formats the whole file or only modifications. Only applies when `#editor.formatOnSave#` is enabled."
423
+ )),
424
+ 'scope': ConfigurationScope.LANGUAGE_OVERRIDABLE,
425
+ },
426
+ }
427
+ });