Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(mac): notary with pure api key auth #7896

Merged
merged 4 commits into from
Nov 26, 2023

Conversation

dahchon
Copy link
Contributor

@dahchon dahchon commented Nov 24, 2023

#7861 added ways of api key auth. However, if we'd like to use api key, teamId must not be provided.

https://github.com/electron-userland/electron-builder/blob/master/packages/app-builder-lib/src/macPackager.ts#L550C9-L550C15

The validation logic can be found at: https://github.com/electron/notarize/blob/main/src/validate-args.ts#L92-L98

Copy link

changeset-bot bot commented Nov 24, 2023

🦋 Changeset detected

Latest commit: 62fddf1

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 8 packages
Name Type
app-builder-lib Patch
dmg-builder Patch
electron-builder-squirrel-windows Patch
electron-builder Patch
electron-forge-maker-appimage Patch
electron-forge-maker-nsis-web Patch
electron-forge-maker-nsis Patch
electron-forge-maker-snap Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

netlify bot commented Nov 24, 2023

Deploy Preview for car-park-attendant-cleat-11576 ready!

Name Link
🔨 Latest commit 62fddf1
🔍 Latest deploy log https://app.netlify.com/sites/car-park-attendant-cleat-11576/deploys/65615dfeb5a56f0008a109d2
😎 Deploy Preview https://deploy-preview-7896--car-park-attendant-cleat-11576.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@dahchon dahchon changed the title fix(max): notary with pure api key auth fix(mac): notary with pure api key auth Nov 24, 2023
@mmaietta
Copy link
Collaborator

Looks like there's some compiler issues. You can debug locally easily with pnpm compile --watch

Error: packages/app-builder-lib/src/macPackager.ts(564,7): error TS2322: Type '{ appleId: string; appleIdPassword: string; teamId: string; appPath: string; } | { appleApiKey: string; appleApiKeyId: string; appleApiIssuer: string; appPath: string; } | { keychainProfile: string; keychain?: string | undefined; appPath: string; }' is not assignable to type 'NotarizeOptions | undefined'.
  Type '{ appleId: string; appleIdPassword: string; teamId: string; appPath: string; }' is not assignable to type 'NotarizeOptions | undefined'.
    Type '{ appleId: string; appleIdPassword: string; teamId: string; appPath: string; }' is not assignable to type '{ tool: "notarytool"; } & NotaryToolNotarizeAppOptions & NotaryToolPasswordCredentials'.
      Property 'tool' is missing in type '{ appleId: string; appleIdPassword: string; teamId: string; appPath: string; }' but required in type '{ tool: "notarytool"; }'.

@dahchon
Copy link
Contributor Author

dahchon commented Nov 25, 2023

Looks like there's some compiler issues. You can debug locally easily with pnpm compile --watch

Error: packages/app-builder-lib/src/macPackager.ts(564,7): error TS2322: Type '{ appleId: string; appleIdPassword: string; teamId: string; appPath: string; } | { appleApiKey: string; appleApiKeyId: string; appleApiIssuer: string; appPath: string; } | { keychainProfile: string; keychain?: string | undefined; appPath: string; }' is not assignable to type 'NotarizeOptions | undefined'.
  Type '{ appleId: string; appleIdPassword: string; teamId: string; appPath: string; }' is not assignable to type 'NotarizeOptions | undefined'.
    Type '{ appleId: string; appleIdPassword: string; teamId: string; appPath: string; }' is not assignable to type '{ tool: "notarytool"; } & NotaryToolNotarizeAppOptions & NotaryToolPasswordCredentials'.
      Property 'tool' is missing in type '{ appleId: string; appleIdPassword: string; teamId: string; appPath: string; }' but required in type '{ tool: "notarytool"; }'.

thanks! pushed a fix

@mmaietta mmaietta merged commit 65817e0 into electron-userland:master Nov 26, 2023
12 checks passed
@github-actions github-actions bot mentioned this pull request Nov 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants