@smartsoft001/mongo 2.111.0 → 2.113.0
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/index.cjs +8 -72
- package/package.json +4 -5
package/index.cjs
CHANGED
|
@@ -114,78 +114,6 @@ var ObjectService = class {
|
|
|
114
114
|
// packages/shared/utils/src/lib/services/password/password.service.ts
|
|
115
115
|
var import_md5 = __toESM(require("md5"));
|
|
116
116
|
|
|
117
|
-
// packages/shared/utils/src/lib/services/remove-html/remove-html.service.ts
|
|
118
|
-
var RemoveHtmlService = class {
|
|
119
|
-
/**
|
|
120
|
-
* Remove HTML tags and decode HTML entities from text
|
|
121
|
-
* - Removes HTML tags
|
|
122
|
-
* - Decodes common named entities ( , ", etc.)
|
|
123
|
-
* - Decodes numeric entities ({ or «)
|
|
124
|
-
* - Removes any remaining unrecognized entities
|
|
125
|
-
*/
|
|
126
|
-
static create(val) {
|
|
127
|
-
if (!val) {
|
|
128
|
-
return "";
|
|
129
|
-
}
|
|
130
|
-
let result = val;
|
|
131
|
-
result = result.replace(/<[^>]*(>|$)/g, "");
|
|
132
|
-
result = result.replace(/ /g, " ").replace(/"/g, '"').replace(/'/g, "'").replace(/</g, "<").replace(/>/g, ">").replace(/&/g, "&").replace(/„/g, "\u201E").replace(/”/g, '"').replace(/“/g, '"').replace(/«/g, "\xAB").replace(/»/g, "\xBB").replace(/‌/g, "");
|
|
133
|
-
result = result.replace(/&#(\d+);/g, (match, dec) => String.fromCharCode(dec)).replace(
|
|
134
|
-
/&#x([0-9a-f]+);/gi,
|
|
135
|
-
(match, hex) => String.fromCharCode(parseInt(hex, 16))
|
|
136
|
-
);
|
|
137
|
-
result = result.replace(/&[a-z]+;/gi, "");
|
|
138
|
-
return result;
|
|
139
|
-
}
|
|
140
|
-
};
|
|
141
|
-
|
|
142
|
-
// packages/shared/utils/src/lib/services/slug/slug.service.ts
|
|
143
|
-
var SlugService = class _SlugService {
|
|
144
|
-
static {
|
|
145
|
-
this.polishToEnglishMap = {
|
|
146
|
-
\u0105: "a",
|
|
147
|
-
\u0107: "c",
|
|
148
|
-
\u0119: "e",
|
|
149
|
-
\u0142: "l",
|
|
150
|
-
\u0144: "n",
|
|
151
|
-
\u00F3: "o",
|
|
152
|
-
\u015B: "s",
|
|
153
|
-
\u017A: "z",
|
|
154
|
-
\u017C: "z",
|
|
155
|
-
\u0104: "A",
|
|
156
|
-
\u0106: "C",
|
|
157
|
-
\u0118: "E",
|
|
158
|
-
\u0141: "L",
|
|
159
|
-
\u0143: "N",
|
|
160
|
-
\u00D3: "O",
|
|
161
|
-
\u015A: "S",
|
|
162
|
-
\u0179: "Z",
|
|
163
|
-
\u017B: "Z"
|
|
164
|
-
};
|
|
165
|
-
}
|
|
166
|
-
/**
|
|
167
|
-
* Convert text to URL-friendly slug
|
|
168
|
-
* - Removes HTML tags and entities
|
|
169
|
-
* - Replaces Polish characters with English equivalents
|
|
170
|
-
* - Converts to lowercase
|
|
171
|
-
* - Replaces spaces and special characters with hyphens
|
|
172
|
-
* - Removes multiple consecutive hyphens
|
|
173
|
-
* - Trims hyphens from start and end
|
|
174
|
-
*/
|
|
175
|
-
static create(text) {
|
|
176
|
-
if (!text) {
|
|
177
|
-
return "";
|
|
178
|
-
}
|
|
179
|
-
let slug = RemoveHtmlService.create(text);
|
|
180
|
-
slug = slug.split("").map((char) => _SlugService.polishToEnglishMap[char] || char).join("");
|
|
181
|
-
slug = slug.toLowerCase();
|
|
182
|
-
slug = slug.replace(/[^a-z0-9]+/g, "-");
|
|
183
|
-
slug = slug.replace(/-+/g, "-");
|
|
184
|
-
slug = slug.replace(/^-+|-+$/g, "");
|
|
185
|
-
return slug;
|
|
186
|
-
}
|
|
187
|
-
};
|
|
188
|
-
|
|
189
117
|
// packages/shared/models/src/lib/utils.ts
|
|
190
118
|
function getModelFieldKeys(type) {
|
|
191
119
|
if (!type["__fields"])
|
|
@@ -215,6 +143,14 @@ var IAttachmentRepository = class {
|
|
|
215
143
|
|
|
216
144
|
// packages/shared/mongo/src/lib/mongo.config.ts
|
|
217
145
|
var MongoConfig = class {
|
|
146
|
+
host;
|
|
147
|
+
port;
|
|
148
|
+
database;
|
|
149
|
+
username;
|
|
150
|
+
password;
|
|
151
|
+
collection;
|
|
152
|
+
url;
|
|
153
|
+
type;
|
|
218
154
|
};
|
|
219
155
|
|
|
220
156
|
// packages/shared/mongo/src/lib/mongo.unitofwork.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smartsoft001/mongo",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.113.0",
|
|
4
4
|
"description": "Utils to mongo",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
},
|
|
19
19
|
"homepage": "https://github.com/emiljuchnikowski/smartsoft#readme",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@angular/core": "
|
|
22
|
-
"@jest/globals": "
|
|
21
|
+
"@angular/core": "21.2.1",
|
|
22
|
+
"@jest/globals": "30.2.0",
|
|
23
23
|
"@nestjs/common": "^11.1.5",
|
|
24
24
|
"flatted": "3.3.3",
|
|
25
25
|
"guid-typescript": "^1.0.9",
|
|
@@ -32,8 +32,7 @@
|
|
|
32
32
|
},
|
|
33
33
|
"resolutions": {
|
|
34
34
|
"paypal-rest-sdk": "1.8.1",
|
|
35
|
-
"tslib": "^2.3.0"
|
|
36
|
-
"zone.js": "~0.15.0"
|
|
35
|
+
"tslib": "^2.3.0"
|
|
37
36
|
},
|
|
38
37
|
"main": "./index.cjs",
|
|
39
38
|
"type": "commonjs"
|