@akanjs/devkit 2.4.0-rc.3 → 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.
- package/akanConfig/akanConfig.test.ts +13 -10
- package/akanConfig/akanConfig.ts +17 -3
- package/package.json +2 -2
|
@@ -265,22 +265,25 @@ describe("AkanAppConfig", () => {
|
|
|
265
265
|
`postgres@${runtimeDependencies.postgres}`,
|
|
266
266
|
`protobufjs@${runtimeDependencies.protobufjs}`,
|
|
267
267
|
]);
|
|
268
|
-
|
|
268
|
+
const expectedMobilePackages: string[] = [
|
|
269
269
|
"firebase",
|
|
270
270
|
"@capacitor/cli",
|
|
271
271
|
"@capacitor/core",
|
|
272
272
|
"@capacitor/ios",
|
|
273
273
|
"@capacitor/android",
|
|
274
274
|
"@capacitor/assets",
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
]);
|
|
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
|
+
);
|
|
284
287
|
});
|
|
285
288
|
|
|
286
289
|
test("normalizes multiple mobile targets and validates base paths", () => {
|
package/akanConfig/akanConfig.ts
CHANGED
|
@@ -53,9 +53,16 @@ const SSR_RUNTIME_PACKAGES = ["react", "react-dom", "react-server-dom-webpack"]
|
|
|
53
53
|
const NATIVE_RUNTIME_PACKAGES = ["sharp"] as const;
|
|
54
54
|
const DEFAULT_BACKEND_RUNTIME_PACKAGES = ["croner"] as const;
|
|
55
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.
|
|
57
|
-
//
|
|
58
|
-
//
|
|
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.
|
|
59
66
|
const MOBILE_RUNTIME_PACKAGES = [
|
|
60
67
|
"firebase",
|
|
61
68
|
"@capacitor/cli",
|
|
@@ -63,6 +70,13 @@ const MOBILE_RUNTIME_PACKAGES = [
|
|
|
63
70
|
"@capacitor/ios",
|
|
64
71
|
"@capacitor/android",
|
|
65
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",
|
|
66
80
|
] as const;
|
|
67
81
|
const DATABASE_MODE_RUNTIME_PACKAGES = {
|
|
68
82
|
single: [],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@akanjs/devkit",
|
|
3
|
-
"version": "2.4.0-rc.
|
|
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.
|
|
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",
|