@cocreate/cli 1.48.0 → 1.49.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.
- package/.github/workflows/automated.yml +0 -1
- package/CHANGELOG.md +18 -0
- package/CoCreate.config.js +216 -222
- package/package.json +2 -4
- package/prettier.config.js +16 -0
- package/src/commands/fs/automated.js +81 -31
- package/src/commands/fs/config.js +94 -38
- package/src/commands/fs/prettier.config.js +99 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
# [1.49.0](https://github.com/CoCreate-app/CoCreate-cli/compare/v1.48.0...v1.49.0) (2024-11-04)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* formating ([4fa8f1b](https://github.com/CoCreate-app/CoCreate-cli/commit/4fa8f1bc145c9b42eb9c18795fe3c9e78e7c9ac5))
|
|
7
|
+
* formating ([d7c6940](https://github.com/CoCreate-app/CoCreate-cli/commit/d7c694035d9be72cabf557a50a743d8d1dec4287))
|
|
8
|
+
* prettier.config options ([9c7ed78](https://github.com/CoCreate-app/CoCreate-cli/commit/9c7ed787cc7f4e9ab20ceb6ffa22fcc75384147a))
|
|
9
|
+
* removed glob and prittier package ([568016b](https://github.com/CoCreate-app/CoCreate-cli/commit/568016bdc513a0aa3c10f9e3bfa22374182ef41c))
|
|
10
|
+
* removed loadtest, moved mongodb to plugins ([9cea5db](https://github.com/CoCreate-app/CoCreate-cli/commit/9cea5dbd156f7b5900f43269cf94a7e1bbf77011))
|
|
11
|
+
* usertab false added to tempalte ([8dc0843](https://github.com/CoCreate-app/CoCreate-cli/commit/8dc0843c31f49c0c0bd125ad73ebdbc95dba5adc))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
|
|
16
|
+
* add prettier.config.js and format files ([47de18c](https://github.com/CoCreate-app/CoCreate-cli/commit/47de18c2170889e7f64d8eca34f46b3df166e434))
|
|
17
|
+
* support wildcards, removed glob ([3533c23](https://github.com/CoCreate-app/CoCreate-cli/commit/3533c23b339fa893f7400c13cf0d83624572c0b5))
|
|
18
|
+
|
|
1
19
|
# [1.48.0](https://github.com/CoCreate-app/CoCreate-cli/compare/v1.47.7...v1.48.0) (2024-09-21)
|
|
2
20
|
|
|
3
21
|
|
package/CoCreate.config.js
CHANGED
|
@@ -1,421 +1,415 @@
|
|
|
1
1
|
module.exports = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
{
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
],
|
|
17
|
-
"directory": "cli",
|
|
2
|
+
organization_id: "",
|
|
3
|
+
key: "",
|
|
4
|
+
host: "",
|
|
5
|
+
sources: [
|
|
6
|
+
{
|
|
7
|
+
array: "files",
|
|
8
|
+
object: {
|
|
9
|
+
_id: "637ca36250234ef1671ce30f",
|
|
10
|
+
name: "index.html",
|
|
11
|
+
path: "/docs/cli",
|
|
12
|
+
pathname: "/docs/cli/index.html",
|
|
13
|
+
src: "{{./docs/index.html}}",
|
|
14
|
+
host: ["*"],
|
|
15
|
+
directory: "cli",
|
|
18
16
|
"content-type": "{{content-type}}",
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
}
|
|
17
|
+
public: "true",
|
|
18
|
+
},
|
|
19
|
+
},
|
|
22
20
|
],
|
|
23
|
-
|
|
21
|
+
repositories: [
|
|
24
22
|
{
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
path: "../../CoCreateJS",
|
|
24
|
+
repo: "github.com/CoCreate-app/CoCreateJS.git",
|
|
27
25
|
},
|
|
28
26
|
{
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
path: "../../CoCreateCSS",
|
|
28
|
+
repo: "github.com/CoCreate-app/CoCreateCSS.git",
|
|
31
29
|
},
|
|
32
30
|
{
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
path: "../../CoCreate-admin",
|
|
32
|
+
repo: "github.com/CoCreate-app/CoCreate-admin.git",
|
|
35
33
|
},
|
|
36
34
|
{
|
|
37
|
-
|
|
38
|
-
|
|
35
|
+
path: "../../CoCreate-website",
|
|
36
|
+
repo: "github.com/CoCreate-app/CoCreate-website.git",
|
|
39
37
|
},
|
|
40
38
|
{
|
|
41
|
-
|
|
42
|
-
|
|
39
|
+
path: "../CoCreate-actions",
|
|
40
|
+
repo: "github.com/CoCreate-app/CoCreate-actions.git",
|
|
43
41
|
},
|
|
44
42
|
{
|
|
45
|
-
|
|
46
|
-
|
|
43
|
+
path: "../CoCreate-api",
|
|
44
|
+
repo: "github.com/CoCreate-app/CoCreate-api.git",
|
|
47
45
|
},
|
|
48
46
|
{
|
|
49
|
-
|
|
50
|
-
|
|
47
|
+
path: "../CoCreate-attributes",
|
|
48
|
+
repo: "github.com/CoCreate-app/CoCreate-attributes.git",
|
|
51
49
|
},
|
|
52
50
|
{
|
|
53
|
-
|
|
54
|
-
|
|
51
|
+
path: "../CoCreate-cache",
|
|
52
|
+
repo: "github.com/CoCreate-app/CoCreate-cache.git",
|
|
55
53
|
},
|
|
56
54
|
{
|
|
57
|
-
|
|
58
|
-
|
|
55
|
+
path: "../CoCreate-calculate",
|
|
56
|
+
repo: "github.com/CoCreate-app/CoCreate-calculation.git",
|
|
59
57
|
},
|
|
60
58
|
{
|
|
61
|
-
|
|
62
|
-
|
|
59
|
+
path: "../CoCreate-cli",
|
|
60
|
+
repo: "github.com/CoCreate-app/CoCreate-cli.git",
|
|
63
61
|
},
|
|
64
62
|
{
|
|
65
|
-
|
|
66
|
-
|
|
63
|
+
path: "../CoCreate-clone",
|
|
64
|
+
repo: "github.com/CoCreate-app/CoCreate-clone.git",
|
|
67
65
|
},
|
|
68
66
|
{
|
|
69
|
-
|
|
70
|
-
|
|
67
|
+
path: "../CoCreate-codearea",
|
|
68
|
+
repo: "github.com/CoCreate-app/CoCreate-codearea.git",
|
|
71
69
|
},
|
|
72
70
|
{
|
|
73
|
-
|
|
74
|
-
|
|
71
|
+
path: "../CoCreate-conditional-logic",
|
|
72
|
+
repo: "github.com/CoCreate-app/CoCreate-conditional-logic.git",
|
|
75
73
|
},
|
|
76
74
|
{
|
|
77
|
-
|
|
78
|
-
|
|
75
|
+
path: "../CoCreate-config",
|
|
76
|
+
repo: "github.com/CoCreate-app/CoCreate-config.git",
|
|
79
77
|
},
|
|
80
78
|
{
|
|
81
|
-
|
|
82
|
-
|
|
79
|
+
path: "../CoCreate-crdt",
|
|
80
|
+
repo: "github.com/CoCreate-app/CoCreate-crdt.git",
|
|
83
81
|
},
|
|
84
82
|
{
|
|
85
|
-
|
|
86
|
-
|
|
83
|
+
path: "../CoCreate-crud-client",
|
|
84
|
+
repo: "github.com/CoCreate-app/CoCreate-crud-client.git",
|
|
87
85
|
},
|
|
88
86
|
{
|
|
89
|
-
|
|
90
|
-
|
|
87
|
+
path: "../CoCreate-css-parser",
|
|
88
|
+
repo: "github.com/CoCreate-app/CoCreate-css-parser.git",
|
|
91
89
|
},
|
|
92
90
|
{
|
|
93
|
-
|
|
94
|
-
|
|
91
|
+
path: "../CoCreate-cursors",
|
|
92
|
+
repo: "github.com/CoCreate-app/CoCreate-cursors.git",
|
|
95
93
|
},
|
|
96
94
|
{
|
|
97
|
-
|
|
98
|
-
|
|
95
|
+
path: "../CoCreate-dnd",
|
|
96
|
+
repo: "github.com/CoCreate-app/CoCreate-dnd.git",
|
|
99
97
|
},
|
|
100
98
|
{
|
|
101
|
-
|
|
102
|
-
|
|
99
|
+
path: "../CoCreate-docs",
|
|
100
|
+
repo: "github.com/CoCreate-app/CoCreate-docs.git",
|
|
103
101
|
},
|
|
104
102
|
{
|
|
105
|
-
|
|
106
|
-
|
|
103
|
+
path: "../CoCreate-element-config",
|
|
104
|
+
repo: "github.com/CoCreate-app/CoCreate-element-config.git",
|
|
107
105
|
},
|
|
108
106
|
{
|
|
109
|
-
|
|
110
|
-
|
|
107
|
+
path: "../CoCreate-element-prototype",
|
|
108
|
+
repo: "github.com/CoCreate-app/CoCreate-element-prototype.git",
|
|
111
109
|
},
|
|
112
110
|
{
|
|
113
|
-
|
|
114
|
-
|
|
111
|
+
path: "../CoCreate-elements",
|
|
112
|
+
repo: "github.com/CoCreate-app/CoCreate-elements.git",
|
|
115
113
|
},
|
|
116
114
|
{
|
|
117
|
-
|
|
118
|
-
|
|
115
|
+
path: "../CoCreate-events",
|
|
116
|
+
repo: "github.com/CoCreate-app/CoCreate-events.git",
|
|
119
117
|
},
|
|
120
118
|
{
|
|
121
|
-
|
|
122
|
-
|
|
119
|
+
path: "../CoCreate-file",
|
|
120
|
+
repo: "github.com/CoCreate-app/CoCreate-file.git",
|
|
123
121
|
},
|
|
124
122
|
{
|
|
125
|
-
|
|
126
|
-
|
|
123
|
+
path: "../CoCreate-filter",
|
|
124
|
+
repo: "github.com/CoCreate-app/CoCreate-filter.git",
|
|
127
125
|
},
|
|
128
126
|
{
|
|
129
|
-
|
|
130
|
-
|
|
127
|
+
path: "../CoCreate-floating-label",
|
|
128
|
+
repo: "github.com/CoCreate-app/CoCreate-floating-label.git",
|
|
131
129
|
},
|
|
132
130
|
{
|
|
133
|
-
|
|
134
|
-
|
|
131
|
+
path: "../CoCreate-fullscreen",
|
|
132
|
+
repo: "github.com/CoCreate-app/CoCreate-fullscreen.git",
|
|
135
133
|
},
|
|
136
134
|
{
|
|
137
|
-
|
|
138
|
-
|
|
135
|
+
path: "../CoCreate-indexeddb",
|
|
136
|
+
repo: "github.com/CoCreate-app/CoCreate-indexeddb.git",
|
|
139
137
|
},
|
|
140
138
|
{
|
|
141
|
-
|
|
142
|
-
|
|
139
|
+
path: "../CoCreate-industry",
|
|
140
|
+
repo: "github.com/CoCreate-app/CoCreate-industry.git",
|
|
143
141
|
},
|
|
144
142
|
{
|
|
145
|
-
|
|
146
|
-
|
|
143
|
+
path: "../CoCreate-lazy-loader",
|
|
144
|
+
repo: "github.com/CoCreate-app/CoCreate-lazy-loader.git",
|
|
147
145
|
},
|
|
148
146
|
{
|
|
149
|
-
|
|
150
|
-
|
|
147
|
+
path: "../CoCreate-local-storage",
|
|
148
|
+
repo: "github.com/CoCreate-app/CoCreate-local-storage.git",
|
|
151
149
|
},
|
|
152
150
|
{
|
|
153
|
-
|
|
154
|
-
|
|
151
|
+
path: "../CoCreate-link",
|
|
152
|
+
repo: "github.com/CoCreate-app/CoCreate-link.git",
|
|
155
153
|
},
|
|
156
154
|
{
|
|
157
|
-
|
|
158
|
-
|
|
155
|
+
path: "../CoCreate-modal",
|
|
156
|
+
repo: "github.com/CoCreate-app/CoCreate-modal.git",
|
|
159
157
|
},
|
|
160
158
|
{
|
|
161
|
-
|
|
162
|
-
|
|
159
|
+
path: "../CoCreate-observer",
|
|
160
|
+
repo: "github.com/CoCreate-app/CoCreate-observer.git",
|
|
163
161
|
},
|
|
164
162
|
{
|
|
165
|
-
|
|
166
|
-
|
|
163
|
+
path: "../CoCreate-organizations",
|
|
164
|
+
repo: "github.com/CoCreate-app/CoCreate-organizations.git",
|
|
167
165
|
},
|
|
168
166
|
{
|
|
169
|
-
|
|
170
|
-
|
|
167
|
+
path: "../CoCreate-overlay-scroll",
|
|
168
|
+
repo: "github.com/CoCreate-app/CoCreate-overlay-scroll.git",
|
|
171
169
|
},
|
|
172
170
|
{
|
|
173
|
-
|
|
174
|
-
|
|
171
|
+
path: "../CoCreate-parallax",
|
|
172
|
+
repo: "github.com/CoCreate-app/CoCreate-parallax.git",
|
|
175
173
|
},
|
|
176
174
|
{
|
|
177
|
-
|
|
178
|
-
|
|
175
|
+
path: "../CoCreate-state",
|
|
176
|
+
repo: "github.com/CoCreate-app/CoCreate-state.git",
|
|
179
177
|
},
|
|
180
178
|
{
|
|
181
|
-
|
|
182
|
-
|
|
179
|
+
path: "../CoCreate-position",
|
|
180
|
+
repo: "github.com/CoCreate-app/CoCreate-position.git",
|
|
183
181
|
},
|
|
184
182
|
{
|
|
185
|
-
|
|
186
|
-
|
|
183
|
+
path: "../CoCreate-progress",
|
|
184
|
+
repo: "github.com/CoCreate-app/CoCreate-progress.git",
|
|
187
185
|
},
|
|
188
186
|
{
|
|
189
|
-
|
|
190
|
-
|
|
187
|
+
path: "../CoCreate-pwa",
|
|
188
|
+
repo: "github.com/CoCreate-app/CoCreate-pwa.git",
|
|
191
189
|
},
|
|
192
190
|
{
|
|
193
|
-
|
|
194
|
-
|
|
191
|
+
path: "../CoCreate-random-color",
|
|
192
|
+
repo: "github.com/CoCreate-app/CoCreate-random-color.git",
|
|
195
193
|
},
|
|
196
194
|
{
|
|
197
|
-
|
|
198
|
-
|
|
195
|
+
path: "../CoCreate-remove",
|
|
196
|
+
repo: "github.com/CoCreate-app/CoCreate-remove.git",
|
|
199
197
|
},
|
|
200
198
|
{
|
|
201
|
-
|
|
202
|
-
|
|
199
|
+
path: "../CoCreate-render",
|
|
200
|
+
repo: "github.com/CoCreate-app/CoCreate-render.git",
|
|
203
201
|
},
|
|
204
202
|
{
|
|
205
|
-
|
|
206
|
-
|
|
203
|
+
path: "../CoCreate-resize",
|
|
204
|
+
repo: "github.com/CoCreate-app/CoCreate-resize.git",
|
|
207
205
|
},
|
|
208
206
|
{
|
|
209
|
-
|
|
210
|
-
|
|
207
|
+
path: "../CoCreate-rich-text",
|
|
208
|
+
repo: "github.com/CoCreate-app/CoCreate-rich-text.git",
|
|
211
209
|
},
|
|
212
210
|
{
|
|
213
|
-
|
|
214
|
-
|
|
211
|
+
path: "../CoCreate-scroll",
|
|
212
|
+
repo: "github.com/CoCreate-app/CoCreate-scroll.git",
|
|
215
213
|
},
|
|
216
214
|
{
|
|
217
|
-
|
|
218
|
-
|
|
215
|
+
path: "../CoCreate-search",
|
|
216
|
+
repo: "github.com/CoCreate-app/CoCreate-search.git",
|
|
219
217
|
},
|
|
220
218
|
{
|
|
221
|
-
|
|
222
|
-
|
|
219
|
+
path: "../CoCreate-select",
|
|
220
|
+
repo: "github.com/CoCreate-app/CoCreate-select.git",
|
|
223
221
|
},
|
|
224
222
|
{
|
|
225
|
-
|
|
226
|
-
|
|
223
|
+
path: "../CoCreate-selection",
|
|
224
|
+
repo: "github.com/CoCreate-app/CoCreate-selection.git",
|
|
227
225
|
},
|
|
228
226
|
{
|
|
229
|
-
|
|
230
|
-
|
|
227
|
+
path: "../CoCreate-signup-animation",
|
|
228
|
+
repo: "github.com/CoCreate-app/CoCreate-signup-animation.git",
|
|
231
229
|
},
|
|
232
230
|
{
|
|
233
|
-
|
|
234
|
-
|
|
231
|
+
path: "../CoCreate-socket-client",
|
|
232
|
+
repo: "github.com/CoCreate-app/CoCreate-socket-client.git",
|
|
235
233
|
},
|
|
236
234
|
{
|
|
237
|
-
|
|
238
|
-
|
|
235
|
+
path: "../CoCreate-social-share",
|
|
236
|
+
repo: "github.com/CoCreate-app/CoCreate-social-share.git",
|
|
239
237
|
},
|
|
240
238
|
{
|
|
241
|
-
|
|
242
|
-
|
|
239
|
+
path: "../CoCreate-text",
|
|
240
|
+
repo: "github.com/CoCreate-app/CoCreate-text.git",
|
|
243
241
|
},
|
|
244
242
|
{
|
|
245
|
-
|
|
246
|
-
|
|
243
|
+
path: "../CoCreate-toolbar",
|
|
244
|
+
repo: "github.com/CoCreate-app/CoCreate-toolbar.git",
|
|
247
245
|
},
|
|
248
246
|
{
|
|
249
|
-
|
|
250
|
-
|
|
247
|
+
path: "../CoCreate-unique",
|
|
248
|
+
repo: "github.com/CoCreate-app/CoCreate-unique.git",
|
|
251
249
|
},
|
|
252
250
|
{
|
|
253
|
-
|
|
254
|
-
|
|
251
|
+
path: "../CoCreate-users",
|
|
252
|
+
repo: "github.com/CoCreate-app/CoCreate-users.git",
|
|
255
253
|
},
|
|
256
254
|
{
|
|
257
|
-
|
|
258
|
-
|
|
255
|
+
path: "../CoCreate-utils",
|
|
256
|
+
repo: "github.com/CoCreate-app/CoCreate-utils.git",
|
|
259
257
|
},
|
|
260
258
|
{
|
|
261
|
-
|
|
262
|
-
|
|
259
|
+
path: "../CoCreate-uuid",
|
|
260
|
+
repo: "github.com/CoCreate-app/CoCreate-uuid.git",
|
|
263
261
|
},
|
|
264
262
|
{
|
|
265
|
-
|
|
266
|
-
|
|
263
|
+
path: "../CoCreate-validation",
|
|
264
|
+
repo: "github.com/CoCreate-app/CoCreate-validation.git",
|
|
267
265
|
},
|
|
268
266
|
{
|
|
269
|
-
|
|
270
|
-
|
|
267
|
+
path: "../CoCreate-vdom",
|
|
268
|
+
repo: "github.com/CoCreate-app/CoCreate-vdom.git",
|
|
271
269
|
},
|
|
272
270
|
{
|
|
273
|
-
|
|
274
|
-
|
|
271
|
+
path: "../../CoCreate-apps/CoCreate-builder",
|
|
272
|
+
repo: "github.com/CoCreate-app/CoCreate-builder.git",
|
|
275
273
|
},
|
|
276
274
|
{
|
|
277
|
-
|
|
278
|
-
|
|
275
|
+
path: "../../CoCreate-apps/CoCreate-dashboard",
|
|
276
|
+
repo: "github.com/CoCreate-app/CoCreate-dashboard.git",
|
|
279
277
|
},
|
|
280
278
|
{
|
|
281
|
-
|
|
282
|
-
|
|
279
|
+
path: "../../CoCreate-apps/CoCreate-datatable",
|
|
280
|
+
repo: "github.com/CoCreate-app/CoCreate-datatable.git",
|
|
283
281
|
},
|
|
284
282
|
{
|
|
285
|
-
|
|
286
|
-
|
|
283
|
+
path: "../../CoCreate-apps/CoCreate-kanban",
|
|
284
|
+
repo: "github.com/CoCreate-app/CoCreate-kanban.git",
|
|
287
285
|
},
|
|
288
286
|
{
|
|
289
|
-
|
|
290
|
-
|
|
287
|
+
path: "../../CoCreate-apps/CoCreate-sandbox",
|
|
288
|
+
repo: "github.com/CoCreate-app/CoCreate-sandbox.git",
|
|
291
289
|
},
|
|
292
290
|
{
|
|
293
|
-
|
|
294
|
-
|
|
291
|
+
path: "../../CoCreate-plugins/CoCreate-charts",
|
|
292
|
+
repo: "github.com/CoCreate-app/CoCreate-charts.git",
|
|
295
293
|
},
|
|
296
294
|
{
|
|
297
|
-
|
|
298
|
-
|
|
295
|
+
path: "../../CoCreate-plugins/CoCreate-croppie",
|
|
296
|
+
repo: "github.com/CoCreate-app/CoCreate-croppie.git",
|
|
299
297
|
},
|
|
300
298
|
{
|
|
301
|
-
|
|
302
|
-
|
|
299
|
+
path: "../../CoCreate-plugins/CoCreate-domain",
|
|
300
|
+
repo: "github.com/CoCreate-app/CoCreate-domain.git",
|
|
303
301
|
},
|
|
304
302
|
{
|
|
305
|
-
|
|
306
|
-
|
|
303
|
+
path: "../../CoCreate-plugins/CoCreate-fullcalendar",
|
|
304
|
+
repo: "github.com/CoCreate-app/CoCreate-fullcalendar.git",
|
|
307
305
|
},
|
|
308
306
|
{
|
|
309
|
-
|
|
310
|
-
|
|
307
|
+
path: "../../CoCreate-plugins/CoCreate-facebook",
|
|
308
|
+
repo: "github.com/CoCreate-app/CoCreate-facebook.git",
|
|
311
309
|
},
|
|
312
310
|
{
|
|
313
|
-
|
|
314
|
-
|
|
311
|
+
path: "../../CoCreate-plugins/CoCreate-google-maps",
|
|
312
|
+
repo: "github.com/CoCreate-app/CoCreate-google-maps.git",
|
|
315
313
|
},
|
|
316
314
|
{
|
|
317
|
-
|
|
318
|
-
|
|
315
|
+
path: "../../CoCreate-plugins/CoCreate-google-auth",
|
|
316
|
+
repo: "github.com/CoCreate-app/CoCreate-google-auth.git",
|
|
319
317
|
},
|
|
320
318
|
{
|
|
321
|
-
|
|
322
|
-
|
|
319
|
+
path: "../../CoCreate-plugins/CoCreate-instagram",
|
|
320
|
+
repo: "github.com/CoCreate-app/CoCreate-instagram.git",
|
|
323
321
|
},
|
|
324
322
|
{
|
|
325
|
-
|
|
326
|
-
|
|
323
|
+
path: "../../CoCreate-plugins/CoCreate-lighthouse",
|
|
324
|
+
repo: "github.com/CoCreate-app/CoCreate-lighthouse.git",
|
|
327
325
|
},
|
|
328
326
|
{
|
|
329
|
-
|
|
330
|
-
|
|
327
|
+
path: "../../CoCreate-plugins/CoCreate-linkedin",
|
|
328
|
+
repo: "github.com/CoCreate-app/CoCreate-linkedin.git",
|
|
331
329
|
},
|
|
332
330
|
{
|
|
333
|
-
|
|
334
|
-
|
|
331
|
+
path: "../../CoCreate-plugins/CoCreate-mongodb",
|
|
332
|
+
repo: "github.com/CoCreate-app/CoCreate-mongodb.git",
|
|
335
333
|
},
|
|
336
334
|
{
|
|
337
|
-
|
|
338
|
-
|
|
335
|
+
path: "../../CoCreate-plugins/CoCreate-pickr",
|
|
336
|
+
repo: "github.com/CoCreate-app/CoCreate-pickr.git",
|
|
339
337
|
},
|
|
340
338
|
{
|
|
341
|
-
|
|
342
|
-
|
|
339
|
+
path: "../../CoCreate-plugins/CoCreate-pinterest",
|
|
340
|
+
repo: "github.com/CoCreate-app/CoCreate-pinterest.git",
|
|
343
341
|
},
|
|
344
342
|
{
|
|
345
|
-
|
|
346
|
-
|
|
343
|
+
path: "../../CoCreate-plugins/CoCreate-plaid",
|
|
344
|
+
repo: "github.com/CoCreate-app/CoCreate-plaid.git",
|
|
347
345
|
},
|
|
348
346
|
{
|
|
349
|
-
|
|
350
|
-
|
|
347
|
+
path: "../../CoCreate-plugins/CoCreate-prism",
|
|
348
|
+
repo: "github.com/CoCreate-app/CoCreate-prism.git",
|
|
351
349
|
},
|
|
352
350
|
{
|
|
353
|
-
|
|
354
|
-
|
|
351
|
+
path: "../../CoCreate-plugins/CoCreate-s3",
|
|
352
|
+
repo: "github.com/CoCreate-app/CoCreate-s3.git",
|
|
355
353
|
},
|
|
356
354
|
{
|
|
357
|
-
|
|
358
|
-
|
|
355
|
+
path: "../../CoCreate-plugins/CoCreate-sendgrid",
|
|
356
|
+
repo: "github.com/CoCreate-app/CoCreate-sendgrid.git",
|
|
359
357
|
},
|
|
360
358
|
{
|
|
361
|
-
|
|
362
|
-
|
|
359
|
+
path: "../../CoCreate-plugins/CoCreate-shipengine",
|
|
360
|
+
repo: "github.com/CoCreate-app/CoCreate-shipengine.git",
|
|
363
361
|
},
|
|
364
362
|
{
|
|
365
|
-
|
|
366
|
-
|
|
363
|
+
path: "../../CoCreate-plugins/CoCreate-stripe",
|
|
364
|
+
repo: "github.com/CoCreate-app/CoCreate-stripe.git",
|
|
367
365
|
},
|
|
368
366
|
{
|
|
369
|
-
|
|
370
|
-
|
|
367
|
+
path: "../../CoCreate-plugins/CoCreate-tui-image-editor",
|
|
368
|
+
repo: "github.com/CoCreate-app/CoCreate-tui-image-editor.git",
|
|
371
369
|
},
|
|
372
370
|
{
|
|
373
|
-
|
|
374
|
-
|
|
371
|
+
path: "../../CoCreate-plugins/CoCreate-twilio",
|
|
372
|
+
repo: "github.com/CoCreate-app/CoCreate-twilio.git",
|
|
375
373
|
},
|
|
376
374
|
{
|
|
377
|
-
|
|
378
|
-
|
|
375
|
+
path: "../../CoCreate-plugins/CoCreate-twitter",
|
|
376
|
+
repo: "github.com/CoCreate-app/CoCreate-twitter.git",
|
|
379
377
|
},
|
|
380
378
|
{
|
|
381
|
-
|
|
382
|
-
|
|
379
|
+
path: "../../CoCreateWS",
|
|
380
|
+
repo: "github.com/CoCreate-app/CoCreateWS.git",
|
|
383
381
|
},
|
|
384
382
|
{
|
|
385
|
-
|
|
386
|
-
|
|
383
|
+
path: "../CoCreate-authenticate",
|
|
384
|
+
repo: "github.com/CoCreate-app/CoCreate-authenticate.git",
|
|
387
385
|
},
|
|
388
386
|
{
|
|
389
|
-
|
|
390
|
-
|
|
387
|
+
path: "../CoCreate-authorize",
|
|
388
|
+
repo: "github.com/CoCreate-app/CoCreate-authorize.git",
|
|
391
389
|
},
|
|
392
390
|
{
|
|
393
|
-
|
|
394
|
-
|
|
391
|
+
path: "../CoCreate-crud-server",
|
|
392
|
+
repo: "github.com/CoCreate-app/CoCreate-crud-server.git",
|
|
395
393
|
},
|
|
396
394
|
{
|
|
397
|
-
|
|
398
|
-
|
|
395
|
+
path: "../CoCreate-file-server",
|
|
396
|
+
repo: "github.com/CoCreate-app/CoCreate-file-server.git",
|
|
399
397
|
},
|
|
400
398
|
{
|
|
401
|
-
|
|
402
|
-
|
|
399
|
+
path: "../CoCreate-metrics",
|
|
400
|
+
repo: "github.com/CoCreate-app/CoCreate-metrics.git",
|
|
403
401
|
},
|
|
404
402
|
{
|
|
405
|
-
|
|
406
|
-
|
|
403
|
+
path: "../CoCreate-node-autoscaler",
|
|
404
|
+
repo: "github.com/CoCreate-app/CoCreate-node-autoscaler.git",
|
|
407
405
|
},
|
|
408
406
|
{
|
|
409
|
-
|
|
410
|
-
|
|
407
|
+
path: "../CoCreate-server-side-render",
|
|
408
|
+
repo: "github.com/CoCreate-app/CoCreate-server-side-render.git",
|
|
411
409
|
},
|
|
412
410
|
{
|
|
413
|
-
|
|
414
|
-
|
|
411
|
+
path: "../CoCreate-socket-server",
|
|
412
|
+
repo: "github.com/CoCreate-app/CoCreate-socket-server.git",
|
|
415
413
|
},
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
"repo": "github.com/CoCreate-app/CoCreate-socket-server.git"
|
|
419
|
-
}
|
|
420
|
-
]
|
|
421
|
-
};
|
|
414
|
+
],
|
|
415
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cocreate/cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.49.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",
|
|
@@ -58,8 +58,6 @@
|
|
|
58
58
|
"@cocreate/acme": "^1.2.12",
|
|
59
59
|
"@cocreate/config": "^1.12.5",
|
|
60
60
|
"@cocreate/file": "^1.2.1",
|
|
61
|
-
"@cocreate/nginx": "^1.3.5"
|
|
62
|
-
"glob": "^7.1.7",
|
|
63
|
-
"prettier": "^2.3.2"
|
|
61
|
+
"@cocreate/nginx": "^1.3.5"
|
|
64
62
|
}
|
|
65
63
|
}
|
|
@@ -1,26 +1,65 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
const fs = require("fs");
|
|
2
|
+
const path = require("path");
|
|
3
3
|
|
|
4
|
-
function
|
|
4
|
+
function findDirectories(startPath, callback, fileName) {
|
|
5
|
+
// Resolve relative paths to absolute paths if needed
|
|
6
|
+
const resolvedPath =
|
|
7
|
+
startPath.startsWith("./") || startPath.startsWith("../")
|
|
8
|
+
? path.resolve(startPath)
|
|
9
|
+
: startPath;
|
|
5
10
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
const segments = resolvedPath.split("/"); // Split path by '/'
|
|
12
|
+
let currentPath = "/"; // Start from root
|
|
13
|
+
|
|
14
|
+
for (let i = 0; i < segments.length; i++) {
|
|
15
|
+
const segment = segments[i];
|
|
16
|
+
const isWildcard = segment === "*";
|
|
17
|
+
|
|
18
|
+
if (isWildcard) {
|
|
19
|
+
// Get all directories at this level
|
|
20
|
+
const directories = fs
|
|
21
|
+
.readdirSync(currentPath)
|
|
22
|
+
.filter((file) =>
|
|
23
|
+
fs.statSync(path.join(currentPath, file)).isDirectory()
|
|
24
|
+
);
|
|
25
|
+
|
|
26
|
+
// Process each directory and continue along the path
|
|
27
|
+
directories.forEach((dir) => {
|
|
28
|
+
findDirectories(
|
|
29
|
+
path.join(currentPath, dir, ...segments.slice(i + 1)),
|
|
30
|
+
callback,
|
|
31
|
+
fileName
|
|
32
|
+
);
|
|
33
|
+
});
|
|
34
|
+
return; // Stop further processing in the loop for wildcard case
|
|
35
|
+
} else {
|
|
36
|
+
// Continue to the next part of the path
|
|
37
|
+
currentPath = path.join(currentPath, segment);
|
|
38
|
+
|
|
39
|
+
// If a segment doesn’t exist or isn’t a directory, log an error and stop
|
|
40
|
+
if (
|
|
41
|
+
!fs.existsSync(currentPath) ||
|
|
42
|
+
!fs.statSync(currentPath).isDirectory()
|
|
43
|
+
) {
|
|
44
|
+
console.log(`Directory not found: ${currentPath}`);
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// If we reach the end of the path without wildcards, we have a valid directory
|
|
51
|
+
callback(currentPath, fileName);
|
|
13
52
|
}
|
|
14
53
|
|
|
15
|
-
function
|
|
16
|
-
|
|
17
|
-
run: yarn build`
|
|
54
|
+
function createOrUpdateFile(directoryPath, fileName) {
|
|
55
|
+
let buildStep = `- name: Build\n run: yarn build`;
|
|
18
56
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
57
|
+
// Check if webpack config exists to include build step
|
|
58
|
+
const webpackPath = filePath.replace(fileName, "webpack.config.js");
|
|
59
|
+
if (!fs.existsSync(webpackPath)) buildStep = "";
|
|
22
60
|
|
|
23
|
-
|
|
61
|
+
// Define file content (e.g., for YAML or other configuration)
|
|
62
|
+
const fileContent = `name: Automated Workflow
|
|
24
63
|
on:
|
|
25
64
|
push:
|
|
26
65
|
branches:
|
|
@@ -80,7 +119,7 @@ jobs:
|
|
|
80
119
|
run: echo "//registry.npmjs.org/:_authToken=\${{ secrets.NPM_TOKEN }}" > ~/.npmrc
|
|
81
120
|
- name: Install dependencies
|
|
82
121
|
run: yarn install
|
|
83
|
-
${
|
|
122
|
+
${buildStep}
|
|
84
123
|
- name: Set Environment Variables
|
|
85
124
|
run: |
|
|
86
125
|
echo "organization_id=\${{ secrets.COCREATE_ORGANIZATION_ID }}" >> $GITHUB_ENV
|
|
@@ -88,22 +127,33 @@ jobs:
|
|
|
88
127
|
echo "host=\${{ secrets.COCREATE_HOST }}" >> $GITHUB_ENV
|
|
89
128
|
- name: CoCreate Upload
|
|
90
129
|
run: coc upload
|
|
91
|
-
|
|
92
130
|
`;
|
|
93
|
-
if (fs.existsSync(YmlPath))
|
|
94
|
-
fs.unlinkSync(YmlPath)
|
|
95
|
-
fs.writeFileSync(YmlPath, fileContent)
|
|
96
131
|
|
|
132
|
+
const filePath = path.join(directoryPath, fileName);
|
|
133
|
+
// Create or update the file
|
|
134
|
+
if (fs.existsSync(filePath)) fs.unlinkSync(filePath);
|
|
135
|
+
fs.writeFileSync(filePath, fileContent);
|
|
97
136
|
}
|
|
98
137
|
|
|
138
|
+
// Define the directories with wildcards
|
|
139
|
+
const directories = [
|
|
140
|
+
"../../../../../CoCreate-components/*/",
|
|
141
|
+
"../../../../../CoCreate-apps/*/",
|
|
142
|
+
"../../../../../CoCreate-plugins/*/",
|
|
143
|
+
"../../../../../CoCreateCSS/",
|
|
144
|
+
"../../../../../CoCreateJS/",
|
|
145
|
+
"../../../../../CoCreateWS/",
|
|
146
|
+
"../../../../../YellowOracle/",
|
|
147
|
+
"../../../../../CoCreate-website/",
|
|
148
|
+
"../../../../../CoCreate-admin/",
|
|
149
|
+
"../../../../../CoCreate-website-old/",
|
|
150
|
+
"../../../../../CoCreate-superadmin/",
|
|
151
|
+
];
|
|
152
|
+
const fileName = "automated.yml";
|
|
99
153
|
|
|
154
|
+
// Execute directory search and create/update file if the directory exists
|
|
155
|
+
directories.forEach((directory) => {
|
|
156
|
+
findDirectories(directory, createOrUpdateFile, fileName);
|
|
157
|
+
});
|
|
100
158
|
|
|
101
|
-
|
|
102
|
-
glob("/home/cocreate/CoCreate/CoCreate-components/*/.github/workflows/", globUpdater)
|
|
103
|
-
// glob("/home/cocreate/CoCreate/CoCreate-apps/*/.github/workflows/", globUpdater)
|
|
104
|
-
// glob("/home/cocreate/CoCreate/CoCreate-plugins/*/.github/workflows/", globUpdater)
|
|
105
|
-
|
|
106
|
-
// glob("/home/cocreate/CoCreate/CoCreate-admin/.github/workflows/", globUpdater)
|
|
107
|
-
// glob("/home/cocreate/CoCreate/CoCreateCSS/.github/workflows/", globUpdater)
|
|
108
|
-
// glob("/home/cocreate/CoCreate/CoCreateJS/.github/workflows/", globUpdater)
|
|
109
|
-
// glob("/home/cocreate/CoCreate/CoCreate-wesite/.github/workflows/", globUpdater)
|
|
159
|
+
console.log("Finished");
|
|
@@ -1,30 +1,72 @@
|
|
|
1
|
-
|
|
2
|
-
let fs = require('fs');
|
|
1
|
+
const fs = require("fs");
|
|
3
2
|
const path = require("path");
|
|
4
3
|
|
|
5
|
-
function
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
4
|
+
function findDirectories(startPath, callback, fileName) {
|
|
5
|
+
// Resolve relative paths to absolute paths if needed
|
|
6
|
+
const resolvedPath =
|
|
7
|
+
startPath.startsWith("./") || startPath.startsWith("../")
|
|
8
|
+
? path.resolve(startPath)
|
|
9
|
+
: startPath;
|
|
11
10
|
|
|
11
|
+
const segments = resolvedPath.split("/"); // Split path by '/'
|
|
12
|
+
let currentPath = "/"; // Start from root
|
|
12
13
|
|
|
14
|
+
for (let i = 0; i < segments.length; i++) {
|
|
15
|
+
const segment = segments[i];
|
|
16
|
+
const isWildcard = segment === "*";
|
|
13
17
|
|
|
18
|
+
if (isWildcard) {
|
|
19
|
+
// Get all directories at this level
|
|
20
|
+
const directories = fs
|
|
21
|
+
.readdirSync(currentPath)
|
|
22
|
+
.filter((file) =>
|
|
23
|
+
fs.statSync(path.join(currentPath, file)).isDirectory()
|
|
24
|
+
);
|
|
14
25
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
26
|
+
// Process each directory and continue along the path
|
|
27
|
+
directories.forEach((dir) => {
|
|
28
|
+
findDirectories(
|
|
29
|
+
path.join(currentPath, dir, ...segments.slice(i + 1)),
|
|
30
|
+
callback,
|
|
31
|
+
fileName
|
|
32
|
+
);
|
|
33
|
+
});
|
|
34
|
+
return; // Stop further processing in the loop for wildcard case
|
|
35
|
+
} else {
|
|
36
|
+
// Continue to the next part of the path
|
|
37
|
+
currentPath = path.join(currentPath, segment);
|
|
19
38
|
|
|
39
|
+
// If a segment doesn’t exist or isn’t a directory, log an error and stop
|
|
40
|
+
if (
|
|
41
|
+
!fs.existsSync(currentPath) ||
|
|
42
|
+
!fs.statSync(currentPath).isDirectory()
|
|
43
|
+
) {
|
|
44
|
+
console.log(`Directory not found: ${currentPath}`);
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
20
49
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
object = content2.substring(3, content2.indexOf(',') - 4);
|
|
50
|
+
// If we reach the end of the path without wildcards, we have a valid directory
|
|
51
|
+
callback(currentPath, fileName);
|
|
52
|
+
}
|
|
25
53
|
|
|
54
|
+
function createOrUpdateFile(directoryPath, fileName) {
|
|
55
|
+
let name = path
|
|
56
|
+
.basename(path.resolve(path.dirname(directoryPath), "./"))
|
|
57
|
+
.substring(9);
|
|
58
|
+
let object = "";
|
|
59
|
+
let replaceContent = fs.readFileSync(directoryPath).toString();
|
|
26
60
|
|
|
27
|
-
|
|
61
|
+
// Parse content to extract `object`
|
|
62
|
+
let content_source = replaceContent.substring(
|
|
63
|
+
replaceContent.indexOf("sources")
|
|
64
|
+
);
|
|
65
|
+
let content1 = content_source.substring(content_source.indexOf("object"));
|
|
66
|
+
let content2 = content1.substring(content1.indexOf(":"));
|
|
67
|
+
object = content2.substring(3, content2.indexOf(",") - 4);
|
|
68
|
+
|
|
69
|
+
let fileContent = `module.exports = {
|
|
28
70
|
"config": {
|
|
29
71
|
"organization_id": "5ff747727005da1c272740ab",
|
|
30
72
|
"key": "2061acef-0451-4545-f754-60cf8160",
|
|
@@ -37,7 +79,7 @@ function update(MdPath) {
|
|
|
37
79
|
"object": {
|
|
38
80
|
"_id": "${object}",
|
|
39
81
|
"name": "index.html",
|
|
40
|
-
|
|
82
|
+
"path": "/docs/${name}",
|
|
41
83
|
"pathname": "/docs/${name}/index.html",
|
|
42
84
|
"src": "{{./docs/index.html}}",
|
|
43
85
|
"host": [
|
|
@@ -50,28 +92,42 @@ function update(MdPath) {
|
|
|
50
92
|
}
|
|
51
93
|
]
|
|
52
94
|
}
|
|
53
|
-
|
|
54
95
|
`;
|
|
55
96
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
97
|
+
if (!object.length) {
|
|
98
|
+
console.log("object Undefined: ", directoryPath);
|
|
99
|
+
} else if (object.length !== 24) {
|
|
100
|
+
console.log("object not valid! Please check your config: ", directoryPath);
|
|
101
|
+
} else {
|
|
102
|
+
const filePath = path.join(directoryPath, fileName);
|
|
103
|
+
if (fs.existsSync(filePath)) fs.unlinkSync(filePath);
|
|
104
|
+
fs.writeFileSync(filePath, fileContent);
|
|
105
|
+
}
|
|
106
|
+
const filePath = path.join(directoryPath, fileName);
|
|
107
|
+
// Create or update the file
|
|
108
|
+
if (fs.existsSync(filePath)) fs.unlinkSync(filePath);
|
|
109
|
+
fs.writeFileSync(filePath, fileContent);
|
|
68
110
|
}
|
|
69
111
|
|
|
70
|
-
//
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
112
|
+
// Define the directories with wildcards
|
|
113
|
+
const directories = [
|
|
114
|
+
"../../../../../CoCreate-components/*/",
|
|
115
|
+
"../../../../../CoCreate-apps/*/",
|
|
116
|
+
"../../../../../CoCreate-plugins/*/",
|
|
117
|
+
"../../../../../CoCreateCSS/",
|
|
118
|
+
"../../../../../CoCreateJS/",
|
|
119
|
+
"../../../../../CoCreateWS/",
|
|
120
|
+
"../../../../../YellowOracle/",
|
|
121
|
+
"../../../../../CoCreate-website/",
|
|
122
|
+
"../../../../../CoCreate-admin/",
|
|
123
|
+
"../../../../../CoCreate-website-old/",
|
|
124
|
+
"../../../../../CoCreate-superadmin/",
|
|
125
|
+
];
|
|
126
|
+
const fileName = "CoCreate.config.js";
|
|
127
|
+
|
|
128
|
+
// Execute directory search and create/update file if the directory exists
|
|
129
|
+
directories.forEach((directory) => {
|
|
130
|
+
findDirectories(directory, createOrUpdateFile, fileName);
|
|
131
|
+
});
|
|
76
132
|
|
|
77
|
-
console.log(
|
|
133
|
+
console.log("Finished");
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
const fs = require("fs");
|
|
2
|
+
const path = require("path");
|
|
3
|
+
|
|
4
|
+
function findDirectories(startPath, callback, fileName) {
|
|
5
|
+
// Resolve relative paths to absolute paths if needed
|
|
6
|
+
const resolvedPath =
|
|
7
|
+
startPath.startsWith("./") || startPath.startsWith("../")
|
|
8
|
+
? path.resolve(startPath)
|
|
9
|
+
: startPath;
|
|
10
|
+
|
|
11
|
+
const segments = resolvedPath.split("/"); // Split path by '/'
|
|
12
|
+
let currentPath = "/"; // Start from root
|
|
13
|
+
|
|
14
|
+
for (let i = 0; i < segments.length; i++) {
|
|
15
|
+
const segment = segments[i];
|
|
16
|
+
const isWildcard = segment === "*";
|
|
17
|
+
|
|
18
|
+
if (isWildcard) {
|
|
19
|
+
// Get all directories at this level
|
|
20
|
+
const directories = fs
|
|
21
|
+
.readdirSync(currentPath)
|
|
22
|
+
.filter((file) =>
|
|
23
|
+
fs.statSync(path.join(currentPath, file)).isDirectory()
|
|
24
|
+
);
|
|
25
|
+
|
|
26
|
+
// Process each directory and continue along the path
|
|
27
|
+
directories.forEach((dir) => {
|
|
28
|
+
findDirectories(
|
|
29
|
+
path.join(currentPath, dir, ...segments.slice(i + 1)),
|
|
30
|
+
callback,
|
|
31
|
+
fileName
|
|
32
|
+
);
|
|
33
|
+
});
|
|
34
|
+
return; // Stop further processing in the loop for wildcard case
|
|
35
|
+
} else {
|
|
36
|
+
// Continue to the next part of the path
|
|
37
|
+
currentPath = path.join(currentPath, segment);
|
|
38
|
+
|
|
39
|
+
// If a segment doesn’t exist or isn’t a directory, log an error and stop
|
|
40
|
+
if (
|
|
41
|
+
!fs.existsSync(currentPath) ||
|
|
42
|
+
!fs.statSync(currentPath).isDirectory()
|
|
43
|
+
) {
|
|
44
|
+
console.log(`Directory not found: ${currentPath}`);
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// If we reach the end of the path without wildcards, we have a valid directory
|
|
51
|
+
callback(currentPath, fileName);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
function createOrUpdateFile(directoryPath, fileName) {
|
|
55
|
+
const fileContent = `module.exports = {
|
|
56
|
+
tabWidth: 4,
|
|
57
|
+
semi: true,
|
|
58
|
+
trailingComma: "none",
|
|
59
|
+
bracketSameLine: true,
|
|
60
|
+
useTabs: true,
|
|
61
|
+
overrides: [
|
|
62
|
+
{
|
|
63
|
+
files: ["*.json", "*.yml", "*.yaml"],
|
|
64
|
+
options: {
|
|
65
|
+
tabWidth: 2,
|
|
66
|
+
useTabs: false
|
|
67
|
+
},
|
|
68
|
+
}
|
|
69
|
+
],
|
|
70
|
+
};`;
|
|
71
|
+
|
|
72
|
+
const filePath = path.join(directoryPath, fileName);
|
|
73
|
+
// Create or update the file
|
|
74
|
+
if (fs.existsSync(filePath)) fs.unlinkSync(filePath);
|
|
75
|
+
fs.writeFileSync(filePath, fileContent);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// Define the directories with wildcards
|
|
79
|
+
const directories = [
|
|
80
|
+
"../../../../../CoCreate-components/*/",
|
|
81
|
+
"../../../../../CoCreate-apps/*/",
|
|
82
|
+
"../../../../../CoCreate-plugins/*/",
|
|
83
|
+
"../../../../../CoCreateCSS/",
|
|
84
|
+
"../../../../../CoCreateJS/",
|
|
85
|
+
"../../../../../CoCreateWS/",
|
|
86
|
+
"../../../../../YellowOracle/",
|
|
87
|
+
"../../../../../CoCreate-website/",
|
|
88
|
+
"../../../../../CoCreate-admin/",
|
|
89
|
+
"../../../../../CoCreate-website-old/",
|
|
90
|
+
"../../../../../CoCreate-superadmin/",
|
|
91
|
+
];
|
|
92
|
+
const fileName = "prettier.config.js";
|
|
93
|
+
|
|
94
|
+
// Execute directory search and create/update file if the directory exists
|
|
95
|
+
directories.forEach((directory) => {
|
|
96
|
+
findDirectories(directory, createOrUpdateFile, fileName);
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
console.log("Finished");
|