@akanjs/devkit 2.4.0-rc.5 → 2.4.0-rc.6
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 +14 -0
- package/akanConfig/akanConfig.ts +13 -10
- package/package.json +2 -2
|
@@ -265,6 +265,8 @@ describe("AkanAppConfig", () => {
|
|
|
265
265
|
`postgres@${runtimeDependencies.postgres}`,
|
|
266
266
|
`protobufjs@${runtimeDependencies.protobufjs}`,
|
|
267
267
|
]);
|
|
268
|
+
// The workspace-root install covers the toolchain/runtime plus every app Capacitor plugin
|
|
269
|
+
// (deduped — "@capacitor/core" appears in both source lists).
|
|
268
270
|
const expectedMobilePackages: string[] = [
|
|
269
271
|
"firebase",
|
|
270
272
|
"@capacitor/cli",
|
|
@@ -272,6 +274,18 @@ describe("AkanAppConfig", () => {
|
|
|
272
274
|
"@capacitor/ios",
|
|
273
275
|
"@capacitor/android",
|
|
274
276
|
"@capacitor/assets",
|
|
277
|
+
"@capacitor-community/fcm",
|
|
278
|
+
"@capacitor/app",
|
|
279
|
+
"@capacitor/browser",
|
|
280
|
+
"@capacitor/camera",
|
|
281
|
+
"@capacitor/device",
|
|
282
|
+
"@capacitor/geolocation",
|
|
283
|
+
"@capacitor/haptics",
|
|
284
|
+
"@capacitor/inappbrowser",
|
|
285
|
+
"@capacitor/keyboard",
|
|
286
|
+
"@capacitor/preferences",
|
|
287
|
+
"@capacitor/push-notifications",
|
|
288
|
+
"capacitor-plugin-safe-area",
|
|
275
289
|
];
|
|
276
290
|
expect(config.getMobileRuntimePackages() as string[]).toEqual(expectedMobilePackages);
|
|
277
291
|
expect(config.getMissingMobileDependencySpecs()).toEqual(
|
package/akanConfig/akanConfig.ts
CHANGED
|
@@ -52,11 +52,11 @@ 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
|
-
//
|
|
56
|
-
// declared only as optional peers, so a fresh workspace never auto-installs them. Covers the
|
|
57
|
-
// firebase client (push tokens) and the Capacitor toolchain — `@capacitor/cli` (`npx cap`),
|
|
55
|
+
// The firebase client (push tokens) and the Capacitor toolchain — `@capacitor/cli` (`npx cap`),
|
|
58
56
|
// `@capacitor/assets` (`npx @capacitor/assets`) plus the `@capacitor/core`/`ios`/`android` runtime
|
|
59
57
|
// and native-platform packages that `npx cap add`/`sync` resolve from the workspace node_modules.
|
|
58
|
+
// All are declared only as optional peers, so a fresh workspace never auto-installs them; the mobile
|
|
59
|
+
// preflight installs them (together with MOBILE_APP_CAPACITOR_PLUGINS) at the workspace root.
|
|
60
60
|
const MOBILE_RUNTIME_PACKAGES = [
|
|
61
61
|
"firebase",
|
|
62
62
|
"@capacitor/cli",
|
|
@@ -65,12 +65,13 @@ const MOBILE_RUNTIME_PACKAGES = [
|
|
|
65
65
|
"@capacitor/android",
|
|
66
66
|
"@capacitor/assets",
|
|
67
67
|
] as const;
|
|
68
|
-
// Capacitor plugins that must be declared in the *app's* package.json
|
|
69
|
-
// `npx cap sync` discovers plugins by scanning the app directory's
|
|
70
|
-
// native code into the iOS/Android projects; packages present only
|
|
71
|
-
// registered, so the JS bridge throws
|
|
72
|
-
//
|
|
73
|
-
//
|
|
68
|
+
// Capacitor plugins that must additionally be declared in the *app's* package.json
|
|
69
|
+
// (apps/<app>/package.json): `npx cap sync` discovers plugins by scanning the app directory's
|
|
70
|
+
// dependencies and registers their native code into the iOS/Android projects; packages present only
|
|
71
|
+
// at the workspace root are never registered, so the JS bridge throws
|
|
72
|
+
// `Capacitor plugin "Device" is not available.` at runtime. They are installed at the workspace root
|
|
73
|
+
// alongside MOBILE_RUNTIME_PACKAGES (pinned via optional peers) and declared in the app with a "*"
|
|
74
|
+
// range so bun dedupes them to that hoisted version instead of pinning a second source of truth.
|
|
74
75
|
const MOBILE_APP_CAPACITOR_PLUGINS = [
|
|
75
76
|
"@capacitor-community/fcm",
|
|
76
77
|
"@capacitor/app",
|
|
@@ -423,7 +424,9 @@ CMD [${command.map((c) => `"${c}"`).join(",")}]`;
|
|
|
423
424
|
return this.#getMissingDependencySpecs(this.getDatabaseModeRuntimePackages(databaseMode));
|
|
424
425
|
}
|
|
425
426
|
getMobileRuntimePackages() {
|
|
426
|
-
|
|
427
|
+
// The app Capacitor plugins are installed at the workspace root too, so bun can resolve the
|
|
428
|
+
// app's "*" declarations to a hoisted, peer-pinned version instead of fetching latest.
|
|
429
|
+
return [...new Set([...MOBILE_RUNTIME_PACKAGES, ...MOBILE_APP_CAPACITOR_PLUGINS])];
|
|
427
430
|
}
|
|
428
431
|
getMissingMobileDependencySpecs() {
|
|
429
432
|
return this.#getMissingDependencySpecs(this.getMobileRuntimePackages());
|
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.6",
|
|
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.6",
|
|
36
36
|
"chalk": "^5.6.2",
|
|
37
37
|
"commander": "^14.0.3",
|
|
38
38
|
"daisyui": "5.5.23",
|