@akanjs/devkit 2.4.0-rc.2 → 2.4.0-rc.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.
@@ -265,8 +265,25 @@ describe("AkanAppConfig", () => {
265
265
  `postgres@${runtimeDependencies.postgres}`,
266
266
  `protobufjs@${runtimeDependencies.protobufjs}`,
267
267
  ]);
268
- expect(config.getMobileRuntimePackages()).toEqual(["firebase"]);
269
- expect(config.getMissingMobileDependencySpecs()).toEqual([`firebase@${runtimeDependencies.firebase}`]);
268
+ const expectedMobilePackages: string[] = [
269
+ "firebase",
270
+ "@capacitor/cli",
271
+ "@capacitor/core",
272
+ "@capacitor/ios",
273
+ "@capacitor/android",
274
+ "@capacitor/assets",
275
+ "@capacitor/app",
276
+ "@capacitor/device",
277
+ "@capacitor/keyboard",
278
+ "@capacitor/haptics",
279
+ "@capacitor/preferences",
280
+ "@capacitor/browser",
281
+ "capacitor-plugin-safe-area",
282
+ ];
283
+ expect(config.getMobileRuntimePackages() as string[]).toEqual(expectedMobilePackages);
284
+ expect(config.getMissingMobileDependencySpecs()).toEqual(
285
+ expectedMobilePackages.map((lib) => `${lib}@${runtimeDependencies[lib as keyof typeof runtimeDependencies]}`),
286
+ );
270
287
  });
271
288
 
272
289
  test("normalizes multiple mobile targets and validates base paths", () => {
@@ -52,9 +52,32 @@ const WORKSPACE_BARREL_FACETS = ["ui", "webkit", "common", "client", "server"] a
52
52
  const SSR_RUNTIME_PACKAGES = ["react", "react-dom", "react-server-dom-webpack"] as const;
53
53
  const NATIVE_RUNTIME_PACKAGES = ["sharp"] as const;
54
54
  const DEFAULT_BACKEND_RUNTIME_PACKAGES = ["croner"] as const;
55
- // Native-only client packages that are not bundled into the base bootstrap; installed
56
- // on demand when a mobile target is built or started (e.g. firebase for push tokens).
57
- const MOBILE_RUNTIME_PACKAGES = ["firebase"] as const;
55
+ // Packages required to build/run a mobile target that are not part of the base bootstrap;
56
+ // installed on demand when a mobile target is built or started. All are declared only as
57
+ // optional peers, so a fresh workspace never auto-installs them. Split into three groups:
58
+ // 1. the firebase client (push tokens),
59
+ // 2. the Capacitor toolchain (`npx cap` / `npx @capacitor/assets` + the native platforms), and
60
+ // 3. the Capacitor plugins the framework loads unconditionally on every native boot — Device,
61
+ // Keyboard, Haptics and SafeArea (`Device.load`), App (CSR lifecycle), Preferences (storage),
62
+ // Browser (`CsrLink` navigation). Without them `npx cap sync` never registers the native
63
+ // plugin, so the JS bridge throws `Capacitor plugin "Device" is not available.` at runtime.
64
+ // Feature-gated plugins (camera, contacts, geolocation, push, fcm, updater, purchase) stay opt-in
65
+ // optional peers because they need app-specific native permissions/config before they can be used.
66
+ const MOBILE_RUNTIME_PACKAGES = [
67
+ "firebase",
68
+ "@capacitor/cli",
69
+ "@capacitor/core",
70
+ "@capacitor/ios",
71
+ "@capacitor/android",
72
+ "@capacitor/assets",
73
+ "@capacitor/app",
74
+ "@capacitor/device",
75
+ "@capacitor/keyboard",
76
+ "@capacitor/haptics",
77
+ "@capacitor/preferences",
78
+ "@capacitor/browser",
79
+ "capacitor-plugin-safe-area",
80
+ ] as const;
58
81
  const DATABASE_MODE_RUNTIME_PACKAGES = {
59
82
  single: [],
60
83
  multiple: ["@libsql/client", "bullmq", "ioredis", "protobufjs"],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akanjs/devkit",
3
- "version": "2.4.0-rc.2",
3
+ "version": "2.4.0-rc.4",
4
4
  "sourceType": "module",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -32,7 +32,7 @@
32
32
  "@langchain/openai": "^1.4.6",
33
33
  "@tailwindcss/node": "^4.3.0",
34
34
  "@trapezedev/project": "^7.1.4",
35
- "akanjs": "2.4.0-rc.2",
35
+ "akanjs": "2.4.0-rc.4",
36
36
  "chalk": "^5.6.2",
37
37
  "commander": "^14.0.3",
38
38
  "daisyui": "5.5.23",