last ...
This commit is contained in:
+24
-3
@@ -1,4 +1,5 @@
|
|||||||
# xDashboard Modules
|
#
|
||||||
|
# xDashboard Modules ...
|
||||||
[submodule "Modules/xExceptions"]
|
[submodule "Modules/xExceptions"]
|
||||||
path = Modules/xExceptions
|
path = Modules/xExceptions
|
||||||
url = https://git.saherelm.ir/saherelm/xExceptions.git
|
url = https://git.saherelm.ir/saherelm/xExceptions.git
|
||||||
@@ -57,7 +58,26 @@
|
|||||||
path = Modules/xAiService
|
path = Modules/xAiService
|
||||||
url = https://git.saherelm.ir/saherelm/xAiService.git
|
url = https://git.saherelm.ir/saherelm/xAiService.git
|
||||||
|
|
||||||
# xSaherElm Modules
|
#
|
||||||
|
# xFramework Modules ...
|
||||||
|
[submodule "Modules/xFrameworkCoreHolder"]
|
||||||
|
path = Modules/xFrameworkCoreHolder
|
||||||
|
url = https://git.saherelm.ir/saherelm/xFrameworkCoreHolder.git
|
||||||
|
[submodule "Modules/xFrameworkServicesHolder"]
|
||||||
|
path = Modules/xFrameworkServicesHolder
|
||||||
|
url = https://git.saherelm.ir/saherelm/xFrameworkServicesHolder.git
|
||||||
|
[submodule "Modules/xFrameworkComponentsHolder"]
|
||||||
|
path = Modules/xFrameworkComponentsHolder
|
||||||
|
url = https://git.saherelm.ir/saherelm/xFrameworkComponentsHolder.git
|
||||||
|
[submodule "Modules/xFrameworkPushServiceHolder"]
|
||||||
|
path = Modules/xFrameworkPushServiceHolder
|
||||||
|
url = https://git.saherelm.ir/saherelm/xFrameworkPushServiceHolder.git
|
||||||
|
[submodule "Modules/xFrameworkIdentitySDKHolder"]
|
||||||
|
path = Modules/xFrameworkIdentitySDKHolder
|
||||||
|
url = https://git.saherelm.ir/saherelm/xFrameworkIdentitySDKHolder.git
|
||||||
|
|
||||||
|
#
|
||||||
|
# xSaherElm Modules ...
|
||||||
[submodule "Modules/xIdentityHelper"]
|
[submodule "Modules/xIdentityHelper"]
|
||||||
path = Modules/xIdentityHelper
|
path = Modules/xIdentityHelper
|
||||||
url = https://git.saherelm.ir/saherelm/xSaherElmIdentityHelper.git
|
url = https://git.saherelm.ir/saherelm/xSaherElmIdentityHelper.git
|
||||||
@@ -68,7 +88,8 @@
|
|||||||
path = Modules/xApiSDKHolder
|
path = Modules/xApiSDKHolder
|
||||||
url = https://git.saherelm.ir/saherelm/xSaherElmApiSDKHolder.git
|
url = https://git.saherelm.ir/saherelm/xSaherElmApiSDKHolder.git
|
||||||
|
|
||||||
# SaherElm Applications
|
#
|
||||||
|
# SaherElm Applications ...
|
||||||
[submodule "xClient"]
|
[submodule "xClient"]
|
||||||
path = xClient
|
path = xClient
|
||||||
url = https://git.saherelm.ir/saherelm/xSaherElmClient.git
|
url = https://git.saherelm.ir/saherelm/xSaherElmClient.git
|
||||||
|
|||||||
@@ -32,10 +32,13 @@ Get-ChildItem -LiteralPath $searchPath -Recurse -File |
|
|||||||
Where-Object {
|
Where-Object {
|
||||||
$_.Name -eq 'Dockerfile' -or
|
$_.Name -eq 'Dockerfile' -or
|
||||||
$_.Name -eq 'docker-compose.yaml' -or
|
$_.Name -eq 'docker-compose.yaml' -or
|
||||||
$_.Extension -eq '.cs'
|
$_.Extension -eq '.cs' -or
|
||||||
|
$_.Extension -eq '.ts' -or
|
||||||
|
$_.Extension -eq '.html' -or
|
||||||
|
$_.Extension -eq '.scss'
|
||||||
} |
|
} |
|
||||||
Where-Object {
|
Where-Object {
|
||||||
$_.FullName -notmatch '[\\/](bin|obj)([\\/]|$)'
|
$_.FullName -notmatch '[\\/](bin|obj|dist|node_modules)([\\/]|$)'
|
||||||
} |
|
} |
|
||||||
ForEach-Object {
|
ForEach-Object {
|
||||||
"`n### FILE: $($_.FullName)`n"
|
"`n### FILE: $($_.FullName)`n"
|
||||||
|
|||||||
@@ -39,9 +39,14 @@ find "$SEARCH_PATH" -type f \( \
|
|||||||
-name "Dockerfile" \
|
-name "Dockerfile" \
|
||||||
-o -name "docker-compose.yaml" \
|
-o -name "docker-compose.yaml" \
|
||||||
-o -name "*.cs" \
|
-o -name "*.cs" \
|
||||||
|
-o -name "*.ts" \
|
||||||
|
-o -name "*.html" \
|
||||||
|
-o -name "*.scss" \
|
||||||
\) \
|
\) \
|
||||||
-not -path "*/bin/*" \
|
-not -path "*/bin/*" \
|
||||||
-not -path "*/obj/*" \
|
-not -path "*/obj/*" \
|
||||||
|
-not -path "*/dist/*" \
|
||||||
|
-not -path "*/node_modules/*" \
|
||||||
-print0 |
|
-print0 |
|
||||||
while IFS= read -r -d '' file; do
|
while IFS= read -r -d '' file; do
|
||||||
printf '\n### FILE: %s\n\n' "$file"
|
printf '\n### FILE: %s\n\n' "$file"
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
+96003
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
+8160
File diff suppressed because it is too large
Load Diff
+1074
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,506 @@
|
|||||||
|
/**
|
||||||
|
* XColor Tools Module ...
|
||||||
|
* a module for handle colorify text contents in node js ...
|
||||||
|
*
|
||||||
|
* Maintainer
|
||||||
|
*
|
||||||
|
* Hadi Khazaee Asl <https://saherelm.ir> (hadi_khazaee_asl@yahoo.com)
|
||||||
|
*/
|
||||||
|
|
||||||
|
//
|
||||||
|
//#region Module Imports ...
|
||||||
|
const XValueTools = require("./x-value.tools");
|
||||||
|
//#endregion
|
||||||
|
|
||||||
|
//
|
||||||
|
//#region Constants ...
|
||||||
|
/**
|
||||||
|
* these are available style which can applied to an string ...
|
||||||
|
*/
|
||||||
|
const AVAILABLE_STYLES = {
|
||||||
|
//
|
||||||
|
Bold: "\x1b[1m",
|
||||||
|
Dim: "\x1b[2m",
|
||||||
|
Underlined: "\x1b[4m",
|
||||||
|
Blink: "\x1b[5m",
|
||||||
|
ReverseFandB: "\x1b[7m",
|
||||||
|
Hidden: "\x1b[8m",
|
||||||
|
//
|
||||||
|
// Commonly used for reset all Styles ...
|
||||||
|
Reset: "\x1b[0m"
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* these are available foreground colors which can applied to an string ...
|
||||||
|
*/
|
||||||
|
const AVAILABLE_FOREGROUND_COLORS = {
|
||||||
|
Default: "\x1b[39m",
|
||||||
|
Black: "\x1b[30m",
|
||||||
|
Red: "\x1b[31m",
|
||||||
|
Green: "\x1b[32m",
|
||||||
|
Yellow: "\x1b[33m",
|
||||||
|
Blue: "\x1b[34m",
|
||||||
|
Magenta: "\x1b[35m",
|
||||||
|
Cyan: "\x1b[36m",
|
||||||
|
LightGray: "\x1b[37m",
|
||||||
|
DarkGray: "\x1b[90m",
|
||||||
|
LightRed: "\x1b[91m",
|
||||||
|
LightGreen: "\x1b[92m",
|
||||||
|
LightYellow: "\x1b[93m",
|
||||||
|
LightBlue: "\x1b[94m",
|
||||||
|
LightMagenta: "\x1b[95m",
|
||||||
|
LightCyan: "\x1b[96m",
|
||||||
|
White: "\x1b[97m",
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* these are available background colors which can applied to an string ...
|
||||||
|
*/
|
||||||
|
const AVAILABLE_BACKGROUND_COLORS = {
|
||||||
|
Default: "\x1b[49m",
|
||||||
|
Black: "\x1b[40m",
|
||||||
|
Red: "\x1b[41m",
|
||||||
|
Green: "\x1b[42m",
|
||||||
|
Yellow: "\x1b[43m",
|
||||||
|
Blue: "\x1b[44m",
|
||||||
|
Magenta: "\x1b[45m",
|
||||||
|
Cyan: "\x1b[46m",
|
||||||
|
LightGray: "\x1b[47m",
|
||||||
|
DarkGray: "\x1b[100m",
|
||||||
|
LightRed: "\x1b[101m",
|
||||||
|
LightGreen: "\x1b[102m",
|
||||||
|
LightYellow: "\x1b[103m",
|
||||||
|
LightBlue: "\x1b[104m",
|
||||||
|
LightMagenta: "\x1b[105m",
|
||||||
|
LightCyan: "\x1b[106m",
|
||||||
|
White: "\x1b[107m",
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* these are available style names, which exports from module and
|
||||||
|
* users can use them ...
|
||||||
|
*/
|
||||||
|
const STYLE_NAMES = {
|
||||||
|
Bold: "Bold",
|
||||||
|
Dim: "Dim",
|
||||||
|
Underlined: "Underlined",
|
||||||
|
Blink: "Blink",
|
||||||
|
ReverseFandB: "ReverseFandB",
|
||||||
|
Hidden: "Hidden",
|
||||||
|
Reset: "Reset",
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* these are available color names, which exports from module and
|
||||||
|
* users can use them ...
|
||||||
|
*/
|
||||||
|
const COLOR_NAMES = {
|
||||||
|
Default: "Default",
|
||||||
|
Black: "Black",
|
||||||
|
Red: "Red",
|
||||||
|
Green: "Green",
|
||||||
|
Yellow: "Yellow",
|
||||||
|
Blue: "Blue",
|
||||||
|
Magenta: "Magenta",
|
||||||
|
Cyan: "Cyan",
|
||||||
|
LightGray: "LightGray",
|
||||||
|
DarkGray: "DarkGray",
|
||||||
|
LightRed: "LightRed",
|
||||||
|
LightGreen: "LightGreen",
|
||||||
|
LightYellow: "LightYellow",
|
||||||
|
LightBlue: "LightBlue",
|
||||||
|
LightMagenta: "LightMagenta",
|
||||||
|
LightCyan: "LightCyan",
|
||||||
|
White: "White",
|
||||||
|
};
|
||||||
|
//#endregion
|
||||||
|
|
||||||
|
//
|
||||||
|
//#region Actions ...
|
||||||
|
/**
|
||||||
|
* apply specified style and color on a content ...
|
||||||
|
*
|
||||||
|
* @param {string} content specified content for styling ...
|
||||||
|
* @param {string} color specific color name for using to styling ...
|
||||||
|
* @param {string} style soecufic style name to use ...
|
||||||
|
* @param {boolean} toForeground apply specified color as foreground ...
|
||||||
|
* @param {boolean} toBackground apply specified color as background ...
|
||||||
|
* @returns {string} styled content ...
|
||||||
|
*/
|
||||||
|
function apply(
|
||||||
|
content,
|
||||||
|
color,
|
||||||
|
style,
|
||||||
|
toForeground = true,
|
||||||
|
toBackground = false
|
||||||
|
) {
|
||||||
|
//
|
||||||
|
let result = content;
|
||||||
|
|
||||||
|
//
|
||||||
|
// Validate Arg ...
|
||||||
|
if (!XValueTools.isValidArg(content)) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Detect and Validate Style and Apply it ...
|
||||||
|
let eStyle = AVAILABLE_STYLES[style];
|
||||||
|
if (XValueTools.isValidArg(eStyle)) {
|
||||||
|
result = `${eStyle}${result}${AVAILABLE_STYLES.Reset}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Detect and Validate Foreground Color and Apply it ...
|
||||||
|
let eFColor = AVAILABLE_FOREGROUND_COLORS[color];
|
||||||
|
if (
|
||||||
|
!!toForeground
|
||||||
|
&& XValueTools.isValidArg(eFColor)
|
||||||
|
) {
|
||||||
|
result = `${eFColor}${result}${AVAILABLE_STYLES.Reset}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Detect and Validate Background Color and Apply it ...
|
||||||
|
let eBColor = AVAILABLE_BACKGROUND_COLORS[color];
|
||||||
|
if (
|
||||||
|
!!toBackground
|
||||||
|
&& XValueTools.isValidArg(eBColor)
|
||||||
|
) {
|
||||||
|
result = `${eBColor}${result}${AVAILABLE_STYLES.Reset}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* apply specific style on a content ...
|
||||||
|
*
|
||||||
|
* @param {string} content specific content which going to styled ...
|
||||||
|
* @param {string} style a member of STYLE_NAMES which specified that which style going to applied to content ...
|
||||||
|
* @returns {string} styled content ...
|
||||||
|
*/
|
||||||
|
function applyStyle(content, style) {
|
||||||
|
//
|
||||||
|
// Validate Arg ...
|
||||||
|
if (!XValueTools.isValidArg(content)) {
|
||||||
|
return content;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
let eStyle = AVAILABLE_STYLES[style];
|
||||||
|
if (eStyle === undefined) {
|
||||||
|
return content;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
return `${eStyle}${content}${AVAILABLE_STYLES.Reset}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* apply specific foreground color on a content ...
|
||||||
|
*
|
||||||
|
* @param {string} content specific content which going to colorified ...
|
||||||
|
* @param {string} color a member of COLOR_NAMES which specified that which color going to applied to content ...
|
||||||
|
* @returns {string} colorified content ...
|
||||||
|
*/
|
||||||
|
function applyForegroundColor(content, color) {
|
||||||
|
//
|
||||||
|
// Validate Arg ...
|
||||||
|
if (!XValueTools.isValidArg(content)) {
|
||||||
|
return content;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
let eColor = AVAILABLE_FOREGROUND_COLORS[color];
|
||||||
|
if (eColor === undefined) {
|
||||||
|
return content;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
return `${eColor}${content}${AVAILABLE_STYLES.Reset}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* apply specific background color on a content ...
|
||||||
|
*
|
||||||
|
* @param {string} content specific content which going to colorified ...
|
||||||
|
* @param {string} color a member of COLOR_NAMES which specified that which color going to applied to content ...
|
||||||
|
* @returns {string} colorified content ...
|
||||||
|
*/
|
||||||
|
function applyBackgroundColor(content, color) {
|
||||||
|
//
|
||||||
|
// Validate Arg ...
|
||||||
|
if (!XValueTools.isValidArg(content)) {
|
||||||
|
return content;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
let eColor = AVAILABLE_BACKGROUND_COLORS[color];
|
||||||
|
if (eColor === undefined) {
|
||||||
|
return content;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
return `${eColor}${content}${AVAILABLE_STYLES.Reset}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* generate style and color applier expression ...
|
||||||
|
*
|
||||||
|
* @param {string} color specific color name for using to styling ...
|
||||||
|
* @param {string} style soecufic style name to use ...
|
||||||
|
* @param {boolean} reset close applier string by reset styles ...
|
||||||
|
* @param {boolean} toForeground apply specified color as foreground ...
|
||||||
|
* @param {boolean} toBackground apply specified color as background ...
|
||||||
|
* @returns {string} style and color applier string ...
|
||||||
|
*/
|
||||||
|
function getApplier(
|
||||||
|
style = "",
|
||||||
|
color = "",
|
||||||
|
reset = false,
|
||||||
|
toForeground = true,
|
||||||
|
toBackground = false
|
||||||
|
) {
|
||||||
|
//
|
||||||
|
let result = "";
|
||||||
|
|
||||||
|
//
|
||||||
|
// Detect and Validate Style and Apply it ...
|
||||||
|
let eStyle = AVAILABLE_STYLES[style];
|
||||||
|
if (XValueTools.isValidArg(eStyle)) {
|
||||||
|
result = `${eStyle}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Detect and Validate Foreground Color and Apply it ...
|
||||||
|
let eFColor = AVAILABLE_FOREGROUND_COLORS[color];
|
||||||
|
if (
|
||||||
|
!!toForeground
|
||||||
|
&& XValueTools.isValidArg(eFColor)
|
||||||
|
) {
|
||||||
|
result = `${eFColor}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Detect and Validate Background Color and Apply it ...
|
||||||
|
let eBColor = AVAILABLE_BACKGROUND_COLORS[color];
|
||||||
|
if (
|
||||||
|
!!toBackground
|
||||||
|
&& XValueTools.isValidArg(eBColor)
|
||||||
|
) {
|
||||||
|
result = `${eBColor}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
if (
|
||||||
|
!!reset &&
|
||||||
|
result.length > 0
|
||||||
|
) {
|
||||||
|
result = `${result}${AVAILABLE_STYLES.Reset}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* generate style applier expression ...
|
||||||
|
*
|
||||||
|
* @param {string} style soecufic style name to use ...
|
||||||
|
* @param {boolean} reset close applier string by reset styles ...
|
||||||
|
* @returns {string} style applier string ...
|
||||||
|
*/
|
||||||
|
function getStyleApplier(
|
||||||
|
style = "",
|
||||||
|
reset = false
|
||||||
|
) {
|
||||||
|
//
|
||||||
|
let result = "";
|
||||||
|
|
||||||
|
//
|
||||||
|
// Detect and Validate Style and Apply it ...
|
||||||
|
let eStyle = AVAILABLE_STYLES[style];
|
||||||
|
if (XValueTools.isValidArg(eStyle)) {
|
||||||
|
result = `${eStyle}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
if (
|
||||||
|
!!reset &&
|
||||||
|
result.length > 0
|
||||||
|
) {
|
||||||
|
result = `${result}${AVAILABLE_STYLES.Reset}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* generate color applier expression ...
|
||||||
|
*
|
||||||
|
* @param {string} color specific color name for using to styling ...
|
||||||
|
* @param {boolean} reset close applier string by reset styles ...
|
||||||
|
* @param {boolean} toForeground apply specified color as foreground ...
|
||||||
|
* @param {boolean} toBackground apply specified color as background ...
|
||||||
|
* @returns {string} color applier string ...
|
||||||
|
*/
|
||||||
|
function getColorApplier(
|
||||||
|
color = "",
|
||||||
|
reset = false,
|
||||||
|
toForeground = true,
|
||||||
|
toBackground = false
|
||||||
|
) {
|
||||||
|
//
|
||||||
|
let result = "";
|
||||||
|
|
||||||
|
//
|
||||||
|
// Detect and Validate Foreground Color and Apply it ...
|
||||||
|
let eFColor = AVAILABLE_FOREGROUND_COLORS[color];
|
||||||
|
if (
|
||||||
|
!!toForeground
|
||||||
|
&& XValueTools.isValidArg(eFColor)
|
||||||
|
) {
|
||||||
|
result = `${eFColor}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Detect and Validate Background Color and Apply it ...
|
||||||
|
let eBColor = AVAILABLE_BACKGROUND_COLORS[color];
|
||||||
|
if (
|
||||||
|
!!toBackground
|
||||||
|
&& XValueTools.isValidArg(eBColor)
|
||||||
|
) {
|
||||||
|
result = `${eBColor}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
if (
|
||||||
|
!!reset &&
|
||||||
|
result.length > 0
|
||||||
|
) {
|
||||||
|
result = `${result}${AVAILABLE_STYLES.Reset}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* colorified specific content ...
|
||||||
|
*
|
||||||
|
* @param {string} content specified content for styling ...
|
||||||
|
* @param {string} color specific color name for using to styling ...
|
||||||
|
* @param {boolean} toForeground apply specified color as foreground ...
|
||||||
|
* @param {boolean} toBackground apply specified color as background ...
|
||||||
|
* @returns {string}
|
||||||
|
*/
|
||||||
|
function colorifyContent(
|
||||||
|
content = "",
|
||||||
|
color = "",
|
||||||
|
toForeground = true,
|
||||||
|
toBackground = false
|
||||||
|
) {
|
||||||
|
//
|
||||||
|
let result = content;
|
||||||
|
|
||||||
|
//
|
||||||
|
if (!XValueTools.isValidArg(content)) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Finde Colors ...
|
||||||
|
|
||||||
|
//
|
||||||
|
// Detect and Validate Foreground Color and Apply it ...
|
||||||
|
let eFColor = AVAILABLE_FOREGROUND_COLORS[color];
|
||||||
|
if (
|
||||||
|
!!toForeground
|
||||||
|
&& XValueTools.isValidArg(eFColor)
|
||||||
|
) {
|
||||||
|
result = `${eFColor}${result}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Detect and Validate Background Color and Apply it ...
|
||||||
|
let eBColor = AVAILABLE_BACKGROUND_COLORS[color];
|
||||||
|
if (
|
||||||
|
!!toBackground
|
||||||
|
&& XValueTools.isValidArg(eBColor)
|
||||||
|
) {
|
||||||
|
result = `${eBColor}${result}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
if (
|
||||||
|
result.length > 0
|
||||||
|
&& (
|
||||||
|
XValueTools.isValidArg(eFColor) ||
|
||||||
|
XValueTools.isValidArg(eBColor)
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
result = `${result}${AVAILABLE_STYLES.Reset}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* apply style on specific content ...
|
||||||
|
*
|
||||||
|
* @param {string} content specified content for styling ...
|
||||||
|
* @param {string} style soecufic style name to use ...
|
||||||
|
* @returns {string}
|
||||||
|
*/
|
||||||
|
function stylifiyContent(
|
||||||
|
content = "",
|
||||||
|
style = "",
|
||||||
|
) {
|
||||||
|
//
|
||||||
|
let result = content;
|
||||||
|
|
||||||
|
//
|
||||||
|
if (!XValueTools.isValidArg(content)) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Detect and Validate Style and Apply it ...
|
||||||
|
let eStyle = AVAILABLE_STYLES[style];
|
||||||
|
if (XValueTools.isValidArg(eStyle)) {
|
||||||
|
result = `${eStyle}${result}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
if (
|
||||||
|
result.length > 0
|
||||||
|
&& XValueTools.isValidArg(eStyle)
|
||||||
|
) {
|
||||||
|
result = `${result}${AVAILABLE_STYLES.Reset}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
//#endregion
|
||||||
|
|
||||||
|
//
|
||||||
|
//#region Module Exports ...
|
||||||
|
module.exports = {
|
||||||
|
//
|
||||||
|
STYLE_NAMES,
|
||||||
|
COLOR_NAMES,
|
||||||
|
//
|
||||||
|
apply,
|
||||||
|
applyStyle,
|
||||||
|
getApplier,
|
||||||
|
getColorApplier,
|
||||||
|
getStyleApplier,
|
||||||
|
colorifyContent,
|
||||||
|
stylifiyContent,
|
||||||
|
applyForegroundColor,
|
||||||
|
applyBackgroundColor,
|
||||||
|
}
|
||||||
|
//#endregion
|
||||||
@@ -0,0 +1,887 @@
|
|||||||
|
/**
|
||||||
|
* XFile Tools Module ...
|
||||||
|
* a module for handle all file/folder manipulating task in node js ...
|
||||||
|
*
|
||||||
|
* Maintainer
|
||||||
|
*
|
||||||
|
* Hadi Khazaee Asl <https://saherelm.ir> (hadi_khazaee_asl@yahoo.com)
|
||||||
|
*/
|
||||||
|
|
||||||
|
//
|
||||||
|
//#region Module Imports ...
|
||||||
|
const fs = require('fs');
|
||||||
|
const os = require('os');
|
||||||
|
const Path = require('path');
|
||||||
|
const http = require('http');
|
||||||
|
const https = require('https');
|
||||||
|
const XValueTools = require('./x-value.tools');
|
||||||
|
//#endregion
|
||||||
|
|
||||||
|
//
|
||||||
|
//#region Constants ...
|
||||||
|
/**
|
||||||
|
* current os path separators ...
|
||||||
|
*/
|
||||||
|
const PathSeparator = Path.sep;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* current directory ...
|
||||||
|
*/
|
||||||
|
const CurrentDir = __dirname;
|
||||||
|
//#endregion
|
||||||
|
|
||||||
|
//
|
||||||
|
//#region Actions ...
|
||||||
|
//
|
||||||
|
//#region Global ...
|
||||||
|
/**
|
||||||
|
* retrieve a path status ...
|
||||||
|
*
|
||||||
|
* @param {string} path a path value to check ...
|
||||||
|
* @returns an stat object ...
|
||||||
|
*/
|
||||||
|
function getStatus(path = '') {
|
||||||
|
//
|
||||||
|
if (!XValueTools.isValidArg(path)) {
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
return fs.statSync(path);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* retrieve user's Home path ...
|
||||||
|
*
|
||||||
|
* @returns {string} a path ...
|
||||||
|
*/
|
||||||
|
function getHomePath() {
|
||||||
|
return os.homedir();
|
||||||
|
}
|
||||||
|
//#endregion
|
||||||
|
|
||||||
|
//
|
||||||
|
//#region Path ...
|
||||||
|
/**
|
||||||
|
* retrieve the base name of specific address path ...
|
||||||
|
*
|
||||||
|
* @param {string} path address of file or folder ...
|
||||||
|
* @returns string ...
|
||||||
|
*/
|
||||||
|
function basename(path = '') {
|
||||||
|
//
|
||||||
|
if (!XValueTools.isValidArg(path)) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
const result = Path.basename(path);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* join several path segments together ...
|
||||||
|
*
|
||||||
|
* @param {...string} path path params ...
|
||||||
|
* @returns a joined paths ...
|
||||||
|
*/
|
||||||
|
function joinPath(...path) {
|
||||||
|
return Path.join(...path);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* resolve a relative path to absolute ...
|
||||||
|
*
|
||||||
|
* @param {string[]} path a path value to check ...
|
||||||
|
* @returns {string}
|
||||||
|
*/
|
||||||
|
function resolvePath(...path) {
|
||||||
|
return Path.resolve(...path);
|
||||||
|
}
|
||||||
|
//#endregion
|
||||||
|
|
||||||
|
//
|
||||||
|
//#region File ...
|
||||||
|
/**
|
||||||
|
* determines a path destination is a file or not ...
|
||||||
|
*
|
||||||
|
* @param {string} path a path value to check ...
|
||||||
|
* @returns a boolean value ...
|
||||||
|
*/
|
||||||
|
function isFileExists(path = '') {
|
||||||
|
//
|
||||||
|
if (!XValueTools.isValidArg(path)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
try {
|
||||||
|
const stat = getStatus(path);
|
||||||
|
if (!stat) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
return stat.isFile();
|
||||||
|
} catch {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* remove a file ...
|
||||||
|
*
|
||||||
|
* @param {string} path a file path ...
|
||||||
|
* @returns {Promise<boolean>} action done or not ...
|
||||||
|
*/
|
||||||
|
function removeFile(path = '') {
|
||||||
|
return new Promise((resolve) => {
|
||||||
|
//
|
||||||
|
if (!isFileExists(path)) {
|
||||||
|
resolve(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
fs.unlink(path, (err) => {
|
||||||
|
//
|
||||||
|
if (err) {
|
||||||
|
resolve(false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
resolve(true);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* copy a file to destination path ...
|
||||||
|
*
|
||||||
|
* @param {string} source source file path ...
|
||||||
|
* @param {string} dest dest folder path ...
|
||||||
|
* @returns {Promise<boolean>} action done or not ...
|
||||||
|
*/
|
||||||
|
function copyFile(
|
||||||
|
source = '',
|
||||||
|
dest = ''
|
||||||
|
) {
|
||||||
|
return new Promise((resolve) => {
|
||||||
|
//
|
||||||
|
if (
|
||||||
|
!isFileExists(source) ||
|
||||||
|
!isDirectoryExists(dest)
|
||||||
|
) {
|
||||||
|
resolve(false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
const destFilePath = Path.join(dest, Path.basename(source));
|
||||||
|
fs.copyFile(source, destFilePath, (err) => {
|
||||||
|
//
|
||||||
|
if (err) {
|
||||||
|
resolve(false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
resolve(true);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* reading specified file content ...
|
||||||
|
*
|
||||||
|
* @param {string} path a file path ...
|
||||||
|
* @returns {Promise<string>} file content ...
|
||||||
|
*/
|
||||||
|
function readFile(path = '') {
|
||||||
|
return new Promise((resolve) => {
|
||||||
|
//
|
||||||
|
if (!isFileExists(path)) {
|
||||||
|
resolve('');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
fs.readFile(path, 'utf8', (err, content) => {
|
||||||
|
//
|
||||||
|
if (err) {
|
||||||
|
resolve(undefined);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
resolve(content);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* write content to a file ...
|
||||||
|
*
|
||||||
|
* @param {string} path a file path ...
|
||||||
|
* @param {string} content the content which going to write to the file ...
|
||||||
|
* @param {bool} overwrite determines file overwrite if exists ...
|
||||||
|
* @returns {Promise<boolean>} action done or not ...
|
||||||
|
*/
|
||||||
|
function writeFile(
|
||||||
|
path = '',
|
||||||
|
content = '',
|
||||||
|
overwrite = true
|
||||||
|
) {
|
||||||
|
return new Promise((resolve) => {
|
||||||
|
//
|
||||||
|
if (isFileExists(path) && !overwrite) {
|
||||||
|
//
|
||||||
|
resolve(false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Normalize Content ...
|
||||||
|
content = XValueTools.isValidArg(content) ?
|
||||||
|
content :
|
||||||
|
'';
|
||||||
|
|
||||||
|
//
|
||||||
|
fs.writeFile(path, content, (err) => {
|
||||||
|
//
|
||||||
|
if (err) {
|
||||||
|
//
|
||||||
|
resolve(false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
resolve(true);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* create a file ...
|
||||||
|
*
|
||||||
|
* @param {string} path file path ...
|
||||||
|
* @param {string} fileName file name ...
|
||||||
|
* @returns {Promise<boolean>} action done or not ...
|
||||||
|
*/
|
||||||
|
function createFile(
|
||||||
|
path = '',
|
||||||
|
fileName = ''
|
||||||
|
) {
|
||||||
|
return new Promise((resolve) => {
|
||||||
|
//
|
||||||
|
const filePath = Path.join(path, fileName);
|
||||||
|
if (
|
||||||
|
isFileExists(filePath) ||
|
||||||
|
!XValueTools.isValidArg(path) ||
|
||||||
|
!XValueTools.isValidArg(fileName)
|
||||||
|
) {
|
||||||
|
//
|
||||||
|
resolve(false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
fs.writeFile(filePath, '', (err) => {
|
||||||
|
//
|
||||||
|
if (err) {
|
||||||
|
//
|
||||||
|
resolve(false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
resolve(true);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* remove a file name extension ...
|
||||||
|
*
|
||||||
|
* @param {string} name
|
||||||
|
* @returns {string} name without extension ...
|
||||||
|
*/
|
||||||
|
function removeFileExtension(name = '') {
|
||||||
|
return name.substring(0, name.lastIndexOf('.')) || name;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* retrieve a file extension ...
|
||||||
|
*
|
||||||
|
* @param {string} path a path which locate a file ...
|
||||||
|
* @returns {string}
|
||||||
|
*/
|
||||||
|
function getFileExtension(path = '') {
|
||||||
|
//
|
||||||
|
let result = "";
|
||||||
|
|
||||||
|
//
|
||||||
|
// Validate Arg ...
|
||||||
|
if (
|
||||||
|
!XValueTools.isValidArg(path)
|
||||||
|
|| !isFileExists(path)
|
||||||
|
) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Retrieve just file name ...
|
||||||
|
const fileName = basename(path);
|
||||||
|
result = fileName.replace(
|
||||||
|
removeFileExtension(fileName),
|
||||||
|
""
|
||||||
|
);
|
||||||
|
|
||||||
|
//
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* retrieve all files list recursively from specific path ...
|
||||||
|
*
|
||||||
|
* @param {string} path a source folder path ...
|
||||||
|
* @param {string[]} extensions which file extensions need to be listed, live empty for all files ...
|
||||||
|
* @returns {Promise<string[]>}
|
||||||
|
*/
|
||||||
|
async function getRecursiveFilesList(
|
||||||
|
path = "",
|
||||||
|
extensions = []
|
||||||
|
) {
|
||||||
|
//
|
||||||
|
let result = [];
|
||||||
|
|
||||||
|
//
|
||||||
|
// Validate Args ...
|
||||||
|
if (
|
||||||
|
!XValueTools.isValidArg(path)
|
||||||
|
|| !isDirectoryExists(path)
|
||||||
|
) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
const contents = await getDirectoryContents(path);
|
||||||
|
for (const item of contents) {
|
||||||
|
//
|
||||||
|
const itemPath = joinPath(
|
||||||
|
path,
|
||||||
|
item
|
||||||
|
);
|
||||||
|
|
||||||
|
//
|
||||||
|
const isItemFile = isFileExists(itemPath);
|
||||||
|
if (isItemFile) {
|
||||||
|
//
|
||||||
|
const itemFileExtension = getFileExtension(itemPath);
|
||||||
|
const isFileInSupportedExtensions =
|
||||||
|
extensions === undefined || extensions.length === 0
|
||||||
|
? true
|
||||||
|
: extensions.includes(itemFileExtension)
|
||||||
|
;
|
||||||
|
if (isFileInSupportedExtensions) {
|
||||||
|
result.push(itemPath);
|
||||||
|
}
|
||||||
|
} else if (isDirectoryExists(itemPath)) {
|
||||||
|
//
|
||||||
|
const itemPathFiles = await getRecursiveFilesList(itemPath, extensions);
|
||||||
|
result.push(...itemPathFiles);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Extract Specific files from a folder and it's content ...
|
||||||
|
*
|
||||||
|
* @param {string} path Folder Path ...
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
async function extractFiles(path = "", ext = [], excludeWorkspaceFolders = []) {
|
||||||
|
//
|
||||||
|
const result = [];
|
||||||
|
|
||||||
|
//
|
||||||
|
if (!ext || ext.length == 0) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
const pathContent = await getDirectoryContents(path);
|
||||||
|
if (!pathContent || pathContent.length == 0) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Loop through Content ...
|
||||||
|
for (const c of pathContent) {
|
||||||
|
//
|
||||||
|
// Prepare full path ...
|
||||||
|
const cPath = joinPath(path, c);
|
||||||
|
|
||||||
|
//
|
||||||
|
// check content path is file or not ...
|
||||||
|
const isCFile = isFileExists(cPath);
|
||||||
|
const isCDirectory = isDirectoryExists(cPath);
|
||||||
|
if (isCFile) {
|
||||||
|
//
|
||||||
|
// Check it is MQL file or not ...
|
||||||
|
const cExt = getFileExtension(cPath);
|
||||||
|
if (ext.includes(cExt)) {
|
||||||
|
result.push(cPath);
|
||||||
|
}
|
||||||
|
} else if (isCDirectory) {
|
||||||
|
//
|
||||||
|
const destFolderName = basename(cPath);
|
||||||
|
const isExcluded = excludeWorkspaceFolders.includes(destFolderName);
|
||||||
|
if (isExcluded) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
const cFiles = await extractFiles(cPath, ext);
|
||||||
|
if (cFiles && cFiles.length > 0) {
|
||||||
|
result.push(...cFiles);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
//#endregion
|
||||||
|
|
||||||
|
//
|
||||||
|
//#region Directory ...
|
||||||
|
/**
|
||||||
|
* create a directory ...
|
||||||
|
*
|
||||||
|
* @param {string} path destination path including dir name ...
|
||||||
|
* @param {boolean} recursive create directories recursively ...
|
||||||
|
* @returns action done or not ...
|
||||||
|
*/
|
||||||
|
function createDirectory(
|
||||||
|
path = '',
|
||||||
|
recursive = true
|
||||||
|
) {
|
||||||
|
//
|
||||||
|
let result = false;
|
||||||
|
|
||||||
|
//
|
||||||
|
if (
|
||||||
|
isDirectoryExists(path) ||
|
||||||
|
!XValueTools.isValidArg(path)
|
||||||
|
) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
try {
|
||||||
|
//
|
||||||
|
fs.mkdirSync(path, { recursive: recursive });
|
||||||
|
result = true;
|
||||||
|
return result;
|
||||||
|
} catch {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* remove a directory ...
|
||||||
|
*
|
||||||
|
* @param {string} path destination path including dir name ...
|
||||||
|
* @param {boolean} recursive removes directories recursively ...
|
||||||
|
* @returns {Promise<boolean>} action done or not ...
|
||||||
|
*/
|
||||||
|
function removeDirectory(
|
||||||
|
path = '',
|
||||||
|
recursive = false
|
||||||
|
) {
|
||||||
|
return new Promise((resolve) => {
|
||||||
|
//
|
||||||
|
if (!isDirectoryExists(path)) {
|
||||||
|
resolve(false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
fs.rm(path, {
|
||||||
|
recursive
|
||||||
|
}, (err) => {
|
||||||
|
//
|
||||||
|
if (err) {
|
||||||
|
resolve(false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
resolve(true);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* determines a path destination is a directory or not ...
|
||||||
|
*
|
||||||
|
* @param {string} path a folder path ...
|
||||||
|
* @returns represent destnation path is Directory or not ...
|
||||||
|
*/
|
||||||
|
function isDirectoryExists(path = '') {
|
||||||
|
//
|
||||||
|
if (!XValueTools.isValidArg(path)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
try {
|
||||||
|
//
|
||||||
|
const isExists = fs.existsSync(path);
|
||||||
|
if (!isExists) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
const stat = getStatus(path);
|
||||||
|
if (!stat) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
const result = stat.isDirectory();
|
||||||
|
return result;
|
||||||
|
} catch {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* retrieve a directory content ...
|
||||||
|
*
|
||||||
|
* @param {string} path a folder path ...
|
||||||
|
* @returns {Promise<string[]>} a collection of folder files ...
|
||||||
|
*/
|
||||||
|
function getDirectoryContents(path = '') {
|
||||||
|
return new Promise((resolve) => {
|
||||||
|
//
|
||||||
|
if (!isDirectoryExists(path)) {
|
||||||
|
resolve([]);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
fs.readdir(path, (err, content) => {
|
||||||
|
//
|
||||||
|
if (err) {
|
||||||
|
resolve([]);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
resolve(content);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* retrieve a directory files ...
|
||||||
|
*
|
||||||
|
* @param {string} path a folder path ...
|
||||||
|
* @returns {Promise<string[]>} a collection of folder files ...
|
||||||
|
*/
|
||||||
|
function getDirectoryFiles(
|
||||||
|
path = '',
|
||||||
|
containsHiddenFiles = false
|
||||||
|
) {
|
||||||
|
return new Promise((resolve) => {
|
||||||
|
//
|
||||||
|
if (!isDirectoryExists(path)) {
|
||||||
|
resolve([]);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
fs.readdir(path, (err, content) => {
|
||||||
|
//
|
||||||
|
if (err) {
|
||||||
|
resolve([]);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
if (!containsHiddenFiles) {
|
||||||
|
content = content.filter(c => !c.startsWith('.'));
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
const result = [];
|
||||||
|
content
|
||||||
|
.forEach(c => {
|
||||||
|
//
|
||||||
|
const cPath = Path.join(path, c);
|
||||||
|
if (isFileExists(cPath)) {
|
||||||
|
result.push(c);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
//
|
||||||
|
resolve(result);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* retrieve a directory folders ...
|
||||||
|
*
|
||||||
|
* @param {string} path a folder path ...
|
||||||
|
* @returns {Promise<string[]>} a collection of folder names ...
|
||||||
|
*/
|
||||||
|
function getDirectoryFolders(path = '') {
|
||||||
|
return new Promise((resolve) => {
|
||||||
|
//
|
||||||
|
if (!isDirectoryExists(path)) {
|
||||||
|
resolve([]);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
fs.readdir(path, (err, content) => {
|
||||||
|
//
|
||||||
|
if (err) {
|
||||||
|
resolve([]);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
const result = [];
|
||||||
|
content.forEach(c => {
|
||||||
|
//
|
||||||
|
const cPath = Path.join(path, c);
|
||||||
|
if (isDirectoryExists(cPath)) {
|
||||||
|
result.push(c);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
//
|
||||||
|
resolve(result);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* copy a folder with all of it's content to dest ...
|
||||||
|
*
|
||||||
|
* @param {string} source source folder path ...
|
||||||
|
* @param {string} dest dest folder path ...
|
||||||
|
* @returns {Promise<boolean>} action done or not ...
|
||||||
|
*/
|
||||||
|
async function copyFolder(
|
||||||
|
source = '',
|
||||||
|
dest = ''
|
||||||
|
) {
|
||||||
|
//
|
||||||
|
if (
|
||||||
|
!isDirectoryExists(source) ||
|
||||||
|
!XValueTools.isValidArg(dest) ||
|
||||||
|
!XValueTools.isValidArg(source)
|
||||||
|
) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
const folderName = Path.basename(source);
|
||||||
|
const destPath = Path.join(dest, folderName);
|
||||||
|
|
||||||
|
//
|
||||||
|
// Create Dest Path folder if not exists ...
|
||||||
|
if (!isDirectoryExists(destPath)) {
|
||||||
|
//
|
||||||
|
let result = createDirectory(destPath, true);
|
||||||
|
if (!result) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Files ...
|
||||||
|
const files = await getDirectoryFiles(source);
|
||||||
|
if (files && files.constructor === Array && files.length > 0) {
|
||||||
|
//
|
||||||
|
const filesPromises = files.map(file => copyFile(Path.join(source, file), destPath));
|
||||||
|
const filesResult = (await Promise.all(filesPromises)).every(r => !!r);
|
||||||
|
if (!filesResult) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Folders ...
|
||||||
|
const folders = await getDirectoryFolders(source);
|
||||||
|
if (folders && folders.constructor === Array && folders.length > 0) {
|
||||||
|
//
|
||||||
|
const folderPromises = folders.map(folder => copyFolder(Path.join(source, folder), destPath));
|
||||||
|
const filesResult = (await Promise.all(folderPromises)).every(r => !!r);
|
||||||
|
if (!filesResult) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
//#endregion
|
||||||
|
|
||||||
|
//
|
||||||
|
//#region Downloader ...
|
||||||
|
/**
|
||||||
|
* download a file from specific url and store it ...
|
||||||
|
*
|
||||||
|
* @param {string} filepath the file name and path which required to put download file on it ...
|
||||||
|
* @param {string} url the web url for downloading ...
|
||||||
|
*/
|
||||||
|
function download(filepath, url) {
|
||||||
|
//
|
||||||
|
// Validate Args ...
|
||||||
|
if (
|
||||||
|
!XValueTools.isValidArg(url)
|
||||||
|
|| !XValueTools.isValidURL(url)
|
||||||
|
|| !XValueTools.isValidArg(filepath)
|
||||||
|
) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
var file = fs.createWriteStream(filepath);
|
||||||
|
|
||||||
|
//
|
||||||
|
if (url.startsWith('https:')) {
|
||||||
|
https.get(url, function (response) {
|
||||||
|
response.pipe(file);
|
||||||
|
});
|
||||||
|
} else if (url.startsWith('http:')) {
|
||||||
|
http.get(url, function (response) {
|
||||||
|
response.pipe(file);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//#endregion
|
||||||
|
|
||||||
|
//
|
||||||
|
//#region JSON ...
|
||||||
|
/**
|
||||||
|
* read and parse a JSON content from a file ...
|
||||||
|
*
|
||||||
|
* @param {string} path source file path ...
|
||||||
|
* @returns {any}
|
||||||
|
*/
|
||||||
|
function readJSON(path = "") {
|
||||||
|
//
|
||||||
|
// Validate Args ...
|
||||||
|
if (!isFileExists(path)) {
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
let result = undefined;
|
||||||
|
try {
|
||||||
|
result = require(path);
|
||||||
|
} catch {
|
||||||
|
result = undefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* write a JSON Object content into a file ...
|
||||||
|
*
|
||||||
|
* @param {string} path dest file path ...
|
||||||
|
* @param {any} content an object which required to write to file ...
|
||||||
|
* @returns {Promise<boolean>}
|
||||||
|
*/
|
||||||
|
async function writeJSON(
|
||||||
|
path = "",
|
||||||
|
content = undefined
|
||||||
|
) {
|
||||||
|
//
|
||||||
|
let result = false;
|
||||||
|
|
||||||
|
//
|
||||||
|
// Validate Args ...
|
||||||
|
if (!XValueTools.isValidArg(path)) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Normallize Content ...
|
||||||
|
if (content === undefined) {
|
||||||
|
content = {};
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
const contentString = XValueTools.beautifyJSON(content);
|
||||||
|
|
||||||
|
//
|
||||||
|
result = await writeFile(
|
||||||
|
path,
|
||||||
|
contentString,
|
||||||
|
true
|
||||||
|
);
|
||||||
|
|
||||||
|
//
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
//#endregion
|
||||||
|
//#endregion
|
||||||
|
|
||||||
|
//
|
||||||
|
//#region Module Exports ...
|
||||||
|
module.exports = {
|
||||||
|
//
|
||||||
|
CurrentDir,
|
||||||
|
PathSeparator,
|
||||||
|
|
||||||
|
//
|
||||||
|
getStatus,
|
||||||
|
getHomePath,
|
||||||
|
|
||||||
|
//
|
||||||
|
basename,
|
||||||
|
joinPath,
|
||||||
|
resolvePath,
|
||||||
|
|
||||||
|
//
|
||||||
|
download,
|
||||||
|
|
||||||
|
//
|
||||||
|
readJSON,
|
||||||
|
writeJSON,
|
||||||
|
|
||||||
|
//
|
||||||
|
copyFile,
|
||||||
|
readFile,
|
||||||
|
writeFile,
|
||||||
|
createFile,
|
||||||
|
removeFile,
|
||||||
|
isFileExists,
|
||||||
|
getFileExtension,
|
||||||
|
removeFileExtension,
|
||||||
|
getRecursiveFilesList,
|
||||||
|
extractFiles,
|
||||||
|
|
||||||
|
//
|
||||||
|
copyFolder,
|
||||||
|
createDirectory,
|
||||||
|
removeDirectory,
|
||||||
|
isDirectoryExists,
|
||||||
|
getDirectoryFiles,
|
||||||
|
getDirectoryFolders,
|
||||||
|
getDirectoryContents,
|
||||||
|
};
|
||||||
|
//#endregion
|
||||||
@@ -0,0 +1,219 @@
|
|||||||
|
/**
|
||||||
|
* XShell Tools Module ...
|
||||||
|
* a module for handling shell actions and retrieve OS Info in node js ...
|
||||||
|
*
|
||||||
|
* Maintainer
|
||||||
|
*
|
||||||
|
* Hadi Khazaee Asl <https://saherelm.ir> (hadi_khazaee_asl@yahoo.com)
|
||||||
|
*/
|
||||||
|
|
||||||
|
//
|
||||||
|
//#region Imports ...
|
||||||
|
const os = require('os');
|
||||||
|
const process = require('process');
|
||||||
|
const { exec } = require("child_process");
|
||||||
|
const XFileTools = require('./x-file.tools');
|
||||||
|
//#endregion
|
||||||
|
|
||||||
|
//
|
||||||
|
//#region Constants ...
|
||||||
|
//
|
||||||
|
const OS = {
|
||||||
|
Aix: 'aix',
|
||||||
|
Darwin: 'darwin',
|
||||||
|
FreeBSD: 'freebsd',
|
||||||
|
Linux: 'linux',
|
||||||
|
OpenBSD: 'openbsd',
|
||||||
|
SnOS: 'sunos',
|
||||||
|
Windows: 'win32'
|
||||||
|
};
|
||||||
|
|
||||||
|
//
|
||||||
|
const isWindows = process.platform === OS.Windows;
|
||||||
|
//#endregion
|
||||||
|
|
||||||
|
//
|
||||||
|
//#region Actions ...
|
||||||
|
//
|
||||||
|
//#region Pure shell commands ...
|
||||||
|
/**
|
||||||
|
* execute a command using NodeJS on shell ...
|
||||||
|
*
|
||||||
|
* @param {string} cmd command to execute ...
|
||||||
|
* @param {string} cwd working directory ...
|
||||||
|
*
|
||||||
|
* @returns Promise<any, errr> instance ...
|
||||||
|
*/
|
||||||
|
function execute(cmd, cwd) {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
//
|
||||||
|
if (!cmd || cmd.toString().length === 0 || (cwd && !XFileTools.isDirectoryExists(cwd))) {
|
||||||
|
reject('invalid args ...');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
exec(cmd, { cwd }, (err, result, stdError) => {
|
||||||
|
//
|
||||||
|
if (err) {
|
||||||
|
reject(err);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
if (stdError) {
|
||||||
|
//
|
||||||
|
// reject(stdError);
|
||||||
|
// return;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
resolve(result);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* determines a command exists on host or not ...
|
||||||
|
*
|
||||||
|
* @param {string} name specific command name ...
|
||||||
|
*
|
||||||
|
* @returns boolean Promise ...
|
||||||
|
*/
|
||||||
|
function checkCommandExists(name) {
|
||||||
|
return new Promise(resolve => {
|
||||||
|
//
|
||||||
|
if (!name) {
|
||||||
|
resolve(false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
const cmd = isWindows ? `${name} >nul 2>&1` : `type ${name} >/dev/null 2>&1`;
|
||||||
|
execute(cmd).then(result => {
|
||||||
|
resolve(true);
|
||||||
|
})
|
||||||
|
.catch(err => {
|
||||||
|
resolve(false);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
//#endregion
|
||||||
|
|
||||||
|
//
|
||||||
|
//#region required commands state ...
|
||||||
|
/**
|
||||||
|
* check al required commands exists or not ...
|
||||||
|
*
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
async function isRequiredCommandsExists() {
|
||||||
|
//
|
||||||
|
let result = false;
|
||||||
|
|
||||||
|
//
|
||||||
|
// const isTarExists = await isTarCommandExists();
|
||||||
|
// const isCatExists = await isCatCommandExists();
|
||||||
|
// const isGrepExists = await isGrepCommandExists();
|
||||||
|
// const isSedExists = await isSedCommandExists();
|
||||||
|
const isNpmExists = await isNpmCommandExists();
|
||||||
|
const isNgExists = await isNgCommandExists();
|
||||||
|
const isIonicExists = await isIonicCommandExists();
|
||||||
|
const isCordovaExists = await isCordovaCommandExists();
|
||||||
|
|
||||||
|
//
|
||||||
|
result = isNpmExists
|
||||||
|
&& isNgExists
|
||||||
|
&& isIonicExists
|
||||||
|
&& isCordovaExists
|
||||||
|
;
|
||||||
|
|
||||||
|
//
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* retrieve required commands state object ...
|
||||||
|
*
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
async function getRequiredCommandsStates() {
|
||||||
|
//
|
||||||
|
const result = {};
|
||||||
|
|
||||||
|
//
|
||||||
|
// const isTarExists = await isTarCommandExists();
|
||||||
|
// const isCatExists = await isCatCommandExists();
|
||||||
|
// const isGrepExists = await isGrepCommandExists();
|
||||||
|
// const isSedExists = await isSedCommandExists();
|
||||||
|
const isNpmExists = await isNpmCommandExists();
|
||||||
|
const isNgExists = await isNgCommandExists();
|
||||||
|
const isIonicExists = await isIonicCommandExists();
|
||||||
|
const isCordovaExists = await isCordovaCommandExists();
|
||||||
|
|
||||||
|
//
|
||||||
|
result['npm'] = isNpmExists;
|
||||||
|
result['ng'] = isNgExists;
|
||||||
|
result['ionic'] = isIonicExists;
|
||||||
|
result['cordova'] = isCordovaExists;
|
||||||
|
|
||||||
|
//
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
//#endregion
|
||||||
|
|
||||||
|
//
|
||||||
|
//#region Commonly used Command Checkers ...
|
||||||
|
/**
|
||||||
|
* determines npm command exists or not ...
|
||||||
|
*
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
function isNpmCommandExists() {
|
||||||
|
return checkCommandExists('npm');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* determines ng command exists or not ...
|
||||||
|
*
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
function isNgCommandExists() {
|
||||||
|
return checkCommandExists('ng');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* determines ionic command exists or not ...
|
||||||
|
*
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
function isIonicCommandExists() {
|
||||||
|
return checkCommandExists('ionic');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* determines cordova command exists or not ...
|
||||||
|
*
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
function isCordovaCommandExists() {
|
||||||
|
return checkCommandExists('cordova');
|
||||||
|
}
|
||||||
|
//#endregion
|
||||||
|
//#endregion
|
||||||
|
|
||||||
|
//
|
||||||
|
//#region Module Exports ...
|
||||||
|
module.exports = {
|
||||||
|
//
|
||||||
|
execute,
|
||||||
|
checkCommandExists,
|
||||||
|
isRequiredCommandsExists,
|
||||||
|
getRequiredCommandsStates,
|
||||||
|
|
||||||
|
//
|
||||||
|
isNgCommandExists,
|
||||||
|
isIonicCommandExists,
|
||||||
|
isCordovaCommandExists,
|
||||||
|
}
|
||||||
|
//#endregion
|
||||||
@@ -0,0 +1,268 @@
|
|||||||
|
/**
|
||||||
|
* DataType Tools Module ...
|
||||||
|
* a module for manipulate and detect supported data types in node js ...
|
||||||
|
*
|
||||||
|
* Maintainer
|
||||||
|
*
|
||||||
|
* Hadi Khazaee Asl <https://saherelm.ir> (hadi_khazaee_asl@yahoo.com)
|
||||||
|
*/
|
||||||
|
|
||||||
|
//
|
||||||
|
//#region Constants ...
|
||||||
|
/**
|
||||||
|
* all supported data types ...
|
||||||
|
*/
|
||||||
|
const DataTypes = {
|
||||||
|
Null: 'null',
|
||||||
|
Date: 'date',
|
||||||
|
Array: 'array',
|
||||||
|
Object: 'object',
|
||||||
|
String: 'string',
|
||||||
|
Number: 'number',
|
||||||
|
Unknown: 'unknown',
|
||||||
|
Boolean: 'boolean',
|
||||||
|
Function: 'function',
|
||||||
|
Undefined: 'undefined',
|
||||||
|
};
|
||||||
|
//#endregion
|
||||||
|
|
||||||
|
//
|
||||||
|
//#region Actions ...
|
||||||
|
/**
|
||||||
|
* detect type of a content ...
|
||||||
|
*
|
||||||
|
* @param {any} value the content which going to check ...
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
function getType(value) {
|
||||||
|
//
|
||||||
|
const type = typeof value;
|
||||||
|
|
||||||
|
//
|
||||||
|
let result = DataTypes.Unknown;
|
||||||
|
let dateIdentifier = '[object Date]';
|
||||||
|
let constructor = value && value.constructor ?
|
||||||
|
value.constructor.toString() :
|
||||||
|
'';
|
||||||
|
|
||||||
|
//
|
||||||
|
switch (type) {
|
||||||
|
//
|
||||||
|
case 'undefined':
|
||||||
|
result = DataTypes.Undefined;
|
||||||
|
break;
|
||||||
|
|
||||||
|
//
|
||||||
|
case 'boolean':
|
||||||
|
result = DataTypes.Boolean;
|
||||||
|
break;
|
||||||
|
|
||||||
|
//
|
||||||
|
case 'string':
|
||||||
|
result = DataTypes.String;
|
||||||
|
break;
|
||||||
|
|
||||||
|
//
|
||||||
|
case 'number':
|
||||||
|
result = DataTypes.Number;
|
||||||
|
break;
|
||||||
|
|
||||||
|
//
|
||||||
|
case 'function':
|
||||||
|
result = DataTypes.Function;
|
||||||
|
break;
|
||||||
|
|
||||||
|
//
|
||||||
|
case 'object':
|
||||||
|
//
|
||||||
|
// Null ...
|
||||||
|
if (value === null) {
|
||||||
|
result = DataTypes.Null;
|
||||||
|
} else
|
||||||
|
//
|
||||||
|
// Array ...
|
||||||
|
if (Array.isArray(value)) {
|
||||||
|
result = DataTypes.Array;
|
||||||
|
} else
|
||||||
|
//
|
||||||
|
// Data ...
|
||||||
|
if (
|
||||||
|
value instanceof Date ||
|
||||||
|
isFunction(value.getMonth) ||
|
||||||
|
constructor.includes(dateIdentifier) ||
|
||||||
|
Object.prototype.toString.call(value) === dateIdentifier
|
||||||
|
) {
|
||||||
|
result = DataTypes.Date;
|
||||||
|
} else
|
||||||
|
//
|
||||||
|
// Object ...
|
||||||
|
{
|
||||||
|
result = DataTypes.Object;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
//
|
||||||
|
default:
|
||||||
|
result = DataTypes.Unknown;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* retrieve an object constructor ...
|
||||||
|
*
|
||||||
|
* @param {any} value the content which going to check ...
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
function getConstructor(value) {
|
||||||
|
//
|
||||||
|
const result = value && value.constructor ?
|
||||||
|
value.constructor.toString() :
|
||||||
|
'';
|
||||||
|
|
||||||
|
//
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* retrieve an object prototype ...
|
||||||
|
*
|
||||||
|
* @param {any} value the content which going to check ...
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
function getPrototype(value) {
|
||||||
|
//
|
||||||
|
const result = value ?
|
||||||
|
Object.prototype.toString.call(value) :
|
||||||
|
'';
|
||||||
|
|
||||||
|
//
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* check an object is null or not ...
|
||||||
|
*
|
||||||
|
* @param {any} value the content which going to check ...
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
function isNull(value) {
|
||||||
|
return getType(value) === DataTypes.Null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* check an object is undefined or not ...
|
||||||
|
*
|
||||||
|
* @param {any} value the content which going to check ...
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
function isUndefined(value) {
|
||||||
|
return getType(value) === DataTypes.Undefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* check an object is null or undefined or not ...
|
||||||
|
*
|
||||||
|
* @param {any} value the content which going to check ...
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
function isNullOrUndefined(value) {
|
||||||
|
return isNull(value) || isUndefined(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* check an object is a date or not ...
|
||||||
|
*
|
||||||
|
* @param {any} value the content which going to check ...
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
function isDate(value) {
|
||||||
|
return getType(value) === DataTypes.Date;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* check an object is number or not ...
|
||||||
|
*
|
||||||
|
* @param {any} value the content which going to check ...
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
function isNumber(value) {
|
||||||
|
return getType(value) === DataTypes.Number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* check an object is string or not ...
|
||||||
|
*
|
||||||
|
* @param {any} value the content which going to check ...
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
function isString(value) {
|
||||||
|
return getType(value) === DataTypes.String;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* check an object is boolean or not ...
|
||||||
|
*
|
||||||
|
* @param {any} value the content which going to check ...
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
function isBoolean(value) {
|
||||||
|
return getType(value) === DataTypes.Boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* check an object is an Array or not ...
|
||||||
|
*
|
||||||
|
* @param {any} value the content which going to check ...
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
function isArray(value) {
|
||||||
|
return getType(value) === DataTypes.Array;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* check an object is and Object or not ...
|
||||||
|
*
|
||||||
|
* @param {any} value the content which going to check ...
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
function isObject(value) {
|
||||||
|
return getType(value) === DataTypes.Object;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* check an object is a Function or not ...
|
||||||
|
*
|
||||||
|
* @param {any} value the content which going to check ...
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
function isFunction(value) {
|
||||||
|
return getType(value) === DataTypes.Function;
|
||||||
|
}
|
||||||
|
//#endregion
|
||||||
|
|
||||||
|
//
|
||||||
|
//#region Module Exports ...
|
||||||
|
module.exports = {
|
||||||
|
//
|
||||||
|
DataTypes,
|
||||||
|
|
||||||
|
//
|
||||||
|
getType,
|
||||||
|
getConstructor,
|
||||||
|
getPrototype,
|
||||||
|
isNull,
|
||||||
|
isUndefined,
|
||||||
|
isNullOrUndefined,
|
||||||
|
isDate,
|
||||||
|
isNumber,
|
||||||
|
isString,
|
||||||
|
isBoolean,
|
||||||
|
isArray,
|
||||||
|
isObject,
|
||||||
|
isFunction,
|
||||||
|
}
|
||||||
|
//#endregion
|
||||||
File diff suppressed because it is too large
Load Diff
+1
-1
Submodule Modules/xApiSDKHolder updated: 2f271b21a2...60b4f6df69
+1
-1
Submodule Modules/xCategoryService updated: 335fd95d23...6c7fd31a93
+1
-1
Submodule Modules/xCommons updated: f9c6671dd7...870e9596af
+1
-1
Submodule Modules/xDataService updated: 2b17be0575...9e8fc9a510
+1
-1
Submodule Modules/xEventService updated: 4765d255af...564c80fd91
+1
-1
Submodule Modules/xExceptions updated: 158968ec88...de7d2c18cc
+1
-1
Submodule Modules/xFileService updated: 19ef6aa887...3b2a869fb2
Submodule
+1
Submodule Modules/xFrameworkComponentsHolder added at 8ab1322222
Submodule
+1
Submodule Modules/xFrameworkCoreHolder added at fb123afb95
Submodule
+1
Submodule Modules/xFrameworkIdentitySDKHolder added at d0b8116448
Submodule
+1
Submodule Modules/xFrameworkPushServiceHolder added at bbdabb0108
Submodule
+1
Submodule Modules/xFrameworkServicesHolder added at d34473ad52
+1
-1
Submodule Modules/xHttpService updated: b122b51833...7c07bfc063
+1
-1
Submodule Modules/xIdentityModels updated: ccae6137fb...ca6fbc2201
+1
-1
Submodule Modules/xIdentityService updated: 7e6f547081...4be04e5ddf
+1
-1
Submodule Modules/xMessageService updated: 53e2e7473d...2817e62d93
+1
-1
Submodule Modules/xModels updated: fa57be5fa5...4c8a06aa3e
+1
-1
Submodule Modules/xPushService updated: ba3adfeadb...844ea07a02
+1
-1
Submodule Modules/xStorageService updated: 6e701376df...f323c85bb6
+1
-1
Submodule Modules/xStringService updated: 85fbc0899d...e6920fd447
+1
-1
Submodule Modules/xTagService updated: 003c313d7c...2a5009febc
Submodule Modules/xTermsAndConditionsService updated: 313897e911...8434172018
+1
-1
Submodule Modules/xWebinarService updated: 00b2819130...f559811f8b
+297
-1
@@ -7,6 +7,7 @@
|
|||||||
"z01": "|---------------|",
|
"z01": "|---------------|",
|
||||||
"z02": "| Common |",
|
"z02": "| Common |",
|
||||||
"z03": "|---------------|",
|
"z03": "|---------------|",
|
||||||
|
"true": "",
|
||||||
"loginRegistry": "npm login --registry https://npm.saherelmhub.ir/",
|
"loginRegistry": "npm login --registry https://npm.saherelmhub.ir/",
|
||||||
"addUserRegistry": "npm adduser --registry https://npm.saherelmhub.ir/",
|
"addUserRegistry": "npm adduser --registry https://npm.saherelmhub.ir/",
|
||||||
"z04": "|---------------|",
|
"z04": "|---------------|",
|
||||||
@@ -22,10 +23,25 @@
|
|||||||
"z4": "|---------------|",
|
"z4": "|---------------|",
|
||||||
"z5": "| /Git |",
|
"z5": "| /Git |",
|
||||||
"z6": "|---------------|",
|
"z6": "|---------------|",
|
||||||
|
"q1": "|---------------|",
|
||||||
|
"q2": "| Scripts |",
|
||||||
|
"q3": "|---------------|",
|
||||||
|
"moduleHandler": "node ./Documents/Scripts/nugetModuleHandler.js",
|
||||||
|
"do": "npm run moduleHandler **do",
|
||||||
|
"doClean": "npm run do clean",
|
||||||
|
"doRestore": "npm run do restore",
|
||||||
|
"doBuild": "npm run do build",
|
||||||
|
"doRmBin": "npm run do rmBin",
|
||||||
|
"doClearPacked": "npm run do clearPacked",
|
||||||
|
"doPack": "npm run do pack",
|
||||||
|
"doCp": "npm run do cp",
|
||||||
|
"doRePack": "npm run do repack",
|
||||||
|
"q4": "|---------------|",
|
||||||
|
"q5": "| /Scripts |",
|
||||||
|
"q6": "|---------------|",
|
||||||
"a1": "|---------------|",
|
"a1": "|---------------|",
|
||||||
"a2": "| DotNet |",
|
"a2": "| DotNet |",
|
||||||
"a3": "|---------------|",
|
"a3": "|---------------|",
|
||||||
"true": "",
|
|
||||||
"dotClean": "dotnet clean",
|
"dotClean": "dotnet clean",
|
||||||
"dotBuild": "dotnet build",
|
"dotBuild": "dotnet build",
|
||||||
"dotRestore": "dotnet restore",
|
"dotRestore": "dotnet restore",
|
||||||
@@ -64,6 +80,286 @@
|
|||||||
"g4": "|---------------|",
|
"g4": "|---------------|",
|
||||||
"g5": "| /Nuget |",
|
"g5": "| /Nuget |",
|
||||||
"g6": "|---------------|",
|
"g6": "|---------------|",
|
||||||
|
"zz1": "|---------------|",
|
||||||
|
"zz2": "| NugetModules |",
|
||||||
|
"zz3": "|---------------|",
|
||||||
|
"zza1": "|---------------|",
|
||||||
|
"zza2": "| xExceptions |",
|
||||||
|
"zza3": "|---------------|",
|
||||||
|
"cleanExceptions": "npm run doClean xExceptions",
|
||||||
|
"restoreExceptions": "npm run doRestore xExceptions",
|
||||||
|
"buildExceptions": "npm run doBuild xExceptions",
|
||||||
|
"packExceptions": "npm run doPack xExceptions",
|
||||||
|
"cpExceptions": "npm run doCp xExceptions",
|
||||||
|
"repackExceptions": "npm run doRePack xExceptions",
|
||||||
|
"zza4": "|---------------|",
|
||||||
|
"zza5": "| /xExceptions |",
|
||||||
|
"zza6": "|---------------|",
|
||||||
|
"zzb1": "|---------------|",
|
||||||
|
"zzb2": "| xCommons |",
|
||||||
|
"zzb3": "|---------------|",
|
||||||
|
"cleanCommons": "npm run doClean xCommons",
|
||||||
|
"restoreCommons": "npm run doRestore xCommons",
|
||||||
|
"buildCommons": "npm run doBuild xCommons",
|
||||||
|
"packCommons": "npm run doPack xCommons",
|
||||||
|
"cpCommons": "npm run doCp xCommons",
|
||||||
|
"repackCommons": "npm run doRePack xCommons",
|
||||||
|
"zzb4": "|---------------|",
|
||||||
|
"zzb5": "| /xCommons |",
|
||||||
|
"zzb6": "|---------------|",
|
||||||
|
"zzc1": "|---------------|",
|
||||||
|
"zzc2": "| xModels |",
|
||||||
|
"zzc3": "|---------------|",
|
||||||
|
"cleanModels": "npm run doClean xModels",
|
||||||
|
"restoreModels": "npm run doRestore xModels",
|
||||||
|
"buildModels": "npm run doBuild xModels",
|
||||||
|
"packModels": "npm run doPack xModels",
|
||||||
|
"cpModels": "npm run doCp xModels",
|
||||||
|
"repackModels": "npm run doRePack xModels",
|
||||||
|
"zzc4": "|---------------|",
|
||||||
|
"zzc5": "| /xModels |",
|
||||||
|
"zzc6": "|---------------|",
|
||||||
|
"zzd1": "|------------------|",
|
||||||
|
"zzd2": "| xMessageService |",
|
||||||
|
"zzd3": "|------------------|",
|
||||||
|
"cleanMessageService": "npm run doClean xMessageService",
|
||||||
|
"restoreMessageService": "npm run doRestore xMessageService",
|
||||||
|
"buildMessageService": "npm run doBuild xMessageService",
|
||||||
|
"packMessageService": "npm run doPack xMessageService",
|
||||||
|
"cpMessageService": "npm run doCp xMessageService",
|
||||||
|
"repackMessageService": "npm run doRePack xMessageService",
|
||||||
|
"zzd4": "|------------------|",
|
||||||
|
"zzd5": "| /xMessageService |",
|
||||||
|
"zzd6": "|------------------|",
|
||||||
|
"zze1": "|------------------|",
|
||||||
|
"zze2": "| xStorageService |",
|
||||||
|
"zze3": "|------------------|",
|
||||||
|
"cleanStorageService": "npm run doClean xStorageService",
|
||||||
|
"restoreStorageService": "npm run doRestore xStorageService",
|
||||||
|
"buildStorageService": "npm run doBuild xStorageService",
|
||||||
|
"packStorageService": "npm run doPack xStorageService",
|
||||||
|
"cpStorageService": "npm run doCp xStorageService",
|
||||||
|
"repackStorageService": "npm run doRePack xStorageService",
|
||||||
|
"zze4": "|------------------|",
|
||||||
|
"zze5": "| /xStorageService |",
|
||||||
|
"zze6": "|------------------|",
|
||||||
|
"zzf1": "|---------------|",
|
||||||
|
"zzf2": "| xDataService |",
|
||||||
|
"zzf3": "|---------------|",
|
||||||
|
"cleanDataService": "npm run doClean xDataService",
|
||||||
|
"restoreDataService": "npm run doRestore xDataService",
|
||||||
|
"buildDataService": "npm run doBuild xDataService",
|
||||||
|
"packDataService": "npm run doPack xDataService",
|
||||||
|
"cpDataService": "npm run doCp xDataService",
|
||||||
|
"repackDataService": "npm run doRePack xDataService",
|
||||||
|
"zzf4": "|---------------|",
|
||||||
|
"zzf5": "| /xDataService |",
|
||||||
|
"zzf6": "|---------------|",
|
||||||
|
"zzg1": "|------------------|",
|
||||||
|
"zzg2": "| xIdentityModels |",
|
||||||
|
"zzg3": "|------------------|",
|
||||||
|
"cleanIdentityModels": "npm run doClean xIdentityModels",
|
||||||
|
"restoreIdentityModels": "npm run doRestore xIdentityModels",
|
||||||
|
"buildIdentityModels": "npm run doBuild xIdentityModels",
|
||||||
|
"packIdentityModels": "npm run doPack xIdentityModels",
|
||||||
|
"cpIdentityModels": "npm run doCp xIdentityModels",
|
||||||
|
"repackIdentityModels": "npm run doRePack xIdentityModels",
|
||||||
|
"zzg4": "|------------------|",
|
||||||
|
"zzg5": "| /xIdentityModels |",
|
||||||
|
"zzg6": "|------------------|",
|
||||||
|
"zzh1": "|---------------|",
|
||||||
|
"zzh2": "| xHttpService |",
|
||||||
|
"zzh3": "|---------------|",
|
||||||
|
"cleanHttpService": "npm run doClean xHttpService",
|
||||||
|
"restoreHttpService": "npm run doRestore xHttpService",
|
||||||
|
"buildHttpService": "npm run doBuild xHttpService",
|
||||||
|
"packHttpService": "npm run doPack xHttpService",
|
||||||
|
"cpHttpService": "npm run doCp xHttpService",
|
||||||
|
"repackHttpService": "npm run doRePack xHttpService",
|
||||||
|
"zzh4": "|---------------|",
|
||||||
|
"zzh5": "| /xHttpService |",
|
||||||
|
"zzh6": "|---------------|",
|
||||||
|
"zzi1": "|-------------------|",
|
||||||
|
"zzi2": "| xIdentityService |",
|
||||||
|
"zzi3": "|-------------------|",
|
||||||
|
"cleanIdentityService": "npm run doClean xIdentityService",
|
||||||
|
"restoreIdentityService": "npm run doRestore xIdentityService",
|
||||||
|
"buildIdentityService": "npm run doBuild xIdentityService",
|
||||||
|
"packIdentityService": "npm run doPack xIdentityService",
|
||||||
|
"cpIdentityService": "npm run doCp xIdentityService",
|
||||||
|
"repackIdentityService": "npm run doRePack xIdentityService",
|
||||||
|
"zzi4": "|-------------------|",
|
||||||
|
"zzi5": "| /xIdentityService |",
|
||||||
|
"zzi6": "|-------------------|",
|
||||||
|
"zzj1": "|---------------|",
|
||||||
|
"zzj2": "| xPushService |",
|
||||||
|
"zzj3": "|---------------|",
|
||||||
|
"cleanPushService": "npm run doClean xPushService",
|
||||||
|
"restorePushService": "npm run doRestore xPushService",
|
||||||
|
"buildPushService": "npm run doBuild xPushService",
|
||||||
|
"packPushService": "npm run doPack xPushService",
|
||||||
|
"cpPushService": "npm run doCp xPushService",
|
||||||
|
"repackPushService": "npm run doRePack xPushService",
|
||||||
|
"zzj4": "|---------------|",
|
||||||
|
"zzj5": "| /xPushService |",
|
||||||
|
"zzj6": "|---------------|",
|
||||||
|
"zzk1": "|----------------|",
|
||||||
|
"zzk2": "| xEventService |",
|
||||||
|
"zzk3": "|----------------|",
|
||||||
|
"cleanEventService": "npm run doClean xEventService",
|
||||||
|
"restoreEventService": "npm run doRestore xEventService",
|
||||||
|
"buildEventService": "npm run doBuild xEventService",
|
||||||
|
"packEventService": "npm run doPack xEventService",
|
||||||
|
"cpEventService": "npm run doCp xEventService",
|
||||||
|
"repackEventService": "npm run doRePack xEventService",
|
||||||
|
"zzk4": "|----------------|",
|
||||||
|
"zzk5": "| /xEventService |",
|
||||||
|
"zzk6": "|----------------|",
|
||||||
|
"zzl1": "|-----------------|",
|
||||||
|
"zzl2": "| xStringService |",
|
||||||
|
"zzl3": "|-----------------|",
|
||||||
|
"cleanStringService": "npm run doClean xStringService",
|
||||||
|
"restoreStringService": "npm run doRestore xStringService",
|
||||||
|
"buildStringService": "npm run doBuild xStringService",
|
||||||
|
"packStringService": "npm run doPack xStringService",
|
||||||
|
"cpStringService": "npm run doCp xStringService",
|
||||||
|
"repackStringService": "npm run doRePack xStringService",
|
||||||
|
"zzl4": "|-----------------|",
|
||||||
|
"zzl5": "| /xStringService |",
|
||||||
|
"zzl6": "|-----------------|",
|
||||||
|
"zzm1": "|-----------------------------|",
|
||||||
|
"zzm2": "| xTermsAndConditionsService |",
|
||||||
|
"zzm3": "|-----------------------------|",
|
||||||
|
"cleanTermsAndConditionsService": "npm run doClean xTermsAndConditionsService",
|
||||||
|
"restoreTermsAndConditionsService": "npm run doRestore xTermsAndConditionsService",
|
||||||
|
"buildTermsAndConditionsService": "npm run doBuild xTermsAndConditionsService",
|
||||||
|
"packTermsAndConditionsService": "npm run doPack xTermsAndConditionsService",
|
||||||
|
"cpTermsAndConditionsService": "npm run doCp xTermsAndConditionsService",
|
||||||
|
"repackTermsAndConditionsService": "npm run doRePack xTermsAndConditionsService",
|
||||||
|
"zzm4": "|-----------------------------|",
|
||||||
|
"zzm5": "| /xTermsAndConditionsService |",
|
||||||
|
"zzm6": "|-----------------------------|",
|
||||||
|
"zzn1": "|-------------------|",
|
||||||
|
"zzn2": "| xCategoryService |",
|
||||||
|
"zzn3": "|-------------------|",
|
||||||
|
"cleanCategoryService": "npm run doClean xCategoryService",
|
||||||
|
"restoreCategoryService": "npm run doRestore xCategoryService",
|
||||||
|
"buildCategoryService": "npm run doBuild xCategoryService",
|
||||||
|
"packCategoryService": "npm run doPack xCategoryService",
|
||||||
|
"cpCategoryService": "npm run doCp xCategoryService",
|
||||||
|
"repackCategoryService": "npm run doRePack xCategoryService",
|
||||||
|
"zzn4": "|-------------------|",
|
||||||
|
"zzn5": "| /xCategoryService |",
|
||||||
|
"zzn6": "|-------------------|",
|
||||||
|
"zzo1": "|--------------|",
|
||||||
|
"zzo2": "| xTagService |",
|
||||||
|
"zzo3": "|--------------|",
|
||||||
|
"cleanTagService": "npm run doClean xTagService",
|
||||||
|
"restoreTagService": "npm run doRestore xTagService",
|
||||||
|
"buildTagService": "npm run doBuild xTagService",
|
||||||
|
"packTagService": "npm run doPack xTagService",
|
||||||
|
"cpTagService": "npm run doCp xTagService",
|
||||||
|
"repackTagService": "npm run doRePack xTagService",
|
||||||
|
"zzo4": "|--------------|",
|
||||||
|
"zzo5": "| /xTagService |",
|
||||||
|
"zzo6": "|--------------|",
|
||||||
|
"zzp1": "|---------------|",
|
||||||
|
"zzp2": "| xFileService |",
|
||||||
|
"zzp3": "|---------------|",
|
||||||
|
"cleanFileService": "npm run doClean xFileService",
|
||||||
|
"restoreFileService": "npm run doRestore xFileService",
|
||||||
|
"buildFileService": "npm run doBuild xFileService",
|
||||||
|
"packFileService": "npm run doPack xFileService",
|
||||||
|
"cpFileService": "npm run doCp xFileService",
|
||||||
|
"repackFileService": "npm run doRePack xFileService",
|
||||||
|
"zzp4": "|---------------|",
|
||||||
|
"zzp5": "| /xFileService |",
|
||||||
|
"zzp6": "|---------------|",
|
||||||
|
"zzq1": "|------------------|",
|
||||||
|
"zzq2": "| xWebinarService |",
|
||||||
|
"zzq3": "|------------------|",
|
||||||
|
"cleanWebinarService": "npm run doClean xWebinarService",
|
||||||
|
"restoreWebinarService": "npm run doRestore xWebinarService",
|
||||||
|
"buildWebinarService": "npm run doBuild xWebinarService",
|
||||||
|
"packWebinarService": "npm run doPack xWebinarService",
|
||||||
|
"cpWebinarService": "npm run doCp xWebinarService",
|
||||||
|
"repackWebinarService": "npm run doRePack xWebinarService",
|
||||||
|
"zzq4": "|------------------|",
|
||||||
|
"zzq5": "| /xWebinarService |",
|
||||||
|
"zzq6": "|------------------|",
|
||||||
|
"zzr1": "|-------------|",
|
||||||
|
"zzr2": "| xAiModels |",
|
||||||
|
"zzr3": "|-------------|",
|
||||||
|
"cleanAiModels": "npm run doClean xAiModels",
|
||||||
|
"restoreAiModels": "npm run doRestore xAiModels",
|
||||||
|
"buildAiModels": "npm run doBuild xAiModels",
|
||||||
|
"packAiModels": "npm run doPack xAiModels",
|
||||||
|
"cpAiModels": "npm run doCp xAiModels",
|
||||||
|
"repackAiModels": "npm run doRePack xAiModels",
|
||||||
|
"zzr4": "|-------------|",
|
||||||
|
"zzr5": "| /xAiModels |",
|
||||||
|
"zzr6": "|-------------|",
|
||||||
|
"zzs1": "|-------------|",
|
||||||
|
"zzs2": "| xAiService |",
|
||||||
|
"zzs3": "|-------------|",
|
||||||
|
"cleanAiService": "npm run doClean xAiService",
|
||||||
|
"restoreAiService": "npm run doRestore xAiService",
|
||||||
|
"buildAiService": "npm run doBuild xAiService",
|
||||||
|
"packAiService": "npm run doPack xAiService",
|
||||||
|
"cpAiService": "npm run doCp xAiService",
|
||||||
|
"repackAiService": "npm run doRePack xAiService",
|
||||||
|
"zzs4": "|-------------|",
|
||||||
|
"zzs5": "| /xAiService |",
|
||||||
|
"zzs6": "|-------------|",
|
||||||
|
"zz4": "|---------------|",
|
||||||
|
"zz5": "| /NugetModules |",
|
||||||
|
"zz6": "|---------------|",
|
||||||
|
"xx1": "|--------------|",
|
||||||
|
"xx2": "| NpmModules |",
|
||||||
|
"xx3": "|--------------|",
|
||||||
|
"xxa1": "|-----------------|",
|
||||||
|
"xxa2": "| xFrameworkCore |",
|
||||||
|
"xxa3": "|-----------------|",
|
||||||
|
"buildFrameworkCore":"cd ./Modules/xFrameworkCoreHolder && npm run buildModule",
|
||||||
|
"repackFrameworkCore":"cd ./Modules/xFrameworkCoreHolder && npm run publishModule",
|
||||||
|
"xxa4": "|-----------------|",
|
||||||
|
"xxa5": "| /xFrameworkCore |",
|
||||||
|
"xxa6": "|-----------------|",
|
||||||
|
"xxb1": "|---------------------|",
|
||||||
|
"xxb2": "| xFrameworkServices |",
|
||||||
|
"xxb3": "|---------------------|",
|
||||||
|
"buildFrameworkServices":"cd ./Modules/xFrameworkServicesHolder && npm run buildModule",
|
||||||
|
"repackFrameworkServices":"cd ./Modules/xFrameworkServicesHolder && npm run publishModule",
|
||||||
|
"xxb4": "|---------------------|",
|
||||||
|
"xxb5": "| /xFrameworkServices |",
|
||||||
|
"xxb6": "|---------------------|",
|
||||||
|
"xxc1": "|-----------------------|",
|
||||||
|
"xxc2": "| xFrameworkComponents |",
|
||||||
|
"xxc3": "|-----------------------|",
|
||||||
|
"buildFrameworkComponents":"cd ./Modules/xFrameworkComponentsHolder && npm run buildModule",
|
||||||
|
"repackFrameworkComponents":"cd ./Modules/xFrameworkComponentsHolder && npm run publishModule",
|
||||||
|
"xxc4": "|-----------------------|",
|
||||||
|
"xxc5": "| /xFrameworkComponents |",
|
||||||
|
"xxc6": "|-----------------------|",
|
||||||
|
"xxd1": "|------------------------|",
|
||||||
|
"xxd2": "| xFrameworkPushService |",
|
||||||
|
"xxd3": "|------------------------|",
|
||||||
|
"buildFrameworkPushService":"cd ./Modules/xFrameworkPushServiceHolder && npm run buildModule",
|
||||||
|
"repackFrameworkPushService":"cd ./Modules/xFrameworkPushServiceHolder && npm run publishModule",
|
||||||
|
"xxd4": "|------------------------|",
|
||||||
|
"xxd5": "| /xFrameworkPushService |",
|
||||||
|
"xxd6": "|------------------------|",
|
||||||
|
"xxe1": "|----------------------------|",
|
||||||
|
"xxe2": "| xFrameworkIdentityService |",
|
||||||
|
"xxe3": "|----------------------------|",
|
||||||
|
"buildFrameworkIdentityService":"cd ./Modules/xFrameworkIdentityServiceHolder && npm run buildModule",
|
||||||
|
"repackFrameworkIdentityService":"cd ./Modules/xFrameworkIdentityServiceHolder && npm run publishModule",
|
||||||
|
"xxe4": "|----------------------------|",
|
||||||
|
"xxe5": "| /xFrameworkIdentityService |",
|
||||||
|
"xxe6": "|----------------------------|",
|
||||||
|
"xx4": "|--------------|",
|
||||||
|
"xx5": "| /NpmModules |",
|
||||||
|
"xx6": "|--------------|",
|
||||||
"b1": "|---------------|",
|
"b1": "|---------------|",
|
||||||
"b2": "| Api |",
|
"b2": "| Api |",
|
||||||
"b3": "|---------------|",
|
"b3": "|---------------|",
|
||||||
|
|||||||
+1
-1
Submodule xClient updated: 594d233048...16696d08d0
Reference in New Issue
Block a user