Skip to content

Commit 1eb12e1

Browse files
committed
fix: fixing generate-repo command
1 parent c94a562 commit 1eb12e1

File tree

4 files changed

+20
-14
lines changed

4 files changed

+20
-14
lines changed

.changeset/curvy-doors-jam.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
'@calycode/core': patch
44
---
55

6-
refactor: cleaned up a remainder console.log, changed imports to use the barrel exports from the cli/utils
76
chore: added remote cache with turborepo to the workflows
8-
chore: setting up unit-testing structure
7+
chore: setting up unit-testing structure
8+
fix: fixing an issue where the json repo generation resulted in duplicate 'api group folders'
9+
refactor: cleaned up a remainder console.log, changed imports to use the barrel exports from the cli/utils

packages/cli/src/commands/setup-instance.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -43,19 +43,19 @@ async function setupInstanceWizard(core) {
4343

4444
log.info(
4545
`
46-
Thank you for using @calycode/cli! 🚀
46+
Thank you for using @calycode/cli! 🚀
4747
48-
To help us improve, we collect anonymous telemetry data via our PostHog instance.
49-
Here’s exactly what we track:
50-
• Command names (e.g., generate-oas)
51-
• Command duration
52-
• Technical data:
53-
– IP address (IPv6)
54-
– Timestamp
55-
– PostHog library version
48+
To help us improve, we collect anonymous telemetry data via our PostHog instance.
49+
Here’s exactly what we track:
50+
• Command names (e.g., generate-oas)
51+
• Command duration
52+
• Technical data:
53+
– IP address (IPv6)
54+
– Timestamp
55+
– PostHog library version
5656
57-
By continuing to use @calycode/cli, you consent to this data collection.
58-
We appreciate your support and commitment to making @calycode/cli better!
57+
By continuing to use @calycode/cli, you consent to this data collection.
58+
We appreciate your support and commitment to making @calycode/cli better!
5959
`
6060
);
6161

packages/core/src/features/process-xano/core/processItem.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ function getItemDir({ key, item, dirPath, appMapping }) {
99
if (key === 'query' && item.app?.id) {
1010
const appName = appMapping[item.app.id] || `app_${item.app.id}`;
1111
baseDir = joinPath('app', appName, sanitizeFileName(itemName));
12+
} else if (key === 'app') {
13+
baseDir = joinPath(dirPath, itemName);
1214
} else {
1315
baseDir = joinPath(dirPath, sanitizeFileName(itemName));
1416
}

packages/core/src/implementations/setup.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,10 @@ export async function setupInstanceImplementation(
9595

9696
await Promise.all(
9797
workspaces.map(async (workspace) => {
98-
const workspaceCleanName = sanitizeInstanceName(workspace.name);
98+
// [ ] consider an additional case handling if the workspace.name contains non direcatory name safe chars...
99+
// for now just use the exact same workspace name in the directory creation as it is on xano.
100+
//const workspaceCleanName = sanitizeInstanceName(workspace.name);
101+
const workspaceCleanName = workspace.name;
99102
const workspaceDir = `${options.projectRoot}/${workspaceCleanName}`;
100103
workspaceDirMap[workspace.name] = workspaceDir;
101104
await storage.mkdir(workspaceDir, { recursive: true });

0 commit comments

Comments
 (0)