datagrok-tools 4.14.45 → 4.14.47
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.
|
@@ -463,7 +463,7 @@ function generateFunc(annotation, funcName, sep = '\n', className = '', inputs =
|
|
|
463
463
|
const funcArguments = inputs.map(e => e.name).join(', ');
|
|
464
464
|
const returnType = output ? primitives.has(output) ? !isAsync ? `: ${output} ` : `: Promise<${output}> ` : !isAsync ? `: any ` : `: Promise<any> ` : '';
|
|
465
465
|
// eslint-disable-next-line max-len
|
|
466
|
-
return sep + annotation + `export ${isAsync ? 'async ' : ''}function ${funcName}(${funcSigNature}) ${returnType}{${sep} ${output !== 'void' ? 'return ' : ''}${className.length > 0 ? `${className}.` : ''}${funcName}(${funcArguments});${sep}}${sep}`;
|
|
466
|
+
return sep + annotation + `export ${isAsync ? 'async ' : ''}function ${funcName}(${funcSigNature}) ${returnType}{${sep} ${output !== 'void' ? 'return ' : ''}${isAsync ? 'await ' : ''}${className.length > 0 ? `${className}.` : ''}${funcName}(${funcArguments});${sep}}${sep}`;
|
|
467
467
|
}
|
|
468
468
|
function generateImport(className, path, sep = '\n') {
|
|
469
469
|
return `import {${className}} from '${path}';${sep}`;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "datagrok-tools",
|
|
3
|
-
"version": "4.14.
|
|
3
|
+
"version": "4.14.47",
|
|
4
4
|
"description": "Utility to upload and publish packages to Datagrok",
|
|
5
5
|
"homepage": "https://github.com/datagrok-ai/public/tree/master/tools#readme",
|
|
6
6
|
"dependencies": {
|
|
@@ -31,8 +31,7 @@
|
|
|
31
31
|
"link": "npm link",
|
|
32
32
|
"prepublishOnly": "babel bin --extensions .ts -d bin",
|
|
33
33
|
"babel": "babel bin --extensions .ts -d bin",
|
|
34
|
-
"build": "babel bin --extensions .ts -d bin"
|
|
35
|
-
"debug-source-map": "babel bin --extensions .ts -d bin --source-maps true"
|
|
34
|
+
"build": "babel bin --extensions .ts -d bin"
|
|
36
35
|
},
|
|
37
36
|
"bin": {
|
|
38
37
|
"datagrok-upload": "./bin/_deprecated/upload.js",
|
|
@@ -195,7 +195,13 @@ class FuncGeneratorPlugin {
|
|
|
195
195
|
else if (funcAnnotaionOptions.outputs?.length === 0)
|
|
196
196
|
actualType = 'void';
|
|
197
197
|
|
|
198
|
-
if (!funcAnnotaionOptions.name) funcAnnotaionOptions.name = identifierName;
|
|
198
|
+
// if (!funcAnnotaionOptions.name) funcAnnotaionOptions.name = identifierName;
|
|
199
|
+
|
|
200
|
+
console.log(funcName);
|
|
201
|
+
console.log(funcAnnotaionOptions.name);
|
|
202
|
+
if (funcAnnotaionOptions.name === funcName)
|
|
203
|
+
funcAnnotaionOptions.name = undefined;
|
|
204
|
+
|
|
199
205
|
functions.push(
|
|
200
206
|
reservedDecorators[name]['genFunc'](
|
|
201
207
|
getFuncAnnotation(funcAnnotaionOptions),
|