@omnia/tooling 8.0.20-vnext → 8.0.22-vnext

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.
@@ -12,7 +12,7 @@ const utils = tslib_1.__importStar(require("./utils"));
12
12
  exports.utils = utils;
13
13
  tslib_1.__exportStar(require("./core"), exports);
14
14
  tslib_1.__exportStar(require("./utils"), exports);
15
- const TYPESCRIPT_VERSION = '5.0.2';
15
+ const TYPESCRIPT_VERSION = '5.0.4';
16
16
  const argv = (0, minimist_1.default)(process.argv.slice(2));
17
17
  const command = argv._[0];
18
18
  const path = require('path'), semver = require("semver"), fs = require('fs'), processPath = process.cwd().replace(/\\/g, "/"), nodeSupportedVersion = '>=12.18.4';
@@ -22,4 +22,5 @@ declare function log(message: any, type?: LogTypes, writeToClient?: boolean): vo
22
22
  declare function logTime(message: string, start: number): void;
23
23
  declare function registerLogToClient(handler: (message: string, logType?: LogTypes) => void): void;
24
24
  declare function ensureTraillingSlash(path: string): string;
25
+ export declare function asyncForEach<T>(array: Array<T>, callback: (item: T, index?: number, items?: Array<T>) => Promise<void>): Promise<void>;
25
26
  export { ensureTraillingSlash, registerLogToClient, rewriteFile, getCurrentDateTime, timeWatch, root, isValidGuid, isNull, isNullOrEmpty, getDirectories, getGuidValue, getFileName, logTime, log, LogTypes };
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.LogTypes = exports.log = exports.logTime = exports.getFileName = exports.getGuidValue = exports.getDirectories = exports.isNullOrEmpty = exports.isNull = exports.isValidGuid = exports.root = exports.timeWatch = exports.getCurrentDateTime = exports.rewriteFile = exports.registerLogToClient = exports.ensureTraillingSlash = exports.generateGuid = void 0;
3
+ exports.LogTypes = exports.log = exports.logTime = exports.getFileName = exports.getGuidValue = exports.getDirectories = exports.isNullOrEmpty = exports.isNull = exports.isValidGuid = exports.root = exports.timeWatch = exports.getCurrentDateTime = exports.rewriteFile = exports.registerLogToClient = exports.ensureTraillingSlash = exports.asyncForEach = exports.generateGuid = void 0;
4
4
  let path = require('path'), fs = require('fs'), timestamp = require('console-timestamp'), chalk = require('chalk'), _timer = {};
5
5
  let _logToClientHandler = null;
6
6
  var LogTypes;
@@ -143,7 +143,7 @@ function getFileName(source) {
143
143
  return null;
144
144
  }
145
145
  exports.getFileName = getFileName;
146
- function log(message, type, writeToClient = false) {
146
+ function log(message, type = LogTypes.HeadLine, writeToClient = false) {
147
147
  if (type === LogTypes.HeadLine) {
148
148
  console.log(timestamp('[hh:mm:ss] ') + chalk.cyan(message));
149
149
  }
@@ -176,3 +176,9 @@ function ensureTraillingSlash(path) {
176
176
  return path.replace(/\/$|$/, '/');
177
177
  }
178
178
  exports.ensureTraillingSlash = ensureTraillingSlash;
179
+ async function asyncForEach(array, callback) {
180
+ for (let index = 0; index < array.length; index++) {
181
+ await callback(array[index], index, array);
182
+ }
183
+ }
184
+ exports.asyncForEach = asyncForEach;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@omnia/tooling",
3
3
  "license": "MIT",
4
- "version": "8.0.20-vnext",
4
+ "version": "8.0.22-vnext",
5
5
  "description": "Provide basic stuffs extensible for omnia extension.",
6
6
  "scripts": {
7
7
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -26,10 +26,10 @@
26
26
  },
27
27
  "main": "index.js",
28
28
  "dependencies": {
29
- "@omnia/types": "8.0.20-vnext",
29
+ "@omnia/types": "8.0.22-vnext",
30
30
  "@types/node": "18.13.0",
31
31
  "tslib": "2.5.0",
32
- "typescript": "5.0.2",
32
+ "typescript": "5.0.4",
33
33
  "semver": "6.3.0",
34
34
  "chalk": " 2.3.0",
35
35
  "chokidar": "3.5.2",