cc-core-cli 1.0.83 → 1.0.85

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.83",
3
+ "version": "1.0.85",
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": {
@@ -25,4 +25,4 @@
25
25
  "ora": "5.4.1",
26
26
  "yargs": "17.7.2"
27
27
  }
28
- }
28
+ }
@@ -8,6 +8,9 @@ import "slick-carousel/slick/slick-theme.css";
8
8
  import { CustomApp } from '@shopstack/cc-admin-lib'
9
9
  import { importCustomModules } from '@shopstack/cc-admin-lib';
10
10
 
11
- importCustomModules()
11
+ try {
12
+ const modules = require.context('../modules', true)
13
+ importCustomModules(modules)
14
+ } catch (e) { }
12
15
 
13
16
  export default CustomApp
@@ -318,6 +318,7 @@
318
318
  .field,
319
319
  .standard-component,
320
320
  .advanced-component,
321
+ .module-component,
321
322
  .panel-component,
322
323
  .compute-field,
323
324
  .widget-component {
@@ -424,7 +424,9 @@ export class CoreController {
424
424
 
425
425
  @Basic()
426
426
  @Patch("/:entity/import_validate")
427
- async importValidate(@Param() params: any, @Body() data): Promise<boolean> {
428
- return this.service.importValidate(params.entity, data);
427
+ async importValidate(@Param() params: any, @Body() body): Promise<boolean> {
428
+ return this.service.importValidate(params.entity, body.data,
429
+ body.original_data,
430
+ body.filename);
429
431
  }
430
432
  }
@@ -614,9 +614,14 @@ export class CoreService implements OnModuleInit {
614
614
  return service.searchText(data);
615
615
  }
616
616
 
617
- public async importValidate(entityName: string, data: any): Promise<any> {
617
+ public async importValidate(
618
+ entityName: string,
619
+ data: any,
620
+ originalData,
621
+ filename
622
+ ): Promise<any> {
618
623
  const service = await this._getService(entityName);
619
- return service.importValidate(data);
624
+ return service.importValidate(data, originalData, filename);
620
625
  }
621
626
  }
622
627