datagrok-tools 4.13.53 → 4.13.54

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/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Datagrok-tools changelog
2
2
 
3
+ ## 4.13.54 (2025-01-06)
4
+
5
+ ### Features
6
+
7
+ * Grok check regex update
8
+
9
+
3
10
  ## 4.13.53 (2025-01-06)
4
11
 
5
12
  ### Features
@@ -247,6 +247,7 @@ function checkFuncSignatures(packagePath, files) {
247
247
  var message = '';
248
248
  if (inputs.length !== 0) {
249
249
  value = false;
250
+ console.log(inputs);
250
251
  message += 'Viewer functions should take no arguments\n';
251
252
  }
252
253
  if (outputs.length > 1 || outputs.length === 1 && outputs[0].type !== 'viewer') {
@@ -369,7 +370,9 @@ function checkFuncSignatures(packagePath, files) {
369
370
  });
370
371
  if (roles.length > 1) warnings.push("File ".concat(file, ", function ").concat(f.name, ": several function roles are used (").concat(roles.join(', '), ")"));else if (roles.length === 1) {
371
372
  var vr = checkFunctions[roles[0]](f);
372
- if (!vr.value) warnings.push("File ".concat(file, ", function ").concat(f.name, ":\n").concat(vr.message));
373
+ if (!vr.value) {
374
+ warnings.push("File ".concat(file, ", function ").concat(f.name, ":\n").concat(vr.message));
375
+ }
373
376
  }
374
377
  if (f.isInvalidateOnWithoutCache) warnings.push("File ".concat(file, ", function ").concat(f.name, ": Can't use invalidateOn without cache, please follow this example: 'meta.cache.invalidateOn'"));
375
378
  if (f.cache) if (!utils.cahceValues.includes(f.cache)) warnings.push("File ".concat(file, ", function ").concat(f.name, ": unsupposed variable for cache : ").concat(f.cache));
@@ -630,6 +633,7 @@ function getFuncMetadata(script, fileExtention) {
630
633
  for (_iterator11.s(); !(_step11 = _iterator11.n()).done;) {
631
634
  var line = _step11.value;
632
635
  if (!line) continue;
636
+ if (data.name === 'MCL' || data.name === 'MCLClustering') console.log(line);
633
637
  //@ts-ignore
634
638
  var match = line.match(utils.fileParamRegex[fileExtention]);
635
639
  if (match) {
@@ -661,6 +665,7 @@ function getFuncMetadata(script, fileExtention) {
661
665
  if (isHeader) {
662
666
  var nm = line.match(utils.nameRegex);
663
667
  if (nm && !match) {
668
+ if (data.name === 'MCL' || data.name === 'MCLClustering') console.log(data);
664
669
  data.name = data.name || nm[1];
665
670
  funcData.push(data);
666
671
  data = {
@@ -261,7 +261,7 @@ var fileParamRegex = exports.fileParamRegex = {
261
261
  sql: new RegExp("^--\\s*((?:".concat(headerTags.join('|'), ")[^:]*): *([^\\s\\[\\{]+) ?([^\\s\\[\\{]+)?[^\\n]*$"))
262
262
  };
263
263
  var nameAnnRegex = exports.nameAnnRegex = /\/\/\s*(name[^:]*): ([^\n\r\[\{]+)/;
264
- var nameRegex = exports.nameRegex = /(?:|static|export\s+function|export\s+async\s+function)\s+([a-zA-Z_][a-zA-Z0-9_$]*)\s*\((.*?)\).*/;
264
+ var nameRegex = exports.nameRegex = /(?:|(?:static)(?:export )(?:async )function )\s+([a-zA-Z_][a-zA-Z0-9_$]*)\s*\((.*?).*/;
265
265
  var absUrlRegex = exports.absUrlRegex = new RegExp('^(?:[a-z+]+:)?//', 'i');
266
266
  function getScriptOutputType(script) {
267
267
  var comment = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '#';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "datagrok-tools",
3
- "version": "4.13.53",
3
+ "version": "4.13.54",
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": {