adnbn 0.5.7 → 0.6.0
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 +1 -0
- 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/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/service.d.ts +6 -15
- 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 +2 -5
- 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 +4 -7
- 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 +5 -26
- 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 +4 -22
- 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 +4 -19
- 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 +1 -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 +17 -19
- package/dist/types/message.js +1 -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
|
@@ -5,25 +5,75 @@ import {
|
|
|
5
5
|
type LocalePluralKeys,
|
|
6
6
|
type LocaleProvider,
|
|
7
7
|
type LocaleDynamicProvider,
|
|
8
|
-
type
|
|
8
|
+
type LocaleSubstitutionArgs,
|
|
9
9
|
} from ":package/locale";
|
|
10
10
|
|
|
11
11
|
declare module ":package/locale" {
|
|
12
12
|
// prettier-ignore
|
|
13
13
|
export interface GeneratedNativeStructure {}
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
/**
|
|
16
|
+
* Translates a non-plural locale key.
|
|
17
|
+
*
|
|
18
|
+
* Substitutions are type-checked from the generated locale structure:
|
|
19
|
+
* keys without placeholders do not accept substitutions, while keys with
|
|
20
|
+
* placeholders require all declared substitution values.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```ts
|
|
24
|
+
* t("app.name");
|
|
25
|
+
* t("app.greeting", {name: "Alice"});
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
export function t<K extends LocaleNonPluralKeys<GeneratedNativeStructure>>(
|
|
16
29
|
key: K,
|
|
17
|
-
|
|
30
|
+
...args: LocaleSubstitutionArgs<GeneratedNativeStructure, K>
|
|
18
31
|
): string;
|
|
19
32
|
|
|
20
|
-
|
|
33
|
+
/**
|
|
34
|
+
* Translates a plural locale key using the provided count.
|
|
35
|
+
*
|
|
36
|
+
* Substitutions are type-checked from the generated locale structure:
|
|
37
|
+
* keys without placeholders do not accept substitutions, while keys with
|
|
38
|
+
* placeholders require all declared substitution values.
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* ```ts
|
|
42
|
+
* choice("cart.items", count, {count});
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
45
|
+
export function choice<K extends LocalePluralKeys<GeneratedNativeStructure>>(
|
|
21
46
|
key: K,
|
|
22
47
|
count: number,
|
|
23
|
-
|
|
48
|
+
...args: LocaleSubstitutionArgs<GeneratedNativeStructure, K>
|
|
24
49
|
): string;
|
|
25
50
|
|
|
26
|
-
|
|
51
|
+
/**
|
|
52
|
+
* Converts a locale key to a browser message reference.
|
|
53
|
+
*
|
|
54
|
+
* This is useful for browser-managed extension fields that expect
|
|
55
|
+
* `__MSG_name__` references instead of already translated text.
|
|
56
|
+
*
|
|
57
|
+
* @example
|
|
58
|
+
* ```ts
|
|
59
|
+
* key("app.name"); // "__MSG_app_name__"
|
|
60
|
+
* ```
|
|
61
|
+
*/
|
|
62
|
+
export function key(value: keyof GeneratedNativeStructure & string): string;
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Resolves a string that may contain a locale marker.
|
|
66
|
+
*
|
|
67
|
+
* When the input contains a locale marker, the marker is extracted and translated.
|
|
68
|
+
* Plain strings are returned unchanged.
|
|
69
|
+
*
|
|
70
|
+
* @example
|
|
71
|
+
* ```ts
|
|
72
|
+
* resolve("@app.name");
|
|
73
|
+
* resolve("Plain title");
|
|
74
|
+
* ```
|
|
75
|
+
*/
|
|
76
|
+
export function resolve(input: string): string;
|
|
27
77
|
|
|
28
78
|
export declare class NativeLocale implements LocaleProvider<GeneratedNativeStructure> {
|
|
29
79
|
lang(): Language;
|
|
@@ -35,14 +85,14 @@ declare module ":package/locale" {
|
|
|
35
85
|
// non-plural keys
|
|
36
86
|
trans<K extends LocaleNonPluralKeys<GeneratedNativeStructure>>(
|
|
37
87
|
key: K,
|
|
38
|
-
|
|
88
|
+
...args: LocaleSubstitutionArgs<GeneratedNativeStructure, K>
|
|
39
89
|
): string;
|
|
40
90
|
|
|
41
91
|
// plural keys
|
|
42
92
|
choice<K extends LocalePluralKeys<GeneratedNativeStructure>>(
|
|
43
93
|
key: K,
|
|
44
94
|
count: number,
|
|
45
|
-
|
|
95
|
+
...args: LocaleSubstitutionArgs<GeneratedNativeStructure, K>
|
|
46
96
|
): string;
|
|
47
97
|
}
|
|
48
98
|
|
|
@@ -61,15 +111,15 @@ declare module ":package/locale/react" {
|
|
|
61
111
|
|
|
62
112
|
isRtl: boolean;
|
|
63
113
|
|
|
64
|
-
|
|
114
|
+
t<K extends LocaleNonPluralKeys<GeneratedNativeStructure>>(
|
|
65
115
|
key: K,
|
|
66
|
-
|
|
116
|
+
...args: LocaleSubstitutionArgs<GeneratedNativeStructure, K>
|
|
67
117
|
): string;
|
|
68
118
|
|
|
69
119
|
choice<K extends LocalePluralKeys<GeneratedNativeStructure>>(
|
|
70
120
|
key: K,
|
|
71
121
|
count: number,
|
|
72
|
-
|
|
122
|
+
...args: LocaleSubstitutionArgs<GeneratedNativeStructure, K>
|
|
73
123
|
): string;
|
|
74
124
|
|
|
75
125
|
change(lang: Language): void;
|
|
@@ -1,15 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import 'html-rspack-tags-plugin';
|
|
4
|
-
import '../../../types/app.js';
|
|
5
|
-
import '../../../types/browser.js';
|
|
6
|
-
import '../../../manifest-DKvERQ4d.js';
|
|
7
|
-
import 'react';
|
|
8
|
-
import 'utility-types';
|
|
9
|
-
import '../../../types/helpers.js';
|
|
10
|
-
import '../../../types/locale.js';
|
|
11
|
-
import '../../../types/env.js';
|
|
12
|
-
|
|
13
|
-
declare const _default: PluginDefinition<[]>;
|
|
14
|
-
|
|
15
|
-
export { _default as default };
|
|
1
|
+
declare const _default: import("../../../main/plugin.js").PluginDefinition<[]>;
|
|
2
|
+
export default _default;
|
|
@@ -7,7 +7,6 @@ import Locale from "./Locale.js";
|
|
|
7
7
|
import { LocaleDeclaration } from "./declaration/index.js";
|
|
8
8
|
import { Command } from "./../../../types/app.js";
|
|
9
9
|
import { Browser } from "./../../../types/browser.js";
|
|
10
|
-
import { Language, LanguageCodes } from "./../../../types/locale.js";
|
|
11
10
|
var locale_default = definePlugin(() => {
|
|
12
11
|
let locale;
|
|
13
12
|
let declaration;
|
|
@@ -19,11 +18,13 @@ var locale_default = definePlugin(() => {
|
|
|
19
18
|
},
|
|
20
19
|
locale: () => locale.files(),
|
|
21
20
|
bundler: async ({ config }) => {
|
|
21
|
+
await locale.validate();
|
|
22
22
|
declaration.structure(await locale.structure()).build();
|
|
23
23
|
const plugin = new GenerateJsonPlugin(await locale.json());
|
|
24
24
|
if (config.command === Command.Watch) {
|
|
25
25
|
plugin.watch(async () => {
|
|
26
26
|
locale.clear();
|
|
27
|
+
await locale.validate();
|
|
27
28
|
declaration.structure(await locale.structure()).build();
|
|
28
29
|
return await locale.json();
|
|
29
30
|
});
|
|
@@ -39,59 +40,53 @@ var locale_default = definePlugin(() => {
|
|
|
39
40
|
};
|
|
40
41
|
},
|
|
41
42
|
manifest: async ({ config, manifest }) => {
|
|
42
|
-
const { lang, name, shortName, description, browser } = config;
|
|
43
|
-
|
|
44
|
-
if (lang) {
|
|
45
|
-
if (LanguageCodes.has(lang)) {
|
|
46
|
-
language = lang;
|
|
47
|
-
} else {
|
|
48
|
-
throw new Error(`Invalid language "${lang}" provided by config`);
|
|
49
|
-
}
|
|
50
|
-
const availableLanguages = await locale.languages();
|
|
51
|
-
if (availableLanguages.size > 0 && !availableLanguages.has(language)) {
|
|
52
|
-
throw new Error(
|
|
53
|
-
`Language "${language}" not found in available translations. Available languages: ${[...availableLanguages].join(", ")}`
|
|
54
|
-
);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
43
|
+
const { lang: language, name, shortName, description, browser } = config;
|
|
44
|
+
const availableLanguages = await locale.languages();
|
|
57
45
|
const builders = await locale.builders();
|
|
46
|
+
const hasLocales = builders.size > 0;
|
|
47
|
+
if (availableLanguages.size > 0 && !availableLanguages.has(language)) {
|
|
48
|
+
throw new Error(
|
|
49
|
+
`Language "${language}" not found in available translations. Available languages: ${[...availableLanguages].join(", ")}`
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
await locale.validate();
|
|
58
53
|
const keys = await locale.keys();
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
if (
|
|
62
|
-
|
|
63
|
-
const shortNameKey = extractLocaleKey(shortName);
|
|
64
|
-
if (shortNameKey) {
|
|
65
|
-
if (!keys.has(shortNameKey)) {
|
|
66
|
-
throw new Error(`Locale short name key "${shortNameKey}" not found in translation`);
|
|
67
|
-
}
|
|
68
|
-
if (browser === Browser.Opera || browser === Browser.Edge) {
|
|
69
|
-
const instance = builders.get(language);
|
|
70
|
-
if (!instance) {
|
|
71
|
-
throw new Error(`Locale not found for "${language}"`);
|
|
72
|
-
}
|
|
73
|
-
manifestShortName = instance.get().get(shortNameKey);
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
manifest.setShortName(manifestShortName);
|
|
54
|
+
const assertLocaleKey = (value, label) => {
|
|
55
|
+
const key = extractLocaleKey(value);
|
|
56
|
+
if (!key) {
|
|
57
|
+
return;
|
|
77
58
|
}
|
|
78
|
-
if (
|
|
79
|
-
|
|
80
|
-
if (descriptionKey && !keys.has(descriptionKey)) {
|
|
81
|
-
throw new Error(`Locale description key "${descriptionKey}" not found in translation`);
|
|
82
|
-
}
|
|
83
|
-
manifest.setDescription(modifyLocaleMessageKey(description));
|
|
59
|
+
if (!hasLocales) {
|
|
60
|
+
throw new Error(`Locale ${label} key "${key}" provided but no translations were found`);
|
|
84
61
|
}
|
|
85
|
-
if (
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
62
|
+
if (!keys.has(key)) {
|
|
63
|
+
throw new Error(`Locale ${label} key "${key}" not found in translation`);
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
manifest.setLocale(hasLocales ? language : void 0);
|
|
67
|
+
if (shortName) {
|
|
68
|
+
let manifestShortName = modifyLocaleMessageKey(shortName) ?? shortName;
|
|
69
|
+
const shortNameKey = extractLocaleKey(shortName);
|
|
70
|
+
assertLocaleKey(shortName, "short name");
|
|
71
|
+
if (shortNameKey && (browser === Browser.Opera || browser === Browser.Edge)) {
|
|
72
|
+
const instance = builders.get(language);
|
|
73
|
+
if (!instance) {
|
|
74
|
+
throw new Error(`Locale not found for "${language}"`);
|
|
94
75
|
}
|
|
76
|
+
manifestShortName = instance.get().get(shortNameKey) ?? manifestShortName;
|
|
77
|
+
}
|
|
78
|
+
manifest.setShortName(manifestShortName);
|
|
79
|
+
}
|
|
80
|
+
if (description) {
|
|
81
|
+
assertLocaleKey(description, "description");
|
|
82
|
+
manifest.setDescription(modifyLocaleMessageKey(description));
|
|
83
|
+
}
|
|
84
|
+
if (name) {
|
|
85
|
+
assertLocaleKey(name, "name");
|
|
86
|
+
const manifestName = modifyLocaleMessageKey(name);
|
|
87
|
+
if (manifestName) {
|
|
88
|
+
manifest.setName(manifestName);
|
|
89
|
+
return;
|
|
95
90
|
}
|
|
96
91
|
}
|
|
97
92
|
manifest.setName(_.startCase(config.app));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/cli/plugins/locale/index.ts"],"sourcesContent":["import _ from \"lodash\";\nimport {Configuration as RspackConfig, DefinePlugin} from \"@rspack/core\";\n\nimport {definePlugin} from \"@main/plugin\";\nimport {GenerateJsonPlugin} from \"@cli/bundler\";\nimport {extractLocaleKey, modifyLocaleMessageKey} from \"@locale/utils\";\n\nimport Locale from \"./Locale\";\n\nimport {LocaleDeclaration} from \"./declaration\";\n\nimport {Command} from \"@typing/app\";\nimport {Browser} from \"@typing/browser\";\
|
|
1
|
+
{"version":3,"sources":["../../../../src/cli/plugins/locale/index.ts"],"sourcesContent":["import _ from \"lodash\";\nimport {Configuration as RspackConfig, DefinePlugin} from \"@rspack/core\";\n\nimport {definePlugin} from \"@main/plugin\";\nimport {GenerateJsonPlugin} from \"@cli/bundler\";\nimport {extractLocaleKey, modifyLocaleMessageKey} from \"@locale/utils\";\n\nimport Locale from \"./Locale\";\n\nimport {LocaleDeclaration} from \"./declaration\";\n\nimport {Command} from \"@typing/app\";\nimport {Browser} from \"@typing/browser\";\n\nexport default definePlugin(() => {\n let locale: Locale;\n let declaration: LocaleDeclaration;\n\n return {\n name: \"adnbn:locale\",\n startup: ({config}) => {\n locale = new Locale(config);\n declaration = new LocaleDeclaration(config);\n },\n locale: () => locale.files(),\n bundler: async ({config}) => {\n await locale.validate();\n\n declaration.structure(await locale.structure()).build();\n\n const plugin = new GenerateJsonPlugin(await locale.json());\n\n if (config.command === Command.Watch) {\n plugin.watch(async () => {\n locale.clear();\n\n await locale.validate();\n\n declaration.structure(await locale.structure()).build();\n\n return await locale.json();\n });\n }\n\n return {\n plugins: [\n plugin,\n new DefinePlugin({\n __ADNBN_LOCALE_KEYS__: JSON.stringify([...(await locale.keys())]),\n __ADNBN_DEFINED_LOCALES__: JSON.stringify([...(await locale.languages())]),\n }),\n ],\n } satisfies RspackConfig;\n },\n manifest: async ({config, manifest}) => {\n const {lang: language, name, shortName, description, browser} = config;\n const availableLanguages = await locale.languages();\n const builders = await locale.builders();\n const hasLocales = builders.size > 0;\n\n if (availableLanguages.size > 0 && !availableLanguages.has(language)) {\n throw new Error(\n `Language \"${language}\" not found in available translations. Available languages: ${[...availableLanguages].join(\", \")}`\n );\n }\n\n await locale.validate();\n\n const keys = await locale.keys();\n\n const assertLocaleKey = (value: string, label: string): void => {\n const key = extractLocaleKey(value);\n\n if (!key) {\n return;\n }\n\n if (!hasLocales) {\n throw new Error(`Locale ${label} key \"${key}\" provided but no translations were found`);\n }\n\n if (!keys.has(key)) {\n throw new Error(`Locale ${label} key \"${key}\" not found in translation`);\n }\n };\n\n manifest.setLocale(hasLocales ? language : undefined);\n\n if (shortName) {\n let manifestShortName = modifyLocaleMessageKey(shortName) ?? shortName;\n const shortNameKey = extractLocaleKey(shortName);\n\n assertLocaleKey(shortName, \"short name\");\n\n /** Opera/Edge do not support localization in manifest's short_name field */\n if (shortNameKey && (browser === Browser.Opera || browser === Browser.Edge)) {\n const instance = builders.get(language);\n\n if (!instance) {\n throw new Error(`Locale not found for \"${language}\"`);\n }\n\n manifestShortName = instance.get().get(shortNameKey) ?? manifestShortName;\n }\n\n manifest.setShortName(manifestShortName);\n }\n\n if (description) {\n assertLocaleKey(description, \"description\");\n manifest.setDescription(modifyLocaleMessageKey(description));\n }\n\n if (name) {\n assertLocaleKey(name, \"name\");\n\n const manifestName = modifyLocaleMessageKey(name);\n\n if (manifestName) {\n manifest.setName(manifestName);\n\n return;\n }\n }\n\n manifest.setName(_.startCase(config.app));\n },\n };\n});\n"],"mappings":"AAAA,OAAO,OAAO;AACd,SAAuC,oBAAmB;AAE1D,SAAQ,oBAAmB;AAC3B,SAAQ,0BAAyB;AACjC,SAAQ,kBAAkB,8BAA6B;AAEvD,OAAO,YAAY;AAEnB,SAAQ,yBAAwB;AAEhC,SAAQ,eAAc;AACtB,SAAQ,eAAc;AAEtB,IAAO,iBAAQ,aAAa,MAAM;AAC9B,MAAI;AACJ,MAAI;AAEJ,SAAO;AAAA,IACH,MAAM;AAAA,IACN,SAAS,CAAC,EAAC,OAAM,MAAM;AACnB,eAAS,IAAI,OAAO,MAAM;AAC1B,oBAAc,IAAI,kBAAkB,MAAM;AAAA,IAC9C;AAAA,IACA,QAAQ,MAAM,OAAO,MAAM;AAAA,IAC3B,SAAS,OAAO,EAAC,OAAM,MAAM;AACzB,YAAM,OAAO,SAAS;AAEtB,kBAAY,UAAU,MAAM,OAAO,UAAU,CAAC,EAAE,MAAM;AAEtD,YAAM,SAAS,IAAI,mBAAmB,MAAM,OAAO,KAAK,CAAC;AAEzD,UAAI,OAAO,YAAY,QAAQ,OAAO;AAClC,eAAO,MAAM,YAAY;AACrB,iBAAO,MAAM;AAEb,gBAAM,OAAO,SAAS;AAEtB,sBAAY,UAAU,MAAM,OAAO,UAAU,CAAC,EAAE,MAAM;AAEtD,iBAAO,MAAM,OAAO,KAAK;AAAA,QAC7B,CAAC;AAAA,MACL;AAEA,aAAO;AAAA,QACH,SAAS;AAAA,UACL;AAAA,UACA,IAAI,aAAa;AAAA,YACb,uBAAuB,KAAK,UAAU,CAAC,GAAI,MAAM,OAAO,KAAK,CAAE,CAAC;AAAA,YAChE,2BAA2B,KAAK,UAAU,CAAC,GAAI,MAAM,OAAO,UAAU,CAAE,CAAC;AAAA,UAC7E,CAAC;AAAA,QACL;AAAA,MACJ;AAAA,IACJ;AAAA,IACA,UAAU,OAAO,EAAC,QAAQ,SAAQ,MAAM;AACpC,YAAM,EAAC,MAAM,UAAU,MAAM,WAAW,aAAa,QAAO,IAAI;AAChE,YAAM,qBAAqB,MAAM,OAAO,UAAU;AAClD,YAAM,WAAW,MAAM,OAAO,SAAS;AACvC,YAAM,aAAa,SAAS,OAAO;AAEnC,UAAI,mBAAmB,OAAO,KAAK,CAAC,mBAAmB,IAAI,QAAQ,GAAG;AAClE,cAAM,IAAI;AAAA,UACN,aAAa,QAAQ,+DAA+D,CAAC,GAAG,kBAAkB,EAAE,KAAK,IAAI,CAAC;AAAA,QAC1H;AAAA,MACJ;AAEA,YAAM,OAAO,SAAS;AAEtB,YAAM,OAAO,MAAM,OAAO,KAAK;AAE/B,YAAM,kBAAkB,CAAC,OAAe,UAAwB;AAC5D,cAAM,MAAM,iBAAiB,KAAK;AAElC,YAAI,CAAC,KAAK;AACN;AAAA,QACJ;AAEA,YAAI,CAAC,YAAY;AACb,gBAAM,IAAI,MAAM,UAAU,KAAK,SAAS,GAAG,2CAA2C;AAAA,QAC1F;AAEA,YAAI,CAAC,KAAK,IAAI,GAAG,GAAG;AAChB,gBAAM,IAAI,MAAM,UAAU,KAAK,SAAS,GAAG,4BAA4B;AAAA,QAC3E;AAAA,MACJ;AAEA,eAAS,UAAU,aAAa,WAAW,MAAS;AAEpD,UAAI,WAAW;AACX,YAAI,oBAAoB,uBAAuB,SAAS,KAAK;AAC7D,cAAM,eAAe,iBAAiB,SAAS;AAE/C,wBAAgB,WAAW,YAAY;AAGvC,YAAI,iBAAiB,YAAY,QAAQ,SAAS,YAAY,QAAQ,OAAO;AACzE,gBAAM,WAAW,SAAS,IAAI,QAAQ;AAEtC,cAAI,CAAC,UAAU;AACX,kBAAM,IAAI,MAAM,yBAAyB,QAAQ,GAAG;AAAA,UACxD;AAEA,8BAAoB,SAAS,IAAI,EAAE,IAAI,YAAY,KAAK;AAAA,QAC5D;AAEA,iBAAS,aAAa,iBAAiB;AAAA,MAC3C;AAEA,UAAI,aAAa;AACb,wBAAgB,aAAa,aAAa;AAC1C,iBAAS,eAAe,uBAAuB,WAAW,CAAC;AAAA,MAC/D;AAEA,UAAI,MAAM;AACN,wBAAgB,MAAM,MAAM;AAE5B,cAAM,eAAe,uBAAuB,IAAI;AAEhD,YAAI,cAAc;AACd,mBAAS,QAAQ,YAAY;AAE7B;AAAA,QACJ;AAAA,MACJ;AAEA,eAAS,QAAQ,EAAE,UAAU,OAAO,GAAG,CAAC;AAAA,IAC5C;AAAA,EACJ;AACJ,CAAC;","names":[]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { definePlugin } from "./../../main/plugin.js";
|
|
2
|
+
import { fromRootPath } from "./../../cli/resolvers/path.js";
|
|
3
|
+
import fs from "fs";
|
|
4
|
+
var manifest_default = definePlugin(() => {
|
|
5
|
+
return {
|
|
6
|
+
name: "adnbn:manifest",
|
|
7
|
+
manifest: ({ config, manifest }) => {
|
|
8
|
+
try {
|
|
9
|
+
const packagePath = fromRootPath(config, "package.json");
|
|
10
|
+
const packageJson = JSON.parse(fs.readFileSync(packagePath, "utf-8"));
|
|
11
|
+
packageJson.manifest && manifest.raw(packageJson.manifest);
|
|
12
|
+
} catch (e) {
|
|
13
|
+
}
|
|
14
|
+
const configManifest = config.manifest;
|
|
15
|
+
if (typeof configManifest === "object") {
|
|
16
|
+
manifest.raw(configManifest);
|
|
17
|
+
} else if (typeof configManifest === "function") {
|
|
18
|
+
const result = configManifest(manifest);
|
|
19
|
+
result && manifest.raw(result);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
});
|
|
24
|
+
export {
|
|
25
|
+
manifest_default as default
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=manifest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/cli/plugins/manifest.ts"],"sourcesContent":["import {definePlugin} from \"@main/plugin\";\nimport {fromRootPath} from \"@cli/resolvers/path\";\nimport fs from \"fs\";\n\nexport default definePlugin(() => {\n return {\n name: \"adnbn:manifest\",\n manifest: ({config, manifest}) => {\n try {\n const packagePath = fromRootPath(config, \"package.json\");\n\n const packageJson = JSON.parse(fs.readFileSync(packagePath, \"utf-8\"));\n\n packageJson.manifest && manifest.raw(packageJson.manifest);\n } catch (e) {}\n\n const configManifest = config.manifest;\n\n if (typeof configManifest === \"object\") {\n manifest.raw(configManifest);\n } else if (typeof configManifest === \"function\") {\n const result = configManifest(manifest);\n\n result && manifest.raw(result);\n }\n },\n };\n});\n"],"mappings":"AAAA,SAAQ,oBAAmB;AAC3B,SAAQ,oBAAmB;AAC3B,OAAO,QAAQ;AAEf,IAAO,mBAAQ,aAAa,MAAM;AAC9B,SAAO;AAAA,IACH,MAAM;AAAA,IACN,UAAU,CAAC,EAAC,QAAQ,SAAQ,MAAM;AAC9B,UAAI;AACA,cAAM,cAAc,aAAa,QAAQ,cAAc;AAEvD,cAAM,cAAc,KAAK,MAAM,GAAG,aAAa,aAAa,OAAO,CAAC;AAEpE,oBAAY,YAAY,SAAS,IAAI,YAAY,QAAQ;AAAA,MAC7D,SAAS,GAAG;AAAA,MAAC;AAEb,YAAM,iBAAiB,OAAO;AAE9B,UAAI,OAAO,mBAAmB,UAAU;AACpC,iBAAS,IAAI,cAAc;AAAA,MAC/B,WAAW,OAAO,mBAAmB,YAAY;AAC7C,cAAM,SAAS,eAAe,QAAQ;AAEtC,kBAAU,SAAS,IAAI,MAAM;AAAA,MACjC;AAAA,IACJ;AAAA,EACJ;AACJ,CAAC;","names":[]}
|
|
@@ -1,16 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import 'html-rspack-tags-plugin';
|
|
4
|
-
import '../../../types/app.js';
|
|
5
|
-
import '../../../types/browser.js';
|
|
6
|
-
import '../../../manifest-DKvERQ4d.js';
|
|
7
|
-
import 'react';
|
|
8
|
-
import 'utility-types';
|
|
9
|
-
import '../../../types/helpers.js';
|
|
10
|
-
import '../../../types/locale.js';
|
|
11
|
-
import '../../../types/env.js';
|
|
12
|
-
|
|
13
|
-
declare abstract class AbstractMeta<V = string> {
|
|
1
|
+
import type { ReadonlyConfig } from "../../../types/config.js";
|
|
2
|
+
export default abstract class AbstractMeta<V = string> {
|
|
14
3
|
protected readonly config: ReadonlyConfig;
|
|
15
4
|
static value<T extends AbstractMeta<any>>(this: new (config: ReadonlyConfig) => T, config: ReadonlyConfig): T extends AbstractMeta<infer V> ? V | undefined : never;
|
|
16
5
|
abstract getValue(): undefined | V | (() => V | undefined);
|
|
@@ -18,5 +7,3 @@ declare abstract class AbstractMeta<V = string> {
|
|
|
18
7
|
getResolved(): V | undefined;
|
|
19
8
|
protected isValid(value?: unknown): value is V;
|
|
20
9
|
}
|
|
21
|
-
|
|
22
|
-
export { AbstractMeta as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/cli/plugins/meta/AbstractMeta.ts"],"sourcesContent":["import _ from \"lodash\";\n\nimport {getEnv} from \"@main/env\";\n\nimport type {ReadonlyConfig} from \"@typing/config\";\n\nexport default abstract class AbstractMeta<V = string> {\n public static value<T extends AbstractMeta<any>>(\n this: new (config: ReadonlyConfig) => T,\n config: ReadonlyConfig\n ): T extends AbstractMeta<infer V> ? V | undefined : never {\n return new this(config).getResolved() as T extends AbstractMeta<infer V> ? V | undefined : never;\n }\n\n public abstract getValue(): undefined | V | (() => V | undefined);\n\n protected constructor(protected readonly config: ReadonlyConfig) {}\n\n public getResolved(): V | undefined {\n const value = this.getValue();\n\n const resolved = _.isFunction(value) ? value() : value;\n\n if (this.isValid(resolved)) {\n return resolved;\n }\n\n if (_.isString(resolved)) {\n const valueFromEnv = getEnv(resolved);\n\n if (this.isValid(valueFromEnv)) {\n return valueFromEnv;\n }\n }\n }\n\n protected isValid(value?: unknown): value is V {\n return true;\n }\n}\n"],"mappings":"AAAA,OAAO,OAAO;AAEd,SAAQ,cAAa;AAIrB,MAAO,aAAgD;AAAA,EAUzC,YAA+B,QAAwB;AAAxB;AAAA,EAAyB;AAAA,
|
|
1
|
+
{"version":3,"sources":["../../../../src/cli/plugins/meta/AbstractMeta.ts"],"sourcesContent":["import _ from \"lodash\";\n\nimport {getEnv} from \"@main/env\";\n\nimport type {ReadonlyConfig} from \"@typing/config\";\n\nexport default abstract class AbstractMeta<V = string> {\n public static value<T extends AbstractMeta<any>>(\n this: new (config: ReadonlyConfig) => T,\n config: ReadonlyConfig\n ): T extends AbstractMeta<infer V> ? V | undefined : never {\n return new this(config).getResolved() as T extends AbstractMeta<infer V> ? V | undefined : never;\n }\n\n public abstract getValue(): undefined | V | (() => V | undefined);\n\n protected constructor(protected readonly config: ReadonlyConfig) {}\n\n public getResolved(): V | undefined {\n const value = this.getValue();\n\n const resolved = _.isFunction(value) ? value() : value;\n\n if (this.isValid(resolved)) {\n return resolved;\n }\n\n if (_.isString(resolved)) {\n const valueFromEnv = getEnv(resolved);\n\n if (this.isValid(valueFromEnv)) {\n return valueFromEnv;\n }\n }\n }\n\n protected isValid(value?: unknown): value is V {\n return true;\n }\n}\n"],"mappings":"AAAA,OAAO,OAAO;AAEd,SAAQ,cAAa;AAIrB,MAAO,aAAgD;AAAA,EAUzC,YAA+B,QAAwB;AAAxB;AAAA,EAAyB;AAAA,EAAzB;AAAA,EATzC,OAAc,MAEV,QACuD;AACvD,WAAO,IAAI,KAAK,MAAM,EAAE,YAAY;AAAA,EACxC;AAAA,EAMO,cAA6B;AAChC,UAAM,QAAQ,KAAK,SAAS;AAE5B,UAAM,WAAW,EAAE,WAAW,KAAK,IAAI,MAAM,IAAI;AAEjD,QAAI,KAAK,QAAQ,QAAQ,GAAG;AACxB,aAAO;AAAA,IACX;AAEA,QAAI,EAAE,SAAS,QAAQ,GAAG;AACtB,YAAM,eAAe,OAAO,QAAQ;AAEpC,UAAI,KAAK,QAAQ,YAAY,GAAG;AAC5B,eAAO;AAAA,MACX;AAAA,IACJ;AAAA,EACJ;AAAA,EAEU,QAAQ,OAA6B;AAC3C,WAAO;AAAA,EACX;AACJ;","names":[]}
|
|
@@ -1,21 +1,8 @@
|
|
|
1
|
-
import AbstractMeta from
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
import 'html-rspack-tags-plugin';
|
|
5
|
-
import '../../../types/app.js';
|
|
6
|
-
import '../../../types/browser.js';
|
|
7
|
-
import '../../../manifest-DKvERQ4d.js';
|
|
8
|
-
import 'react';
|
|
9
|
-
import 'utility-types';
|
|
10
|
-
import '../../../types/helpers.js';
|
|
11
|
-
import '../../../types/locale.js';
|
|
12
|
-
import '../../../types/env.js';
|
|
13
|
-
|
|
14
|
-
declare class export_default extends AbstractMeta {
|
|
1
|
+
import AbstractMeta from "./AbstractMeta.js";
|
|
2
|
+
import type { ReadonlyConfig } from "../../../types/config.js";
|
|
3
|
+
export default class extends AbstractMeta {
|
|
15
4
|
constructor(config: ReadonlyConfig);
|
|
16
5
|
getValue(): ReadonlyConfig["author"];
|
|
17
6
|
protected isValid(value?: string): value is string;
|
|
18
7
|
getResolved(): string | undefined;
|
|
19
8
|
}
|
|
20
|
-
|
|
21
|
-
export { export_default as default };
|
|
@@ -1,20 +1,7 @@
|
|
|
1
|
-
import AbstractMeta from
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
import 'html-rspack-tags-plugin';
|
|
5
|
-
import '../../../types/app.js';
|
|
6
|
-
import '../../../types/browser.js';
|
|
7
|
-
import '../../../manifest-DKvERQ4d.js';
|
|
8
|
-
import 'react';
|
|
9
|
-
import 'utility-types';
|
|
10
|
-
import '../../../types/helpers.js';
|
|
11
|
-
import '../../../types/locale.js';
|
|
12
|
-
import '../../../types/env.js';
|
|
13
|
-
|
|
14
|
-
declare class export_default extends AbstractMeta<string> {
|
|
1
|
+
import AbstractMeta from "./AbstractMeta.js";
|
|
2
|
+
import type { ReadonlyConfig } from "../../../types/config.js";
|
|
3
|
+
export default class extends AbstractMeta<string> {
|
|
15
4
|
constructor(config: ReadonlyConfig);
|
|
16
5
|
getValue(): ReadonlyConfig["homepage"];
|
|
17
6
|
protected isValid(value?: unknown): value is string;
|
|
18
7
|
}
|
|
19
|
-
|
|
20
|
-
export { export_default as default };
|
|
@@ -1,20 +1,8 @@
|
|
|
1
|
-
import AbstractMeta from
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
import 'html-rspack-tags-plugin';
|
|
6
|
-
import '../../../types/app.js';
|
|
7
|
-
import '../../../types/browser.js';
|
|
8
|
-
import '../../../types/locale.js';
|
|
9
|
-
import '../../../types/helpers.js';
|
|
10
|
-
import '../../../types/env.js';
|
|
11
|
-
import 'react';
|
|
12
|
-
import 'utility-types';
|
|
13
|
-
|
|
14
|
-
declare class export_default extends AbstractMeta<ManifestIncognitoValue> {
|
|
1
|
+
import AbstractMeta from "./AbstractMeta.js";
|
|
2
|
+
import { ReadonlyConfig } from "../../../types/config.js";
|
|
3
|
+
import { ManifestIncognito, ManifestIncognitoValue } from "../../../types/manifest.js";
|
|
4
|
+
export default class extends AbstractMeta<ManifestIncognitoValue> {
|
|
15
5
|
constructor(config: ReadonlyConfig);
|
|
16
6
|
getValue(): ReadonlyConfig["incognito"];
|
|
17
7
|
protected isValid(value?: unknown): value is ManifestIncognito;
|
|
18
8
|
}
|
|
19
|
-
|
|
20
|
-
export { export_default as default };
|
|
@@ -1,20 +1,8 @@
|
|
|
1
|
-
import AbstractMeta from
|
|
2
|
-
import { BrowserSpecific } from
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
import 'html-rspack-tags-plugin';
|
|
6
|
-
import '../../../types/app.js';
|
|
7
|
-
import '../../../manifest-DKvERQ4d.js';
|
|
8
|
-
import 'react';
|
|
9
|
-
import 'utility-types';
|
|
10
|
-
import '../../../types/helpers.js';
|
|
11
|
-
import '../../../types/locale.js';
|
|
12
|
-
import '../../../types/env.js';
|
|
13
|
-
|
|
14
|
-
declare class export_default extends AbstractMeta<BrowserSpecific> {
|
|
1
|
+
import AbstractMeta from "./AbstractMeta.js";
|
|
2
|
+
import { BrowserSpecific } from "../../../types/browser.js";
|
|
3
|
+
import { ReadonlyConfig } from "../../../types/config.js";
|
|
4
|
+
export default class extends AbstractMeta<BrowserSpecific> {
|
|
15
5
|
constructor(config: ReadonlyConfig);
|
|
16
6
|
getValue(): ReadonlyConfig["specific"];
|
|
17
7
|
protected isValid(value?: unknown): value is BrowserSpecific;
|
|
18
8
|
}
|
|
19
|
-
|
|
20
|
-
export { export_default as default };
|
|
@@ -1,20 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export {
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
import '../../../types/app.js';
|
|
9
|
-
import '../../../types/browser.js';
|
|
10
|
-
import '../../../manifest-DKvERQ4d.js';
|
|
11
|
-
import 'react';
|
|
12
|
-
import 'utility-types';
|
|
13
|
-
import '../../../types/helpers.js';
|
|
14
|
-
import '../../../types/locale.js';
|
|
15
|
-
import '../../../types/env.js';
|
|
16
|
-
import './AbstractMeta.js';
|
|
17
|
-
|
|
18
|
-
declare const _default: PluginDefinition<[]>;
|
|
19
|
-
|
|
20
|
-
export { _default as default };
|
|
1
|
+
import Author from "./Author.js";
|
|
2
|
+
import Homepage from "./Homepage.js";
|
|
3
|
+
import Incognito from "./Incognito.js";
|
|
4
|
+
import SpecificSettings from "./SpecificSettings.js";
|
|
5
|
+
export { Author, Homepage, Incognito, SpecificSettings };
|
|
6
|
+
declare const _default: import("../../../main/plugin.js").PluginDefinition<[]>;
|
|
7
|
+
export default _default;
|
|
@@ -1,39 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
import '../../../types/browser.js';
|
|
11
|
-
import '../../../types/helpers.js';
|
|
12
|
-
import '../../../types/locale.js';
|
|
13
|
-
import '@rspack/core';
|
|
14
|
-
import 'html-rspack-tags-plugin';
|
|
15
|
-
import '../../../types/env.js';
|
|
16
|
-
import '../../entrypoint/finder/AbstractViewFinder.js';
|
|
17
|
-
import '../../entrypoint/finder/AbstractPluginFinder.js';
|
|
18
|
-
import '../../entrypoint/finder/AbstractEntrypointFinder.js';
|
|
19
|
-
import '../../entrypoint/finder/AbstractOptionsFinder.js';
|
|
20
|
-
import '../../entrypoint/finder/AbstractFinder.js';
|
|
21
|
-
import '../../../types/view.js';
|
|
22
|
-
import '../../entrypoint/finder/AbstractTransportFinder.js';
|
|
23
|
-
import '../../entrypoint/name/InlineNameGenerator.js';
|
|
24
|
-
import '../../entrypoint/name/NameGenerator.js';
|
|
25
|
-
import '../../../types/transport.js';
|
|
26
|
-
import '../../../types/message.js';
|
|
27
|
-
|
|
28
|
-
type OffscreenParameters = Record<string, chrome.offscreen.CreateParameters>;
|
|
29
|
-
declare class export_default extends export_default$1 {
|
|
30
|
-
protected _view?: export_default$2<OffscreenEntrypointOptions>;
|
|
31
|
-
protected _views?: export_default$3;
|
|
1
|
+
import { View } from "../view/index.js";
|
|
2
|
+
import { OffscreenFinder, OffscreenViewFinder } from "../../entrypoint/index.js";
|
|
3
|
+
import { ReadonlyConfig } from "../../../types/config.js";
|
|
4
|
+
import { OffscreenEntrypointOptions } from "../../../types/offscreen.js";
|
|
5
|
+
import { EntrypointFile } from "../../../types/entrypoint.js";
|
|
6
|
+
export type OffscreenParameters = Record<string, chrome.offscreen.CreateParameters>;
|
|
7
|
+
export default class extends OffscreenFinder {
|
|
8
|
+
protected _view?: View<OffscreenEntrypointOptions>;
|
|
9
|
+
protected _views?: OffscreenViewFinder;
|
|
32
10
|
constructor(config: ReadonlyConfig);
|
|
33
11
|
chunkName(): string;
|
|
34
12
|
likely(name?: string): boolean;
|
|
35
|
-
view():
|
|
36
|
-
views():
|
|
13
|
+
view(): View<OffscreenEntrypointOptions>;
|
|
14
|
+
views(): OffscreenViewFinder;
|
|
37
15
|
/**
|
|
38
16
|
* Before creating the virtual module, it is necessary to run a command `await this.transport()` that caches the Offscreens.
|
|
39
17
|
* This command is executed during the type declaration generation stage for the Offscreens.
|
|
@@ -42,5 +20,3 @@ declare class export_default extends export_default$1 {
|
|
|
42
20
|
parameters(): Promise<OffscreenParameters>;
|
|
43
21
|
clear(): this;
|
|
44
22
|
}
|
|
45
|
-
|
|
46
|
-
export { type OffscreenParameters, export_default as default };
|
|
@@ -1,19 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
import 'html-rspack-tags-plugin';
|
|
5
|
-
import '../../../types/app.js';
|
|
6
|
-
import '../../../types/browser.js';
|
|
7
|
-
import '../../../manifest-DKvERQ4d.js';
|
|
8
|
-
import 'react';
|
|
9
|
-
import 'utility-types';
|
|
10
|
-
import '../../../types/helpers.js';
|
|
11
|
-
import '../../../types/locale.js';
|
|
12
|
-
import '../../../types/env.js';
|
|
13
|
-
import '../typescript/FileBuilder.js';
|
|
14
|
-
|
|
15
|
-
declare class export_default extends export_default$1 {
|
|
1
|
+
import { TransportDeclaration } from "../typescript/index.js";
|
|
2
|
+
import { ReadonlyConfig } from "../../../types/config.js";
|
|
3
|
+
export default class extends TransportDeclaration {
|
|
16
4
|
constructor(config: ReadonlyConfig);
|
|
17
5
|
}
|
|
18
|
-
|
|
19
|
-
export { export_default as default };
|
|
@@ -1,15 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import 'html-rspack-tags-plugin';
|
|
4
|
-
import '../../../types/app.js';
|
|
5
|
-
import '../../../types/browser.js';
|
|
6
|
-
import '../../../manifest-DKvERQ4d.js';
|
|
7
|
-
import 'react';
|
|
8
|
-
import 'utility-types';
|
|
9
|
-
import '../../../types/helpers.js';
|
|
10
|
-
import '../../../types/locale.js';
|
|
11
|
-
import '../../../types/env.js';
|
|
12
|
-
|
|
13
|
-
declare const _default: PluginDefinition<[]>;
|
|
14
|
-
|
|
15
|
-
export { _default as default };
|
|
1
|
+
declare const _default: import("../../../main/plugin.js").PluginDefinition<[]>;
|
|
2
|
+
export default _default;
|