cc-core-cli 1.0.18 → 1.0.20

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
@@ -1,32 +1,5 @@
1
1
  # Commerce Connect CLI
2
2
 
3
- **Create SSH key**
4
-
5
-
6
- ssh-keygen -t rsa -b 4096
7
-
8
- It will ask you the file name that you want to save
9
-
10
-
11
- Enter a file in which to save the key (/Users/YOU/.ssh/id_ALGORITHM): [Press enter]
12
- Please fill in with
13
-
14
- ~/.ssh/cconnect
15
- Then should run command. It will copy your public key and please send it to your team lead.
16
-
17
- cat ~/.ssh/cconnect.pub | pbcopy
18
-
19
- **Config SSH to use your key**
20
- open ssh config with this command
21
-
22
- sudo vim ~/.ssh/config
23
-
24
- Add the below code and save the file
25
-
26
- Host cconnect
27
- Hostname bitbucket.com
28
- IdentityFile ~/.ssh/cconnect
29
-
30
3
  **Install Mongo & Redis**
31
4
 
32
5
  Please copy docker-compose.yml for start mongo database
@@ -55,53 +28,48 @@ Please copy docker-compose.yml for start redis
55
28
 
56
29
  **Install CLI as a global package**
57
30
 
58
- npm install -g git+ssh://git@cconnect:shopstackthailand/cc-core-cli.git#latest
31
+ npm install -g cc-core-cli
59
32
 
60
- **Create Commerce Connect Core Project**
33
+ **Create Commerce Connect CORE**
61
34
 
62
35
  cc-cli init core <PATH>
63
36
 
64
- **Example .env file for run on dev mode**
37
+ **Example .env file for run CORE on dev mode**
65
38
 
66
39
  NODE_ENV=dev
67
40
  PORT=3000
68
41
  LOOP_BACK_IP=0.0.0.0
42
+ MONGODB_URI=mongodb://root:axSdEpGZYNfdsX@{{YOUR DOCKER GATEWAY IP}}:27017/cc_db?authSource=admin
69
43
  SESSION_REDIS_URL=redis://{{YOUR DOCKER GATEWAY IP}}:6379/1
70
44
  CACHE_REDIS_URL=redis://{{YOUR DOCKER GATEWAY IP}}:6379/1
71
- MONGODB_URI=mongodb://root:axSdEpGZYNfdsX@{{YOUR DOCKER GATEWAY IP}}:27017/cc_dev?authSource=admin
72
- ENABLE_SCHEDULE_ACTION=true
73
- SERVE_STATIC=true
74
- SERVE_STATIC_PATH=media
75
- SINGLE_QUEUE_REDIS_URL=redis://{{YOUR DOCKER GATEWAY IP}}:6379/1
76
- QUEUE_REDIS_URL=redis://{{YOUR DOCKER GATEWAY IP}}:6379/1
45
+ QUEUE_REDIS_URL=redis://{{YOUR DOCKER GATEWAY IP}}:6379/2
77
46
  QUEUE_CONCURRENCY=1
78
47
  MAX_WORKER=1
79
- SWAGGER_ENABLE=true
80
48
  CUSTOM_MODULES=
81
49
  DEFAULT_API_KEY=997829b-1144-4049-aff9-b2b9394a394e
82
50
  DEFAULT_SECRET_KEY=5ae1ave1j8otoxxvrv5gn2o9mtquk3we14hjxjha
83
51
 
84
- **Create Commerce Connect Admin Project**
52
+ **Create Commerce Connect ADMIN UI**
85
53
 
86
54
  cc-cli init admin <PATH>
87
55
 
88
- **Example .env file for run on dev mode**
56
+ **Example .env.develop file for run ADMIN UI on dev mode**
89
57
 
90
- NODE_ENV=develop
91
- PORT=4000
92
- COOKIE_SECURE=false
93
- COOKIE_HTTP_ONLY=false
94
- COOKIE_SAME_SITE=
95
- SYSTEM_APP_KEY=SYSTEM_APP_KEY
96
- SYSTEM_SECRET_KEY=SYSTEM_SECRET_KEY
97
- API_GATEWAY=API_GATEWAY
98
- API_GATEWAY_MEDIA=API_GATEWAY_MEDIA
99
- GOOGLE_MAP_KEY=
58
+ NODE_ENV=develop
59
+ PORT=4000
60
+ COOKIE_SECURE=false
61
+ COOKIE_HTTP_ONLY=false
62
+ COOKIE_SAME_SITE=
63
+ SYSTEM_APP_KEY=997829b-1144-4049-aff9-b2b9394a394e
64
+ SYSTEM_SECRET_KEY=5ae1ave1j8otoxxvrv5gn2o9mtquk3we14hjxjha
65
+ API_GATEWAY=http://127.0.0.1:3000/api/v1
66
+ API_GATEWAY_MEDIA=http://127.0.0.1:3000
67
+ GOOGLE_MAP_KEY=
100
68
 
101
- **Upgrade package**
69
+ **Create Commerce Connect MODULE**
102
70
 
103
- cc-cli upgrade
71
+ cc-cli init module <PATH>
104
72
 
105
- **Create Commerce Connect Admin Project**
73
+ **Upgrade package**
106
74
 
107
- cc-cli admin
75
+ cc-cli upgrade
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cc-core-cli",
3
- "version": "1.0.18",
3
+ "version": "1.0.20",
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": {
@@ -27,7 +27,6 @@ import {
27
27
  TranslateModule,
28
28
  AttachmentModule,
29
29
  NotificationModule,
30
- SFTPSettingModule,
31
30
  RedisModule,
32
31
  MailSettingModule,
33
32
  SmsModule,
@@ -145,7 +144,6 @@ if (+process.env.MONGODB_MAX_POOL_SIZE) {
145
144
  LanguageModule,
146
145
  MailSettingModule,
147
146
  ScheduleActionModule,
148
- SFTPSettingModule,
149
147
  SmsModule,
150
148
  TemplateModule,
151
149
  TranslateModule,
@@ -25,7 +25,6 @@ import {
25
25
  ReportModule,
26
26
  ReasonModule,
27
27
  ScheduleActionModule,
28
- SFTPSettingModule,
29
28
  SmsModule,
30
29
  TemplateModule,
31
30
  TranslateModule,
@@ -67,7 +66,6 @@ const RUN_CUSTOM_MODULES =
67
66
  ReportModule,
68
67
  ReasonModule,
69
68
  ScheduleActionModule,
70
- SFTPSettingModule,
71
69
  SmsModule,
72
70
  TemplateModule,
73
71
  TranslateModule,
@@ -38,8 +38,6 @@ import {
38
38
  ReasonDataService,
39
39
  ScheduleActionService,
40
40
  ScheduleLogService,
41
- SFTPSettingService,
42
- SftpLogService,
43
41
  SmsService,
44
42
  SmsLogService,
45
43
  TemplateService,
@@ -205,10 +203,6 @@ export class CoreService implements OnModuleInit {
205
203
  private readonly _scheduleActionService: ScheduleActionService;
206
204
  @Inject(ScheduleLogService)
207
205
  private readonly _scheduleLogService: ScheduleLogService;
208
- @Inject(SFTPSettingService)
209
- private readonly _sftpService: SFTPSettingService;
210
- @Inject(SftpLogService)
211
- private readonly _sftpLogService: SftpLogService;
212
206
  @Inject(ShortlyUrlService)
213
207
  private readonly _shortlyUrlService: ShortlyUrlService;
214
208
  @Inject(SmsService)
@@ -310,10 +304,6 @@ export class CoreService implements OnModuleInit {
310
304
  return this._scheduleActionService;
311
305
  case "schedule_log":
312
306
  return this._scheduleLogService;
313
- case "sftp_setting":
314
- return this._sftpService;
315
- case "sftp_log":
316
- return this._sftpLogService;
317
307
  case "shortly_url":
318
308
  return this._shortlyUrlService;
319
309
  case "sms":
@@ -606,8 +596,6 @@ export class CoreLogService implements OnModuleInit {
606
596
  private readonly _notificationLogService: NotificationLogService;
607
597
  @Inject(ScheduleLogService)
608
598
  private readonly _scheduleLogService: ScheduleLogService;
609
- @Inject(SftpLogService)
610
- private readonly _sftpLogService: SftpLogService;
611
599
  @Inject(SmsLogService)
612
600
  private readonly _smsLogService: SmsLogService;
613
601
 
@@ -625,8 +613,6 @@ export class CoreLogService implements OnModuleInit {
625
613
  return this._activityLogService;
626
614
  case "import_export_log":
627
615
  return this._importExportLogService;
628
- case "sftp_log":
629
- return this._sftpLogService;
630
616
  case "mail_log":
631
617
  return this._mailLogService;
632
618
  case "sms_log":
@@ -47,8 +47,6 @@ import {
47
47
  DeployDestinationService,
48
48
  DeployPackageService,
49
49
  CustomFunctionService,
50
- SFTPSettingService,
51
- SftpLogService,
52
50
  SmsService,
53
51
  ReasonDataService,
54
52
  ReasonMasterService,
@@ -151,8 +149,6 @@ async function initial(app: NestFastifyApplication) {
151
149
  await initialService(app, AddressService);
152
150
  await initialService(app, CompanyService);
153
151
 
154
- await initialService(app, SFTPSettingService);
155
- await initialService(app, SftpLogService);
156
152
  await initialService(app, MailSettingService);
157
153
  await initialService(app, MailLogService);
158
154
  await initialService(app, SmsLogService);