@kusto/monaco-kusto 3.2.4 → 3.2.7

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,224 +1,232 @@
1
- // This file gets bundled as is with monaco-kusto.
2
- // Everything that needs to be exposed to consumers should be typed here.
3
- // This means that all declarations here are duplicated from the actual definitions around the code.
4
- // TODO: think about turning this around - have all other code dependent on this file thus not needing the duplication.
5
- // this was done like this because that's the standard way all other monaco extensions work for some reason.
6
-
7
- declare module monaco.editor {
8
- export interface ICodeEditor {
9
- getCurrentCommandRange(cursorPosition: monaco.Position): monaco.Range;
10
- }
11
- }
12
-
13
- declare module monaco.languages.kusto {
14
- export interface LanguageSettings {
15
- includeControlCommands?: boolean;
16
- newlineAfterPipe?: boolean;
17
- openSuggestionDialogAfterPreviousSuggestionAccepted?: boolean;
18
- useIntellisenseV2?: boolean;
19
- useSemanticColorization?: boolean;
20
- useTokenColorization?: boolean;
21
- disabledCompletionItems?: string[];
22
- onDidProvideCompletionItems?: monaco.languages.kusto.OnDidProvideCompletionItems;
23
- enableHover?: boolean;
24
- }
25
-
26
- export interface LanguageServiceDefaults {
27
- readonly onDidChange: IEvent<LanguageServiceDefaults>;
28
- readonly languageSettings: LanguageSettings;
29
- /**
30
- * Configure language service settings.
31
- */
32
- setLanguageSettings(options: LanguageSettings): void;
33
-
34
- /**
35
- * Configure when the worker shuts down. By default that is 2mins.
36
- *
37
- * @param value The maximum idle time in milliseconds. Values less than one
38
- * mean never shut down.
39
- */
40
- setMaximumWorkerIdleTime(value: number): void;
41
- }
42
-
43
- export var kustoDefaults: LanguageServiceDefaults;
44
-
45
- export interface KustoWorker {
46
- /**
47
- * Sets an array of ambient parameters to be known by the language service.
48
- * Language service assumes that these parameters will be provided externaly when query gets executed and does
49
- * not error-out when they are being referenced in the query.
50
- * @param parameters the array of parameters
51
- */
52
- setParameter(parameters: ScalarParameter[]);
53
- setSchema(schema: Schema): Promise<void>;
54
- setSchemaFromShowSchema(
55
- schema: any,
56
- clusterConnectionString: string,
57
- databaseInContextName: string,
58
- globalParameters: ScalarParameter[]
59
- ): Promise<void>;
60
- normalizeSchema(
61
- schema: any,
62
- clusterConnectionString: string,
63
- databaseInContextName: string
64
- ): Promise<EngineSchema>;
65
- getCommandInContext(uri: string, cursorOffest: number): Promise<string | null>;
66
- getCommandAndLocationInContext(
67
- uri: string,
68
- offset: number
69
- ): Promise<{ text: string; range: monaco.Range } | null>;
70
- getCommandsInDocument(uri: string): Promise<{ absoluteStart: number; absoluteEnd: number; text: string }[]>;
71
- getClientDirective(
72
- text: string
73
- ): Promise<{ isClientDirective: boolean; directiveWithoutLeadingComments: string }>;
74
- getAdminCommand(text: string): Promise<{ isAdminCommand: boolean; adminCommandWithoutLeadingComments: string }>;
75
-
76
- /**
77
- * Get all declared query parameters declared in current block if any.
78
- */
79
- getQueryParams(uri: string, cursorOffest: number): Promise<{ name: string; type: string }[]>;
80
-
81
- /**
82
- * Get all the ambient parameters defind in global scope.
83
- * Ambient parameters are parameters that are not defined in the syntax such as in a query paramter declaration.
84
- * These are parameters that are injected from outside, usually by a UX application that would like to offer
85
- * the user intellisense for a symbol, without forcing them to write a query declaration statement.
86
- * Usually the same application injects the query declaration statement and the parameter values when
87
- * executing the query (so it will execute correctly)
88
- */
89
- getGlobalParams(uri: string): Promise<{ name: string; type: string }[]>;
90
- /**
91
- * Get the global parameters that are actually being referenced in query.
92
- * This is different from getQueryParams that will return the parameters declare using a query declaration
93
- * statement.
94
- * It is also different from getGlobalParams that will return all global parameters whether used or not.
95
- */
96
- getReferencedGlobalParams(uri: string): Promise<{ name: string; type: string }[]>;
97
-
98
- /**
99
- * Get visualization options in render command if present (null otherwise).
100
- */
101
- getRenderInfo(uri: string, cursorOffset: number): Promise<RenderInfo | null>;
102
- doDocumentFormat(uri: string): Promise<ls.TextEdit[]>;
103
- doRangeFormat(uri: string, range: ls.Range): Promise<ls.TextEdit[]>;
104
- doCurrentCommandFormat(uri: string, caretPosition: ls.Position): Promise<ls.TextEdit[]>;
105
- doValidation(uri: string, intervals: { start: number; end: number }[]): Promise<ls.Diagnostic[]>;
106
- }
107
-
108
- /**
109
- * A function that get a model Uri and returns a kusto worker that knows how to work
110
- * with that document.
111
- */
112
- export interface WorkerAccessor {
113
- (first: Uri, ...more: Uri[]): Promise<KustoWorker>;
114
- }
115
-
116
- export interface Column {
117
- name: string;
118
- type: string;
119
- docstring?: string;
120
- }
121
- export interface Table {
122
- name: string;
123
- columns: Column[];
124
- docstring?: string;
125
- }
126
- export interface ScalarParameter {
127
- name: string;
128
- type?: string;
129
- cslType?: string;
130
- cslDefaultValue?: string;
131
- }
132
-
133
- // an input parameter either be a scalar in which case it has a name, type and cslType, or it can be columnar, in which case
134
- // it will have a name, and a list of scalar types which are the column types.
135
- export type InputParameter = ScalarParameter & { columns?: ScalarParameter[] };
136
-
137
- export interface Function {
138
- name: string;
139
- body: string;
140
- docstring?: string;
141
- inputParameters: InputParameter[];
142
- }
143
- export interface Database {
144
- name: string;
145
- tables: Table[];
146
- functions: Function[];
147
- majorVersion: number;
148
- minorVersion: number;
149
- }
150
-
151
- export interface EngineSchema {
152
- clusterType: 'Engine';
153
- cluster: {
154
- connectionString: string;
155
- databases: Database[];
156
- };
157
- database: Database | undefined; // a reference to the database that's in current context.
158
- }
159
-
160
- export interface ClusterMangerSchema {
161
- clusterType: 'ClusterManager';
162
- accounts: string[];
163
- services: string[];
164
- connectionString: string;
165
- }
166
-
167
- export interface DataManagementSchema {
168
- clusterType: 'DataManagement';
169
- }
170
-
171
- export type Schema = EngineSchema | ClusterMangerSchema | DataManagementSchema;
172
-
173
- export var getKustoWorker: () => Promise<WorkerAccessor>;
174
-
175
- export declare type VisualizationType =
176
- | 'anomalychart'
177
- | 'areachart'
178
- | 'barchart'
179
- | 'columnchart'
180
- | 'ladderchart'
181
- | 'linechart'
182
- | 'piechart'
183
- | 'pivotchart'
184
- | 'scatterchart'
185
- | 'stackedareachart'
186
- | 'timechart'
187
- | 'table'
188
- | 'timeline'
189
- | 'timepivot'
190
- | 'card';
191
-
192
- export declare type Scale = 'linear' | 'log';
193
- export declare type LegendVisibility = 'visible' | 'hidden';
194
- export declare type YSplit = 'none' | 'axes' | 'panels';
195
- export declare type Kind = 'default' | 'unstacked' | 'stacked' | 'stacked100' | 'map';
196
-
197
- export interface RenderOptions {
198
- visualization?: VisualizationType;
199
- title?: string;
200
- xcolumn?: string;
201
- series?: string[];
202
- ycolumns?: string[];
203
- xtitle?: string;
204
- ytitle?: string;
205
- xaxis?: Scale;
206
- yaxis?: Scale;
207
- legend?: LegendVisibility;
208
- ySplit?: YSplit;
209
- accumulate?: boolean;
210
- kind?: Kind;
211
- anomalycolumns?: string[];
212
- ymin?: number;
213
- ymax?: number;
214
- }
215
-
216
- export interface RenderInfo {
217
- options: RenderOptions;
218
- location: { startOffset: number; endOffset: number };
219
- }
220
-
221
- export type RenderOptionKeys = keyof RenderOptions;
222
-
223
- export type OnDidProvideCompletionItems = (list: ls.CompletionList) => Promise<ls.CompletionList>;
224
- }
1
+ // This file gets bundled as is with monaco-kusto.
2
+ // Everything that needs to be exposed to consumers should be typed here.
3
+ // This means that all declarations here are duplicated from the actual definitions around the code.
4
+ // TODO: think about turning this around - have all other code dependent on this file thus not needing the duplication.
5
+ // this was done like this because that's the standard way all other monaco extensions work for some reason.
6
+
7
+ declare module monaco.editor {
8
+ export interface ICodeEditor {
9
+ getCurrentCommandRange(cursorPosition: monaco.Position): monaco.Range;
10
+ }
11
+ }
12
+
13
+ declare module monaco.languages.kusto {
14
+ export interface LanguageSettings {
15
+ includeControlCommands?: boolean;
16
+ newlineAfterPipe?: boolean;
17
+ openSuggestionDialogAfterPreviousSuggestionAccepted?: boolean;
18
+ useIntellisenseV2?: boolean;
19
+ useSemanticColorization?: boolean;
20
+ useTokenColorization?: boolean;
21
+ disabledCompletionItems?: string[];
22
+ onDidProvideCompletionItems?: monaco.languages.kusto.OnDidProvideCompletionItems;
23
+ enableHover?: boolean;
24
+ formatter?: FormatterOptions;
25
+ }
26
+
27
+ export interface FormatterOptions {
28
+ indentationSize?: number;
29
+ pipeOperatorStyle?: FormatterPlacementStyle;
30
+ }
31
+
32
+ export type FormatterPlacementStyle = 'None' | 'NewLine' | 'Smart';
33
+
34
+ export interface LanguageServiceDefaults {
35
+ readonly onDidChange: IEvent<LanguageServiceDefaults>;
36
+ readonly languageSettings: LanguageSettings;
37
+ /**
38
+ * Configure language service settings.
39
+ */
40
+ setLanguageSettings(options: LanguageSettings): void;
41
+
42
+ /**
43
+ * Configure when the worker shuts down. By default that is 2mins.
44
+ *
45
+ * @param value The maximum idle time in milliseconds. Values less than one
46
+ * mean never shut down.
47
+ */
48
+ setMaximumWorkerIdleTime(value: number): void;
49
+ }
50
+
51
+ export var kustoDefaults: LanguageServiceDefaults;
52
+
53
+ export interface KustoWorker {
54
+ /**
55
+ * Sets an array of ambient parameters to be known by the language service.
56
+ * Language service assumes that these parameters will be provided externaly when query gets executed and does
57
+ * not error-out when they are being referenced in the query.
58
+ * @param parameters the array of parameters
59
+ */
60
+ setParameter(parameters: ScalarParameter[]);
61
+ setSchema(schema: Schema): Promise<void>;
62
+ setSchemaFromShowSchema(
63
+ schema: any,
64
+ clusterConnectionString: string,
65
+ databaseInContextName: string,
66
+ globalParameters: ScalarParameter[]
67
+ ): Promise<void>;
68
+ normalizeSchema(
69
+ schema: any,
70
+ clusterConnectionString: string,
71
+ databaseInContextName: string
72
+ ): Promise<EngineSchema>;
73
+ getCommandInContext(uri: string, cursorOffest: number): Promise<string | null>;
74
+ getCommandAndLocationInContext(
75
+ uri: string,
76
+ offset: number
77
+ ): Promise<{ text: string; range: monaco.Range } | null>;
78
+ getCommandsInDocument(uri: string): Promise<{ absoluteStart: number; absoluteEnd: number; text: string }[]>;
79
+ getClientDirective(
80
+ text: string
81
+ ): Promise<{ isClientDirective: boolean; directiveWithoutLeadingComments: string }>;
82
+ getAdminCommand(text: string): Promise<{ isAdminCommand: boolean; adminCommandWithoutLeadingComments: string }>;
83
+
84
+ /**
85
+ * Get all declared query parameters declared in current block if any.
86
+ */
87
+ getQueryParams(uri: string, cursorOffest: number): Promise<{ name: string; type: string }[]>;
88
+
89
+ /**
90
+ * Get all the ambient parameters defind in global scope.
91
+ * Ambient parameters are parameters that are not defined in the syntax such as in a query paramter declaration.
92
+ * These are parameters that are injected from outside, usually by a UX application that would like to offer
93
+ * the user intellisense for a symbol, without forcing them to write a query declaration statement.
94
+ * Usually the same application injects the query declaration statement and the parameter values when
95
+ * executing the query (so it will execute correctly)
96
+ */
97
+ getGlobalParams(uri: string): Promise<{ name: string; type: string }[]>;
98
+ /**
99
+ * Get the global parameters that are actually being referenced in query.
100
+ * This is different from getQueryParams that will return the parameters declare using a query declaration
101
+ * statement.
102
+ * It is also different from getGlobalParams that will return all global parameters whether used or not.
103
+ */
104
+ getReferencedGlobalParams(uri: string): Promise<{ name: string; type: string }[]>;
105
+
106
+ /**
107
+ * Get visualization options in render command if present (null otherwise).
108
+ */
109
+ getRenderInfo(uri: string, cursorOffset: number): Promise<RenderInfo | null>;
110
+ doDocumentFormat(uri: string): Promise<ls.TextEdit[]>;
111
+ doRangeFormat(uri: string, range: ls.Range): Promise<ls.TextEdit[]>;
112
+ doCurrentCommandFormat(uri: string, caretPosition: ls.Position): Promise<ls.TextEdit[]>;
113
+ doValidation(uri: string, intervals: { start: number; end: number }[]): Promise<ls.Diagnostic[]>;
114
+ }
115
+
116
+ /**
117
+ * A function that get a model Uri and returns a kusto worker that knows how to work
118
+ * with that document.
119
+ */
120
+ export interface WorkerAccessor {
121
+ (first: Uri, ...more: Uri[]): Promise<KustoWorker>;
122
+ }
123
+
124
+ export interface Column {
125
+ name: string;
126
+ type: string;
127
+ docstring?: string;
128
+ }
129
+ export interface Table {
130
+ name: string;
131
+ columns: Column[];
132
+ docstring?: string;
133
+ }
134
+ export interface ScalarParameter {
135
+ name: string;
136
+ type?: string;
137
+ cslType?: string;
138
+ cslDefaultValue?: string;
139
+ }
140
+
141
+ // an input parameter either be a scalar in which case it has a name, type and cslType, or it can be columnar, in which case
142
+ // it will have a name, and a list of scalar types which are the column types.
143
+ export type InputParameter = ScalarParameter & { columns?: ScalarParameter[] };
144
+
145
+ export interface Function {
146
+ name: string;
147
+ body: string;
148
+ docstring?: string;
149
+ inputParameters: InputParameter[];
150
+ }
151
+ export interface Database {
152
+ name: string;
153
+ tables: Table[];
154
+ functions: Function[];
155
+ majorVersion: number;
156
+ minorVersion: number;
157
+ }
158
+
159
+ export interface EngineSchema {
160
+ clusterType: 'Engine';
161
+ cluster: {
162
+ connectionString: string;
163
+ databases: Database[];
164
+ };
165
+ database: Database | undefined; // a reference to the database that's in current context.
166
+ }
167
+
168
+ export interface ClusterMangerSchema {
169
+ clusterType: 'ClusterManager';
170
+ accounts: string[];
171
+ services: string[];
172
+ connectionString: string;
173
+ }
174
+
175
+ export interface DataManagementSchema {
176
+ clusterType: 'DataManagement';
177
+ }
178
+
179
+ export type Schema = EngineSchema | ClusterMangerSchema | DataManagementSchema;
180
+
181
+ export var getKustoWorker: () => Promise<WorkerAccessor>;
182
+
183
+ export declare type VisualizationType =
184
+ | 'anomalychart'
185
+ | 'areachart'
186
+ | 'barchart'
187
+ | 'columnchart'
188
+ | 'ladderchart'
189
+ | 'linechart'
190
+ | 'piechart'
191
+ | 'pivotchart'
192
+ | 'scatterchart'
193
+ | 'stackedareachart'
194
+ | 'timechart'
195
+ | 'table'
196
+ | 'timeline'
197
+ | 'timepivot'
198
+ | 'card';
199
+
200
+ export declare type Scale = 'linear' | 'log';
201
+ export declare type LegendVisibility = 'visible' | 'hidden';
202
+ export declare type YSplit = 'none' | 'axes' | 'panels';
203
+ export declare type Kind = 'default' | 'unstacked' | 'stacked' | 'stacked100' | 'map';
204
+
205
+ export interface RenderOptions {
206
+ visualization?: VisualizationType;
207
+ title?: string;
208
+ xcolumn?: string;
209
+ series?: string[];
210
+ ycolumns?: string[];
211
+ xtitle?: string;
212
+ ytitle?: string;
213
+ xaxis?: Scale;
214
+ yaxis?: Scale;
215
+ legend?: LegendVisibility;
216
+ ySplit?: YSplit;
217
+ accumulate?: boolean;
218
+ kind?: Kind;
219
+ anomalycolumns?: string[];
220
+ ymin?: number;
221
+ ymax?: number;
222
+ }
223
+
224
+ export interface RenderInfo {
225
+ options: RenderOptions;
226
+ location: { startOffset: number; endOffset: number };
227
+ }
228
+
229
+ export type RenderOptionKeys = keyof RenderOptions;
230
+
231
+ export type OnDidProvideCompletionItems = (list: ls.CompletionList) => Promise<ls.CompletionList>;
232
+ }
package/scripts/bundle.js CHANGED
@@ -1,65 +1,65 @@
1
- const requirejs = require('requirejs');
2
- const path = require('path');
3
- const fs = require('fs');
4
- const Terser = require("terser");
5
- const helpers = require('monaco-plugin-helpers');
6
-
7
- const REPO_ROOT = path.resolve(__dirname, '..');
8
-
9
- const sha1 = helpers.getGitVersion(REPO_ROOT);
10
- const semver = require('../package.json').version;
11
- const headerVersion = semver + '(' + sha1 + ')';
12
-
13
- const BUNDLED_FILE_HEADER = [
14
- '/*!-----------------------------------------------------------------------------',
15
- ' * Copyright (c) Microsoft Corporation. All rights reserved.',
16
- ' * monaco-kusto version: ' + headerVersion,
17
- ' * Released under the MIT license',
18
- ' * https://https://github.com/Azure/monaco-kusto/blob/master/README.md',
19
- ' *-----------------------------------------------------------------------------*/',
20
- ''
21
- ].join('\n');
22
-
23
- bundleOne('monaco.contribution', ['vs/language/kusto/kustoMode']),
24
- bundleOne('kustoMode'),
25
- bundleOne('kustoWorker')
26
-
27
- function bundleOne(moduleId, exclude) {
28
- requirejs.optimize({
29
- baseUrl: './',
30
- name: 'vs/language/kusto/' + moduleId,
31
- out: 'release/dev/' + moduleId + '.js',
32
- exclude: exclude,
33
- paths: {
34
- 'vs/language/kusto': REPO_ROOT + '/out/amd'
35
- },
36
- optimize: 'none',
37
- packages: [{
38
- name: 'vscode-languageserver-types',
39
- location: path.join(REPO_ROOT, '/node_modules/vscode-languageserver-types/lib/umd'),
40
- main: 'main'
41
- }, {
42
- name: 'xregexp',
43
- location: path.join(REPO_ROOT, '/node_modules/xregexp'),
44
- main: 'xregexp-all.js'
45
- }, {
46
- name: 'lodash',
47
- location: path.join(REPO_ROOT, '/node_modules/lodash'),
48
- main: 'lodash.min.js'
49
- }],
50
- }, function (buildResponse) {
51
- const devFilePath = path.join(REPO_ROOT, 'release/dev/' + moduleId + '.js');
52
- const minFilePath = path.join(REPO_ROOT, 'release/min/' + moduleId + '.js');
53
- const fileContents = fs.readFileSync(devFilePath).toString();
54
- console.log();
55
- console.log(`Minifying ${devFilePath}...`);
56
- const result = Terser.minify(fileContents, {
57
- output: {
58
- comments: 'some'
59
- }
60
- });
61
- console.log(`Done.`);
62
- try { fs.mkdirSync(path.join(REPO_ROOT, 'release/min')) } catch (err) { }
63
- fs.writeFileSync(minFilePath, BUNDLED_FILE_HEADER + result.code);
64
- })
65
- }
1
+ const requirejs = require('requirejs');
2
+ const path = require('path');
3
+ const fs = require('fs');
4
+ const Terser = require("terser");
5
+ const helpers = require('monaco-plugin-helpers');
6
+
7
+ const REPO_ROOT = path.resolve(__dirname, '..');
8
+
9
+ const sha1 = helpers.getGitVersion(REPO_ROOT);
10
+ const semver = require('../package.json').version;
11
+ const headerVersion = semver + '(' + sha1 + ')';
12
+
13
+ const BUNDLED_FILE_HEADER = [
14
+ '/*!-----------------------------------------------------------------------------',
15
+ ' * Copyright (c) Microsoft Corporation. All rights reserved.',
16
+ ' * monaco-kusto version: ' + headerVersion,
17
+ ' * Released under the MIT license',
18
+ ' * https://https://github.com/Azure/monaco-kusto/blob/master/README.md',
19
+ ' *-----------------------------------------------------------------------------*/',
20
+ ''
21
+ ].join('\n');
22
+
23
+ bundleOne('monaco.contribution', ['vs/language/kusto/kustoMode']),
24
+ bundleOne('kustoMode'),
25
+ bundleOne('kustoWorker')
26
+
27
+ function bundleOne(moduleId, exclude) {
28
+ requirejs.optimize({
29
+ baseUrl: './',
30
+ name: 'vs/language/kusto/' + moduleId,
31
+ out: 'release/dev/' + moduleId + '.js',
32
+ exclude: exclude,
33
+ paths: {
34
+ 'vs/language/kusto': REPO_ROOT + '/out/amd'
35
+ },
36
+ optimize: 'none',
37
+ packages: [{
38
+ name: 'vscode-languageserver-types',
39
+ location: path.join(REPO_ROOT, '/node_modules/vscode-languageserver-types/lib/umd'),
40
+ main: 'main'
41
+ }, {
42
+ name: 'xregexp',
43
+ location: path.join(REPO_ROOT, '/node_modules/xregexp'),
44
+ main: 'xregexp-all.js'
45
+ }, {
46
+ name: 'lodash',
47
+ location: path.join(REPO_ROOT, '/node_modules/lodash'),
48
+ main: 'lodash.min.js'
49
+ }],
50
+ }, function (buildResponse) {
51
+ const devFilePath = path.join(REPO_ROOT, 'release/dev/' + moduleId + '.js');
52
+ const minFilePath = path.join(REPO_ROOT, 'release/min/' + moduleId + '.js');
53
+ const fileContents = fs.readFileSync(devFilePath).toString();
54
+ console.log();
55
+ console.log(`Minifying ${devFilePath}...`);
56
+ const result = Terser.minify(fileContents, {
57
+ output: {
58
+ comments: 'some'
59
+ }
60
+ });
61
+ console.log(`Done.`);
62
+ try { fs.mkdirSync(path.join(REPO_ROOT, 'release/min')) } catch (err) { }
63
+ fs.writeFileSync(minFilePath, BUNDLED_FILE_HEADER + result.code);
64
+ })
65
+ }
@@ -1,26 +1,26 @@
1
- const path = require('path');
2
- const helpers = require('monaco-plugin-helpers');
3
-
4
- const REPO_ROOT = path.join(__dirname, '../');
5
-
6
- helpers.packageESM({
7
- repoRoot: REPO_ROOT,
8
- esmSource: 'out/esm',
9
- esmDestination: 'release/esm',
10
- entryPoints: [
11
- 'monaco.contribution.js',
12
- 'kustoMode.js',
13
- 'kusto.worker.js',
14
- ],
15
- resolveAlias: {
16
- },
17
- resolveSkip: [
18
- 'monaco-editor-core'
19
- ],
20
- destinationFolderSimplification: {
21
- 'node_modules': '_deps',
22
- 'vscode-languageserver-types/lib/esm': 'vscode-languageserver-types',
23
- '/node_modules/xregexp': 'xregexp',
24
- '/node_modules/lodash': 'lodash'
25
- }
1
+ const path = require('path');
2
+ const helpers = require('monaco-plugin-helpers');
3
+
4
+ const REPO_ROOT = path.join(__dirname, '../');
5
+
6
+ helpers.packageESM({
7
+ repoRoot: REPO_ROOT,
8
+ esmSource: 'out/esm',
9
+ esmDestination: 'release/esm',
10
+ entryPoints: [
11
+ 'monaco.contribution.js',
12
+ 'kustoMode.js',
13
+ 'kusto.worker.js',
14
+ ],
15
+ resolveAlias: {
16
+ },
17
+ resolveSkip: [
18
+ 'monaco-editor-core'
19
+ ],
20
+ destinationFolderSimplification: {
21
+ 'node_modules': '_deps',
22
+ 'vscode-languageserver-types/lib/esm': 'vscode-languageserver-types',
23
+ '/node_modules/xregexp': 'xregexp',
24
+ '/node_modules/lodash': 'lodash'
25
+ }
26
26
  });