create-twinbloc-app 0.1.5 → 0.1.6

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/bin/cli.js +15 -25
  2. package/package.json +1 -1
package/bin/cli.js CHANGED
@@ -93,17 +93,16 @@ const printBanner = () => {
93
93
  };
94
94
 
95
95
  const agentDirectories = [
96
- { key: "antigravity", path: ".agents", label: "Antigravity" },
97
- { key: "agent", path: ".agent", label: "Agent" },
98
- { key: "claude", path: ".claude", label: "Claude" },
99
- { key: "codex", path: ".codex", label: "Codex" },
96
+ { key: "antigravity", path: ".agents/skills", label: "Antigravity" },
97
+ { key: "agent", path: ".agent/skills", label: "Vscode" },
98
+ { key: "claude", path: ".claude/skills", label: "Claude" },
99
+ { key: "codex", path: ".codex/skills", label: "Codex" },
100
100
  { key: "cursor", path: ".cursor", label: "Cursor" },
101
- { key: "github", path: ".github", label: "Github" },
102
- { key: "kilocode", path: ".kilocode", label: "Kilocode" },
103
- { key: "opencode", path: ".opencode", label: "Opencode" },
104
- { key: "trae", path: ".trae", label: "Trae" },
105
- { key: "vscode", path: ".vscode", label: "Vscode" },
106
- { key: "windsurf", path: ".windsurf", label: "Windsurf" },
101
+ { key: "github", path: ".github/skills", label: "Github" },
102
+ { key: "kilocode", path: ".kilocode/skills", label: "Kilocode" },
103
+ { key: "opencode", path: ".opencode/skills", label: "Opencode" },
104
+ { key: "trae", path: ".trae/skills", label: "Trae" },
105
+ { key: "windsurf", path: ".windsurf/skills", label: "Windsurf" },
107
106
  ];
108
107
 
109
108
  const getExistingAgentKeys = async (rootDir) => {
@@ -116,16 +115,6 @@ const getExistingAgentKeys = async (rootDir) => {
116
115
  return existing;
117
116
  };
118
117
 
119
- const getAvailableAgentDirectories = async (rootDir) => {
120
- const available = [];
121
- for (const dir of agentDirectories) {
122
- if (await fs.pathExists(path.join(rootDir, dir.path))) {
123
- available.push(dir);
124
- }
125
- }
126
- return available;
127
- };
128
-
129
118
  const renderAgentSelectionHeader = () => {
130
119
  output.write("\x1b[2J\x1b[0;0H");
131
120
  printBanner();
@@ -227,14 +216,15 @@ const main = async () => {
227
216
  await fs.copy(examplePath, targetDir, { overwrite: true });
228
217
  }
229
218
 
230
- const availableAgentDirectories = await getAvailableAgentDirectories(templateRoot);
231
219
  const existingAgentKeys = await getExistingAgentKeys(targetDir);
232
- const defaultKeys = availableAgentDirectories.filter((dir) => existingAgentKeys.has(dir.key)).map((dir) => dir.key);
220
+ const defaultKeys = agentDirectories.filter((dir) => existingAgentKeys.has(dir.key)).map((dir) => dir.key);
221
+
222
+ const selectedKeys = await promptAgentSelection(agentDirectories, defaultKeys);
223
+ const selectedLabels = agentDirectories.filter((dir) => selectedKeys.has(dir.key)).map((dir) => dir.label);
233
224
 
234
- const selectedKeys = availableAgentDirectories.length > 0 ? await promptAgentSelection(availableAgentDirectories, defaultKeys) : new Set();
235
- const selectedLabels = availableAgentDirectories.filter((dir) => selectedKeys.has(dir.key)).map((dir) => dir.label);
225
+ await Promise.all(agentDirectories.filter((dir) => selectedKeys.has(dir.key)).map((dir) => fs.ensureDir(path.join(targetDir, dir.path))));
236
226
 
237
- const dirsToRemove = availableAgentDirectories.filter((dir) => !selectedKeys.has(dir.key));
227
+ const dirsToRemove = agentDirectories.filter((dir) => !selectedKeys.has(dir.key));
238
228
  await Promise.all(dirsToRemove.map((dir) => fs.remove(path.join(targetDir, dir.path))));
239
229
 
240
230
  const appName = path.basename(targetDir);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-twinbloc-app",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "description": "React Native starter template with optional examples",
5
5
  "type": "module",
6
6
  "bin": {