@htgabriel/release-kit 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.
- package/README.md +66 -0
- package/dist/cli/index.d.ts +4 -0
- package/dist/cli/index.js +2900 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/index.d.ts +957 -0
- package/dist/index.js +1881 -0
- package/dist/index.js.map +1 -0
- package/package.json +72 -0
- package/schema.json +308 -0
- package/templates/release-kit.config.example.json +42 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,957 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
interface RunResult {
|
|
4
|
+
status: number;
|
|
5
|
+
signal: NodeJS.Signals | null;
|
|
6
|
+
stdout: string;
|
|
7
|
+
stderr: string;
|
|
8
|
+
error?: Error;
|
|
9
|
+
dryRun?: boolean;
|
|
10
|
+
printed?: string;
|
|
11
|
+
}
|
|
12
|
+
interface RunOptions {
|
|
13
|
+
cwd?: string;
|
|
14
|
+
env?: NodeJS.ProcessEnv;
|
|
15
|
+
inherit?: boolean;
|
|
16
|
+
dryRun?: boolean;
|
|
17
|
+
}
|
|
18
|
+
type Runner = (command: string, args: string[], options?: RunOptions) => RunResult;
|
|
19
|
+
|
|
20
|
+
type LogFn = (message: string) => void;
|
|
21
|
+
interface Logger {
|
|
22
|
+
info: LogFn;
|
|
23
|
+
warn: LogFn;
|
|
24
|
+
error: LogFn;
|
|
25
|
+
success: LogFn;
|
|
26
|
+
step: LogFn;
|
|
27
|
+
debug: LogFn;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
interface ReleaseKitContext {
|
|
31
|
+
/** Raiz do repositório git do projeto consumidor. */
|
|
32
|
+
repoRoot: string;
|
|
33
|
+
/** Diretório do app Expo (".", "packages/app", etc). */
|
|
34
|
+
appDir: string;
|
|
35
|
+
/** Onde ficam os artefatos e metadata de build (gitignored). */
|
|
36
|
+
releaseDir: string;
|
|
37
|
+
env: NodeJS.ProcessEnv;
|
|
38
|
+
dryRun: boolean;
|
|
39
|
+
json: boolean;
|
|
40
|
+
verbose: boolean;
|
|
41
|
+
/** Sem TTY / --non-interactive: nunca pergunta, nunca publica sem flags explícitas. */
|
|
42
|
+
nonInteractive: boolean;
|
|
43
|
+
run: Runner;
|
|
44
|
+
log: Logger;
|
|
45
|
+
/** Usado no gate de canal protegido: pede para digitar a versão exata. */
|
|
46
|
+
confirm?: (question: string) => Promise<string> | string;
|
|
47
|
+
}
|
|
48
|
+
interface CreateContextOverrides {
|
|
49
|
+
repoRoot: string;
|
|
50
|
+
appDir?: string;
|
|
51
|
+
releaseDir?: string;
|
|
52
|
+
env?: NodeJS.ProcessEnv;
|
|
53
|
+
dryRun?: boolean;
|
|
54
|
+
json?: boolean;
|
|
55
|
+
verbose?: boolean;
|
|
56
|
+
nonInteractive?: boolean;
|
|
57
|
+
run?: Runner;
|
|
58
|
+
log?: Logger;
|
|
59
|
+
confirm?: (question: string) => Promise<string> | string;
|
|
60
|
+
}
|
|
61
|
+
declare function createContext(overrides: CreateContextOverrides): ReleaseKitContext;
|
|
62
|
+
|
|
63
|
+
declare const platformSchema: z.ZodEnum<["android", "ios"]>;
|
|
64
|
+
type Platform = z.infer<typeof platformSchema>;
|
|
65
|
+
declare const gitPolicySchema: z.ZodObject<{
|
|
66
|
+
releaseBranch: z.ZodDefault<z.ZodString>;
|
|
67
|
+
tagFormat: z.ZodDefault<z.ZodString>;
|
|
68
|
+
requireClean: z.ZodDefault<z.ZodBoolean>;
|
|
69
|
+
requireSyncedWithRemote: z.ZodDefault<z.ZodBoolean>;
|
|
70
|
+
remote: z.ZodDefault<z.ZodString>;
|
|
71
|
+
}, "strip", z.ZodTypeAny, {
|
|
72
|
+
releaseBranch: string;
|
|
73
|
+
tagFormat: string;
|
|
74
|
+
requireClean: boolean;
|
|
75
|
+
requireSyncedWithRemote: boolean;
|
|
76
|
+
remote: string;
|
|
77
|
+
}, {
|
|
78
|
+
releaseBranch?: string | undefined;
|
|
79
|
+
tagFormat?: string | undefined;
|
|
80
|
+
requireClean?: boolean | undefined;
|
|
81
|
+
requireSyncedWithRemote?: boolean | undefined;
|
|
82
|
+
remote?: string | undefined;
|
|
83
|
+
}>;
|
|
84
|
+
type GitPolicy = z.infer<typeof gitPolicySchema>;
|
|
85
|
+
declare const channelSchema: z.ZodObject<{
|
|
86
|
+
/** Canal protegido (produção): exige --i-know-this-is-production ou confirmação digitando a versão. */
|
|
87
|
+
protected: z.ZodDefault<z.ZodBoolean>;
|
|
88
|
+
/** Se false, o canal nunca envia à loja (ex: build local de sideload). */
|
|
89
|
+
store: z.ZodDefault<z.ZodBoolean>;
|
|
90
|
+
buildProfile: z.ZodString;
|
|
91
|
+
submitProfile: z.ZodOptional<z.ZodString>;
|
|
92
|
+
/** Nome do "environment" do EAS (eas.json build.<profile>.environment) — usado nos checks de fingerprint/Sentry. */
|
|
93
|
+
easEnvironment: z.ZodOptional<z.ZodString>;
|
|
94
|
+
/** Se o build profile já reusa o build number/versionCode (eas.json autoIncrement). */
|
|
95
|
+
autoIncrement: z.ZodDefault<z.ZodBoolean>;
|
|
96
|
+
/** Profiles com upload de sourcemap desligado (ex: SENTRY_DISABLE_AUTO_UPLOAD) não exigem token no doctor. */
|
|
97
|
+
sentryUploadDisabled: z.ZodDefault<z.ZodBoolean>;
|
|
98
|
+
env: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
99
|
+
ios: z.ZodOptional<z.ZodObject<{
|
|
100
|
+
bundleId: z.ZodString;
|
|
101
|
+
ascAppId: z.ZodOptional<z.ZodString>;
|
|
102
|
+
appleTeamId: z.ZodOptional<z.ZodString>;
|
|
103
|
+
phasedRelease: z.ZodDefault<z.ZodBoolean>;
|
|
104
|
+
automaticRelease: z.ZodDefault<z.ZodBoolean>;
|
|
105
|
+
copyright: z.ZodOptional<z.ZodString>;
|
|
106
|
+
}, "strip", z.ZodTypeAny, {
|
|
107
|
+
bundleId: string;
|
|
108
|
+
phasedRelease: boolean;
|
|
109
|
+
automaticRelease: boolean;
|
|
110
|
+
ascAppId?: string | undefined;
|
|
111
|
+
appleTeamId?: string | undefined;
|
|
112
|
+
copyright?: string | undefined;
|
|
113
|
+
}, {
|
|
114
|
+
bundleId: string;
|
|
115
|
+
ascAppId?: string | undefined;
|
|
116
|
+
appleTeamId?: string | undefined;
|
|
117
|
+
phasedRelease?: boolean | undefined;
|
|
118
|
+
automaticRelease?: boolean | undefined;
|
|
119
|
+
copyright?: string | undefined;
|
|
120
|
+
}>>;
|
|
121
|
+
android: z.ZodOptional<z.ZodObject<{
|
|
122
|
+
package: z.ZodString;
|
|
123
|
+
testTrack: z.ZodDefault<z.ZodString>;
|
|
124
|
+
productionTrack: z.ZodDefault<z.ZodString>;
|
|
125
|
+
initialRollout: z.ZodDefault<z.ZodNumber>;
|
|
126
|
+
}, "strip", z.ZodTypeAny, {
|
|
127
|
+
package: string;
|
|
128
|
+
testTrack: string;
|
|
129
|
+
productionTrack: string;
|
|
130
|
+
initialRollout: number;
|
|
131
|
+
}, {
|
|
132
|
+
package: string;
|
|
133
|
+
testTrack?: string | undefined;
|
|
134
|
+
productionTrack?: string | undefined;
|
|
135
|
+
initialRollout?: number | undefined;
|
|
136
|
+
}>>;
|
|
137
|
+
ota: z.ZodOptional<z.ZodObject<{
|
|
138
|
+
channel: z.ZodString;
|
|
139
|
+
}, "strip", z.ZodTypeAny, {
|
|
140
|
+
channel: string;
|
|
141
|
+
}, {
|
|
142
|
+
channel: string;
|
|
143
|
+
}>>;
|
|
144
|
+
}, "strip", z.ZodTypeAny, {
|
|
145
|
+
env: Record<string, string>;
|
|
146
|
+
protected: boolean;
|
|
147
|
+
store: boolean;
|
|
148
|
+
buildProfile: string;
|
|
149
|
+
autoIncrement: boolean;
|
|
150
|
+
sentryUploadDisabled: boolean;
|
|
151
|
+
android?: {
|
|
152
|
+
package: string;
|
|
153
|
+
testTrack: string;
|
|
154
|
+
productionTrack: string;
|
|
155
|
+
initialRollout: number;
|
|
156
|
+
} | undefined;
|
|
157
|
+
ios?: {
|
|
158
|
+
bundleId: string;
|
|
159
|
+
phasedRelease: boolean;
|
|
160
|
+
automaticRelease: boolean;
|
|
161
|
+
ascAppId?: string | undefined;
|
|
162
|
+
appleTeamId?: string | undefined;
|
|
163
|
+
copyright?: string | undefined;
|
|
164
|
+
} | undefined;
|
|
165
|
+
submitProfile?: string | undefined;
|
|
166
|
+
easEnvironment?: string | undefined;
|
|
167
|
+
ota?: {
|
|
168
|
+
channel: string;
|
|
169
|
+
} | undefined;
|
|
170
|
+
}, {
|
|
171
|
+
buildProfile: string;
|
|
172
|
+
env?: Record<string, string> | undefined;
|
|
173
|
+
android?: {
|
|
174
|
+
package: string;
|
|
175
|
+
testTrack?: string | undefined;
|
|
176
|
+
productionTrack?: string | undefined;
|
|
177
|
+
initialRollout?: number | undefined;
|
|
178
|
+
} | undefined;
|
|
179
|
+
ios?: {
|
|
180
|
+
bundleId: string;
|
|
181
|
+
ascAppId?: string | undefined;
|
|
182
|
+
appleTeamId?: string | undefined;
|
|
183
|
+
phasedRelease?: boolean | undefined;
|
|
184
|
+
automaticRelease?: boolean | undefined;
|
|
185
|
+
copyright?: string | undefined;
|
|
186
|
+
} | undefined;
|
|
187
|
+
protected?: boolean | undefined;
|
|
188
|
+
store?: boolean | undefined;
|
|
189
|
+
submitProfile?: string | undefined;
|
|
190
|
+
easEnvironment?: string | undefined;
|
|
191
|
+
autoIncrement?: boolean | undefined;
|
|
192
|
+
sentryUploadDisabled?: boolean | undefined;
|
|
193
|
+
ota?: {
|
|
194
|
+
channel: string;
|
|
195
|
+
} | undefined;
|
|
196
|
+
}>;
|
|
197
|
+
type ChannelConfig = z.infer<typeof channelSchema>;
|
|
198
|
+
declare const releaseKitConfigSchema: z.ZodObject<{
|
|
199
|
+
$schema: z.ZodOptional<z.ZodString>;
|
|
200
|
+
appDir: z.ZodDefault<z.ZodString>;
|
|
201
|
+
/** Conta/organização esperada no `eas whoami` (opcional; reforça o doctor). */
|
|
202
|
+
easOwner: z.ZodOptional<z.ZodString>;
|
|
203
|
+
platforms: z.ZodArray<z.ZodEnum<["android", "ios"]>, "many">;
|
|
204
|
+
locales: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
205
|
+
notesDir: z.ZodDefault<z.ZodString>;
|
|
206
|
+
version: z.ZodDefault<z.ZodObject<{
|
|
207
|
+
source: z.ZodDefault<z.ZodEnum<["app.json", "package.json"]>>;
|
|
208
|
+
}, "strip", z.ZodTypeAny, {
|
|
209
|
+
source: "app.json" | "package.json";
|
|
210
|
+
}, {
|
|
211
|
+
source?: "app.json" | "package.json" | undefined;
|
|
212
|
+
}>>;
|
|
213
|
+
git: z.ZodDefault<z.ZodObject<{
|
|
214
|
+
releaseBranch: z.ZodDefault<z.ZodString>;
|
|
215
|
+
tagFormat: z.ZodDefault<z.ZodString>;
|
|
216
|
+
requireClean: z.ZodDefault<z.ZodBoolean>;
|
|
217
|
+
requireSyncedWithRemote: z.ZodDefault<z.ZodBoolean>;
|
|
218
|
+
remote: z.ZodDefault<z.ZodString>;
|
|
219
|
+
}, "strip", z.ZodTypeAny, {
|
|
220
|
+
releaseBranch: string;
|
|
221
|
+
tagFormat: string;
|
|
222
|
+
requireClean: boolean;
|
|
223
|
+
requireSyncedWithRemote: boolean;
|
|
224
|
+
remote: string;
|
|
225
|
+
}, {
|
|
226
|
+
releaseBranch?: string | undefined;
|
|
227
|
+
tagFormat?: string | undefined;
|
|
228
|
+
requireClean?: boolean | undefined;
|
|
229
|
+
requireSyncedWithRemote?: boolean | undefined;
|
|
230
|
+
remote?: string | undefined;
|
|
231
|
+
}>>;
|
|
232
|
+
channels: z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
233
|
+
/** Canal protegido (produção): exige --i-know-this-is-production ou confirmação digitando a versão. */
|
|
234
|
+
protected: z.ZodDefault<z.ZodBoolean>;
|
|
235
|
+
/** Se false, o canal nunca envia à loja (ex: build local de sideload). */
|
|
236
|
+
store: z.ZodDefault<z.ZodBoolean>;
|
|
237
|
+
buildProfile: z.ZodString;
|
|
238
|
+
submitProfile: z.ZodOptional<z.ZodString>;
|
|
239
|
+
/** Nome do "environment" do EAS (eas.json build.<profile>.environment) — usado nos checks de fingerprint/Sentry. */
|
|
240
|
+
easEnvironment: z.ZodOptional<z.ZodString>;
|
|
241
|
+
/** Se o build profile já reusa o build number/versionCode (eas.json autoIncrement). */
|
|
242
|
+
autoIncrement: z.ZodDefault<z.ZodBoolean>;
|
|
243
|
+
/** Profiles com upload de sourcemap desligado (ex: SENTRY_DISABLE_AUTO_UPLOAD) não exigem token no doctor. */
|
|
244
|
+
sentryUploadDisabled: z.ZodDefault<z.ZodBoolean>;
|
|
245
|
+
env: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
246
|
+
ios: z.ZodOptional<z.ZodObject<{
|
|
247
|
+
bundleId: z.ZodString;
|
|
248
|
+
ascAppId: z.ZodOptional<z.ZodString>;
|
|
249
|
+
appleTeamId: z.ZodOptional<z.ZodString>;
|
|
250
|
+
phasedRelease: z.ZodDefault<z.ZodBoolean>;
|
|
251
|
+
automaticRelease: z.ZodDefault<z.ZodBoolean>;
|
|
252
|
+
copyright: z.ZodOptional<z.ZodString>;
|
|
253
|
+
}, "strip", z.ZodTypeAny, {
|
|
254
|
+
bundleId: string;
|
|
255
|
+
phasedRelease: boolean;
|
|
256
|
+
automaticRelease: boolean;
|
|
257
|
+
ascAppId?: string | undefined;
|
|
258
|
+
appleTeamId?: string | undefined;
|
|
259
|
+
copyright?: string | undefined;
|
|
260
|
+
}, {
|
|
261
|
+
bundleId: string;
|
|
262
|
+
ascAppId?: string | undefined;
|
|
263
|
+
appleTeamId?: string | undefined;
|
|
264
|
+
phasedRelease?: boolean | undefined;
|
|
265
|
+
automaticRelease?: boolean | undefined;
|
|
266
|
+
copyright?: string | undefined;
|
|
267
|
+
}>>;
|
|
268
|
+
android: z.ZodOptional<z.ZodObject<{
|
|
269
|
+
package: z.ZodString;
|
|
270
|
+
testTrack: z.ZodDefault<z.ZodString>;
|
|
271
|
+
productionTrack: z.ZodDefault<z.ZodString>;
|
|
272
|
+
initialRollout: z.ZodDefault<z.ZodNumber>;
|
|
273
|
+
}, "strip", z.ZodTypeAny, {
|
|
274
|
+
package: string;
|
|
275
|
+
testTrack: string;
|
|
276
|
+
productionTrack: string;
|
|
277
|
+
initialRollout: number;
|
|
278
|
+
}, {
|
|
279
|
+
package: string;
|
|
280
|
+
testTrack?: string | undefined;
|
|
281
|
+
productionTrack?: string | undefined;
|
|
282
|
+
initialRollout?: number | undefined;
|
|
283
|
+
}>>;
|
|
284
|
+
ota: z.ZodOptional<z.ZodObject<{
|
|
285
|
+
channel: z.ZodString;
|
|
286
|
+
}, "strip", z.ZodTypeAny, {
|
|
287
|
+
channel: string;
|
|
288
|
+
}, {
|
|
289
|
+
channel: string;
|
|
290
|
+
}>>;
|
|
291
|
+
}, "strip", z.ZodTypeAny, {
|
|
292
|
+
env: Record<string, string>;
|
|
293
|
+
protected: boolean;
|
|
294
|
+
store: boolean;
|
|
295
|
+
buildProfile: string;
|
|
296
|
+
autoIncrement: boolean;
|
|
297
|
+
sentryUploadDisabled: boolean;
|
|
298
|
+
android?: {
|
|
299
|
+
package: string;
|
|
300
|
+
testTrack: string;
|
|
301
|
+
productionTrack: string;
|
|
302
|
+
initialRollout: number;
|
|
303
|
+
} | undefined;
|
|
304
|
+
ios?: {
|
|
305
|
+
bundleId: string;
|
|
306
|
+
phasedRelease: boolean;
|
|
307
|
+
automaticRelease: boolean;
|
|
308
|
+
ascAppId?: string | undefined;
|
|
309
|
+
appleTeamId?: string | undefined;
|
|
310
|
+
copyright?: string | undefined;
|
|
311
|
+
} | undefined;
|
|
312
|
+
submitProfile?: string | undefined;
|
|
313
|
+
easEnvironment?: string | undefined;
|
|
314
|
+
ota?: {
|
|
315
|
+
channel: string;
|
|
316
|
+
} | undefined;
|
|
317
|
+
}, {
|
|
318
|
+
buildProfile: string;
|
|
319
|
+
env?: Record<string, string> | undefined;
|
|
320
|
+
android?: {
|
|
321
|
+
package: string;
|
|
322
|
+
testTrack?: string | undefined;
|
|
323
|
+
productionTrack?: string | undefined;
|
|
324
|
+
initialRollout?: number | undefined;
|
|
325
|
+
} | undefined;
|
|
326
|
+
ios?: {
|
|
327
|
+
bundleId: string;
|
|
328
|
+
ascAppId?: string | undefined;
|
|
329
|
+
appleTeamId?: string | undefined;
|
|
330
|
+
phasedRelease?: boolean | undefined;
|
|
331
|
+
automaticRelease?: boolean | undefined;
|
|
332
|
+
copyright?: string | undefined;
|
|
333
|
+
} | undefined;
|
|
334
|
+
protected?: boolean | undefined;
|
|
335
|
+
store?: boolean | undefined;
|
|
336
|
+
submitProfile?: string | undefined;
|
|
337
|
+
easEnvironment?: string | undefined;
|
|
338
|
+
autoIncrement?: boolean | undefined;
|
|
339
|
+
sentryUploadDisabled?: boolean | undefined;
|
|
340
|
+
ota?: {
|
|
341
|
+
channel: string;
|
|
342
|
+
} | undefined;
|
|
343
|
+
}>>, Record<string, {
|
|
344
|
+
env: Record<string, string>;
|
|
345
|
+
protected: boolean;
|
|
346
|
+
store: boolean;
|
|
347
|
+
buildProfile: string;
|
|
348
|
+
autoIncrement: boolean;
|
|
349
|
+
sentryUploadDisabled: boolean;
|
|
350
|
+
android?: {
|
|
351
|
+
package: string;
|
|
352
|
+
testTrack: string;
|
|
353
|
+
productionTrack: string;
|
|
354
|
+
initialRollout: number;
|
|
355
|
+
} | undefined;
|
|
356
|
+
ios?: {
|
|
357
|
+
bundleId: string;
|
|
358
|
+
phasedRelease: boolean;
|
|
359
|
+
automaticRelease: boolean;
|
|
360
|
+
ascAppId?: string | undefined;
|
|
361
|
+
appleTeamId?: string | undefined;
|
|
362
|
+
copyright?: string | undefined;
|
|
363
|
+
} | undefined;
|
|
364
|
+
submitProfile?: string | undefined;
|
|
365
|
+
easEnvironment?: string | undefined;
|
|
366
|
+
ota?: {
|
|
367
|
+
channel: string;
|
|
368
|
+
} | undefined;
|
|
369
|
+
}>, Record<string, {
|
|
370
|
+
buildProfile: string;
|
|
371
|
+
env?: Record<string, string> | undefined;
|
|
372
|
+
android?: {
|
|
373
|
+
package: string;
|
|
374
|
+
testTrack?: string | undefined;
|
|
375
|
+
productionTrack?: string | undefined;
|
|
376
|
+
initialRollout?: number | undefined;
|
|
377
|
+
} | undefined;
|
|
378
|
+
ios?: {
|
|
379
|
+
bundleId: string;
|
|
380
|
+
ascAppId?: string | undefined;
|
|
381
|
+
appleTeamId?: string | undefined;
|
|
382
|
+
phasedRelease?: boolean | undefined;
|
|
383
|
+
automaticRelease?: boolean | undefined;
|
|
384
|
+
copyright?: string | undefined;
|
|
385
|
+
} | undefined;
|
|
386
|
+
protected?: boolean | undefined;
|
|
387
|
+
store?: boolean | undefined;
|
|
388
|
+
submitProfile?: string | undefined;
|
|
389
|
+
easEnvironment?: string | undefined;
|
|
390
|
+
autoIncrement?: boolean | undefined;
|
|
391
|
+
sentryUploadDisabled?: boolean | undefined;
|
|
392
|
+
ota?: {
|
|
393
|
+
channel: string;
|
|
394
|
+
} | undefined;
|
|
395
|
+
}>>;
|
|
396
|
+
toolchain: z.ZodDefault<z.ZodObject<{
|
|
397
|
+
easCli: z.ZodOptional<z.ZodObject<{
|
|
398
|
+
min: z.ZodString;
|
|
399
|
+
tested: z.ZodString;
|
|
400
|
+
}, "strip", z.ZodTypeAny, {
|
|
401
|
+
min: string;
|
|
402
|
+
tested: string;
|
|
403
|
+
}, {
|
|
404
|
+
min: string;
|
|
405
|
+
tested: string;
|
|
406
|
+
}>>;
|
|
407
|
+
node: z.ZodOptional<z.ZodObject<{
|
|
408
|
+
min: z.ZodString;
|
|
409
|
+
tested: z.ZodString;
|
|
410
|
+
}, "strip", z.ZodTypeAny, {
|
|
411
|
+
min: string;
|
|
412
|
+
tested: string;
|
|
413
|
+
}, {
|
|
414
|
+
min: string;
|
|
415
|
+
tested: string;
|
|
416
|
+
}>>;
|
|
417
|
+
jdk: z.ZodOptional<z.ZodObject<{
|
|
418
|
+
min: z.ZodString;
|
|
419
|
+
tested: z.ZodString;
|
|
420
|
+
}, "strip", z.ZodTypeAny, {
|
|
421
|
+
min: string;
|
|
422
|
+
tested: string;
|
|
423
|
+
}, {
|
|
424
|
+
min: string;
|
|
425
|
+
tested: string;
|
|
426
|
+
}>>;
|
|
427
|
+
xcode: z.ZodOptional<z.ZodObject<{
|
|
428
|
+
min: z.ZodString;
|
|
429
|
+
tested: z.ZodString;
|
|
430
|
+
}, "strip", z.ZodTypeAny, {
|
|
431
|
+
min: string;
|
|
432
|
+
tested: string;
|
|
433
|
+
}, {
|
|
434
|
+
min: string;
|
|
435
|
+
tested: string;
|
|
436
|
+
}>>;
|
|
437
|
+
cocoapods: z.ZodOptional<z.ZodObject<{
|
|
438
|
+
min: z.ZodString;
|
|
439
|
+
tested: z.ZodString;
|
|
440
|
+
}, "strip", z.ZodTypeAny, {
|
|
441
|
+
min: string;
|
|
442
|
+
tested: string;
|
|
443
|
+
}, {
|
|
444
|
+
min: string;
|
|
445
|
+
tested: string;
|
|
446
|
+
}>>;
|
|
447
|
+
}, "strip", z.ZodTypeAny, {
|
|
448
|
+
easCli?: {
|
|
449
|
+
min: string;
|
|
450
|
+
tested: string;
|
|
451
|
+
} | undefined;
|
|
452
|
+
node?: {
|
|
453
|
+
min: string;
|
|
454
|
+
tested: string;
|
|
455
|
+
} | undefined;
|
|
456
|
+
jdk?: {
|
|
457
|
+
min: string;
|
|
458
|
+
tested: string;
|
|
459
|
+
} | undefined;
|
|
460
|
+
xcode?: {
|
|
461
|
+
min: string;
|
|
462
|
+
tested: string;
|
|
463
|
+
} | undefined;
|
|
464
|
+
cocoapods?: {
|
|
465
|
+
min: string;
|
|
466
|
+
tested: string;
|
|
467
|
+
} | undefined;
|
|
468
|
+
}, {
|
|
469
|
+
easCli?: {
|
|
470
|
+
min: string;
|
|
471
|
+
tested: string;
|
|
472
|
+
} | undefined;
|
|
473
|
+
node?: {
|
|
474
|
+
min: string;
|
|
475
|
+
tested: string;
|
|
476
|
+
} | undefined;
|
|
477
|
+
jdk?: {
|
|
478
|
+
min: string;
|
|
479
|
+
tested: string;
|
|
480
|
+
} | undefined;
|
|
481
|
+
xcode?: {
|
|
482
|
+
min: string;
|
|
483
|
+
tested: string;
|
|
484
|
+
} | undefined;
|
|
485
|
+
cocoapods?: {
|
|
486
|
+
min: string;
|
|
487
|
+
tested: string;
|
|
488
|
+
} | undefined;
|
|
489
|
+
}>>;
|
|
490
|
+
doctor: z.ZodDefault<z.ZodObject<{
|
|
491
|
+
sentry: z.ZodDefault<z.ZodBoolean>;
|
|
492
|
+
expoDoctor: z.ZodDefault<z.ZodBoolean>;
|
|
493
|
+
}, "strip", z.ZodTypeAny, {
|
|
494
|
+
sentry: boolean;
|
|
495
|
+
expoDoctor: boolean;
|
|
496
|
+
}, {
|
|
497
|
+
sentry?: boolean | undefined;
|
|
498
|
+
expoDoctor?: boolean | undefined;
|
|
499
|
+
}>>;
|
|
500
|
+
}, "strip", z.ZodTypeAny, {
|
|
501
|
+
appDir: string;
|
|
502
|
+
platforms: ("android" | "ios")[];
|
|
503
|
+
locales: string[];
|
|
504
|
+
notesDir: string;
|
|
505
|
+
version: {
|
|
506
|
+
source: "app.json" | "package.json";
|
|
507
|
+
};
|
|
508
|
+
git: {
|
|
509
|
+
releaseBranch: string;
|
|
510
|
+
tagFormat: string;
|
|
511
|
+
requireClean: boolean;
|
|
512
|
+
requireSyncedWithRemote: boolean;
|
|
513
|
+
remote: string;
|
|
514
|
+
};
|
|
515
|
+
channels: Record<string, {
|
|
516
|
+
env: Record<string, string>;
|
|
517
|
+
protected: boolean;
|
|
518
|
+
store: boolean;
|
|
519
|
+
buildProfile: string;
|
|
520
|
+
autoIncrement: boolean;
|
|
521
|
+
sentryUploadDisabled: boolean;
|
|
522
|
+
android?: {
|
|
523
|
+
package: string;
|
|
524
|
+
testTrack: string;
|
|
525
|
+
productionTrack: string;
|
|
526
|
+
initialRollout: number;
|
|
527
|
+
} | undefined;
|
|
528
|
+
ios?: {
|
|
529
|
+
bundleId: string;
|
|
530
|
+
phasedRelease: boolean;
|
|
531
|
+
automaticRelease: boolean;
|
|
532
|
+
ascAppId?: string | undefined;
|
|
533
|
+
appleTeamId?: string | undefined;
|
|
534
|
+
copyright?: string | undefined;
|
|
535
|
+
} | undefined;
|
|
536
|
+
submitProfile?: string | undefined;
|
|
537
|
+
easEnvironment?: string | undefined;
|
|
538
|
+
ota?: {
|
|
539
|
+
channel: string;
|
|
540
|
+
} | undefined;
|
|
541
|
+
}>;
|
|
542
|
+
toolchain: {
|
|
543
|
+
easCli?: {
|
|
544
|
+
min: string;
|
|
545
|
+
tested: string;
|
|
546
|
+
} | undefined;
|
|
547
|
+
node?: {
|
|
548
|
+
min: string;
|
|
549
|
+
tested: string;
|
|
550
|
+
} | undefined;
|
|
551
|
+
jdk?: {
|
|
552
|
+
min: string;
|
|
553
|
+
tested: string;
|
|
554
|
+
} | undefined;
|
|
555
|
+
xcode?: {
|
|
556
|
+
min: string;
|
|
557
|
+
tested: string;
|
|
558
|
+
} | undefined;
|
|
559
|
+
cocoapods?: {
|
|
560
|
+
min: string;
|
|
561
|
+
tested: string;
|
|
562
|
+
} | undefined;
|
|
563
|
+
};
|
|
564
|
+
doctor: {
|
|
565
|
+
sentry: boolean;
|
|
566
|
+
expoDoctor: boolean;
|
|
567
|
+
};
|
|
568
|
+
$schema?: string | undefined;
|
|
569
|
+
easOwner?: string | undefined;
|
|
570
|
+
}, {
|
|
571
|
+
platforms: ("android" | "ios")[];
|
|
572
|
+
channels: Record<string, {
|
|
573
|
+
buildProfile: string;
|
|
574
|
+
env?: Record<string, string> | undefined;
|
|
575
|
+
android?: {
|
|
576
|
+
package: string;
|
|
577
|
+
testTrack?: string | undefined;
|
|
578
|
+
productionTrack?: string | undefined;
|
|
579
|
+
initialRollout?: number | undefined;
|
|
580
|
+
} | undefined;
|
|
581
|
+
ios?: {
|
|
582
|
+
bundleId: string;
|
|
583
|
+
ascAppId?: string | undefined;
|
|
584
|
+
appleTeamId?: string | undefined;
|
|
585
|
+
phasedRelease?: boolean | undefined;
|
|
586
|
+
automaticRelease?: boolean | undefined;
|
|
587
|
+
copyright?: string | undefined;
|
|
588
|
+
} | undefined;
|
|
589
|
+
protected?: boolean | undefined;
|
|
590
|
+
store?: boolean | undefined;
|
|
591
|
+
submitProfile?: string | undefined;
|
|
592
|
+
easEnvironment?: string | undefined;
|
|
593
|
+
autoIncrement?: boolean | undefined;
|
|
594
|
+
sentryUploadDisabled?: boolean | undefined;
|
|
595
|
+
ota?: {
|
|
596
|
+
channel: string;
|
|
597
|
+
} | undefined;
|
|
598
|
+
}>;
|
|
599
|
+
$schema?: string | undefined;
|
|
600
|
+
appDir?: string | undefined;
|
|
601
|
+
easOwner?: string | undefined;
|
|
602
|
+
locales?: string[] | undefined;
|
|
603
|
+
notesDir?: string | undefined;
|
|
604
|
+
version?: {
|
|
605
|
+
source?: "app.json" | "package.json" | undefined;
|
|
606
|
+
} | undefined;
|
|
607
|
+
git?: {
|
|
608
|
+
releaseBranch?: string | undefined;
|
|
609
|
+
tagFormat?: string | undefined;
|
|
610
|
+
requireClean?: boolean | undefined;
|
|
611
|
+
requireSyncedWithRemote?: boolean | undefined;
|
|
612
|
+
remote?: string | undefined;
|
|
613
|
+
} | undefined;
|
|
614
|
+
toolchain?: {
|
|
615
|
+
easCli?: {
|
|
616
|
+
min: string;
|
|
617
|
+
tested: string;
|
|
618
|
+
} | undefined;
|
|
619
|
+
node?: {
|
|
620
|
+
min: string;
|
|
621
|
+
tested: string;
|
|
622
|
+
} | undefined;
|
|
623
|
+
jdk?: {
|
|
624
|
+
min: string;
|
|
625
|
+
tested: string;
|
|
626
|
+
} | undefined;
|
|
627
|
+
xcode?: {
|
|
628
|
+
min: string;
|
|
629
|
+
tested: string;
|
|
630
|
+
} | undefined;
|
|
631
|
+
cocoapods?: {
|
|
632
|
+
min: string;
|
|
633
|
+
tested: string;
|
|
634
|
+
} | undefined;
|
|
635
|
+
} | undefined;
|
|
636
|
+
doctor?: {
|
|
637
|
+
sentry?: boolean | undefined;
|
|
638
|
+
expoDoctor?: boolean | undefined;
|
|
639
|
+
} | undefined;
|
|
640
|
+
}>;
|
|
641
|
+
type ReleaseKitConfig = z.infer<typeof releaseKitConfigSchema>;
|
|
642
|
+
declare function parseConfig(input: unknown): ReleaseKitConfig;
|
|
643
|
+
declare function channelOf(config: ReleaseKitConfig, name: string): ChannelConfig;
|
|
644
|
+
declare function protectedChannelNames(config: ReleaseKitConfig): string[];
|
|
645
|
+
|
|
646
|
+
declare function configExists(repoRoot: string): boolean;
|
|
647
|
+
declare function loadConfig(repoRoot: string): ReleaseKitConfig;
|
|
648
|
+
declare function writeConfig(repoRoot: string, config: ReleaseKitConfig): string;
|
|
649
|
+
|
|
650
|
+
interface GitCheckResult {
|
|
651
|
+
name: string;
|
|
652
|
+
status: 'pass' | 'fail' | 'skip' | 'warn';
|
|
653
|
+
message: string;
|
|
654
|
+
}
|
|
655
|
+
/**
|
|
656
|
+
* Assertivas de política de git usadas pelo doctor e pelo gate de build.
|
|
657
|
+
* Reflete a regra do release kit original: production exige branch de
|
|
658
|
+
* release, tag == HEAD, e HEAD == remoto.
|
|
659
|
+
*/
|
|
660
|
+
declare function checkGitPolicy(ctx: ReleaseKitContext, policy: GitPolicy, { version, isProtectedChannel }: {
|
|
661
|
+
version: string;
|
|
662
|
+
isProtectedChannel: boolean;
|
|
663
|
+
}): GitCheckResult[];
|
|
664
|
+
|
|
665
|
+
interface CommitEntry {
|
|
666
|
+
sha: string;
|
|
667
|
+
subject: string;
|
|
668
|
+
type: string | null;
|
|
669
|
+
scope: string | null;
|
|
670
|
+
description: string;
|
|
671
|
+
}
|
|
672
|
+
/**
|
|
673
|
+
* Lista os commits desde a última tag que casa com `tagFormat` (ou desde o
|
|
674
|
+
* início do histórico, se nenhuma tag existir ainda). Usado para rascunhar
|
|
675
|
+
* as notas de versão.
|
|
676
|
+
*/
|
|
677
|
+
declare function commitsSinceLastTag(ctx: ReleaseKitContext, tagFormat: string): CommitEntry[];
|
|
678
|
+
/** Filtra só o que interessa ao usuário final (feat/fix), descarta o resto. */
|
|
679
|
+
declare function userFacingCommits(commits: CommitEntry[]): CommitEntry[];
|
|
680
|
+
|
|
681
|
+
declare function readAppVersion(appDir: string, config: ReleaseKitConfig): string;
|
|
682
|
+
type VersionBump = 'patch' | 'minor' | 'major' | string;
|
|
683
|
+
declare function nextVersion(current: string, bump: VersionBump): string;
|
|
684
|
+
/**
|
|
685
|
+
* Grava a nova versão preservando o resto do arquivo. Retorna o path
|
|
686
|
+
* escrito, para o caller decidir o `git add`/commit.
|
|
687
|
+
*/
|
|
688
|
+
declare function writeAppVersion(appDir: string, config: ReleaseKitConfig, next: string): string;
|
|
689
|
+
|
|
690
|
+
interface ToolchainInfo {
|
|
691
|
+
easCli: string | null;
|
|
692
|
+
node: string | null;
|
|
693
|
+
yarn: string | null;
|
|
694
|
+
jdk: string | null;
|
|
695
|
+
xcode: string | null;
|
|
696
|
+
xcodeBuild: string | null;
|
|
697
|
+
cocoapods: string | null;
|
|
698
|
+
ndkHome: string | null;
|
|
699
|
+
host: string;
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
type CheckStatus = 'pass' | 'fail' | 'skip' | 'warn';
|
|
703
|
+
interface Check {
|
|
704
|
+
name: string;
|
|
705
|
+
status: CheckStatus;
|
|
706
|
+
message: string;
|
|
707
|
+
}
|
|
708
|
+
|
|
709
|
+
interface DoctorOptions {
|
|
710
|
+
channel?: string;
|
|
711
|
+
platform?: Platform;
|
|
712
|
+
deep?: boolean;
|
|
713
|
+
buildId?: string;
|
|
714
|
+
allowToolchainDrift?: boolean;
|
|
715
|
+
}
|
|
716
|
+
interface DoctorReport {
|
|
717
|
+
ok: boolean;
|
|
718
|
+
checks: Check[];
|
|
719
|
+
toolchainDrift: boolean;
|
|
720
|
+
}
|
|
721
|
+
declare function runDoctor(ctx: ReleaseKitContext, config: ReleaseKitConfig, opts: DoctorOptions): DoctorReport;
|
|
722
|
+
|
|
723
|
+
interface ProtectedGateOptions {
|
|
724
|
+
iKnowThisIsProduction?: boolean;
|
|
725
|
+
confirmVersion?: string;
|
|
726
|
+
}
|
|
727
|
+
/**
|
|
728
|
+
* Gate fail-closed para canais `protected: true`: exige
|
|
729
|
+
* `--i-know-this-is-production` (não-interativo) ou confirmação digitando a
|
|
730
|
+
* versão exata. Sem isso, nenhum comando toca um canal protegido — nem
|
|
731
|
+
* build, nem submit, nem update OTA.
|
|
732
|
+
*/
|
|
733
|
+
declare function assertChannelOptIn(ctx: ReleaseKitContext, config: ReleaseKitConfig, channel: ChannelConfig, opts: ProtectedGateOptions): void;
|
|
734
|
+
|
|
735
|
+
interface ReleaseMetadata {
|
|
736
|
+
platform: Platform;
|
|
737
|
+
channel: string;
|
|
738
|
+
buildProfile: string;
|
|
739
|
+
version: string;
|
|
740
|
+
buildNumber: string | null;
|
|
741
|
+
versionCode: string | null;
|
|
742
|
+
artifactPath: string;
|
|
743
|
+
sha256: string;
|
|
744
|
+
commitSha: string;
|
|
745
|
+
branch: string;
|
|
746
|
+
tag: string;
|
|
747
|
+
createdAt: string;
|
|
748
|
+
toolchain: ToolchainInfo | null;
|
|
749
|
+
toolchainDrift: boolean;
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
interface BuildOptions extends ProtectedGateOptions {
|
|
753
|
+
channel: string;
|
|
754
|
+
platform: Platform;
|
|
755
|
+
cloud?: boolean;
|
|
756
|
+
output?: string;
|
|
757
|
+
toolchainDrift?: boolean;
|
|
758
|
+
}
|
|
759
|
+
interface BuildResult {
|
|
760
|
+
dryRun?: boolean;
|
|
761
|
+
command?: string;
|
|
762
|
+
artifactPath?: string;
|
|
763
|
+
metadata?: ReleaseMetadata;
|
|
764
|
+
staging?: string;
|
|
765
|
+
}
|
|
766
|
+
declare function buildRelease(ctx: ReleaseKitContext, config: ReleaseKitConfig, opts: BuildOptions): BuildResult;
|
|
767
|
+
|
|
768
|
+
interface SubmitOptions extends ProtectedGateOptions {
|
|
769
|
+
channel: string;
|
|
770
|
+
platform?: Platform;
|
|
771
|
+
/** true = usa o metadata.json mais recente gerado por `build`. */
|
|
772
|
+
latest?: boolean;
|
|
773
|
+
/** artefato avulso (.aab/.ipa), sem passar por `build`. */
|
|
774
|
+
path?: string;
|
|
775
|
+
}
|
|
776
|
+
interface SubmitResult {
|
|
777
|
+
dryRun?: boolean;
|
|
778
|
+
command?: string;
|
|
779
|
+
submitProfile: string;
|
|
780
|
+
artifactPath: string;
|
|
781
|
+
}
|
|
782
|
+
declare function submitRelease(ctx: ReleaseKitContext, config: ReleaseKitConfig, opts: SubmitOptions): SubmitResult;
|
|
783
|
+
|
|
784
|
+
interface ShipOptions extends BuildOptions {
|
|
785
|
+
skipDoctor?: boolean;
|
|
786
|
+
allowToolchainDrift?: boolean;
|
|
787
|
+
}
|
|
788
|
+
interface ShipResult {
|
|
789
|
+
dryRun?: boolean;
|
|
790
|
+
artifactPath?: string;
|
|
791
|
+
submit?: SubmitResult;
|
|
792
|
+
}
|
|
793
|
+
declare function shipRelease(ctx: ReleaseKitContext, config: ReleaseKitConfig, opts: ShipOptions): ShipResult;
|
|
794
|
+
|
|
795
|
+
interface BumpVersionOptions {
|
|
796
|
+
bump: VersionBump;
|
|
797
|
+
push?: boolean;
|
|
798
|
+
}
|
|
799
|
+
interface BumpVersionResult {
|
|
800
|
+
from: string;
|
|
801
|
+
to: string;
|
|
802
|
+
tag: string;
|
|
803
|
+
dryRun?: boolean;
|
|
804
|
+
}
|
|
805
|
+
declare function bumpVersion(ctx: ReleaseKitContext, config: ReleaseKitConfig, opts: BumpVersionOptions): BumpVersionResult;
|
|
806
|
+
|
|
807
|
+
declare const PLAY_NOTES_MAX = 500;
|
|
808
|
+
declare const APPLE_WHATS_NEW_MAX = 4000;
|
|
809
|
+
type NotesTarget = 'ios' | 'play';
|
|
810
|
+
declare function notesMaxFor(target: NotesTarget): number;
|
|
811
|
+
declare function assertNotesWithinLimit(text: string, target: NotesTarget, locale: string): void;
|
|
812
|
+
|
|
813
|
+
interface NotesOptions {
|
|
814
|
+
version?: string;
|
|
815
|
+
/** Reabre no editor mesmo se o arquivo já existir. */
|
|
816
|
+
edit?: boolean;
|
|
817
|
+
skipEditor?: boolean;
|
|
818
|
+
}
|
|
819
|
+
interface NotesResult {
|
|
820
|
+
version: string;
|
|
821
|
+
files: Array<{
|
|
822
|
+
path: string;
|
|
823
|
+
target: NotesTarget;
|
|
824
|
+
locale: string;
|
|
825
|
+
}>;
|
|
826
|
+
}
|
|
827
|
+
/**
|
|
828
|
+
* Gera (se faltar) e abre para edição as notas de cada locale/loja. Não
|
|
829
|
+
* publica nada — só prepara os arquivos que `promote`/`review`/`notes`
|
|
830
|
+
* (comando de loja) vão ler depois.
|
|
831
|
+
*/
|
|
832
|
+
declare function draftAndEditNotes(ctx: ReleaseKitContext, config: ReleaseKitConfig, opts: NotesOptions): NotesResult;
|
|
833
|
+
|
|
834
|
+
interface PromoteOptions extends ProtectedGateOptions {
|
|
835
|
+
channel: string;
|
|
836
|
+
platform?: Platform;
|
|
837
|
+
}
|
|
838
|
+
interface PromoteResult {
|
|
839
|
+
android?: {
|
|
840
|
+
versionCodes?: string[];
|
|
841
|
+
status: string;
|
|
842
|
+
};
|
|
843
|
+
ios?: {
|
|
844
|
+
submissionId: string;
|
|
845
|
+
state: string;
|
|
846
|
+
alreadyInProgress: boolean;
|
|
847
|
+
};
|
|
848
|
+
}
|
|
849
|
+
/**
|
|
850
|
+
* `build` + `submit` já colocaram o binário na faixa de teste
|
|
851
|
+
* (Play Internal / TestFlight). `promote` não faz upload nenhum: copia a
|
|
852
|
+
* release pra faixa de produção (Play) ou cria a Review Submission
|
|
853
|
+
* (Apple) — é o equivalente ao `local-validation` → produção do kit
|
|
854
|
+
* original.
|
|
855
|
+
*/
|
|
856
|
+
declare function promoteRelease(ctx: ReleaseKitContext, config: ReleaseKitConfig, opts: PromoteOptions): Promise<PromoteResult>;
|
|
857
|
+
|
|
858
|
+
interface GoogleServiceAccount {
|
|
859
|
+
client_email: string;
|
|
860
|
+
private_key: string;
|
|
861
|
+
[key: string]: unknown;
|
|
862
|
+
}
|
|
863
|
+
declare function parseServiceAccountJson(raw: string): GoogleServiceAccount;
|
|
864
|
+
/**
|
|
865
|
+
* Fluxo OAuth de service account (JWT bearer, RFC 7523), sem
|
|
866
|
+
* `google-auth-library`: assina um JWT RS256 com a private_key da SA e
|
|
867
|
+
* troca por um access_token de curta duração. node:crypto puro.
|
|
868
|
+
*/
|
|
869
|
+
declare function fetchAccessToken(account: GoogleServiceAccount, fetchImpl?: typeof fetch, now?: number): Promise<string>;
|
|
870
|
+
|
|
871
|
+
interface PlayRelease {
|
|
872
|
+
name?: string;
|
|
873
|
+
versionCodes?: string[];
|
|
874
|
+
status: 'completed' | 'inProgress' | 'halted' | 'draft';
|
|
875
|
+
releaseNotes?: Array<{
|
|
876
|
+
language: string;
|
|
877
|
+
text: string;
|
|
878
|
+
}>;
|
|
879
|
+
userFraction?: number;
|
|
880
|
+
}
|
|
881
|
+
type RolloutTarget = number | 'complete' | 'halt';
|
|
882
|
+
|
|
883
|
+
interface RolloutOptions extends ProtectedGateOptions {
|
|
884
|
+
channel: string;
|
|
885
|
+
platform: Platform;
|
|
886
|
+
to: RolloutTarget;
|
|
887
|
+
}
|
|
888
|
+
/**
|
|
889
|
+
* Só Android tem rollout percentual manipulável via API sem reupload
|
|
890
|
+
* (`userFraction`). No iOS o equivalente é o phased release, controlado
|
|
891
|
+
* pelo próprio App Store Connect após a review — não há endpoint de
|
|
892
|
+
* pause/resume simples e estável na API pública hoje; documentado como
|
|
893
|
+
* limitação em vez de fingir suporte.
|
|
894
|
+
*/
|
|
895
|
+
declare function rolloutRelease(ctx: ReleaseKitContext, config: ReleaseKitConfig, opts: RolloutOptions): Promise<PlayRelease | {
|
|
896
|
+
dryRun: boolean;
|
|
897
|
+
}>;
|
|
898
|
+
|
|
899
|
+
interface StatusOptions {
|
|
900
|
+
channel: string;
|
|
901
|
+
}
|
|
902
|
+
interface StatusResult {
|
|
903
|
+
version: string;
|
|
904
|
+
android?: {
|
|
905
|
+
track: string;
|
|
906
|
+
releases: Array<{
|
|
907
|
+
status: string;
|
|
908
|
+
versionCodes?: string[];
|
|
909
|
+
userFraction?: number;
|
|
910
|
+
}>;
|
|
911
|
+
};
|
|
912
|
+
ios?: {
|
|
913
|
+
appStoreState: string | null;
|
|
914
|
+
reviewSubmissionState: string | null;
|
|
915
|
+
};
|
|
916
|
+
}
|
|
917
|
+
declare function statusOf(ctx: ReleaseKitContext, config: ReleaseKitConfig, opts: StatusOptions): Promise<StatusResult>;
|
|
918
|
+
|
|
919
|
+
interface UpdateOptions extends ProtectedGateOptions {
|
|
920
|
+
channel: string;
|
|
921
|
+
message?: string;
|
|
922
|
+
platform?: Platform | 'all';
|
|
923
|
+
}
|
|
924
|
+
interface UpdateResult {
|
|
925
|
+
dryRun?: boolean;
|
|
926
|
+
command?: string;
|
|
927
|
+
channel: string;
|
|
928
|
+
}
|
|
929
|
+
/**
|
|
930
|
+
* OTA via `eas update`. Canal protegido passa pelo mesmo gate fail-closed
|
|
931
|
+
* do build/submit: só roda com --i-know-this-is-production ou confirmando
|
|
932
|
+
* a versão — nunca por padrão, mesmo em `release-kit update` sem flags.
|
|
933
|
+
*/
|
|
934
|
+
declare function updateRelease(ctx: ReleaseKitContext, config: ReleaseKitConfig, opts: UpdateOptions): UpdateResult;
|
|
935
|
+
|
|
936
|
+
/**
|
|
937
|
+
* Rascunho a partir dos commits (feat/fix) desde a última tag. Não traduz
|
|
938
|
+
* nem reescreve em linguagem de usuário — é ponto de partida para editar
|
|
939
|
+
* no $EDITOR, não o texto final.
|
|
940
|
+
*/
|
|
941
|
+
declare function draftNotes(commits: CommitEntry[], version: string): string;
|
|
942
|
+
|
|
943
|
+
interface AppStoreConnectCredentials {
|
|
944
|
+
keyId: string;
|
|
945
|
+
issuerId: string;
|
|
946
|
+
/** Conteúdo do arquivo .p8 (PEM), não o path. */
|
|
947
|
+
privateKeyPem: string;
|
|
948
|
+
}
|
|
949
|
+
/**
|
|
950
|
+
* JWT ES256 exigido pela App Store Connect API. Sem SDK (Spaceship) —
|
|
951
|
+
* assinatura via node:crypto puro, então funciona igual em qualquer SO.
|
|
952
|
+
* Expira em 20 minutos (o máximo aceito pela Apple); gerar um novo por
|
|
953
|
+
* chamada evita lidar com relógio/cache entre processos.
|
|
954
|
+
*/
|
|
955
|
+
declare function createAppStoreConnectToken(credentials: AppStoreConnectCredentials, now?: number): string;
|
|
956
|
+
|
|
957
|
+
export { APPLE_WHATS_NEW_MAX, type ChannelConfig, PLAY_NOTES_MAX, type Platform, type ReleaseKitConfig, type ReleaseKitContext, assertChannelOptIn, assertNotesWithinLimit, buildRelease, bumpVersion, channelOf, checkGitPolicy, commitsSinceLastTag, configExists, createAppStoreConnectToken, createContext, draftAndEditNotes, draftNotes, fetchAccessToken, loadConfig, nextVersion, notesMaxFor, parseConfig, parseServiceAccountJson, promoteRelease, protectedChannelNames, readAppVersion, releaseKitConfigSchema, rolloutRelease, runDoctor, shipRelease, statusOf, submitRelease, updateRelease, userFacingCommits, writeAppVersion, writeConfig };
|