@daemux/store-automator 0.10.84 → 0.10.85

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.
@@ -5,14 +5,14 @@
5
5
  },
6
6
  "metadata": {
7
7
  "description": "App Store & Google Play automation for Flutter apps",
8
- "version": "0.10.84"
8
+ "version": "0.10.85"
9
9
  },
10
10
  "plugins": [
11
11
  {
12
12
  "name": "store-automator",
13
13
  "source": "./plugins/store-automator",
14
14
  "description": "3 agents for app store publishing: reviewer, meta-creator, media-designer",
15
- "version": "0.10.84",
15
+ "version": "0.10.85",
16
16
  "keywords": [
17
17
  "flutter",
18
18
  "app-store",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daemux/store-automator",
3
- "version": "0.10.84",
3
+ "version": "0.10.85",
4
4
  "description": "Full App Store & Google Play automation for Flutter apps with Claude Code agents",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "store-automator",
3
- "version": "0.10.84",
3
+ "version": "0.10.85",
4
4
  "description": "App Store & Google Play automation agents for Flutter app publishing",
5
5
  "author": {
6
6
  "name": "Daemux"
@@ -11,8 +11,12 @@ REST API (no fastlane dependency here):
11
11
  * Skips the first release (1.0 / 1.0.0 / 0.0 / 0.0.0) -- there are no prior
12
12
  release notes to announce.
13
13
  * Skips when the slot is not in a state that permits editing whatsNew.
14
- * Either PATCHes the existing localization for the requested locale or POSTs
15
- a new one pointing at the appStoreVersion.
14
+ * PATCHes whatsNew on EVERY appStoreVersionLocalization entry with the
15
+ same text. gowalk-step's set_changelog iterates every localization
16
+ (not just the default one) so users in every language see the release
17
+ notes rather than an empty "What's New" section when their locale
18
+ isn't en-US. If no localizations exist yet (brand-new version slot),
19
+ POST a single one for APP_STORE_LOCALE (default en-US) as a seed.
16
20
 
17
21
  Non-fatal by design: any failure is reported as a ::warning:: and the action
18
22
  continues. The TestFlight upload itself has already succeeded by this point.
@@ -27,7 +31,11 @@ Environment:
27
31
  multi-line content)
28
32
  APP_STORE_WHATS_NEW -- release notes text (fallback when
29
33
  _FILE is unset / unreadable)
30
- APP_STORE_LOCALE -- locale code, default "en-US"
34
+ APP_STORE_LOCALE -- locale to seed when no
35
+ localizations exist; default
36
+ "en-US". Ignored when
37
+ localizations already exist --
38
+ every existing locale is updated.
31
39
  """
32
40
 
33
41
  from __future__ import annotations
@@ -127,6 +135,41 @@ def _read_whats_new() -> tuple[str, str]:
127
135
  return "", "<empty>"
128
136
 
129
137
 
138
+ def _update_all_localizations(
139
+ token: str, version_id: str, version: str, whats_new: str, seed_locale: str
140
+ ) -> int:
141
+ """PATCH whatsNew on every existing localization. If none exist, POST a
142
+ single seed localization in `seed_locale`. Returns the count of
143
+ localizations written."""
144
+ locs = get_json(
145
+ f"/appStoreVersions/{version_id}/appStoreVersionLocalizations", token
146
+ )
147
+ entries = locs.get("data") or []
148
+
149
+ if not entries:
150
+ new_id = _create_localization(token, version_id, seed_locale, whats_new)
151
+ _log(
152
+ f"CREATEd appStoreVersionLocalization {new_id} whatsNew for "
153
+ f"{version} ({seed_locale}) -- no prior localizations"
154
+ )
155
+ return 1
156
+
157
+ count = 0
158
+ for item in entries:
159
+ loc_id = item.get("id") or ""
160
+ loc = (item.get("attributes") or {}).get("locale") or "?"
161
+ if not loc_id:
162
+ _warn(f"skipping localization without id: {item!r}")
163
+ continue
164
+ _patch_localization(token, loc_id, whats_new)
165
+ _log(
166
+ f"PATCHed appStoreVersionLocalization {loc_id} whatsNew "
167
+ f"for {version} ({loc})"
168
+ )
169
+ count += 1
170
+ return count
171
+
172
+
130
173
  def main() -> int:
131
174
  whats_new, source = _read_whats_new()
132
175
  _log(
@@ -139,7 +182,7 @@ def main() -> int:
139
182
 
140
183
  version = _require_env("MARKETING_VERSION")
141
184
  version_id = _require_env("APP_STORE_VERSION_ID")
142
- locale = os.environ.get("APP_STORE_LOCALE", "").strip() or "en-US"
185
+ seed_locale = os.environ.get("APP_STORE_LOCALE", "").strip() or "en-US"
143
186
 
144
187
  if version in SKIP_VERSIONS:
145
188
  _log(f"Skipping whatsNew for first release {version}.")
@@ -160,30 +203,10 @@ def main() -> int:
160
203
  )
161
204
  return 0
162
205
 
163
- locs = get_json(
164
- f"/appStoreVersions/{version_id}/appStoreVersionLocalizations", token
206
+ count = _update_all_localizations(
207
+ token, version_id, version, whats_new, seed_locale
165
208
  )
166
- existing = next(
167
- (
168
- item
169
- for item in (locs.get("data") or [])
170
- if (item.get("attributes") or {}).get("locale") == locale
171
- ),
172
- None,
173
- )
174
-
175
- if existing:
176
- _patch_localization(token, existing["id"], whats_new)
177
- _log(
178
- f"PATCHed appStoreVersionLocalization {existing['id']} whatsNew "
179
- f"for {version} ({locale})"
180
- )
181
- else:
182
- new_id = _create_localization(token, version_id, locale, whats_new)
183
- _log(
184
- f"CREATEd appStoreVersionLocalization {new_id} whatsNew for "
185
- f"{version} ({locale})"
186
- )
209
+ _log(f"whatsNew set for {count} localizations on {version}")
187
210
  return 0
188
211
 
189
212