@cocreate/cli 1.31.2 → 1.32.0

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.
@@ -41,19 +41,42 @@ jobs:
41
41
  outputs:
42
42
  new_release_published: "${{ steps.semantic.outputs.new_release_published }}"
43
43
  new_release_version: "${{ steps.semantic.outputs.new_release_version }}"
44
- docs:
45
- runs-on: ubuntu-latest
46
- steps:
47
- - name: Checkout
48
- uses: actions/checkout@v3
49
- - name: setup nodejs
50
- uses: actions/setup-node@v3
51
- with:
52
- node-version: 16
53
- - name: update documentation
54
- uses: CoCreate-app/CoCreate-docs@master
55
- env:
56
- organization_id: ${{ secrets.COCREATE_ORGANIZATION_ID }}
57
- key: ${{ secrets.COCREATE_KEY }}
58
- host: ${{ secrets.COCREATE_HOST }}
44
+ upload:
45
+ runs-on: ubuntu-latest
46
+
47
+ steps:
48
+ - name: Checkout
49
+ uses: actions/checkout@v3
50
+
51
+ - name: Setup Node.js
52
+ uses: actions/setup-node@v3
53
+ with:
54
+ node-version: 16
55
+
56
+ - name: Get Environment Variables
57
+ run: |
58
+ echo "organization_id=${{ secrets.COCREATE_ORGANIZATION_ID }}" >> $GITHUB_ENV
59
+ echo "key=${{ secrets.COCREATE_KEY }}" >> $GITHUB_ENV
60
+ echo "host=${{ secrets.COCREATE_HOST }}" >> $GITHUB_ENV
61
+
62
+ - name: Install @cocreate/cli
63
+ run: npm install -g @cocreate/cli
64
+
65
+ - name: CoCreate CLI Upload
66
+ run: coc upload
59
67
 
68
+ # docs:
69
+ # runs-on: ubuntu-latest
70
+ # steps:
71
+ # - name: Checkout
72
+ # uses: actions/checkout@v3
73
+ # - name: setup nodejs
74
+ # uses: actions/setup-node@v3
75
+ # with:
76
+ # node-version: 16
77
+ # - name: update documentation
78
+ # uses: CoCreate-app/CoCreate-docs@master
79
+ # env:
80
+ # organization_id: ${{ secrets.COCREATE_ORGANIZATION_ID }}
81
+ # key: ${{ secrets.COCREATE_KEY }}
82
+ # host: ${{ secrets.COCREATE_HOST }}
package/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ # [1.32.0](https://github.com/CoCreate-app/CoCreate-cli/compare/v1.31.2...v1.32.0) (2023-06-10)
2
+
3
+
4
+ ### Features
5
+
6
+ * font.js to add color, background and font to console messages. repositores object now located in CoCreate.config.js ([e6c9dc3](https://github.com/CoCreate-app/CoCreate-cli/commit/e6c9dc384d2ecf7037c624b818a25a6c8f31f33a))
7
+ * removed colors package in favor of simple custom ./font.js ([a754221](https://github.com/CoCreate-app/CoCreate-cli/commit/a7542215a68e1dc83960c3e4705082d42c033c1e))
8
+
1
9
  ## [1.31.2](https://github.com/CoCreate-app/CoCreate-cli/compare/v1.31.1...v1.31.2) (2023-06-10)
2
10
 
3
11
 
@@ -21,5 +21,477 @@ module.exports = {
21
21
  "website_id": "644d4bff8036fb9d1d1fd69c"
22
22
  }
23
23
  }
24
+ ],
25
+ "repositoreies": [
26
+
27
+ {
28
+ 'path': '../../CoCreateJS',
29
+ 'repo': 'github.com/CoCreate-app/CoCreateJS.git'
30
+ },
31
+ {
32
+ 'path': '../../CoCreateCSS',
33
+ 'repo': 'github.com/CoCreate-app/CoCreateCSS.git'
34
+ },
35
+ {
36
+ 'path': '../../CoCreate-admin',
37
+ 'repo': 'github.com/CoCreate-app/CoCreate-admin.git'
38
+ },
39
+ {
40
+ 'path': '../../CoCreate-website',
41
+ 'repo': 'github.com/CoCreate-app/CoCreate-website.git'
42
+ },
43
+ // {
44
+ // 'path': '../../CoCreate-website-template',
45
+ // 'repo': 'github.com/CoCreate-app/CoCreate-website-template.git'
46
+ // },
47
+
48
+ // Components
49
+ {
50
+ 'path': '../CoCreate-actions',
51
+ 'repo': 'github.com/CoCreate-app/CoCreate-actions.git'
52
+ },
53
+ {
54
+ 'path': '../CoCreate-api',
55
+ 'repo': 'github.com/CoCreate-app/CoCreate-api.git'
56
+ },
57
+ {
58
+ 'path': '../CoCreate-attributes',
59
+ 'repo': 'github.com/CoCreate-app/CoCreate-attributes.git'
60
+ },
61
+ {
62
+ 'path': '../CoCreate-calculation',
63
+ 'repo': 'github.com/CoCreate-app/CoCreate-calculation.git'
64
+ },
65
+ {
66
+ 'path': '../CoCreate-cli',
67
+ 'repo': 'github.com/CoCreate-app/CoCreate-cli.git'
68
+ },
69
+ {
70
+ 'path': '../CoCreate-clone',
71
+ 'repo': 'github.com/CoCreate-app/CoCreate-clone.git'
72
+ },
73
+ {
74
+ 'path': '../CoCreate-codearea',
75
+ 'repo': 'github.com/CoCreate-app/CoCreate-codearea.git'
76
+ },
77
+ {
78
+ 'path': '../CoCreate-conditional-logic',
79
+ 'repo': 'github.com/CoCreate-app/CoCreate-conditional-logic.git'
80
+ },
81
+ {
82
+ 'path': '../CoCreate-crdt',
83
+ 'repo': 'github.com/CoCreate-app/CoCreate-crdt.git',
84
+ },
85
+ {
86
+ 'path': '../CoCreate-crud-client',
87
+ 'repo': 'github.com/CoCreate-app/CoCreate-crud-client.git'
88
+ },
89
+ {
90
+ 'path': '../CoCreate-css-parser',
91
+ 'repo': 'github.com/CoCreate-app/CoCreate-css-parser.git'
92
+ },
93
+ {
94
+ 'path': '../CoCreate-cursors',
95
+ 'repo': 'github.com/CoCreate-app/CoCreate-cursors.git'
96
+ },
97
+ {
98
+ 'path': '../CoCreate-dnd',
99
+ 'repo': 'github.com/CoCreate-app/CoCreate-dnd.git'
100
+ },
101
+ {
102
+ 'path': '../CoCreate-docs',
103
+ 'repo': 'github.com/CoCreate-app/CoCreate-docs.git'
104
+ },
105
+ {
106
+ 'path': '../CoCreate-element-config',
107
+ 'repo': 'github.com/CoCreate-app/CoCreate-element-config.git'
108
+ },
109
+ {
110
+ 'path': '../CoCreate-element-prototype',
111
+ 'repo': 'github.com/CoCreate-app/CoCreate-element-prototype.git'
112
+ },
113
+ {
114
+ 'path': '../CoCreate-elements',
115
+ 'repo': 'github.com/CoCreate-app/CoCreate-elements.git'
116
+ },
117
+ {
118
+ 'path': '../CoCreate-events',
119
+ 'repo': 'github.com/CoCreate-app/CoCreate-events.git'
120
+ },
121
+ {
122
+ 'path': '../CoCreate-fetch',
123
+ 'repo': 'github.com/CoCreate-app/CoCreate-fetch.git'
124
+ },
125
+ {
126
+ 'path': '../CoCreate-file',
127
+ 'repo': 'github.com/CoCreate-app/CoCreate-file.git'
128
+ },
129
+ {
130
+ 'path': '../CoCreate-filter',
131
+ 'repo': 'github.com/CoCreate-app/CoCreate-filter.git'
132
+ },
133
+ {
134
+ 'path': '../CoCreate-floating-label',
135
+ 'repo': 'github.com/CoCreate-app/CoCreate-floating-label.git'
136
+ },
137
+ {
138
+ 'path': '../CoCreate-form',
139
+ 'repo': 'github.com/CoCreate-app/CoCreate-form.git'
140
+ },
141
+ {
142
+ 'path': '../CoCreate-fullscreen',
143
+ 'repo': 'github.com/CoCreate-app/CoCreate-fullscreen.git'
144
+ },
145
+ {
146
+ 'path': '../CoCreate-hosting',
147
+ 'repo': 'github.com/CoCreate-app/CoCreate-hosting.git'
148
+ },
149
+ {
150
+ 'path': '../CoCreate-indexeddb',
151
+ 'repo': 'github.com/CoCreate-app/CoCreate-indexeddb.git'
152
+ },
153
+ {
154
+ 'path': '../CoCreate-industry',
155
+ 'repo': 'github.com/CoCreate-app/CoCreate-industry.git'
156
+ },
157
+ {
158
+ 'path': '../CoCreate-lazy-loader',
159
+ 'repo': 'github.com/CoCreate-app/CoCreate-lazy-loader.git'
160
+ },
161
+ {
162
+ 'path': '../CoCreate-local-storage',
163
+ 'repo': 'github.com/CoCreate-app/CoCreate-local-storage.git'
164
+ },
165
+ {
166
+ 'path': '../CoCreate-link',
167
+ 'repo': 'github.com/CoCreate-app/CoCreate-link.git'
168
+ },
169
+ {
170
+ 'path': '../CoCreate-message-client',
171
+ 'repo': 'github.com/CoCreate-app/CoCreate-message-client.git'
172
+ },
173
+ {
174
+ 'path': '../CoCreate-modal',
175
+ 'repo': 'github.com/CoCreate-app/CoCreate-modal.git'
176
+ },
177
+ {
178
+ 'path': '../CoCreate-observer',
179
+ 'repo': 'github.com/CoCreate-app/CoCreate-observer.git'
180
+ },
181
+ {
182
+ 'path': '../CoCreate-organizations',
183
+ 'repo': 'github.com/CoCreate-app/CoCreate-organizations.git'
184
+ },
185
+ {
186
+ 'path': '../CoCreate-overlay-scroll',
187
+ 'repo': 'github.com/CoCreate-app/CoCreate-overlay-scroll.git'
188
+ },
189
+ {
190
+ 'path': '../CoCreate-parallax',
191
+ 'repo': 'github.com/CoCreate-app/CoCreate-parallax.git'
192
+ },
193
+ {
194
+ 'path': '../CoCreate-pass',
195
+ 'repo': 'github.com/CoCreate-app/CoCreate-pass.git'
196
+ },
197
+ {
198
+ 'path': '../CoCreate-position',
199
+ 'repo': 'github.com/CoCreate-app/CoCreate-position.git'
200
+ },
201
+ {
202
+ 'path': '../CoCreate-progress',
203
+ 'repo': 'github.com/CoCreate-app/CoCreate-progress.git'
204
+ },
205
+ {
206
+ 'path': '../CoCreate-pwa',
207
+ 'repo': 'github.com/CoCreate-app/CoCreate-pwa.git'
208
+ },
209
+ {
210
+ 'path': '../CoCreate-random-color',
211
+ 'repo': 'github.com/CoCreate-app/CoCreate-random-color.git'
212
+ },
213
+ {
214
+ 'path': '../CoCreate-remove',
215
+ 'repo': 'github.com/CoCreate-app/CoCreate-remove.git'
216
+ },
217
+ {
218
+ 'path': '../CoCreate-render',
219
+ 'repo': 'github.com/CoCreate-app/CoCreate-render.git'
220
+ },
221
+ {
222
+ 'path': '../CoCreate-render-json',
223
+ 'repo': 'github.com/CoCreate-app/CoCreate-render-json.git'
224
+ },
225
+ {
226
+ 'path': '../CoCreate-resize',
227
+ 'repo': 'github.com/CoCreate-app/CoCreate-resize.git'
228
+ },
229
+ {
230
+ 'path': '../CoCreate-resize-observer',
231
+ 'repo': 'github.com/CoCreate-app/CoCreate-resize-observer.git'
232
+ },
233
+ {
234
+ 'path': '../CoCreate-rich-text',
235
+ 'repo': 'github.com/CoCreate-app/CoCreate-rich-text.git'
236
+ },
237
+ {
238
+ 'path': '../CoCreate-scroll',
239
+ 'repo': 'github.com/CoCreate-app/CoCreate-scroll.git'
240
+ },
241
+ {
242
+ 'path': '../CoCreate-search',
243
+ 'repo': 'github.com/CoCreate-app/CoCreate-search.git'
244
+ },
245
+ {
246
+ 'path': '../CoCreate-select',
247
+ 'repo': 'github.com/CoCreate-app/CoCreate-select.git'
248
+ },
249
+ {
250
+ 'path': '../CoCreate-selection',
251
+ 'repo': 'github.com/CoCreate-app/CoCreate-selection.git'
252
+ },
253
+ {
254
+ 'path': '../CoCreate-signup-animation',
255
+ 'repo': 'github.com/CoCreate-app/CoCreate-signup-animation.git'
256
+ },
257
+ {
258
+ 'path': '../CoCreate-socket-client',
259
+ 'repo': 'github.com/CoCreate-app/CoCreate-socket-client.git'
260
+ },
261
+ {
262
+ 'path': '../CoCreate-social-share',
263
+ 'repo': 'github.com/CoCreate-app/CoCreate-social-share.git'
264
+ },
265
+ {
266
+ 'path': '../CoCreate-text',
267
+ 'repo': 'github.com/CoCreate-app/CoCreate-text.git'
268
+ },
269
+ {
270
+ 'path': '../CoCreate-toolbar',
271
+ 'repo': 'github.com/CoCreate-app/CoCreate-toolbar.git'
272
+ },
273
+ {
274
+ 'path': '../CoCreate-unique',
275
+ 'repo': 'github.com/CoCreate-app/CoCreate-unique.git'
276
+ },
277
+ {
278
+ 'path': '../CoCreate-users',
279
+ 'repo': 'github.com/CoCreate-app/CoCreate-users.git'
280
+ },
281
+ {
282
+ 'path': '../CoCreate-utils',
283
+ 'repo': 'github.com/CoCreate-app/CoCreate-utils.git'
284
+ },
285
+ {
286
+ 'path': '../CoCreate-uuid',
287
+ 'repo': 'github.com/CoCreate-app/CoCreate-uuid.git'
288
+ },
289
+ {
290
+ 'path': '../CoCreate-validation',
291
+ 'repo': 'github.com/CoCreate-app/CoCreate-validation.git'
292
+ },
293
+ {
294
+ 'path': '../CoCreate-vdom',
295
+ 'repo': 'github.com/CoCreate-app/CoCreate-vdom.git'
296
+ },
297
+
298
+ // Modules
299
+ {
300
+ 'path': '../../CoCreate-apps/CoCreate-builder',
301
+ 'repo': 'github.com/CoCreate-app/CoCreate-builder.git'
302
+ },
303
+ // {
304
+ // 'path':'../../CoCreate-apps/CoCreate-calendar',
305
+ // 'repo' : 'github.com/CoCreate-app/CoCreate-calendar.git'
306
+ // },
307
+ // {
308
+ // 'path':'../../CoCreate-apps/CoCreate-checkout',
309
+ // 'repo' : 'github.com/CoCreate-app/CoCreate-checkout.git'
310
+ // },
311
+ {
312
+ 'path': '../../CoCreate-apps/CoCreate-dashboard',
313
+ 'repo': 'github.com/CoCreate-app/CoCreate-dashboard.git'
314
+ },
315
+ {
316
+ 'path': '../../CoCreate-apps/CoCreate-datatable',
317
+ 'repo': 'github.com/CoCreate-app/CoCreate-datatable.git'
318
+ },
319
+ // {
320
+ // 'path':'../../CoCreate-apps/CoCreate-email',
321
+ // 'repo' : 'github.com/CoCreate-app/CoCreate-email.git'
322
+ // },
323
+ {
324
+ 'path': '../../CoCreate-apps/CoCreate-kanban',
325
+ 'repo': 'github.com/CoCreate-app/CoCreate-kanban.git'
326
+ },
327
+ {
328
+ 'path': '../../CoCreate-apps/CoCreate-sandbox',
329
+ 'repo': 'github.com/CoCreate-app/CoCreate-sandbox.git'
330
+ },
331
+
332
+ // Plugins
333
+ {
334
+ 'path': '../../CoCreate-plugins/CoCreate-charts',
335
+ 'repo': 'github.com/CoCreate-app/CoCreate-charts.git'
336
+ },
337
+ {
338
+ 'path': '../../CoCreate-plugins/CoCreate-croppie',
339
+ 'repo': 'github.com/CoCreate-app/CoCreate-croppie.git'
340
+ },
341
+ {
342
+ 'path': '../../CoCreate-plugins/CoCreate-domain',
343
+ 'repo': 'github.com/CoCreate-app/CoCreate-domain.git'
344
+ },
345
+ {
346
+ 'path': '../../CoCreate-plugins/CoCreate-fullcalendar',
347
+ 'repo': 'github.com/CoCreate-app/CoCreate-fullcalendar.git'
348
+ },
349
+ {
350
+ 'path': '../../CoCreate-plugins/CoCreate-facebook',
351
+ 'repo': 'github.com/CoCreate-app/CoCreate-facebook.git'
352
+ },
353
+ {
354
+ 'path': '../../CoCreate-plugins/CoCreate-google-maps',
355
+ 'repo': 'github.com/CoCreate-app/CoCreate-google-maps.git'
356
+ },
357
+ {
358
+ 'path': '../../CoCreate-plugins/CoCreate-google-auth',
359
+ 'repo': 'github.com/CoCreate-app/CoCreate-google-auth.git'
360
+ },
361
+ {
362
+ 'path': '../../CoCreate-plugins/CoCreate-instagram',
363
+ 'repo': 'github.com/CoCreate-app/CoCreate-instagram.git'
364
+ },
365
+ {
366
+ 'path': '../../CoCreate-plugins/CoCreate-lighthouse',
367
+ 'repo': 'github.com/CoCreate-app/CoCreate-lighthouse.git'
368
+ },
369
+ {
370
+ 'path': '../../CoCreate-plugins/CoCreate-linkedin',
371
+ 'repo': 'github.com/CoCreate-app/CoCreate-linkedin.git'
372
+ },
373
+ {
374
+ 'path': '../../CoCreate-plugins/CoCreate-pickr',
375
+ 'repo': 'github.com/CoCreate-app/CoCreate-pickr.git'
376
+ },
377
+ {
378
+ 'path': '../../CoCreate-plugins/CoCreate-pinterest',
379
+ 'repo': 'github.com/CoCreate-app/CoCreate-pinterest.git'
380
+ },
381
+ {
382
+ 'path': '../../CoCreate-plugins/CoCreate-plaid',
383
+ 'repo': 'github.com/CoCreate-app/CoCreate-plaid.git'
384
+ },
385
+ {
386
+ 'path': '../../CoCreate-plugins/CoCreate-prism',
387
+ 'repo': 'github.com/CoCreate-app/CoCreate-prism.git'
388
+ },
389
+ {
390
+ 'path': '../../CoCreate-plugins/CoCreate-s3',
391
+ 'repo': 'github.com/CoCreate-app/CoCreate-s3.git'
392
+ },
393
+ {
394
+ 'path': '../../CoCreate-plugins/CoCreate-sendgrid',
395
+ 'repo': 'github.com/CoCreate-app/CoCreate-sendgrid.git'
396
+ },
397
+ {
398
+ 'path': '../../CoCreate-plugins/CoCreate-shipengine',
399
+ 'repo': 'github.com/CoCreate-app/CoCreate-shipengine.git'
400
+ },
401
+ {
402
+ 'path': '../../CoCreate-plugins/CoCreate-stripe',
403
+ 'repo': 'github.com/CoCreate-app/CoCreate-stripe.git'
404
+ },
405
+ {
406
+ 'path': '../../CoCreate-plugins/CoCreate-tui-image-editor',
407
+ 'repo': 'github.com/CoCreate-app/CoCreate-tui-image-editor.git'
408
+ },
409
+ {
410
+ 'path': '../../CoCreate-plugins/CoCreate-twilio',
411
+ 'repo': 'github.com/CoCreate-app/CoCreate-twilio.git'
412
+ },
413
+ {
414
+ 'path': '../../CoCreate-plugins/CoCreate-twitter',
415
+ 'repo': 'github.com/CoCreate-app/CoCreate-twitter.git'
416
+ },
417
+ {
418
+ 'path': '../../CoCreate-plugins/CoCreate-uppy',
419
+ 'repo': 'github.com/CoCreate-app/CoCreate-uppy.git'
420
+ },
421
+
422
+
423
+
424
+ // {
425
+ // 'path': '../CoCreateWS',
426
+ // 'repo': 'github.com/CoCreate-app/CoCreateWS.git'
427
+ // },
428
+ // {
429
+ // 'path': '../CoCreateApi',
430
+ // 'repo': 'github.com/CoCreate-app/CoCreateApi.git'
431
+ // },
432
+
433
+ // {
434
+ // 'path': '../CoCreateLB',
435
+ // 'repo': 'github.com/CoCreate-app/CoCreateLB.git'
436
+ // },
437
+
438
+
439
+ // // Components
440
+ {
441
+ 'path': '../CoCreate-authenticate',
442
+ 'repo': 'github.com/CoCreate-app/CoCreate-authenticate.git'
443
+ },
444
+ {
445
+ 'path': '../CoCreate-authorize',
446
+ 'repo': 'github.com/CoCreate-app/CoCreate-authorize.git'
447
+ },
448
+ {
449
+ 'path': '../CoCreate-crud-server',
450
+ 'repo': 'github.com/CoCreate-app/CoCreate-crud-server.git'
451
+ },
452
+ {
453
+ 'path': '../CoCreate-file-server',
454
+ 'repo': 'github.com/CoCreate-app/CoCreate-file-server.git'
455
+ },
456
+ {
457
+ 'path': '../CoCreate-loadtest',
458
+ 'repo': 'github.com/CoCreate-app/CoCreate-loadtest.git'
459
+ },
460
+ {
461
+ 'path': '../CoCreate-message-server',
462
+ 'repo': 'github.com/CoCreate-app/CoCreate-message-server.git'
463
+ },
464
+ {
465
+ 'path': '../CoCreate-metrics-server',
466
+ 'repo': 'github.com/CoCreate-app/CoCreate-metrics-server.git'
467
+ },
468
+ {
469
+ 'path': '../CoCreate-mongodb',
470
+ 'repo': 'github.com/CoCreate-app/CoCreate-mongodb.git'
471
+ },
472
+ {
473
+ 'path': '../CoCreate-node-autoscaler',
474
+ 'repo': 'github.com/CoCreate-app/CoCreate-node-autoscaler.git'
475
+ },
476
+ {
477
+ 'path': '../CoCreate-server-side-render',
478
+ 'repo': 'github.com/CoCreate-app/CoCreate-server-side-render.git'
479
+ },
480
+ {
481
+ 'path': '../CoCreate-socket-server',
482
+ 'repo': 'github.com/CoCreate-app/CoCreate-socket-server.git'
483
+ },
484
+
485
+ // Maybe depreciated
486
+ // {
487
+ // 'path': '../CoCreate-ide',
488
+ // 'repo': 'github.com/CoCreate-app/CoCreate-ide.git'
489
+ // },
490
+ // {
491
+ // 'path': '../CoCreateEmail',
492
+ // 'repo': 'github.com/CoCreate-app/CoCreateEmail.git'
493
+ // },
494
+
24
495
  ]
496
+
25
497
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cocreate/cli",
3
- "version": "1.31.2",
3
+ "version": "1.32.0",
4
4
  "description": "Polyrepo management bash CLI tool. Run all git commands and yarn commands on multiple repositories. Also includes a few custom macros for cloning, installing, etc.",
5
5
  "keywords": [
6
6
  "cli",
@@ -36,7 +36,6 @@
36
36
  "remove": "nodejs src/commands/remove.js",
37
37
  "replace": "nodejs src/commands/replace.js",
38
38
  "webpack": "nodejs src/commands/fs/webpack.js",
39
- "docs": "node ./node_modules/@cocreate/docs/src/index.js",
40
39
  "permissions": "chmod +rwx /home/ubuntu/.nvm/versions/node/v19.8.1/bin/coc"
41
40
  },
42
41
  "repository": {
@@ -58,9 +57,7 @@
58
57
  "coc": "src/coc.js"
59
58
  },
60
59
  "dependencies": {
61
- "@cocreate/docs": "^1.8.13",
62
60
  "@cocreate/file": "^1.2.2",
63
- "colors": "latest",
64
61
  "glob": "^7.1.7",
65
62
  "prettier": "^2.3.2"
66
63
  }
package/src/coc.js CHANGED
@@ -1,10 +1,10 @@
1
- #!/usr/bin/env node
1
+ #!/usr/bin/env node
2
2
  const path = require("path");
3
3
  const fs = require("fs");
4
4
  const execute = require('./execute');
5
5
  const argv = process.argv.slice(2);
6
6
  const addMeta = require('./addMeta');
7
- const colors = require('colors');
7
+ const { color } = require('./fonts');
8
8
 
9
9
 
10
10
  if (argv.length < 1) {
@@ -28,26 +28,27 @@ command = argv
28
28
 
29
29
  function getRepositories(path) {
30
30
  try {
31
- return require(path);
31
+ const config = require(path);
32
+ return config.repositories;
32
33
  }
33
34
  catch (err) {
34
- console.error('can not read repository file in'.red, path, 'error:'.red, err.message.red);
35
+ console.error(color.red + 'can not read repository file in' + color.reset, path, color.red + 'error:' + color.reset, err.message);
35
36
  process.exit(1);
36
37
  }
37
38
  }
38
39
 
39
- const currentRepoPath = path.resolve(process.cwd(), "./repositories.js");
40
+ const currentRepoPath = path.resolve(process.cwd(), "./CoCreate.config.js");
40
41
  let packageJsonPath = path.resolve(process.cwd(), './package.json');
41
42
  let directory
42
43
 
43
44
  if (config['c'] && fs.existsSync(config['c'])) {
44
45
  repos = getRepositories(config['c']);
45
46
  directory = path.dirname(config['c']);
46
- console.warn(`using ${config['c']} configuration`.yellow);
47
+ console.warn(color.yellow + `using ${config['c']} configuration` + color.reset);
47
48
  } else if (!config['self'] && fs.existsSync(currentRepoPath)) {
48
49
  repos = getRepositories(currentRepoPath);
49
50
  directory = path.dirname(currentRepoPath);
50
- console.warn(`using ${currentRepoPath} configuration`.yellow);
51
+ console.warn(color.yellow + `using ${currentRepoPath} configuration` + color.reset);
51
52
  } else if (fs.existsSync(packageJsonPath)) {
52
53
  let repoPath = path.resolve(process.cwd());
53
54
  let packageObj = require(packageJsonPath);
@@ -57,10 +58,10 @@ if (config['c'] && fs.existsSync(config['c'])) {
57
58
  repo: `${repoUrl}`
58
59
  }];
59
60
  directory = path.dirname(packageJsonPath);
60
- console.warn(`using ${packageJsonPath} configuration`.yellow);
61
+ console.warn(color.yellow + `using ${packageJsonPath} configuration` + color.reset);
61
62
  }
62
63
  // else {
63
- // console.error(`a configuration file can not be found`.red);
64
+ // console.error(color.red + `a configuration file can not be found` + color.reset);
64
65
  // process.exit(1);
65
66
  // }
66
67
  config = { hideMessage: false, ...config };
@@ -73,9 +74,9 @@ config = { hideMessage: false, ...config };
73
74
  if (failed.length === 0)
74
75
  process.exit(0);
75
76
  else {
76
- console.log(' **************** failures **************** '.red);
77
+ console.log(color.red + ' **************** failures **************** ' + color.reset);
77
78
  for (let failure of failed)
78
- console.log(`${failure.name}: ${failure.des}`.red);
79
+ console.log(color.red + `${failure.name}: ${failure.des}` + color.reset);
79
80
 
80
81
  }
81
82
  }