-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Export MacPackager class and TypeScript types for codeSigningInfo in AfterPackContext #5972
Comments
That's a great callout. |
Thanks, I can try to find a little spare time to work on this. Do you have any thoughts on the best approach? For example: exposing |
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward? This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
@mmaietta This issue is still relevant for us – if you have some guidance on these questions I'd be open to making a PR! |
I see two routes I suppose?
Or am I misunderstanding your post? If you're worried about the API changing, I have no intention of doing so. Additionally, if you were to explicitly pin the dependency version in your package.json, you wouldn't need to worry about it randomly breaking when an electron-builder update were to be released. |
Partly, I would like to avoid importing from |
Great feedback and clarification. I'll export the classes directly via the main |
❤️ thanks! I guess I could’ve included that detail in the original ticket 😅 |
Additionally, we are currently importing |
Wait, just to confirm. Are you also looking for the I'm wondering if we change the property signature to be a nested and have access to the specific Packager class based on which packager property is populated. Thoughts? No matter what, I can't seem to be able to avoid having you do a force-cast in your code, as the
|
Also, |
The main thing I was trying to access was the |
An
afterPack
script that needs access to the temporary keychain created by MacPackager is able to access it via(await context.packager.codeSigningInfo.value).keychainFile
. However, in TypeScript,context.packager
is a genericPlatformPackager<any>
so this requires awkward type casting (example in https://github.com/foxglove/studio/pull/1270).It would be nice if the MacPackager class itself, or some sanctioned way of accessing the
keychainFile
, could be exported from the package's TypeScript definitions.Workaround: the types for
MacPackager
can be imported viaimport type MacPackager from "app-builder-lib/out/macPackager";
but this seems to be an implementation detail. Guarding withcontext.packager instanceof MacPackager
would require a full import from this non-standard path (not justimport type
) which seems like a bad idea if it's not an official export!The text was updated successfully, but these errors were encountered: