cc-core-cli 1.0.74 → 1.0.76

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/README.md CHANGED
@@ -70,6 +70,10 @@ Please copy docker-compose.yml for start redis
70
70
 
71
71
  cc-cli init module <PATH>
72
72
 
73
+ **Create Commerce Connect ADMIN MODULE**
74
+
75
+ cc-cli init admin_module <PATH>
76
+
73
77
  **Upgrade package**
74
78
 
75
79
  cc-cli upgrade
package/bin/index.js CHANGED
@@ -23,8 +23,8 @@ if (action === 'init') {
23
23
  const project = options['_'][1] || '.'
24
24
  const path = options['_'][2] || '.'
25
25
 
26
- if (!['core', 'admin', 'module'].includes(project)) {
27
- console.log('Project should be one of [core|admin|module]!')
26
+ if (!['core', 'admin', 'module', 'admin_module'].includes(project)) {
27
+ console.log('Project should be one of [core|admin|module|admin_module]!')
28
28
  return false
29
29
  }
30
30
 
@@ -65,7 +65,7 @@ if (action === 'upgrade') {
65
65
  }
66
66
 
67
67
  const spinner = ora('(1/2) Copying files!').start();
68
- const IGNORE_FILES = ['src/modules','docker-compose.yml','Dockerfile','package.json','version.json','README.md','custom.less', '.env.develop','_env','_gitignore','_npmrc'];
68
+ const IGNORE_FILES = ['src/modules', 'docker-compose.yml', 'Dockerfile', 'package.json', 'version.json', 'README.md', 'custom.less', '.env.develop', '_env', '_gitignore', '_npmrc'];
69
69
  fs.copySync(`${__dirname}/../template/${project}`, '.', {
70
70
  recursive: true,
71
71
  filter: (name) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cc-core-cli",
3
- "version": "1.0.74",
3
+ "version": "1.0.76",
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": {
@@ -6,5 +6,8 @@ import "slick-carousel/slick/slick.css";
6
6
  import "slick-carousel/slick/slick-theme.css";
7
7
 
8
8
  import { CustomApp } from '@shopstack/cc-admin-lib'
9
+ import { importCustomModules } from '@shopstack/cc-admin-lib';
10
+
11
+ importCustomModules()
9
12
 
10
13
  export default CustomApp
@@ -0,0 +1,39 @@
1
+ import PropTypes from 'prop-types';
2
+
3
+ const DemoComponent = () => {
4
+ return (
5
+ <div>
6
+ {'Demo Component'}
7
+ </div>
8
+ )
9
+ }
10
+
11
+ const SettingDemoComponent = () => {
12
+ return (
13
+ <div>Setting</div>
14
+ )
15
+ }
16
+
17
+ export const name = "demo"
18
+
19
+ export const label = 'Demo'
20
+
21
+ export const settings = SettingDemoComponent
22
+
23
+ export const options = {
24
+ field_type: 'string',
25
+ allow_trigger: true,
26
+ allow_filter: true,
27
+ allow_display_permission: true
28
+ }
29
+
30
+ DemoComponent.propsType = {
31
+ data: PropTypes.object,
32
+ disabled: PropTypes.bool,
33
+ schema: PropTypes.object,
34
+ relatedSchema: PropTypes.array
35
+ }
36
+
37
+ SettingDemoComponent.propsType = {}
38
+
39
+ export default DemoComponent
@@ -0,0 +1,4 @@
1
+ {
2
+ "name": "Demo",
3
+ "dependencies": {}
4
+ }
@@ -245,7 +245,14 @@ export class CoreController {
245
245
  @Basic()
246
246
  @Put("/:entity/:id")
247
247
  async update(@Param() params: any, @Body() data: any): Promise<any> {
248
- return this.service.update(params.entity, params.id, data);
248
+ if (
249
+ !["mail_setting"].includes(params.entity) &&
250
+ params.entity.indexOf("_setting") !== -1
251
+ ) {
252
+ return this.serviceSetting.setSetting(params.entity, data, params.id);
253
+ } else {
254
+ return this.service.update(params.entity, params.id, data);
255
+ }
249
256
  }
250
257
 
251
258
  @Basic()