Skip to content

Commit

Permalink
chore(docs): exporting more things to API docs (#7898)
Browse files Browse the repository at this point in the history
  • Loading branch information
mmaietta authored Nov 29, 2023
1 parent d1347a0 commit 061d729
Show file tree
Hide file tree
Showing 9 changed files with 814 additions and 76 deletions.
820 changes: 756 additions & 64 deletions docs/api/electron-builder.md

Large diffs are not rendered by default.

18 changes: 16 additions & 2 deletions docs/configuration/mac.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
The top-level [mac](configuration.md#Configuration-mac) key contains set of options instructing electron-builder on how it should build macOS targets. These options applicable for any macOS target.

<!-- do not edit. start of generated block -->
<h2 id="macconfiguration">MacConfiguration</h2>
<p>undefined</p>
<ul>
<li>
<p><code id="MacConfiguration-category">category</code> String | “undefined” - The application category type, as shown in the Finder via <em>View -&gt; Arrange by Application Category</em> when viewing the Applications directory.</p>
Expand Down Expand Up @@ -105,10 +107,22 @@ The top-level [mac](configuration.md#Configuration-mac) key contains set of opti
<p>This option has no effect unless building for “universal” arch and applies only if <code>mergeASARs</code> is <code>true</code>.</p>
</li>
<li>
<p><code id="MacConfiguration-notarize">notarize</code> module:app-builder-lib/out/options/macOptions.NotarizeLegacyOptions | module:app-builder-lib/out/options/macOptions.NotarizeNotaryOptions | Boolean | “undefined” - Options to use for @electron/notarize (ref: <a href="https://github.com/electron/notarize">https://github.com/electron/notarize</a>). Supports both <code>legacy</code> and <code>notarytool</code> notarization tools. Use <code>false</code> to explicitly disable</p>
<p>Note: In order to activate the notarization step You MUST specify one of the following via environment variables:\n1. <code>APPLE_API_KEY</code>, <code>APPLE_API_KEY_ID</code> and <code>APPLE_API_ISSUER</code>\n2. <code>APPLE_ID</code> and <code>APPLE_APP_SPECIFIC_PASSWORD</code>\n3. <code>APPLE_KEYCHAIN</code> and <code>APPLE_KEYCHAIN_PROFILE</code>\n\nFor security reasons it is recommended to use the first option (see <a href="https://github.com/electron-userland/electron-builder/issues/7859">https://github.com/electron-userland/electron-builder/issues/7859</a>)</p>
<p><code id="MacConfiguration-notarize">notarize</code> <a href="#NotarizeLegacyOptions">NotarizeLegacyOptions</a> | <a href="#NotarizeNotaryOptions">NotarizeNotaryOptions</a> | Boolean | “undefined” - Options to use for @electron/notarize (ref: <a href="https://github.com/electron/notarize">https://github.com/electron/notarize</a>). Supports both <code>legacy</code> and <code>notarytool</code> notarization tools. Use <code>false</code> to explicitly disable</p>
<p>Note: In order to activate the notarization step You MUST specify one of the following via environment variables: 1. <code>APPLE_API_KEY</code>, <code>APPLE_API_KEY_ID</code> and <code>APPLE_API_ISSUER</code>. 2. <code>APPLE_ID</code> and <code>APPLE_APP_SPECIFIC_PASSWORD</code> 3. <code>APPLE_KEYCHAIN</code> and <code>APPLE_KEYCHAIN_PROFILE</code></p>
<p>For security reasons it is recommended to use the first option (see <a href="https://github.com/electron-userland/electron-builder/issues/7859">https://github.com/electron-userland/electron-builder/issues/7859</a>)</p>
</li>
</ul>
<h2 id="notarizelegacyoptions">NotarizeLegacyOptions</h2>
<p>undefined</p>
<ul>
<li><code id="NotarizeLegacyOptions-appBundleId">appBundleId</code> String | “undefined” - The app bundle identifier your Electron app is using. E.g. com.github.electron. Useful if notarization ID differs from app ID (unlikely). Only used by <code>legacy</code> notarization tool</li>
<li><code id="NotarizeLegacyOptions-ascProvider">ascProvider</code> String | “undefined” - Your Team Short Name. Only used by <code>legacy</code> notarization tool</li>
</ul>
<h2 id="notarizenotaryoptions">NotarizeNotaryOptions</h2>
<p>undefined</p>
<ul>
<li><strong><code id="NotarizeNotaryOptions-teamId">teamId</code></strong> String - The team ID you want to notarize under for when using <code>notarytool</code></li>
</ul>

<!-- end of generated block -->

Expand Down
19 changes: 19 additions & 0 deletions docs/configuration/publish.md
Original file line number Diff line number Diff line change
Expand Up @@ -323,5 +323,24 @@ Or in the <a href="http://docs.aws.amazon.com/sdk-for-javascript/v2/developer-gu
<p><code id="S3Options-path">path</code> = <code>/</code> String | “undefined” - The directory path.</p>
</li>
</ul>
<h2 id="custompublishoptions">CustomPublishOptions</h2>
<p>undefined</p>
<ul>
<li><strong><code id="CustomPublishOptions-provider">provider</code></strong> “custom” - The provider. Must be <code>custom</code>.</li>
<li><code id="CustomPublishOptions-updateProvider">updateProvider</code> module:builder-util-runtime/out/publishOptions.__type - The Provider to provide UpdateInfo regarding available updates. Required to use custom providers with electron-updater.</li>
</ul>
<p>Inherited from <code>PublishConfiguration</code>:</p>
<ul>
<li>
<p><code id="CustomPublishOptions-publishAutoUpdate">publishAutoUpdate</code> = <code>true</code> Boolean - Whether to publish auto update info files.</p>
<p>Auto update relies only on the first provider in the list (you can specify several publishers). Thus, probably, there`s no need to upload the metadata files for the other configured providers. But by default will be uploaded.</p>
</li>
<li>
<p><code id="CustomPublishOptions-requestHeaders">requestHeaders</code> module:http.OutgoingHttpHeaders - Any custom request headers</p>
</li>
<li>
<p><code id="CustomPublishOptions-timeout">timeout</code> = <code>120000</code> Number | “undefined” - Request timeout in milliseconds. (Default is 2 minutes; O is ignored)</p>
</li>
</ul>

<!-- end of generated block -->
2 changes: 1 addition & 1 deletion docs/configuration/snap.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ The top-level [snap](configuration.md#Configuration-snap) key contains set of op
<p>Additional attributes can be specified using object instead of just name of plug: <code>[ { &quot;browser-sandbox&quot;: { &quot;interface&quot;: &quot;browser-support&quot;, &quot;allow-sandbox&quot;: true }, }, &quot;another-simple-plug-name&quot; ]</code></p>
</li>
<li>
<p><code id="SnapOptions-slots">slots</code> Array&lt;String | module:app-builder-lib/out/options/SnapOptions.SlotDescriptor&gt; | module:app-builder-lib/out/options/SnapOptions.PlugDescriptor | “undefined” - The list of <a href="https://snapcraft.io/docs/reference/interfaces">slots</a>.</p>
<p><code id="SnapOptions-slots">slots</code> Array&lt;String | <a href="#SlotDescriptor">SlotDescriptor</a>&gt; | <a href="#PlugDescriptor">PlugDescriptor</a> | “undefined” - The list of <a href="https://snapcraft.io/docs/reference/interfaces">slots</a>.</p>
<p>Additional attributes can be specified using object instead of just name of slot: ``` [ { “mpris”: { “name”: “chromium” }, } ]</p>
<p>In case you want your application to be a compliant MPris player, you will need to definie The mpris slot with “chromium” name. This electron has it <a href="https://source.chromium.org/chromium/chromium/src/+/master:components/system_media_controls/linux/system_media_controls_linux.cc;l=51;bpv=0;bpt=1">hardcoded</a>, and we need to pass this name so snap <a href="https://forum.snapcraft.io/t/unable-to-use-mpris-interface/15360/7">will allow it</a> in strict confinement.</p>
</li>
Expand Down
4 changes: 2 additions & 2 deletions packages/app-builder-lib/scheme.json
Original file line number Diff line number Diff line change
Expand Up @@ -2680,7 +2680,7 @@
]
}
],
"description": "Options to use for @electron/notarize (ref: https://github.com/electron/notarize).\nSupports both `legacy` and `notarytool` notarization tools. Use `false` to explicitly disable\n\nNote: In order to activate the notarization step You MUST specify one of the following via environment variables:\\n1. `APPLE_API_KEY`, `APPLE_API_KEY_ID` and `APPLE_API_ISSUER`\\n2. `APPLE_ID` and `APPLE_APP_SPECIFIC_PASSWORD`\\n3. `APPLE_KEYCHAIN` and `APPLE_KEYCHAIN_PROFILE`\\n\\nFor security reasons it is recommended to use the first option (see https://github.com/electron-userland/electron-builder/issues/7859)"
"description": "Options to use for @electron/notarize (ref: https://github.com/electron/notarize).\nSupports both `legacy` and `notarytool` notarization tools. Use `false` to explicitly disable\n\nNote: In order to activate the notarization step You MUST specify one of the following via environment variables:\n1. `APPLE_API_KEY`, `APPLE_API_KEY_ID` and `APPLE_API_ISSUER`.\n2. `APPLE_ID` and `APPLE_APP_SPECIFIC_PASSWORD`\n3. `APPLE_KEYCHAIN` and `APPLE_KEYCHAIN_PROFILE`\n\nFor security reasons it is recommended to use the first option (see https://github.com/electron-userland/electron-builder/issues/7859)"
},
"preAutoEntitlements": {
"default": true,
Expand Down Expand Up @@ -3313,7 +3313,7 @@
]
}
],
"description": "Options to use for @electron/notarize (ref: https://github.com/electron/notarize).\nSupports both `legacy` and `notarytool` notarization tools. Use `false` to explicitly disable\n\nNote: In order to activate the notarization step You MUST specify one of the following via environment variables:\\n1. `APPLE_API_KEY`, `APPLE_API_KEY_ID` and `APPLE_API_ISSUER`\\n2. `APPLE_ID` and `APPLE_APP_SPECIFIC_PASSWORD`\\n3. `APPLE_KEYCHAIN` and `APPLE_KEYCHAIN_PROFILE`\\n\\nFor security reasons it is recommended to use the first option (see https://github.com/electron-userland/electron-builder/issues/7859)"
"description": "Options to use for @electron/notarize (ref: https://github.com/electron/notarize).\nSupports both `legacy` and `notarytool` notarization tools. Use `false` to explicitly disable\n\nNote: In order to activate the notarization step You MUST specify one of the following via environment variables:\n1. `APPLE_API_KEY`, `APPLE_API_KEY_ID` and `APPLE_API_ISSUER`.\n2. `APPLE_ID` and `APPLE_APP_SPECIFIC_PASSWORD`\n3. `APPLE_KEYCHAIN` and `APPLE_KEYCHAIN_PROFILE`\n\nFor security reasons it is recommended to use the first option (see https://github.com/electron-userland/electron-builder/issues/7859)"
},
"preAutoEntitlements": {
"default": true,
Expand Down
4 changes: 2 additions & 2 deletions packages/app-builder-lib/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export { Configuration, AfterPackContext, MetadataDirectories } from "./configur
export { ElectronBrandingOptions, ElectronDownloadOptions, ElectronPlatformName } from "./electron/ElectronFramework"
export { PlatformSpecificBuildOptions, AsarOptions, FileSet, Protocol, ReleaseInfo } from "./options/PlatformSpecificBuildOptions"
export { FileAssociation } from "./options/FileAssociation"
export { MacConfiguration, DmgOptions, MasConfiguration, MacOsTargetName, DmgContent, DmgWindow } from "./options/macOptions"
export { MacConfiguration, DmgOptions, MasConfiguration, MacOsTargetName, DmgContent, DmgWindow, NotarizeLegacyOptions, NotarizeNotaryOptions } from "./options/macOptions"
export { PkgOptions, PkgBackgroundOptions, BackgroundAlignment, BackgroundScaling } from "./options/pkgOptions"
export { WindowsConfiguration } from "./options/winOptions"
export { AppXOptions } from "./options/AppXOptions"
Expand All @@ -35,7 +35,7 @@ export { MsiWrappedOptions } from "./options/MsiWrappedOptions"
export { CommonWindowsInstallerConfiguration } from "./options/CommonWindowsInstallerConfiguration"
export { NsisOptions, NsisWebOptions, PortableOptions, CommonNsisOptions } from "./targets/nsis/nsisOptions"
export { LinuxConfiguration, DebOptions, CommonLinuxOptions, LinuxTargetSpecificOptions, AppImageOptions, FlatpakOptions } from "./options/linuxOptions"
export { SnapOptions } from "./options/SnapOptions"
export { SnapOptions, PlugDescriptor, SlotDescriptor } from "./options/SnapOptions"
export { Metadata, AuthorMetadata, RepositoryInfo } from "./options/metadata"
export { AppInfo } from "./appInfo"
export { SquirrelWindowsOptions } from "./options/SquirrelWindowsOptions"
Expand Down
7 changes: 6 additions & 1 deletion packages/app-builder-lib/src/options/macOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,12 @@ export interface MacConfiguration extends PlatformSpecificBuildOptions {
* Options to use for @electron/notarize (ref: https://github.com/electron/notarize).
* Supports both `legacy` and `notarytool` notarization tools. Use `false` to explicitly disable
*
* Note: In order to activate the notarization step You MUST specify one of the following via environment variables:\n1. `APPLE_API_KEY`, `APPLE_API_KEY_ID` and `APPLE_API_ISSUER`\n2. `APPLE_ID` and `APPLE_APP_SPECIFIC_PASSWORD`\n3. `APPLE_KEYCHAIN` and `APPLE_KEYCHAIN_PROFILE`\n\nFor security reasons it is recommended to use the first option (see https://github.com/electron-userland/electron-builder/issues/7859)
* Note: In order to activate the notarization step You MUST specify one of the following via environment variables:
* 1. `APPLE_API_KEY`, `APPLE_API_KEY_ID` and `APPLE_API_ISSUER`.
* 2. `APPLE_ID` and `APPLE_APP_SPECIFIC_PASSWORD`
* 3. `APPLE_KEYCHAIN` and `APPLE_KEYCHAIN_PROFILE`
*
* For security reasons it is recommended to use the first option (see https://github.com/electron-userland/electron-builder/issues/7859)
*/
readonly notarize?: NotarizeLegacyOptions | NotarizeNotaryOptions | boolean | null
}
Expand Down
1 change: 1 addition & 0 deletions packages/electron-updater/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { URL } from "url"
import { AppUpdater } from "./AppUpdater"
import { LoginCallback } from "./electronHttpExecutor"

export { BaseUpdater } from "./BaseUpdater"
export { AppUpdater, NoOpLogger } from "./AppUpdater"
export { CancellationToken, PackageFileInfo, ProgressInfo, UpdateFileInfo, UpdateInfo }
export { Provider } from "./providers/Provider"
Expand Down
15 changes: 11 additions & 4 deletions scripts/jsdoc2md2html.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,14 @@ async function main() {

const files = [
path.join(source, "builder/electron-builder.js"),
path.join(source, "publisher/electron-publish.js"),
path.join(source, "updater/electron-updater.js"),
path.join(source, "builder-lib/app-builder-lib.js"),
path.join(source, "builder-util-runtime/builder-util-runtime.js"),
path.join(source, "dmg-builder/dmg-builder.js"),
path.join(source, "publisher/electron-publish.js"),
path.join(source, "updater/electron-updater.js"),
path.join(source, "util/builder-util.js"),
]
// const files = (await globby(["**/*.js"], {cwd: source})).map(it => path.resolve(source, it))
const pages = [
{
page: "api/electron-builder.md", pageUrl: "electron-builder",
Expand Down Expand Up @@ -206,7 +208,11 @@ async function render2(files, jsdoc2MdOptions) {
const pages = [
new Page("configuration/configuration.md", "Configuration"),

new Page("configuration/mac.md", "MacConfiguration"),
new Page("configuration/mac.md", null, {
"MacConfiguration": "",
"NotarizeLegacyOptions" : "",
"NotarizeNotaryOptions" : ""
}),
new Page("configuration/dmg.md", "DmgOptions"),
new Page("configuration/mas.md", "MasConfiguration"),
new Page("configuration/pkg.md", "PkgOptions"),
Expand All @@ -228,7 +234,8 @@ async function render2(files, jsdoc2MdOptions) {
"SpacesOptions": "",
"KeygenOptions": "",
"BitbucketOptions": "",
"S3Options": ""
"S3Options": "",
"CustomPublishOptions": ""
}),

new Page("generated/appimage-options.md", "AppImageOptions"),
Expand Down

0 comments on commit 061d729

Please sign in to comment.