datagrok-tools 4.14.62 → 4.14.64

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.
@@ -184,10 +184,10 @@ const recorderConfig = exports.recorderConfig = {
184
184
  async function loadPackages(packagesDir, packagesToLoad, host, skipPublish, skipBuild, linkPackage, release) {
185
185
  const packagesToRun = new Map();
186
186
  const hostString = host === undefined ? `` : `${host}`;
187
- if (packagesToLoad !== 'all') {
188
- for (const pacakgeName of (packagesToLoad ?? '').split(' ')) {
189
- if ((pacakgeName ?? '').length !== 0) packagesToRun.set((0, _utils.spaceToCamelCase)(pacakgeName).toLocaleLowerCase(), false);
190
- }
187
+ if (packagesToLoad && packagesToLoad !== 'all') {
188
+ const packageNames = packagesToLoad.split(' ').map(p => p.trim()).filter(p => p.length > 0);
189
+ if (skipPublish && skipBuild && !linkPackage) return packageNames;
190
+ for (const name of packageNames) packagesToRun.set((0, _utils.spaceToCamelCase)(name).toLowerCase(), false);
191
191
  }
192
192
  for (const dirName of _fs.default.readdirSync(packagesDir)) {
193
193
  const packageDir = _path.default.join(packagesDir, dirName);
@@ -218,8 +218,7 @@ async function loadPackages(packagesDir, packagesToLoad, host, skipPublish, skip
218
218
  }
219
219
  }
220
220
  console.log();
221
- return Array.from(packagesToRun).filter(([key, value]) => value === true).map(([key]) => key);
222
- ;
221
+ return Array.from(packagesToRun).filter(([_, value]) => value).map(([key, _]) => key);
223
222
  }
224
223
  async function loadTestsList(packages, core = false) {
225
224
  const packageTestsData = await timeout(async () => {
@@ -329,16 +328,18 @@ async function runTests(testsParams, stopOnFail) {
329
328
  let resultDF = undefined;
330
329
  let lastTest = null;
331
330
  let res = '';
332
-
333
- // function addColumn(columnName: string, column: any, df : any) {
334
- // if (!df.getCol(columnName))
335
- // df.columns.add(column);
336
- // }
337
-
338
331
  try {
339
332
  for (const testParam of testsParams) {
340
333
  lastTest = testParam;
341
334
  const df = await window.grok.functions.call(testParam.package + ':test', testParam.params);
335
+ if (!df.getCol('flaking')) {
336
+ const flakingCol = window.DG.Column.fromType(window.DG.COLUMN_TYPE.BOOL, 'flaking', df.rowCount);
337
+ df.columns.add(flakingCol);
338
+ }
339
+ if (!df.getCol('package')) {
340
+ const packageNameCol = window.DG.Column.fromList(window.DG.COLUMN_TYPE.STRING, 'package', Array(df.rowCount).fill(testParam.package));
341
+ df.columns.add(packageNameCol);
342
+ }
342
343
  df.columns.setOrder(['date', 'category', 'name', 'success', 'result', 'ms', 'skipped', 'logs', 'owner', 'package', 'widgetsDifference', 'flaking']);
343
344
  // addColumn('flaking', (<any>window).DG.Column.fromType((<any>window).DG.COLUMN_TYPE.BOOL, 'flaking', df.rowCount), df);
344
345
  // addColumn('package', (<any>window).DG.Column.fromType((<any>window).DG.COLUMN_TYPE.BOOL, 'flaking', df.rowCount), df);
@@ -347,7 +348,7 @@ async function runTests(testsParams, stopOnFail) {
347
348
  // df.columns.add(flakingCol);
348
349
  // }
349
350
  // if (!df.getCol('package')) {
350
- // const packageNameCol =
351
+ // const packageNameCol =
351
352
  // (<any>window).DG.Column.fromList((<any>window).DG.COLUMN_TYPE.STRING, 'package', Array(df.rowCount).fill(testParam.package));
352
353
  // df.columns.add(packageNameCol);
353
354
  // }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "datagrok-tools",
3
- "version": "4.14.62",
3
+ "version": "4.14.64",
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,7 +31,8 @@
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"
34
+ "build": "babel bin --extensions .ts -d bin",
35
+ "debug-source-map": "babel bin --extensions .ts -d bin --source-maps true"
35
36
  },
36
37
  "bin": {
37
38
  "datagrok-upload": "./bin/_deprecated/upload.js",