adnbn 0.5.7 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/builders/app/command.d.ts +3 -6
- package/dist/cli/builders/app/index.d.ts +2 -14
- package/dist/cli/builders/locale/FirefoxLocaleValidator.d.ts +4 -7
- package/dist/cli/builders/locale/LocaleBuilder.d.ts +3 -6
- package/dist/cli/builders/locale/LocaleBuilder.js +3 -1
- package/dist/cli/builders/locale/LocaleBuilder.js.map +1 -1
- package/dist/cli/builders/locale/LocaleStructureValidator.d.ts +8 -0
- package/dist/cli/builders/locale/LocaleStructureValidator.js +64 -0
- package/dist/cli/builders/locale/LocaleStructureValidator.js.map +1 -0
- package/dist/cli/builders/locale/LocaleValidator.d.ts +4 -7
- package/dist/cli/builders/locale/LocaleValidator.js +2 -0
- package/dist/cli/builders/locale/LocaleValidator.js.map +1 -1
- package/dist/cli/builders/locale/OperaLocaleValidator.d.ts +4 -7
- package/dist/cli/builders/locale/index.d.ts +10 -19
- package/dist/cli/builders/locale/index.js +2 -0
- package/dist/cli/builders/locale/index.js.map +1 -1
- package/dist/cli/builders/manifest/ManifestBase.d.ts +30 -18
- package/dist/cli/builders/manifest/ManifestBase.js +212 -70
- package/dist/cli/builders/manifest/ManifestBase.js.map +1 -1
- package/dist/cli/builders/manifest/ManifestV2.d.ts +5 -12
- package/dist/cli/builders/manifest/ManifestV2.js +8 -7
- package/dist/cli/builders/manifest/ManifestV2.js.map +1 -1
- package/dist/cli/builders/manifest/ManifestV3.d.ts +5 -12
- package/dist/cli/builders/manifest/ManifestV3.js +9 -6
- package/dist/cli/builders/manifest/ManifestV3.js.map +1 -1
- package/dist/cli/builders/manifest/index.d.ts +3 -14
- package/dist/cli/builders/manifest/utils.d.ts +10 -15
- package/dist/cli/builders/manifest/utils.js +14 -2
- package/dist/cli/builders/manifest/utils.js.map +1 -1
- package/dist/cli/bundler/index.d.ts +2 -16
- package/dist/cli/bundler/plugins/EntrypointPlugin.d.ts +10 -19
- package/dist/cli/bundler/plugins/EntrypointPlugin.js +1 -0
- package/dist/cli/bundler/plugins/EntrypointPlugin.js.map +1 -1
- package/dist/cli/bundler/plugins/GenerateJsonPlugin.d.ts +5 -7
- package/dist/cli/bundler/plugins/GenerateJsonPlugin.js +1 -0
- package/dist/cli/bundler/plugins/GenerateJsonPlugin.js.map +1 -1
- package/dist/cli/bundler/plugins/ManifestPlugin.d.ts +3 -11
- package/dist/cli/bundler/plugins/ManifestPlugin.js +1 -0
- package/dist/cli/bundler/plugins/ManifestPlugin.js.map +1 -1
- package/dist/cli/bundler/plugins/ReplacePlugin.d.ts +3 -5
- package/dist/cli/bundler/plugins/ReplacePlugin.js +1 -0
- package/dist/cli/bundler/plugins/ReplacePlugin.js.map +1 -1
- package/dist/cli/bundler/plugins/WatchPlugin.d.ts +3 -6
- package/dist/cli/bundler/plugins/WatchPlugin.js +1 -0
- package/dist/cli/bundler/plugins/WatchPlugin.js.map +1 -1
- package/dist/cli/bundler/plugins/index.d.ts +5 -14
- package/dist/cli/bundler/utils/index.d.ts +2 -3
- package/dist/cli/bundler/utils/optimization.d.ts +2 -5
- package/dist/cli/bundler/utils/output.d.ts +2 -5
- package/dist/cli/entrypoint/file/ExpressionFile.d.ts +4 -10
- package/dist/cli/entrypoint/file/OptionFile.d.ts +3 -9
- package/dist/cli/entrypoint/file/SourceFile.d.ts +7 -11
- package/dist/cli/entrypoint/file/SourceFile.js +1 -0
- package/dist/cli/entrypoint/file/SourceFile.js.map +1 -1
- package/dist/cli/entrypoint/file/index.d.ts +4 -8
- package/dist/cli/entrypoint/file/injectors/core.d.ts +2 -4
- package/dist/cli/entrypoint/file/injectors/index.d.ts +2 -4
- package/dist/cli/entrypoint/file/parsers/AbstractParser.d.ts +6 -12
- package/dist/cli/entrypoint/file/parsers/AbstractParser.js +1 -0
- package/dist/cli/entrypoint/file/parsers/AbstractParser.js.map +1 -1
- package/dist/cli/entrypoint/file/parsers/ClassParser.d.ts +9 -15
- package/dist/cli/entrypoint/file/parsers/ClassParser.js +3 -0
- package/dist/cli/entrypoint/file/parsers/ClassParser.js.map +1 -1
- package/dist/cli/entrypoint/file/parsers/FunctionParser.d.ts +9 -17
- package/dist/cli/entrypoint/file/parsers/FunctionParser.js +3 -0
- package/dist/cli/entrypoint/file/parsers/FunctionParser.js.map +1 -1
- package/dist/cli/entrypoint/file/parsers/JSDocParser.d.ts +2 -5
- package/dist/cli/entrypoint/file/parsers/NodeFinder.d.ts +4 -10
- package/dist/cli/entrypoint/file/parsers/NodeFinder.js +1 -0
- package/dist/cli/entrypoint/file/parsers/NodeFinder.js.map +1 -1
- package/dist/cli/entrypoint/file/parsers/ObjectParser.d.ts +7 -15
- package/dist/cli/entrypoint/file/parsers/ObjectParser.js +1 -0
- package/dist/cli/entrypoint/file/parsers/ObjectParser.js.map +1 -1
- package/dist/cli/entrypoint/file/parsers/SignatureBuilder.d.ts +4 -12
- package/dist/cli/entrypoint/file/parsers/SignatureBuilder.js +5 -4
- package/dist/cli/entrypoint/file/parsers/SignatureBuilder.js.map +1 -1
- package/dist/cli/entrypoint/file/parsers/TypeResolver.d.ts +5 -11
- package/dist/cli/entrypoint/file/parsers/TypeResolver.js +2 -0
- package/dist/cli/entrypoint/file/parsers/TypeResolver.js.map +1 -1
- package/dist/cli/entrypoint/file/parsers/helpers/memberFilters.d.ts +1 -3
- package/dist/cli/entrypoint/file/parsers/index.d.ts +7 -14
- package/dist/cli/entrypoint/file/parsers/types.d.ts +4 -6
- package/dist/cli/entrypoint/file/resolvers/ImportResolver.d.ts +2 -6
- package/dist/cli/entrypoint/file/resolvers/ImportResolver.js +1 -0
- package/dist/cli/entrypoint/file/resolvers/ImportResolver.js.map +1 -1
- package/dist/cli/entrypoint/file/resolvers/TsResolver.d.ts +2 -5
- package/dist/cli/entrypoint/file/resolvers/index.d.ts +2 -3
- package/dist/cli/entrypoint/file/types.d.ts +5 -7
- package/dist/cli/entrypoint/finder/AbstractAssetFinder.d.ts +3 -16
- package/dist/cli/entrypoint/finder/AbstractEntrypointFinder.d.ts +4 -17
- package/dist/cli/entrypoint/finder/AbstractEntrypointFinder.js +22 -17
- package/dist/cli/entrypoint/finder/AbstractEntrypointFinder.js.map +1 -1
- package/dist/cli/entrypoint/finder/AbstractFinder.d.ts +4 -15
- package/dist/cli/entrypoint/finder/AbstractFinder.js +7 -2
- package/dist/cli/entrypoint/finder/AbstractFinder.js.map +1 -1
- package/dist/cli/entrypoint/finder/AbstractOptionsFinder.d.ts +3 -16
- package/dist/cli/entrypoint/finder/AbstractPluginFinder.d.ts +3 -18
- package/dist/cli/entrypoint/finder/AbstractTransportFinder.d.ts +9 -26
- package/dist/cli/entrypoint/finder/AbstractViewFinder.d.ts +9 -24
- package/dist/cli/entrypoint/finder/AssetPluginFinder.d.ts +8 -19
- package/dist/cli/entrypoint/finder/AssetPluginFinder.js +2 -0
- package/dist/cli/entrypoint/finder/AssetPluginFinder.js.map +1 -1
- package/dist/cli/entrypoint/finder/BackgroundFinder.d.ts +5 -19
- package/dist/cli/entrypoint/finder/CommandFinder.d.ts +7 -22
- package/dist/cli/entrypoint/finder/ContentFinder.d.ts +5 -19
- package/dist/cli/entrypoint/finder/IconFinder.d.ts +12 -25
- package/dist/cli/entrypoint/finder/LocaleFinder.d.ts +14 -22
- package/dist/cli/entrypoint/finder/LocaleFinder.js +23 -9
- package/dist/cli/entrypoint/finder/LocaleFinder.js.map +1 -1
- package/dist/cli/entrypoint/finder/OffscreenFinder.d.ts +5 -26
- package/dist/cli/entrypoint/finder/OffscreenViewFinder.d.ts +8 -29
- package/dist/cli/entrypoint/finder/OffscreenViewFinder.js +1 -0
- package/dist/cli/entrypoint/finder/OffscreenViewFinder.js.map +1 -1
- package/dist/cli/entrypoint/finder/PageFinder.d.ts +5 -22
- package/dist/cli/entrypoint/finder/PluginFinder.d.ts +7 -19
- package/dist/cli/entrypoint/finder/PluginFinder.js +2 -0
- package/dist/cli/entrypoint/finder/PluginFinder.js.map +1 -1
- package/dist/cli/entrypoint/finder/PopupFinder.d.ts +5 -22
- package/dist/cli/entrypoint/finder/RelayFinder.d.ts +5 -25
- package/dist/cli/entrypoint/finder/ServiceFinder.d.ts +5 -25
- package/dist/cli/entrypoint/finder/SidebarFinder.d.ts +5 -22
- package/dist/cli/entrypoint/finder/index.d.ts +18 -43
- package/dist/cli/entrypoint/index.d.ts +4 -64
- package/dist/cli/entrypoint/name/InlineNameGenerator.d.ts +2 -12
- package/dist/cli/entrypoint/name/NameGenerator.d.ts +2 -11
- package/dist/cli/entrypoint/name/NameGenerator.js +1 -0
- package/dist/cli/entrypoint/name/NameGenerator.js.map +1 -1
- package/dist/cli/entrypoint/name/index.d.ts +2 -9
- package/dist/cli/entrypoint/parser/AbstractParser.d.ts +14 -29
- package/dist/cli/entrypoint/parser/AbstractParser.js +1 -0
- package/dist/cli/entrypoint/parser/AbstractParser.js.map +1 -1
- package/dist/cli/entrypoint/parser/BackgroundParser.d.ts +3 -23
- package/dist/cli/entrypoint/parser/CommandParser.d.ts +4 -24
- package/dist/cli/entrypoint/parser/CommandParser.js +20 -5
- package/dist/cli/entrypoint/parser/CommandParser.js.map +1 -1
- package/dist/cli/entrypoint/parser/ContentParser.d.ts +4 -23
- package/dist/cli/entrypoint/parser/OffscreenParser.d.ts +3 -28
- package/dist/cli/entrypoint/parser/PageParser.d.ts +3 -26
- package/dist/cli/entrypoint/parser/PopupParser.d.ts +3 -26
- package/dist/cli/entrypoint/parser/RelayParser.d.ts +4 -27
- package/dist/cli/entrypoint/parser/ServiceParser.d.ts +3 -27
- package/dist/cli/entrypoint/parser/SidebarParser.d.ts +3 -26
- package/dist/cli/entrypoint/parser/ViewParser.d.ts +60 -80
- package/dist/cli/entrypoint/parser/index.d.ts +9 -38
- package/dist/cli/entrypoint/utils/framework.d.ts +3 -12
- package/dist/cli/entrypoint/utils/index.d.ts +2 -10
- package/dist/cli/entrypoint/utils/resolve.d.ts +3 -5
- package/dist/cli/index.d.ts +1 -2
- package/dist/cli/plugins/asset.d.ts +2 -15
- package/dist/cli/plugins/background/Background.d.ts +4 -21
- package/dist/cli/plugins/background/BackgroundEntry.d.ts +7 -21
- package/dist/cli/plugins/background/BackgroundEntry.js +1 -0
- package/dist/cli/plugins/background/BackgroundEntry.js.map +1 -1
- package/dist/cli/plugins/background/BackgroundManifest.d.ts +5 -21
- package/dist/cli/plugins/background/Command.d.ts +6 -23
- package/dist/cli/plugins/background/Service.d.ts +5 -27
- package/dist/cli/plugins/background/ServiceDeclaration.d.ts +3 -17
- package/dist/cli/plugins/background/index.d.ts +2 -15
- package/dist/cli/plugins/bundler.d.ts +2 -15
- package/dist/cli/plugins/content/Content.d.ts +9 -24
- package/dist/cli/plugins/content/ContentDriver.d.ts +7 -22
- package/dist/cli/plugins/content/ContentDriver.js +1 -0
- package/dist/cli/plugins/content/ContentDriver.js.map +1 -1
- package/dist/cli/plugins/content/ContentManager.d.ts +8 -19
- package/dist/cli/plugins/content/ContentName.d.ts +5 -17
- package/dist/cli/plugins/content/ContentName.js +1 -0
- package/dist/cli/plugins/content/ContentName.js.map +1 -1
- package/dist/cli/plugins/content/Relay.d.ts +9 -30
- package/dist/cli/plugins/content/RelayDeclaration.d.ts +3 -17
- package/dist/cli/plugins/content/index.d.ts +2 -15
- package/dist/cli/plugins/content/types.d.ts +8 -16
- package/dist/cli/plugins/content/utils.d.ts +2 -11
- package/dist/cli/plugins/dotenv/index.d.ts +3 -16
- package/dist/cli/plugins/dotenv/utils.d.ts +4 -7
- package/dist/cli/plugins/html.d.ts +2 -15
- package/dist/cli/plugins/icon/Icon.d.ts +6 -22
- package/dist/cli/plugins/icon/declaration/IconDeclaration.d.ts +3 -16
- package/dist/cli/plugins/icon/declaration/index.d.ts +1 -13
- package/dist/cli/plugins/icon/index.d.ts +4 -21
- package/dist/cli/plugins/index.d.ts +22 -58
- package/dist/cli/plugins/index.js +32 -30
- package/dist/cli/plugins/index.js.map +1 -1
- package/dist/cli/plugins/locale/Locale.d.ts +3 -20
- package/dist/cli/plugins/locale/declaration/LocaleDeclaration.d.ts +4 -16
- package/dist/cli/plugins/locale/declaration/index.d.ts +1 -13
- package/dist/cli/plugins/locale/declaration/locale.d.ts +61 -11
- package/dist/cli/plugins/locale/index.d.ts +2 -15
- package/dist/cli/plugins/locale/index.js +44 -49
- package/dist/cli/plugins/locale/index.js.map +1 -1
- package/dist/cli/plugins/manifest.d.ts +2 -0
- package/dist/cli/plugins/manifest.js +27 -0
- package/dist/cli/plugins/manifest.js.map +1 -0
- package/dist/cli/plugins/meta/AbstractMeta.d.ts +2 -15
- package/dist/cli/plugins/meta/AbstractMeta.js +1 -0
- package/dist/cli/plugins/meta/AbstractMeta.js.map +1 -1
- package/dist/cli/plugins/meta/Author.d.ts +3 -16
- package/dist/cli/plugins/meta/Homepage.d.ts +3 -16
- package/dist/cli/plugins/meta/Incognito.d.ts +4 -16
- package/dist/cli/plugins/meta/SpecificSettings.d.ts +4 -16
- package/dist/cli/plugins/meta/index.d.ts +7 -20
- package/dist/cli/plugins/offscreen/Offscreen.d.ts +11 -35
- package/dist/cli/plugins/offscreen/OffscreenDeclaration.d.ts +3 -17
- package/dist/cli/plugins/offscreen/index.d.ts +2 -15
- package/dist/cli/plugins/optimization.d.ts +2 -15
- package/dist/cli/plugins/output.d.ts +2 -15
- package/dist/cli/plugins/page/Page.d.ts +8 -26
- package/dist/cli/plugins/page/declaration/PageDeclaration.d.ts +3 -16
- package/dist/cli/plugins/page/declaration/index.d.ts +1 -13
- package/dist/cli/plugins/page/index.d.ts +2 -15
- package/dist/cli/plugins/popup/Popup.d.ts +9 -27
- package/dist/cli/plugins/popup/declaration/PopupDeclaration.d.ts +3 -16
- package/dist/cli/plugins/popup/declaration/index.d.ts +1 -13
- package/dist/cli/plugins/popup/index.d.ts +2 -15
- package/dist/cli/plugins/public.d.ts +2 -15
- package/dist/cli/plugins/react.d.ts +2 -15
- package/dist/cli/plugins/sidebar/Sidebar.d.ts +9 -27
- package/dist/cli/plugins/sidebar/declaration/SidebarDeclaration.d.ts +3 -16
- package/dist/cli/plugins/sidebar/declaration/index.d.ts +1 -13
- package/dist/cli/plugins/sidebar/index.d.ts +2 -15
- package/dist/cli/plugins/style.d.ts +2 -15
- package/dist/cli/plugins/typescript/FileBuilder.d.ts +2 -15
- package/dist/cli/plugins/typescript/FileBuilder.js +1 -0
- package/dist/cli/plugins/typescript/FileBuilder.js.map +1 -1
- package/dist/cli/plugins/typescript/TypescriptConfig.d.ts +4 -17
- package/dist/cli/plugins/typescript/declaration/index.d.ts +2 -14
- package/dist/cli/plugins/typescript/declaration/transport/TransportDeclaration.d.ts +4 -17
- package/dist/cli/plugins/typescript/declaration/transport/TransportDeclaration.js +2 -3
- package/dist/cli/plugins/typescript/declaration/transport/TransportDeclaration.js.map +1 -1
- package/dist/cli/plugins/typescript/declaration/transport/index.d.ts +1 -13
- package/dist/cli/plugins/typescript/declaration/transport/transport.d.ts +5 -11
- package/dist/cli/plugins/typescript/declaration/vendor/VendorDeclaration.d.ts +3 -16
- package/dist/cli/plugins/typescript/declaration/vendor/index.d.ts +1 -13
- package/dist/cli/plugins/typescript/index.d.ts +6 -20
- package/dist/cli/plugins/version/AbstractVersion.d.ts +2 -15
- package/dist/cli/plugins/version/AbstractVersion.js +2 -1
- package/dist/cli/plugins/version/AbstractVersion.js.map +1 -1
- package/dist/cli/plugins/version/AddonVersion.d.ts +3 -16
- package/dist/cli/plugins/version/BrowserMinimumVersion.d.ts +3 -16
- package/dist/cli/plugins/version/index.d.ts +5 -18
- package/dist/cli/plugins/view/View.d.ts +10 -24
- package/dist/cli/plugins/view/View.js +2 -0
- package/dist/cli/plugins/view/View.js.map +1 -1
- package/dist/cli/plugins/view/index.d.ts +3 -22
- package/dist/cli/resolvers/bundler.d.ts +4 -15
- package/dist/cli/resolvers/config.d.ts +2 -14
- package/dist/cli/resolvers/config.js +45 -6
- package/dist/cli/resolvers/config.js.map +1 -1
- package/dist/cli/resolvers/path.d.ts +11 -24
- package/dist/cli/resolvers/plugin.d.ts +3 -16
- package/dist/cli/utils/fs.d.ts +3 -5
- package/dist/cli/utils/path.d.ts +3 -5
- package/dist/cli/utils/string.d.ts +2 -4
- package/dist/cli/virtual/background.d.ts +1 -0
- package/dist/cli/virtual/command.d.ts +1 -0
- package/dist/cli/virtual/content.d.ts +1 -0
- package/dist/cli/virtual/index.d.ts +9 -0
- package/dist/cli/virtual/index.js +2 -2
- package/dist/cli/virtual/offscreen.background.d.ts +1 -0
- package/dist/cli/virtual/offscreen.d.ts +1 -0
- package/dist/cli/virtual/relay.d.ts +1 -0
- package/dist/cli/virtual/transport.d.ts +1 -0
- package/dist/cli/virtual/view.d.ts +1 -0
- package/dist/cli/virtual/virtual.d.ts +38 -38
- package/dist/entry/background/Builder.d.ts +3 -12
- package/dist/entry/background/Builder.js +1 -0
- package/dist/entry/background/Builder.js.map +1 -1
- package/dist/entry/background/index.d.ts +3 -12
- package/dist/entry/background/resolvers/definition.d.ts +3 -12
- package/dist/entry/background/resolvers/index.d.ts +1 -8
- package/dist/entry/command/Builder.d.ts +4 -12
- package/dist/entry/command/index.d.ts +3 -12
- package/dist/entry/command/resolvers/definition.d.ts +4 -13
- package/dist/entry/command/resolvers/index.d.ts +1 -8
- package/dist/entry/content/adapters/react/Builder.d.ts +3 -17
- package/dist/entry/content/adapters/react/Node.d.ts +6 -14
- package/dist/entry/content/adapters/react/Node.js +2 -0
- package/dist/entry/content/adapters/react/Node.js.map +1 -1
- package/dist/entry/content/adapters/react/index.d.ts +4 -18
- package/dist/entry/content/adapters/react/resolvers/index.d.ts +1 -8
- package/dist/entry/content/adapters/react/resolvers/render.d.ts +2 -11
- package/dist/entry/content/adapters/vanilla/Builder.d.ts +3 -17
- package/dist/entry/content/adapters/vanilla/Node.d.ts +2 -11
- package/dist/entry/content/adapters/vanilla/Node.js +2 -0
- package/dist/entry/content/adapters/vanilla/Node.js.map +1 -1
- package/dist/entry/content/adapters/vanilla/index.d.ts +4 -18
- package/dist/entry/content/core/AbstractMarker.d.ts +2 -11
- package/dist/entry/content/core/AbstractMarker.js +1 -0
- package/dist/entry/content/core/AbstractMarker.js.map +1 -1
- package/dist/entry/content/core/AttributeMarker.d.ts +3 -12
- package/dist/entry/content/core/Builder.d.ts +8 -17
- package/dist/entry/content/core/Context.d.ts +2 -11
- package/dist/entry/content/core/Context.js +1 -0
- package/dist/entry/content/core/Context.js.map +1 -1
- package/dist/entry/content/core/EventEmitter.d.ts +2 -11
- package/dist/entry/content/core/EventNode.d.ts +2 -11
- package/dist/entry/content/core/EventNode.js +2 -0
- package/dist/entry/content/core/EventNode.js.map +1 -1
- package/dist/entry/content/core/ManagedContext.d.ts +3 -12
- package/dist/entry/content/core/MarkerNode.d.ts +2 -11
- package/dist/entry/content/core/MarkerNode.js +2 -0
- package/dist/entry/content/core/MarkerNode.js.map +1 -1
- package/dist/entry/content/core/MountBuilder.d.ts +3 -16
- package/dist/entry/content/core/MountNode.d.ts +2 -11
- package/dist/entry/content/core/MountNode.js +2 -0
- package/dist/entry/content/core/MountNode.js.map +1 -1
- package/dist/entry/content/core/Node.d.ts +2 -11
- package/dist/entry/content/core/Node.js +2 -0
- package/dist/entry/content/core/Node.js.map +1 -1
- package/dist/entry/content/core/WeakMarker.d.ts +3 -12
- package/dist/entry/content/core/resolvers/anchor.d.ts +2 -11
- package/dist/entry/content/core/resolvers/container.d.ts +2 -11
- package/dist/entry/content/core/resolvers/definition.d.ts +3 -12
- package/dist/entry/content/core/resolvers/index.d.ts +6 -13
- package/dist/entry/content/core/resolvers/mount.d.ts +2 -11
- package/dist/entry/content/core/resolvers/render.d.ts +3 -12
- package/dist/entry/content/core/resolvers/watch.d.ts +4 -13
- package/dist/entry/content/index.d.ts +1 -8
- package/dist/entry/core/Builder.d.ts +2 -11
- package/dist/entry/offscreen/Builder.d.ts +8 -25
- package/dist/entry/offscreen/Builder.js +8 -1
- package/dist/entry/offscreen/Builder.js.map +1 -1
- package/dist/entry/offscreen/TransportBuilder.d.ts +6 -24
- package/dist/entry/offscreen/index.d.ts +4 -25
- package/dist/entry/relay/Builder.d.ts +7 -21
- package/dist/entry/relay/Builder.js +1 -0
- package/dist/entry/relay/Builder.js.map +1 -1
- package/dist/entry/relay/TransportBuilder.d.ts +6 -20
- package/dist/entry/relay/index.d.ts +4 -21
- package/dist/entry/service/Builder.d.ts +6 -20
- package/dist/entry/service/index.d.ts +2 -14
- package/dist/entry/transport/AbstractBuilder.d.ts +4 -14
- package/dist/entry/transport/index.d.ts +1 -14
- package/dist/entry/transport/resolvers/definition.d.ts +7 -20
- package/dist/entry/transport/resolvers/index.d.ts +1 -14
- package/dist/entry/view/adapters/react/Builder.d.ts +4 -16
- package/dist/entry/view/adapters/react/index.d.ts +4 -17
- package/dist/entry/view/adapters/react/resolvers/render.d.ts +2 -13
- package/dist/entry/view/adapters/vanilla/Builder.d.ts +3 -15
- package/dist/entry/view/adapters/vanilla/index.d.ts +4 -16
- package/dist/entry/view/core/Builder.d.ts +3 -14
- package/dist/entry/view/core/resolvers/container.d.ts +2 -13
- package/dist/entry/view/core/resolvers/definition.d.ts +3 -14
- package/dist/entry/view/core/resolvers/render.d.ts +3 -14
- package/dist/entry/view/index.d.ts +1 -10
- package/dist/index.d.ts +1 -43
- package/dist/locale/adapters/react/LocaleProvider.d.ts +4 -6
- package/dist/locale/adapters/react/LocaleProvider.js +5 -5
- package/dist/locale/adapters/react/LocaleProvider.js.map +1 -1
- package/dist/locale/adapters/react/context.d.ts +8 -13
- package/dist/locale/adapters/react/context.js +2 -5
- package/dist/locale/adapters/react/context.js.map +1 -1
- package/dist/locale/adapters/react/index.d.ts +2 -6
- package/dist/locale/helpers.d.ts +60 -36
- package/dist/locale/helpers.js +14 -14
- package/dist/locale/helpers.js.map +1 -1
- package/dist/locale/index.d.ts +3 -7
- package/dist/locale/index.js.map +1 -1
- package/dist/locale/providers/AbstractLocale.d.ts +5 -8
- package/dist/locale/providers/AbstractLocale.js +9 -6
- package/dist/locale/providers/AbstractLocale.js.map +1 -1
- package/dist/locale/providers/CustomLocale.d.ts +5 -8
- package/dist/locale/providers/CustomLocale.js +3 -1
- package/dist/locale/providers/CustomLocale.js.map +1 -1
- package/dist/locale/providers/DynamicLocale.d.ts +7 -11
- package/dist/locale/providers/DynamicLocale.js +1 -1
- package/dist/locale/providers/DynamicLocale.js.map +1 -1
- package/dist/locale/providers/NativeLocale.d.ts +7 -10
- package/dist/locale/providers/NativeLocale.js.map +1 -1
- package/dist/locale/providers/index.d.ts +3 -6
- package/dist/locale/utils.d.ts +11 -14
- package/dist/main/app.d.ts +1 -1
- package/dist/main/app.js +3 -2
- package/dist/main/app.js.map +1 -1
- package/dist/main/background.d.ts +3 -12
- package/dist/main/browser.d.ts +1 -1
- package/dist/main/command.d.ts +4 -13
- package/dist/main/config.d.ts +3 -16
- package/dist/main/config.js.map +1 -1
- package/dist/main/content.d.ts +6 -18
- package/dist/main/env.d.ts +7 -15
- package/dist/main/icon.d.ts +6 -7
- package/dist/main/index.d.ts +17 -43
- package/dist/main/manifest.d.ts +1 -7
- package/dist/main/offscreen.d.ts +9 -22
- package/dist/main/offscreen.js +1 -1
- package/dist/main/offscreen.js.map +1 -1
- package/dist/main/page.d.ts +7 -19
- package/dist/main/plugin.d.ts +3 -16
- package/dist/main/popup.d.ts +8 -18
- package/dist/main/popup.js +2 -2
- package/dist/main/popup.js.map +1 -1
- package/dist/main/relay.d.ts +8 -21
- package/dist/main/relay.js.map +1 -1
- package/dist/main/service.d.ts +6 -15
- package/dist/main/service.js.map +1 -1
- package/dist/main/sidebar.d.ts +8 -18
- package/dist/main/sidebar.js +2 -2
- package/dist/main/sidebar.js.map +1 -1
- package/dist/main/view.d.ts +1 -9
- package/dist/message/MessageManager.d.ts +7 -5
- package/dist/message/MessageManager.js +43 -5
- package/dist/message/MessageManager.js.map +1 -1
- package/dist/message/adapters/react/index.d.ts +1 -2
- package/dist/message/adapters/react/useMessageHandler.d.ts +2 -5
- package/dist/message/handlers/AbstractHandler.d.ts +2 -5
- package/dist/message/handlers/GeneralHandler.d.ts +3 -6
- package/dist/message/handlers/GeneralHandler.js +1 -0
- package/dist/message/handlers/GeneralHandler.js.map +1 -1
- package/dist/message/handlers/MapHandler.d.ts +3 -6
- package/dist/message/handlers/MapHandler.js +1 -0
- package/dist/message/handlers/MapHandler.js.map +1 -1
- package/dist/message/handlers/SingleHandler.d.ts +3 -6
- package/dist/message/handlers/SingleHandler.js +2 -0
- package/dist/message/handlers/SingleHandler.js.map +1 -1
- package/dist/message/handlers/index.d.ts +3 -5
- package/dist/message/index.d.ts +9 -13
- package/dist/message/providers/AbstractMessage.d.ts +2 -5
- package/dist/message/providers/Message.d.ts +11 -7
- package/dist/message/providers/Message.js +70 -12
- package/dist/message/providers/Message.js.map +1 -1
- package/dist/message/providers/index.d.ts +1 -4
- package/dist/offscreen/OffscreenBackground.d.ts +2 -9
- package/dist/offscreen/OffscreenBridge.d.ts +8 -9
- package/dist/offscreen/OffscreenBridge.js +55 -7
- package/dist/offscreen/OffscreenBridge.js.map +1 -1
- package/dist/offscreen/OffscreenManager.d.ts +4 -15
- package/dist/offscreen/OffscreenMessage.d.ts +2 -14
- package/dist/offscreen/index.d.ts +10 -26
- package/dist/offscreen/index.js.map +1 -1
- package/dist/offscreen/providers/Offscreen.d.ts +3 -14
- package/dist/offscreen/providers/ProxyOffscreen.d.ts +7 -18
- package/dist/offscreen/providers/ProxyOffscreen.js +44 -23
- package/dist/offscreen/providers/ProxyOffscreen.js.map +1 -1
- package/dist/offscreen/providers/RegisterOffscreen.d.ts +5 -18
- package/dist/offscreen/providers/RegisterOffscreen.js +1 -0
- package/dist/offscreen/providers/RegisterOffscreen.js.map +1 -1
- package/dist/offscreen/providers/index.d.ts +3 -17
- package/dist/offscreen/utils.d.ts +1 -3
- package/dist/relay/RelayManager.d.ts +6 -16
- package/dist/relay/RelayMessage.d.ts +2 -14
- package/dist/relay/RelayPermission.d.ts +4 -15
- package/dist/relay/index.d.ts +9 -22
- package/dist/relay/index.js.map +1 -1
- package/dist/relay/providers/ProxyRelay.d.ts +8 -19
- package/dist/relay/providers/ProxyRelay.js +2 -0
- package/dist/relay/providers/ProxyRelay.js.map +1 -1
- package/dist/relay/providers/RegisterRelay.d.ts +4 -16
- package/dist/relay/providers/RegisterRelay.js +2 -0
- package/dist/relay/providers/RegisterRelay.js.map +1 -1
- package/dist/relay/providers/Relay.d.ts +3 -14
- package/dist/relay/providers/index.d.ts +3 -18
- package/dist/relay/utils.d.ts +3 -5
- package/dist/service/ServiceManager.d.ts +4 -15
- package/dist/service/ServiceMessage.d.ts +2 -14
- package/dist/service/index.d.ts +9 -19
- package/dist/service/index.js.map +1 -1
- package/dist/service/providers/ProxyService.d.ts +4 -15
- package/dist/service/providers/RegisterService.d.ts +3 -15
- package/dist/service/providers/RegisterService.js +1 -0
- package/dist/service/providers/RegisterService.js.map +1 -1
- package/dist/service/providers/Service.d.ts +3 -14
- package/dist/service/providers/index.d.ts +3 -15
- package/dist/transport/BaseTransport.d.ts +2 -13
- package/dist/transport/BaseTransport.js +1 -0
- package/dist/transport/BaseTransport.js.map +1 -1
- package/dist/transport/ProxyTransport.d.ts +4 -14
- package/dist/transport/RegisterTransport.d.ts +4 -16
- package/dist/transport/RegisterTransport.js +13 -20
- package/dist/transport/RegisterTransport.js.map +1 -1
- package/dist/transport/TransportManager.d.ts +2 -13
- package/dist/transport/TransportMessage.d.ts +3 -13
- package/dist/transport/index.d.ts +4 -9
- package/dist/types/app.d.ts +8 -6
- package/dist/types/app.js +7 -1
- package/dist/types/app.js.map +1 -1
- package/dist/types/background.d.ts +20 -7
- package/dist/types/browser.d.ts +6 -8
- package/dist/types/command.d.ts +27 -7
- package/dist/types/config.d.ts +673 -11
- package/dist/types/content.d.ts +195 -7
- package/dist/types/entrypoint.d.ts +106 -7
- package/dist/types/entrypoint.js.map +1 -1
- package/dist/types/env.d.ts +4 -6
- package/dist/types/framework.d.ts +1 -3
- package/dist/types/helpers.d.ts +6 -7
- package/dist/types/icon.d.ts +3 -5
- package/dist/types/locale.d.ts +35 -29
- package/dist/types/locale.js.map +1 -1
- package/dist/types/manifest.d.ts +163 -7
- package/dist/types/manifest.js.map +1 -1
- package/dist/types/message.d.ts +32 -19
- package/dist/types/message.js +3 -1
- package/dist/types/message.js.map +1 -1
- package/dist/types/offscreen.d.ts +13 -23
- package/dist/types/offscreen.js +2 -0
- package/dist/types/offscreen.js.map +1 -1
- package/dist/types/page.d.ts +5 -16
- package/dist/types/plugin.d.ts +101 -11
- package/dist/types/popup.d.ts +5 -16
- package/dist/types/relay.d.ts +13 -21
- package/dist/types/service.d.ts +9 -18
- package/dist/types/sidebar.d.ts +7 -17
- package/dist/types/transport.d.ts +22 -29
- package/dist/types/view.d.ts +18 -24
- package/package.json +9 -11
- package/dist/config-B38J9WIM.d.ts +0 -743
- package/dist/manifest-DKvERQ4d.d.ts +0 -503
package/dist/types/config.d.ts
CHANGED
|
@@ -1,11 +1,673 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import type { Configuration as RspackConfig, Filename } from "@rspack/core";
|
|
2
|
+
import type { Options as HtmlOptions } from "html-rspack-tags-plugin";
|
|
3
|
+
import { Command, Mode, Workspace } from "./app.js";
|
|
4
|
+
import { Browser, BrowserSpecific } from "./browser.js";
|
|
5
|
+
import { ManifestIncognitoValue, ManifestVersion, ManifestBuilder, OptionalManifest } from "./manifest.js";
|
|
6
|
+
import { Plugin } from "./plugin.js";
|
|
7
|
+
import { Language } from "./locale.js";
|
|
8
|
+
import { Awaiter } from "./helpers.js";
|
|
9
|
+
import { EnvFilterOptions, EnvFilterVariant } from "./env.js";
|
|
10
|
+
/**
|
|
11
|
+
* Configuration options for building a browser extension. This interface defines
|
|
12
|
+
* all the properties required to customize the build process, extension metadata,
|
|
13
|
+
* file structure, and other build-related settings.
|
|
14
|
+
*/
|
|
15
|
+
export interface Config {
|
|
16
|
+
/**
|
|
17
|
+
* Enables debug mode during extension building.
|
|
18
|
+
* In debug mode, additional information about the build process is displayed.
|
|
19
|
+
*/
|
|
20
|
+
debug: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Defines the command to be executed.
|
|
23
|
+
* For example, `build`, `watch`, etc.
|
|
24
|
+
*/
|
|
25
|
+
command: Command;
|
|
26
|
+
/**
|
|
27
|
+
* Build mode for the extension (e.g., `production`, `development`).
|
|
28
|
+
* Affects optimization and other build parameters.
|
|
29
|
+
*/
|
|
30
|
+
mode: Mode;
|
|
31
|
+
/**
|
|
32
|
+
* Browser for which the extension is being built.
|
|
33
|
+
* Determines specific settings and compatibility.
|
|
34
|
+
*/
|
|
35
|
+
browser: Browser;
|
|
36
|
+
/**
|
|
37
|
+
* Name of the application (extension) that will be built.
|
|
38
|
+
* Used to identify a specific extension in a multi-project structure.
|
|
39
|
+
* @example "my-app"
|
|
40
|
+
*/
|
|
41
|
+
app: string;
|
|
42
|
+
/**
|
|
43
|
+
* Extension name for manifest.name.
|
|
44
|
+
*
|
|
45
|
+
* Can be either:
|
|
46
|
+
* - a plain string — inserted into the manifest as-is;
|
|
47
|
+
* - a localization key (for example, "@app.name") — converted to a reference to a localized message
|
|
48
|
+
* and must exist in your locale files.
|
|
49
|
+
*
|
|
50
|
+
* @example "@app.name"
|
|
51
|
+
* @example "Awesome App"
|
|
52
|
+
*/
|
|
53
|
+
name: undefined | string;
|
|
54
|
+
/**
|
|
55
|
+
* Short extension name for manifest.short_name.
|
|
56
|
+
*
|
|
57
|
+
* Can be either:
|
|
58
|
+
* - a plain string — inserted into the manifest as-is;
|
|
59
|
+
* - a localization key (for example, "@app.short_name") — converted to a reference to a localized message
|
|
60
|
+
* and must exist in your locale files.
|
|
61
|
+
*
|
|
62
|
+
* Note: some browsers do not support localization in the short_name field (e.g., Opera, Edge).
|
|
63
|
+
* In that case, when a localization key is provided, it will be resolved to the actual string for the selected language.
|
|
64
|
+
*
|
|
65
|
+
* @example "@app.short_name"
|
|
66
|
+
* @example "Awesome"
|
|
67
|
+
*/
|
|
68
|
+
shortName: undefined | string;
|
|
69
|
+
/**
|
|
70
|
+
* Extension description for manifest.description.
|
|
71
|
+
*
|
|
72
|
+
* Can be either:
|
|
73
|
+
* - a plain string — inserted into the manifest as-is;
|
|
74
|
+
* - a localization key (for example, "@app.description") — converted to a reference to a localized message
|
|
75
|
+
* and must exist in your locale files.
|
|
76
|
+
*
|
|
77
|
+
* @example "@app.description"
|
|
78
|
+
* @example "My awesome app description"
|
|
79
|
+
*/
|
|
80
|
+
description: undefined | string;
|
|
81
|
+
/**
|
|
82
|
+
* Author for manifest.author.
|
|
83
|
+
*
|
|
84
|
+
* Can be either:
|
|
85
|
+
* - a plain string — inserted into the manifest as-is;
|
|
86
|
+
* - a function returning a string or undefined — allows computing the value at build time.
|
|
87
|
+
*
|
|
88
|
+
* If the value is undefined (or the function returns undefined), the field will be omitted.
|
|
89
|
+
*
|
|
90
|
+
* @example "ACME Corp."
|
|
91
|
+
* @example () => getEnv('AUTHOR') || "Addon Bone"
|
|
92
|
+
*/
|
|
93
|
+
author: undefined | string | (() => string | undefined);
|
|
94
|
+
/**
|
|
95
|
+
* The version of the extension.
|
|
96
|
+
* Can be either:
|
|
97
|
+
* - a valid version (e.g., "1.0.0"), or a key referencing a value from an .env file.
|
|
98
|
+
* - a function that returns the version or key dynamically.
|
|
99
|
+
*
|
|
100
|
+
* @default "VERSION"
|
|
101
|
+
*/
|
|
102
|
+
version: string | (() => string | undefined);
|
|
103
|
+
/**
|
|
104
|
+
* The minimum supported version of browser.
|
|
105
|
+
* Used to populate fields in the manifest:
|
|
106
|
+
* - `minimum_chrome_version`
|
|
107
|
+
* - `browser_specific_settings.gecko.strict_min_version` for Firefox
|
|
108
|
+
*
|
|
109
|
+
* Can be either:
|
|
110
|
+
* - a valid version, or a key referencing a value from an .env file.
|
|
111
|
+
* - a function that returns the version or key dynamically.
|
|
112
|
+
*
|
|
113
|
+
* @default "MINIMUM_VERSION"
|
|
114
|
+
*/
|
|
115
|
+
minimumVersion: string | number | (() => string | number | undefined);
|
|
116
|
+
/**
|
|
117
|
+
* The URL for the extension's homepage
|
|
118
|
+
* Can be either:
|
|
119
|
+
* - a valid url or a key referencing a value from an .env file.
|
|
120
|
+
* - a function that returns the url or key dynamically.
|
|
121
|
+
*
|
|
122
|
+
* @default HOMEPAGE
|
|
123
|
+
*/
|
|
124
|
+
homepage: string | (() => string | undefined);
|
|
125
|
+
/**
|
|
126
|
+
* Name of the icon group to use in the manifest as the primary extension icon (manifest.icons).
|
|
127
|
+
*
|
|
128
|
+
* An icon group is a named set of icons by sizes (e.g., 16, 32, 48, 128, ...).
|
|
129
|
+
* The value must match one of the available icon groups.
|
|
130
|
+
*
|
|
131
|
+
* @default: "default"
|
|
132
|
+
*
|
|
133
|
+
* Examples:
|
|
134
|
+
* - "default"
|
|
135
|
+
* - "active"
|
|
136
|
+
* - "disable"
|
|
137
|
+
*/
|
|
138
|
+
icon: string;
|
|
139
|
+
/**
|
|
140
|
+
* Browser-specific settings (populate manifest.browser_specific_settings).
|
|
141
|
+
*
|
|
142
|
+
* Two forms are supported:
|
|
143
|
+
* - object — fixed values for browsers (e.g., gecko, safari);
|
|
144
|
+
* - function — lazy evaluation at build time; if it returns undefined, the field is omitted.
|
|
145
|
+
*
|
|
146
|
+
* Examples:
|
|
147
|
+
* - { gecko: { id: "addon@example.com", strictMinVersion: "109.0" } }
|
|
148
|
+
* - () => ({ gecko: { id: "addon@example.com" } })
|
|
149
|
+
*/
|
|
150
|
+
specific?: BrowserSpecific | (() => BrowserSpecific | undefined);
|
|
151
|
+
/**
|
|
152
|
+
* Used to specify how this extension will behave in incognito mode
|
|
153
|
+
*
|
|
154
|
+
* @default "not_allowed"
|
|
155
|
+
*/
|
|
156
|
+
incognito?: ManifestIncognitoValue | (() => ManifestIncognitoValue | undefined);
|
|
157
|
+
/**
|
|
158
|
+
* Extension manifest without the version.
|
|
159
|
+
* Allows customizing the manifest.json file beyond the standard fields handled by the builder.
|
|
160
|
+
* The structure and available APIs depend on the manifest version (v2 or v3).
|
|
161
|
+
*
|
|
162
|
+
* Accepts:
|
|
163
|
+
* - an object with additional manifest fields
|
|
164
|
+
* - a function that receives a ManifestBuilder instance and returns manifest fields
|
|
165
|
+
*
|
|
166
|
+
* Note: Some fields like name, version, and permissions are handled automatically
|
|
167
|
+
* by the builder and should not be included here unless you need to override them.
|
|
168
|
+
*/
|
|
169
|
+
manifest?: OptionalManifest | ((builder: ManifestBuilder) => OptionalManifest | undefined);
|
|
170
|
+
/**
|
|
171
|
+
* Extension manifest version (e.g., v2 or v3).
|
|
172
|
+
* Defines the manifest structure and available APIs.
|
|
173
|
+
*/
|
|
174
|
+
manifestVersion: ManifestVersion;
|
|
175
|
+
/**
|
|
176
|
+
* Default locale for the extension.
|
|
177
|
+
* @example "en"
|
|
178
|
+
*/
|
|
179
|
+
lang: Language;
|
|
180
|
+
/**
|
|
181
|
+
* Project workspace mode.
|
|
182
|
+
*
|
|
183
|
+
* - `single` uses the source directory itself as the shared layer.
|
|
184
|
+
* - `multi` uses the configured shared directory.
|
|
185
|
+
*
|
|
186
|
+
* @default "single"
|
|
187
|
+
*/
|
|
188
|
+
workspace: Workspace;
|
|
189
|
+
/**
|
|
190
|
+
* Path to the directory with source files for building.
|
|
191
|
+
* This is the base directory relative to which other paths are defined.
|
|
192
|
+
* @example "addon"
|
|
193
|
+
*/
|
|
194
|
+
rootDir: string;
|
|
195
|
+
/**
|
|
196
|
+
* Directory where the built extensions will be placed.
|
|
197
|
+
* Final extension files will be located here.
|
|
198
|
+
* @example "./dist"
|
|
199
|
+
* @path Output path: `{{inputDir}}/{{outputDir}}`
|
|
200
|
+
*
|
|
201
|
+
* @default "dist"
|
|
202
|
+
*/
|
|
203
|
+
outDir: string;
|
|
204
|
+
/**
|
|
205
|
+
* Directory where the application and shared directory are located.
|
|
206
|
+
* Main directory with source code.
|
|
207
|
+
* @example "src"
|
|
208
|
+
* @path Full path: `{{inputDir}}/{{srcDir}}`
|
|
209
|
+
*
|
|
210
|
+
* @default "src"
|
|
211
|
+
*/
|
|
212
|
+
srcDir: string;
|
|
213
|
+
/**
|
|
214
|
+
* Directory with shared modules (content scripts, background scripts, common code)
|
|
215
|
+
* used across multiple extensions. Applies only when `workspace` is `"multi"`;
|
|
216
|
+
* for a `"single"` workspace the value is forced to `"."`, since a single-app
|
|
217
|
+
* project has no separate shared layer.
|
|
218
|
+
*
|
|
219
|
+
* @example "shared"
|
|
220
|
+
* @path Full path: `{{inputDir}}/{{srcDir}}/{{sharedDir}}`
|
|
221
|
+
*
|
|
222
|
+
* @default "shared"
|
|
223
|
+
*/
|
|
224
|
+
sharedDir: string;
|
|
225
|
+
/**
|
|
226
|
+
* Directory where all app extensions are located.
|
|
227
|
+
* These extensions can use code from the Shared directory.
|
|
228
|
+
* @example "apps"
|
|
229
|
+
* @path Full path: `{{inputDir}}/{{srcDir}}/{{appsDir}}`
|
|
230
|
+
*
|
|
231
|
+
* @default "apps"
|
|
232
|
+
*/
|
|
233
|
+
appsDir: string;
|
|
234
|
+
/**
|
|
235
|
+
* Directory inside a specific extension application.
|
|
236
|
+
* May contain additional structure, such as a src folder.
|
|
237
|
+
* @example "src"
|
|
238
|
+
* @path Full path: `{{inputDir}}/{{appsDir}}/{{appDir}}/{{appSrcDir}}`
|
|
239
|
+
*
|
|
240
|
+
* @default "."
|
|
241
|
+
*/
|
|
242
|
+
appSrcDir: string;
|
|
243
|
+
/**
|
|
244
|
+
* Directory for icons and logos. Can be located in the Shared directory,
|
|
245
|
+
* in the project root, or in a folder for a specific App.
|
|
246
|
+
*
|
|
247
|
+
* @example "icons"
|
|
248
|
+
*
|
|
249
|
+
* @path Full paths can be:
|
|
250
|
+
*
|
|
251
|
+
* - `{{inputDir}}/{{srcDir}}/{{icon.sourceDir}}`
|
|
252
|
+
* - `{{inputDir}}/{{sharedDir}}/{{icon.sourceDir}}`
|
|
253
|
+
* - `{{inputDir}}/{{appsDir}}/{{appDir}}/{{icon.sourceDir}}`
|
|
254
|
+
*/
|
|
255
|
+
iconSrcDir: string;
|
|
256
|
+
/**
|
|
257
|
+
* Directory for image files in outputDir.
|
|
258
|
+
*
|
|
259
|
+
* @example "icons"
|
|
260
|
+
* @path Full path: `{{inputDir}}/{{outputDir}}/{{appDir}}/{{icon.outputDir}}`
|
|
261
|
+
*/
|
|
262
|
+
iconOutDir: string;
|
|
263
|
+
/**
|
|
264
|
+
* Directory for output JavaScript files in outputDir.
|
|
265
|
+
* All compiled JS files will be placed here.
|
|
266
|
+
* @example "js"
|
|
267
|
+
* @path Full path: `{{inputDir}}//{{outputDir}}/{{appDir}}/{{jsDir}}`
|
|
268
|
+
*
|
|
269
|
+
* @default "js"
|
|
270
|
+
*/
|
|
271
|
+
jsDir: string;
|
|
272
|
+
/**
|
|
273
|
+
* Directory for output CSS files in outputDir.
|
|
274
|
+
* All compiled styles will be placed here.
|
|
275
|
+
* @example "css"
|
|
276
|
+
* @path Full path: `{{inputDir}}/{{outputDir}}/{{appDir}}/{{cssDir}}`
|
|
277
|
+
*
|
|
278
|
+
* @default "css"
|
|
279
|
+
*/
|
|
280
|
+
cssDir: string;
|
|
281
|
+
/**
|
|
282
|
+
* Directory for assets (images, fonts, etc.) in outputDir.
|
|
283
|
+
* @example "assets"
|
|
284
|
+
* @path Full path: `{{inputDir}}/{{outputDir}}/{{appDir}}/{{assetsDir}}`
|
|
285
|
+
*
|
|
286
|
+
* @default "assets"
|
|
287
|
+
*/
|
|
288
|
+
assetsDir: string;
|
|
289
|
+
/**
|
|
290
|
+
* Directory for HTML files in outputDir.
|
|
291
|
+
* @example "view"
|
|
292
|
+
* @path Full path: `{{inputDir}}/{{outputDir}}/{{appDir}}/{{htmlDir}}`
|
|
293
|
+
*
|
|
294
|
+
* @default "."
|
|
295
|
+
*/
|
|
296
|
+
htmlDir: string;
|
|
297
|
+
/**
|
|
298
|
+
* Directory for localizations. Can be located in the Shared directory,
|
|
299
|
+
* in the project root, or in a folder for a specific App.
|
|
300
|
+
*
|
|
301
|
+
* @example "locales"
|
|
302
|
+
*
|
|
303
|
+
* @path Full paths can be:
|
|
304
|
+
*
|
|
305
|
+
* - `{{inputDir}}/{{srcDir}}/{{localeDir}}`
|
|
306
|
+
* - `{{inputDir}}/{{sharedDir}}/{{localeDir}}`
|
|
307
|
+
* - `{{inputDir}}/{{appsDir}}/{{appDir}}/{{localeDir}}`
|
|
308
|
+
*/
|
|
309
|
+
localeDir: string;
|
|
310
|
+
/**
|
|
311
|
+
* Represents an HTML configuration, which can either be a single HtmlOptions object,
|
|
312
|
+
* an array of HtmlOptions objects, or a function returning one of these formats.
|
|
313
|
+
*
|
|
314
|
+
* - HtmlOptions: A single HTML configuration object.
|
|
315
|
+
* - HtmlOptions[]: An array containing multiple HTML configuration objects.
|
|
316
|
+
* - { (): HtmlOptions | HtmlOptions[] }: A function that dynamically generates and
|
|
317
|
+
* returns either an HtmlOptions object or an array of HtmlOptions objects.
|
|
318
|
+
*/
|
|
319
|
+
html: HtmlOptions | HtmlOptions[] | (() => HtmlOptions | HtmlOptions[]);
|
|
320
|
+
/**
|
|
321
|
+
* Rspack bundler configuration.
|
|
322
|
+
*
|
|
323
|
+
* Accepts:
|
|
324
|
+
* - a Rspack configuration object;
|
|
325
|
+
* - a function that receives the current (system-prepared) Rspack configuration
|
|
326
|
+
* and returns an object with changes.
|
|
327
|
+
*
|
|
328
|
+
* How it works:
|
|
329
|
+
* - Any object you provide (either returned from the function or passed directly) will be
|
|
330
|
+
* recursively merged with the base configuration by the build system.
|
|
331
|
+
* - Do NOT perform manual merging inside the function — simply return a patch object with the
|
|
332
|
+
* fields you want to adjust, or return an empty object if no changes are needed.
|
|
333
|
+
* - The function parameter is mainly for inspecting the current config to decide whether
|
|
334
|
+
* additional adjustments are necessary.
|
|
335
|
+
*/
|
|
336
|
+
bundler: RspackConfig | ((rspack: RspackConfig) => Awaiter<RspackConfig>);
|
|
337
|
+
/**
|
|
338
|
+
* Environment variables inclusion settings.
|
|
339
|
+
*
|
|
340
|
+
* Supports three forms:
|
|
341
|
+
* - string: treated as a prefix filter. Only variables whose names start with this prefix are included.
|
|
342
|
+
* Equivalent to: { filter: "<PREFIX>" }.
|
|
343
|
+
* - function: a predicate that receives a variable name and returns true to include it.
|
|
344
|
+
* Equivalent to: { filter: (name) => boolean }.
|
|
345
|
+
* - object: advanced settings.
|
|
346
|
+
* - filter?: string | ((name: string) => boolean) — a prefix or predicate to select variables.
|
|
347
|
+
* - crypt?: boolean — if true, values will be obfuscated with a simple reversible scheme
|
|
348
|
+
* (for convenience only; not secure).
|
|
349
|
+
*
|
|
350
|
+
* Notes:
|
|
351
|
+
* - If no filter is provided (e.g., empty string or a function that always returns false), no variables are included.
|
|
352
|
+
* - Obfuscation is intended to reduce casual inspection only and should not be considered encryption.
|
|
353
|
+
*
|
|
354
|
+
* Examples:
|
|
355
|
+
* - `"APP_"` - include all variables starting with `APP_`
|
|
356
|
+
* - `(name) => name === "FEATURE_FLAG"` - include a single variable via predicate
|
|
357
|
+
* - `{ filter: "PUBLIC_", crypt: true }` - include by prefix and obfuscate values
|
|
358
|
+
*/
|
|
359
|
+
env: EnvFilterVariant | Partial<EnvFilterOptions>;
|
|
360
|
+
/**
|
|
361
|
+
* Array of plugins used when building the extension.
|
|
362
|
+
* Allows extending the builder's functionality.
|
|
363
|
+
*/
|
|
364
|
+
plugins: Plugin[];
|
|
365
|
+
/**
|
|
366
|
+
* Flag to enable dependency analyzer.
|
|
367
|
+
* When activated, open RSDoctor during the build, which shows
|
|
368
|
+
* project dependencies and their sizes.
|
|
369
|
+
*
|
|
370
|
+
* @default false
|
|
371
|
+
*/
|
|
372
|
+
analyze: boolean;
|
|
373
|
+
/**
|
|
374
|
+
* Path to the builder configuration file.
|
|
375
|
+
* @example "./adnbn.config.ts"
|
|
376
|
+
*/
|
|
377
|
+
configFile: string;
|
|
378
|
+
/**
|
|
379
|
+
* Flag indicating whether to merge background scripts from App and Shared directories.
|
|
380
|
+
* When `true`, background scripts from both directories will be combined into a single file.
|
|
381
|
+
*
|
|
382
|
+
* @default false
|
|
383
|
+
*/
|
|
384
|
+
mergeBackground: boolean;
|
|
385
|
+
/**
|
|
386
|
+
* Flag indicating whether to merge commands from App and Shared directories.
|
|
387
|
+
* When `true`, commands from both directories will be combined.
|
|
388
|
+
*
|
|
389
|
+
* @default false
|
|
390
|
+
*/
|
|
391
|
+
mergeCommands: boolean;
|
|
392
|
+
/**
|
|
393
|
+
* Flag indicating whether to merge content scripts from App and Shared directories.
|
|
394
|
+
* When `true`, content scripts from both directories will be combined.
|
|
395
|
+
*
|
|
396
|
+
* @default false
|
|
397
|
+
*/
|
|
398
|
+
mergeContentScripts: boolean;
|
|
399
|
+
/**
|
|
400
|
+
* Flag indicating whether to combine content scripts with identical options into one chunk.
|
|
401
|
+
* When `true`, content scripts with identical settings will be compiled into a single file.
|
|
402
|
+
*
|
|
403
|
+
* @default true
|
|
404
|
+
*/
|
|
405
|
+
concatContentScripts: boolean;
|
|
406
|
+
/**
|
|
407
|
+
* Flag indicating whether to merge styles from App and Shared directories.
|
|
408
|
+
* When `true`, styles from both directories will be combined.
|
|
409
|
+
*
|
|
410
|
+
* @default true
|
|
411
|
+
*/
|
|
412
|
+
mergeStyles: boolean;
|
|
413
|
+
/**
|
|
414
|
+
* Flag indicating whether to merge icon files from App and Shared directories.
|
|
415
|
+
* When `true`, icon files from both directories will be combined.
|
|
416
|
+
*
|
|
417
|
+
* @default false
|
|
418
|
+
*/
|
|
419
|
+
mergeIcons: boolean;
|
|
420
|
+
/**
|
|
421
|
+
* Flag indicating whether to merge localizations from App and Shared directories.
|
|
422
|
+
* When `true`, localization files from both directories will be combined.
|
|
423
|
+
*
|
|
424
|
+
* @default true
|
|
425
|
+
*/
|
|
426
|
+
mergeLocales: boolean;
|
|
427
|
+
/**
|
|
428
|
+
* Flag indicating whether to merge page files from App and Shared directories.
|
|
429
|
+
* When `true`, page files from both directories will be combined.
|
|
430
|
+
*
|
|
431
|
+
* @default false
|
|
432
|
+
*/
|
|
433
|
+
mergePages: boolean;
|
|
434
|
+
/**
|
|
435
|
+
* Flag indicating whether to merge popup files from App and Shared directories.
|
|
436
|
+
* When `true`, popup files from both directories will be combined.
|
|
437
|
+
* This is useful for sharing popup components across different parts of the application.
|
|
438
|
+
*
|
|
439
|
+
* @default false
|
|
440
|
+
*/
|
|
441
|
+
mergePopup: boolean;
|
|
442
|
+
/**
|
|
443
|
+
* Flag indicating whether multiple popup files are supported in the extension.
|
|
444
|
+
* When `true`, the build process will handle and include multiple popup files in the extension.
|
|
445
|
+
* This allows the extension to have different popup interfaces for different contexts or states.
|
|
446
|
+
*
|
|
447
|
+
* @default false
|
|
448
|
+
*/
|
|
449
|
+
multiplePopup: boolean;
|
|
450
|
+
/**
|
|
451
|
+
* Flag indicating whether to merge sidebar files from App and Shared directories.
|
|
452
|
+
* When `true`, sidebar files from both directories will be combined.
|
|
453
|
+
* This is useful for sharing sidebar components across different parts of the application.
|
|
454
|
+
*
|
|
455
|
+
* @default false
|
|
456
|
+
*/
|
|
457
|
+
mergeSidebar: boolean;
|
|
458
|
+
/**
|
|
459
|
+
* Flag indicating whether multiple sidebar files are supported in the extension.
|
|
460
|
+
* When `true`, the build process will handle and include multiple sidebar files in the extension.
|
|
461
|
+
* This allows the extension to have different sidebar interfaces for different contexts or states.
|
|
462
|
+
*
|
|
463
|
+
* @default false
|
|
464
|
+
*/
|
|
465
|
+
multipleSidebar: boolean;
|
|
466
|
+
/**
|
|
467
|
+
* Flag indicating whether to merge relay files from App and Shared directories.
|
|
468
|
+
* When `true`, relay files from both directories will be combined.
|
|
469
|
+
*
|
|
470
|
+
* @default false
|
|
471
|
+
*/
|
|
472
|
+
mergeRelay: boolean;
|
|
473
|
+
/**
|
|
474
|
+
* Flag indicating whether to merge service files from App and Shared directories.
|
|
475
|
+
* When `true`, service files from both directories will be combined.
|
|
476
|
+
*
|
|
477
|
+
* @default false
|
|
478
|
+
*/
|
|
479
|
+
mergeService: boolean;
|
|
480
|
+
/**
|
|
481
|
+
* Flag indicating whether to merge offscreen files from App and Shared directories.
|
|
482
|
+
* When `true`, offscreen files from both directories will be combined.
|
|
483
|
+
*
|
|
484
|
+
* @default false
|
|
485
|
+
*/
|
|
486
|
+
mergeOffscreen: boolean;
|
|
487
|
+
/**
|
|
488
|
+
* Path to the directory containing public assets to be copied into the build output.
|
|
489
|
+
* Must be relative to the project root and cannot be "." (the project root itself).
|
|
490
|
+
*
|
|
491
|
+
* @default "public"
|
|
492
|
+
*/
|
|
493
|
+
publicDir: string;
|
|
494
|
+
/**
|
|
495
|
+
* If true, merges the contents of the public directory with corresponding
|
|
496
|
+
* directories from Shared and Apps modules during the copy process.
|
|
497
|
+
*
|
|
498
|
+
* @default true
|
|
499
|
+
*/
|
|
500
|
+
mergePublic: boolean;
|
|
501
|
+
/**
|
|
502
|
+
* Flag indicating whether to create separate chunks for common code.
|
|
503
|
+
* When `true`, common code will be extracted into separate chunks for build size optimization
|
|
504
|
+
* and improved caching. This allows the browser to load common modules once
|
|
505
|
+
* and reuse them across different parts of the extension.
|
|
506
|
+
*
|
|
507
|
+
* When a function is provided, it receives a Set of entry point names that share common code
|
|
508
|
+
* and should return a string representing the chunk name, or undefined to skip chunk creation.
|
|
509
|
+
* The function allows dynamic naming of common chunks based on the entries that use them.
|
|
510
|
+
*
|
|
511
|
+
* @example
|
|
512
|
+
* // Boolean usage:
|
|
513
|
+
* true // Creates common chunks with auto-generated names
|
|
514
|
+
* false // Disables common chunk creation
|
|
515
|
+
*
|
|
516
|
+
* @example
|
|
517
|
+
* // Function usage:
|
|
518
|
+
* (names) => {
|
|
519
|
+
* const entryList = Array.from(names).toSorted().join("-");
|
|
520
|
+
*
|
|
521
|
+
* return `${entryList}.common`;
|
|
522
|
+
* }
|
|
523
|
+
*
|
|
524
|
+
* @default true
|
|
525
|
+
*/
|
|
526
|
+
commonChunks: boolean | ((names: Set<string>) => string | undefined);
|
|
527
|
+
/**
|
|
528
|
+
* Build artifact name.
|
|
529
|
+
*
|
|
530
|
+
* Used as:
|
|
531
|
+
* - the directory name where the built extension will be placed;
|
|
532
|
+
* - the base name of the packaged archive.
|
|
533
|
+
*
|
|
534
|
+
* Supports placeholders that are substituted and then normalized:
|
|
535
|
+
* - `[app]` / `[name]` — application name in kebab-case;
|
|
536
|
+
* - `[mode]` — current build mode (e.g., development, production);
|
|
537
|
+
* - `[browser]` — target browser;
|
|
538
|
+
* - `[mv]` — manifest version in mvN format (e.g., mv3).
|
|
539
|
+
*
|
|
540
|
+
* Notes:
|
|
541
|
+
* - the final name is automatically converted to kebab-case;
|
|
542
|
+
* - sequences like "mv-<number>" are normalized to "mv<number>" (e.g., "mv-3" → "mv3");
|
|
543
|
+
* - it is recommended to specify only a name (no paths or extensions).
|
|
544
|
+
*
|
|
545
|
+
* Examples:
|
|
546
|
+
* - `[app]` → `my-app`
|
|
547
|
+
* - `[app]-[browser]-[mv]` → `my-app-chrome-mv3`
|
|
548
|
+
* - `bundle-[name]-[mode]` → `bundle-my-app-production`
|
|
549
|
+
*/
|
|
550
|
+
artifactName: string;
|
|
551
|
+
/**
|
|
552
|
+
* Template for generating asset output file names.
|
|
553
|
+
*
|
|
554
|
+
* This property defines how asset files (images, fonts, etc.) will be named in the build output.
|
|
555
|
+
* It uses Rspack's Filename type, which can be either a string template or a function
|
|
556
|
+
* that returns a filename string.
|
|
557
|
+
*
|
|
558
|
+
* Supported placeholders in string templates:
|
|
559
|
+
* - `[app]` - Extension name (kebab case)
|
|
560
|
+
* - `[name]` - The original asset file name without extension
|
|
561
|
+
* - `[ext]` - The original asset file extension (including the dot)
|
|
562
|
+
* - `[hash]` - A hash of the asset content
|
|
563
|
+
* - `[contenthash]` - A hash of the content only
|
|
564
|
+
*
|
|
565
|
+
* When used as a function, it receives pathData and assetInfo parameters
|
|
566
|
+
* and should return the final filename string.
|
|
567
|
+
*
|
|
568
|
+
* @example
|
|
569
|
+
* // String template examples:
|
|
570
|
+
* "[name].[hash][ext]"
|
|
571
|
+
* "[app]-[name].[contenthash:8][ext]"
|
|
572
|
+
* "images/[name].[hash][ext]"
|
|
573
|
+
*
|
|
574
|
+
* @example
|
|
575
|
+
* // Function example:
|
|
576
|
+
* (pathData, assetInfo) => {
|
|
577
|
+
* const info = pathData.module.resourceResolveData;
|
|
578
|
+
* return `${info.descriptionFileData.name}.${pathData.contentHash}${info.relativePath}`;
|
|
579
|
+
* }
|
|
580
|
+
*
|
|
581
|
+
* @see {@link https://rspack.dev/config/output#outputassetmodulefilename} Rspack asset module filename documentation
|
|
582
|
+
*/
|
|
583
|
+
assetsFilename: Filename;
|
|
584
|
+
/**
|
|
585
|
+
* Template for generating JavaScript output file names.
|
|
586
|
+
*
|
|
587
|
+
* This property defines how JavaScript files will be named in the build output.
|
|
588
|
+
* It uses Rspack's Filename type, which can be either a string template or a function
|
|
589
|
+
* that returns a filename string.
|
|
590
|
+
*
|
|
591
|
+
* Supported placeholders in string templates:
|
|
592
|
+
* - `[app]` - Extension name (kebab case)
|
|
593
|
+
* - `[name]` - The name of the entry or chunk
|
|
594
|
+
* - `[hash]` - A hash of the module identifier and content
|
|
595
|
+
* - `[chunkhash]` - A hash of the chunk content
|
|
596
|
+
* - `[contenthash]` - A hash of the content only
|
|
597
|
+
*
|
|
598
|
+
* When used as a function, it receives pathData and assetInfo parameters
|
|
599
|
+
* and should return the final filename string.
|
|
600
|
+
*
|
|
601
|
+
* @example
|
|
602
|
+
* // String template examples:
|
|
603
|
+
* "[name].[contenthash].js"
|
|
604
|
+
* "[app]-[name].[hash:8].js"
|
|
605
|
+
*
|
|
606
|
+
* @example
|
|
607
|
+
* // Function example:
|
|
608
|
+
* (pathData, assetInfo) => {
|
|
609
|
+
* return `${pathData.chunk.name}.${pathData.chunk.hash}.js`;
|
|
610
|
+
* }
|
|
611
|
+
*
|
|
612
|
+
* @see {@link https://rspack.dev/config/output#outputfilename} Rspack filename documentation
|
|
613
|
+
*/
|
|
614
|
+
jsFilename: Filename;
|
|
615
|
+
/**
|
|
616
|
+
* Template for generating CSS output file names.
|
|
617
|
+
*
|
|
618
|
+
* This property defines how CSS files will be named in the build output.
|
|
619
|
+
* It uses Rspack's Filename type, which can be either a string template or a function
|
|
620
|
+
* that returns a filename string.
|
|
621
|
+
*
|
|
622
|
+
* Supported placeholders in string templates:
|
|
623
|
+
* - `[app]` - Extension name (kebab case)
|
|
624
|
+
* - `[name]` - The name of the entry or chunk
|
|
625
|
+
* - `[hash]` - A hash of the module identifier and content
|
|
626
|
+
* - `[chunkhash]` - A hash of the chunk content
|
|
627
|
+
* - `[contenthash]` - A hash of the content only
|
|
628
|
+
*
|
|
629
|
+
* When used as a function, it receives pathData and assetInfo parameters
|
|
630
|
+
* and should return the final filename string.
|
|
631
|
+
*
|
|
632
|
+
* @example
|
|
633
|
+
* // String template examples:
|
|
634
|
+
* "[name].[contenthash].css"
|
|
635
|
+
* "[app]-[name].[hash:8].css"
|
|
636
|
+
*
|
|
637
|
+
* @example
|
|
638
|
+
* // Function example:
|
|
639
|
+
* (pathData, assetInfo) => {
|
|
640
|
+
* return `${pathData.chunk.name}.${pathData.chunk.hash}.css`;
|
|
641
|
+
* }
|
|
642
|
+
*
|
|
643
|
+
* @see {@link https://rspack.dev/config/output#outputfilename} Rspack filename documentation
|
|
644
|
+
*/
|
|
645
|
+
cssFilename: Filename;
|
|
646
|
+
/**
|
|
647
|
+
* Template for generating scoped CSS class names.
|
|
648
|
+
*
|
|
649
|
+
* Supported placeholders:
|
|
650
|
+
* - `[app]` – extension name (kebab case)
|
|
651
|
+
* - `[name]` – file basename without extension
|
|
652
|
+
* - `[local]` – original class name from your CSS
|
|
653
|
+
* - `[path]` – path to the resource, relative to the build context
|
|
654
|
+
* - `[folder]` – name of the folder containing the resource
|
|
655
|
+
* - `[file]` – combination of `[path]` and `[name]`
|
|
656
|
+
* - `[ext]` – file extension (including the dot)
|
|
657
|
+
* - `[hash]` – hash based on resourcePath + exportName, uniq for app.
|
|
658
|
+
*
|
|
659
|
+
*
|
|
660
|
+
* Note: all characters illegal in filenames (except inside `[local]`) are replaced with “-”
|
|
661
|
+
*
|
|
662
|
+
* @type {string}
|
|
663
|
+
*/
|
|
664
|
+
cssIdentName: string;
|
|
665
|
+
}
|
|
666
|
+
export type OptionalConfig = Omit<Partial<Config>, "lang" | "workspace"> & {
|
|
667
|
+
lang?: Language | `${Language}`;
|
|
668
|
+
workspace?: Workspace | `${Workspace}`;
|
|
669
|
+
};
|
|
670
|
+
export type UserConfig = Omit<OptionalConfig, "configFile" | "command">;
|
|
671
|
+
export type ReadonlyConfig = Readonly<Config>;
|
|
672
|
+
export type UserConfigCallback = (config: ReadonlyConfig) => UserConfig;
|
|
673
|
+
export type ConfigDefinition = UserConfigCallback | UserConfig;
|