@bacons/apple-targets 3.0.5 → 3.0.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.
Files changed (30) hide show
  1. package/README.md +5 -1
  2. package/build/colorset/{withIosColorset.js → with-ios-colorset.js} +2 -2
  3. package/build/config-plugin.js +9 -10
  4. package/build/config.d.ts +0 -2
  5. package/build/{withXcodeChanges.d.ts → configuration-list.d.ts} +2 -2
  6. package/build/configuration-list.js +656 -0
  7. package/build/target.d.ts +473 -2
  8. package/build/target.js +281 -239
  9. package/build/util.d.ts +18 -0
  10. package/build/util.js +48 -0
  11. package/build/{withXcparse.js → with-bacons-xcode.js} +5 -2
  12. package/build/{withEasCredentials.js → with-eas-credentials.js} +2 -2
  13. package/build/{withWidget.js → with-widget.js} +24 -65
  14. package/build/with-xcode-changes.d.ts +3 -0
  15. package/build/with-xcode-changes.js +397 -0
  16. package/package.json +7 -2
  17. package/build/template/XCBuildConfiguration.json +0 -759
  18. package/build/withXcodeChanges.js +0 -1039
  19. /package/build/colorset/{customColorFromCSS.d.ts → custom-color-from-css.d.ts} +0 -0
  20. /package/build/colorset/{customColorFromCSS.js → custom-color-from-css.js} +0 -0
  21. /package/build/colorset/{withIosColorset.d.ts → with-ios-colorset.d.ts} +0 -0
  22. /package/build/icon/{withImageAsset.d.ts → with-image-asset.d.ts} +0 -0
  23. /package/build/icon/{withImageAsset.js → with-image-asset.js} +0 -0
  24. /package/build/icon/{withIosIcon.d.ts → with-ios-icon.d.ts} +0 -0
  25. /package/build/icon/{withIosIcon.js → with-ios-icon.js} +0 -0
  26. /package/build/{withXcparse.d.ts → with-bacons-xcode.d.ts} +0 -0
  27. /package/build/{withEasCredentials.d.ts → with-eas-credentials.d.ts} +0 -0
  28. /package/build/{withPodTargetExtension.d.ts → with-pod-target-extension.d.ts} +0 -0
  29. /package/build/{withPodTargetExtension.js → with-pod-target-extension.js} +0 -0
  30. /package/build/{withWidget.d.ts → with-widget.d.ts} +0 -0
package/README.md CHANGED
@@ -304,7 +304,11 @@ Ideally, this would be generated automatically based on a fully qualified Xcode
304
304
  | location-push | Location Push Service Extension |
305
305
  | credentials-provider | Credentials Provider Extension |
306
306
  | account-auth | Account Authentication Extension |
307
- | device-activity-monitor | Device Activity Monitor Extension |
307
+ | network-packet-tunnel | Packet Tunnel Network Extension |
308
+ | network-app-proxy | App Proxy Network Extension |
309
+ | network-dns-proxy | DNS Proxy Network Extension |
310
+ | network-filter-data | Filter Data Network Extension |
311
+
308
312
 
309
313
  <!-- | imessage | iMessage Extension | -->
310
314
 
@@ -7,7 +7,7 @@ exports.setColorAsync = exports.withIosColorset = void 0;
7
7
  const config_plugins_1 = require("expo/config-plugins");
8
8
  const node_fs_1 = __importDefault(require("node:fs"));
9
9
  const node_path_1 = __importDefault(require("node:path"));
10
- const customColorFromCSS_1 = require("./customColorFromCSS");
10
+ const custom_color_from_css_1 = require("./custom-color-from-css");
11
11
  const withIosColorset = (config, { cwd, color, darkColor, name }) => {
12
12
  return (0, config_plugins_1.withDangerousMod)(config, [
13
13
  "ios",
@@ -25,7 +25,7 @@ const DARK_APPEARANCE = {
25
25
  function createColor(color) {
26
26
  return {
27
27
  "color-space": "display-p3",
28
- components: (0, customColorFromCSS_1.customColorFromCSS)(color),
28
+ components: (0, custom_color_from_css_1.customColorFromCSS)(color),
29
29
  };
30
30
  }
31
31
  async function setColorAsync({ color, darkColor }, colorsetFilePath) {
@@ -7,18 +7,17 @@ exports.withTargetsDir = void 0;
7
7
  const glob_1 = require("glob");
8
8
  const path_1 = __importDefault(require("path"));
9
9
  const chalk_1 = __importDefault(require("chalk"));
10
- const withPodTargetExtension_1 = require("./withPodTargetExtension");
11
- const withWidget_1 = __importDefault(require("./withWidget"));
12
- const withXcparse_1 = require("./withXcparse");
13
- let hasWarned = false;
10
+ const with_pod_target_extension_1 = require("./with-pod-target-extension");
11
+ const with_widget_1 = __importDefault(require("./with-widget"));
12
+ const with_bacons_xcode_1 = require("./with-bacons-xcode");
13
+ const util_1 = require("./util");
14
14
  const withTargetsDir = (config, _props) => {
15
15
  var _a;
16
16
  let { appleTeamId = (_a = config === null || config === void 0 ? void 0 : config.ios) === null || _a === void 0 ? void 0 : _a.appleTeamId } = _props || {};
17
17
  const { root = "./targets", match = "*" } = _props || {};
18
18
  const projectRoot = config._internal.projectRoot;
19
- if (!appleTeamId && !hasWarned) {
20
- hasWarned = true;
21
- console.warn((0, chalk_1.default) `{yellow [bacons/apple-targets]} Expo config is missing required {cyan ios.appleTeamId} property. Find this in Xcode and add to the Expo Config to correct. iOS builds may fail until this is corrected.`);
19
+ if (!appleTeamId) {
20
+ (0, util_1.warnOnce)((0, chalk_1.default) `{yellow [bacons/apple-targets]} Expo config is missing required {cyan ios.appleTeamId} property. Find this in Xcode and add to the Expo Config to correct. iOS builds may fail until this is corrected.`);
22
21
  }
23
22
  const targets = (0, glob_1.globSync)(`${root}/${match}/expo-target.config.@(json|js)`, {
24
23
  // const targets = globSync(`./targets/action/expo-target.config.@(json|js)`, {
@@ -41,15 +40,15 @@ const withTargetsDir = (config, _props) => {
41
40
  if (!evaluatedTargetConfigObject.type) {
42
41
  throw new Error(`Expected target config to have a 'type' property denoting the type of target it is, e.g. 'widget'`);
43
42
  }
44
- config = (0, withWidget_1.default)(config, {
43
+ config = (0, with_widget_1.default)(config, {
45
44
  appleTeamId,
46
45
  ...evaluatedTargetConfigObject,
47
46
  directory: path_1.default.relative(projectRoot, path_1.default.dirname(configPath)),
48
47
  configPath,
49
48
  });
50
49
  });
51
- (0, withPodTargetExtension_1.withPodTargetExtension)(config);
52
- (0, withXcparse_1.withXcodeProjectBetaBaseMod)(config);
50
+ (0, with_pod_target_extension_1.withPodTargetExtension)(config);
51
+ (0, with_bacons_xcode_1.withXcodeProjectBetaBaseMod)(config);
53
52
  return config;
54
53
  };
55
54
  exports.withTargetsDir = withTargetsDir;
package/build/config.d.ts CHANGED
@@ -78,8 +78,6 @@ export type Config = {
78
78
  bundleIdentifier?: string;
79
79
  /**
80
80
  * A local file path or URL to an image asset.
81
- * @example "./assets/icon.png"
82
- * @example "https://example.com/icon.png"
83
81
  */
84
82
  icon?: string;
85
83
  /**
@@ -1,4 +1,4 @@
1
- import { ConfigPlugin } from "@expo/config-plugins";
1
+ import { XCConfigurationList, XcodeProject } from "@bacons/xcode";
2
2
  import { ExtensionType } from "./target";
3
3
  export type XcodeSettings = {
4
4
  name: string;
@@ -24,4 +24,4 @@ export type XcodeSettings = {
24
24
  deviceFamilies?: DeviceFamily[];
25
25
  };
26
26
  export type DeviceFamily = "phone" | "tablet";
27
- export declare const withXcodeChanges: ConfigPlugin<XcodeSettings>;
27
+ export declare function createConfigurationListForType(project: XcodeProject, props: XcodeSettings): XCConfigurationList;