@better-update/cli 0.35.0 → 0.35.1

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/index.mjs CHANGED
@@ -18,7 +18,7 @@ import { createServer } from "node:http";
18
18
  import { maxBy, uniqBy } from "es-toolkit";
19
19
  import forge from "node-forge";
20
20
  import { AndroidConfig } from "@expo/config-plugins";
21
- import plist from "@expo/plist";
21
+ import plistMod from "@expo/plist";
22
22
  import { spawn as spawn$1 } from "node-pty";
23
23
  import chalk from "chalk";
24
24
  import os, { tmpdir } from "node:os";
@@ -35,7 +35,7 @@ var __require = /* @__PURE__ */ createRequire(import.meta.url);
35
35
 
36
36
  //#endregion
37
37
  //#region package.json
38
- var version = "0.35.0";
38
+ var version = "0.35.1";
39
39
 
40
40
  //#endregion
41
41
  //#region src/lib/interactive-mode.ts
@@ -20004,6 +20004,32 @@ const loadLocalAndroidCredentials = (options) => Effect.gen(function* () {
20004
20004
  };
20005
20005
  });
20006
20006
 
20007
+ //#endregion
20008
+ //#region src/lib/plist.ts
20009
+ const plist = typeof plistMod.parse === "function" ? plistMod : plistMod.default;
20010
+ /**
20011
+ * Parse an XML plist string into a typed object.
20012
+ * Throws on malformed XML — callers should wrap in Effect.try.
20013
+ */
20014
+ const parsePlistXml = (xml) => plist.parse(xml);
20015
+ /**
20016
+ * Serialize an object into XML plist text.
20017
+ */
20018
+ const buildPlistXml = (value) => plist.build(value);
20019
+ /**
20020
+ * Parse a binary plist buffer into a typed object.
20021
+ * Uses bplist-parser for Apple's binary plist format.
20022
+ */
20023
+ const parsePlistBinary = (buffer) => {
20024
+ const [result] = __require("bplist-parser").parseBuffer(buffer);
20025
+ return result;
20026
+ };
20027
+ const BPLIST_MAGIC = Buffer.from("bplist00");
20028
+ /**
20029
+ * Auto-detect plist format (binary vs XML) and parse accordingly.
20030
+ */
20031
+ const parsePlist = (data) => data.subarray(0, 8).equals(BPLIST_MAGIC) ? parsePlistBinary(data) : parsePlistXml(data.toString("utf8"));
20032
+
20007
20033
  //#endregion
20008
20034
  //#region src/lib/update-channel-native.ts
20009
20035
  /**
@@ -20092,15 +20118,14 @@ const setIosUpdateChannel = (params) => Effect.gen(function* () {
20092
20118
  });
20093
20119
  const content = yield* fs.readFileString(plistPath).pipe(Effect.mapError(failure));
20094
20120
  const parsed = yield* Effect.try({
20095
- try: () => plist.parse(content),
20121
+ try: () => parsePlistXml(content),
20096
20122
  catch: failure
20097
20123
  });
20098
20124
  if (!isRecord$1(parsed)) return yield* failure("Expo.plist is not a plist dictionary.");
20099
- const next = {
20125
+ const rendered = buildPlistXml({
20100
20126
  ...parsed,
20101
20127
  [IOS_REQUEST_HEADERS_PLIST_KEY]: withChannelHeader(parsed[IOS_REQUEST_HEADERS_PLIST_KEY], params.channel)
20102
- };
20103
- const rendered = plist.build(next);
20128
+ });
20104
20129
  yield* fs.writeFileString(plistPath, `${rendered}\n`).pipe(Effect.mapError(failure));
20105
20130
  });
20106
20131
 
@@ -21313,28 +21338,6 @@ const acquireKeychain = ({ tempDir, p12Path, p12Password }) => {
21313
21338
  })).pipe(Effect.map(({ handle }) => handle));
21314
21339
  };
21315
21340
 
21316
- //#endregion
21317
- //#region src/lib/plist.ts
21318
- const plist$1 = typeof plist.parse === "function" ? plist : plist.default;
21319
- /**
21320
- * Parse an XML plist string into a typed object.
21321
- * Throws on malformed XML — callers should wrap in Effect.try.
21322
- */
21323
- const parsePlistXml = (xml) => plist$1.parse(xml);
21324
- /**
21325
- * Parse a binary plist buffer into a typed object.
21326
- * Uses bplist-parser for Apple's binary plist format.
21327
- */
21328
- const parsePlistBinary = (buffer) => {
21329
- const [result] = __require("bplist-parser").parseBuffer(buffer);
21330
- return result;
21331
- };
21332
- const BPLIST_MAGIC = Buffer.from("bplist00");
21333
- /**
21334
- * Auto-detect plist format (binary vs XML) and parse accordingly.
21335
- */
21336
- const parsePlist = (data) => data.subarray(0, 8).equals(BPLIST_MAGIC) ? parsePlistBinary(data) : parsePlistXml(data.toString("utf8"));
21337
-
21338
21341
  //#endregion
21339
21342
  //#region src/lib/ios-provisioning.ts
21340
21343
  const getString = (obj, key) => {