vydanne 0.14.0 → 0.14.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vydanne",
3
- "version": "0.14.0",
3
+ "version": "0.14.1",
4
4
  "description": "App Store Connect + Google Play submission prep — the companion to zdymak (media). Native Node (no fastlane/Ruby/Python): localized listings, screenshot/preview/icon upload, ratings, review contact, accessibility & privacy labels, IAP, export docs, build upload to TestFlight / a Play closed track, a diff of local-vs-store, and a preflight verifier that encodes the store gotchas. Never submits for review. iOS/macOS via the ASC REST API; Android via the Play Developer Edits API (--store google).",
5
5
  "keywords": [
6
6
  "app-store-connect",
@@ -54,10 +54,19 @@ async function versionsFor(client, platform) {
54
54
  return json.data || [];
55
55
  }
56
56
 
57
- /** The newest build, together with the marketing version its archive declares. */
58
- async function newestBuildWithVersion(client) {
57
+ /**
58
+ * The newest build FOR THIS PLATFORM, together with the marketing version its archive declares.
59
+ *
60
+ * Filtered by platform, which it was not: an app shipping on iOS and the Mac App Store uploads a build
61
+ * to each, and the unfiltered query returned whichever went up last. Preparing MAC_OS then tried to
62
+ * attach an iOS build and Apple answered 409 — so the Mac version was left holding nothing, or an older
63
+ * build, purely because the iOS one was newer. The 409 made it visible; a same-platform mix-up would
64
+ * not have been.
65
+ */
66
+ async function newestBuildWithVersion(client, platform) {
59
67
  const { json } = await client.get(
60
68
  `/v1/builds?filter[app]=${client.appId}&sort=-uploadedDate&limit=1` +
69
+ (platform ? `&filter[preReleaseVersion.platform]=${platform}` : "") +
61
70
  `&fields[builds]=version,processingState&include=preReleaseVersion` +
62
71
  `&fields[preReleaseVersions]=version`,
63
72
  );
@@ -218,7 +227,7 @@ export async function run(config, client) {
218
227
  async function prepareOne(config, client, platform) {
219
228
  console.log(green(`prepare → App Store version (${platform})`));
220
229
 
221
- const { build, marketing } = await newestBuildWithVersion(client);
230
+ const { build, marketing } = await newestBuildWithVersion(client, platform);
222
231
  const target = process.env.VYDANNE_VERSION || marketing;
223
232
 
224
233
  if (!target) {
@@ -56,7 +56,12 @@ export async function run(config, client) {
56
56
  console.log(" no versions on this app");
57
57
  return true;
58
58
  }
59
- const version = mine[0];
59
+ // Pick the version that is ACTUALLY in review, not merely the first one Apple returned. An app on two
60
+ // platforms has two 1.2 records, and `mine[0]` was whichever came back first: with iOS
61
+ // WAITING_FOR_REVIEW and macOS PREPARE_FOR_SUBMISSION, this reported "not submitted — nothing to
62
+ // withdraw" and exited 0, never looking at the submission it was asked to cancel. Silence is the worst
63
+ // possible answer here, because the operator walks away believing the withdrawal happened.
64
+ const version = mine.find((v) => WITHDRAWABLE[v.attributes.appStoreState]) || mine[0];
60
65
  const state = version.attributes.appStoreState;
61
66
  const label = `${version.attributes.versionString} (${state})`;
62
67