@lark-apaas/fullstack-nestjs-core 1.1.12-alpha.3 → 1.1.12-alpha.4
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/index.cjs +4 -9
- package/dist/index.js +4 -9
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -172,11 +172,6 @@ var import_common3 = require("@nestjs/common");
|
|
|
172
172
|
var import_nestjs_common = require("@lark-apaas/nestjs-common");
|
|
173
173
|
|
|
174
174
|
// src/utils/safe-stringify.ts
|
|
175
|
-
function safeStringify(obj) {
|
|
176
|
-
const json = JSON.stringify(obj);
|
|
177
|
-
return safeEscape(json);
|
|
178
|
-
}
|
|
179
|
-
__name(safeStringify, "safeStringify");
|
|
180
175
|
function safeEscape(s) {
|
|
181
176
|
return s.replace(/[<>&='\u2028\u2029]/g, function(c) {
|
|
182
177
|
switch (c.charCodeAt(0)) {
|
|
@@ -266,9 +261,9 @@ var ViewContextMiddleware = class _ViewContextMiddleware {
|
|
|
266
261
|
csrfToken: csrfToken ?? "",
|
|
267
262
|
userId: userId ?? "",
|
|
268
263
|
appId: appId ?? "",
|
|
269
|
-
appName:
|
|
264
|
+
appName: safeEscape(appInfo?.app_name ?? ""),
|
|
270
265
|
appAvatar: appInfo?.app_avatar ?? "",
|
|
271
|
-
appDescription:
|
|
266
|
+
appDescription: safeEscape(appInfo?.app_description ?? ""),
|
|
272
267
|
tenantId
|
|
273
268
|
};
|
|
274
269
|
res.locals = {
|
|
@@ -277,9 +272,9 @@ var ViewContextMiddleware = class _ViewContextMiddleware {
|
|
|
277
272
|
userId: userId ?? "",
|
|
278
273
|
tenantId: tenantId ?? "",
|
|
279
274
|
appId: appId ?? "",
|
|
280
|
-
appName:
|
|
275
|
+
appName: safeEscape(appInfo?.app_name ?? "\u5999\u642D\u5E94\u7528"),
|
|
281
276
|
appAvatar: appInfo?.app_avatar ?? "",
|
|
282
|
-
appDescription:
|
|
277
|
+
appDescription: safeEscape(appInfo?.app_description ?? "")
|
|
283
278
|
};
|
|
284
279
|
next();
|
|
285
280
|
}
|
package/dist/index.js
CHANGED
|
@@ -130,11 +130,6 @@ import { Inject, Injectable as Injectable3, Logger } from "@nestjs/common";
|
|
|
130
130
|
import { PLATFORM_HTTP_CLIENT } from "@lark-apaas/nestjs-common";
|
|
131
131
|
|
|
132
132
|
// src/utils/safe-stringify.ts
|
|
133
|
-
function safeStringify(obj) {
|
|
134
|
-
const json = JSON.stringify(obj);
|
|
135
|
-
return safeEscape(json);
|
|
136
|
-
}
|
|
137
|
-
__name(safeStringify, "safeStringify");
|
|
138
133
|
function safeEscape(s) {
|
|
139
134
|
return s.replace(/[<>&='\u2028\u2029]/g, function(c) {
|
|
140
135
|
switch (c.charCodeAt(0)) {
|
|
@@ -224,9 +219,9 @@ var ViewContextMiddleware = class _ViewContextMiddleware {
|
|
|
224
219
|
csrfToken: csrfToken ?? "",
|
|
225
220
|
userId: userId ?? "",
|
|
226
221
|
appId: appId ?? "",
|
|
227
|
-
appName:
|
|
222
|
+
appName: safeEscape(appInfo?.app_name ?? ""),
|
|
228
223
|
appAvatar: appInfo?.app_avatar ?? "",
|
|
229
|
-
appDescription:
|
|
224
|
+
appDescription: safeEscape(appInfo?.app_description ?? ""),
|
|
230
225
|
tenantId
|
|
231
226
|
};
|
|
232
227
|
res.locals = {
|
|
@@ -235,9 +230,9 @@ var ViewContextMiddleware = class _ViewContextMiddleware {
|
|
|
235
230
|
userId: userId ?? "",
|
|
236
231
|
tenantId: tenantId ?? "",
|
|
237
232
|
appId: appId ?? "",
|
|
238
|
-
appName:
|
|
233
|
+
appName: safeEscape(appInfo?.app_name ?? "\u5999\u642D\u5E94\u7528"),
|
|
239
234
|
appAvatar: appInfo?.app_avatar ?? "",
|
|
240
|
-
appDescription:
|
|
235
|
+
appDescription: safeEscape(appInfo?.app_description ?? "")
|
|
241
236
|
};
|
|
242
237
|
next();
|
|
243
238
|
}
|