namirasoft-core 1.3.18 → 1.3.20
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/dist/ConsoleOperation.js +7 -7
- package/dist/ConsoleOperation.js.map +1 -1
- package/dist/RegexTemplate.d.ts +7 -0
- package/dist/RegexTemplate.js +12 -0
- package/dist/RegexTemplate.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
- package/src/ConsoleOperation.ts +7 -7
- package/src/RegexTemplate.ts +8 -0
- package/src/index.ts +1 -0
package/dist/ConsoleOperation.js
CHANGED
|
@@ -3,25 +3,25 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ConsoleOperation = void 0;
|
|
4
4
|
class ConsoleOperation {
|
|
5
5
|
static formatLogColor(message) {
|
|
6
|
-
return (
|
|
6
|
+
return (ConsoleOperation.colors.white + message + ConsoleOperation.colors.reset);
|
|
7
7
|
}
|
|
8
8
|
static formatInfoColor(message) {
|
|
9
|
-
return (
|
|
9
|
+
return (ConsoleOperation.colors.cyan + message + ConsoleOperation.colors.reset);
|
|
10
10
|
}
|
|
11
11
|
static formatTraceColor(message) {
|
|
12
|
-
return (
|
|
12
|
+
return (ConsoleOperation.colors.blue + message + ConsoleOperation.colors.reset);
|
|
13
13
|
}
|
|
14
14
|
static formatDebugColor(message) {
|
|
15
|
-
return (
|
|
15
|
+
return (ConsoleOperation.colors.magenta + message + ConsoleOperation.colors.reset);
|
|
16
16
|
}
|
|
17
17
|
static formatSuccessColor(message) {
|
|
18
|
-
return (
|
|
18
|
+
return (ConsoleOperation.colors.green + message + ConsoleOperation.colors.reset);
|
|
19
19
|
}
|
|
20
20
|
static formatWarningColor(message) {
|
|
21
|
-
return (
|
|
21
|
+
return (ConsoleOperation.colors.yellow + message + ConsoleOperation.colors.reset);
|
|
22
22
|
}
|
|
23
23
|
static formatErrorColor(message) {
|
|
24
|
-
return (
|
|
24
|
+
return (ConsoleOperation.colors.red + message + ConsoleOperation.colors.reset);
|
|
25
25
|
}
|
|
26
26
|
static log(message) {
|
|
27
27
|
console.log(ConsoleOperation.formatLogColor(message));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConsoleOperation.js","sourceRoot":"","sources":["../src/ConsoleOperation.ts"],"names":[],"mappings":";;;AAAA,MAAa,gBAAgB;IAYzB,MAAM,CAAC,cAAc,CAAC,OAAe;QAEjC,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"ConsoleOperation.js","sourceRoot":"","sources":["../src/ConsoleOperation.ts"],"names":[],"mappings":";;;AAAA,MAAa,gBAAgB;IAYzB,MAAM,CAAC,cAAc,CAAC,OAAe;QAEjC,OAAO,CAAC,gBAAgB,CAAC,MAAM,CAAC,KAAK,GAAG,OAAO,GAAG,gBAAgB,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACrF,CAAC;IACD,MAAM,CAAC,eAAe,CAAC,OAAe;QAElC,OAAO,CAAC,gBAAgB,CAAC,MAAM,CAAC,IAAI,GAAG,OAAO,GAAG,gBAAgB,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACpF,CAAC;IACD,MAAM,CAAC,gBAAgB,CAAC,OAAe;QAEnC,OAAO,CAAC,gBAAgB,CAAC,MAAM,CAAC,IAAI,GAAG,OAAO,GAAG,gBAAgB,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACpF,CAAC;IACD,MAAM,CAAC,gBAAgB,CAAC,OAAe;QAEnC,OAAO,CAAC,gBAAgB,CAAC,MAAM,CAAC,OAAO,GAAG,OAAO,GAAG,gBAAgB,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACvF,CAAC;IACD,MAAM,CAAC,kBAAkB,CAAC,OAAe;QAErC,OAAO,CAAC,gBAAgB,CAAC,MAAM,CAAC,KAAK,GAAG,OAAO,GAAG,gBAAgB,CAAC,MAAM,CAAC,KAAK,CAAC,C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AC,CAAC,CAAC;IAC9D,CAAC;;AAnEL,4CAoEC;AAlEiB,uBAAM,GAAG;IACnB,KAAK,EAAE,SAAS;IAChB,GAAG,EAAE,UAAU;IACf,KAAK,EAAE,UAAU;IACjB,MAAM,EAAE,UAAU;IAClB,IAAI,EAAE,UAAU;IAChB,OAAO,EAAE,UAAU;IACnB,IAAI,EAAE,UAAU;IAChB,KAAK,EAAE,UAAU;CACpB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RegexTemplate = void 0;
|
|
4
|
+
class RegexTemplate {
|
|
5
|
+
}
|
|
6
|
+
exports.RegexTemplate = RegexTemplate;
|
|
7
|
+
RegexTemplate.Date = /^(?!0000)[0-9]{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[12][0-9]|3[01])$/gm;
|
|
8
|
+
RegexTemplate.Time = /^([01]\d|2[0-3]):([0-5]\d)$/gm;
|
|
9
|
+
RegexTemplate.Duration = /^(\d+d\s)?([01]\d|2[0-3]):([0-5]\d)$/gm;
|
|
10
|
+
RegexTemplate.Email = /^[\w]+@([\w]+\.)+\w{2,}$/gm;
|
|
11
|
+
RegexTemplate.IP = /^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/gm;
|
|
12
|
+
//# sourceMappingURL=RegexTemplate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RegexTemplate.js","sourceRoot":"","sources":["../src/RegexTemplate.ts"],"names":[],"mappings":";;;AAAA,MAAa,aAAa;;AAA1B,sCAOC;AALU,kBAAI,GAAW,mEAAmE,CAAC;AACnF,kBAAI,GAAW,+BAA+B,CAAC;AAC/C,sBAAQ,GAAW,wCAAwC,CAAC;AAC5D,mBAAK,GAAW,4BAA4B,CAAC;AAC7C,gBAAE,GAAW,oKAAoK,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -20,6 +20,7 @@ export * from "./ObjectService";
|
|
|
20
20
|
export * from "./PackageService";
|
|
21
21
|
export * from "./ParsedNameValue";
|
|
22
22
|
export * from "./PhoneOperation";
|
|
23
|
+
export * from "./RegexTemplate";
|
|
23
24
|
export * from "./StringOperation";
|
|
24
25
|
export * from "./TimeOperation";
|
|
25
26
|
export * from "./URLOperation";
|
package/dist/index.js
CHANGED
|
@@ -36,6 +36,7 @@ __exportStar(require("./ObjectService"), exports);
|
|
|
36
36
|
__exportStar(require("./PackageService"), exports);
|
|
37
37
|
__exportStar(require("./ParsedNameValue"), exports);
|
|
38
38
|
__exportStar(require("./PhoneOperation"), exports);
|
|
39
|
+
__exportStar(require("./RegexTemplate"), exports);
|
|
39
40
|
__exportStar(require("./StringOperation"), exports);
|
|
40
41
|
__exportStar(require("./TimeOperation"), exports);
|
|
41
42
|
__exportStar(require("./URLOperation"), exports);
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAkC;AAClC,+CAA6B;AAC7B,qDAAmC;AACnC,8CAA4B;AAC5B,mDAAiC;AACjC,4CAA0B;AAC1B,qDAAmC;AACnC,wDAAsC;AACtC,mDAAiC;AACjC,kDAAgC;AAChC,iDAA+B;AAC/B,kDAAgC;AAChC,8CAA4B;AAC5B,+CAA6B;AAC7B,6CAA2B;AAC3B,kDAAgC;AAChC,mDAAiC;AACjC,qDAAmC;AACnC,kDAAgC;AAChC,mDAAiC;AACjC,oDAAkC;AAClC,mDAAiC;AACjC,oDAAkC;AAClC,kDAAgC;AAChC,iDAA+B;AAC/B,qDAAmC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAkC;AAClC,+CAA6B;AAC7B,qDAAmC;AACnC,8CAA4B;AAC5B,mDAAiC;AACjC,4CAA0B;AAC1B,qDAAmC;AACnC,wDAAsC;AACtC,mDAAiC;AACjC,kDAAgC;AAChC,iDAA+B;AAC/B,kDAAgC;AAChC,8CAA4B;AAC5B,+CAA6B;AAC7B,6CAA2B;AAC3B,kDAAgC;AAChC,mDAAiC;AACjC,qDAAmC;AACnC,kDAAgC;AAChC,mDAAiC;AACjC,oDAAkC;AAClC,mDAAiC;AACjC,kDAAgC;AAChC,oDAAkC;AAClC,kDAAgC;AAChC,iDAA+B;AAC/B,qDAAmC"}
|
package/package.json
CHANGED
|
@@ -3,21 +3,21 @@
|
|
|
3
3
|
"title": "Namirasoft Core",
|
|
4
4
|
"description": "Namira Software Corporation Core NPM Package",
|
|
5
5
|
"icon": "logo.png",
|
|
6
|
-
"logo": "https://static.namirasoft.com/
|
|
6
|
+
"logo": "https://static.namirasoft.com/image/namirasoft/site/logo/name.png",
|
|
7
7
|
"language": "ts",
|
|
8
8
|
"framework": "npm",
|
|
9
9
|
"application": "package",
|
|
10
10
|
"private": false,
|
|
11
|
-
"version": "1.3.
|
|
12
|
-
"main": "./dist/index.js",
|
|
13
|
-
"types": "./dist/index.d.ts",
|
|
11
|
+
"version": "1.3.20",
|
|
14
12
|
"author": "Amir Abolhasani",
|
|
15
13
|
"license": "MIT",
|
|
14
|
+
"main": "./dist/index.js",
|
|
15
|
+
"types": "./dist/index.d.ts",
|
|
16
16
|
"scripts": {
|
|
17
17
|
"build": ""
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@types/node": "^20.12.
|
|
20
|
+
"@types/node": "^20.12.8",
|
|
21
21
|
"axios": "^1.6.8",
|
|
22
22
|
"moment": "^2.30.1",
|
|
23
23
|
"phone": "^3.1.42"
|
package/src/ConsoleOperation.ts
CHANGED
|
@@ -12,31 +12,31 @@ export class ConsoleOperation
|
|
|
12
12
|
};
|
|
13
13
|
static formatLogColor(message: string)
|
|
14
14
|
{
|
|
15
|
-
return (
|
|
15
|
+
return (ConsoleOperation.colors.white + message + ConsoleOperation.colors.reset);
|
|
16
16
|
}
|
|
17
17
|
static formatInfoColor(message: string)
|
|
18
18
|
{
|
|
19
|
-
return (
|
|
19
|
+
return (ConsoleOperation.colors.cyan + message + ConsoleOperation.colors.reset);
|
|
20
20
|
}
|
|
21
21
|
static formatTraceColor(message: string)
|
|
22
22
|
{
|
|
23
|
-
return (
|
|
23
|
+
return (ConsoleOperation.colors.blue + message + ConsoleOperation.colors.reset);
|
|
24
24
|
}
|
|
25
25
|
static formatDebugColor(message: string)
|
|
26
26
|
{
|
|
27
|
-
return (
|
|
27
|
+
return (ConsoleOperation.colors.magenta + message + ConsoleOperation.colors.reset);
|
|
28
28
|
}
|
|
29
29
|
static formatSuccessColor(message: string)
|
|
30
30
|
{
|
|
31
|
-
return (
|
|
31
|
+
return (ConsoleOperation.colors.green + message + ConsoleOperation.colors.reset);
|
|
32
32
|
}
|
|
33
33
|
static formatWarningColor(message: string)
|
|
34
34
|
{
|
|
35
|
-
return (
|
|
35
|
+
return (ConsoleOperation.colors.yellow + message + ConsoleOperation.colors.reset);
|
|
36
36
|
}
|
|
37
37
|
static formatErrorColor(message: string)
|
|
38
38
|
{
|
|
39
|
-
return (
|
|
39
|
+
return (ConsoleOperation.colors.red + message + ConsoleOperation.colors.reset);
|
|
40
40
|
}
|
|
41
41
|
static log(message: string)
|
|
42
42
|
{
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export class RegexTemplate
|
|
2
|
+
{
|
|
3
|
+
static Date: RegExp = /^(?!0000)[0-9]{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[12][0-9]|3[01])$/gm;
|
|
4
|
+
static Time: RegExp = /^([01]\d|2[0-3]):([0-5]\d)$/gm;
|
|
5
|
+
static Duration: RegExp = /^(\d+d\s)?([01]\d|2[0-3]):([0-5]\d)$/gm;
|
|
6
|
+
static Email: RegExp = /^[\w]+@([\w]+\.)+\w{2,}$/gm;
|
|
7
|
+
static IP: RegExp = /^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/gm;
|
|
8
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -20,6 +20,7 @@ export * from "./ObjectService";
|
|
|
20
20
|
export * from "./PackageService";
|
|
21
21
|
export * from "./ParsedNameValue";
|
|
22
22
|
export * from "./PhoneOperation";
|
|
23
|
+
export * from "./RegexTemplate";
|
|
23
24
|
export * from "./StringOperation";
|
|
24
25
|
export * from "./TimeOperation";
|
|
25
26
|
export * from "./URLOperation";
|