extension-develop 3.18.4 → 3.18.5-canary.local-34c11c8f
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/0~rspack-config.mjs +271 -82
- package/dist/946.mjs +562 -534
- package/dist/962.mjs +127 -54
- package/dist/extension-js-devtools/chrome/content_scripts/content-0.js +2 -2
- package/dist/extension-js-devtools/chrome/pages/centralized-logger.js +4 -4
- package/dist/extension-js-devtools/chrome/pages/welcome.js +2 -2
- package/dist/extension-js-devtools/chrome/scripts/logger-client.js +1 -1
- package/dist/extension-js-devtools/chromium/content_scripts/content-0.js +2 -2
- package/dist/extension-js-devtools/chromium/pages/centralized-logger.js +4 -4
- package/dist/extension-js-devtools/chromium/pages/welcome.js +2 -2
- package/dist/extension-js-devtools/chromium/scripts/logger-client.js +1 -1
- package/dist/extension-js-devtools/edge/content_scripts/content-0.js +2 -2
- package/dist/extension-js-devtools/edge/pages/centralized-logger.js +4 -4
- package/dist/extension-js-devtools/edge/pages/welcome.js +2 -2
- package/dist/extension-js-devtools/edge/scripts/logger-client.js +1 -1
- package/dist/extension-js-devtools/firefox/content_scripts/content-0.js +2 -2
- package/dist/extension-js-devtools/firefox/pages/centralized-logger.js +4 -4
- package/dist/extension-js-devtools/firefox/pages/welcome.js +2 -2
- package/dist/extension-js-devtools/firefox/scripts/logger-client.js +1 -1
- package/dist/extension-js-theme/brave/background/service_worker.js +2003 -0
- package/dist/extension-js-theme/brave/background/service_worker.js.map +1 -0
- package/dist/extension-js-theme/brave/manifest.json +45 -0
- package/dist/extension-js-theme/chrome/Cached Theme.pak +0 -0
- package/dist/extension-js-theme/chromium/Cached Theme.pak +0 -0
- package/dist/extension-js-theme/extension-js/brave/events.ndjson +4 -0
- package/dist/extension-js-theme/extension-js/brave/logs.ndjson +3 -0
- package/dist/extension-js-theme/extension-js/brave/ready.json +20 -0
- package/dist/extension-js-theme/extension-js/firefox/events.ndjson +80 -4
- package/dist/extension-js-theme/extension-js/firefox/ready.json +7 -7
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/.extension-js-managed-profile +1 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/ChromeFeatureState +1 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/AccessibilityAnnotatorDatabase +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Account Web Data +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Account Web Data-journal +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Affiliation Database +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Affiliation Database-journal +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/AutofillAiModelCache/LOCK +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/AutofillAiModelCache/LOG +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/AutofillStrikeDatabase/LOCK +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/AutofillStrikeDatabase/LOG +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/BookmarkMergedSurfaceOrdering +2 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/BrowsingTopicsSiteData +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/BrowsingTopicsSiteData-journal +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/BrowsingTopicsState +12 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/BudgetDatabase/LOCK +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/BudgetDatabase/LOG +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Cache/Cache_Data/index +1 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Cache/Cache_Data/sqldb0 +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Cache/Cache_Data/sqldb1 +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Cache/Cache_Data/sqldb2 +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Cache/No_Vary_Search/journal.baj +1 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Cache/No_Vary_Search/snapshot.baf +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/ClientCertificates/LOCK +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/ClientCertificates/LOG +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Code Cache/pc/05_@;2t2fb2=a6@=`6`2`218;50[[=243915.92@2126345=;-629[`2.db +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Code Cache/pc/05_@;2t2fb2=a6@=`6`2`218;50[[=243915.92@2126345=;-629[`2.journal +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Collaboration/MessageDB +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Collaboration/MessageDB-journal +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Cookies +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Cookies-journal +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/DIPS +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/DIPS-wal +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/DataSharing/DataSharingDB +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/DataSharing/DataSharingDB-journal +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/DawnGraphiteCache/data_0 +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/DawnGraphiteCache/data_1 +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/DawnGraphiteCache/data_2 +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/DawnGraphiteCache/data_3 +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/DawnGraphiteCache/index +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/DawnWebGPUCache/data_0 +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/DawnWebGPUCache/data_1 +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/DawnWebGPUCache/data_2 +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/DawnWebGPUCache/data_3 +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/DawnWebGPUCache/index +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Extension Rules/000003.log +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Extension Rules/CURRENT +1 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Extension Rules/LOCK +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Extension Rules/LOG +2 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Extension Rules/MANIFEST-000001 +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Extension Scripts/000003.log +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Extension Scripts/CURRENT +1 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Extension Scripts/LOCK +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Extension Scripts/LOG +2 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Extension Scripts/MANIFEST-000001 +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Extension State/000003.log +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Extension State/CURRENT +1 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Extension State/LOCK +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Extension State/LOG +2 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Extension State/MANIFEST-000001 +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Favicons +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Favicons-journal +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Feature Engagement Tracker/AvailabilityDB/LOCK +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Feature Engagement Tracker/AvailabilityDB/LOG +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Feature Engagement Tracker/EventDB/LOCK +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Feature Engagement Tracker/EventDB/LOG +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/GCM Store/000003.log +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/GCM Store/CURRENT +1 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/GCM Store/LOCK +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/GCM Store/LOG +2 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/GCM Store/MANIFEST-000001 +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/GPUCache/data_0 +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/GPUCache/data_1 +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/GPUCache/data_2 +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/GPUCache/data_3 +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/GPUCache/index +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/History +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/History-journal +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/LOCK +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/LOG +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Local Extension Settings/dkmhcppnegfldhbleoedeifghnmaielp/000003.log +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Local Extension Settings/dkmhcppnegfldhbleoedeifghnmaielp/CURRENT +1 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Local Extension Settings/dkmhcppnegfldhbleoedeifghnmaielp/LOCK +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Local Extension Settings/dkmhcppnegfldhbleoedeifghnmaielp/LOG +2 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Local Extension Settings/dkmhcppnegfldhbleoedeifghnmaielp/MANIFEST-000001 +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Local Storage/leveldb/000003.log +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Local Storage/leveldb/CURRENT +1 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Local Storage/leveldb/LOCK +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Local Storage/leveldb/LOG +2 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Local Storage/leveldb/MANIFEST-000001 +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Login Data +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Login Data For Account +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Login Data For Account-journal +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Login Data-journal +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Network Action Predictor +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Network Action Predictor-journal +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Network Persistent State +1 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/PersistentOriginTrials/LOCK +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/PersistentOriginTrials/LOG +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Preferences +1 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/PreferredApps +1 -0
- NEL +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Reporting and NEL-journal +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/SCT Auditing Pending Reports +1 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Safe Browsing Cookies +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Safe Browsing Cookies-journal +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Secure Preferences +1 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Segmentation Platform/SegmentInfoDB/LOCK +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Segmentation Platform/SegmentInfoDB/LOG +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Segmentation Platform/SignalDB/LOCK +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Segmentation Platform/SignalDB/LOG +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Segmentation Platform/SignalStorageConfigDB/LOCK +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Segmentation Platform/SignalStorageConfigDB/LOG +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/ServerCertificate +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/ServerCertificate-journal +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Service Worker/Database/000003.log +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Service Worker/Database/CURRENT +1 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Service Worker/Database/LOCK +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Service Worker/Database/LOG +2 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Service Worker/Database/MANIFEST-000001 +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Service Worker/ScriptCache/2cc80dabc69f58b6_0 +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Service Worker/ScriptCache/2cc80dabc69f58b6_1 +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Service Worker/ScriptCache/4cb013792b196a35_0 +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Service Worker/ScriptCache/4cb013792b196a35_1 +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Service Worker/ScriptCache/index +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Service Worker/ScriptCache/index-dir/the-real-index +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Session Storage/000003.log +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Session Storage/CURRENT +1 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Session Storage/LOCK +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Session Storage/LOG +2 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Session Storage/MANIFEST-000001 +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Sessions/Session_13426296971679614 +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Sessions/Tabs_13426296976710116 +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Shared Dictionary/cache/index +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Shared Dictionary/cache/index-dir/the-real-index +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Shared Dictionary/db +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Shared Dictionary/db-journal +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/SharedStorage +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Shortcuts +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Shortcuts-journal +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Site Characteristics Database/000003.log +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Site Characteristics Database/CURRENT +1 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Site Characteristics Database/LOCK +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Site Characteristics Database/LOG +2 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Site Characteristics Database/MANIFEST-000001 +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Sync Data/LevelDB/000003.log +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Sync Data/LevelDB/CURRENT +1 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Sync Data/LevelDB/LOCK +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Sync Data/LevelDB/LOG +2 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Sync Data/LevelDB/MANIFEST-000001 +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Top Sites +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Top Sites-journal +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/TransportSecurity +1 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Trust Tokens +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Trust Tokens-journal +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Web Data +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/Web Data-journal +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/WebStorage/QuotaManager +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/WebStorage/QuotaManager-journal +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/chrome_cart_db/LOCK +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/chrome_cart_db/LOG +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/commerce_subscription_db/LOCK +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/commerce_subscription_db/LOG +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/discount_infos_db/LOCK +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/discount_infos_db/LOG +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/discounts_db/LOCK +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/discounts_db/LOG +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/engine_allowlist.bf +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/heavy_ad_intervention_opt_out.db +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/heavy_ad_intervention_opt_out.db-journal +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/optimization_guide_hint_cache_store/LOCK +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/optimization_guide_hint_cache_store/LOG +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/parcel_tracking_db/LOCK +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/parcel_tracking_db/LOG +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/shared_proto_db/000003.log +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/shared_proto_db/CURRENT +1 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/shared_proto_db/LOCK +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/shared_proto_db/LOG +2 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/shared_proto_db/MANIFEST-000001 +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/shared_proto_db/metadata/000003.log +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/shared_proto_db/metadata/CURRENT +1 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/shared_proto_db/metadata/LOCK +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/shared_proto_db/metadata/LOG +2 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/shared_proto_db/metadata/MANIFEST-000001 +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Default/trusted_vault.pb +2 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/GPUPersistentCache/GPUCache/6SE4MO4T2PYNTMRZGJ6B4HK2AV4LBDP4/cache.db +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/GPUPersistentCache/GPUCache/6SE4MO4T2PYNTMRZGJ6B4HK2AV4LBDP4/cache.db-wal +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/GPUPersistentCache/GPUCache/6SE4MO4T2PYNTMRZGJ6B4HK2AV4LBDP4/cache.journal +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/GraphiteDawnCache/data_0 +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/GraphiteDawnCache/data_1 +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/GraphiteDawnCache/data_2 +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/GraphiteDawnCache/data_3 +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/GraphiteDawnCache/f_000001 +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/GraphiteDawnCache/index +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Last Version +1 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Local State +1 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/Variations +1 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/extensions_crx_cache/metadata.json +1 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/first_party_sets.db +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/first_party_sets.db-journal +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/segmentation_platform/ukm_db +0 -0
- package/dist/extension-js-theme/extension-js/profiles/brave-profile/circular-scarlet-slug/segmentation_platform/ukm_db-wal +0 -0
- package/dist/extension-js-theme/theme-dist-bak/chrome/Cached Theme.pak +0 -0
- package/dist/extension-js-theme/theme-dist-bak/chrome/manifest.json +22 -0
- package/dist/extension-js-theme/theme-dist-bak/chromium/Cached Theme.pak +0 -0
- package/dist/extension-js-theme/theme-dist-bak/chromium/manifest.json +22 -0
- package/dist/extension-js-theme/theme-dist-bak/edge/Cached Theme.pak +0 -0
- package/dist/extension-js-theme/theme-dist-bak/edge/manifest.json +22 -0
- package/dist/extension-js-theme/theme-dist-bak/firefox/manifest.json +66 -0
- package/dist/feature-scripts-classic-concat-loader.js +81 -0
- package/dist/feature-scripts-classic-concat-loader.mjs +81 -0
- package/dist/feature-scripts-content-script-wrapper.js +32 -4
- package/dist/feature-scripts-content-script-wrapper.mjs +32 -4
- package/package.json +10 -10
- package/dist/extension-js-devtools/extension-js/chrome/events.ndjson +0 -2
- package/dist/extension-js-devtools/extension-js/chrome/ready.json +0 -16
- package/dist/extension-js-devtools/extension-js/chromium/events.ndjson +0 -2
- package/dist/extension-js-devtools/extension-js/chromium/ready.json +0 -16
- package/dist/extension-js-devtools/extension-js/edge/events.ndjson +0 -2
- package/dist/extension-js-devtools/extension-js/edge/ready.json +0 -16
- package/dist/extension-js-devtools/extension-js/firefox/events.ndjson +0 -2
- package/dist/extension-js-devtools/extension-js/firefox/ready.json +0 -16
- package/dist/extension-js-theme/extension-js/chrome/events.ndjson +0 -2
- package/dist/extension-js-theme/extension-js/chrome/ready.json +0 -16
- package/dist/extension-js-theme/extension-js/chromium/events.ndjson +0 -2
- package/dist/extension-js-theme/extension-js/chromium/ready.json +0 -16
- package/dist/extension-js-theme/extension-js/edge/events.ndjson +0 -2
- package/dist/extension-js-theme/extension-js/edge/ready.json +0 -16
package/dist/0~rspack-config.mjs
CHANGED
|
@@ -375,7 +375,9 @@ function getFilename(feature, filePath) {
|
|
|
375
375
|
'.js',
|
|
376
376
|
'.jsx',
|
|
377
377
|
'.tsx',
|
|
378
|
-
'.ts'
|
|
378
|
+
'.ts',
|
|
379
|
+
'.vue',
|
|
380
|
+
'.svelte'
|
|
379
381
|
].includes(entryExt)) fileOutputpath = fileOutputpath.replace(entryExt, '.js');
|
|
380
382
|
if ([
|
|
381
383
|
'.html',
|
|
@@ -399,10 +401,7 @@ function background_background(manifest) {
|
|
|
399
401
|
...manifest.background,
|
|
400
402
|
...manifest.background.scripts && {
|
|
401
403
|
scripts: [
|
|
402
|
-
...manifest.background.scripts.map((script)=>(()
|
|
403
|
-
const raw = String(script);
|
|
404
|
-
return getFilename("background/scripts.js", raw);
|
|
405
|
-
})())
|
|
404
|
+
...new Set(manifest.background.scripts.map((script)=>getFilename("background/scripts.js", String(script))))
|
|
406
405
|
]
|
|
407
406
|
}
|
|
408
407
|
}
|
|
@@ -426,12 +425,12 @@ function browserAction(manifest) {
|
|
|
426
425
|
...manifest.browser_action.default_icon && {
|
|
427
426
|
default_icon: 'string' == typeof manifest.browser_action.default_icon ? (()=>{
|
|
428
427
|
const raw = String(manifest.browser_action.default_icon);
|
|
429
|
-
const isPublic = /^(
|
|
428
|
+
const isPublic = /^(?:\/public\/|(?:\.\/)?public\/)/i.test(raw);
|
|
430
429
|
const target = isPublic ? normalizeManifestOutputPath(raw) : `icons/${__rspack_external_path.basename(raw)}`;
|
|
431
430
|
return getFilename(target, raw);
|
|
432
431
|
})() : Object.fromEntries(Object.entries(manifest.browser_action.default_icon).map(([size, icon])=>{
|
|
433
432
|
const raw = String(icon);
|
|
434
|
-
const isPublic = /^(
|
|
433
|
+
const isPublic = /^(?:\/public\/|(?:\.\/)?public\/)/i.test(raw);
|
|
435
434
|
const target = isPublic ? normalizeManifestOutputPath(raw) : `icons/${__rspack_external_path.basename(raw)}`;
|
|
436
435
|
return [
|
|
437
436
|
size,
|
|
@@ -445,7 +444,7 @@ function browserAction(manifest) {
|
|
|
445
444
|
...themeIcon.light && {
|
|
446
445
|
light: (()=>{
|
|
447
446
|
const raw = String(themeIcon.light);
|
|
448
|
-
const isPublic = /^(
|
|
447
|
+
const isPublic = /^(?:\/public\/|(?:\.\/)?public\/)/i.test(raw);
|
|
449
448
|
const target = isPublic ? normalizeManifestOutputPath(raw) : `browser_action/${__rspack_external_path.basename(raw)}`;
|
|
450
449
|
return getFilename(target, raw);
|
|
451
450
|
})()
|
|
@@ -453,7 +452,7 @@ function browserAction(manifest) {
|
|
|
453
452
|
...themeIcon.dark && {
|
|
454
453
|
dark: (()=>{
|
|
455
454
|
const raw = String(themeIcon.dark);
|
|
456
|
-
const isPublic = /^(
|
|
455
|
+
const isPublic = /^(?:\/public\/|(?:\.\/)?public\/)/i.test(raw);
|
|
457
456
|
const target = isPublic ? normalizeManifestOutputPath(raw) : `browser_action/${__rspack_external_path.basename(raw)}`;
|
|
458
457
|
return getFilename(target, raw);
|
|
459
458
|
})()
|
|
@@ -497,12 +496,12 @@ function pageAction(manifest) {
|
|
|
497
496
|
...manifest.page_action.default_icon && {
|
|
498
497
|
default_icon: 'string' == typeof manifest.page_action.default_icon ? (()=>{
|
|
499
498
|
const raw = String(manifest.page_action.default_icon);
|
|
500
|
-
const isPublic = /^(
|
|
499
|
+
const isPublic = /^(?:\/public\/|(?:\.\/)?public\/)/i.test(raw);
|
|
501
500
|
const target = isPublic ? normalizeManifestOutputPath(raw) : `icons/${__rspack_external_path.basename(raw)}`;
|
|
502
501
|
return getFilename(target, raw);
|
|
503
502
|
})() : Object.fromEntries(Object.entries(manifest.page_action.default_icon).map(([size, icon])=>{
|
|
504
503
|
const raw = String(icon);
|
|
505
|
-
const isPublic = /^(
|
|
504
|
+
const isPublic = /^(?:\/public\/|(?:\.\/)?public\/)/i.test(raw);
|
|
506
505
|
const target = isPublic ? normalizeManifestOutputPath(raw) : `icons/${__rspack_external_path.basename(raw)}`;
|
|
507
506
|
return [
|
|
508
507
|
size,
|
|
@@ -523,12 +522,12 @@ function sidebarAction(manifest) {
|
|
|
523
522
|
...manifest.sidebar_action.default_icon && {
|
|
524
523
|
default_icon: 'string' == typeof manifest.sidebar_action.default_icon ? (()=>{
|
|
525
524
|
const raw = String(manifest.sidebar_action.default_icon);
|
|
526
|
-
const isPublic = /^(
|
|
525
|
+
const isPublic = /^(?:\/public\/|(?:\.\/)?public\/)/i.test(raw);
|
|
527
526
|
const target = isPublic ? normalizeManifestOutputPath(raw) : `icons/${__rspack_external_path.basename(raw)}`;
|
|
528
527
|
return getFilename(target, raw);
|
|
529
528
|
})() : Object.fromEntries(Object.entries(manifest.sidebar_action.default_icon).map(([size, icon])=>{
|
|
530
529
|
const raw = String(icon);
|
|
531
|
-
const isPublic = /^(
|
|
530
|
+
const isPublic = /^(?:\/public\/|(?:\.\/)?public\/)/i.test(raw);
|
|
532
531
|
const target = isPublic ? normalizeManifestOutputPath(raw) : `icons/${__rspack_external_path.basename(raw)}`;
|
|
533
532
|
return [
|
|
534
533
|
size,
|
|
@@ -545,7 +544,7 @@ function themeExperiment(manifest) {
|
|
|
545
544
|
return te && {
|
|
546
545
|
theme_experiment: {
|
|
547
546
|
...te,
|
|
548
|
-
...te.stylesheet && {
|
|
547
|
+
...'string' == typeof te.stylesheet && {
|
|
549
548
|
stylesheet: getFilename(`theme_experiment/${getBasename(te.stylesheet)}`, te.stylesheet)
|
|
550
549
|
},
|
|
551
550
|
...Array.isArray(te.stylesheets) && {
|
|
@@ -574,12 +573,12 @@ function action_action(manifest) {
|
|
|
574
573
|
...manifest.action.default_icon && {
|
|
575
574
|
default_icon: 'string' == typeof manifest.action.default_icon ? (()=>{
|
|
576
575
|
const raw = String(manifest.action.default_icon);
|
|
577
|
-
const isPublic = /^(
|
|
576
|
+
const isPublic = /^(?:\/public\/|(?:\.\/)?public\/)/i.test(raw);
|
|
578
577
|
const target = isPublic ? normalizeManifestOutputPath(raw) : `icons/${__rspack_external_path.basename(raw)}`;
|
|
579
578
|
return getFilename(target, raw);
|
|
580
579
|
})() : Object.fromEntries(Object.entries(manifest.action.default_icon).map(([size, icon])=>{
|
|
581
580
|
const raw = String(icon);
|
|
582
|
-
const isPublic = /^(
|
|
581
|
+
const isPublic = /^(?:\/public\/|(?:\.\/)?public\/)/i.test(raw);
|
|
583
582
|
const target = isPublic ? normalizeManifestOutputPath(raw) : `icons/${__rspack_external_path.basename(raw)}`;
|
|
584
583
|
return [
|
|
585
584
|
size,
|
|
@@ -753,7 +752,7 @@ function icons_icons(manifest) {
|
|
|
753
752
|
return manifest.icons && {
|
|
754
753
|
icons: Object.fromEntries(Object.entries(manifest.icons).map(([size, icon])=>{
|
|
755
754
|
const raw = String(icon);
|
|
756
|
-
const isPublic = /^(
|
|
755
|
+
const isPublic = /^(?:\/public\/|(?:\.\/)?public\/)/i.test(raw);
|
|
757
756
|
const target = isPublic ? normalizeManifestOutputPath(raw) : `icons/${__rspack_external_path.basename(raw)}`;
|
|
758
757
|
return [
|
|
759
758
|
size,
|
|
@@ -817,6 +816,7 @@ function storage(manifest) {
|
|
|
817
816
|
};
|
|
818
817
|
}
|
|
819
818
|
const theme_getBasename = (filepath)=>__rspack_external_path.basename(filepath);
|
|
819
|
+
const rewriteThemeImage = (value)=>getFilename(`theme/images/${theme_getBasename(value)}`, value);
|
|
820
820
|
function theme(manifest) {
|
|
821
821
|
return manifest.theme && {
|
|
822
822
|
theme: {
|
|
@@ -824,7 +824,7 @@ function theme(manifest) {
|
|
|
824
824
|
...manifest.theme.images && {
|
|
825
825
|
images: Object.fromEntries(Object.entries(manifest.theme.images).map(([key, value])=>[
|
|
826
826
|
key,
|
|
827
|
-
|
|
827
|
+
Array.isArray(value) ? value.map(rewriteThemeImage) : rewriteThemeImage(value)
|
|
828
828
|
]))
|
|
829
829
|
}
|
|
830
830
|
}
|
|
@@ -851,16 +851,18 @@ function normalizeOutputPath(originalPath) {
|
|
|
851
851
|
}
|
|
852
852
|
function webAccessibleResources(manifest) {
|
|
853
853
|
if (!manifest.web_accessible_resources || !manifest.web_accessible_resources.length) return;
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
854
|
+
const mapResource = (resource)=>getFilename(normalizeOutputPath(resource), resource);
|
|
855
|
+
const entries = manifest.web_accessible_resources.map((entry)=>{
|
|
856
|
+
if ('string' == typeof entry) return mapResource(entry);
|
|
857
|
+
if (!entry || !Array.isArray(entry.resources)) return;
|
|
858
|
+
return {
|
|
858
859
|
...entry,
|
|
859
|
-
resources:
|
|
860
|
-
}
|
|
861
|
-
|
|
860
|
+
resources: entry.resources.map(mapResource)
|
|
861
|
+
};
|
|
862
|
+
}).filter((entry)=>void 0 !== entry);
|
|
863
|
+
if (0 === entries.length) return;
|
|
862
864
|
return {
|
|
863
|
-
web_accessible_resources:
|
|
865
|
+
web_accessible_resources: entries
|
|
864
866
|
};
|
|
865
867
|
}
|
|
866
868
|
function contentSecurityPolicy(manifest) {
|
|
@@ -869,12 +871,13 @@ function contentSecurityPolicy(manifest) {
|
|
|
869
871
|
};
|
|
870
872
|
}
|
|
871
873
|
const omnibox_getBasename = (filepath)=>__rspack_external_path.basename(filepath);
|
|
872
|
-
function
|
|
873
|
-
|
|
874
|
+
function omnibox_omnibox(manifest) {
|
|
875
|
+
const omnibox = manifest.omnibox;
|
|
876
|
+
return omnibox && {
|
|
874
877
|
omnibox: {
|
|
875
|
-
...
|
|
876
|
-
...
|
|
877
|
-
default_icon: 'string' == typeof
|
|
878
|
+
...omnibox,
|
|
879
|
+
...omnibox.default_icon && {
|
|
880
|
+
default_icon: 'string' == typeof omnibox.default_icon ? getFilename(`icons/${omnibox_getBasename(omnibox.default_icon)}`, omnibox.default_icon) : Object.fromEntries(Object.entries(omnibox.default_icon).map(([size, icon])=>[
|
|
878
881
|
size,
|
|
879
882
|
getFilename(`icons/${omnibox_getBasename(icon)}`, icon)
|
|
880
883
|
]))
|
|
@@ -899,7 +902,7 @@ function manifestCommon(manifest, manifestPath) {
|
|
|
899
902
|
...userScripts(manifest),
|
|
900
903
|
...webAccessibleResources(manifest),
|
|
901
904
|
...contentSecurityPolicy(manifest),
|
|
902
|
-
...
|
|
905
|
+
...omnibox_omnibox(manifest)
|
|
903
906
|
};
|
|
904
907
|
}
|
|
905
908
|
function getManifestOverrides(manifestPath, manifest) {
|
|
@@ -909,14 +912,18 @@ function getManifestOverrides(manifestPath, manifest) {
|
|
|
909
912
|
const { [key]: _ignored, ...rest } = obj;
|
|
910
913
|
return rest;
|
|
911
914
|
};
|
|
915
|
+
const pickBackground = (obj)=>{
|
|
916
|
+
const value = obj.background;
|
|
917
|
+
return value && 'object' == typeof value ? value : {};
|
|
918
|
+
};
|
|
912
919
|
const common = manifestCommon(manifestContent, manifestPath);
|
|
913
920
|
const mv2 = manifestV2(manifestContent);
|
|
914
921
|
const mv3 = manifestV3(manifestContent);
|
|
915
922
|
const backgroundMerged = {
|
|
916
923
|
...manifestContent.background || {},
|
|
917
|
-
...common
|
|
918
|
-
...mv2
|
|
919
|
-
...mv3
|
|
924
|
+
...pickBackground(common),
|
|
925
|
+
...pickBackground(mv2),
|
|
926
|
+
...pickBackground(mv3)
|
|
920
927
|
};
|
|
921
928
|
const merged = {
|
|
922
929
|
...manifestContent,
|
|
@@ -2910,6 +2917,7 @@ class JsFrameworksPlugin {
|
|
|
2910
2917
|
issuerLayer: {
|
|
2911
2918
|
not: EXTENSIONJS_CONTENT_SCRIPT_LAYER
|
|
2912
2919
|
},
|
|
2920
|
+
type: "javascript/esm",
|
|
2913
2921
|
exclude: [
|
|
2914
2922
|
...swcRuleBase.exclude,
|
|
2915
2923
|
(resourcePath)=>isfeatureScriptsContentLike(resourcePath)
|
|
@@ -3134,10 +3142,12 @@ class UpdateManifest {
|
|
|
3134
3142
|
this.manifestPath = options.manifestPath;
|
|
3135
3143
|
this.browser = options.browser || 'chrome';
|
|
3136
3144
|
}
|
|
3137
|
-
applyDevOverrides(
|
|
3138
|
-
if (!
|
|
3139
|
-
return
|
|
3140
|
-
|
|
3145
|
+
applyDevOverrides(manifest) {
|
|
3146
|
+
if (!manifest.content_scripts) return [];
|
|
3147
|
+
return manifest.content_scripts.map((contentObj, index)=>{
|
|
3148
|
+
const css = contentObj.css ?? [];
|
|
3149
|
+
const js = contentObj.js ?? [];
|
|
3150
|
+
if (css.length && !js.length) contentObj.js = [
|
|
3141
3151
|
getFilename(`content_scripts-${index}`, 'dev.js')
|
|
3142
3152
|
];
|
|
3143
3153
|
return contentObj;
|
|
@@ -3165,7 +3175,7 @@ class UpdateManifest {
|
|
|
3165
3175
|
if ('development' === compiler.options.mode && Array.isArray(patchedManifest.content_scripts)) for (const cs of patchedManifest.content_scripts)try {
|
|
3166
3176
|
const hasCss = Array.isArray(cs.css) && cs.css.length > 0;
|
|
3167
3177
|
const hasJs = Array.isArray(cs.js) && cs.js.length > 0;
|
|
3168
|
-
if (hasCss && hasJs &&
|
|
3178
|
+
if (hasCss && hasJs && cs.js?.length === 1) devCssStubsAdded++;
|
|
3169
3179
|
} catch {}
|
|
3170
3180
|
console.log(manifestOverridesSummary(overrideKeys, devCssStubsAdded));
|
|
3171
3181
|
} catch {}
|
|
@@ -3189,6 +3199,18 @@ function getSharedFor(compilation) {
|
|
|
3189
3199
|
}
|
|
3190
3200
|
return shared;
|
|
3191
3201
|
}
|
|
3202
|
+
function cleanMatches(matches) {
|
|
3203
|
+
return matches.map((match)=>{
|
|
3204
|
+
try {
|
|
3205
|
+
const url = new URL(match.replace(/^\*:\/\//, 'https://'));
|
|
3206
|
+
if (match.endsWith(url.pathname)) return `${match.substring(0, match.length - url.pathname.length)}/*`;
|
|
3207
|
+
if ('/' === url.pathname) return `${match}/*`;
|
|
3208
|
+
return match;
|
|
3209
|
+
} catch {
|
|
3210
|
+
return match;
|
|
3211
|
+
}
|
|
3212
|
+
});
|
|
3213
|
+
}
|
|
3192
3214
|
function warFieldError(filePath, opts) {
|
|
3193
3215
|
const displayPath = opts?.overrideNotFoundPath || filePath;
|
|
3194
3216
|
const lines = [];
|
|
@@ -3199,6 +3221,10 @@ function warFieldError(filePath, opts) {
|
|
|
3199
3221
|
lines.push(`To reference files in ${pintor.yellow('public/')}, use a leading '/' (e.g. ${pintor.yellow('/open-panel.gif')}). These resolve from the built extension root.`);
|
|
3200
3222
|
lines.push('');
|
|
3201
3223
|
lines.push(`Fix: Add the file to ${pintor.yellow('public/')} or update the path to the correct '/...' location.`);
|
|
3224
|
+
} else if (opts?.sourceSibling) {
|
|
3225
|
+
lines.push(`Found ${pintor.yellow(opts.sourceSibling)}, but web_accessible_resources entries are copied as-is, not compiled.`);
|
|
3226
|
+
lines.push('');
|
|
3227
|
+
lines.push(`Fix: Import the file from a script so it gets bundled, or move a prebuilt copy to ${pintor.yellow('public/')} and reference it with a leading '/'.`);
|
|
3202
3228
|
} else {
|
|
3203
3229
|
lines.push("Relative paths must point to a real source file so the build can emit it.");
|
|
3204
3230
|
lines.push('');
|
|
@@ -3209,6 +3235,16 @@ function warFieldError(filePath, opts) {
|
|
|
3209
3235
|
lines.push(`${pintor.red('NOT FOUND')} ${pintor.underline(displayPath)}`);
|
|
3210
3236
|
return lines.join('\n');
|
|
3211
3237
|
}
|
|
3238
|
+
function warStringEntryInMv3(entry) {
|
|
3239
|
+
const lines = [];
|
|
3240
|
+
lines.push(`Check the ${pintor.yellow('web_accessible_resources')} field in your ${pintor.yellow('manifest.json')} file.`);
|
|
3241
|
+
lines.push(`Manifest V3 requires object entries with ${pintor.yellow('resources')} and ${pintor.yellow('matches')} (or ${pintor.yellow('extension_ids')}). Plain string entries are the Manifest V2 format and Chrome rejects them at load time.`);
|
|
3242
|
+
lines.push('');
|
|
3243
|
+
lines.push(`Fix: Wrap it like ${pintor.yellow(`{"resources": ["${entry}"], "matches": ["<all_urls>"]}`)} with the matches your pages need.`);
|
|
3244
|
+
lines.push('');
|
|
3245
|
+
lines.push(`${pintor.red('INVALID MV3 ENTRY')} ${pintor.underline(entry)}`);
|
|
3246
|
+
return lines.join('\n');
|
|
3247
|
+
}
|
|
3212
3248
|
function warInvalidMatchPattern(pattern) {
|
|
3213
3249
|
const lines = [];
|
|
3214
3250
|
lines.push(`Check the ${pintor.yellow('web_accessible_resources')} field in your ${pintor.yellow('manifest.json')} file.`);
|
|
@@ -3249,6 +3285,33 @@ function emitFileAsAsset(compilation, absPath) {
|
|
|
3249
3285
|
compilation.fileDependencies.add(absPath);
|
|
3250
3286
|
return unixify(outName);
|
|
3251
3287
|
}
|
|
3288
|
+
function findSourceSibling(absOutputPath) {
|
|
3289
|
+
const candidatesByExt = {
|
|
3290
|
+
'.js': [
|
|
3291
|
+
'.ts',
|
|
3292
|
+
'.tsx',
|
|
3293
|
+
'.jsx',
|
|
3294
|
+
'.vue',
|
|
3295
|
+
'.svelte'
|
|
3296
|
+
],
|
|
3297
|
+
'.css': [
|
|
3298
|
+
'.scss',
|
|
3299
|
+
'.sass',
|
|
3300
|
+
'.less'
|
|
3301
|
+
],
|
|
3302
|
+
'.html': [
|
|
3303
|
+
'.njk',
|
|
3304
|
+
'.nunjucks'
|
|
3305
|
+
]
|
|
3306
|
+
};
|
|
3307
|
+
const ext = __rspack_external_path.extname(absOutputPath);
|
|
3308
|
+
const sourceExts = candidatesByExt[ext];
|
|
3309
|
+
if (!sourceExts) return;
|
|
3310
|
+
for (const sourceExt of sourceExts){
|
|
3311
|
+
const candidate = absOutputPath.slice(0, -ext.length) + sourceExt;
|
|
3312
|
+
if (__rspack_external_fs.existsSync(candidate)) return candidate;
|
|
3313
|
+
}
|
|
3314
|
+
}
|
|
3252
3315
|
function isFirefox(browser) {
|
|
3253
3316
|
return !!browser && browser.toLowerCase().includes('firefox');
|
|
3254
3317
|
}
|
|
@@ -3284,30 +3347,33 @@ function resolveUserDeclaredWAR(compilation, manifestPath, manifest, browser) {
|
|
|
3284
3347
|
v2,
|
|
3285
3348
|
v3
|
|
3286
3349
|
};
|
|
3287
|
-
const
|
|
3350
|
+
const isMv2 = 3 !== manifestObj.manifest_version;
|
|
3288
3351
|
const manifestDir = __rspack_external_path.dirname(manifestPath);
|
|
3289
3352
|
const projectPath = compilation.options?.context || manifestDir;
|
|
3290
|
-
const pushResource = (matches, resource)=>{
|
|
3291
|
-
if (
|
|
3353
|
+
const pushResource = (matches, resource, extra)=>{
|
|
3354
|
+
if (isMv2) return void v2.add(resource);
|
|
3292
3355
|
const key = (matches || []).join(',');
|
|
3293
3356
|
let group = v3.find((g)=>g.matches.join(',') === key);
|
|
3294
|
-
if (
|
|
3357
|
+
if (group) {
|
|
3358
|
+
if (extra && !group.extra) group.extra = extra;
|
|
3359
|
+
} else {
|
|
3295
3360
|
group = {
|
|
3296
3361
|
matches: matches || [],
|
|
3297
|
-
resources: new Set()
|
|
3362
|
+
resources: new Set(),
|
|
3363
|
+
extra
|
|
3298
3364
|
};
|
|
3299
3365
|
v3.push(group);
|
|
3300
3366
|
}
|
|
3301
3367
|
group.resources.add(resource);
|
|
3302
3368
|
};
|
|
3303
|
-
const handleOne = (matches, res)=>{
|
|
3369
|
+
const handleOne = (matches, res, extra)=>{
|
|
3304
3370
|
compilation.errors = compilation.errors || [];
|
|
3305
3371
|
compilation.warnings = compilation.warnings || [];
|
|
3306
3372
|
const normalizedOutput = normalizeManifestOutputPath(res);
|
|
3307
3373
|
const publicCandidate = __rspack_external_path.join(projectPath, 'public', normalizedOutput);
|
|
3308
|
-
if (__rspack_external_fs.existsSync(publicCandidate)) return void pushResource(matches, normalizedOutput);
|
|
3374
|
+
if (__rspack_external_fs.existsSync(publicCandidate)) return void pushResource(matches, normalizedOutput, extra);
|
|
3309
3375
|
__rspack_external_path.isAbsolute(res) || __rspack_external_path.join(manifestDir, isPublicRootLike(res) ? toPublicOutput(res) : res);
|
|
3310
|
-
if (/[*?\[\]{}]/.test(res)) return void pushResource(matches, res);
|
|
3376
|
+
if (/[*?\[\]{}]/.test(res)) return void pushResource(matches, res, extra);
|
|
3311
3377
|
if (isPublicRootLike(res)) {
|
|
3312
3378
|
const output = normalizeManifestOutputPath(res);
|
|
3313
3379
|
const publicAbs = __rspack_external_path.join(projectPath, 'public', output);
|
|
@@ -3338,7 +3404,7 @@ function resolveUserDeclaredWAR(compilation, manifestPath, manifest, browser) {
|
|
|
3338
3404
|
err.file = 'manifest.json';
|
|
3339
3405
|
compilation.warnings.push(err);
|
|
3340
3406
|
}
|
|
3341
|
-
pushResource(matches, output);
|
|
3407
|
+
pushResource(matches, output, extra);
|
|
3342
3408
|
return;
|
|
3343
3409
|
}
|
|
3344
3410
|
const abs = __rspack_external_path.isAbsolute(res) ? res : __rspack_external_path.join(manifestDir, res);
|
|
@@ -3350,46 +3416,47 @@ function resolveUserDeclaredWAR(compilation, manifestPath, manifest, browser) {
|
|
|
3350
3416
|
const assetEmitted = Boolean(asset2 && asset2.name === res) || __rspack_external_fs.existsSync(builtAbs);
|
|
3351
3417
|
if (__rspack_external_fs.existsSync(publicAbsMaybe) || assetEmitted) {
|
|
3352
3418
|
const output = toPublicOutput('/' + res);
|
|
3353
|
-
pushResource(matches, output);
|
|
3419
|
+
pushResource(matches, output, extra);
|
|
3354
3420
|
return;
|
|
3355
3421
|
}
|
|
3422
|
+
const sourceSibling = findSourceSibling(abs);
|
|
3356
3423
|
const msg = warFieldError(abs, {
|
|
3357
|
-
relativeRef: res
|
|
3424
|
+
relativeRef: res,
|
|
3425
|
+
sourceSibling: sourceSibling ? __rspack_external_path.relative(manifestDir, sourceSibling) : void 0
|
|
3358
3426
|
});
|
|
3359
3427
|
const warn = new core_WebpackError(msg);
|
|
3360
3428
|
warn.file = 'manifest.json';
|
|
3361
3429
|
warn.name = 'WARRelativeAssetMissing';
|
|
3362
3430
|
compilation.warnings.push(warn);
|
|
3363
|
-
pushResource(matches, res);
|
|
3364
3431
|
return;
|
|
3365
3432
|
}
|
|
3366
3433
|
const emitted = emitFileAsAsset(compilation, abs);
|
|
3367
|
-
pushResource(matches, emitted);
|
|
3434
|
+
pushResource(matches, emitted, extra);
|
|
3368
3435
|
};
|
|
3369
|
-
|
|
3370
|
-
|
|
3371
|
-
|
|
3436
|
+
war.forEach((entry)=>{
|
|
3437
|
+
if ('string' == typeof entry) {
|
|
3438
|
+
if (isMv2) return void handleOne(void 0, entry);
|
|
3439
|
+
const msg = warStringEntryInMv3(entry);
|
|
3440
|
+
const err = new core_WebpackError(msg);
|
|
3441
|
+
err.file = 'manifest.json';
|
|
3442
|
+
err.name = 'WARStringEntryInMv3';
|
|
3443
|
+
compilation.errors = compilation.errors || [];
|
|
3444
|
+
compilation.errors.push(err);
|
|
3445
|
+
return;
|
|
3446
|
+
}
|
|
3447
|
+
if (!entry || 'object' != typeof entry) return;
|
|
3448
|
+
const matches = entry.matches || [];
|
|
3372
3449
|
validateMatchesOrReport(compilation, matches, browser);
|
|
3373
|
-
if (!Array.isArray(
|
|
3374
|
-
|
|
3450
|
+
if (!Array.isArray(entry.resources)) return;
|
|
3451
|
+
const { resources: _resources, matches: _matches, ...extra } = entry;
|
|
3452
|
+
const extraFields = Object.keys(extra).length > 0 ? extra : void 0;
|
|
3453
|
+
entry.resources.forEach((res)=>handleOne(matches, res, extraFields));
|
|
3375
3454
|
});
|
|
3376
3455
|
return {
|
|
3377
3456
|
v2,
|
|
3378
3457
|
v3
|
|
3379
3458
|
};
|
|
3380
3459
|
}
|
|
3381
|
-
function cleanMatches(matches) {
|
|
3382
|
-
return matches.map((match)=>{
|
|
3383
|
-
try {
|
|
3384
|
-
const url = new URL(match.replace(/^\*:\/\//, 'https://'));
|
|
3385
|
-
if (match.endsWith(url.pathname)) return `${match.substring(0, match.length - url.pathname.length)}/*`;
|
|
3386
|
-
if ('/' === url.pathname) return `${match}/*`;
|
|
3387
|
-
return match;
|
|
3388
|
-
} catch {
|
|
3389
|
-
return match;
|
|
3390
|
-
}
|
|
3391
|
-
});
|
|
3392
|
-
}
|
|
3393
3460
|
function getAssetSource(compilation, filename) {
|
|
3394
3461
|
const byGet = 'function' == typeof compilation.getAsset ? compilation.getAsset(filename) : void 0;
|
|
3395
3462
|
const byAssets = !byGet && compilation.assets ? compilation.assets[filename] : void 0;
|
|
@@ -3454,6 +3521,7 @@ function mergeIntoV3Group(groups, normalizedMatches, resources, options) {
|
|
|
3454
3521
|
].sort()
|
|
3455
3522
|
});
|
|
3456
3523
|
}
|
|
3524
|
+
const assetScanCache = new WeakMap();
|
|
3457
3525
|
function isCanonicalContentScriptCss(resource) {
|
|
3458
3526
|
return /^content_scripts\/content-\d+\.css$/.test(resource);
|
|
3459
3527
|
}
|
|
@@ -3466,6 +3534,7 @@ function generateManifestPatches(compilation, manifestPath, entryImports, browse
|
|
|
3466
3534
|
const canonicalManifest = getManifestContent(compilation, manifestPath);
|
|
3467
3535
|
const resolved = resolveUserDeclaredWAR(compilation, manifestPath, canonicalManifest, browser);
|
|
3468
3536
|
const webAccessibleResourcesV3 = 3 === canonicalManifest.manifest_version ? resolved.v3.map((g)=>({
|
|
3537
|
+
...g.extra || {},
|
|
3469
3538
|
matches: g.matches,
|
|
3470
3539
|
resources: Array.from(g.resources)
|
|
3471
3540
|
})) : [];
|
|
@@ -3475,11 +3544,17 @@ function generateManifestPatches(compilation, manifestPath, entryImports, browse
|
|
|
3475
3544
|
const normalizedMatches = cleanMatches(matches);
|
|
3476
3545
|
const jsFiles = Array.isArray(contentScript.js) ? contentScript.js : [];
|
|
3477
3546
|
for (const jsFile of jsFiles){
|
|
3478
|
-
const
|
|
3479
|
-
|
|
3480
|
-
|
|
3481
|
-
|
|
3482
|
-
|
|
3547
|
+
const assetForCache = 'function' == typeof compilation.getAsset ? compilation.getAsset(jsFile) : void 0;
|
|
3548
|
+
const cacheKey = assetForCache && 'object' == typeof assetForCache.source ? assetForCache.source : void 0;
|
|
3549
|
+
let filtered = cacheKey ? assetScanCache.get(cacheKey) : void 0;
|
|
3550
|
+
if (!filtered) {
|
|
3551
|
+
const source = getAssetSource(compilation, jsFile);
|
|
3552
|
+
if (!source) continue;
|
|
3553
|
+
const re = /assets\/[A-Za-z0-9._-]+/g;
|
|
3554
|
+
const found = source.match(re) || [];
|
|
3555
|
+
filtered = Array.from(new Set(found.filter((r)=>!r.endsWith('.js') && !r.endsWith('.map')))).sort();
|
|
3556
|
+
if (cacheKey) assetScanCache.set(cacheKey, filtered);
|
|
3557
|
+
}
|
|
3483
3558
|
if (0 !== filtered.length) mergeIntoV3Group(webAccessibleResourcesV3, normalizedMatches, filtered);
|
|
3484
3559
|
}
|
|
3485
3560
|
}
|
|
@@ -3533,7 +3608,8 @@ function generateManifestPatches(compilation, manifestPath, entryImports, browse
|
|
|
3533
3608
|
const emittedCssUnderContentScripts = assetKeys.filter((k)=>k.startsWith("content_scripts/")).filter((k)=>k.endsWith('.css'));
|
|
3534
3609
|
const onDiskCssUnderContentScripts = [];
|
|
3535
3610
|
const outputPath = compilation.options.output?.path;
|
|
3536
|
-
|
|
3611
|
+
const isDevModeBuild = 'production' !== (compilation.options?.mode || 'development');
|
|
3612
|
+
if (outputPath && isDevModeBuild) try {
|
|
3537
3613
|
const csDir = __rspack_external_path.join(outputPath, "content_scripts");
|
|
3538
3614
|
if (__rspack_external_fs.existsSync(csDir)) {
|
|
3539
3615
|
for (const name of __rspack_external_fs.readdirSync(csDir))if (name.endsWith('.css')) onDiskCssUnderContentScripts.push(`content_scripts/${name}`);
|
|
@@ -3562,6 +3638,7 @@ function generateManifestPatches(compilation, manifestPath, entryImports, browse
|
|
|
3562
3638
|
}
|
|
3563
3639
|
if (3 === canonicalManifest.manifest_version) {
|
|
3564
3640
|
if (webAccessibleResourcesV3.length > 0) canonicalManifest.web_accessible_resources = webAccessibleResourcesV3.map((entry)=>({
|
|
3641
|
+
...entry,
|
|
3565
3642
|
resources: Array.from(new Set(entry.resources)).sort(),
|
|
3566
3643
|
matches: Array.from(new Set(entry.matches)).sort()
|
|
3567
3644
|
})).sort((a, b)=>a.matches.join(',').localeCompare(b.matches.join(',')));
|
|
@@ -5242,6 +5319,7 @@ function getScriptEntries(scriptPath) {
|
|
|
5242
5319
|
] : [];
|
|
5243
5320
|
const fileAssets = scriptEntries.filter((scriptAsset)=>{
|
|
5244
5321
|
const validFile = __rspack_external_fs.existsSync(scriptAsset);
|
|
5322
|
+
if (/\.d\.[cm]?ts$/i.test(scriptAsset)) return false;
|
|
5245
5323
|
const assetExtension = __rspack_external_path.extname(scriptAsset);
|
|
5246
5324
|
return validFile && ('.js' === assetExtension || '.cjs' === assetExtension || '.mjs' === assetExtension || '.jsx' === assetExtension || '.mjsx' === assetExtension || '.ts' === assetExtension || '.mts' === assetExtension || '.mtsx' === assetExtension || '.tsx' === assetExtension);
|
|
5247
5325
|
});
|
|
@@ -5319,6 +5397,9 @@ class AddContentScriptWrapper {
|
|
|
5319
5397
|
resolveLoader() {
|
|
5320
5398
|
return resolveDevelopDistFile("feature-scripts-content-script-wrapper");
|
|
5321
5399
|
}
|
|
5400
|
+
resolveConcatLoader() {
|
|
5401
|
+
return resolveDevelopDistFile("feature-scripts-classic-concat-loader");
|
|
5402
|
+
}
|
|
5322
5403
|
apply(compiler) {
|
|
5323
5404
|
const manifestDir = __rspack_external_path.dirname(this.manifestPath);
|
|
5324
5405
|
const packageJsonPath = findNearestPackageJsonSync(this.manifestPath);
|
|
@@ -5329,6 +5410,26 @@ class AddContentScriptWrapper {
|
|
|
5329
5410
|
manifestDir,
|
|
5330
5411
|
packageJsonDir
|
|
5331
5412
|
];
|
|
5413
|
+
compiler.options.module.rules.push({
|
|
5414
|
+
test: /\.(js|cjs|mjs|jsx|mjsx|ts|mts|tsx|mtsx)$/,
|
|
5415
|
+
resourceQuery: /__extensionjs_classic_concat__/,
|
|
5416
|
+
include: includeDirs,
|
|
5417
|
+
exclude: [
|
|
5418
|
+
/([\\/])node_modules\1/
|
|
5419
|
+
],
|
|
5420
|
+
use: [
|
|
5421
|
+
{
|
|
5422
|
+
loader: this.resolveLoader(),
|
|
5423
|
+
options: {
|
|
5424
|
+
manifestPath: this.manifestPath,
|
|
5425
|
+
mode: compiler.options.mode
|
|
5426
|
+
}
|
|
5427
|
+
},
|
|
5428
|
+
{
|
|
5429
|
+
loader: this.resolveConcatLoader()
|
|
5430
|
+
}
|
|
5431
|
+
]
|
|
5432
|
+
});
|
|
5332
5433
|
compiler.options.module.rules.push({
|
|
5333
5434
|
test: /\.(js|cjs|mjs|jsx|mjsx|ts|mts|tsx|mtsx)$/,
|
|
5334
5435
|
include: includeDirs,
|
|
@@ -5350,7 +5451,28 @@ class AddContentScriptWrapper {
|
|
|
5350
5451
|
const add_scripts_isRemoteUrl = (entry)=>/^([a-z][a-z0-9+.-]*:)?\/\//i.test(entry);
|
|
5351
5452
|
const isContentScriptFeature = (feature)=>feature.startsWith("content_scripts/");
|
|
5352
5453
|
const isScriptsFolderFeature = (feature)=>feature.startsWith("scripts/");
|
|
5454
|
+
const isBackgroundScriptsFeature = (feature)=>"background/scripts" === feature;
|
|
5353
5455
|
function createSequentialEntryModule(feature, entryImports) {
|
|
5456
|
+
const isCss = (p)=>/\.css$/i.test(p);
|
|
5457
|
+
const jsFiles = entryImports.filter((p)=>!isCss(p));
|
|
5458
|
+
const cssFiles = entryImports.filter(isCss);
|
|
5459
|
+
const isClassic = (p)=>{
|
|
5460
|
+
try {
|
|
5461
|
+
const src = __rspack_external_fs.readFileSync(p, 'utf8');
|
|
5462
|
+
return !/^\s*import[\s{('"*]/m.test(src) && !/^\s*export[\s{*( ]/m.test(src);
|
|
5463
|
+
} catch {
|
|
5464
|
+
return false;
|
|
5465
|
+
}
|
|
5466
|
+
};
|
|
5467
|
+
const concatenateClassic = jsFiles.length > 1 && jsFiles.every(isClassic);
|
|
5468
|
+
if (concatenateClassic) {
|
|
5469
|
+
const queryData = encodeURIComponent(JSON.stringify({
|
|
5470
|
+
feature,
|
|
5471
|
+
js: jsFiles,
|
|
5472
|
+
css: cssFiles
|
|
5473
|
+
}));
|
|
5474
|
+
return `${jsFiles[0]}?__extensionjs_classic_concat__=${queryData}`;
|
|
5475
|
+
}
|
|
5354
5476
|
const source = [
|
|
5355
5477
|
`/* extension.js sequential entry: ${feature} */`,
|
|
5356
5478
|
...entryImports.map((entryImport)=>`import ${JSON.stringify(String(entryImport))};`)
|
|
@@ -5428,7 +5550,7 @@ class AddScripts {
|
|
|
5428
5550
|
...cssImports
|
|
5429
5551
|
])
|
|
5430
5552
|
];
|
|
5431
|
-
const shouldUseSequentialEntryModule = isContentScriptFeature(feature) && scriptImports.length > 1;
|
|
5553
|
+
const shouldUseSequentialEntryModule = (isContentScriptFeature(feature) || isBackgroundScriptsFeature(feature)) && scriptImports.length > 1;
|
|
5432
5554
|
const finalEntryImports = shouldUseSequentialEntryModule ? [
|
|
5433
5555
|
createSequentialEntryModule(feature, entryImports)
|
|
5434
5556
|
] : entryImports;
|
|
@@ -7608,13 +7730,17 @@ function validateLocales(compiler, compilation, manifestPath) {
|
|
|
7608
7730
|
return false;
|
|
7609
7731
|
}
|
|
7610
7732
|
}
|
|
7611
|
-
} catch
|
|
7733
|
+
} catch (error) {
|
|
7734
|
+
if ('true' === process.env.EXTENSION_AUTHOR_MODE) console.log(localesValidationDetected(`could not scan __MSG__ placeholders in _locales/${defaultLocale}/messages.json: ${String(error?.message || error)}`));
|
|
7735
|
+
}
|
|
7612
7736
|
} else if (hasLocalesRoot) {
|
|
7613
7737
|
if ('true' === process.env.EXTENSION_AUTHOR_MODE) console.log(localesValidationDetected('_locales present but no default_locale'));
|
|
7614
7738
|
pushCompilationError(compiler, compilation, 'LocalesValidationError', localesPresentButNoDefaultLocale(), 'manifest.json');
|
|
7615
7739
|
return false;
|
|
7616
7740
|
}
|
|
7617
|
-
} catch
|
|
7741
|
+
} catch (error) {
|
|
7742
|
+
if ('true' === process.env.EXTENSION_AUTHOR_MODE) console.log(localesValidationDetected(`manifest.json could not be read for locale validation, deferring to manifest validation: ${String(error?.message || error)}`));
|
|
7743
|
+
}
|
|
7618
7744
|
try {
|
|
7619
7745
|
const localesRoot = resolveLocalesFolder(manifestPath, projectRoot);
|
|
7620
7746
|
if (localesRoot && __rspack_external_fs.existsSync(localesRoot)) {
|
|
@@ -7631,7 +7757,9 @@ function validateLocales(compiler, compilation, manifestPath) {
|
|
|
7631
7757
|
}
|
|
7632
7758
|
}
|
|
7633
7759
|
}
|
|
7634
|
-
} catch
|
|
7760
|
+
} catch (error) {
|
|
7761
|
+
if ('true' === process.env.EXTENSION_AUTHOR_MODE) console.log(localesValidationDetected(`could not scan _locales for JSON validity: ${String(error?.message || error)}`));
|
|
7762
|
+
}
|
|
7635
7763
|
return true;
|
|
7636
7764
|
}
|
|
7637
7765
|
function processLocaleAssets(compiler, compilation, manifestPath) {
|
|
@@ -8073,6 +8201,7 @@ class EmitFile {
|
|
|
8073
8201
|
let outputDir = group;
|
|
8074
8202
|
if (('action' === group || 'browser_action' === group || 'page_action' === group || 'sidebar_action' === group) && 'default_icon' === sub) outputDir = 'icons';
|
|
8075
8203
|
else if ('browser_action' === group && 'theme_icons' === sub) outputDir = 'browser_action';
|
|
8204
|
+
else if ('theme' === group && 'images' === sub) outputDir = 'theme/images';
|
|
8076
8205
|
const filename = `${outputDir}/${basename}`;
|
|
8077
8206
|
compilation.emitAsset(filename, rawSource);
|
|
8078
8207
|
emittedCount++;
|
|
@@ -8476,7 +8605,10 @@ class plugin_web_extension_WebExtensionPlugin {
|
|
|
8476
8605
|
}).apply(compiler);
|
|
8477
8606
|
new IconsPlugin({
|
|
8478
8607
|
manifestPath,
|
|
8479
|
-
includeList:
|
|
8608
|
+
includeList: {
|
|
8609
|
+
...manifestFieldsData.icons,
|
|
8610
|
+
...manifestFieldsData.theme
|
|
8611
|
+
},
|
|
8480
8612
|
browser: this.browser
|
|
8481
8613
|
}).apply(compiler);
|
|
8482
8614
|
new WebResourcesPlugin({
|
|
@@ -8769,6 +8901,7 @@ function webpackConfig(projectStructure, devOptions) {
|
|
|
8769
8901
|
console.log(debugExtensionsToLoad(unpackedExtensionDirsToLoad));
|
|
8770
8902
|
if (void 0 !== devOptions.extensions && 0 === companionUnpackedExtensionDirs.length) console.warn(noCompanionExtensionsResolved());
|
|
8771
8903
|
}
|
|
8904
|
+
const missingCssAssets = new Set();
|
|
8772
8905
|
const plugins = [
|
|
8773
8906
|
new CompilationPlugin({
|
|
8774
8907
|
manifestPath,
|
|
@@ -8809,7 +8942,47 @@ function webpackConfig(projectStructure, devOptions) {
|
|
|
8809
8942
|
}),
|
|
8810
8943
|
new PerfBudgetsPlugin({
|
|
8811
8944
|
budgets: devOptions.perfBudgets
|
|
8812
|
-
})
|
|
8945
|
+
}),
|
|
8946
|
+
{
|
|
8947
|
+
apply (compiler) {
|
|
8948
|
+
compiler.hooks.afterCompile.tap('warn-missing-css-assets', (compilation)=>{
|
|
8949
|
+
if (0 === missingCssAssets.size) return;
|
|
8950
|
+
const ErrorCtor = compiler.rspack?.WebpackError || Error;
|
|
8951
|
+
for (const request of missingCssAssets){
|
|
8952
|
+
const warning = new ErrorCtor(`CSS asset "${request}" was not found on disk; the url() is left unresolved. The browser requests it at runtime and loads the extension regardless. Fix the path if it's a typo, or add the asset if it should ship.`);
|
|
8953
|
+
warning.name = 'MissingCssAssetWarning';
|
|
8954
|
+
compilation.warnings.push(warning);
|
|
8955
|
+
}
|
|
8956
|
+
missingCssAssets.clear();
|
|
8957
|
+
});
|
|
8958
|
+
}
|
|
8959
|
+
},
|
|
8960
|
+
{
|
|
8961
|
+
apply (compiler) {
|
|
8962
|
+
const target = String(devOptions.browser);
|
|
8963
|
+
const isChromiumTarget = [
|
|
8964
|
+
'chrome',
|
|
8965
|
+
'edge'
|
|
8966
|
+
].includes(target) || target.includes('chromium');
|
|
8967
|
+
if (manifest?.manifest_version !== 2 || !isChromiumTarget) return;
|
|
8968
|
+
compiler.hooks.thisCompilation.tap('warn-mv2-on-chromium', (compilation)=>{
|
|
8969
|
+
const ErrorCtor = compiler.rspack?.WebpackError || Error;
|
|
8970
|
+
const usesBlockingWebRequest = Array.isArray(manifest.permissions) && manifest.permissions.includes('webRequestBlocking');
|
|
8971
|
+
const warning = new ErrorCtor([
|
|
8972
|
+
"This extension declares Manifest V2, which Chrome and Edge no longer load — ",
|
|
8973
|
+
`the ${target} build will not install. Options:`,
|
|
8974
|
+
"",
|
|
8975
|
+
" • Build for Firefox (still supports MV2): extension build --browser firefox",
|
|
8976
|
+
" • Migrate the manifest to MV3 (action, background.service_worker, host_permissions)",
|
|
8977
|
+
" • Or ship both from one source with browser-prefixed keys",
|
|
8978
|
+
" (chromium:manifest_version: 3, firefox:manifest_version: 2, …)",
|
|
8979
|
+
usesBlockingWebRequest ? `\n Note: this extension uses webRequestBlocking, which MV3 replaces with\n declarativeNetRequest — a code change, not just a manifest edit.` : ''
|
|
8980
|
+
].filter((line)=>'' !== line).join('\n'));
|
|
8981
|
+
warning.name = 'ManifestV2OnChromiumWarning';
|
|
8982
|
+
compilation.warnings.push(warning);
|
|
8983
|
+
});
|
|
8984
|
+
}
|
|
8985
|
+
}
|
|
8813
8986
|
];
|
|
8814
8987
|
plugins.push(new PlaywrightPlugin({
|
|
8815
8988
|
packageJsonDir,
|
|
@@ -8832,6 +9005,22 @@ function webpackConfig(projectStructure, devOptions) {
|
|
|
8832
9005
|
mode: devOptions.mode || 'development',
|
|
8833
9006
|
entry: {},
|
|
8834
9007
|
target: 'web',
|
|
9008
|
+
externals: [
|
|
9009
|
+
({ request, dependencyType, context }, callback)=>{
|
|
9010
|
+
if ('string' != typeof request) return callback();
|
|
9011
|
+
if (/^(chrome|moz)-extension:/i.test(request)) return callback(null, request, 'asset');
|
|
9012
|
+
if ('url' === dependencyType && context && !/^[a-z][\w+.-]*:/i.test(request) && !/^[/#]/.test(request) && !request.startsWith('//')) {
|
|
9013
|
+
const assetPath = request.split(/[?#]/)[0];
|
|
9014
|
+
try {
|
|
9015
|
+
if (assetPath && !__rspack_external_fs.existsSync(__rspack_external_path.resolve(context, assetPath))) {
|
|
9016
|
+
missingCssAssets.add(request);
|
|
9017
|
+
return callback(null, request, 'asset');
|
|
9018
|
+
}
|
|
9019
|
+
} catch {}
|
|
9020
|
+
}
|
|
9021
|
+
callback();
|
|
9022
|
+
}
|
|
9023
|
+
],
|
|
8835
9024
|
context: packageJsonDir,
|
|
8836
9025
|
cache: false,
|
|
8837
9026
|
devtool: 'production' === (devOptions.mode || 'development') ? false : 3 === manifest.manifest_version ? 'cheap-source-map' : 'eval-cheap-source-map',
|