@highbeek/create-rnstarterkit 1.1.3 → 1.1.4

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.
@@ -210,16 +210,22 @@ async function installDependencies(targetPath) {
210
210
  }
211
211
  async function setAuthTabsByPlatform(targetPath, platform) {
212
212
  const navigationPath = path_1.default.join(targetPath, "navigation");
213
- const targetTabs = path_1.default.join(navigationPath, "BottomTabs.tsx");
214
- const tabSourceImport = platform === "Expo" ? "./expo/BottomTabs" : "./cli/BottomTabs";
215
213
  if (!(await fs_extra_1.default.pathExists(navigationPath)))
216
214
  return;
217
- await fs_extra_1.default.writeFile(targetTabs, `export { default } from "${tabSourceImport}";\n`, "utf8");
218
- // Remove the unused platform subfolder so it doesn't leak into the project
219
- const unusedSubfolder = platform === "Expo"
220
- ? path_1.default.join(navigationPath, "cli")
221
- : path_1.default.join(navigationPath, "expo");
222
- await fs_extra_1.default.remove(unusedSubfolder);
215
+ const platformSubfolder = platform === "Expo" ? "expo" : "cli";
216
+ const unusedSubfolder = platform === "Expo" ? "cli" : "expo";
217
+ const sourceTabs = path_1.default.join(navigationPath, platformSubfolder, "BottomTabs.tsx");
218
+ const targetTabs = path_1.default.join(navigationPath, "BottomTabs.tsx");
219
+ // Copy the platform-specific content directly into BottomTabs.tsx,
220
+ // fixing the relative import depth (../../screens → ../screens)
221
+ if (await fs_extra_1.default.pathExists(sourceTabs)) {
222
+ const content = await fs_extra_1.default.readFile(sourceTabs, "utf8");
223
+ const fixed = content.replace(/\.\.\/\.\.\//g, "../");
224
+ await fs_extra_1.default.writeFile(targetTabs, fixed, "utf8");
225
+ }
226
+ // Remove both platform subfolders — content is now inline
227
+ await fs_extra_1.default.remove(path_1.default.join(navigationPath, platformSubfolder));
228
+ await fs_extra_1.default.remove(path_1.default.join(navigationPath, unusedSubfolder));
223
229
  }
224
230
  async function configureApiClientByPlatform(targetPath, platform) {
225
231
  const configPath = path_1.default.join(targetPath, "config");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@highbeek/create-rnstarterkit",
3
- "version": "1.1.3",
3
+ "version": "1.1.4",
4
4
  "description": "CLI to scaffold production-ready React Native app structures.",
5
5
  "main": "dist/src/generators/appGenerator.js",
6
6
  "bin": {