storemeta 0.1.0

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 (92) hide show
  1. package/.env.release.example +8 -0
  2. package/LICENSE +21 -0
  3. package/README.md +94 -0
  4. package/dist/auth/apple/credential-state.js +14 -0
  5. package/dist/auth/apple/jwt.js +56 -0
  6. package/dist/auth/apple/load-credentials.js +36 -0
  7. package/dist/auth/credential-state.js +6 -0
  8. package/dist/auth/google/credential-state.js +10 -0
  9. package/dist/auth/google/load-credentials.js +18 -0
  10. package/dist/auth/google/service-account-auth.js +25 -0
  11. package/dist/auth/redact.js +17 -0
  12. package/dist/cli/auth-check.js +46 -0
  13. package/dist/cli/config-doctor.js +40 -0
  14. package/dist/cli/context.js +23 -0
  15. package/dist/cli/errors.js +10 -0
  16. package/dist/cli/exit-code.js +6 -0
  17. package/dist/cli/init.js +60 -0
  18. package/dist/cli/locales-list.js +37 -0
  19. package/dist/cli/metadata-diff.js +57 -0
  20. package/dist/cli/metadata-pull.js +52 -0
  21. package/dist/cli/metadata-push.js +95 -0
  22. package/dist/cli/render.js +57 -0
  23. package/dist/cli/result-types.js +1 -0
  24. package/dist/cli/scaffold.js +76 -0
  25. package/dist/cli/screenshots-diff.js +65 -0
  26. package/dist/cli/screenshots-pull.js +72 -0
  27. package/dist/cli/screenshots-push.js +96 -0
  28. package/dist/cli/validate.js +74 -0
  29. package/dist/cli.js +222 -0
  30. package/dist/config/apps.js +21 -0
  31. package/dist/config/load-config.js +30 -0
  32. package/dist/config/schema.js +97 -0
  33. package/dist/config/select-app.js +10 -0
  34. package/dist/config/select-platforms.js +17 -0
  35. package/dist/config/single-app.js +16 -0
  36. package/dist/config/types.js +1 -0
  37. package/dist/config/validate-base-dirs.js +33 -0
  38. package/dist/config/validate-credential-env-names.js +32 -0
  39. package/dist/config/validate-platform-identifiers.js +24 -0
  40. package/dist/formats/load-metadata.js +38 -0
  41. package/dist/formats/metadata-types.js +1 -0
  42. package/dist/formats/screenshot-types.js +1 -0
  43. package/dist/formats/serialize-metadata.js +20 -0
  44. package/dist/locales/groups.js +12 -0
  45. package/dist/locales/map.js +15 -0
  46. package/dist/locales/normalize.js +22 -0
  47. package/dist/locales/types.js +1 -0
  48. package/dist/locales/validate-groups.js +14 -0
  49. package/dist/platforms/apple/client.js +109 -0
  50. package/dist/platforms/apple/metadata/pull.js +120 -0
  51. package/dist/platforms/apple/metadata/push.js +272 -0
  52. package/dist/platforms/apple/metadata/types.js +1 -0
  53. package/dist/platforms/apple/screenshots/pull.js +160 -0
  54. package/dist/platforms/apple/screenshots/push.js +418 -0
  55. package/dist/platforms/google/client.js +42 -0
  56. package/dist/platforms/google/edits.js +38 -0
  57. package/dist/platforms/google/metadata/pull.js +23 -0
  58. package/dist/platforms/google/metadata/push.js +73 -0
  59. package/dist/platforms/google/metadata/types.js +1 -0
  60. package/dist/platforms/google/screenshots/pull.js +129 -0
  61. package/dist/platforms/google/screenshots/push.js +252 -0
  62. package/dist/platforms/google/screenshots/types.js +7 -0
  63. package/dist/validation/metadata/apple.js +31 -0
  64. package/dist/validation/metadata/files.js +58 -0
  65. package/dist/validation/metadata/google.js +46 -0
  66. package/dist/validation/screenshots/extensions.js +17 -0
  67. package/dist/validation/screenshots/files.js +55 -0
  68. package/dist/validation/screenshots/folders.js +41 -0
  69. package/dist/validation/screenshots/order.js +25 -0
  70. package/dist/writers/ensure-directory.js +16 -0
  71. package/dist/writers/order-screenshots.js +19 -0
  72. package/dist/writers/resolve-screenshot-path.js +8 -0
  73. package/dist/writers/resolve-within-base-dir.js +17 -0
  74. package/dist/writers/write-metadata.js +17 -0
  75. package/docs/API_EDITABLE_METADATA_SURFACE.md +319 -0
  76. package/docs/AUTH_SETUP.md +67 -0
  77. package/docs/DOCUMENTATION.md +285 -0
  78. package/docs/PROJECT_PLAN.md +687 -0
  79. package/docs/RELEASE_VERIFICATION.md +70 -0
  80. package/docs/TODO.md +308 -0
  81. package/examples/README.md +8 -0
  82. package/examples/metadata/apple/en-US.yml +11 -0
  83. package/examples/metadata/apple/tr.yml +11 -0
  84. package/examples/metadata/google/en-US.yml +6 -0
  85. package/examples/metadata/google/tr.yml +6 -0
  86. package/examples/screenshots/apple/en-US/APP_IPHONE_65/1.png +1 -0
  87. package/examples/screenshots/apple/tr/APP_IPHONE_65/1.png +1 -0
  88. package/examples/screenshots/google/en-US/phoneScreenshots/1.png +1 -0
  89. package/examples/screenshots/google/tr/phoneScreenshots/1.png +1 -0
  90. package/examples/storemeta.yml +29 -0
  91. package/package.json +55 -0
  92. package/storemeta.release.example.yml +27 -0
@@ -0,0 +1,285 @@
1
+ # storemeta Documentation
2
+
3
+ `storemeta` is a Node.js CLI for managing App Store Connect and Google Play metadata and screenshots from a local project layout.
4
+
5
+ ## Requirements
6
+
7
+ - Node.js 20 or newer
8
+ - npm
9
+ - App Store Connect API credentials for Apple operations
10
+ - Google Play service account credentials for Google operations
11
+
12
+ ## Commands
13
+
14
+ ```text
15
+ storemeta init
16
+ storemeta validate
17
+ storemeta auth check
18
+ storemeta config doctor
19
+ storemeta locales list
20
+ storemeta scaffold
21
+ storemeta metadata pull
22
+ storemeta metadata push
23
+ storemeta metadata diff
24
+ storemeta screenshots pull
25
+ storemeta screenshots push
26
+ storemeta screenshots diff
27
+ ```
28
+
29
+ Global options:
30
+
31
+ - `--config <path>`: root config path, defaults to `storemeta.yml`
32
+ - `--app <id>`: configured app id, defaults to `project.defaultApp`
33
+ - `--platform <apple|google|all>`: platform filter
34
+ - `--locale <code>`: locale filter
35
+ - `--dry-run`: preview push operations without remote writes
36
+ - `--replace`: delete existing remote screenshots before screenshot upload
37
+ - `--verbose`: include error causes when available
38
+
39
+ ## Quick Start
40
+
41
+ Create a starter project:
42
+
43
+ ```bash
44
+ storemeta init
45
+ ```
46
+
47
+ Validate local config, credentials, metadata files, and screenshot layout:
48
+
49
+ ```bash
50
+ storemeta validate
51
+ ```
52
+
53
+ Check auth and inspect config:
54
+
55
+ ```bash
56
+ storemeta auth check
57
+ storemeta config doctor
58
+ storemeta locales list
59
+ ```
60
+
61
+ Create missing local files and folders from config:
62
+
63
+ ```bash
64
+ storemeta scaffold
65
+ ```
66
+
67
+ `scaffold` creates minimal metadata files such as `locale: en-US` and screenshot directories for configured locales. It does not overwrite existing metadata files.
68
+
69
+ Pull metadata:
70
+
71
+ ```bash
72
+ storemeta metadata pull --platform apple
73
+ storemeta metadata pull --platform google --locale en-US
74
+ ```
75
+
76
+ Pull screenshots:
77
+
78
+ ```bash
79
+ storemeta screenshots pull --platform apple
80
+ storemeta screenshots pull --platform google --locale en-US
81
+ ```
82
+
83
+ Push metadata or screenshots:
84
+
85
+ ```bash
86
+ storemeta metadata push --platform google --dry-run
87
+ storemeta screenshots push --platform apple --replace
88
+ ```
89
+
90
+ ## Config
91
+
92
+ Default config file:
93
+
94
+ ```text
95
+ storemeta.yml
96
+ ```
97
+
98
+ Example:
99
+
100
+ ```yaml
101
+ version: 1
102
+ project:
103
+ name: Storemeta Example
104
+ defaultApp: example-app
105
+ apps:
106
+ example-app:
107
+ metadata:
108
+ baseDir: metadata
109
+ format: yaml
110
+ screenshots:
111
+ baseDir: screenshots
112
+ apple:
113
+ appId: "0000000000"
114
+ credentials:
115
+ issuerIdEnv: STORE_APPLE_ISSUER_ID
116
+ keyIdEnv: STORE_APPLE_KEY_ID
117
+ privateKeyPathEnv: STORE_APPLE_PRIVATE_KEY_PATH
118
+ locales:
119
+ default:
120
+ - en-US
121
+ - tr
122
+ google:
123
+ packageName: com.example.storemeta
124
+ credentials:
125
+ serviceAccountPathEnv: STORE_GOOGLE_SERVICE_ACCOUNT_PATH
126
+ locales:
127
+ default:
128
+ - en-US
129
+ - tr
130
+ screenshots:
131
+ groups:
132
+ english:
133
+ locales:
134
+ - en-US
135
+ - en-GB
136
+ ```
137
+
138
+ The schema is strict. Unknown config keys fail validation.
139
+
140
+ `metadata.baseDir` and `screenshots.baseDir` must be relative paths. Runtime credentials are read from the environment variables named in the config.
141
+
142
+ ## Credentials
143
+
144
+ Detailed setup instructions are in [`AUTH_SETUP.md`](AUTH_SETUP.md).
145
+
146
+ Apple environment variables:
147
+
148
+ ```bash
149
+ export STORE_APPLE_ISSUER_ID=...
150
+ export STORE_APPLE_KEY_ID=...
151
+ export STORE_APPLE_PRIVATE_KEY_PATH=/absolute/path/to/AuthKey_XXXXXXXXXX.p8
152
+ ```
153
+
154
+ Google environment variable:
155
+
156
+ ```bash
157
+ export STORE_GOOGLE_SERVICE_ACCOUNT_PATH=/absolute/path/to/service-account.json
158
+ ```
159
+
160
+ Do not commit private keys, service account JSON files, or real `.env` files.
161
+
162
+ ## Metadata Layout
163
+
164
+ ```text
165
+ metadata/
166
+ apple/
167
+ en-US.yml
168
+ tr.yml
169
+ google/
170
+ en-US.yml
171
+ tr.yml
172
+ ```
173
+
174
+ Supported metadata file extensions:
175
+
176
+ - `.yml`
177
+ - `.yaml`
178
+ - `.md` files whose contents are YAML
179
+
180
+ Apple metadata fields:
181
+
182
+ ```yaml
183
+ locale: en-US
184
+ app_name: Example App
185
+ subtitle: Short subtitle
186
+ keywords: one,two,three
187
+ promotional_text: Optional promo text
188
+ description: Long description text.
189
+ whats_new: What changed in this version.
190
+ support_url: https://example.com/support
191
+ marketing_url: https://example.com
192
+ privacy_policy_url: https://example.com/privacy
193
+ ```
194
+
195
+ Google metadata fields:
196
+
197
+ ```yaml
198
+ locale: en-US
199
+ title: Example App
200
+ short_description: Short description
201
+ full_description: Long description text.
202
+ video: https://example.com/video
203
+ ```
204
+
205
+ Google metadata length checks:
206
+
207
+ - `title`: 30 characters or fewer
208
+ - `short_description`: 80 characters or fewer
209
+ - `full_description`: 4000 characters or fewer
210
+
211
+ ## Screenshot Layout
212
+
213
+ ```text
214
+ screenshots/
215
+ apple/
216
+ en-US/
217
+ APP_IPHONE_65/
218
+ 1.png
219
+ 2.png
220
+ google/
221
+ en-US/
222
+ phoneScreenshots/
223
+ 1.png
224
+ 2.png
225
+ ```
226
+
227
+ Supported local screenshot extensions:
228
+
229
+ - `.png`
230
+ - `.jpg`
231
+ - `.jpeg`
232
+
233
+ Screenshot filenames must be contiguous numeric positions such as `1.png`, `2.png`, and `3.png`.
234
+
235
+ Google screenshot image type directories:
236
+
237
+ - `phoneScreenshots`
238
+ - `sevenInchScreenshots`
239
+ - `tenInchScreenshots`
240
+ - `tvScreenshots`
241
+ - `wearScreenshots`
242
+
243
+ Apple screenshot display type directories should use App Store Connect display type values such as `APP_IPHONE_65`.
244
+
245
+ ## Validation Behavior
246
+
247
+ `storemeta validate` checks:
248
+
249
+ - root config schema
250
+ - selected app and platform support
251
+ - credential environment variable presence
252
+ - credential environment variable name validity
253
+ - platform identifiers
254
+ - relative base directory paths
255
+ - metadata file schemas
256
+ - Google metadata length limits
257
+ - screenshot folder structure
258
+ - supported screenshot extensions
259
+ - numeric screenshot ordering
260
+
261
+ Push commands also validate the files they load before writing to the remote store. For the full local project validation pass, run `storemeta validate` explicitly before push commands.
262
+
263
+ ## Pull Behavior
264
+
265
+ Metadata pull writes one local file per platform and locale.
266
+
267
+ Screenshot pull writes downloaded screenshots into the canonical local screenshot layout. Google screenshot pull uses configured default locales unless `--locale` is supplied. Apple screenshot pull discovers version localizations from App Store Connect and can be filtered with `--locale`.
268
+
269
+ ## Push Behavior
270
+
271
+ Metadata push uploads local metadata documents to the selected platform.
272
+
273
+ Screenshot push uploads local screenshot sets to the selected platform. Use `--replace` to delete existing remote screenshots in target sets before uploading local files.
274
+
275
+ Use `--dry-run` for metadata and screenshot push previews.
276
+
277
+ ## Development Verification
278
+
279
+ ```bash
280
+ npm run check
281
+ npm run test
282
+ npm run build
283
+ ```
284
+
285
+ The example project in [`examples/`](../examples) is fake and safe to publish. Its screenshot files are placeholders for layout demonstration only.