kitcn 0.13.2 → 0.13.3

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/dist/cli.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { $ as promptForScaffoldTemplateSelection, A as resolveCodegenTrimSegments, B as runConfiguredCodegen, C as isEntryPoint, Ct as serializeEnvValue, D as parseInitCommandArgs, Dt as logger, E as parseBackendRunJson, F as resolveRunDeps, G as runMigrationFlow, H as runDevSchemaBackfillIfNeeded, I as runAfterScaffoldScript, J as withWorkingDirectory, K as trackProcess, L as runAggregateBackfillFlow, M as resolveDocTopic, N as resolveInitProjectDir, O as readPackageVersions, Ot as highlighter, P as resolveMigrationConfig, Q as promptForPluginSelection, R as runAggregatePruneFlow, S as isConvexDevPreRunConflictFlag, St as resolveAuthEnvState, T as parseArgs, U as runInitCommandFlow, V as runConvexInitIfNeeded, W as runMigrationCreate, X as collectPluginScaffoldTemplates, Y as createSpinner, Z as filterScaffoldTemplatePathMap, _ as formatInfoOutput, _t as applyPlanningDependencyInstall, a as cleanup, at as getPluginCatalogEntry, b as getDevAggregateBackfillStatePath, bt as resolveSupportedDependencyWarnings, c as createCommandEnv, ct as buildPluginInstallPlan, d as extractBackfillCliOptions, dt as collectInstalledPluginKeys, et as resolveAddTemplateDefaults, f as extractConcaveRunTargetArgs, ft as getPluginLockfilePath, g as formatDocsOutput, gt as applyDependencyHintsInstall, h as extractResetCliOptions, ht as resolveSchemaInstalledPlugins, i as buildInitializationPlan, it as resolveTemplatesByIdOrThrow, j as resolveConfiguredBackend, k as resolveBackfillConfig, l as ensureConvexGitignoreEntry, lt as resolvePluginScaffoldRoots, m as extractMigrationDownOptions, mt as readPluginLockfile, n as applyPluginInstallPlanFiles, nt as resolvePresetScaffoldTemplates, o as createBackendAdapter, ot as getSupportedPluginKeys, p as extractMigrationCliOptions, pt as getSchemaFilePath, q as withLocalCodegenEnv, r as assertNoRemovedDevPreRunFlag, rt as resolveTemplateSelectionSource, s as createBackendCommandEnv, st as isSupportedPluginKey, t as applyDependencyInstallPlan, tt as resolvePluginPreset, u as extractBackendRunTargetArgs, ut as assertSchemaFileExists, v as getAggregateBackfillDeploymentKey, vt as applyPluginDependencyInstall, w as isInitialized, wt as stripConvexCommandNoise, x as hasRemoteConvexDeploymentEnv, xt as resolveProjectScaffoldContext, y as getConvexDeploymentCommandEnv, yt as inspectPluginDependencyInstall, z as runBackendFunction } from "./backend-core-B4DHUUfg.mjs";
2
+ import { $ as promptForScaffoldTemplateSelection, A as resolveCodegenTrimSegments, B as runConfiguredCodegen, C as isEntryPoint, Ct as serializeEnvValue, D as parseInitCommandArgs, Dt as logger, E as parseBackendRunJson, F as resolveRunDeps, G as runMigrationFlow, H as runDevSchemaBackfillIfNeeded, I as runAfterScaffoldScript, J as withWorkingDirectory, K as trackProcess, L as runAggregateBackfillFlow, M as resolveDocTopic, N as resolveInitProjectDir, O as readPackageVersions, Ot as highlighter, P as resolveMigrationConfig, Q as promptForPluginSelection, R as runAggregatePruneFlow, S as isConvexDevPreRunConflictFlag, St as resolveAuthEnvState, T as parseArgs, U as runInitCommandFlow, V as runConvexInitIfNeeded, W as runMigrationCreate, X as collectPluginScaffoldTemplates, Y as createSpinner, Z as filterScaffoldTemplatePathMap, _ as formatInfoOutput, _t as applyPlanningDependencyInstall, a as cleanup, at as getPluginCatalogEntry, b as getDevAggregateBackfillStatePath, bt as resolveSupportedDependencyWarnings, c as createCommandEnv, ct as buildPluginInstallPlan, d as extractBackfillCliOptions, dt as collectInstalledPluginKeys, et as resolveAddTemplateDefaults, f as extractConcaveRunTargetArgs, ft as getPluginLockfilePath, g as formatDocsOutput, gt as applyDependencyHintsInstall, h as extractResetCliOptions, ht as resolveSchemaInstalledPlugins, i as buildInitializationPlan, it as resolveTemplatesByIdOrThrow, j as resolveConfiguredBackend, k as resolveBackfillConfig, l as ensureConvexGitignoreEntry, lt as resolvePluginScaffoldRoots, m as extractMigrationDownOptions, mt as readPluginLockfile, n as applyPluginInstallPlanFiles, nt as resolvePresetScaffoldTemplates, o as createBackendAdapter, ot as getSupportedPluginKeys, p as extractMigrationCliOptions, pt as getSchemaFilePath, q as withLocalCodegenEnv, r as assertNoRemovedDevPreRunFlag, rt as resolveTemplateSelectionSource, s as createBackendCommandEnv, st as isSupportedPluginKey, t as applyDependencyInstallPlan, tt as resolvePluginPreset, u as extractBackendRunTargetArgs, ut as assertSchemaFileExists, v as getAggregateBackfillDeploymentKey, vt as applyPluginDependencyInstall, w as isInitialized, wt as stripConvexCommandNoise, x as hasRemoteConvexDeploymentEnv, xt as resolveProjectScaffoldContext, y as getConvexDeploymentCommandEnv, yt as inspectPluginDependencyInstall, z as runBackendFunction } from "./backend-core-BV61sNRx.mjs";
3
3
  import fs, { existsSync, readFileSync } from "node:fs";
4
4
  import path, { delimiter, dirname, join, relative, resolve } from "node:path";
5
5
  import { fileURLToPath } from "node:url";
@@ -638,7 +638,7 @@ function resolveConcaveLocalSiteUrl(cwd = process.cwd()) {
638
638
  const envLocalPath = join(cwd, ".env.local");
639
639
  if (!fs.existsSync(envLocalPath)) return "http://localhost:3000";
640
640
  const parsed = parseEnv(fs.readFileSync(envLocalPath, "utf8"));
641
- return parsed.NEXT_PUBLIC_SITE_URL ?? parsed.VITE_SITE_URL ?? "http://localhost:3000";
641
+ return parsed.NEXT_PUBLIC_SITE_URL ?? parsed.EXPO_PUBLIC_SITE_URL ?? parsed.VITE_SITE_URL ?? "http://localhost:3000";
642
642
  }
643
643
  function resolveImplicitConvexRemoteDeploymentEnv(cwd = process.cwd()) {
644
644
  const envLocalPath = join(cwd, ".env.local");
@@ -2169,7 +2169,7 @@ const INIT_LOCAL_BOOTSTRAP_PROMPT = "Run one-shot local Convex bootstrap after i
2169
2169
  const INIT_HELP_TEXT = `Usage: kitcn init [options]
2170
2170
 
2171
2171
  Options:
2172
- --template, -t App template ("next", "start", or "vite") for fresh app scaffolding
2172
+ --template, -t App template ("next", "expo", "start", or "vite") for fresh app scaffolding
2173
2173
  --cwd Target directory (or parent when used with --name)
2174
2174
  --name Project name when scaffolding a fresh app
2175
2175
  --prod Forward to \`convex init\`
@@ -2629,7 +2629,7 @@ const __filename = fileURLToPath(import.meta.url);
2629
2629
  const HELP_FLAGS = new Set(["--help", "-h"]);
2630
2630
  const VERSION_FLAGS = new Set(["--version", "-v"]);
2631
2631
  const packageJson = readOwnPackageJson(import.meta.url);
2632
- const REMOVED_CREATE_MESSAGE = "Removed `kitcn create`. Use `kitcn init -t <next|start|vite>` for fresh app scaffolding.";
2632
+ const REMOVED_CREATE_MESSAGE = "Removed `kitcn create`. Use `kitcn init -t <next|expo|start|vite>` for fresh app scaffolding.";
2633
2633
  const LOCAL_NODE_REEXEC_ENV = "KITCN_NODE_REEXEC";
2634
2634
  const LOCAL_NODE_REEXEC_COMMANDS = new Set([
2635
2635
  "add",
package/dist/watcher.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { Dt as logger, Et as getConvexConfig, F as resolveRunDeps, Tt as generateMeta, j as resolveConfiguredBackend, q as withLocalCodegenEnv } from "./backend-core-B4DHUUfg.mjs";
2
+ import { Dt as logger, Et as getConvexConfig, F as resolveRunDeps, Tt as generateMeta, j as resolveConfiguredBackend, q as withLocalCodegenEnv } from "./backend-core-BV61sNRx.mjs";
3
3
  import path from "node:path";
4
4
  import { fileURLToPath } from "node:url";
5
5
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kitcn",
3
- "version": "0.13.2",
3
+ "version": "0.13.3",
4
4
  "description": "kitcn - React Query integration and CLI tools for Convex",
5
5
  "keywords": [
6
6
  "convex",
@@ -0,0 +1,73 @@
1
+ # Expo Setup
2
+
3
+ Use Expo when you want the official `create-expo-app` shell with the kitcn
4
+ Convex baseline layered on top.
5
+
6
+ ## Fresh scaffold
7
+
8
+ ```bash
9
+ npx kitcn@latest init -t expo --yes
10
+ ```
11
+
12
+ This path owns:
13
+
14
+ - `.env.local`
15
+ - `expo-env.d.ts`
16
+ - `src/components/providers.tsx`
17
+ - `src/lib/convex/*`
18
+ - `src/app/_layout.tsx`
19
+ - `src/app/index.tsx`
20
+ - `convex/functions/schema.ts`
21
+ - `convex/functions/messages.ts`
22
+ - `convex/lib/crpc.ts`
23
+ - `convex/lib/get-env.ts`
24
+ - `convex/shared/api.ts`
25
+
26
+ V1 scope stays narrow:
27
+
28
+ - fresh scaffold only
29
+ - no existing Expo adoption
30
+ - no styling-framework layer beyond the official Expo baseline
31
+
32
+ ## Add auth
33
+
34
+ Expo uses the default auth scaffold:
35
+
36
+ ```bash
37
+ npx kitcn@latest init -t expo --yes
38
+ npx kitcn add auth --yes
39
+ npx kitcn add auth --schema --yes
40
+ ```
41
+
42
+ This writes:
43
+
44
+ - `src/lib/convex/auth-client.ts`
45
+ - `src/lib/convex/convex-provider.tsx`
46
+ - `src/app/auth.tsx`
47
+ - `convex/functions/auth.config.ts`
48
+ - `convex/functions/auth.ts`
49
+ - auth-owned blocks in `convex/functions/schema.ts`
50
+
51
+ Expo auth keeps managed schema refresh. It is not a separate preset.
52
+
53
+ ## Env contract
54
+
55
+ ```bash
56
+ EXPO_PUBLIC_CONVEX_URL=http://127.0.0.1:3210
57
+ EXPO_PUBLIC_CONVEX_SITE_URL=http://127.0.0.1:3211
58
+ EXPO_PUBLIC_SITE_URL=http://localhost:3000
59
+ ```
60
+
61
+ Use `process.env.EXPO_PUBLIC_*` directly in client code.
62
+
63
+ ## Run it
64
+
65
+ ```bash
66
+ # terminal 1
67
+ npx kitcn dev
68
+
69
+ # terminal 2
70
+ bun run start
71
+ ```
72
+
73
+ The starter app opens to one native messages screen backed by Convex.
@@ -107,6 +107,12 @@ npx kitcn@latest --backend concave init --yes
107
107
  # New Next.js app with deterministic shadcn bootstrap + first local Convex bootstrap
108
108
  npx kitcn@latest init -t next --yes
109
109
 
110
+ # New Expo app with the official create-expo-app shell + first local Convex bootstrap
111
+ npx kitcn@latest init -t expo --yes
112
+
113
+ # New TanStack Start app with the official shadcn Start shell + first local Convex bootstrap
114
+ npx kitcn@latest init -t start --yes
115
+
110
116
  # New Vite app with the React baseline + first local Convex bootstrap
111
117
  npx kitcn@latest init -t vite --yes
112
118
 
@@ -175,6 +181,8 @@ Universal scaffold rule:
175
181
  Public template keys stay concrete:
176
182
 
177
183
  - `next`
184
+ - `expo`
185
+ - `start`
178
186
  - `vite`
179
187
 
180
188
  Internal scaffold modes stay broad:
@@ -184,6 +192,7 @@ Internal scaffold modes stay broad:
184
192
 
185
193
  Framework mapping:
186
194
 
195
+ - `expo` -> `expo`
187
196
  - `next-app` -> `next-app`
188
197
  - `next-pages`, `vite`, `react-router`, `tanstack-start`, `manual` -> `react`
189
198
 
@@ -1,6 +1,6 @@
1
1
  ## 5. Core Backend
2
2
 
3
- For production bootstrap, start in the CLI Registry: use `npx kitcn@latest init -t <next|vite> --yes` for the shortest fresh local path, `npx kitcn@latest init --yes` to adopt the current app and finish the first local Convex bootstrap in one command, and `bunx kitcn add <plugin>` for feature layers. This file is the manual backend wiring reference.
3
+ For production bootstrap, start in the CLI Registry: use `npx kitcn@latest init -t <next|expo|start|vite> --yes` for the shortest fresh local path, `npx kitcn@latest init --yes` to adopt the current app and finish the first local Convex bootstrap in one command, and `bunx kitcn add <plugin>` for feature layers. This file is the manual backend wiring reference.
4
4
 
5
5
  ### 5.1 Define schema and relations
6
6