@omnia/tooling 8.0.9-vnext → 8.0.11-dev

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.
@@ -10,9 +10,10 @@ const core = tslib_1.__importStar(require("./core"));
10
10
  exports.core = core;
11
11
  const utils = tslib_1.__importStar(require("./utils"));
12
12
  exports.utils = utils;
13
+ const del_1 = tslib_1.__importDefault(require("del"));
13
14
  tslib_1.__exportStar(require("./core"), exports);
14
15
  tslib_1.__exportStar(require("./utils"), exports);
15
- const TYPESCRIPT_VERSION = '4.9.4';
16
+ const TYPESCRIPT_VERSION = '5.0.4';
16
17
  const argv = (0, minimist_1.default)(process.argv.slice(2));
17
18
  const command = argv._[0];
18
19
  const path = require('path'), semver = require("semver"), fs = require('fs'), processPath = process.cwd().replace(/\\/g, "/"), nodeSupportedVersion = '>=12.18.4';
@@ -158,6 +159,9 @@ async function run() {
158
159
  if (process.argv.length > 0 && process.argv.find(argv => argv === "--clean") !== undefined) {
159
160
  await clean(false);
160
161
  }
162
+ else if (process.argv.length > 0 && process.argv.find(argv => argv === "--package") !== undefined) {
163
+ del_1.default.sync("wwwroot/packages/temp");
164
+ }
161
165
  build();
162
166
  }
163
167
  else if (command === "serve" || argv.serve) {
@@ -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.9-vnext",
4
+ "version": "8.0.11-dev",
5
5
  "description": "Provide basic stuffs extensible for omnia extension.",
6
6
  "scripts": {
7
7
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -26,18 +26,18 @@
26
26
  },
27
27
  "main": "index.js",
28
28
  "dependencies": {
29
- "@omnia/types": "8.0.9-vnext",
29
+ "@omnia/types": "8.0.11-dev",
30
30
  "@types/node": "18.13.0",
31
- "tslib": "2.3.1",
32
- "typescript": "4.9.4",
33
- "semver": "6.3.0",
31
+ "tslib": "2.5.0",
32
+ "typescript": "5.0.4",
33
+ "semver": "7.5.3",
34
34
  "chalk": " 2.3.0",
35
35
  "chokidar": "3.5.2",
36
36
  "console-timestamp": "0.3.0",
37
37
  "minimist": "1.2.6",
38
- "globby": "6.1.0",
38
+ "globby": "13.1.4",
39
39
  "figlet": "1.5.2",
40
- "esbuild": "0.17.8",
40
+ "esbuild": "0.17.19",
41
41
  "esbuild-loader": "3.0.1"
42
42
  },
43
43
  "typings": "./index.d.ts",