claude-init 1.0.32 → 1.0.34

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.
@@ -0,0 +1 @@
1
+ generate git PR title and description for $ARGUMENTS
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-init",
3
- "version": "1.0.32",
3
+ "version": "1.0.34",
4
4
  "description": "Initialize Claude development environment with configurations and templates",
5
5
  "type": "module",
6
6
  "bin": {
package/src/cli.js CHANGED
@@ -101,8 +101,8 @@ export async function cli() {
101
101
  'js'
102
102
  );
103
103
 
104
- // Map devcontainer variant to directory name
105
- const devcontainerMap = {
104
+ // Map devcontainer variant to source directory name in templates
105
+ const devcontainerSourceMap = {
106
106
  'js': '.devcontainer',
107
107
  'go': '.devcontainer-go',
108
108
  'rust': '.devcontainer-rust'
@@ -128,10 +128,30 @@ export async function cli() {
128
128
 
129
129
  // Conditionally add devcontainer task
130
130
  if (devcontainerVariant !== 'none') {
131
- const devcontainerDir = devcontainerMap[devcontainerVariant];
131
+ const sourceDir = devcontainerSourceMap[devcontainerVariant];
132
132
  tasks.splice(1, 0, {
133
- name: devcontainerDir,
134
- handler: () => handleDirectoryMirror(targetDir, devcontainerDir)
133
+ name: '.devcontainer',
134
+ handler: async () => {
135
+ const targetPath = path.join(targetDir, '.devcontainer');
136
+ const templatePath = path.join(getTemplatesPath(), sourceDir);
137
+
138
+ const exists = await fs.pathExists(targetPath);
139
+
140
+ // Remove existing .devcontainer if it exists
141
+ if (exists) {
142
+ await fs.remove(targetPath);
143
+ }
144
+
145
+ // Copy from selected source to .devcontainer
146
+ await fs.copy(templatePath, targetPath);
147
+
148
+ return {
149
+ action: exists ? 'updated' : 'created',
150
+ details: exists
151
+ ? `Overwrote .devcontainer with ${devcontainerVariant} configuration`
152
+ : `Created .devcontainer with ${devcontainerVariant} configuration`
153
+ };
154
+ }
135
155
  });
136
156
  }
137
157