@akanjs/devkit 2.4.0-rc.3 → 2.4.0-rc.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.
|
@@ -265,21 +265,32 @@ 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
|
-
expect(config.
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
275
|
+
];
|
|
276
|
+
expect(config.getMobileRuntimePackages() as string[]).toEqual(expectedMobilePackages);
|
|
277
|
+
expect(config.getMissingMobileDependencySpecs()).toEqual(
|
|
278
|
+
expectedMobilePackages.map((lib) => `${lib}@${runtimeDependencies[lib as keyof typeof runtimeDependencies]}`),
|
|
279
|
+
);
|
|
280
|
+
expect(config.getMobileAppCapacitorPlugins()).toEqual([
|
|
281
|
+
"@capacitor-community/fcm",
|
|
282
|
+
"@capacitor/app",
|
|
283
|
+
"@capacitor/browser",
|
|
284
|
+
"@capacitor/camera",
|
|
285
|
+
"@capacitor/core",
|
|
286
|
+
"@capacitor/device",
|
|
287
|
+
"@capacitor/geolocation",
|
|
288
|
+
"@capacitor/haptics",
|
|
289
|
+
"@capacitor/inappbrowser",
|
|
290
|
+
"@capacitor/keyboard",
|
|
291
|
+
"@capacitor/preferences",
|
|
292
|
+
"@capacitor/push-notifications",
|
|
293
|
+
"capacitor-plugin-safe-area",
|
|
283
294
|
]);
|
|
284
295
|
});
|
|
285
296
|
|
package/akanConfig/akanConfig.ts
CHANGED
|
@@ -52,10 +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
|
-
// Packages
|
|
56
|
-
//
|
|
57
|
-
// (push tokens)
|
|
58
|
-
//
|
|
55
|
+
// Packages installed at the workspace root before a mobile target is built or started. All are
|
|
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`),
|
|
58
|
+
// `@capacitor/assets` (`npx @capacitor/assets`) plus the `@capacitor/core`/`ios`/`android` runtime
|
|
59
|
+
// and native-platform packages that `npx cap add`/`sync` resolve from the workspace node_modules.
|
|
59
60
|
const MOBILE_RUNTIME_PACKAGES = [
|
|
60
61
|
"firebase",
|
|
61
62
|
"@capacitor/cli",
|
|
@@ -64,6 +65,27 @@ const MOBILE_RUNTIME_PACKAGES = [
|
|
|
64
65
|
"@capacitor/android",
|
|
65
66
|
"@capacitor/assets",
|
|
66
67
|
] as const;
|
|
68
|
+
// Capacitor plugins that must be declared in the *app's* package.json (apps/<app>/package.json).
|
|
69
|
+
// `npx cap sync` discovers plugins by scanning the app directory's dependencies and registers their
|
|
70
|
+
// native code into the iOS/Android projects; packages present only in the workspace root are never
|
|
71
|
+
// registered, so the JS bridge throws `Capacitor plugin "Device" is not available.` at runtime.
|
|
72
|
+
// These are added on start-ios / start-android with a "*" range, letting bun resolve them to the
|
|
73
|
+
// version already hoisted at the workspace root instead of pinning a second source of truth.
|
|
74
|
+
const MOBILE_APP_CAPACITOR_PLUGINS = [
|
|
75
|
+
"@capacitor-community/fcm",
|
|
76
|
+
"@capacitor/app",
|
|
77
|
+
"@capacitor/browser",
|
|
78
|
+
"@capacitor/camera",
|
|
79
|
+
"@capacitor/core",
|
|
80
|
+
"@capacitor/device",
|
|
81
|
+
"@capacitor/geolocation",
|
|
82
|
+
"@capacitor/haptics",
|
|
83
|
+
"@capacitor/inappbrowser",
|
|
84
|
+
"@capacitor/keyboard",
|
|
85
|
+
"@capacitor/preferences",
|
|
86
|
+
"@capacitor/push-notifications",
|
|
87
|
+
"capacitor-plugin-safe-area",
|
|
88
|
+
] as const;
|
|
67
89
|
const DATABASE_MODE_RUNTIME_PACKAGES = {
|
|
68
90
|
single: [],
|
|
69
91
|
multiple: ["@libsql/client", "bullmq", "ioredis", "protobufjs"],
|
|
@@ -406,6 +428,9 @@ CMD [${command.map((c) => `"${c}"`).join(",")}]`;
|
|
|
406
428
|
getMissingMobileDependencySpecs() {
|
|
407
429
|
return this.#getMissingDependencySpecs(this.getMobileRuntimePackages());
|
|
408
430
|
}
|
|
431
|
+
getMobileAppCapacitorPlugins() {
|
|
432
|
+
return [...MOBILE_APP_CAPACITOR_PLUGINS];
|
|
433
|
+
}
|
|
409
434
|
#getMissingDependencySpecs(libs: readonly string[]) {
|
|
410
435
|
const rootDependencies = {
|
|
411
436
|
...this.rootPackageJson.dependencies,
|
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.5",
|
|
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.5",
|
|
36
36
|
"chalk": "^5.6.2",
|
|
37
37
|
"commander": "^14.0.3",
|
|
38
38
|
"daisyui": "5.5.23",
|