adnbn 0.5.6 → 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 -6
- package/dist/cli/bundler/utils/optimization.js +10 -98
- package/dist/cli/bundler/utils/optimization.js.map +1 -1
- 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/index.js +14 -3
- package/dist/cli/plugins/content/index.js.map +1 -1
- 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/optimization.js +42 -13
- package/dist/cli/plugins/optimization.js.map +1 -1
- 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/plugins/view/index.js +26 -12
- package/dist/cli/plugins/view/index.js.map +1 -1
- package/dist/cli/resolvers/bundler.d.ts +4 -15
- package/dist/cli/resolvers/config.d.ts +2 -14
- package/dist/cli/resolvers/config.js +46 -11
- 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 +14 -16
- package/dist/config-BaSTGrd0.d.ts +0 -726
- package/dist/manifest-DKvERQ4d.d.ts +0 -503
|
@@ -1,22 +1,11 @@
|
|
|
1
|
-
import FileBuilder 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 enum TransportDeclarationLayer {
|
|
1
|
+
import FileBuilder from "../../FileBuilder.js";
|
|
2
|
+
import { ReadonlyConfig } from "../../../../../types/config.js";
|
|
3
|
+
export declare enum TransportDeclarationLayer {
|
|
15
4
|
Service = "service",
|
|
16
5
|
Offscreen = "offscreen",
|
|
17
6
|
Relay = "relay"
|
|
18
7
|
}
|
|
19
|
-
|
|
8
|
+
export default class<T extends Record<string, string> = Record<string, string>> extends FileBuilder {
|
|
20
9
|
protected readonly layer: TransportDeclarationLayer;
|
|
21
10
|
protected _dictionary?: T;
|
|
22
11
|
constructor(config: ReadonlyConfig, layer: TransportDeclarationLayer);
|
|
@@ -26,5 +15,3 @@ declare class export_default<T extends Record<string, string> = Record<string, s
|
|
|
26
15
|
protected template(): string;
|
|
27
16
|
dictionary(dictionary: T): this;
|
|
28
17
|
}
|
|
29
|
-
|
|
30
|
-
export { TransportDeclarationLayer, export_default as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../src/cli/plugins/typescript/declaration/transport/TransportDeclaration.ts"],"sourcesContent":["import _ from \"lodash\";\n\nimport FileBuilder from \"../../FileBuilder\";\n\nimport {ReadonlyConfig} from \"@typing/config\";\n\nexport enum TransportDeclarationLayer {\n Service = \"service\",\n Offscreen = \"offscreen\",\n Relay = \"relay\",\n}\n\nexport default class<T extends Record<string, string> = Record<string, string>> extends FileBuilder {\n protected _dictionary?: T;\n\n constructor(\n config: ReadonlyConfig,\n protected readonly layer: TransportDeclarationLayer\n ) {\n super(config);\n }\n\n protected filename(): string {\n return this.layer + \".d.ts\";\n }\n\n protected file(): URL {\n return new URL(\"./transport.d.ts\", this.url());\n }\n\n protected url(): string {\n return import.meta.url;\n }\n\n protected template(): string {\n const dictionary = this._dictionary;\n\n if (!dictionary) {\n throw new Error(`Transport ${this.layer} dictionary is not set`);\n }\n\n const type = Object.entries(dictionary)\n .map(([key, value]) => {\n return `'${key}': ${value};`;\n })\n .join(\"\\n\\t\\t\");\n\n return this.readFile()\n .replaceAll(\":layer\", this.layer)\n .replaceAll(\"Layer\", _.upperFirst(this.layer))\n .replace(`{ [name: string]: any }`, `{\\n\\t\\t${type}\\n\\t}`);\n }\n\n public dictionary(dictionary: T): this {\n this._dictionary = dictionary;\n\n return this;\n }\n}\n"],"mappings":"AAAA,OAAO,OAAO;AAEd,OAAO,iBAAiB;AAIjB,IAAK,4BAAL,kBAAKA,+BAAL;AACH,EAAAA,2BAAA,aAAU;AACV,EAAAA,2BAAA,eAAY;AACZ,EAAAA,2BAAA,WAAQ;AAHA,SAAAA;AAAA,GAAA;AAMZ,MAAO,qCAAiF,YAAY;AAAA,EAGhG,YACI,QACmB,OACrB;AACE,UAAM,MAAM;AAFO;AAAA,EAGvB;AAAA,
|
|
1
|
+
{"version":3,"sources":["../../../../../../src/cli/plugins/typescript/declaration/transport/TransportDeclaration.ts"],"sourcesContent":["import _ from \"lodash\";\n\nimport FileBuilder from \"../../FileBuilder\";\n\nimport {ReadonlyConfig} from \"@typing/config\";\n\nexport enum TransportDeclarationLayer {\n Service = \"service\",\n Offscreen = \"offscreen\",\n Relay = \"relay\",\n}\n\nexport default class<T extends Record<string, string> = Record<string, string>> extends FileBuilder {\n protected _dictionary?: T;\n\n constructor(\n config: ReadonlyConfig,\n protected readonly layer: TransportDeclarationLayer\n ) {\n super(config);\n }\n\n protected filename(): string {\n return this.layer + \".d.ts\";\n }\n\n protected file(): URL {\n return new URL(\"./transport.d.ts\", this.url());\n }\n\n protected url(): string {\n return import.meta.url;\n }\n\n protected template(): string {\n const dictionary = this._dictionary;\n\n if (!dictionary) {\n throw new Error(`Transport ${this.layer} dictionary is not set`);\n }\n\n const type = Object.entries(dictionary)\n .map(([key, value]) => {\n return `'${key}': ${value};`;\n })\n .join(\"\\n\\t\\t\");\n\n return this.readFile()\n .replaceAll(\":layer\", this.layer)\n .replaceAll(\"Layer\", _.upperFirst(this.layer))\n .replace(`{ [name: string]: any }`, `{\\n\\t\\t${type}\\n\\t}`);\n }\n\n public dictionary(dictionary: T): this {\n this._dictionary = dictionary;\n\n return this;\n }\n}\n"],"mappings":"AAAA,OAAO,OAAO;AAEd,OAAO,iBAAiB;AAIjB,IAAK,4BAAL,kBAAKA,+BAAL;AACH,EAAAA,2BAAA,aAAU;AACV,EAAAA,2BAAA,eAAY;AACZ,EAAAA,2BAAA,WAAQ;AAHA,SAAAA;AAAA,GAAA;AAMZ,MAAO,qCAAiF,YAAY;AAAA,EAGhG,YACI,QACmB,OACrB;AACE,UAAM,MAAM;AAFO;AAAA,EAGvB;AAAA,EAHuB;AAAA,EAJb;AAAA,EASA,WAAmB;AACzB,WAAO,KAAK,QAAQ;AAAA,EACxB;AAAA,EAEU,OAAY;AAClB,WAAO,IAAI,IAAI,oBAAoB,KAAK,IAAI,CAAC;AAAA,EACjD;AAAA,EAEU,MAAc;AACpB,WAAO,YAAY;AAAA,EACvB;AAAA,EAEU,WAAmB;AACzB,UAAM,aAAa,KAAK;AAExB,QAAI,CAAC,YAAY;AACb,YAAM,IAAI,MAAM,aAAa,KAAK,KAAK,wBAAwB;AAAA,IACnE;AAEA,UAAM,OAAO,OAAO,QAAQ,UAAU,EACjC,IAAI,CAAC,CAAC,KAAK,KAAK,MAAM;AACnB,aAAO,IAAI,GAAG,MAAM,KAAK;AAAA,IAC7B,CAAC,EACA,KAAK,MAAQ;AAElB,WAAO,KAAK,SAAS,EAChB,WAAW,UAAU,KAAK,KAAK,EAC/B,WAAW,SAAS,EAAE,WAAW,KAAK,KAAK,CAAC,EAC5C,QAAQ,2BAA2B;AAAA,IAAU,IAAI;AAAA,GAAO;AAAA,EACjE;AAAA,EAEO,WAAW,YAAqB;AACnC,SAAK,cAAc;AAEnB,WAAO;AAAA,EACX;AACJ;","names":["TransportDeclarationLayer"]}
|
|
@@ -1,13 +1 @@
|
|
|
1
|
-
export { default as TransportDeclaration, TransportDeclarationLayer } from
|
|
2
|
-
import '../../FileBuilder.js';
|
|
3
|
-
import '../../../../../config-BaSTGrd0.js';
|
|
4
|
-
import '@rspack/core';
|
|
5
|
-
import 'html-rspack-tags-plugin';
|
|
6
|
-
import '../../../../../types/app.js';
|
|
7
|
-
import '../../../../../types/browser.js';
|
|
8
|
-
import '../../../../../manifest-DKvERQ4d.js';
|
|
9
|
-
import 'react';
|
|
10
|
-
import 'utility-types';
|
|
11
|
-
import '../../../../../types/helpers.js';
|
|
12
|
-
import '../../../../../types/locale.js';
|
|
13
|
-
import '../../../../../types/env.js';
|
|
1
|
+
export { default as TransportDeclaration, TransportDeclarationLayer } from "./TransportDeclaration.js";
|
|
@@ -1,21 +1,8 @@
|
|
|
1
|
-
import FileBuilder 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 FileBuilder {
|
|
1
|
+
import FileBuilder from "../../FileBuilder.js";
|
|
2
|
+
import { ReadonlyConfig } from "../../../../../types/config.js";
|
|
3
|
+
export default class extends FileBuilder {
|
|
15
4
|
constructor(config: ReadonlyConfig);
|
|
16
5
|
protected filename(): string;
|
|
17
6
|
protected url(): string;
|
|
18
7
|
protected template(): string;
|
|
19
8
|
}
|
|
20
|
-
|
|
21
|
-
export { export_default as default };
|
|
@@ -1,13 +1 @@
|
|
|
1
|
-
export { default as VendorDeclaration } from
|
|
2
|
-
import '../../FileBuilder.js';
|
|
3
|
-
import '../../../../../config-BaSTGrd0.js';
|
|
4
|
-
import '@rspack/core';
|
|
5
|
-
import 'html-rspack-tags-plugin';
|
|
6
|
-
import '../../../../../types/app.js';
|
|
7
|
-
import '../../../../../types/browser.js';
|
|
8
|
-
import '../../../../../manifest-DKvERQ4d.js';
|
|
9
|
-
import 'react';
|
|
10
|
-
import 'utility-types';
|
|
11
|
-
import '../../../../../types/helpers.js';
|
|
12
|
-
import '../../../../../types/locale.js';
|
|
13
|
-
import '../../../../../types/env.js';
|
|
1
|
+
export { default as VendorDeclaration } from "./VendorDeclaration.js";
|
|
@@ -1,20 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
export { default as
|
|
4
|
-
export {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import 'html-rspack-tags-plugin';
|
|
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 'type-fest';
|
|
17
|
-
|
|
18
|
-
declare const _default: PluginDefinition<[]>;
|
|
19
|
-
|
|
20
|
-
export { _default as default };
|
|
1
|
+
import TypescriptConfig from "./TypescriptConfig.js";
|
|
2
|
+
import { TransportDeclaration, TransportDeclarationLayer, VendorDeclaration } from "./declaration/index.js";
|
|
3
|
+
export { default as FileBuilder } from "./FileBuilder.js";
|
|
4
|
+
export { TypescriptConfig, VendorDeclaration, TransportDeclaration, TransportDeclarationLayer };
|
|
5
|
+
declare const _default: import("../../../main/plugin.js").PluginDefinition<[]>;
|
|
6
|
+
export default _default;
|
|
@@ -1,21 +1,8 @@
|
|
|
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 AbstractVersion {
|
|
1
|
+
import type { ReadonlyConfig } from "../../../types/config.js";
|
|
2
|
+
export default abstract class AbstractVersion {
|
|
14
3
|
protected readonly config: ReadonlyConfig;
|
|
15
4
|
static version<T extends AbstractVersion>(this: new (config: ReadonlyConfig) => T, config: ReadonlyConfig): string | undefined;
|
|
16
5
|
protected constructor(config: ReadonlyConfig);
|
|
17
6
|
abstract getVersion(): string | undefined;
|
|
18
7
|
protected extractVersionValue<T extends string | number | undefined>(version: T | (() => T)): string | undefined;
|
|
19
8
|
}
|
|
20
|
-
|
|
21
|
-
export { AbstractVersion as default };
|
|
@@ -3,6 +3,7 @@ class AbstractVersion {
|
|
|
3
3
|
constructor(config) {
|
|
4
4
|
this.config = config;
|
|
5
5
|
}
|
|
6
|
+
config;
|
|
6
7
|
static version(config) {
|
|
7
8
|
return new this(config).getVersion();
|
|
8
9
|
}
|
|
@@ -10,7 +11,7 @@ class AbstractVersion {
|
|
|
10
11
|
if (_.isNil(version)) {
|
|
11
12
|
return;
|
|
12
13
|
}
|
|
13
|
-
return String(_.isFunction(version) ? version : version);
|
|
14
|
+
return String(_.isFunction(version) ? version() : version);
|
|
14
15
|
}
|
|
15
16
|
}
|
|
16
17
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/cli/plugins/version/AbstractVersion.ts"],"sourcesContent":["import _ from \"lodash\";\n\nimport type {ReadonlyConfig} from \"@typing/config\";\n\nexport default abstract class AbstractVersion {\n public static version<T extends AbstractVersion>(\n this: new (config: ReadonlyConfig) => T,\n config: ReadonlyConfig\n ): string | undefined {\n return new this(config).getVersion();\n }\n\n protected constructor(protected readonly config: ReadonlyConfig) {}\n\n public abstract getVersion(): string | undefined;\n\n protected extractVersionValue<T extends string | number | undefined>(version: T | (() => T)): string | undefined {\n if (_.isNil(version)) {\n return;\n }\n\n return String(_.isFunction(version) ? version : version);\n }\n}\n"],"mappings":"AAAA,OAAO,OAAO;AAId,MAAO,gBAAuC;AAAA,EAQhC,YAA+B,QAAwB;AAAxB;AAAA,EAAyB;AAAA,
|
|
1
|
+
{"version":3,"sources":["../../../../src/cli/plugins/version/AbstractVersion.ts"],"sourcesContent":["import _ from \"lodash\";\n\nimport type {ReadonlyConfig} from \"@typing/config\";\n\nexport default abstract class AbstractVersion {\n public static version<T extends AbstractVersion>(\n this: new (config: ReadonlyConfig) => T,\n config: ReadonlyConfig\n ): string | undefined {\n return new this(config).getVersion();\n }\n\n protected constructor(protected readonly config: ReadonlyConfig) {}\n\n public abstract getVersion(): string | undefined;\n\n protected extractVersionValue<T extends string | number | undefined>(version: T | (() => T)): string | undefined {\n if (_.isNil(version)) {\n return;\n }\n\n return String(_.isFunction(version) ? version() : version);\n }\n}\n"],"mappings":"AAAA,OAAO,OAAO;AAId,MAAO,gBAAuC;AAAA,EAQhC,YAA+B,QAAwB;AAAxB;AAAA,EAAyB;AAAA,EAAzB;AAAA,EAPzC,OAAc,QAEV,QACkB;AAClB,WAAO,IAAI,KAAK,MAAM,EAAE,WAAW;AAAA,EACvC;AAAA,EAMU,oBAA2D,SAA4C;AAC7G,QAAI,EAAE,MAAM,OAAO,GAAG;AAClB;AAAA,IACJ;AAEA,WAAO,OAAO,EAAE,WAAW,OAAO,IAAI,QAAQ,IAAI,OAAO;AAAA,EAC7D;AACJ;","names":[]}
|
|
@@ -1,19 +1,6 @@
|
|
|
1
|
-
import AbstractVersion 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 AbstractVersion {
|
|
1
|
+
import AbstractVersion from "./AbstractVersion.js";
|
|
2
|
+
import type { ReadonlyConfig } from "../../../types/config.js";
|
|
3
|
+
export default class extends AbstractVersion {
|
|
15
4
|
constructor(config: ReadonlyConfig);
|
|
16
5
|
getVersion(): string | undefined;
|
|
17
6
|
}
|
|
18
|
-
|
|
19
|
-
export { export_default as default };
|
|
@@ -1,20 +1,7 @@
|
|
|
1
|
-
import AbstractVersion 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 AbstractVersion {
|
|
1
|
+
import AbstractVersion from "./AbstractVersion.js";
|
|
2
|
+
import type { ReadonlyConfig } from "../../../types/config.js";
|
|
3
|
+
export default class extends AbstractVersion {
|
|
15
4
|
constructor(config: ReadonlyConfig);
|
|
16
5
|
getVersion(): string | undefined;
|
|
17
6
|
protected resolveVersion(version?: string): string | undefined;
|
|
18
7
|
}
|
|
19
|
-
|
|
20
|
-
export { export_default as default };
|
|
@@ -1,18 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
export {
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
import '../../../types/app.js';
|
|
7
|
-
import '../../../types/browser.js';
|
|
8
|
-
import '../../../manifest-DKvERQ4d.js';
|
|
9
|
-
import 'react';
|
|
10
|
-
import 'utility-types';
|
|
11
|
-
import '../../../types/helpers.js';
|
|
12
|
-
import '../../../types/locale.js';
|
|
13
|
-
import '../../../types/env.js';
|
|
14
|
-
import './AbstractVersion.js';
|
|
15
|
-
|
|
16
|
-
declare const _default: PluginDefinition<[]>;
|
|
17
|
-
|
|
18
|
-
export { _default as default };
|
|
1
|
+
import AddonVersion from "./AddonVersion.js";
|
|
2
|
+
import BrowserMinimumVersion from "./BrowserMinimumVersion.js";
|
|
3
|
+
export { AddonVersion, BrowserMinimumVersion };
|
|
4
|
+
declare const _default: import("../../../main/plugin.js").PluginDefinition<[]>;
|
|
5
|
+
export default _default;
|
|
@@ -1,28 +1,14 @@
|
|
|
1
|
-
import { HtmlRspackPluginOptions } from
|
|
2
|
-
import { Options } from
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
import '../../../types/browser.js';
|
|
9
|
-
import '../../../types/locale.js';
|
|
10
|
-
import '../../../types/helpers.js';
|
|
11
|
-
import '../../../types/env.js';
|
|
12
|
-
import 'react';
|
|
13
|
-
import 'utility-types';
|
|
14
|
-
import '../../entrypoint/finder/AbstractPluginFinder.js';
|
|
15
|
-
import '../../entrypoint/finder/AbstractEntrypointFinder.js';
|
|
16
|
-
import '../../entrypoint/finder/AbstractOptionsFinder.js';
|
|
17
|
-
import '../../entrypoint/finder/AbstractFinder.js';
|
|
18
|
-
|
|
19
|
-
declare class export_default<O extends ViewEntrypointOptions> {
|
|
1
|
+
import type { HtmlRspackPluginOptions } from "@rspack/core";
|
|
2
|
+
import type { Options as HtmlRspackTagsPluginOptions } from "html-rspack-tags-plugin";
|
|
3
|
+
import { AbstractViewFinder } from "../../entrypoint/index.js";
|
|
4
|
+
import { EntrypointEntries } from "../../../types/entrypoint.js";
|
|
5
|
+
import { ViewEntrypointOptions } from "../../../types/view.js";
|
|
6
|
+
import { ReadonlyConfig } from "../../../types/config.js";
|
|
7
|
+
export default class<O extends ViewEntrypointOptions> {
|
|
20
8
|
protected readonly config: ReadonlyConfig;
|
|
21
|
-
protected readonly finder:
|
|
22
|
-
constructor(config: ReadonlyConfig, finder:
|
|
9
|
+
protected readonly finder: AbstractViewFinder<O>;
|
|
10
|
+
constructor(config: ReadonlyConfig, finder: AbstractViewFinder<O>);
|
|
23
11
|
entries(): Promise<EntrypointEntries>;
|
|
24
12
|
html(): Promise<HtmlRspackPluginOptions[]>;
|
|
25
|
-
tags(): Promise<
|
|
13
|
+
tags(): Promise<HtmlRspackTagsPluginOptions[]>;
|
|
26
14
|
}
|
|
27
|
-
|
|
28
|
-
export { export_default as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/cli/plugins/view/View.ts"],"sourcesContent":["import path from \"path\";\nimport _ from \"lodash\";\n\nimport type {HtmlRspackPluginOptions} from \"@rspack/core\";\nimport type {Options as HtmlRspackTagsPluginOptions} from \"html-rspack-tags-plugin\";\n\nimport {AbstractViewFinder} from \"@cli/entrypoint/index.js\";\n\nimport {EntrypointEntries} from \"@typing/entrypoint\";\nimport {ViewEntrypointOptions} from \"@typing/view\";\nimport {ReadonlyConfig} from \"@typing/config\";\n\nexport default class<O extends ViewEntrypointOptions> {\n public constructor(\n protected readonly config: ReadonlyConfig,\n protected readonly finder: AbstractViewFinder<O>\n ) {}\n\n public async entries(): Promise<EntrypointEntries> {\n const entries: EntrypointEntries = new Map();\n\n for (const [name, page] of await this.finder.views()) {\n entries.set(name, new Set([page.file]));\n }\n\n return entries;\n }\n\n public async html(): Promise<HtmlRspackPluginOptions[]> {\n const html: HtmlRspackPluginOptions[] = [];\n\n for (const [name, {file, filename, options}] of await this.finder.views()) {\n const {template, title} = options;\n\n html.push({\n filename,\n title: title || _.startCase(this.config.app),\n template: template ? path.resolve(path.dirname(file.file), template) : undefined,\n chunks: [name],\n inject: \"body\",\n minify: true,\n });\n }\n\n return html;\n }\n\n public async tags(): Promise<HtmlRspackTagsPluginOptions[]> {\n const tags: HtmlRspackTagsPluginOptions[] = [];\n\n const views = await this.finder.views();\n\n for (const {filename, options} of views.values()) {\n // prettier-ignore\n const {\n as,\n title,\n template,\n excludeApp,\n includeApp,\n excludeBrowser,\n includeBrowser,\n ...tagOptions\n } = options;\n\n if (!_.isEmpty(tagOptions)) {\n tags.push({\n ...tagOptions,\n files: [filename],\n });\n }\n }\n\n return tags;\n }\n}\n"],"mappings":"AAAA,OAAO,UAAU;AACjB,OAAO,OAAO;AAWd,MAAO,aAA+C;AAAA,EAC3C,YACgB,QACA,QACrB;AAFqB;AACA;AAAA,EACpB;AAAA,
|
|
1
|
+
{"version":3,"sources":["../../../../src/cli/plugins/view/View.ts"],"sourcesContent":["import path from \"path\";\nimport _ from \"lodash\";\n\nimport type {HtmlRspackPluginOptions} from \"@rspack/core\";\nimport type {Options as HtmlRspackTagsPluginOptions} from \"html-rspack-tags-plugin\";\n\nimport {AbstractViewFinder} from \"@cli/entrypoint/index.js\";\n\nimport {EntrypointEntries} from \"@typing/entrypoint\";\nimport {ViewEntrypointOptions} from \"@typing/view\";\nimport {ReadonlyConfig} from \"@typing/config\";\n\nexport default class<O extends ViewEntrypointOptions> {\n public constructor(\n protected readonly config: ReadonlyConfig,\n protected readonly finder: AbstractViewFinder<O>\n ) {}\n\n public async entries(): Promise<EntrypointEntries> {\n const entries: EntrypointEntries = new Map();\n\n for (const [name, page] of await this.finder.views()) {\n entries.set(name, new Set([page.file]));\n }\n\n return entries;\n }\n\n public async html(): Promise<HtmlRspackPluginOptions[]> {\n const html: HtmlRspackPluginOptions[] = [];\n\n for (const [name, {file, filename, options}] of await this.finder.views()) {\n const {template, title} = options;\n\n html.push({\n filename,\n title: title || _.startCase(this.config.app),\n template: template ? path.resolve(path.dirname(file.file), template) : undefined,\n chunks: [name],\n inject: \"body\",\n minify: true,\n });\n }\n\n return html;\n }\n\n public async tags(): Promise<HtmlRspackTagsPluginOptions[]> {\n const tags: HtmlRspackTagsPluginOptions[] = [];\n\n const views = await this.finder.views();\n\n for (const {filename, options} of views.values()) {\n // prettier-ignore\n const {\n as,\n title,\n template,\n excludeApp,\n includeApp,\n excludeBrowser,\n includeBrowser,\n ...tagOptions\n } = options;\n\n if (!_.isEmpty(tagOptions)) {\n tags.push({\n ...tagOptions,\n files: [filename],\n });\n }\n }\n\n return tags;\n }\n}\n"],"mappings":"AAAA,OAAO,UAAU;AACjB,OAAO,OAAO;AAWd,MAAO,aAA+C;AAAA,EAC3C,YACgB,QACA,QACrB;AAFqB;AACA;AAAA,EACpB;AAAA,EAFoB;AAAA,EACA;AAAA,EAGvB,MAAa,UAAsC;AAC/C,UAAM,UAA6B,oBAAI,IAAI;AAE3C,eAAW,CAAC,MAAM,IAAI,KAAK,MAAM,KAAK,OAAO,MAAM,GAAG;AAClD,cAAQ,IAAI,MAAM,oBAAI,IAAI,CAAC,KAAK,IAAI,CAAC,CAAC;AAAA,IAC1C;AAEA,WAAO;AAAA,EACX;AAAA,EAEA,MAAa,OAA2C;AACpD,UAAM,OAAkC,CAAC;AAEzC,eAAW,CAAC,MAAM,EAAC,MAAM,UAAU,QAAO,CAAC,KAAK,MAAM,KAAK,OAAO,MAAM,GAAG;AACvE,YAAM,EAAC,UAAU,MAAK,IAAI;AAE1B,WAAK,KAAK;AAAA,QACN;AAAA,QACA,OAAO,SAAS,EAAE,UAAU,KAAK,OAAO,GAAG;AAAA,QAC3C,UAAU,WAAW,KAAK,QAAQ,KAAK,QAAQ,KAAK,IAAI,GAAG,QAAQ,IAAI;AAAA,QACvE,QAAQ,CAAC,IAAI;AAAA,QACb,QAAQ;AAAA,QACR,QAAQ;AAAA,MACZ,CAAC;AAAA,IACL;AAEA,WAAO;AAAA,EACX;AAAA,EAEA,MAAa,OAA+C;AACxD,UAAM,OAAsC,CAAC;AAE7C,UAAM,QAAQ,MAAM,KAAK,OAAO,MAAM;AAEtC,eAAW,EAAC,UAAU,QAAO,KAAK,MAAM,OAAO,GAAG;AAE9C,YAAM;AAAA,QACF;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA,GAAG;AAAA,MACP,IAAI;AAEJ,UAAI,CAAC,EAAE,QAAQ,UAAU,GAAG;AACxB,aAAK,KAAK;AAAA,UACN,GAAG;AAAA,UACH,OAAO,CAAC,QAAQ;AAAA,QACpB,CAAC;AAAA,MACL;AAAA,IACJ;AAEA,WAAO;AAAA,EACX;AACJ;","names":[]}
|
|
@@ -1,22 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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 '../../entrypoint/finder/AbstractViewFinder.js';
|
|
14
|
-
import '../../entrypoint/finder/AbstractPluginFinder.js';
|
|
15
|
-
import '../../entrypoint/finder/AbstractEntrypointFinder.js';
|
|
16
|
-
import '../../entrypoint/finder/AbstractOptionsFinder.js';
|
|
17
|
-
import '../../entrypoint/finder/AbstractFinder.js';
|
|
18
|
-
import '../../../types/view.js';
|
|
19
|
-
|
|
20
|
-
declare const _default: PluginDefinition<[]>;
|
|
21
|
-
|
|
22
|
-
export { _default as default };
|
|
1
|
+
export { default as View } from "./View.js";
|
|
2
|
+
declare const _default: import("../../../main/plugin.js").PluginDefinition<[]>;
|
|
3
|
+
export default _default;
|
|
@@ -1,24 +1,38 @@
|
|
|
1
1
|
import { definePlugin } from "./../../../main/plugin.js";
|
|
2
2
|
import { onlyViaTopLevelEntry } from "./../../../cli/bundler/index.js";
|
|
3
|
+
import { getResolvePath, getSourcePath } from "./../../../cli/resolvers/path.js";
|
|
3
4
|
import { default as default2 } from "./View.js";
|
|
4
5
|
var view_default = definePlugin(() => {
|
|
5
6
|
return {
|
|
6
7
|
name: "adnbn:view",
|
|
7
|
-
bundler: {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
8
|
+
bundler: ({ config }) => {
|
|
9
|
+
const entryTypeFilter = onlyViaTopLevelEntry(["page", "popup", "sidebar", "offscreen"]);
|
|
10
|
+
return {
|
|
11
|
+
optimization: {
|
|
12
|
+
splitChunks: {
|
|
13
|
+
cacheGroups: {
|
|
14
|
+
adnbnView: {
|
|
15
|
+
minChunks: 2,
|
|
16
|
+
minSize: 0,
|
|
17
|
+
name: "common.view",
|
|
18
|
+
test: (module, context) => {
|
|
19
|
+
const nm = module;
|
|
20
|
+
if (!nm.resource) {
|
|
21
|
+
return false;
|
|
22
|
+
}
|
|
23
|
+
if (nm.resource.startsWith(getResolvePath(getSourcePath(config)))) {
|
|
24
|
+
return false;
|
|
25
|
+
}
|
|
26
|
+
return entryTypeFilter(module, context);
|
|
27
|
+
},
|
|
28
|
+
enforce: false,
|
|
29
|
+
reuseExistingChunk: true,
|
|
30
|
+
priority: 50
|
|
31
|
+
}
|
|
18
32
|
}
|
|
19
33
|
}
|
|
20
34
|
}
|
|
21
|
-
}
|
|
35
|
+
};
|
|
22
36
|
}
|
|
23
37
|
};
|
|
24
38
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/cli/plugins/view/index.ts"],"sourcesContent":["import {definePlugin} from \"@main/plugin\";\nimport {onlyViaTopLevelEntry} from \"@cli/bundler\";\n\nexport {default as View} from \"./View\";\n\nexport default definePlugin(() => {\n return {\n name: \"adnbn:view\",\n bundler: {\n optimization: {\n
|
|
1
|
+
{"version":3,"sources":["../../../../src/cli/plugins/view/index.ts"],"sourcesContent":["import {NormalModule} from \"@rspack/core\";\n\nimport {definePlugin} from \"@main/plugin\";\n\nimport {onlyViaTopLevelEntry} from \"@cli/bundler\";\nimport {getResolvePath, getSourcePath} from \"@cli/resolvers/path\";\n\nexport {default as View} from \"./View\";\n\nexport default definePlugin(() => {\n return {\n name: \"adnbn:view\",\n bundler: ({config}) => {\n const entryTypeFilter = onlyViaTopLevelEntry([\"page\", \"popup\", \"sidebar\", \"offscreen\"]);\n\n return {\n optimization: {\n splitChunks: {\n cacheGroups: {\n adnbnView: {\n minChunks: 2,\n minSize: 0,\n name: \"common.view\",\n test: (module, context) => {\n const nm = module as NormalModule;\n\n if (!nm.resource) {\n return false;\n }\n\n if (nm.resource.startsWith(getResolvePath(getSourcePath(config)))) {\n return false;\n }\n\n return entryTypeFilter(module, context);\n },\n enforce: false,\n reuseExistingChunk: true,\n priority: 50,\n },\n },\n },\n },\n };\n },\n };\n});\n"],"mappings":"AAEA,SAAQ,oBAAmB;AAE3B,SAAQ,4BAA2B;AACnC,SAAQ,gBAAgB,qBAAoB;AAE5C,SAAmB,WAAXA,gBAAsB;AAE9B,IAAO,eAAQ,aAAa,MAAM;AAC9B,SAAO;AAAA,IACH,MAAM;AAAA,IACN,SAAS,CAAC,EAAC,OAAM,MAAM;AACnB,YAAM,kBAAkB,qBAAqB,CAAC,QAAQ,SAAS,WAAW,WAAW,CAAC;AAEtF,aAAO;AAAA,QACH,cAAc;AAAA,UACV,aAAa;AAAA,YACT,aAAa;AAAA,cACT,WAAW;AAAA,gBACP,WAAW;AAAA,gBACX,SAAS;AAAA,gBACT,MAAM;AAAA,gBACN,MAAM,CAAC,QAAQ,YAAY;AACvB,wBAAM,KAAK;AAEX,sBAAI,CAAC,GAAG,UAAU;AACd,2BAAO;AAAA,kBACX;AAEA,sBAAI,GAAG,SAAS,WAAW,eAAe,cAAc,MAAM,CAAC,CAAC,GAAG;AAC/D,2BAAO;AAAA,kBACX;AAEA,yBAAO,gBAAgB,QAAQ,OAAO;AAAA,gBAC1C;AAAA,gBACA,SAAS;AAAA,gBACT,oBAAoB;AAAA,gBACpB,UAAU;AAAA,cACd;AAAA,YACJ;AAAA,UACJ;AAAA,QACJ;AAAA,MACJ;AAAA,IACJ;AAAA,EACJ;AACJ,CAAC;","names":["default"]}
|
|
@@ -1,15 +1,4 @@
|
|
|
1
|
-
import { Configuration } from
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
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: (config: ReadonlyConfig) => Promise<Configuration>;
|
|
14
|
-
|
|
15
|
-
export { _default as default };
|
|
1
|
+
import { Configuration as RspackConfig } from "@rspack/core";
|
|
2
|
+
import { ReadonlyConfig } from "../../types/config.js";
|
|
3
|
+
declare const _default: (config: ReadonlyConfig) => Promise<RspackConfig>;
|
|
4
|
+
export default _default;
|
|
@@ -1,15 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import '@rspack/core';
|
|
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
|
-
|
|
1
|
+
import type { Config, OptionalConfig } from "../../types/config.js";
|
|
13
2
|
declare const _default: (config: OptionalConfig) => Promise<Config>;
|
|
14
|
-
|
|
15
|
-
export { _default as default };
|
|
3
|
+
export default _default;
|
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
pluginLocale,
|
|
14
14
|
pluginMeta,
|
|
15
15
|
pluginOffscreen,
|
|
16
|
+
pluginManifest,
|
|
16
17
|
pluginOptimization,
|
|
17
18
|
pluginOutput,
|
|
18
19
|
pluginPage,
|
|
@@ -26,10 +27,31 @@ import {
|
|
|
26
27
|
pluginView
|
|
27
28
|
} from "../plugins/index.js";
|
|
28
29
|
import { fromRootPath, getAppPath, getAppSourcePath, getConfigFile } from "../resolvers/path.js";
|
|
29
|
-
import { Command, Mode } from "./../../types/app.js";
|
|
30
|
+
import { Command, Mode, Workspace } from "./../../types/app.js";
|
|
30
31
|
import { Browser } from "./../../types/browser.js";
|
|
31
|
-
import { Language } from "./../../types/locale.js";
|
|
32
|
+
import { Language, LanguageCodes } from "./../../types/locale.js";
|
|
32
33
|
import { DefaultIconGroupName } from "./../../types/icon.js";
|
|
34
|
+
const resolveLanguage = (lang) => {
|
|
35
|
+
if (!lang) {
|
|
36
|
+
return Language.English;
|
|
37
|
+
}
|
|
38
|
+
if (LanguageCodes.has(lang)) {
|
|
39
|
+
return lang;
|
|
40
|
+
}
|
|
41
|
+
throw new Error(`Invalid language "${lang}" provided by config`);
|
|
42
|
+
};
|
|
43
|
+
const resolveWorkspace = (workspace) => {
|
|
44
|
+
if (!workspace) {
|
|
45
|
+
return Workspace.Single;
|
|
46
|
+
}
|
|
47
|
+
if (Object.values(Workspace).includes(workspace)) {
|
|
48
|
+
return workspace;
|
|
49
|
+
}
|
|
50
|
+
throw new Error(`Invalid workspace "${workspace}" provided by config`);
|
|
51
|
+
};
|
|
52
|
+
const resolveSharedDir = (workspace, sharedDir) => {
|
|
53
|
+
return workspace === Workspace.Multi ? sharedDir : ".";
|
|
54
|
+
};
|
|
33
55
|
const getUserConfig = async (config) => {
|
|
34
56
|
const configFilePath = getConfigFile(config);
|
|
35
57
|
if (existsSync(configFilePath)) {
|
|
@@ -108,10 +130,6 @@ const updateLocalDotenv = (config) => {
|
|
|
108
130
|
};
|
|
109
131
|
const loadDotenv = (config) => {
|
|
110
132
|
const { mode, browser, debug } = config;
|
|
111
|
-
process.env.DOTENV_LOG = debug ? "debug" : "none";
|
|
112
|
-
if (!debug) {
|
|
113
|
-
process.env.DOTENV_CONFIG_SILENT = "true";
|
|
114
|
-
}
|
|
115
133
|
const preset = [
|
|
116
134
|
`.env.${mode}.${browser}.local`,
|
|
117
135
|
`.env.${mode}.${browser}`,
|
|
@@ -126,7 +144,7 @@ const loadDotenv = (config) => {
|
|
|
126
144
|
const appPaths = preset.map((file) => getAppPath(config, file));
|
|
127
145
|
const rootPaths = preset.map((file) => fromRootPath(config, file));
|
|
128
146
|
const paths = [...appSourcePaths, ...appPaths, ...rootPaths];
|
|
129
|
-
const { parsed: fileVars = {} } = dotenv.config({ path: paths });
|
|
147
|
+
const { parsed: fileVars = {} } = dotenv.config({ path: paths, quiet: !debug });
|
|
130
148
|
return { ...fileVars, ...updateLocalDotenv(config) };
|
|
131
149
|
};
|
|
132
150
|
var config_default = async (config) => {
|
|
@@ -147,6 +165,7 @@ var config_default = async (config) => {
|
|
|
147
165
|
lang = Language.English,
|
|
148
166
|
incognito,
|
|
149
167
|
specific,
|
|
168
|
+
workspace = Workspace.Single,
|
|
150
169
|
rootDir = ".",
|
|
151
170
|
outDir = "dist",
|
|
152
171
|
srcDir = "src",
|
|
@@ -164,6 +183,7 @@ var config_default = async (config) => {
|
|
|
164
183
|
html = [],
|
|
165
184
|
bundler = {},
|
|
166
185
|
env = {},
|
|
186
|
+
manifest,
|
|
167
187
|
manifestVersion = (/* @__PURE__ */ new Set([Browser.Safari])).has(browser) ? 2 : 3,
|
|
168
188
|
mode = Mode.Development,
|
|
169
189
|
analyze = false,
|
|
@@ -204,11 +224,13 @@ var config_default = async (config) => {
|
|
|
204
224
|
minimumVersion,
|
|
205
225
|
author,
|
|
206
226
|
homepage,
|
|
207
|
-
lang,
|
|
227
|
+
lang: resolveLanguage(lang),
|
|
208
228
|
icon,
|
|
209
229
|
incognito,
|
|
210
230
|
specific,
|
|
231
|
+
manifest,
|
|
211
232
|
manifestVersion,
|
|
233
|
+
workspace: resolveWorkspace(workspace),
|
|
212
234
|
rootDir,
|
|
213
235
|
outDir,
|
|
214
236
|
srcDir,
|
|
@@ -253,8 +275,20 @@ var config_default = async (config) => {
|
|
|
253
275
|
cssIdentName
|
|
254
276
|
};
|
|
255
277
|
let vars = loadDotenv(resolvedConfig);
|
|
256
|
-
const {
|
|
257
|
-
|
|
278
|
+
const {
|
|
279
|
+
plugins: userPlugins = [],
|
|
280
|
+
lang: userLang,
|
|
281
|
+
workspace: userWorkspace,
|
|
282
|
+
...userConfig
|
|
283
|
+
} = await getUserConfig(resolvedConfig);
|
|
284
|
+
resolvedConfig = {
|
|
285
|
+
...resolvedConfig,
|
|
286
|
+
...userConfig,
|
|
287
|
+
lang: resolveLanguage(userLang ?? resolvedConfig.lang),
|
|
288
|
+
workspace: resolveWorkspace(userWorkspace ?? resolvedConfig.workspace)
|
|
289
|
+
};
|
|
290
|
+
resolvedConfig.sharedDir = resolveSharedDir(resolvedConfig.workspace, resolvedConfig.sharedDir);
|
|
291
|
+
resolvedConfig = validateConfig(resolvedConfig);
|
|
258
292
|
vars = { ...vars, ...loadDotenv(resolvedConfig) };
|
|
259
293
|
const corePlugins = [
|
|
260
294
|
pluginDotenv(vars),
|
|
@@ -277,7 +311,8 @@ var config_default = async (config) => {
|
|
|
277
311
|
pluginView(),
|
|
278
312
|
pluginHtml(),
|
|
279
313
|
pluginVersion(),
|
|
280
|
-
pluginBundler()
|
|
314
|
+
pluginBundler(),
|
|
315
|
+
pluginManifest()
|
|
281
316
|
];
|
|
282
317
|
return {
|
|
283
318
|
...resolvedConfig,
|