datagrok-tools 4.14.24 → 4.14.25
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/bin/commands/check.js +11 -1
- package/bin/utils/utils.js +2 -1
- package/package.json +1 -1
package/bin/commands/check.js
CHANGED
|
@@ -40,7 +40,7 @@ function runChecks(packagePath, soft = false) {
|
|
|
40
40
|
path: packagePath,
|
|
41
41
|
ignoreFiles: ['.npmignore', '.gitignore']
|
|
42
42
|
}).filter(e => !e.includes('node_modules'));
|
|
43
|
-
const jsTsFiles = files.filter(f =>
|
|
43
|
+
const jsTsFiles = files.filter(f => (f.startsWith('src' + _path.default.sep) || f.startsWith('queries' + _path.default.sep) || f.startsWith('scripts' + _path.default.sep)) && (f.endsWith('.js') || f.endsWith('.ts') || f.endsWith('.sql') || f.endsWith('.py')));
|
|
44
44
|
const packageFiles = ['src/package.ts', 'src/detectors.ts', 'src/package.js', 'src/detectors.js', 'src/package-test.ts', 'src/package-test.js', 'package.js', 'detectors.js'];
|
|
45
45
|
// const funcFiles = jsTsFiles.filter((f) => packageFiles.includes(f));
|
|
46
46
|
const errors = [];
|
|
@@ -305,6 +305,7 @@ function checkFuncSignatures(packagePath, files) {
|
|
|
305
305
|
};
|
|
306
306
|
const functionRoles = Object.keys(checkFunctions);
|
|
307
307
|
for (const file of files) {
|
|
308
|
+
if (file.includes('.min.')) continue;
|
|
308
309
|
const content = _fs.default.readFileSync(_path.default.join(packagePath, file), {
|
|
309
310
|
encoding: 'utf-8'
|
|
310
311
|
});
|
|
@@ -557,6 +558,15 @@ function getFuncMetadata(script, fileExtention) {
|
|
|
557
558
|
}
|
|
558
559
|
if (isHeader) {
|
|
559
560
|
const nm = line.match(utils.nameRegex);
|
|
561
|
+
if (data.name === '') {
|
|
562
|
+
data = {
|
|
563
|
+
name: '',
|
|
564
|
+
inputs: [],
|
|
565
|
+
outputs: []
|
|
566
|
+
};
|
|
567
|
+
isHeader = false;
|
|
568
|
+
continue;
|
|
569
|
+
}
|
|
560
570
|
if (nm) data.name = nm[1]?.toLocaleLowerCase();
|
|
561
571
|
if (data.name && !match) {
|
|
562
572
|
funcData.push(data);
|
package/bin/utils/utils.js
CHANGED
|
@@ -180,7 +180,8 @@ const dgToTsTypeMap = exports.dgToTsTypeMap = {
|
|
|
180
180
|
column: 'DG.Column',
|
|
181
181
|
column_list: 'string[]',
|
|
182
182
|
file: 'DG.FileInfo',
|
|
183
|
-
view: 'DG.View'
|
|
183
|
+
view: 'DG.View',
|
|
184
|
+
void: 'void'
|
|
184
185
|
};
|
|
185
186
|
const propertyTypes = exports.propertyTypes = ['bool', 'int', 'double', 'string', 'datetime', 'object', 'column', 'dataframe', 'bitset', 'cell', 'string_list', 'map'];
|
|
186
187
|
const headerTags = exports.headerTags = ['name', 'description', 'help-url', 'input', 'output', 'tags', 'sample', 'language', 'returns', 'test', 'sidebar', 'condition', 'top-menu', 'environment', 'require', 'editor-for', 'schedule', 'reference', 'editor', 'meta', 'connection', 'friendlyName'];
|
package/package.json
CHANGED