This commit is contained in:
Mark Lee 2019-06-25 18:06:58 -07:00 коммит произвёл Mark Lee
Родитель c6b3d29585
Коммит f9fc0a4923
2 изменённых файлов: 9 добавлений и 9 удалений

Просмотреть файл

@ -27,7 +27,7 @@ class Secret {
toString() {
return this.value;
}
inpsect() {
inspect() {
return '******';
}
}
@ -40,7 +40,7 @@ export function isSecret(s: string) {
return (s as any) instanceof Secret;
}
export interface NotarizionInfo {
export interface NotarizationInfo {
uuid: string;
date: Date;
status: 'invalid' | 'in progress' | 'success';
@ -50,9 +50,9 @@ export interface NotarizionInfo {
statusMessage?: string;
}
export function parseNotarizationInfo(info: string): NotarizionInfo {
const out: NotarizionInfo = {} as any;
const matchToProperty = <K extends keyof NotarizionInfo, T extends NotarizionInfo[K]>(key: K, r: RegExp, modifier?: (s: string) => T) => {
export function parseNotarizationInfo(info: string): NotarizationInfo {
const out: NotarizationInfo = {} as any;
const matchToProperty = <K extends keyof NotarizationInfo, T extends NotarizationInfo[K]>(key: K, r: RegExp, modifier?: (s: string) => T) => {
const exec = r.exec(info);
if (exec) {
out[key] = modifier ? modifier(exec[1]) : exec[1];

Просмотреть файл

@ -49,7 +49,7 @@ export async function startNotarize(opts: NotarizeStartOptions): Promise<Notariz
if (zipResult.code !== 0) {
throw new Error(`Failed to zip application, exited with code: ${zipResult.code}\n\n${zipResult.output}`);
}
d('zip succeeded, attempting to upload to apple');
d('zip succeeded, attempting to upload to Apple');
const notarizeArgs = [
'altool',
@ -73,7 +73,7 @@ export async function startNotarize(opts: NotarizeStartOptions): Promise<Notariz
notarizeArgs,
);
if (result.code !== 0) {
throw new Error(`Failed to upload app to Apples notarization servers\n\n${result.output}`);
throw new Error(`Failed to upload app to Apple's notarization servers\n\n${result.output}`);
}
d('upload success');
@ -175,11 +175,11 @@ export async function notarize({
* Wait for Apples API to initialize the status UUID
*
* If we start checking too quickly the UUID is not ready yet
* and this step will fail. It takes apple a number of minutes
* and this step will fail. It takes Apple a number of minutes
* to actually complete the job so an extra 10 second delay here
* is not a big deal
*/
d('notarization started, waiting for 10 seconds before pinging apple for status');
d('notarization started, waiting for 10 seconds before pinging Apple for status');
await delay(10000);
d('starting to poll for notarization status');
await waitForNotarize({ uuid, appleId, appleIdPassword });