codeweaver 1.0.14 → 1.0.15
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/command.js +11 -10
- package/package.json +1 -1
package/command.js
CHANGED
|
@@ -4,6 +4,7 @@ const fs = require("fs");
|
|
|
4
4
|
const { exec } = require("child_process");
|
|
5
5
|
const path = require("path");
|
|
6
6
|
const { version } = require("os");
|
|
7
|
+
const { object } = require("zod");
|
|
7
8
|
|
|
8
9
|
// Get the project name from command-line arguments or use a default name
|
|
9
10
|
const projectName = process.argv[2] || "my-app";
|
|
@@ -29,16 +30,16 @@ exec(`git clone ${repoUrl} ${projectName}`, (error) => {
|
|
|
29
30
|
}
|
|
30
31
|
|
|
31
32
|
// Parse the package.json content and update the name
|
|
32
|
-
const {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}
|
|
33
|
+
const { bin, ...packageJson } = JSON.parse(data);
|
|
34
|
+
|
|
35
|
+
Object.assign(packageJson, {
|
|
36
|
+
name: projectName,
|
|
37
|
+
version: "1.0.0",
|
|
38
|
+
description: "",
|
|
39
|
+
keywords: "",
|
|
40
|
+
author: "",
|
|
41
|
+
license: "",
|
|
42
|
+
});
|
|
42
43
|
|
|
43
44
|
// Write the updated package.json back to the file
|
|
44
45
|
fs.writeFile(
|