@hypercodingdev/zit 1.0.0 → 1.0.2

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/README.md CHANGED
@@ -18,7 +18,7 @@ Under the hood, `zit` uses:
18
18
  ## Installation
19
19
 
20
20
  ```shell
21
- npm install -g zit-cli
21
+ npm install -g @hypercodingdev/zit
22
22
  ```
23
23
 
24
24
  Requires Node.js >= 18, `git`, and `ssh-keygen`.
package/dist/config.js CHANGED
@@ -73,16 +73,20 @@ function readConfig() {
73
73
  const raw = fs.readFileSync(configPath, "utf-8");
74
74
  const parsed = ini.parse(raw);
75
75
  for (const [key, value] of Object.entries(parsed)) {
76
- if (typeof value === "object" &&
77
- value !== null &&
78
- "name" in value &&
79
- "email" in value) {
80
- if ("private_key" in value && "public_key" in value) {
81
- config.accounts[key] = value;
82
- }
83
- else if ("path" in value && "account" in value) {
84
- config.workspaces[key] = value;
85
- }
76
+ if (typeof value !== "object" || value === null)
77
+ continue;
78
+ // Workspace sections are stored as: [workspace "name"]
79
+ const wsMatch = key.match(/^workspace\s+"(.+)"$/);
80
+ if (wsMatch && "path" in value && "account" in value) {
81
+ config.workspaces[wsMatch[1]] = value;
82
+ continue;
83
+ }
84
+ // Account sections
85
+ if ("name" in value &&
86
+ "email" in value &&
87
+ "private_key" in value &&
88
+ "public_key" in value) {
89
+ config.accounts[key] = value;
86
90
  }
87
91
  }
88
92
  return config;
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.0.0",
6
+ "version": "1.0.2",
7
7
  "description": "Folder-based Git identity manager. Associate workspace folders with Git accounts — SSH keys, author name, and email are applied automatically.",
8
8
  "main": "dist/cli.js",
9
9
  "bin": {