datagrok-tools 4.14.50 → 4.14.52
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.
|
@@ -150,7 +150,7 @@ function getFuncAnnotation(data, comment = '//', sep = '\n') {
|
|
|
150
150
|
const functionName = (input.options?.name ? input?.options?.name : ` ${input.name?.replaceAll('.', '')}`)?.trim();
|
|
151
151
|
|
|
152
152
|
// eslint-disable-next-line max-len
|
|
153
|
-
s += comment + 'input: ' + type + ' ' + functionName + (input.defaultValue !== undefined ? `= ${input.defaultValue}` : '') + ' ' + options
|
|
153
|
+
s += comment + 'input: ' + type + ' ' + functionName + (input.defaultValue !== undefined ? `= ${input.defaultValue}` : '') + ' ' + options + sep;
|
|
154
154
|
}
|
|
155
155
|
if (data.outputs) {
|
|
156
156
|
for (const output of data.outputs) {
|
|
@@ -188,7 +188,7 @@ function buildStringOfOptions(input) {
|
|
|
188
188
|
const optionsInString = [];
|
|
189
189
|
const opt = input.options ?? {};
|
|
190
190
|
let defaultValue = '';
|
|
191
|
-
if (opt['initialValue']) defaultValue =
|
|
191
|
+
if (opt['initialValue']) defaultValue = `= ${opt['initialValue']}`;
|
|
192
192
|
for (const [key, value] of Object.entries(opt)) {
|
|
193
193
|
if (key === 'initialValue') continue;
|
|
194
194
|
let val = value;
|
package/package.json
CHANGED
|
@@ -12,6 +12,7 @@ const {
|
|
|
12
12
|
typesToAnnotation,
|
|
13
13
|
dgAnnotationTypes,
|
|
14
14
|
decoratorOptionToAnnotation,
|
|
15
|
+
inputOptionsNames,
|
|
15
16
|
} = require('../bin/utils/func-generation');
|
|
16
17
|
|
|
17
18
|
const {api} = require('../bin/commands/api');
|
|
@@ -20,30 +21,6 @@ const baseImport = 'import * as DG from \'datagrok-api/dg\';\n';
|
|
|
20
21
|
// eslint-disable-next-line max-len
|
|
21
22
|
const annotationForGeneratedFile = `/**\nThis file is auto-generated by the webpack command.\nIf you notice any changes, please push them to the repository.\nDo not edit this file manually.\n*/\n`;
|
|
22
23
|
|
|
23
|
-
|
|
24
|
-
const inputOptionsNames = [
|
|
25
|
-
'semType',
|
|
26
|
-
'category',
|
|
27
|
-
'optional',
|
|
28
|
-
'editor',
|
|
29
|
-
'nullable',
|
|
30
|
-
'separators',
|
|
31
|
-
'choices',
|
|
32
|
-
'format',
|
|
33
|
-
'min',
|
|
34
|
-
'max',
|
|
35
|
-
'caption',
|
|
36
|
-
'description',
|
|
37
|
-
'initialValue',
|
|
38
|
-
'viewer',
|
|
39
|
-
'units',
|
|
40
|
-
'optionsType',
|
|
41
|
-
'step',
|
|
42
|
-
'meta.url',
|
|
43
|
-
'metaUrl',
|
|
44
|
-
];
|
|
45
|
-
|
|
46
|
-
|
|
47
24
|
class FuncGeneratorPlugin {
|
|
48
25
|
constructor(options = {outputPath: './src/package.g.ts'}) {
|
|
49
26
|
this.options = options;
|