1
0
mirror of https://github.com/mifi/lossless-cut.git synced 2024-11-26 04:02:51 +01:00
lossless-cut/patches/electron-notarize+0.2.1.patch
2020-04-03 00:25:40 +08:00

128 lines
15 KiB
Diff

diff --git a/node_modules/electron-notarize/lib/index.d.ts b/node_modules/electron-notarize/lib/index.d.ts
index fa85cc0..b907a32 100644
--- a/node_modules/electron-notarize/lib/index.d.ts
+++ b/node_modules/electron-notarize/lib/index.d.ts
@@ -1,3 +1,4 @@
+export { validateAuthorizationArgs } from './validate-args';
export interface NotarizePasswordCredentials {
appleId: string;
appleIdPassword: string;
diff --git a/node_modules/electron-notarize/lib/index.js b/node_modules/electron-notarize/lib/index.js
index f47fdf1..788d8aa 100644
--- a/node_modules/electron-notarize/lib/index.js
+++ b/node_modules/electron-notarize/lib/index.js
@@ -21,11 +21,16 @@ var __rest = (this && this.__rest) || function (s, e) {
Object.defineProperty(exports, "__esModule", { value: true });
const debug = require("debug");
const path = require("path");
+const pRetry = require("p-retry");
const spawn_1 = require("./spawn");
const helpers_1 = require("./helpers");
+const validate_args_1 = require("./validate-args");
const d = debug('electron-notarize');
-function authorizationArgs(opts) {
- if ('appleId' in opts) {
+var validate_args_2 = require("./validate-args");
+exports.validateAuthorizationArgs = validate_args_2.validateAuthorizationArgs;
+function authorizationArgs(rawOpts) {
+ const opts = validate_args_1.validateAuthorizationArgs(rawOpts);
+ if (validate_args_1.isPasswordCredentials(opts)) {
return ['-u', helpers_1.makeSecret(opts.appleId), '-p', helpers_1.makeSecret(opts.appleIdPassword)];
}
else {
@@ -62,10 +67,16 @@ function startNotarize(opts) {
if (opts.ascProvider) {
notarizeArgs.push('-itc_provider', opts.ascProvider);
}
- const result = yield spawn_1.spawn('xcrun', notarizeArgs);
- if (result.code !== 0) {
- throw new Error(`Failed to upload app to Apple's notarization servers\n\n${result.output}`);
+ function uploadApp() {
+ return __awaiter(this, void 0, void 0, function* () {
+ const result = yield spawn_1.spawn('xcrun', notarizeArgs);
+ if (result.code !== 0) {
+ throw new Error(`Failed to upload app to Apple's notarization servers\n\n${result.output}`);
+ }
+ return result;
+ });
}
+ const result = yield pRetry(uploadApp, { retries: 5 });
d('upload success');
const uuidMatch = /\nRequestUUID = (.+?)\n/g.exec(result.output);
if (!uuidMatch) {
diff --git a/node_modules/electron-notarize/lib/index.js.map b/node_modules/electron-notarize/lib/index.js.map
index d69501c..95e75fb 100644
--- a/node_modules/electron-notarize/lib/index.js.map
+++ b/node_modules/electron-notarize/lib/index.js.map
@@ -1 +1 @@
-{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,+BAA+B;AAC/B,6BAA6B;AAE7B,mCAAgC;AAChC,uCAA2E;AAE3E,MAAM,CAAC,GAAG,KAAK,CAAC,mBAAmB,CAAC,CAAC;AAgCrC,SAAS,iBAAiB,CAAC,IAAyB;IAClD,IAAI,SAAS,IAAI,IAAI,EAAE;QACrB,OAAO,CAAC,IAAI,EAAE,oBAAU,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,oBAAU,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC;KACjF;SAAM;QACL,OAAO;YACL,UAAU;YACV,oBAAU,CAAC,IAAI,CAAC,WAAW,CAAC;YAC5B,aAAa;YACb,oBAAU,CAAC,IAAI,CAAC,cAAc,CAAC;SAChC,CAAC;KACH;AACH,CAAC;AAED,SAAsB,aAAa,CAAC,IAA0B;;QAC5D,CAAC,CAAC,oCAAoC,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QACtD,OAAO,MAAM,qBAAW,CAAiB,CAAM,GAAG,EAAC,EAAE;YACnD,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;YAChF,CAAC,CAAC,yBAAyB,EAAE,OAAO,CAAC,CAAC;YACtC,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C,CAAC,0CAA0C,CAAC,CAAC;QAC9C,MAAM,eAAe,iBAAG,IAAI,IAAK,WAAW,EAAG,CAAC;QAChD,MAAM,SAAS,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC;;CAC9B;AAzBD,4BAyBC;AAED,SAAS,KAAK,CAAC,EAAU;IACvB,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC;AACzD,CAAC"}
\ No newline at end of file
diff --git a/node_modules/electron-notarize/lib/validate-args.d.ts b/node_modules/electron-notarize/lib/validate-args.d.ts
new file mode 100644
index 0000000..8e11530
--- /dev/null
+++ b/node_modules/electron-notarize/lib/validate-args.d.ts
@@ -0,0 +1,4 @@
+import { NotarizeApiKeyCredentials, NotarizeCredentials, NotarizePasswordCredentials } from './index';
+export declare function isPasswordCredentials(opts: NotarizeCredentials): opts is NotarizePasswordCredentials;
+export declare function isApiKeyCredentials(opts: NotarizeCredentials): opts is NotarizeApiKeyCredentials;
+export declare function validateAuthorizationArgs(opts: NotarizeCredentials): NotarizeCredentials;
diff --git a/node_modules/electron-notarize/lib/validate-args.js b/node_modules/electron-notarize/lib/validate-args.js
new file mode 100644
index 0000000..389f35a
--- /dev/null
+++ b/node_modules/electron-notarize/lib/validate-args.js
@@ -0,0 +1,41 @@
+Object.defineProperty(exports, "__esModule", { value: true });
+function isPasswordCredentials(opts) {
+ const creds = opts;
+ return creds.appleId !== undefined || creds.appleIdPassword !== undefined;
+}
+exports.isPasswordCredentials = isPasswordCredentials;
+function isApiKeyCredentials(opts) {
+ const creds = opts;
+ return creds.appleApiKey !== undefined || creds.appleApiIssuer !== undefined;
+}
+exports.isApiKeyCredentials = isApiKeyCredentials;
+function validateAuthorizationArgs(opts) {
+ const isPassword = isPasswordCredentials(opts);
+ const isApiKey = isApiKeyCredentials(opts);
+ if (isPassword && isApiKey) {
+ throw new Error('Cannot use both password credentials and API key credentials at once');
+ }
+ if (isPassword) {
+ const passwordCreds = opts;
+ if (!passwordCreds.appleId) {
+ throw new Error('The appleId property is required when using notarization with appleIdPassword');
+ }
+ else if (!passwordCreds.appleIdPassword) {
+ throw new Error('The appleIdPassword property is required when using notarization with appleId');
+ }
+ return passwordCreds;
+ }
+ if (isApiKey) {
+ const apiKeyCreds = opts;
+ if (!apiKeyCreds.appleApiKey) {
+ throw new Error('The appleApiKey property is required when using notarization with appleApiIssuer');
+ }
+ else if (!apiKeyCreds.appleApiIssuer) {
+ throw new Error('The appleApiIssuer property is required when using notarization with appleApiKey');
+ }
+ return apiKeyCreds;
+ }
+ throw new Error('No authentication properties provided (e.g. appleId, appleApiKey)');
+}
+exports.validateAuthorizationArgs = validateAuthorizationArgs;
+//# sourceMappingURL=validate-args.js.map
\ No newline at end of file
diff --git a/node_modules/electron-notarize/lib/validate-args.js.map b/node_modules/electron-notarize/lib/validate-args.js.map
new file mode 100644
index 0000000..067f373
--- /dev/null
+++ b/node_modules/electron-notarize/lib/validate-args.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"validate-args.js","sourceRoot":"","sources":["../src/validate-args.ts"],"names":[],"mappings":";AAMA,SAAgB,qBAAqB,CACnC,IAAyB;IAEzB,MAAM,KAAK,GAAG,IAAmC,CAAC;IAClD,OAAO,KAAK,CAAC,OAAO,KAAK,SAAS,IAAI,KAAK,CAAC,eAAe,KAAK,SAAS,CAAC;AAC5E,CAAC;AALD,sDAKC;AAED,SAAgB,mBAAmB,CAAC,IAAyB;IAC3D,MAAM,KAAK,GAAG,IAAiC,CAAC;IAChD,OAAO,KAAK,CAAC,WAAW,KAAK,SAAS,IAAI,KAAK,CAAC,cAAc,KAAK,SAAS,CAAC;AAC/E,CAAC;AAHD,kDAGC;AAED,SAAgB,yBAAyB,CAAC,IAAyB;IACjE,MAAM,UAAU,GAAG,qBAAqB,CAAC,IAAI,CAAC,CAAC;IAC/C,MAAM,QAAQ,GAAG,mBAAmB,CAAC,IAAI,CAAC,CAAC;IAC3C,IA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