cc-core-cli 1.0.160 → 1.0.162

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cc-core-cli",
3
- "version": "1.0.160",
3
+ "version": "1.0.162",
4
4
  "description": "Command Line Interface tool for generating project templates for the (Your Platform's Name) platform.",
5
5
  "main": "bin/index.js",
6
6
  "scripts": {
@@ -57,4 +57,8 @@
57
57
 
58
58
  .menu-del-icon:hover {
59
59
  color: #F44336;
60
+ }
61
+
62
+ .ant-menu-item-only-child .ant-menu-title-content {
63
+ color: var(--menu-text-color);
60
64
  }
@@ -83,6 +83,7 @@ import {
83
83
  RewriteUrlService,
84
84
  SearchTextService,
85
85
  ReindexSearchTextService,
86
+ sanitizeDeep
86
87
  } from "@shopstack/cc-core-lib/core";
87
88
 
88
89
  import { CUSTOM_MODULES } from "src/modules/modules";
@@ -109,11 +110,11 @@ async function initialCustomService(app: NestFastifyApplication) {
109
110
  const RUN_CUSTOM_SERVICES = [];
110
111
  SPECIFY_CUSTOM_MODULES.length === 0
111
112
  ? CUSTOM_MODULES.forEach((c) => {
112
- RUN_CUSTOM_SERVICES.push(...(c.services || []));
113
- })
113
+ RUN_CUSTOM_SERVICES.push(...(c.services || []));
114
+ })
114
115
  : CUSTOM_MODULES.filter((c) => SPECIFY_CUSTOM_MODULES.includes(c.module.name)).forEach((c) => {
115
- RUN_CUSTOM_SERVICES.push(...(c.services || []));
116
- });
116
+ RUN_CUSTOM_SERVICES.push(...(c.services || []));
117
+ });
117
118
  for (const customService of RUN_CUSTOM_SERVICES) {
118
119
  await initialService(app, customService);
119
120
  }
@@ -279,6 +280,7 @@ async function bootstrap() {
279
280
  });
280
281
  }
281
282
  });
283
+
282
284
  app
283
285
  .getHttpAdapter()
284
286
  .getInstance()
@@ -287,6 +289,17 @@ async function bootstrap() {
287
289
  done();
288
290
  });
289
291
 
292
+ if (process.env.ENABLE_SANITIZE == 'true') {
293
+ app
294
+ .getHttpAdapter()
295
+ .getInstance()
296
+ .addHook('preHandler', async (request, reply) => {
297
+ if (request.body) {
298
+ request.body = sanitizeDeep(request.body);
299
+ }
300
+ });
301
+ }
302
+
290
303
  await app.listen(parseInt(process.env.PORT, 10), "0.0.0.0");
291
304
  CONST.HEALTH_CHECK = true;
292
305
  CONST.SYSTEM_NAME = process.env.SYSTEM_NAME || _.get(packageData, "name");