craft-native 0.0.121 → 0.0.122

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/dist/cli.js CHANGED
@@ -3303,7 +3303,7 @@ function pinCraftNativeDependency(packagePath, craftVersion) {
3303
3303
  `);
3304
3304
  }
3305
3305
  // package.json
3306
- var version = "0.0.121";
3306
+ var version = "0.0.122";
3307
3307
 
3308
3308
  // bin/cli.ts
3309
3309
  var spawnedFrom = process6.env[CRAFT_CLI_SPAWN_MARKER];
package/dist/index.cjs CHANGED
@@ -310,7 +310,7 @@ function craftBinaryNotFoundMessage(triedPath) {
310
310
  `);
311
311
  }
312
312
  // package.json
313
- var version = "0.0.121";
313
+ var version = "0.0.122";
314
314
 
315
315
  // src/sdk-version.ts
316
316
  var SDK_VERSION = version;
package/dist/index.js CHANGED
@@ -58,7 +58,7 @@ function craftBinaryNotFoundMessage(triedPath) {
58
58
  `);
59
59
  }
60
60
  // package.json
61
- var version = "0.0.121";
61
+ var version = "0.0.122";
62
62
 
63
63
  // src/sdk-version.ts
64
64
  var SDK_VERSION = version;
@@ -79,6 +79,18 @@ function renderAppearance(config) {
79
79
  return { interfaceStyle: "Light", statusBarStyle: "UIStatusBarStyleDarkContent" };
80
80
  return { interfaceStyle: "Dark", statusBarStyle: "UIStatusBarStyleLightContent" };
81
81
  }
82
+ var LINKED_PURPOSES = {
83
+ NSSpeechRecognitionUsageDescription: "speech recognition",
84
+ NSMicrophoneUsageDescription: "the microphone",
85
+ NSCameraUsageDescription: "the camera",
86
+ NSPhotoLibraryUsageDescription: "your photo library",
87
+ NSLocationWhenInUseUsageDescription: "your location",
88
+ NSContactsUsageDescription: "your contacts",
89
+ NSCalendarsUsageDescription: "your calendar",
90
+ NSBluetoothAlwaysUsageDescription: "Bluetooth",
91
+ NSMotionUsageDescription: "motion data",
92
+ NSFaceIDUsageDescription: "Face ID"
93
+ };
82
94
  function renderUsageDescriptions(config) {
83
95
  const entries = [
84
96
  [config.enableSpeechRecognition, "NSSpeechRecognitionUsageDescription", `${config.appName} uses speech recognition for voice input.`],
@@ -97,7 +109,12 @@ function renderUsageDescriptions(config) {
97
109
  [config.enableHealthKit, "NSHealthUpdateUsageDescription", `${config.appName} writes health data only with your permission.`],
98
110
  [config.enableBiometric, "NSFaceIDUsageDescription", `${config.appName} uses Face ID to protect your account.`]
99
111
  ];
100
- return entries.filter(([enabled]) => enabled).map(([, key, value]) => plistString(key, value)).join(`
112
+ return entries.map(([enabled, key, value]) => {
113
+ if (enabled)
114
+ return [key, value];
115
+ const linked = LINKED_PURPOSES[key];
116
+ return linked ? [key, `${config.appName} asks for ${linked} only in a feature that needs it.`] : null;
117
+ }).filter((entry) => entry !== null).map(([key, value]) => plistString(key, value)).join(`
101
118
  `);
102
119
  }
103
120
  function renderOrientations(config) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "craft-native",
3
- "version": "0.0.121",
3
+ "version": "0.0.122",
4
4
  "type": "module",
5
5
  "description": "Build desktop apps with web languages - TypeScript SDK for Craft",
6
6
  "author": "Chris Breuer <chris@stacksjs.org>",