diff --git a/.gitignore b/.gitignore index 4b8ac00ec4..1d750531b4 100644 --- a/.gitignore +++ b/.gitignore @@ -27,7 +27,6 @@ packages/plugin/webpack/spec/fixtures/apps/native-modules/package-lock.json packages/plugin/fuses/spec/fixture/out .links reports -packages/**/typedoc.json .vscode/settings.json .pnp.* .yarn/* diff --git a/.oxfmtrc.json b/.oxfmtrc.json index f446597108..c19507d437 100644 --- a/.oxfmtrc.json +++ b/.oxfmtrc.json @@ -14,7 +14,6 @@ "packages/*/*/index.ts", "packages/*/*/README.md", "packages/*/*/tsconfig.json", - "packages/*/*/typedoc.json", "packages/api/core/spec/fixture/api-tester/package.json", "packages/api/core/spec/fixture/bad_external_forge_config/bad.js", "packages/plugin/webpack/spec/**/.webpack", diff --git a/packages/api/core/README.md b/packages/api/core/README.md index 8bff6ec21a..bfb499bd90 100644 --- a/packages/api/core/README.md +++ b/packages/api/core/README.md @@ -12,7 +12,7 @@ import { api } from '@electron-forge/core'; api.package(import.meta.dirname); ``` -The named export `api` has it's methods documented over at [ForgeAPI](https://js.electronforge.io/classes/_electron_forge_core.ForgeAPI.html). +The named export `api` has it's methods documented over at [ForgeAPI](https://js.electronforge.io/classes/_electron-forge_core.ForgeAPI.html). All the methods are async and expose the core forge methods, please note that all user-side configuration is still done through your forge config file or the "config.forge" section of your package.json. This API simply let's you call the methods in diff --git a/packages/api/core/src/api/make.ts b/packages/api/core/src/api/make.ts index 9a8ab8f902..11bac4b7fa 100644 --- a/packages/api/core/src/api/make.ts +++ b/packages/api/core/src/api/make.ts @@ -33,6 +33,7 @@ type MakerImpl = { new (...args: any[]): MakerBase; }; +/** @inline */ type MakeTargets = ForgeConfigMaker[] | string[]; function generateTargets( diff --git a/packages/api/core/src/util/forge-config.ts b/packages/api/core/src/util/forge-config.ts index c4e5a8f016..92572c455c 100644 --- a/packages/api/core/src/util/forge-config.ts +++ b/packages/api/core/src/util/forge-config.ts @@ -106,11 +106,14 @@ export function unregisterForgeConfigForDirectory(dir: string): void { registeredForgeConfigs.delete(path.resolve(dir)); } -export type BuildIdentifierMap = Record; -export type BuildIdentifierConfig = { +/** @inline */ +export interface BuildIdentifierMap extends Record {} +/** @inline */ +export interface BuildIdentifierConfig { map: BuildIdentifierMap; + /** @internal */ __isMagicBuildIdentifierMap: true; -}; +} export function fromBuildIdentifier( map: BuildIdentifierMap, diff --git a/packages/maker/appx/README.md b/packages/maker/appx/README.md index 998b2c312e..157ba7fce7 100644 --- a/packages/maker/appx/README.md +++ b/packages/maker/appx/README.md @@ -4,7 +4,7 @@ You can only build the AppX target on Windows machines with the Windows 10 SDK installed. -Configuration options are documented in [`MakerAppXConfig`](https://js.electronforge.io/interfaces/_electron_forge_maker_appx.MakerAppXConfig.html). +Configuration options are documented in [`MakerAppXConfig`](https://js.electronforge.io/interfaces/_electron-forge_maker-appx.MakerAppXConfig.html). ```javascript { diff --git a/packages/maker/deb/README.md b/packages/maker/deb/README.md index e973f24025..efbae46d04 100644 --- a/packages/maker/deb/README.md +++ b/packages/maker/deb/README.md @@ -2,7 +2,7 @@ `@electron-forge/maker-deb` builds .deb packages, which are the standard package format for Debian-based Linux distributions such as Ubuntu. You can only build the deb target on Linux or macOS machines with the fakeroot and dpkg packages installed. -Configuration options are documented in [`MakerDebConfigOptions`](https://js.electronforge.io/interfaces/_electron_forge_maker_deb.InternalOptions.MakerDebConfigOptions.html). +Configuration options are documented in [`MakerDebConfigOptions`](https://js.electronforge.io/interfaces/_electron-forge_maker-dmg.MakerDMGConfig.html). ```javascript { diff --git a/packages/maker/deb/src/MakerDeb.ts b/packages/maker/deb/src/MakerDeb.ts index b024cae802..7d07c48292 100644 --- a/packages/maker/deb/src/MakerDeb.ts +++ b/packages/maker/deb/src/MakerDeb.ts @@ -61,3 +61,4 @@ export default class MakerDeb extends MakerBase { } export { MakerDeb, MakerDebConfig }; +export type { MakerDebConfigOptions } from './Config.ts'; diff --git a/packages/maker/dmg/README.md b/packages/maker/dmg/README.md index 360593408a..fbded7b6ff 100644 --- a/packages/maker/dmg/README.md +++ b/packages/maker/dmg/README.md @@ -2,7 +2,7 @@ `@electron-forge/maker-dmg` builds `.dmg` files, which are the standard format for sharing macOS apps. You can only build the DMG target on macOS machines. -Configuration options are documented in [`MakerDMGConfig`](https://js.electronforge.io/interfaces/_electron_forge_maker_dmg.MakerDMGConfig.html). +Configuration options are documented in [`MakerDMGConfig`](https://js.electronforge.io/interfaces/_electron-forge_maker-dmg.MakerDMGConfig.html). ```javascript { diff --git a/packages/maker/dmg/src/Config.ts b/packages/maker/dmg/src/Config.ts index 003053532f..513243ed87 100644 --- a/packages/maker/dmg/src/Config.ts +++ b/packages/maker/dmg/src/Config.ts @@ -1,6 +1,8 @@ import type { ElectronInstallerDMGOptions } from 'electron-installer-dmg'; -export type MakerDMGConfig = Omit< +export interface MakerDMGConfig extends Omit< ElectronInstallerDMGOptions, 'name' | 'appPath' | 'out' -> & { name?: string }; +> { + name?: string; +} diff --git a/typedoc.base.json b/packages/maker/dmg/typedoc.jsonc similarity index 64% rename from typedoc.base.json rename to packages/maker/dmg/typedoc.jsonc index 0eaa4ce92c..295a210546 100644 --- a/typedoc.base.json +++ b/packages/maker/dmg/typedoc.jsonc @@ -1,4 +1,4 @@ { "$schema": "https://typedoc.org/schema.json", - "excludeInternal": true + "excludeExternals": false, } diff --git a/packages/maker/flatpak/README.md b/packages/maker/flatpak/README.md index 9f1d629a26..386e28387d 100644 --- a/packages/maker/flatpak/README.md +++ b/packages/maker/flatpak/README.md @@ -4,7 +4,7 @@ You can only build the Flatpak target if you have `flatpak`, `flatpak-builder`, and `eu-strip` _\(usually part of the `elfutils` package\)_ installed on your system. -Configuration options are documented in [`MakerFlatpakOptionsConfig`](https://js.electronforge.io/interfaces/_electron_forge_maker_flatpak.InternalOptions.MakerFlatpakOptionsConfig.html). +Configuration options are documented in [`MakerFlatpakOptionsConfig`](https://js.electronforge.io/interfaces/_electron-forge_maker-flatpak.MakerFlatpakConfigOptions.html). ```javascript { diff --git a/packages/maker/flatpak/src/Config.ts b/packages/maker/flatpak/src/Config.ts index a71e56c677..9c5d9d4043 100644 --- a/packages/maker/flatpak/src/Config.ts +++ b/packages/maker/flatpak/src/Config.ts @@ -1,4 +1,4 @@ -export interface MakerFlatpakOptionsConfig { +export interface MakerFlatpakConfigOptions { /** * App id of the flatpak, used in the id field of a flatpak-builder manifest. * @@ -122,5 +122,5 @@ export interface MakerFlatpakOptionsConfig { } export interface MakerFlatpakConfig { - options?: MakerFlatpakOptionsConfig; + options?: MakerFlatpakConfigOptions; } diff --git a/packages/maker/flatpak/src/MakerFlatpak.ts b/packages/maker/flatpak/src/MakerFlatpak.ts index e109a05ffb..b2a15b5a61 100644 --- a/packages/maker/flatpak/src/MakerFlatpak.ts +++ b/packages/maker/flatpak/src/MakerFlatpak.ts @@ -59,3 +59,4 @@ export default class MakerFlatpak extends MakerBase { } export { MakerFlatpak, MakerFlatpakConfig }; +export type { MakerFlatpakConfigOptions } from './Config.ts'; diff --git a/packages/maker/msix/README.md b/packages/maker/msix/README.md index c2ecbca0df..6868430588 100644 --- a/packages/maker/msix/README.md +++ b/packages/maker/msix/README.md @@ -8,7 +8,7 @@ You can only build the MSIX target on Windows machines with the Windows 10 SDK installed. -Configuration options are documented in [`MakerMSIXConfig`](https://js.electronforge.io/interfaces/_electron_forge_maker_msix.MakerMSIXConfig.html). +Configuration options are documented in [`MakerMSIXConfig`](https://js.electronforge.io/interfaces/_electron-forge_maker-msix.MakerMSIXConfig.html). maker-msix utilizes @electron/windows-sign via the `windowsSignOptions` property. See the [windows-sign documentation](https://github.com/electron/windows-sign/blob/main/README.md) for details. diff --git a/packages/maker/msix/src/Config.ts b/packages/maker/msix/src/Config.ts index ed4fe809bf..b1daee6f1c 100644 --- a/packages/maker/msix/src/Config.ts +++ b/packages/maker/msix/src/Config.ts @@ -5,6 +5,16 @@ import { type SemiPartial = Omit & Partial>; +export interface MakerMSIXConfigManifestVariables extends SemiPartial< + ManifestGenerationVariables, + | 'packageDescription' + | 'appExecutable' + | 'packageVersion' + | 'publisher' + | 'packageIdentity' + | 'targetArch' +> {} + /** * The configuration object for the MSIX maker. * The `outputDir` and `appDir` parameters are preconfigured by Forge so that the @@ -15,19 +25,11 @@ type SemiPartial = Omit & Partial>; * * @see https://github.com/bitdisaster/electron-windows-msix/blob/master/src/types.ts */ -export type MakerMSIXConfig = Omit< +export interface MakerMSIXConfig extends Omit< MSIXPackagingOptions, 'outputDir' | 'appDir' | 'manifestVariables' -> & { - manifestVariables?: SemiPartial< - ManifestGenerationVariables, - | 'packageDescription' - | 'appExecutable' - | 'packageVersion' - | 'publisher' - | 'packageIdentity' - | 'targetArch' - >; +> { + manifestVariables?: MakerMSIXConfigManifestVariables; /** * The base name of the generated `.msix` file, without the `.msix` * extension (the maker always appends `.msix`). This only overrides the @@ -42,4 +44,4 @@ export type MakerMSIXConfig = Omit< * `my-app-win32-x64-1.2.3` */ outputFileName?: string | (() => string | Promise); -}; +} diff --git a/packages/maker/msix/src/MakerMSIX.ts b/packages/maker/msix/src/MakerMSIX.ts index ba79b61d0b..1e694c7f6d 100644 --- a/packages/maker/msix/src/MakerMSIX.ts +++ b/packages/maker/msix/src/MakerMSIX.ts @@ -73,3 +73,4 @@ export default class MakerMSIX extends MakerBase { } export { MakerMSIX, MakerMSIXConfig }; +export type { MakerMSIXConfigManifestVariables } from './Config.ts'; diff --git a/packages/maker/msix/typedoc.jsonc b/packages/maker/msix/typedoc.jsonc new file mode 100644 index 0000000000..295a210546 --- /dev/null +++ b/packages/maker/msix/typedoc.jsonc @@ -0,0 +1,4 @@ +{ + "$schema": "https://typedoc.org/schema.json", + "excludeExternals": false, +} diff --git a/packages/maker/pkg/README.md b/packages/maker/pkg/README.md index ffb05ada74..0f50fd7738 100644 --- a/packages/maker/pkg/README.md +++ b/packages/maker/pkg/README.md @@ -2,7 +2,7 @@ `@electron-forge/maker-pkg` builds `.pkg` files for macOS. These are used to upload your application to the Mac App Store or just as an alternate distribution method for macOS users. You can only build the Pkg target on macOS machines while targeting the `darwin` or `mas` platforms. -Configuration options are documented in [`MakerPkgConfig`](https://js.electronforge.io/interfaces/_electron_forge_maker_pkg.MakerPKGConfig.html). +Configuration options are documented in [`MakerPkgConfig`](https://js.electronforge.io/interfaces/_electron-forge_maker-pkg.MakerPKGConfig.html). ```javascript { diff --git a/packages/maker/rpm/README.md b/packages/maker/rpm/README.md index 9171676957..010a369884 100644 --- a/packages/maker/rpm/README.md +++ b/packages/maker/rpm/README.md @@ -4,7 +4,7 @@ You can only build the RPM target on Linux machines with the `rpm` or `rpm-build` packages installed. -Configuration options are documented in [`MakerRpmConfigOptions`](https://js.electronforge.io/interfaces/_electron_forge_maker_rpm.InternalOptions.MakerRpmConfigOptions.html). +Configuration options are documented in [`MakerRpmConfigOptions`](https://js.electronforge.io/interfaces/_electron-forge_maker-rpm.MakerRpmConfigOptions.html). ```javascript { diff --git a/packages/maker/rpm/src/MakerRpm.ts b/packages/maker/rpm/src/MakerRpm.ts index 52349b577e..55c2c1b98a 100644 --- a/packages/maker/rpm/src/MakerRpm.ts +++ b/packages/maker/rpm/src/MakerRpm.ts @@ -64,3 +64,4 @@ export default class MakerRpm extends MakerBase { } export { MakerRpm, MakerRpmConfig }; +export type { MakerRpmConfigOptions } from './Config.ts'; diff --git a/packages/maker/snap/README.md b/packages/maker/snap/README.md index 4b6c189e25..b594b9bec4 100644 --- a/packages/maker/snap/README.md +++ b/packages/maker/snap/README.md @@ -4,6 +4,8 @@ You can only build the Snapcraft target on Linux systems with the `snapcraft` package installed. +Configuration options are documented in [`MakerSnapConfig`](https://js.electronforge.io/interfaces/_electron-forge_maker-snap.MakerSnapConfig.html). + ```javascript { name: '@electron-forge/maker-snap', diff --git a/packages/maker/snap/src/Config.ts b/packages/maker/snap/src/Config.ts index ff6250f282..6bc7bcd8e6 100644 --- a/packages/maker/snap/src/Config.ts +++ b/packages/maker/snap/src/Config.ts @@ -1,4 +1,4 @@ import { Options, SnapcraftConfig } from 'electron-installer-snap'; -export type MakerSnapConfig = Omit & - SnapcraftConfig; +export interface MakerSnapConfig + extends Omit, SnapcraftConfig {} diff --git a/packages/maker/snap/typedoc.jsonc b/packages/maker/snap/typedoc.jsonc new file mode 100644 index 0000000000..295a210546 --- /dev/null +++ b/packages/maker/snap/typedoc.jsonc @@ -0,0 +1,4 @@ +{ + "$schema": "https://typedoc.org/schema.json", + "excludeExternals": false, +} diff --git a/packages/maker/squirrel/README.md b/packages/maker/squirrel/README.md index dad1fd827f..c56df8812d 100644 --- a/packages/maker/squirrel/README.md +++ b/packages/maker/squirrel/README.md @@ -7,7 +7,7 @@ Pre-requisites: * Windows machine * Linux machine with `mono` and `wine` installed. -Configuration options are documented in [`MakerSquirrelConfigOptions`](https://js.electronforge.io/interfaces/_electron_forge_maker_squirrel.InternalOptions.Options.html). +Configuration options are documented in [`MakerSquirrelConfig`](https://js.electronforge.io/interfaces/_electron-forge_maker-squirrel.MakerSquirrelConfig.html). ```javascript { diff --git a/packages/maker/squirrel/src/MakerSquirrel.ts b/packages/maker/squirrel/src/MakerSquirrel.ts index 4f45123e05..e05526e22f 100644 --- a/packages/maker/squirrel/src/MakerSquirrel.ts +++ b/packages/maker/squirrel/src/MakerSquirrel.ts @@ -11,10 +11,10 @@ import { Options as ElectronWinstallerOptions, } from 'electron-winstaller'; -export type MakerSquirrelConfig = Omit< +export interface MakerSquirrelConfig extends Omit< ElectronWinstallerOptions, 'appDirectory' | 'outputDirectory' ->; +> {} export default class MakerSquirrel extends MakerBase { name = 'squirrel'; diff --git a/packages/maker/squirrel/typedoc.jsonc b/packages/maker/squirrel/typedoc.jsonc new file mode 100644 index 0000000000..295a210546 --- /dev/null +++ b/packages/maker/squirrel/typedoc.jsonc @@ -0,0 +1,4 @@ +{ + "$schema": "https://typedoc.org/schema.json", + "excludeExternals": false, +} diff --git a/packages/maker/wix/README.md b/packages/maker/wix/README.md index 82e458c702..8c0ad98e3e 100644 --- a/packages/maker/wix/README.md +++ b/packages/maker/wix/README.md @@ -7,7 +7,7 @@ Pre-requisites: * `light` and `candle` installed from [the WiX toolkit](https://github.com/felixrieseberg/electron-wix-msi#prerequisites). -Configuration options are documented in [`MakerWixConfig`](https://js.electronforge.io/interfaces/_electron_forge_maker_wix.MakerWixConfig.html). +Configuration options are documented in [`MakerWixConfig`](https://js.electronforge.io/interfaces/_electron-forge_maker-wix.MakerWixConfig.html). ```javascript { diff --git a/packages/maker/wix/src/Config.ts b/packages/maker/wix/src/Config.ts index 6e99c8e03d..50de63eb2e 100644 --- a/packages/maker/wix/src/Config.ts +++ b/packages/maker/wix/src/Config.ts @@ -1,6 +1,6 @@ import { MSICreator, type MSICreatorOptions } from 'electron-wix-msi'; -export type MakerWixConfig = Omit< +export interface MakerWixConfig extends Omit< MSICreatorOptions, | 'appDirectory' | 'outputDirectory' @@ -9,7 +9,7 @@ export type MakerWixConfig = Omit< | 'version' | 'manufacturer' | 'exe' -> & { +> { /** * The app's description * @@ -44,4 +44,4 @@ export type MakerWixConfig = Omit< * Allows for the modification of the MSICreator before create is called. */ beforeCreate?: (creator: MSICreator) => Promise | void; -}; +} diff --git a/packages/maker/wix/src/MakerWix.ts b/packages/maker/wix/src/MakerWix.ts index 53c7109dff..cc2db6e8a6 100644 --- a/packages/maker/wix/src/MakerWix.ts +++ b/packages/maker/wix/src/MakerWix.ts @@ -4,7 +4,7 @@ import { styleText } from 'node:util'; import { getNameFromAuthor } from '@electron-forge/core-utils'; import { MakerBase, type MakerOptions } from '@electron-forge/maker-base'; import { ForgePlatform } from '@electron-forge/shared-types'; -import { MSICreator, type MSICreatorOptions } from 'electron-wix-msi'; +import { MSICreator } from 'electron-wix-msi'; import semver from 'semver'; import { MakerWixConfig } from './Config.js'; @@ -74,4 +74,4 @@ export default class MakerWix extends MakerBase { } } -export { MakerWix, MakerWixConfig, MSICreatorOptions }; +export { MakerWix, MakerWixConfig }; diff --git a/packages/maker/wix/typedoc.jsonc b/packages/maker/wix/typedoc.jsonc new file mode 100644 index 0000000000..295a210546 --- /dev/null +++ b/packages/maker/wix/typedoc.jsonc @@ -0,0 +1,4 @@ +{ + "$schema": "https://typedoc.org/schema.json", + "excludeExternals": false, +} diff --git a/packages/maker/zip/README.md b/packages/maker/zip/README.md index fdd9b2bc95..7f65e33223 100644 --- a/packages/maker/zip/README.md +++ b/packages/maker/zip/README.md @@ -2,7 +2,7 @@ `@electron-forge/maker-zip` builds basic `.zip` files containing your packaged application. There are no platform specific dependencies for using this maker and it will run on any platform. -Note: There are no configuration options for this target. +Configuration options are documented in [`MakerZIPConfig`](https://js.electronforge.io/interfaces/_electron-forge_maker-zip.MakerZIPConfig.html). ```javascript { diff --git a/packages/plugin/vite/src/VitePlugin.ts b/packages/plugin/vite/src/VitePlugin.ts index 7219b25051..de0fee69b1 100644 --- a/packages/plugin/vite/src/VitePlugin.ts +++ b/packages/plugin/vite/src/VitePlugin.ts @@ -537,4 +537,8 @@ function getServerURLs(urls: vite.ResolvedServerUrls) { return output; } -export { VitePlugin }; +export { VitePlugin, VitePluginConfig }; +export type { + VitePluginBuildConfig, + VitePluginRendererConfig, +} from './Config.ts'; diff --git a/packages/plugin/webpack/src/Config.ts b/packages/plugin/webpack/src/Config.ts index 504151ca2b..33a3c2e380 100644 --- a/packages/plugin/webpack/src/Config.ts +++ b/packages/plugin/webpack/src/Config.ts @@ -65,6 +65,7 @@ export interface WebpackPluginEntryPointNoWindow extends WebpackPluginEntryPoint js: string; } +/** @inline */ export type WebpackPluginEntryPoint = | WebpackPluginEntryPointLocalWindow | WebpackPluginEntryPointNoWindow @@ -188,6 +189,7 @@ export interface WebpackPluginConfig { >; } +/** @inline */ export type WebpackConfiguration = | RawWebpackConfiguration | WebpackConfigurationFactory; diff --git a/packages/plugin/webpack/src/WebpackConfig.ts b/packages/plugin/webpack/src/WebpackConfig.ts index 0b7193d852..5c84edfc0d 100644 --- a/packages/plugin/webpack/src/WebpackConfig.ts +++ b/packages/plugin/webpack/src/WebpackConfig.ts @@ -31,6 +31,7 @@ type WebpackMode = 'production' | 'development'; const d = debug('electron-forge:plugin:webpack:webpackconfig'); +/** @inline */ export type ConfigurationFactory = ( env: string | Record | unknown, args: Record, diff --git a/packages/plugin/webpack/src/WebpackPlugin.ts b/packages/plugin/webpack/src/WebpackPlugin.ts index bfd3d139d0..87873bb8d0 100644 --- a/packages/plugin/webpack/src/WebpackPlugin.ts +++ b/packages/plugin/webpack/src/WebpackPlugin.ts @@ -817,3 +817,10 @@ the generated files). Instead, it is ${JSON.stringify(pj.main)}`); } export { WebpackPlugin, WebpackPluginConfig }; +export type { + WebpackPluginRendererConfig, + WebpackPluginEntryPointLocalWindow, + WebpackPluginEntryPointNoWindow, + WebpackPluginEntryPointPreloadOnly, + WebpackPreloadEntryPoint, +} from './Config.ts'; diff --git a/packages/plugin/webpack/typedoc.jsonc b/packages/plugin/webpack/typedoc.jsonc new file mode 100644 index 0000000000..40956abdd2 --- /dev/null +++ b/packages/plugin/webpack/typedoc.jsonc @@ -0,0 +1,9 @@ +{ + "$schema": "https://typedoc.org/schema.json", + "intentionallyNotExported": [ + // This requires exposure of entire class / logic + // of WebpackConfig, and I am not even sure if + // this is even intended to be in public API + "src/WebpackConfig.ts:default" + ] +} diff --git a/packages/publisher/base-static/src/PublisherStatic.ts b/packages/publisher/base-static/src/PublisherStatic.ts index 2f60d8fb00..3e53530ea2 100644 --- a/packages/publisher/base-static/src/PublisherStatic.ts +++ b/packages/publisher/base-static/src/PublisherStatic.ts @@ -46,3 +46,4 @@ export default abstract class PublisherStatic< } export { PublisherStatic, StaticPublisherConfig, PublisherOptions }; +export type { StaticArtifact }; diff --git a/packages/publisher/bitbucket/README.md b/packages/publisher/bitbucket/README.md index 9c74c55b57..9e4820ec69 100644 --- a/packages/publisher/bitbucket/README.md +++ b/packages/publisher/bitbucket/README.md @@ -4,7 +4,7 @@ This publish target is for Bitbucket Cloud only and will not work with self hosted Bitbucket Server instances. -Configuration options are documented in [`PublisherBitbucketConfig`](https://js.electronforge.io/interfaces/_electron_forge_publisher_bitbucket.PublisherBitbucketConfig.html). +Configuration options are documented in [`PublisherBitbucketConfig`](https://js.electronforge.io/interfaces/_electron-forge_publisher-bitbucket.PublisherBitbucketConfig.html). ```javascript title=forge.config.js module.exports = { diff --git a/packages/publisher/bitbucket/src/PublisherBitbucket.ts b/packages/publisher/bitbucket/src/PublisherBitbucket.ts index 1377f4331a..ce3a4f543f 100644 --- a/packages/publisher/bitbucket/src/PublisherBitbucket.ts +++ b/packages/publisher/bitbucket/src/PublisherBitbucket.ts @@ -98,3 +98,4 @@ export default class PublisherBitbucket extends PublisherBase = ListrTask< Ctx, ListrDefaultRenderer >['task']; -export type ElectronProcess = ChildProcess & { restarted: boolean }; +export interface ElectronProcess extends ChildProcess { + restarted: boolean; +} export type ForgePlatform = OfficialPlatform; export type ForgeArch = OfficialArch | 'all'; @@ -124,14 +126,18 @@ export interface IForgePluginInterface { } /* eslint-enable @typescript-eslint/no-explicit-any */ -export type ForgeRebuildOptions = Omit< +/** + * @inlineType RebuildMode + * @inlineType ModuleType + */ +export interface ForgeRebuildOptions extends Omit< RebuildOptions, 'buildPath' | 'electronVersion' | 'arch' ->; -export type ForgePackagerOptions = Omit< +> {} +export interface ForgePackagerOptions extends Omit< ElectronPackagerOptions, 'dir' | 'arch' | 'platform' | 'out' | 'electronVersion' ->; +> {} export interface ResolvedForgeConfig { /** * A string to uniquely identify artifacts of this build, will be appended diff --git a/packages/utils/types/typedoc.jsonc b/packages/utils/types/typedoc.jsonc new file mode 100644 index 0000000000..295a210546 --- /dev/null +++ b/packages/utils/types/typedoc.jsonc @@ -0,0 +1,4 @@ +{ + "$schema": "https://typedoc.org/schema.json", + "excludeExternals": false, +} diff --git a/typedoc.json b/typedoc.json deleted file mode 100644 index fb0b0085ad..0000000000 --- a/typedoc.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "$schema": "https://typedoc.org/schema.json", - "entryPointStrategy": "packages", - "entryPoints": [ - "packages/api/core", - "packages/maker/*", - "packages/plugin/*", - "packages/plugin/*", - "packages/publisher/*", - "packages/utils/types" - ] -} diff --git a/typedoc.jsonc b/typedoc.jsonc new file mode 100644 index 0000000000..1c66f9a3b3 --- /dev/null +++ b/typedoc.jsonc @@ -0,0 +1,121 @@ +{ + "$schema": "https://typedoc.org/schema.json", + "entryPointStrategy": "packages", + "entryPoints": [ + "packages/api/core", + "packages/maker/*", + "packages/plugin/*", + "packages/publisher/*", + "packages/utils/types", + ], + "sourceLinkExternal": false, + "externalSymbolLinkMappings": { + // @electron-forge/shared-types + "@electron/packager": { + "OfficialArch": "https://packages.electronjs.org/packager/v20.0.3/types/OfficialArch.html", + "OfficialPlatform": "https://packages.electronjs.org/packager/v20.0.3/types/OfficialPlatform.html", + "Options": "https://packages.electronjs.org/packager/v20.0.3/interfaces/Options.html", + "HookFunction": "https://packages.electronjs.org/packager/v20.0.3/types/HookFunction.html", + "FinalizePackageTargetsHookFunction": "https://packages.electronjs.org/packager/v20.0.3/types/FinalizePackageTargetsHookFunction.html", + "IgnoreFunction": "https://packages.electronjs.org/packager/v20.0.3/types/IgnoreFunction.html", + "PackagerOsxSignOptions": "https://packages.electronjs.org/packager/v20.0.3/interfaces/PackagerOsxSignOptions.html", + "PackagerUniversalOptions": "https://packages.electronjs.org/packager/v20.0.3/interfaces/PackagerUniversalOptions.html", + "MacOSProtocol": "https://packages.electronjs.org/packager/v20.0.3/interfaces/MacOSProtocol.html", + "Win32MetadataOptions": "https://packages.electronjs.org/packager/v20.0.3/interfaces/Win32MetadataOptions.html", + "PackagerWindowsSignOptions": "https://packages.electronjs.org/packager/v20.0.3/interfaces/PackagerWindowsSignOptions.html", + // Ignored as not part of Forge for API consumers + "Options.dir": "#", + "Options.arch": "#", + "Options.platform": "#", + "Options.out": "#", + }, + "@electron/get": { + "ElectronDownloadRequestOptions": "https://packages.electronjs.org/get/v4.0.2/interfaces/ElectronDownloadRequestOptions.html" + }, + "@electron/asar": { + "CreateOptions": "https://packages.electronjs.org/asar/v4.0.1/types/CreateOptions.html" + }, + "@electron/rebuild": { + "RebuildOptions": "https://packages.electronjs.org/rebuild/v4.2.0/interfaces/RebuildOptions.html", + }, + "listr2": { + "ListrBaseClassOptions": "https://listr2.kilic.dev/api/listr2/interfaces/ListrBaseClassOptions.html", + "ListrTask": "https://listr2.kilic.dev/api/listr2/interfaces/ListrTask.html", + "TaskWrapper": "https://listr2.kilic.dev/api/listr2/interfaces/ListrTaskWrapper.html", + "ListrDefaultRenderer": "https://listr2.kilic.dev/api/listr2/type-aliases/ListrDefaultRenderer.html", + "ListrDefaultRendererValue": "https://listr2.kilic.dev/api/listr2/type-aliases/ListrDefaultRendererValue.html", + "ListrSimpleRenderer": "https://listr2.kilic.dev/api/listr2/type-aliases/ListrSimpleRenderer.html", + "ListrSimpleRendererValue": "https://listr2.kilic.dev/api/listr2/type-aliases/ListrSimpleRendererValue.html", + }, + "@types/node": { + "\"child_process\".ChildProcess": "https://nodejs.org/docs/latest/api/child_process.htmll#child_processforkmodulepath-args-options", + // Ignored as part of Node.js docs (there's intentional link to Node docs instead in hierarchy) + "\"child_process\".fork": "#", + "\"child_process\".spawn": "#", + "\"child_process\".exec": "#", + "EventEmitter.defaultMaxListeners": "#", + }, + // @electron-forge/maker-dmg + "electron-installer-dmg": { + // Links to in-interface names + "__type.name": "#name", + }, + // @electron-forge/maker-snap + "electron-installer-snap": { + "createSnap.Options": "https://electron-userland.github.io/electron-installer-snap/master/interfaces/createsnap.snapcraftoptions.html", + "createSnap.SnapcraftConfig": "https://electron-userland.github.io/electron-installer-snap/master/modules/createsnap.html#customsnapcraftconfig", + }, + // @electron-forge/maker-squirrel + "@electron/windows-sign": { + "SignToolOptions": "https://packages.electronjs.org/windows-sign/v2.0.6/interfaces/SignToolOptions.html", + }, + "electron-winstaller": { + // Links to in-interface names + "SquirrelWindowsOptions.authors": "#authors", + "SquirrelWindowsOptions.certificateFile": "#certificatefile", + "SquirrelWindowsOptions.certificatePassword": "#certificatepassword", + "SquirrelWindowsOptions.remoteReleases": "#remotereleases", + "SquirrelWindowsOptions.owners": "#owners", + "SquirrelWindowsOptions.usePackageJson": "#usepackagejson", + "SquirrelWindowsOptions.windowsSign": "#windowssign", + }, + // @electron-forge/plugin-fuses + "@electron/fuses": { + "FuseConfig": "https://packages.electronjs.org/fuses/v2.1.3/types/FuseConfig.html", + }, + // @electron-forge/plugin-webpack + "webpack": { + "exports.Configuration": "https://webpack.js.org/configuration/", + }, + "webpack-dev-server": { + "Configuration": "https://webpack.js.org/configuration/dev-server/", + }, + // @electron-forge/publisher-gcs + "@google-cloud/storage": { + "ConfigMetadata": "https://docs.cloud.google.com/storage/docs/metadata", + "StorageOptions": "https://docs.cloud.google.com/nodejs/docs/reference/storage/latest/storage/storageoptions", + "UploadOptions": "https://docs.cloud.google.com/nodejs/docs/reference/storage/latest/storage/uploadoptions", + }, + // @electron-forge/publisher-github + "@octokit/core": { + "OctokitOptions": "https://github.com/octokit/core.js#options", + }, + // @electron-forge/publisher-s3 + "@aws-sdk/types": { + "Credentials": "https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-types/Interface/Credentials/", + }, + }, + // Replaces previous *.base.json concept: it is + // a per-package default documentation. It can still + // be overwritten if needed with a per-package config. + "packageOptions": { + "excludeInternal": true, + // Usually, we want to use "externalSymbolLinkMappings" + // to point out symbols that are in external packages, + // while allow for exceptions if Typedoc docs offer + // better quality of documentation or upstream docs + // are manually maintained and in risk of being + // out-of-date. + "excludeExternals": true, + }, +}