@akanjs/devkit 3.4.0-rc.2 → 3.4.0-rc.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.
@@ -3,6 +3,15 @@ import fs from "node:fs";
3
3
  import os from "node:os";
4
4
  import path from "node:path";
5
5
  import { fileURLToPath } from "node:url";
6
+ import type {
7
+ AkanNativeAndroidConfig,
8
+ AkanNativeDeepLinks,
9
+ AkanNativeDesktopConfig,
10
+ AkanNativeDesktopServerConfig,
11
+ AkanNativeDmgConfig,
12
+ AkanNativeIosConfig,
13
+ AkanNativeSettings,
14
+ } from "akanjs";
6
15
  import { AppExecutor, WorkspaceExecutor } from "../executors";
7
16
  import { NativeConfig } from "../mobile/nativeConfig";
8
17
  import type { PackageJson } from "../workspace/types";
@@ -20,8 +29,11 @@ import {
20
29
  dockerfileSections,
21
30
  dockerProfilesOf,
22
31
  } from "./dockerImage";
32
+ import type { nativeKeys } from "./nativeKeys";
23
33
  import type { LibConfigInput } from "./types";
24
34
 
35
+ type Unlisted<T, K extends readonly string[]> = Exclude<keyof T & string, K[number]>;
36
+
25
37
  const akanPackageJson = JSON.parse(
26
38
  fs.readFileSync(path.join(path.dirname(fileURLToPath(import.meta.url)), "../../../akanjs/package.json"), "utf8"),
27
39
  ) as PackageJson;
@@ -1198,6 +1210,31 @@ describe("AkanAppConfig", () => {
1198
1210
  ).not.toThrow();
1199
1211
  });
1200
1212
 
1213
+ test("the key check knows every setting the native config types declare", () => {
1214
+ const unlisted: [
1215
+ Unlisted<AkanNativeSettings, typeof nativeKeys.native>,
1216
+ Unlisted<AkanNativeIosConfig, typeof nativeKeys.ios>,
1217
+ Unlisted<AkanNativeAndroidConfig, typeof nativeKeys.android>,
1218
+ Unlisted<AkanNativeDesktopConfig, typeof nativeKeys.desktop>,
1219
+ Unlisted<AkanNativeDesktopServerConfig, typeof nativeKeys.desktopServer>,
1220
+ Unlisted<AkanNativeDmgConfig, typeof nativeKeys.dmg>,
1221
+ Unlisted<AkanNativeDeepLinks, typeof nativeKeys.deepLinks>,
1222
+ ] extends [never, never, never, never, never, never, never]
1223
+ ? "none"
1224
+ : "some" = "none";
1225
+ expect(unlisted).toBe("none");
1226
+
1227
+ const infoPlist = { NSCameraUsageDescription: "화상 회의에 카메라를 씁니다." };
1228
+ const config = new AkanAppConfig(
1229
+ app,
1230
+ [],
1231
+ packageJson,
1232
+ { native: { targets: { desk: { desktop: { infoPlist } } } } } as never,
1233
+ baseDevEnv,
1234
+ );
1235
+ expect(config.native.targets.desk?.desktop?.infoPlist).toEqual(infoPlist);
1236
+ });
1237
+
1201
1238
  test("derives a repo-scoped default appId and records an explicit native section", () => {
1202
1239
  const withoutNative = new AkanAppConfig(app, [], packageJson, {}, baseDevEnv);
1203
1240
  expect(withoutNative.native.appId).toBe("com.akanjs.portal");
@@ -42,6 +42,7 @@ export const nativeKeys = {
42
42
  "webview2",
43
43
  "publisher",
44
44
  "entitlements",
45
+ "infoPlist",
45
46
  "dmg",
46
47
  "externalView",
47
48
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akanjs/devkit",
3
- "version": "3.4.0-rc.2",
3
+ "version": "3.4.0-rc.3",
4
4
  "sourceType": "module",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -52,10 +52,10 @@
52
52
  "./workspace/getRelatedCnsts": "./workspace/getRelatedCnsts.ts"
53
53
  },
54
54
  "dependencies": {
55
- "@akanjs/language": "3.4.0-rc.2",
55
+ "@akanjs/language": "3.4.0-rc.3",
56
56
  "@inquirer/prompts": "^8.7.3",
57
57
  "@tailwindcss/node": "^4.3.3",
58
- "akanjs": "3.4.0-rc.2",
58
+ "akanjs": "3.4.0-rc.3",
59
59
  "chalk": "^6.0.1",
60
60
  "commander": "^15.0.0",
61
61
  "dayjs": "^1.11.23",