@codingame/monaco-editor-wrapper 4.0.0-monaco-update.3 → 4.0.0-monaco-update.5

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.
@@ -1,24 +1,24 @@
1
- {
2
- "type": "object",
3
- "properties": {
4
- "pgms": {
5
- "description": "List of main programs",
6
- "type": "array",
7
- "items": {
8
- "type": "object",
9
- "properties": {
10
- "program": {
11
- "type": "string",
12
- "description": "Name/Wildcard of file to be considered as main program (open code)"
13
- },
14
- "pgroup": {
15
- "type": "string",
16
- "description": "Name of processor group as defined in proc_grps.json"
17
- }
18
- },
19
- "required": ["program", "pgroup"]
20
- }
21
- }
22
- },
23
- "required": ["pgms"]
24
- }
1
+ {
2
+ "type": "object",
3
+ "properties": {
4
+ "pgms": {
5
+ "description": "List of main programs",
6
+ "type": "array",
7
+ "items": {
8
+ "type": "object",
9
+ "properties": {
10
+ "program": {
11
+ "type": "string",
12
+ "description": "Name/Wildcard of file to be considered as main program (open code)"
13
+ },
14
+ "pgroup": {
15
+ "type": "string",
16
+ "description": "Name of processor group as defined in proc_grps.json"
17
+ }
18
+ },
19
+ "required": ["program", "pgroup"]
20
+ }
21
+ }
22
+ },
23
+ "required": ["pgms"]
24
+ }
@@ -1,55 +1,55 @@
1
- {
2
- "type": "object",
3
- "properties": {
4
- "pgroups": {
5
- "description": "List of processor groups",
6
- "type": "array",
7
- "items": {
8
- "type": "object",
9
- "properties": {
10
- "name": {
11
- "type": "string",
12
- "description": "User-defined name of processor group"
13
- },
14
- "preprocessor": {
15
- "description": "Defines preprocessor passes for the open code.",
16
- "anyOf": [
17
- {
18
- "$ref": "preprocessor_entry.schema.json"
19
- },
20
- {
21
- "type": "array",
22
- "items": {
23
- "$ref": "preprocessor_entry.schema.json"
24
- }
25
- }
26
- ]
27
- },
28
- "libs": {
29
- "type": "array",
30
- "description": "List of folders that contain copybooks.",
31
- "items": {
32
- "type": "string"
33
- }
34
- },
35
- "copybook-extensions": {
36
- "type": "array",
37
- "description": "List of possible copybook file extensions.",
38
- "items": {
39
- "type": "string"
40
- }
41
- },
42
- "copybook-file-encoding": {
43
- "type": "string",
44
- "description": "Copybook file encoding."
45
- },
46
- "compiler-options": {
47
- "$ref": "compiler_options.schema.json"
48
- }
49
- }
50
- },
51
- "required": ["name"]
52
- }
53
- },
54
- "required": ["pgroups"]
55
- }
1
+ {
2
+ "type": "object",
3
+ "properties": {
4
+ "pgroups": {
5
+ "description": "List of processor groups",
6
+ "type": "array",
7
+ "items": {
8
+ "type": "object",
9
+ "properties": {
10
+ "name": {
11
+ "type": "string",
12
+ "description": "User-defined name of processor group"
13
+ },
14
+ "preprocessor": {
15
+ "description": "Defines preprocessor passes for the open code.",
16
+ "anyOf": [
17
+ {
18
+ "$ref": "preprocessor_entry.schema.json"
19
+ },
20
+ {
21
+ "type": "array",
22
+ "items": {
23
+ "$ref": "preprocessor_entry.schema.json"
24
+ }
25
+ }
26
+ ]
27
+ },
28
+ "libs": {
29
+ "type": "array",
30
+ "description": "List of folders that contain copybooks.",
31
+ "items": {
32
+ "type": "string"
33
+ }
34
+ },
35
+ "copybook-extensions": {
36
+ "type": "array",
37
+ "description": "List of possible copybook file extensions.",
38
+ "items": {
39
+ "type": "string"
40
+ }
41
+ },
42
+ "copybook-file-encoding": {
43
+ "type": "string",
44
+ "description": "Copybook file encoding."
45
+ },
46
+ "compiler-options": {
47
+ "$ref": "compiler_options.schema.json"
48
+ }
49
+ }
50
+ },
51
+ "required": ["name"]
52
+ }
53
+ },
54
+ "required": ["pgroups"]
55
+ }
@@ -2,9 +2,10 @@ import getMarkersServiceOverride from '@codingame/monaco-vscode-markers-service-
2
2
  import getOutputServiceOverride from '@codingame/monaco-vscode-output-service-override';
3
3
  import { registerServices } from '../services.js';
4
4
  import { registerWorkerLoader } from '../worker.js';
5
+ import { Worker as CrossOriginWorker } from '../tools/crossOriginWorker.js';
5
6
  import '@codingame/monaco-vscode-references-view-default-extension';
6
7
 
7
- registerWorkerLoader('outputLinkComputer', () => new Worker(new URL('@codingame/monaco-vscode-output-service-override/worker', import.meta.url)));
8
+ registerWorkerLoader('outputLinkComputer', () => new CrossOriginWorker(new URL('@codingame/monaco-vscode-output-service-override/worker', import.meta.url)));
8
9
  registerServices({
9
10
  ...getOutputServiceOverride(),
10
11
  ...getMarkersServiceOverride()
@@ -1,3 +1,3 @@
1
1
  import * as monaco from 'monaco-editor';
2
2
  export declare function updateKeybindings(bindingsJson: string): Promise<void>;
3
- export declare function updateEditorKeybindingsMode(editor: monaco.editor.IStandaloneCodeEditor, keyBindingsMode: "vim" | "classic" | "emacs" | undefined, statusBarElement: Element): monaco.IDisposable;
3
+ export declare function updateEditorKeybindingsMode(editor: monaco.editor.IStandaloneCodeEditor, keyBindingsMode: "classic" | "vim" | "emacs" | undefined, statusBarElement: Element): monaco.IDisposable;
package/dist/services.js CHANGED
@@ -15,6 +15,8 @@ import getEditorServiceOverride from '@codingame/monaco-vscode-editor-service-ov
15
15
  import getStorageServiceOverride from '@codingame/monaco-vscode-storage-service-override';
16
16
  import getLifecycleServiceOverride from '@codingame/monaco-vscode-lifecycle-service-override';
17
17
  import getQuickAccessServiceOverride from '@codingame/monaco-vscode-quickaccess-service-override';
18
+ import getLogServiceOverride from '@codingame/monaco-vscode-log-service-override';
19
+ import getWorkingCopyServiceOverride from '@codingame/monaco-vscode-working-copy-service-override';
18
20
  import { initialize as initialize$1, StandaloneServices, ILogService, LogLevel } from 'vscode/services';
19
21
  import * as monaco from 'monaco-editor';
20
22
  import { initFile } from './node_modules/@codingame/monaco-vscode-files-service-override/files.js';
@@ -36,6 +38,7 @@ function useGlobalPicker() {
36
38
  return _useGlobalPicker;
37
39
  }
38
40
  let services = {
41
+ ...getLogServiceOverride(),
39
42
  ...getExtensionServiceOverride(),
40
43
  ...getModelServiceOverride(),
41
44
  ...getDialogsServiceOverride(),
@@ -62,7 +65,8 @@ let services = {
62
65
  shouldUseGlobalPicker() {
63
66
  return useGlobalPicker();
64
67
  }
65
- })
68
+ }),
69
+ ...getWorkingCopyServiceOverride()
66
70
  };
67
71
  function registerServices(newServices) {
68
72
  services = {
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Cross origin workers don't work
3
+ * The workaround used by vscode is to start a worker on a blob url containing a short script calling 'importScripts'
4
+ * importScripts accepts to load the code inside the blob worker
5
+ */
6
+ declare class CrossOriginWorker extends Worker {
7
+ constructor(url: string | URL, options?: WorkerOptions);
8
+ }
9
+ export { CrossOriginWorker as Worker };
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Cross origin workers don't work
3
+ * The workaround used by vscode is to start a worker on a blob url containing a short script calling 'importScripts'
4
+ * importScripts accepts to load the code inside the blob worker
5
+ */
6
+ class CrossOriginWorker extends Worker {
7
+ constructor(url, options = {}) {
8
+ const fullUrl = new URL(url, window.location.href).href;
9
+ const js = options.type === 'module' ? `import '${fullUrl}';` : `importScripts('${fullUrl}');`;
10
+ const blob = new Blob([js], { type: 'application/javascript' });
11
+ super(URL.createObjectURL(blob), options);
12
+ }
13
+ }
14
+
15
+ export { CrossOriginWorker as Worker };
package/dist/worker.d.ts CHANGED
@@ -1,2 +1,3 @@
1
+ import { Worker } from './tools/crossOriginWorker';
1
2
  export type WorkerLoader = () => Worker;
2
3
  export declare function registerWorkerLoader(label: string, workerLoader: WorkerLoader): void;
package/dist/worker.js CHANGED
@@ -1,7 +1,9 @@
1
+ import { Worker as CrossOriginWorker } from './tools/crossOriginWorker.js';
2
+
1
3
  const workerLoaders = {
2
- editorWorkerService: () => new Worker(new URL('monaco-editor/esm/vs/editor/editor.worker', import.meta.url)),
3
- textMateWorker: () => new Worker(new URL('@codingame/monaco-vscode-textmate-service-override/worker', import.meta.url)),
4
- languageDetectionWorkerService: () => new Worker(new URL('@codingame/monaco-vscode-language-detection-worker-service-override/worker', import.meta.url))
4
+ editorWorkerService: () => new CrossOriginWorker(new URL('monaco-editor/esm/vs/editor/editor.worker', import.meta.url)),
5
+ textMateWorker: () => new CrossOriginWorker(new URL('@codingame/monaco-vscode-textmate-service-override/worker', import.meta.url)),
6
+ languageDetectionWorkerService: () => new CrossOriginWorker(new URL('@codingame/monaco-vscode-language-detection-worker-service-override/worker', import.meta.url))
5
7
  };
6
8
  function registerWorkerLoader(label, workerLoader) {
7
9
  workerLoaders[label] = workerLoader;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codingame/monaco-editor-wrapper",
3
- "version": "4.0.0-monaco-update.3",
3
+ "version": "4.0.0-monaco-update.5",
4
4
  "private": false,
5
5
  "description": "Enhanced Monaco editor with TextMate grammars and more",
6
6
  "scripts": {
@@ -94,6 +94,7 @@
94
94
  "@codingame/monaco-vscode-language-detection-worker-service-override": "~2.0.0",
95
95
  "@codingame/monaco-vscode-languages-service-override": "~2.0.0",
96
96
  "@codingame/monaco-vscode-lifecycle-service-override": "~2.0.0",
97
+ "@codingame/monaco-vscode-log-service-override": "^2.0.1",
97
98
  "@codingame/monaco-vscode-lua-default-extension": "~2.0.0",
98
99
  "@codingame/monaco-vscode-markdown-basics-default-extension": "~2.0.0",
99
100
  "@codingame/monaco-vscode-markdown-language-features-default-extension": "~2.0.0",
@@ -130,6 +131,7 @@
130
131
  "@codingame/monaco-vscode-vb-default-extension": "~2.0.0",
131
132
  "@codingame/monaco-vscode-view-status-bar-service-override": "~2.0.0",
132
133
  "@codingame/monaco-vscode-views-service-override": "~2.0.0",
134
+ "@codingame/monaco-vscode-working-copy-service-override": "^2.0.1",
133
135
  "@codingame/monaco-vscode-xml-default-extension": "~2.0.0",
134
136
  "@codingame/monaco-vscode-yaml-default-extension": "~2.0.0",
135
137
  "monaco-editor": "npm:@codingame/monaco-vscode-editor-api@~2.0.0",