@omnia/tooling 7.11.32 → 7.12.1
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/composers/package.json +1 -1
- package/internal-do-not-import-from-here/core.d.ts +1 -2
- package/internal-do-not-import-from-here/core.js +6 -27
- package/internal-do-not-import-from-here/index.js +6 -6
- package/internal-do-not-import-from-here/utils.d.ts +2 -1
- package/internal-do-not-import-from-here/utils.js +10 -1
- package/package.json +2 -2
package/composers/package.json
CHANGED
|
@@ -38,7 +38,6 @@ declare function getRegisteredBuildTasks(): Task[];
|
|
|
38
38
|
declare function getExtensionInfo(): any;
|
|
39
39
|
declare function getTSConfig(): TSConfig;
|
|
40
40
|
declare function getWebpackResolveModules(): Array<string>;
|
|
41
|
-
declare function getWebpackResolveAlias(): Object;
|
|
42
41
|
declare function getEnviromentInfo(): any;
|
|
43
42
|
declare function getConfig(path: any): any;
|
|
44
43
|
declare function loadFile(path: any): any;
|
|
@@ -55,4 +54,4 @@ export declare class ResolvablePromise<T> {
|
|
|
55
54
|
get resolved(): boolean;
|
|
56
55
|
get rejected(): boolean;
|
|
57
56
|
}
|
|
58
|
-
export { registerTSConfig, registerTsNode, getConfig, getExtensionInfo, getEnviromentInfo, registerServeTask, getRegisteredServeTasks, getCleanTasks, registerBuildTask, getRegisteredBuildTasks, registerCleanTask, loadFile, getTSConfig, getWebpackResolveModules
|
|
57
|
+
export { registerTSConfig, registerTsNode, getConfig, getExtensionInfo, getEnviromentInfo, registerServeTask, getRegisteredServeTasks, getCleanTasks, registerBuildTask, getRegisteredBuildTasks, registerCleanTask, loadFile, getTSConfig, getWebpackResolveModules };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.getWebpackResolveModules = exports.getTSConfig = exports.loadFile = exports.registerCleanTask = exports.getRegisteredBuildTasks = exports.registerBuildTask = exports.getCleanTasks = exports.getRegisteredServeTasks = exports.registerServeTask = exports.getEnviromentInfo = exports.getExtensionInfo = exports.getConfig = exports.registerTsNode = exports.registerTSConfig = exports.ResolvablePromise = exports.TaskStage = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
var fs = require('fs'), path = require('path');
|
|
6
6
|
const utils = tslib_1.__importStar(require("./utils"));
|
|
@@ -21,12 +21,11 @@ var TaskStage;
|
|
|
21
21
|
TaskStage["AfterGenerateManifestsMetadata"] = "AfterGenerateManifestsMetadata";
|
|
22
22
|
})(TaskStage = exports.TaskStage || (exports.TaskStage = {}));
|
|
23
23
|
;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
var _webpackResolveAlias = null;
|
|
24
|
+
let _registeredServeTasks = [];
|
|
25
|
+
let _registeredBuildTasks = [];
|
|
26
|
+
let _registeredCleanTasks = [];
|
|
27
|
+
let _tsconfig = null;
|
|
28
|
+
let _webpackResolveModules = null;
|
|
30
29
|
function registerServeTask(serveTask) {
|
|
31
30
|
_registeredServeTasks.push(serveTask);
|
|
32
31
|
}
|
|
@@ -94,26 +93,6 @@ function getWebpackResolveModules() {
|
|
|
94
93
|
return _webpackResolveModules;
|
|
95
94
|
}
|
|
96
95
|
exports.getWebpackResolveModules = getWebpackResolveModules;
|
|
97
|
-
function getWebpackResolveAlias() {
|
|
98
|
-
if (_webpackResolveAlias === null) {
|
|
99
|
-
_webpackResolveAlias = {};
|
|
100
|
-
let tsconfigInfo = getTSConfig();
|
|
101
|
-
if (tsconfigInfo && tsconfigInfo.compilerOptions && tsconfigInfo.compilerOptions.baseUrl && tsconfigInfo.compilerOptions.paths) {
|
|
102
|
-
Object.keys(tsconfigInfo.compilerOptions.paths).forEach(path => {
|
|
103
|
-
if (path === "*") {
|
|
104
|
-
throw new Error(`Error, tsconfig.json -> tooling not support config path format '*': ${path} : ${tsconfigInfo.compilerOptions.paths[path]}`);
|
|
105
|
-
}
|
|
106
|
-
if (tsconfigInfo.compilerOptions.paths[path].length > 1) {
|
|
107
|
-
throw new Error(`Error, tsconfig.json -> tooling not support multiple paths in array: ${path} : ${tsconfigInfo.compilerOptions.paths[path]}`);
|
|
108
|
-
}
|
|
109
|
-
let alias = path.indexOf("/*") > -1 ? path.replace("/*", "") : path + "$";
|
|
110
|
-
_webpackResolveAlias[alias] = utils.root(`${tsconfigInfo.compilerOptions.baseUrl}/${tsconfigInfo.compilerOptions.paths[path][0].replace("/*", "").replace("*", "")}`);
|
|
111
|
-
});
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
return _webpackResolveAlias;
|
|
115
|
-
}
|
|
116
|
-
exports.getWebpackResolveAlias = getWebpackResolveAlias;
|
|
117
96
|
function getEnviromentInfo() {
|
|
118
97
|
var result = {};
|
|
119
98
|
var filePath = utils.root('environment.json');
|
|
@@ -16,7 +16,7 @@ const TYPESCRIPT_VERSION = '4.9.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';
|
|
19
|
-
var
|
|
19
|
+
var isOmniaNpm = fs.existsSync(process.cwd() + "/node_modules/@omnia/tooling/package.json");
|
|
20
20
|
function validateNodeSupportVersion() {
|
|
21
21
|
if (!semver.satisfies(process.version, nodeSupportedVersion)) {
|
|
22
22
|
throw new Error(`Your dev environment is running NodeJS version ${process.version} which does`
|
|
@@ -41,7 +41,7 @@ function triggerBuild(cb) {
|
|
|
41
41
|
}
|
|
42
42
|
function loadTasks() {
|
|
43
43
|
var scanTasks = [];
|
|
44
|
-
if (!
|
|
44
|
+
if (!isOmniaNpm) {
|
|
45
45
|
utils.getDirectories(path.resolve(__dirname, "..")).forEach(name => {
|
|
46
46
|
scanTasks.push(path.resolve(__dirname, "..") + "/" + name + "/task");
|
|
47
47
|
});
|
|
@@ -86,7 +86,7 @@ function initTasks() {
|
|
|
86
86
|
}
|
|
87
87
|
function build(cb) {
|
|
88
88
|
printLogo();
|
|
89
|
-
if (
|
|
89
|
+
if (isOmniaNpm) {
|
|
90
90
|
console.log(chalk_1.default.cyan(`Version ${require('@omnia/tooling/package.json').version}`));
|
|
91
91
|
}
|
|
92
92
|
initTasks();
|
|
@@ -97,7 +97,7 @@ function clean(greeting = true) {
|
|
|
97
97
|
return new Promise((resolve, reject) => {
|
|
98
98
|
if (greeting) {
|
|
99
99
|
printLogo();
|
|
100
|
-
if (
|
|
100
|
+
if (isOmniaNpm) {
|
|
101
101
|
console.log(chalk_1.default.cyan(`Version ${require('@omnia/tooling/package.json').version}`));
|
|
102
102
|
}
|
|
103
103
|
}
|
|
@@ -112,7 +112,7 @@ function clean(greeting = true) {
|
|
|
112
112
|
exports.clean = clean;
|
|
113
113
|
function serve() {
|
|
114
114
|
printLogo();
|
|
115
|
-
if (
|
|
115
|
+
if (isOmniaNpm) {
|
|
116
116
|
console.log(chalk_1.default.cyan(`Version ${require('@omnia/tooling/package.json').version}`));
|
|
117
117
|
}
|
|
118
118
|
utils.log('Creating hosting...');
|
|
@@ -138,7 +138,7 @@ Build System
|
|
|
138
138
|
}
|
|
139
139
|
function help() {
|
|
140
140
|
printLogo();
|
|
141
|
-
if (
|
|
141
|
+
if (isOmniaNpm) {
|
|
142
142
|
console.log(chalk_1.default.cyan(`Version ${require('@omnia/tooling/package.json').version}`));
|
|
143
143
|
}
|
|
144
144
|
console.log(chalk_1.default.cyan(`
|
|
@@ -13,6 +13,7 @@ declare function root(args: any): any;
|
|
|
13
13
|
*/
|
|
14
14
|
export declare function generateGuid(): string;
|
|
15
15
|
declare function isValidGuid(value: any): boolean;
|
|
16
|
+
declare function extractGuid(value: string): string;
|
|
16
17
|
declare function isNull(obj: any): boolean;
|
|
17
18
|
declare function isNullOrEmpty(obj: any): boolean;
|
|
18
19
|
declare function getDirectories(path: any): any;
|
|
@@ -22,4 +23,4 @@ declare function log(message: any, type?: LogTypes, writeToClient?: boolean): vo
|
|
|
22
23
|
declare function logTime(message: string, start: number): void;
|
|
23
24
|
declare function registerLogToClient(handler: (message: string, logType?: LogTypes) => void): void;
|
|
24
25
|
declare function ensureTraillingSlash(path: string): string;
|
|
25
|
-
export { ensureTraillingSlash, registerLogToClient, rewriteFile, getCurrentDateTime, timeWatch, root, isValidGuid, isNull, isNullOrEmpty, getDirectories, getGuidValue, getFileName, logTime, log, LogTypes };
|
|
26
|
+
export { ensureTraillingSlash, registerLogToClient, rewriteFile, getCurrentDateTime, timeWatch, extractGuid, 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.extractGuid = exports.timeWatch = exports.getCurrentDateTime = exports.rewriteFile = exports.registerLogToClient = exports.ensureTraillingSlash = 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;
|
|
@@ -110,6 +110,15 @@ function isValidGuid(value) {
|
|
|
110
110
|
return false;
|
|
111
111
|
}
|
|
112
112
|
exports.isValidGuid = isValidGuid;
|
|
113
|
+
function extractGuid(value) {
|
|
114
|
+
if (value) {
|
|
115
|
+
const matchs = value.match(/([A-Z0-9]{8}-[A-Z0-9]{4}-[A-Z0-9]{4}-[A-Z0-9]{4}-[A-Z0-9]{12})/i);
|
|
116
|
+
if (matchs)
|
|
117
|
+
return matchs[0];
|
|
118
|
+
}
|
|
119
|
+
return null;
|
|
120
|
+
}
|
|
121
|
+
exports.extractGuid = extractGuid;
|
|
113
122
|
function isNull(obj) {
|
|
114
123
|
if (obj === 0 || obj === false)
|
|
115
124
|
return false;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@omnia/tooling",
|
|
3
3
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
4
|
-
"version": "7.
|
|
4
|
+
"version": "7.12.1",
|
|
5
5
|
"description": "Provide basic stuffs extensible for omnia extension.",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
},
|
|
27
27
|
"main": "index.js",
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@omnia/types": "7.
|
|
29
|
+
"@omnia/types": "7.12.1",
|
|
30
30
|
"tslib": "2.3.1",
|
|
31
31
|
"typescript": "4.9.4",
|
|
32
32
|
"semver": "6.3.1",
|