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.
Files changed (2) hide show
  1. package/command.js +11 -10
  2. 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
- bin,
34
- name = projectName,
35
- version = "1.0.0",
36
- description = " ",
37
- keywords = " ",
38
- author = " ",
39
- license = " ",
40
- ...packageJson
41
- } = JSON.parse(data);
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(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codeweaver",
3
- "version": "1.0.14",
3
+ "version": "1.0.15",
4
4
  "main": "src/app.ts",
5
5
  "bin": {
6
6
  "create-codeweaver-app": "./command.js"