@cocreate/cli 1.48.0 → 1.50.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.
@@ -1,92 +1,154 @@
1
- let fs = require('fs');
2
- const path = require("path")
3
- const util = require('node:util');
4
- const exec = util.promisify(require('node:child_process').exec);
5
- const { color } = require('../fonts');
6
-
7
- let pathList, nameList, item = {}, failed = [];
8
-
9
- module.exports = async function bump(repos, args) {
10
- pathList = repos.map(o => o.absolutePath)
11
- if (repos.length <= 1) {
12
- let packageJsonPath = path.resolve(process.cwd(), 'package.json');
13
-
14
- if (fs.existsSync(packageJsonPath)) {
15
- let json = require(packageJsonPath)
16
- if (json) {
17
- let dependencies = json.dependencies || {}
18
- let devDependencies = json.devDependencies || {}
19
- let object = { ...dependencies, ...devDependencies }
20
- for (let key of Object.keys(object)) {
21
- if (key.startsWith("@cocreate/")) {
22
- const version = await exec(`npm view ${key} version`);
23
- item[key] = `^${version.stdout}`.trim()
24
- }
25
- }
26
- console.log('bump versions', item)
27
-
28
- for (let name of Object.keys(item)) {
29
- bumpVersion(packageJsonPath, name)
30
- }
31
- }
32
- }
33
-
34
- } else {
35
- nameList = pathList.map(fn => path.basename(fn).toLowerCase());
36
- for (let [index, name] of nameList.entries()) {
37
- getVersions(path.resolve(pathList[index], 'package.json'), `@${name}`)
38
- }
39
-
40
- console.log('bump versions', item)
41
-
42
- for (let [index, name] of nameList.entries()) {
43
- bumpVersion(path.resolve(pathList[index], 'package.json'), name)
44
- }
45
-
46
- }
47
-
48
- console.log('completed')
49
- return failed;
50
- }
1
+ // Import necessary modules
2
+ let fs = require("fs"); // File system module
3
+ const path = require("path"); // Path module for handling file paths
4
+ const util = require("node:util"); // Utility module for different helper functions
5
+ const exec = util.promisify(require("node:child_process").exec); // Promisified version of exec
6
+ const createSpinner = require("../spinner"); // Import custom spinner module
7
+
8
+ // Initialize variables to use throughout the module update process
9
+ let pathList = [], // Array to store paths to package.json files
10
+ item = {}, // Object to store the latest versions of modules
11
+ failed = []; // Array to track any failures that occur
12
+
13
+ let promiseMap = new Map(); // A map to cache promises for fetching versions
14
+
15
+ /**
16
+ * Updates module versions across multiple repositories.
17
+ * @param {Array} repos - An array of repository objects containing `absolutePath`.
18
+ * @param {Object} args - Additional arguments for the update process (not used here but passed for potential future use).
19
+ * @returns {Promise<Array>} - Resolves with the list of failed update attempts.
20
+ */
21
+ module.exports = async function update(repos, args) {
22
+ pathList = repos.map((o) => path.resolve(o.absolutePath, "package.json"));
23
+
24
+ // Start a spinner to indicate progress
25
+ const spinner = createSpinner({
26
+ prefix: "Waiting for all versions to be fetched"
27
+ });
28
+
29
+ // Trigger version fetching for each package.json path
30
+ for (let filePath of pathList) {
31
+ getVersions(filePath);
32
+ }
33
+
34
+ // Await the resolution of all version fetching promises
35
+ await Promise.all(promiseMap.values());
36
+
37
+ // Populate the 'item' object with fetched versions
38
+ for (let [key, promise] of promiseMap) {
39
+ const version = await promise;
40
+ if (version) {
41
+ item[key] = `^${version}`;
42
+ }
43
+ }
44
+
45
+ // End spinner as fetching process is complete
46
+ spinner.end();
51
47
 
48
+ // Update each package.json with new version data
49
+ for (let filePath of pathList) {
50
+ updateVersion(filePath);
51
+ }
52
+
53
+ console.log("Completed updating modules to their latest versions.");
54
+ return failed;
55
+ };
56
+
57
+ /**
58
+ * Fetches the latest versions of dependencies listed in a package.json file.
59
+ * @param {string} filePath - The path to the package.json file.
60
+ */
52
61
  function getVersions(filePath) {
53
- if (fs.existsSync(filePath)) {
54
- let object = require(filePath)
55
- if (object.name && object.version) {
56
- item[object.name] = `^${object.version}`
57
- }
58
- } else {
59
- failed.push({ name: 'get version', des: 'path doesn\'t exist:' + filePath })
60
- }
62
+ if (fs.existsSync(filePath)) {
63
+ let object = require(filePath); // Load JSON content
64
+ const dependencies = object.dependencies || {}; // Current dependencies
65
+ const devDependencies = object.devDependencies || {}; // Current devDependencies
66
+ const allDependencies = { ...dependencies, ...devDependencies }; // Combine both
67
+
68
+ // Iterate over each dependency
69
+ for (const key of Object.keys(allDependencies)) {
70
+ // Check and process only @cocreate/ prefixed packages
71
+ if (key.startsWith("@cocreate/") && !promiseMap.has(key)) {
72
+ const promise = exec(`npm view ${key} version`)
73
+ .then((versionObj) => versionObj.stdout.trim())
74
+ .catch((error) => {
75
+ failed.push({ name: key, error: error.message });
76
+ console.error(
77
+ `Failed fetching version for ${key}: ${error.message}`
78
+ );
79
+ return null;
80
+ });
81
+ promiseMap.set(key, promise);
82
+ }
83
+ }
84
+ } else {
85
+ const errorMessage = `Path doesn't exist: ${filePath}`;
86
+ failed.push({
87
+ name: "get version",
88
+ error: errorMessage
89
+ });
90
+ console.error(errorMessage);
91
+ }
61
92
  }
62
93
 
63
- function bumpVersion(filePath, name) {
64
- if (fs.existsSync(filePath)) {
65
-
66
- let object = require(filePath)
67
- if (object) {
68
- let newObject = { ...object }
69
- let dependencies = object.dependencies || {}
70
- let devDependencies = object.devDependencies || {}
71
- for (const name of Object.keys(dependencies)) {
72
- if (item[name]) {
73
- newObject.dependencies[name] = item[name]
74
- }
75
- }
76
-
77
- for (const name of Object.keys(devDependencies)) {
78
- if (item[name]) {
79
- newObject.devDependencies[name] = item[name]
80
- }
81
- }
82
-
83
- if (fs.existsSync(filePath)) {
84
- fs.unlinkSync(filePath)
85
- }
86
-
87
- fs.writeFileSync(filePath, JSON.stringify(object, null, 2))
88
- }
89
- } else {
90
- failed.push({ name: 'bump version', des: 'path doesn\'t exist:' + filePath })
91
- }
94
+ /**
95
+ * Updates the package.json file with the latest module versions.
96
+ * @param {string} filePath - The path to the package.json file.
97
+ */
98
+ function updateVersion(filePath) {
99
+ if (fs.existsSync(filePath)) {
100
+ delete require.cache[require.resolve(filePath)];
101
+ const object = require(filePath);
102
+
103
+ if (object) {
104
+ const dependencies = object.dependencies || {};
105
+ const devDependencies = object.devDependencies || {};
106
+ const allDependencies = { ...dependencies, ...devDependencies };
107
+
108
+ let updated = false;
109
+ let newObject = { ...object };
110
+
111
+ for (let key of Object.keys(allDependencies)) {
112
+ if (!key.startsWith("@cocreate/")) continue;
113
+ const currentVersion = allDependencies[key];
114
+ const latestVersion = item[key];
115
+
116
+ if (latestVersion && latestVersion !== currentVersion) {
117
+ if (dependencies[key]) {
118
+ newObject.dependencies[key] = latestVersion;
119
+ }
120
+ if (devDependencies[key]) {
121
+ newObject.devDependencies[key] = latestVersion;
122
+ }
123
+
124
+ updated = true;
125
+ console.log(
126
+ `Updated ${key} from ${currentVersion} to ${latestVersion}.`
127
+ );
128
+ } else {
129
+ if (latestVersion === null) {
130
+ console.log(
131
+ `Could not update ${key}: Failed to fetch the latest version.`
132
+ );
133
+ } else {
134
+ console.log(
135
+ `Skipped updating ${key}, already at the latest version: ${currentVersion}.`
136
+ );
137
+ }
138
+ }
139
+ }
140
+
141
+ if (updated) {
142
+ fs.writeFileSync(filePath, JSON.stringify(newObject, null, 2));
143
+ console.log(`Updated ${filePath} successfully.`);
144
+ }
145
+ }
146
+ } else {
147
+ const errorMessage = `Path doesn't exist: ${filePath}`;
148
+ failed.push({
149
+ name: "update version",
150
+ error: errorMessage
151
+ });
152
+ console.error(errorMessage);
153
+ }
92
154
  }
@@ -1,28 +1,32 @@
1
- const spawn = require('../spawn');
2
- const path = require('path');
3
- let fs = require('fs');
1
+ const spawn = require("../spawn");
2
+ const path = require("path");
3
+ let fs = require("fs");
4
4
 
5
5
  module.exports = async function gitClone(repos, args) {
6
- const failed = [];
7
- const cwdPath = path.resolve(process.cwd());
6
+ const failed = [];
7
+ const cwdPath = path.resolve(process.cwd());
8
8
 
9
- for (let i = 0; i < repos.length; i++) {
10
- // TODO: Check if path exist and if git.config or package.json exist continue
11
- if (cwdPath !== repos[i].absolutePath) {
12
- if (!fs.existsSync(repos[i].directory))
13
- fs.mkdirSync(repos[i].directory);
9
+ for (let i = 0; i < repos.length; i++) {
10
+ // TODO: Check if path exist and if git.config or package.json exist continue
11
+ if (cwdPath !== repos[i].absolutePath) {
12
+ if (!fs.existsSync(repos[i].directory))
13
+ fs.mkdirSync(repos[i].directory);
14
14
 
15
- if (!repos[i].repo.startsWith('http://') && !repos[i].repo.startsWith('https://'))
16
- repos[i].repo = 'https://' + repos[i].repo
15
+ if (
16
+ !repos[i].repo.startsWith("http://") &&
17
+ !repos[i].repo.startsWith("https://")
18
+ )
19
+ repos[i].repo = "https://" + repos[i].repo;
17
20
 
18
- let exitCode = await spawn('git', ['clone', `${repos[i].repo}`], { stdio: 'inherit', cwd: repos[i].directory })
19
- if (exitCode !== 0) {
20
- failed.push({ name: repos[i].name, des: `cloning failed` })
21
- }
21
+ let exitCode = await spawn("git", ["clone", `${repos[i].repo}`], {
22
+ stdio: "inherit",
23
+ cwd: repos[i].directory
24
+ });
25
+ if (exitCode !== 0) {
26
+ failed.push({ name: repos[i].name, error: `cloning failed` });
27
+ }
28
+ }
29
+ }
22
30
 
23
- }
24
- }
25
-
26
- return failed;
27
-
28
- }
31
+ return failed;
32
+ };
@@ -1,26 +1,65 @@
1
- let glob = require("glob");
2
- let fs = require('fs');
1
+ const fs = require("fs");
2
+ const path = require("path");
3
3
 
4
- function globUpdater(er, files) {
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
- if (er)
7
- console.log(files, 'glob resolving issue')
8
- else
9
- files.forEach(filename => {
10
- update(filename + 'automated.yml')
11
- })
12
- console.log('Completed')
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 update(YmlPath) {
16
- let build = `- name: Build
17
- run: yarn build`
54
+ function createOrUpdateFile(directoryPath, fileName) {
55
+ let buildStep = `- name: Build\n run: yarn build`;
18
56
 
19
- let webpackPath = YmlPath.replace('.github/workflows/automated.yml', 'webpack.config.js')
20
- if (!fs.existsSync(webpackPath))
21
- build = ''
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
- let fileContent = `name: Automated Workflow
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
- ${build}
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-modules/*/",
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
- // glob("/home/cocreate/CoCreate/CoCreate-components/CoCreate-actions/.github/workflows", globUpdater)
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
- let glob = require("glob");
2
- let fs = require('fs');
1
+ const fs = require("fs");
3
2
  const path = require("path");
4
3
 
5
- function globUpdater(er, files) {
6
- if (er)
7
- console.log(files, 'glob resolving issue');
8
- else
9
- files.forEach(filename => update(filename));
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
- function update(MdPath) {
16
- let name = path.basename(path.resolve(path.dirname(MdPath), './')).substring(9);
17
- let object = '';
18
- let replaceContent = fs.readFileSync(MdPath).toString();
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
- let content_source = replaceContent.substring(replaceContent.indexOf("sources"));
22
- let content1 = content_source.substring(content_source.indexOf("object"));
23
- let content2 = content1.substring(content1.indexOf(':'));
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
- let fileContent = `module.exports = {
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
- "path": "/docs/${name}",
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
- if (!object.length)
57
- console.log("object Undefined: ", MdPath);
58
- if (object.length != 24 && object.length != 0)
59
- console.log("object not valid! please check your config: ", MdPath);
60
- else {
61
- console.log(MdPath, " -> object : ", object);
62
- if (fs.existsSync(MdPath))
63
- fs.unlinkSync(MdPath);
64
- fs.writeFileSync(MdPath, fileContent);
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
- // glob("../../CoCreate-components/CoCreate-filter/CoCreate.config.js", globUpdater);
71
- glob("../../CoCreate-components/*/CoCreate.config.js", globUpdater);
72
- glob("../../CoCreate-apps/*/CoCreate.config.js", globUpdater);
73
- glob("../../CoCreate-plugins/*/CoCreate.config.js", globUpdater);
74
- // glob("../CoCreateCSS/CoCreate.config.js", globUpdater);
75
- // glob("../CoCreateJS/CoCreate.config.js", globUpdater);
112
+ // Define the directories with wildcards
113
+ const directories = [
114
+ "../../../../../CoCreate-modules/*/",
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('finished');
133
+ console.log("Finished");
@@ -1,41 +1,32 @@
1
1
  let glob = require("glob");
2
- let fs = require('fs');
3
- const path = require("path")
2
+ let fs = require("fs");
3
+ const path = require("path");
4
4
 
5
5
  function globUpdater(er, files) {
6
- if (er)
7
- console.log(files, 'glob resolving issue')
8
- else
9
- files.forEach(filename => update(filename))
6
+ if (er) console.log(files, "glob resolving issue");
7
+ else files.forEach((filename) => update(filename));
10
8
  }
11
9
 
12
-
13
-
14
-
15
10
  function update(Path) {
16
- let fileContent = `# ignore
11
+ let fileContent = `# ignore
17
12
  node_modules
18
13
  dist
19
14
  .npmrc
20
15
 
21
16
  `;
22
- if (fs.existsSync(Path))
23
- fs.unlinkSync(Path)
24
- fs.writeFileSync(Path, fileContent)
25
-
17
+ if (fs.existsSync(Path)) fs.unlinkSync(Path);
18
+ fs.writeFileSync(Path, fileContent);
26
19
  }
27
20
 
28
-
29
-
30
- // glob("../CoCreate-components/CoCreate-action/.gitignore", globUpdater)
21
+ // glob("../CoCreate-modules/CoCreate-action/.gitignore", globUpdater)
31
22
  // glob("./.gitignore", globUpdater)
32
23
  // glob("../CoCreate-adminUI/.gitignore", globUpdater)
33
- glob("../CoCreate-components/*/.gitignore", globUpdater)
34
- glob("../CoCreate-apps/*/.gitignore", globUpdater)
35
- glob("../CoCreate-plugins/*/.gitignore", globUpdater)
24
+ glob("../CoCreate-modules/*/.gitignore", globUpdater);
25
+ glob("../CoCreate-apps/*/.gitignore", globUpdater);
26
+ glob("../CoCreate-plugins/*/.gitignore", globUpdater);
36
27
  // glob("../CoCreate-website/.gitignore", globUpdater)
37
28
  // glob("../CoCreate-website-template/.gitignore", globUpdater)
38
- glob("../CoCreateCSS/.gitignore", globUpdater)
29
+ glob("../CoCreateCSS/.gitignore", globUpdater);
39
30
  // glob("../CoCreateJS/.gitignore", globUpdater)
40
31
 
41
- console.log('finished')
32
+ console.log("finished");