@appsbyme/create-basekit 1.0.3 → 1.0.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appsbyme/create-basekit",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "description": "Scaffold Basekit web, mobile, or full-stack apps",
5
5
  "type": "module",
6
6
  "bin": "./dist/index.cjs",
@@ -19,10 +19,18 @@
19
19
  "prepublishOnly": "yarn build"
20
20
  },
21
21
  "dependencies": {
22
- "@appsbyme/basekit-ai-helpers": "^1.0.1",
23
22
  "prompts": "^2.4.2"
24
23
  },
24
+ "peerDependencies": {
25
+ "@appsbyme/basekit-ai-helpers": "^1.0.1"
26
+ },
27
+ "peerDependenciesMeta": {
28
+ "@appsbyme/basekit-ai-helpers": {
29
+ "optional": true
30
+ }
31
+ },
25
32
  "devDependencies": {
33
+ "@appsbyme/basekit-ai-helpers": "^1.0.1",
26
34
  "@appsbyme/basekit-tsconfig": "^1.0.0",
27
35
  "@types/node": "^24.0.14",
28
36
  "@types/prompts": "^2.4.9",
@@ -50,6 +58,6 @@
50
58
  ],
51
59
  "license": "MIT",
52
60
  "engines": {
53
- "node": ">=18"
61
+ "node": ">=22"
54
62
  }
55
63
  }
@@ -1,6 +1,6 @@
1
1
  # Basekit Expo Starter
2
2
 
3
- Production-ready Expo (React Native) app template with authentication, navigation, and shared cross-platform code. The app expects `packages/shared` to be supplied separately; `create-basekit app` provides it in the Basekit monorepo flow.
3
+ Production-ready Expo (React Native) app template with authentication, navigation, and shared cross-platform code. Shared types live in a sibling `packages/shared` package — `create-basekit app --mobile` creates that package for you; standalone `create-basekit mobile` expects you to provide a compatible `@shared` package (this is not a Django/basekit checkout).
4
4
 
5
5
  ## Features
6
6
 
@@ -19,7 +19,7 @@ Production-ready Expo (React Native) app template with authentication, navigatio
19
19
 
20
20
  ```
21
21
  ├── assets/ # App icons and splash screen
22
- ├── ../packages/shared/ # Required sibling package supplied by the orchestrator
22
+ ├── ../packages/shared/ # Shared types/schemas (from app --mobile, or your own)
23
23
  ├── src/
24
24
  │ ├── App.tsx # Root component with providers
25
25
  │ ├── components/ # Shared UI components
@@ -0,0 +1 @@
1
+ nodeLinker: node-modules
@@ -1 +1,2 @@
1
- export default {};
1
+ export const env: Record<string, string | undefined> = {};
2
+ export default env;
@@ -11,7 +11,7 @@ import {
11
11
  import type { User, LoginResponse, RegisterResponse } from '@shared/types/user';
12
12
  import type { LoginInput, RegisterBaseInput, ForgotPasswordInput, ChangePasswordInput } from '@shared/schemas/auth.schema';
13
13
 
14
- const API_URL = process.env.EXPO_PUBLIC_API_URL || 'http://localhost:8000/api/v1';
14
+ const API_URL = process.env['EXPO_PUBLIC_API_URL'] || 'http://localhost:8000/api/v1';
15
15
 
16
16
  const mobileHeaders = { 'X-Client-Type': 'mobile' };
17
17
 
@@ -35,7 +35,8 @@ export function AuthBackButton({
35
35
  navigation.goBack();
36
36
  return;
37
37
  }
38
- navigation.navigate(fallback);
38
+ // Dynamic auth fallback — React Navigation overloads need a narrow cast.
39
+ navigation.navigate(fallback as never);
39
40
  };
40
41
 
41
42
  return (
@@ -1,3 +1,3 @@
1
1
  export function isGuestAuthEnabled(): boolean {
2
- return process.env.EXPO_PUBLIC_FF_GUEST_AUTH === 'true';
2
+ return process.env['EXPO_PUBLIC_FF_GUEST_AUTH'] === 'true';
3
3
  }
@@ -15,9 +15,9 @@ import { addBreadcrumb } from '@/lib/sentry';
15
15
  * to avoid bricking the app if the leaf cert rotates.
16
16
  */
17
17
 
18
- const API_HOST = process.env.EXPO_PUBLIC_API_HOST ?? '';
18
+ const API_HOST = process.env['EXPO_PUBLIC_API_HOST'] ?? '';
19
19
  const PIN_HASHES: string[] = JSON.parse(
20
- process.env.EXPO_PUBLIC_SSL_PINS ?? '[]',
20
+ process.env['EXPO_PUBLIC_SSL_PINS'] ?? '[]',
21
21
  );
22
22
 
23
23
  let pinningInitialised = false;
@@ -2,7 +2,7 @@ import * as Sentry from '@sentry/react-native';
2
2
  import Constants from 'expo-constants';
3
3
 
4
4
  const DSN = Constants.expoConfig?.extra?.sentryDsn
5
- ?? process.env.EXPO_PUBLIC_SENTRY_DSN
5
+ ?? process.env['EXPO_PUBLIC_SENTRY_DSN']
6
6
  ?? '';
7
7
 
8
8
  let initialised = false;
@@ -4,7 +4,7 @@ import { addBreadcrumb } from '@/lib/sentry';
4
4
  import { showErrorToast } from '@/components/Toast';
5
5
  import i18next from 'i18next';
6
6
 
7
- const API_URL = process.env.EXPO_PUBLIC_API_URL || 'http://localhost:8000/api/v1';
7
+ const API_URL = process.env['EXPO_PUBLIC_API_URL'] || 'http://localhost:8000/api/v1';
8
8
 
9
9
  export const http = axios.create({
10
10
  baseURL: API_URL,
@@ -3,7 +3,7 @@ import axios from 'axios';
3
3
  import { addBreadcrumb, captureException } from '@/lib/sentry';
4
4
  import { tokenStorage } from '@/lib/storage';
5
5
 
6
- const API_URL = process.env.EXPO_PUBLIC_API_URL || 'http://localhost:8000/api/v1';
6
+ const API_URL = process.env['EXPO_PUBLIC_API_URL'] || 'http://localhost:8000/api/v1';
7
7
 
8
8
  let inFlight: Promise<string> | null = null;
9
9
 
@@ -6,7 +6,7 @@ export type WSEvent = { type: string; [key: string]: unknown };
6
6
 
7
7
  type Listener = (event: WSEvent) => void;
8
8
 
9
- const BASE_WS_URL = (process.env.EXPO_PUBLIC_API_URL || 'http://localhost:8000/api/v1')
9
+ const BASE_WS_URL = (process.env['EXPO_PUBLIC_API_URL'] || 'http://localhost:8000/api/v1')
10
10
  .replace(/\/api\/v1\/?$/, '')
11
11
  .replace(/^http/, 'ws');
12
12
 
@@ -86,16 +86,16 @@ yarn check # audit + type-check + lint + stylelint + test
86
86
 
87
87
  ### Branching & Commits
88
88
 
89
- - Default branch: **main**
89
+ - Default branch: **master**
90
90
  - Commits follow **Conventional Commits** (enforced by Commitlint + Husky):
91
91
  `feat`, `fix`, `docs`, `style`, `refactor`, `perf`, `test`, `chore`, `ci`, `build`, `revert`
92
92
  - Pre-commit hooks run **lint-staged** (ESLint fix, Stylelint fix, Prettier)
93
93
 
94
94
  ### CI Pipeline (`.github/workflows/ci.yml`)
95
95
 
96
- Runs on push/PR to `main`:
96
+ Runs on push/PR to `master`:
97
97
 
98
- 1. Checkout → Enable Corepack → Setup Node 22 → `yarn install --no-immutable`
98
+ 1. Checkout → Enable Corepack → Setup Node 22 → `yarn install --immutable`
99
99
  2. `yarn type-check`
100
100
  3. `yarn lint` (ESLint)
101
101
  4. `yarn stylelint` (Stylelint)
@@ -104,7 +104,7 @@ Runs on push/PR to `main`:
104
104
 
105
105
  ### Deployment Pipeline (`.github/workflows/release.yml`)
106
106
 
107
- Runs on push to `main`:
107
+ Runs on push to `master`:
108
108
 
109
109
  1. Same setup as CI
110
110
  2. Builds the application
@@ -13,12 +13,12 @@ WORKDIR /app
13
13
  RUN corepack enable
14
14
 
15
15
  # Copy dependency files first so dependency installation is cached separately.
16
- COPY package.json .yarnrc.yml ./
16
+ COPY package.json yarn.lock .yarnrc.yml ./
17
17
 
18
18
  # Install dependencies
19
19
  # Uses BuildKit cache for faster rebuilds.
20
20
  RUN --mount=type=cache,target=/root/.yarn/berry/cache \
21
- yarn install --no-immutable
21
+ yarn install --immutable
22
22
 
23
23
  # Copy project files
24
24
  COPY . .
@@ -0,0 +1,4 @@
1
+ nodeLinker: node-modules
2
+
3
+ # Public @appsbyme packages resolve from registry.npmjs.org (default).
4
+ # No npmScopes needed unless you later switch to a private registry.
@@ -28,7 +28,7 @@ services:
28
28
  command: >-
29
29
  sh -c "corepack enable
30
30
  && corepack prepare yarn@4.12.0 --activate
31
- && yarn install --no-immutable
31
+ && yarn install --immutable
32
32
  && yarn dev"
33
33
  stdin_open: true
34
34
  tty: true
@@ -9,6 +9,9 @@
9
9
  "license": "MIT",
10
10
  "type": "module",
11
11
  "private": true,
12
+ "engines": {
13
+ "node": ">=22"
14
+ },
12
15
  "workspaces": [],
13
16
  "scripts": {
14
17
  "dev": "vite",
@@ -31,10 +31,10 @@ FROM node:22-alpine AS builder
31
31
 
32
32
  WORKDIR /app
33
33
 
34
- COPY package.json .yarnrc.yml ./
34
+ COPY package.json yarn.lock .yarnrc.yml ./
35
35
 
36
36
  RUN --mount=type=cache,target=/root/.yarn/berry/cache \\
37
- yarn install --no-immutable
37
+ yarn install --immutable
38
38
 
39
39
  COPY . .
40
40
 
@@ -78,7 +78,7 @@ const DOCKER_COMPOSE = `services:
78
78
  - CHOKIDAR_USEPOLLING=true
79
79
  - WATCHPACK_POLLING=true
80
80
  command: >-
81
- sh -c "yarn install --no-immutable
81
+ sh -c "yarn install --immutable
82
82
  && yarn dev"
83
83
  stdin_open: true
84
84
  tty: true
@@ -240,7 +240,18 @@ function createDockerFiles(rootDir) {
240
240
  * @param {string} [options.rootDir]
241
241
  * @returns {Promise<{changed: boolean}>}
242
242
  */
243
+ function isMonorepoFrontend(rootDir) {
244
+ return exists(path.join(rootDir, '..', 'packages', 'shared'));
245
+ }
246
+
243
247
  export async function apply({ rootDir = getRootDir() } = {}) {
248
+ if (isMonorepoFrontend(rootDir)) {
249
+ logWarn(
250
+ 'Monorepo frontend detected — Docker is owned by frontend/Dockerfile + docker-compose.yml (build context: monorepo root). Skipping.',
251
+ );
252
+ return { changed: false };
253
+ }
254
+
244
255
  if (hasDocker(rootDir)) {
245
256
  logWarn('Docker configuration already detected — no changes made.');
246
257
  return { changed: false };