extension-develop 2.0.0 → 2.0.3
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/README.md +230 -0
- package/dist/add-content-script-wrapper.js +1777 -0
- package/dist/add-hmr-accept-code.js +95 -3
- package/dist/build.d.ts +2 -0
- package/dist/cleanup.d.ts +1 -0
- package/dist/deprecated-shadow-root.js +115 -14
- package/dist/dev.d.ts +2 -0
- package/dist/develop-lib/config-types.d.ts +85 -0
- package/dist/develop-lib/extract-from-zip.d.ts +1 -0
- package/dist/develop-lib/find-nearest-package.d.ts +2 -0
- package/dist/develop-lib/generate-extension-types.d.ts +1 -0
- package/dist/develop-lib/generate-zip.d.ts +2 -0
- package/dist/develop-lib/get-extension-config.d.ts +6 -0
- package/dist/develop-lib/get-project-path.d.ts +6 -0
- package/dist/develop-lib/install-dependencies.d.ts +2 -0
- package/dist/develop-lib/messages.d.ts +35 -0
- package/dist/develop-lib/validate-user-dependencies.d.ts +1 -0
- package/dist/ensure-hmr-for-scripts.js +74 -3
- package/dist/extensions/chrome-manager-extension/background.js +1 -1
- package/dist/extensions/chrome-manager-extension/define-initial-tab.js +11 -1
- package/dist/extensions/chrome-manager-extension/images/logo.png +0 -0
- package/dist/extensions/chrome-manager-extension/manifest.json +3 -3
- package/dist/extensions/chrome-manager-extension/pages/welcome.html +3 -6
- package/dist/extensions/chrome-manager-extension/reload-service.js +214 -62
- package/dist/extensions/chromium-based-manager-extension/background.js +1 -1
- package/dist/extensions/chromium-based-manager-extension/define-initial-tab.js +11 -1
- package/dist/extensions/chromium-based-manager-extension/images/logo.png +0 -0
- package/dist/extensions/chromium-based-manager-extension/manifest.json +3 -3
- package/dist/extensions/chromium-based-manager-extension/pages/welcome.html +3 -6
- package/dist/extensions/chromium-based-manager-extension/reload-service.js +185 -28
- package/dist/extensions/edge-manager-extension/background.js +1 -1
- package/dist/extensions/edge-manager-extension/define-initial-tab.js +11 -1
- package/dist/extensions/edge-manager-extension/images/logo.png +0 -0
- package/dist/extensions/edge-manager-extension/manifest.json +3 -3
- package/dist/extensions/edge-manager-extension/pages/welcome.html +3 -6
- package/dist/extensions/edge-manager-extension/reload-service.js +223 -69
- package/dist/extensions/firefox-manager-extension/background.js +40 -12
- package/dist/extensions/firefox-manager-extension/define-initial-tab.js +16 -14
- package/dist/extensions/firefox-manager-extension/images/logo.png +0 -0
- package/dist/extensions/firefox-manager-extension/manifest.json +4 -5
- package/dist/extensions/firefox-manager-extension/pages/welcome.html +3 -6
- package/dist/extensions/firefox-manager-extension/reload-service.js +113 -75
- package/dist/extensions/gecko-based-manager-extension/background.js +1 -1
- package/dist/extensions/gecko-based-manager-extension/define-initial-tab.js +13 -6
- package/dist/extensions/gecko-based-manager-extension/images/logo.png +0 -0
- package/dist/extensions/gecko-based-manager-extension/manifest.json +3 -3
- package/dist/extensions/gecko-based-manager-extension/pages/welcome.html +3 -6
- package/dist/extensions/gecko-based-manager-extension/reload-service.js +54 -26
- package/dist/inject-chromium-client-loader.js +146 -22
- package/dist/inject-firefox-client-loader.js +166 -47
- package/dist/minimum-chromium-file.js +25 -0
- package/dist/minimum-content-file.js +5 -0
- package/dist/minimum-firefox-file.js +17 -0
- package/dist/minimum-script-file.js +5 -0
- package/dist/module.d.ts +8 -95
- package/dist/module.js +10703 -128
- package/dist/preview.d.ts +2 -0
- package/dist/rslib.config.d.ts +3 -0
- package/dist/start.d.ts +2 -0
- package/dist/types.d.ts +11 -0
- package/dist/vitest.config.d.mts +2 -0
- package/dist/webpack/dev-server.d.ts +3 -0
- package/dist/webpack/plugin-browsers/browsers-lib/add-progress-bar.d.ts +1 -0
- package/dist/webpack/plugin-browsers/browsers-lib/constants.d.ts +5 -0
- package/dist/webpack/plugin-browsers/browsers-lib/dynamic-extension-manager.d.ts +35 -0
- package/dist/webpack/plugin-browsers/browsers-lib/html-merge.d.ts +1 -0
- package/dist/webpack/plugin-browsers/browsers-lib/instance-manager.d.ts +71 -0
- package/dist/webpack/plugin-browsers/browsers-lib/messages.d.ts +161 -0
- package/dist/webpack/plugin-browsers/browsers-lib/rdp-wire.d.ts +7 -0
- package/dist/webpack/plugin-browsers/browsers-lib/shared-utils.d.ts +16 -0
- package/dist/webpack/plugin-browsers/browsers-types.d.ts +131 -0
- package/dist/webpack/plugin-browsers/index.d.ts +41 -0
- package/dist/webpack/plugin-browsers/run-chromium/browser-config.d.ts +3 -0
- package/dist/webpack/plugin-browsers/run-chromium/create-profile.d.ts +10 -0
- package/dist/webpack/plugin-browsers/run-chromium/index.d.ts +28 -0
- package/dist/webpack/plugin-browsers/run-chromium/master-preferences.d.ts +161 -0
- package/dist/webpack/plugin-browsers/run-chromium/setup-chrome-inspection/cdp-client.d.ts +29 -0
- package/dist/webpack/plugin-browsers/run-chromium/setup-chrome-inspection/index.d.ts +25 -0
- package/dist/webpack/plugin-browsers/run-firefox/firefox/binary-detector.d.ts +15 -0
- package/dist/webpack/plugin-browsers/run-firefox/firefox/browser-config.d.ts +7 -0
- package/dist/webpack/plugin-browsers/run-firefox/firefox/create-profile.d.ts +13 -0
- package/dist/webpack/plugin-browsers/run-firefox/firefox/master-preferences.d.ts +95 -0
- package/dist/webpack/plugin-browsers/run-firefox/index.d.ts +26 -0
- package/dist/webpack/plugin-browsers/run-firefox/remote-firefox/index.d.ts +13 -0
- package/dist/webpack/plugin-browsers/run-firefox/remote-firefox/message-utils.d.ts +2 -0
- package/dist/webpack/plugin-browsers/run-firefox/remote-firefox/messaging-client.d.ts +42 -0
- package/dist/webpack/plugin-browsers/run-firefox/remote-firefox/setup-firefox-inspection.d.ts +31 -0
- package/dist/webpack/plugin-compatibility/feature-browser-specific-fields.d.ts +9 -0
- package/dist/webpack/plugin-compatibility/feature-polyfill.d.ts +12 -0
- package/dist/webpack/plugin-compatibility/index.d.ts +13 -0
- package/dist/webpack/plugin-compilation/clean-dist.d.ts +8 -0
- package/dist/webpack/plugin-compilation/env.d.ts +9 -0
- package/dist/webpack/plugin-compilation/index.d.ts +12 -0
- package/dist/webpack/plugin-css/common-style-loaders.d.ts +8 -0
- package/dist/webpack/plugin-css/css-in-content-script-loader.d.ts +11 -0
- package/dist/webpack/plugin-css/css-in-html-loader.d.ts +8 -0
- package/dist/webpack/plugin-css/css-tools/less.d.ts +4 -0
- package/dist/webpack/plugin-css/css-tools/postcss.d.ts +3 -0
- package/dist/webpack/plugin-css/css-tools/sass.d.ts +4 -0
- package/dist/webpack/plugin-css/css-tools/stylelint.d.ts +4 -0
- package/dist/webpack/plugin-css/css-tools/tailwind.d.ts +2 -0
- package/dist/webpack/plugin-css/index.d.ts +9 -0
- package/dist/webpack/plugin-css/is-content-script.d.ts +1 -0
- package/dist/webpack/plugin-extension/data/manifest-fields/html-fields/action.d.ts +2 -0
- package/dist/webpack/plugin-extension/data/manifest-fields/html-fields/background.d.ts +2 -0
- package/dist/webpack/plugin-extension/data/manifest-fields/html-fields/browser_action.d.ts +2 -0
- package/dist/webpack/plugin-extension/data/manifest-fields/html-fields/chrome_url_overrides.d.ts +2 -0
- package/dist/webpack/plugin-extension/data/manifest-fields/html-fields/devtools_page.d.ts +2 -0
- package/dist/webpack/plugin-extension/data/manifest-fields/html-fields/index.d.ts +2 -0
- package/dist/webpack/plugin-extension/data/manifest-fields/html-fields/options_ui.d.ts +2 -0
- package/dist/webpack/plugin-extension/data/manifest-fields/html-fields/page_action.d.ts +2 -0
- package/dist/webpack/plugin-extension/data/manifest-fields/html-fields/sandbox.d.ts +2 -0
- package/dist/webpack/plugin-extension/data/manifest-fields/html-fields/side_panel.d.ts +2 -0
- package/dist/webpack/plugin-extension/data/manifest-fields/html-fields/sidebar_action.d.ts +2 -0
- package/dist/webpack/plugin-extension/data/manifest-fields/icons-fields/action.d.ts +2 -0
- package/dist/webpack/plugin-extension/data/manifest-fields/icons-fields/browser_action.d.ts +2 -0
- package/dist/webpack/plugin-extension/data/manifest-fields/icons-fields/browser_action.theme_icons.d.ts +2 -0
- package/dist/webpack/plugin-extension/data/manifest-fields/icons-fields/icons.d.ts +2 -0
- package/dist/webpack/plugin-extension/data/manifest-fields/icons-fields/index.d.ts +2 -0
- package/dist/webpack/plugin-extension/data/manifest-fields/icons-fields/normalize.d.ts +6 -0
- package/dist/webpack/plugin-extension/data/manifest-fields/icons-fields/page_action.d.ts +2 -0
- package/dist/webpack/plugin-extension/data/manifest-fields/icons-fields/sidebar_action.d.ts +2 -0
- package/dist/webpack/plugin-extension/data/manifest-fields/index.d.ts +19 -0
- package/dist/webpack/plugin-extension/data/manifest-fields/json-fields/declarative_net_request.d.ts +2 -0
- package/dist/webpack/plugin-extension/data/manifest-fields/json-fields/index.d.ts +2 -0
- package/dist/webpack/plugin-extension/data/manifest-fields/json-fields/storage.d.ts +2 -0
- package/dist/webpack/plugin-extension/data/manifest-fields/locales-fields/index.d.ts +1 -0
- package/dist/webpack/plugin-extension/data/manifest-fields/normalize.d.ts +10 -0
- package/dist/webpack/plugin-extension/data/manifest-fields/scripts-fields/background.d.ts +2 -0
- package/dist/webpack/plugin-extension/data/manifest-fields/scripts-fields/content_scripts.d.ts +2 -0
- package/dist/webpack/plugin-extension/data/manifest-fields/scripts-fields/index.d.ts +2 -0
- package/dist/webpack/plugin-extension/data/manifest-fields/scripts-fields/service_worker.d.ts +2 -0
- package/dist/webpack/plugin-extension/data/manifest-fields/scripts-fields/user_scripts.d.ts +2 -0
- package/dist/webpack/plugin-extension/data/manifest-fields/web-resources-fields/index.d.ts +2 -0
- package/dist/webpack/plugin-extension/data/special-folders/generate-entries.d.ts +4 -0
- package/dist/webpack/plugin-extension/data/special-folders/index.d.ts +12 -0
- package/dist/webpack/plugin-extension/feature-html/__spec__/html-lib/test-utils.d.ts +18 -0
- package/dist/webpack/plugin-extension/feature-html/html-lib/parse-html.d.ts +8 -0
- package/dist/webpack/plugin-extension/feature-html/html-lib/patch-html.d.ts +8 -0
- package/dist/webpack/plugin-extension/feature-html/html-lib/utils.d.ts +18 -0
- package/dist/webpack/plugin-extension/feature-html/index.d.ts +37 -0
- package/dist/webpack/plugin-extension/feature-html/steps/add-assets-to-compilation.d.ts +11 -0
- package/dist/webpack/plugin-extension/feature-html/steps/add-scripts-and-styles-to-compilation.d.ts +10 -0
- package/dist/webpack/plugin-extension/feature-html/steps/add-to-file-dependencies.d.ts +10 -0
- package/dist/webpack/plugin-extension/feature-html/steps/emit-html-file.d.ts +9 -0
- package/dist/webpack/plugin-extension/feature-html/steps/ensure-hmr-for-scripts.d.ts +2 -0
- package/dist/webpack/plugin-extension/feature-html/steps/handle-common-errors.d.ts +10 -0
- package/dist/webpack/plugin-extension/feature-html/steps/minimum-script-file.d.ts +1 -0
- package/dist/webpack/plugin-extension/feature-html/steps/throw-if-recompile-is-needed.d.ts +13 -0
- package/dist/webpack/plugin-extension/feature-html/steps/update-html-file.d.ts +10 -0
- package/dist/webpack/plugin-extension/feature-icons/index.d.ts +25 -0
- package/dist/webpack/plugin-extension/feature-icons/steps/add-to-file-dependencies.d.ts +9 -0
- package/dist/webpack/plugin-extension/feature-icons/steps/emit-file.d.ts +9 -0
- package/dist/webpack/plugin-extension/feature-json/index.d.ts +18 -0
- package/dist/webpack/plugin-extension/feature-locales/get-locales.d.ts +1 -0
- package/dist/webpack/plugin-extension/feature-locales/index.d.ts +13 -0
- package/dist/webpack/plugin-extension/feature-manifest/index.d.ts +23 -0
- package/dist/webpack/plugin-extension/feature-manifest/manifest-overrides/common/background.d.ts +10 -0
- package/dist/webpack/plugin-extension/feature-manifest/manifest-overrides/common/chrome_url_overrides.d.ts +8 -0
- package/dist/webpack/plugin-extension/feature-manifest/manifest-overrides/common/commands.d.ts +16 -0
- package/dist/webpack/plugin-extension/feature-manifest/manifest-overrides/common/content_scripts.d.ts +7 -0
- package/dist/webpack/plugin-extension/feature-manifest/manifest-overrides/common/content_security_policy.d.ts +4 -0
- package/dist/webpack/plugin-extension/feature-manifest/manifest-overrides/common/devtools_page.d.ts +4 -0
- package/dist/webpack/plugin-extension/feature-manifest/manifest-overrides/common/icons.d.ts +6 -0
- package/dist/webpack/plugin-extension/feature-manifest/manifest-overrides/common/index.d.ts +2 -0
- package/dist/webpack/plugin-extension/feature-manifest/manifest-overrides/common/omnibox.d.ts +2 -0
- package/dist/webpack/plugin-extension/feature-manifest/manifest-overrides/common/options_page.d.ts +4 -0
- package/dist/webpack/plugin-extension/feature-manifest/manifest-overrides/common/options_ui.d.ts +8 -0
- package/dist/webpack/plugin-extension/feature-manifest/manifest-overrides/common/page_action.d.ts +8 -0
- package/dist/webpack/plugin-extension/feature-manifest/manifest-overrides/common/permissions.d.ts +4 -0
- package/dist/webpack/plugin-extension/feature-manifest/manifest-overrides/common/sandbox.d.ts +7 -0
- package/dist/webpack/plugin-extension/feature-manifest/manifest-overrides/common/sidebar_action.d.ts +2 -0
- package/dist/webpack/plugin-extension/feature-manifest/manifest-overrides/common/storage.d.ts +6 -0
- package/dist/webpack/plugin-extension/feature-manifest/manifest-overrides/common/theme.d.ts +2 -0
- package/dist/webpack/plugin-extension/feature-manifest/manifest-overrides/common/user_scripts.d.ts +2 -0
- package/dist/webpack/plugin-extension/feature-manifest/manifest-overrides/common/web_accessible_resources.d.ts +9 -0
- package/dist/webpack/plugin-extension/feature-manifest/manifest-overrides/index.d.ts +2 -0
- package/dist/webpack/plugin-extension/feature-manifest/manifest-overrides/mv2/background.d.ts +10 -0
- package/dist/webpack/plugin-extension/feature-manifest/manifest-overrides/mv2/browser_action.d.ts +12 -0
- package/dist/webpack/plugin-extension/feature-manifest/manifest-overrides/mv2/chrome_settings_overrides.d.ts +24 -0
- package/dist/webpack/plugin-extension/feature-manifest/manifest-overrides/mv2/index.d.ts +2 -0
- package/dist/webpack/plugin-extension/feature-manifest/manifest-overrides/mv2/page_action.d.ts +1 -0
- package/dist/webpack/plugin-extension/feature-manifest/manifest-overrides/mv2/sidebar_action.d.ts +1 -0
- package/dist/webpack/plugin-extension/feature-manifest/manifest-overrides/mv2/theme_experiment.d.ts +2 -0
- package/dist/webpack/plugin-extension/feature-manifest/manifest-overrides/mv3/action.d.ts +8 -0
- package/dist/webpack/plugin-extension/feature-manifest/manifest-overrides/mv3/background.d.ts +10 -0
- package/dist/webpack/plugin-extension/feature-manifest/manifest-overrides/mv3/declarative_net_request.d.ts +2 -0
- package/dist/webpack/plugin-extension/feature-manifest/manifest-overrides/mv3/host_permissions.d.ts +2 -0
- package/dist/webpack/plugin-extension/feature-manifest/manifest-overrides/mv3/index.d.ts +2 -0
- package/dist/webpack/plugin-extension/feature-manifest/manifest-overrides/mv3/side_panel.d.ts +2 -0
- package/dist/webpack/plugin-extension/feature-manifest/steps/add-dependencies.d.ts +6 -0
- package/dist/webpack/plugin-extension/feature-manifest/steps/check-manifest-files.d.ts +17 -0
- package/dist/webpack/plugin-extension/feature-manifest/steps/emit-manifest.d.ts +7 -0
- package/dist/webpack/plugin-extension/feature-manifest/steps/throw-if-recompile.d.ts +11 -0
- package/dist/webpack/plugin-extension/feature-manifest/steps/update-manifest.d.ts +9 -0
- package/dist/webpack/plugin-extension/feature-scripts/index.d.ts +27 -0
- package/dist/webpack/plugin-extension/feature-scripts/scripts-lib/utils.d.ts +3 -0
- package/dist/webpack/plugin-extension/feature-scripts/steps/add-content-script-wrapper.d.ts +2 -0
- package/dist/webpack/plugin-extension/feature-scripts/steps/add-hmr-accept-code.d.ts +2 -0
- package/dist/webpack/plugin-extension/feature-scripts/steps/add-public-path-for-main-world.d.ts +11 -0
- package/dist/webpack/plugin-extension/feature-scripts/steps/add-public-path-runtime-module.d.ts +4 -0
- package/dist/webpack/plugin-extension/feature-scripts/steps/add-scripts.d.ts +9 -0
- package/dist/webpack/plugin-extension/feature-scripts/steps/deprecated-shadow-root.d.ts +2 -0
- package/dist/webpack/plugin-extension/feature-scripts/steps/javascript-content-script-wrapper.d.ts +1 -0
- package/dist/webpack/plugin-extension/feature-scripts/steps/preact-content-script-wrapper.d.ts +1 -0
- package/dist/webpack/plugin-extension/feature-scripts/steps/react-content-script-wrapper.d.ts +1 -0
- package/dist/webpack/plugin-extension/feature-scripts/steps/svelte-content-script-wrapper.d.ts +1 -0
- package/dist/webpack/plugin-extension/feature-scripts/steps/typescript-content-script-wrapper.d.ts +1 -0
- package/dist/webpack/plugin-extension/feature-scripts/steps/vue-content-script-wrapper.d.ts +1 -0
- package/dist/webpack/plugin-extension/feature-special-folders/copy-public-folder.d.ts +14 -0
- package/dist/webpack/plugin-extension/feature-special-folders/index.d.ts +19 -0
- package/dist/webpack/plugin-extension/feature-special-folders/warn-upon-folder-changes.d.ts +7 -0
- package/dist/webpack/plugin-extension/feature-web-resources/clean-matches.d.ts +7 -0
- package/dist/webpack/plugin-extension/feature-web-resources/index.d.ts +18 -0
- package/dist/webpack/plugin-extension/index.d.ts +10 -0
- package/dist/webpack/plugin-js-frameworks/index.d.ts +13 -0
- package/dist/webpack/plugin-js-frameworks/js-tools/babel.d.ts +16 -0
- package/dist/webpack/plugin-js-frameworks/js-tools/preact.d.ts +3 -0
- package/dist/webpack/plugin-js-frameworks/js-tools/react.d.ts +3 -0
- package/dist/webpack/plugin-js-frameworks/js-tools/svelte.d.ts +3 -0
- package/dist/webpack/plugin-js-frameworks/js-tools/typescript.d.ts +36 -0
- package/dist/webpack/plugin-js-frameworks/js-tools/vue.d.ts +3 -0
- package/dist/webpack/plugin-js-frameworks/load-loader-options.d.ts +1 -0
- package/dist/webpack/plugin-reload/index.d.ts +13 -0
- package/dist/webpack/plugin-reload/reload-lib/messages.d.ts +106 -0
- package/dist/webpack/plugin-reload/reload-types.d.ts +14 -0
- package/dist/webpack/plugin-reload/start-server.d.ts +4 -0
- package/dist/webpack/plugin-reload/steps/create-web-socket-server/index.d.ts +14 -0
- package/dist/webpack/plugin-reload/steps/create-web-socket-server/web-socket-server/broadcast-message.d.ts +2 -0
- package/dist/webpack/plugin-reload/steps/create-web-socket-server/web-socket-server/message-dispatcher.d.ts +2 -0
- package/dist/webpack/plugin-reload/steps/create-web-socket-server/web-socket-server/servers.d.ts +2 -0
- package/dist/webpack/plugin-reload/steps/setup-chromium-reload-client/index.d.ts +3 -0
- package/dist/webpack/plugin-reload/steps/setup-chromium-reload-client/inject-chromium-client-loader.d.ts +9 -0
- package/dist/webpack/plugin-reload/steps/setup-chromium-reload-client/minimum-chromium-file.d.ts +0 -0
- package/dist/webpack/plugin-reload/steps/setup-firefox-reload-client/index.d.ts +3 -0
- package/dist/webpack/plugin-reload/steps/setup-firefox-reload-client/inject-firefox-client-loader.d.ts +9 -0
- package/dist/webpack/plugin-reload/steps/setup-firefox-reload-client/minimum-firefox-file.d.ts +0 -0
- package/dist/webpack/plugin-reload/steps/setup-reload-strategy/apply-manifest-dev-defaults/index.d.ts +9 -0
- package/dist/webpack/plugin-reload/steps/setup-reload-strategy/apply-manifest-dev-defaults/patch-background.d.ts +15 -0
- package/dist/webpack/plugin-reload/steps/setup-reload-strategy/apply-manifest-dev-defaults/patch-csp.d.ts +5 -0
- package/dist/webpack/plugin-reload/steps/setup-reload-strategy/apply-manifest-dev-defaults/patch-externally-connectable.d.ts +10 -0
- package/dist/webpack/plugin-reload/steps/setup-reload-strategy/apply-manifest-dev-defaults/patch-web-resources.d.ts +10 -0
- package/dist/webpack/plugin-reload/steps/setup-reload-strategy/generate-manager-extension.d.ts +15 -0
- package/dist/webpack/plugin-reload/steps/setup-reload-strategy/index.d.ts +10 -0
- package/dist/webpack/plugin-reload/steps/setup-reload-strategy/target-web-extension-plugin/index.d.ts +13 -0
- package/dist/webpack/plugin-static-assets/index.d.ts +12 -0
- package/dist/webpack/webpack-config.d.ts +14 -0
- package/dist/webpack/webpack-lib/auto-exit.d.ts +1 -0
- package/dist/webpack/webpack-lib/constants.d.ts +4 -0
- package/dist/webpack/webpack-lib/messages.d.ts +121 -0
- package/dist/webpack/webpack-lib/port-manager.d.ts +27 -0
- package/dist/webpack/webpack-lib/utils.d.ts +23 -0
- package/dist/webpack/webpack-types.d.ts +49 -0
- package/package.json +64 -29
- package/dist/depreacated-shadow-root.js +0 -34
- package/dist/inject-content-css-during-dev.js +0 -10
- package/dist/minimum-chromium-file.mjs +0 -1
- package/dist/minimum-content-file.mjs +0 -1
- package/dist/minimum-firefox-file.mjs +0 -1
- package/dist/resolver-loader.js +0 -1
- package/dist/resolver-module.mjs +0 -1
- package/dist/tailwind.config.js +0 -25
- /package/dist/{minimum-script-file.mjs → webpack/plugin-extension/feature-scripts/steps/minimum-content-file.d.ts} +0 -0
|
@@ -1,4 +1,96 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.n = (module)=>{
|
|
5
|
+
var getter = module && module.__esModule ? ()=>module['default'] : ()=>module;
|
|
6
|
+
__webpack_require__.d(getter, {
|
|
7
|
+
a: getter
|
|
8
|
+
});
|
|
9
|
+
return getter;
|
|
10
|
+
};
|
|
11
|
+
})();
|
|
12
|
+
(()=>{
|
|
13
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
14
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: definition[key]
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
})();
|
|
20
|
+
(()=>{
|
|
21
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
22
|
+
})();
|
|
23
|
+
(()=>{
|
|
24
|
+
__webpack_require__.r = (exports1)=>{
|
|
25
|
+
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
26
|
+
value: 'Module'
|
|
27
|
+
});
|
|
28
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
29
|
+
value: true
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
})();
|
|
33
|
+
var __webpack_exports__ = {};
|
|
34
|
+
__webpack_require__.r(__webpack_exports__);
|
|
35
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
36
|
+
default: ()=>add_hmr_accept_code
|
|
37
|
+
});
|
|
38
|
+
const external_fs_namespaceObject = require("fs");
|
|
39
|
+
var external_fs_default = /*#__PURE__*/ __webpack_require__.n(external_fs_namespaceObject);
|
|
40
|
+
const external_path_namespaceObject = require("path");
|
|
41
|
+
var external_path_default = /*#__PURE__*/ __webpack_require__.n(external_path_namespaceObject);
|
|
42
|
+
const external_loader_utils_namespaceObject = require("loader-utils");
|
|
43
|
+
const external_schema_utils_namespaceObject = require("schema-utils");
|
|
44
|
+
const schema = {
|
|
45
|
+
type: 'object',
|
|
46
|
+
properties: {
|
|
47
|
+
test: {
|
|
48
|
+
type: 'string'
|
|
49
|
+
},
|
|
50
|
+
manifestPath: {
|
|
51
|
+
type: 'string'
|
|
52
|
+
},
|
|
53
|
+
mode: {
|
|
54
|
+
type: 'string'
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
function add_hmr_accept_code(source) {
|
|
59
|
+
const options = this.getOptions();
|
|
60
|
+
const manifestPath = options.manifestPath;
|
|
61
|
+
const projectPath = external_path_default().dirname(manifestPath);
|
|
62
|
+
const manifest = JSON.parse(external_fs_default().readFileSync(manifestPath, 'utf-8'));
|
|
63
|
+
(0, external_schema_utils_namespaceObject.validate)(schema, options, {
|
|
64
|
+
name: "scripts:add-hmr-accept-code",
|
|
65
|
+
baseDataPath: 'options'
|
|
66
|
+
});
|
|
67
|
+
const url = (0, external_loader_utils_namespaceObject.urlToRequest)(this.resourcePath);
|
|
68
|
+
const reloadCode = `
|
|
2
69
|
// TODO: cezaraugusto re-visit this
|
|
3
|
-
|
|
4
|
-
`;
|
|
70
|
+
if (import.meta.webpackHot) { import.meta.webpackHot.accept() };
|
|
71
|
+
`;
|
|
72
|
+
if (manifest.background) {
|
|
73
|
+
if (manifest.background.scripts) for (const bgScript of manifest.background.scripts){
|
|
74
|
+
const absoluteUrl = external_path_default().resolve(projectPath, bgScript);
|
|
75
|
+
if (url.includes(absoluteUrl)) return `${reloadCode}${source}`;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
if (manifest.content_scripts) {
|
|
79
|
+
for (const contentScript of manifest.content_scripts)if (contentScript.js) for (const js of contentScript.js){
|
|
80
|
+
const absoluteUrl = external_path_default().resolve(projectPath, js);
|
|
81
|
+
if (url.includes(absoluteUrl)) return `${reloadCode}${source}`;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
if (manifest.user_scripts) for (const userScript of manifest.user_scripts){
|
|
85
|
+
const absoluteUrl = external_path_default().resolve(projectPath, userScript);
|
|
86
|
+
if (url.includes(absoluteUrl)) return `${reloadCode}${source}`;
|
|
87
|
+
}
|
|
88
|
+
return source;
|
|
89
|
+
}
|
|
90
|
+
exports["default"] = __webpack_exports__["default"];
|
|
91
|
+
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
92
|
+
"default"
|
|
93
|
+
].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
94
|
+
Object.defineProperty(exports, '__esModule', {
|
|
95
|
+
value: true
|
|
96
|
+
});
|
package/dist/build.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function cleanupCommand(): Promise<void>;
|
|
@@ -1,16 +1,96 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.n = (module)=>{
|
|
5
|
+
var getter = module && module.__esModule ? ()=>module['default'] : ()=>module;
|
|
6
|
+
__webpack_require__.d(getter, {
|
|
7
|
+
a: getter
|
|
8
|
+
});
|
|
9
|
+
return getter;
|
|
10
|
+
};
|
|
11
|
+
})();
|
|
12
|
+
(()=>{
|
|
13
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
14
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: definition[key]
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
})();
|
|
20
|
+
(()=>{
|
|
21
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
22
|
+
})();
|
|
23
|
+
(()=>{
|
|
24
|
+
__webpack_require__.r = (exports1)=>{
|
|
25
|
+
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
26
|
+
value: 'Module'
|
|
27
|
+
});
|
|
28
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
29
|
+
value: true
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
})();
|
|
33
|
+
var __webpack_exports__ = {};
|
|
34
|
+
__webpack_require__.r(__webpack_exports__);
|
|
35
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
36
|
+
default: ()=>deprecated_shadow_root
|
|
37
|
+
});
|
|
38
|
+
const external_path_namespaceObject = require("path");
|
|
39
|
+
const external_fs_namespaceObject = require("fs");
|
|
40
|
+
const external_loader_utils_namespaceObject = require("loader-utils");
|
|
41
|
+
const external_schema_utils_namespaceObject = require("schema-utils");
|
|
42
|
+
const external_pintor_namespaceObject = require("pintor");
|
|
43
|
+
var external_pintor_default = /*#__PURE__*/ __webpack_require__.n(external_pintor_namespaceObject);
|
|
44
|
+
external_path_namespaceObject.join(process.cwd(), 'node_modules/extension-develop/dist/certs');
|
|
45
|
+
const CHROMIUM_BASED_BROWSERS = [
|
|
46
|
+
'chrome',
|
|
47
|
+
'edge'
|
|
48
|
+
];
|
|
49
|
+
const GECKO_BASED_BROWSERS = [
|
|
50
|
+
'firefox'
|
|
51
|
+
];
|
|
52
|
+
[
|
|
53
|
+
...CHROMIUM_BASED_BROWSERS,
|
|
54
|
+
...GECKO_BASED_BROWSERS
|
|
55
|
+
];
|
|
56
|
+
function getLoggingPrefix(feature, type) {
|
|
57
|
+
if ('error' === type) return `${external_pintor_default().red('ERROR')} ${feature}`;
|
|
58
|
+
if ('warn' === type) return `${external_pintor_default().brightYellow("\u25BA\u25BA\u25BA")} ${feature}`;
|
|
59
|
+
const arrow = 'info' === type ? external_pintor_default().blue("\u25BA\u25BA\u25BA") : external_pintor_default().green("\u25BA\u25BA\u25BA");
|
|
60
|
+
return `${arrow} ${feature}`;
|
|
61
|
+
}
|
|
62
|
+
function deprecatedShadowRoot() {
|
|
63
|
+
return `${getLoggingPrefix('DEPRECATION', 'warn')} Using ${external_pintor_default().yellow('window.__EXTENSION_SHADOW_ROOT__')} in content_scripts is deprecated\nand will be removed in a future version of Extension.js. To use content_scripts with\nthe shadow DOM, see one of the many examples at:\nhttps://github.com/extension-js/extension.js/tree/main/examples\n\nIf you really need to use the shadow DOM as-is, the latest version of Extension.js\nto support it is ${external_pintor_default().gray('extension@2.0.0-beta.9')}.\n`;
|
|
64
|
+
}
|
|
65
|
+
const schema = {
|
|
66
|
+
type: 'object',
|
|
67
|
+
properties: {
|
|
68
|
+
test: {
|
|
69
|
+
type: 'string'
|
|
70
|
+
},
|
|
71
|
+
manifestPath: {
|
|
72
|
+
type: 'string'
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
function deprecated_shadow_root(source) {
|
|
77
|
+
const options = this.getOptions();
|
|
78
|
+
const manifestPath = options.manifestPath;
|
|
79
|
+
const projectPath = external_path_namespaceObject.dirname(manifestPath);
|
|
80
|
+
const manifest = JSON.parse(external_fs_namespaceObject.readFileSync(manifestPath, 'utf8'));
|
|
81
|
+
(0, external_schema_utils_namespaceObject.validate)(schema, options, {
|
|
82
|
+
name: "scripts:deprecated-shadow-root",
|
|
83
|
+
baseDataPath: 'options'
|
|
84
|
+
});
|
|
85
|
+
const url = (0, external_loader_utils_namespaceObject.urlToRequest)(this.resourcePath);
|
|
86
|
+
const patchCssTag = `
|
|
87
|
+
;const appendStyleElementForLegacyShadowRoot = (legacyShadowRoot, stylesheets) => {
|
|
88
|
+
if (typeof chrome !== 'undefined' || typeof browser !== 'undefined') {
|
|
89
|
+
const styleElement = document.createElement('link')
|
|
90
|
+
styleElement.rel = 'stylesheet'
|
|
91
|
+
styleElement.href = (typeof chrome !== 'undefined' ? chrome : browser).runtime.getURL('content_scripts/content-0.css')
|
|
92
|
+
legacyShadowRoot.appendChild(styleElement)
|
|
93
|
+
}
|
|
14
94
|
}
|
|
15
95
|
|
|
16
96
|
function injectStyles() {
|
|
@@ -31,4 +111,25 @@ function injectStyles() {
|
|
|
31
111
|
|
|
32
112
|
observer.observe(document.body, { childList: true, subtree: true })
|
|
33
113
|
}
|
|
34
|
-
};injectStyles();`;
|
|
114
|
+
};injectStyles();`;
|
|
115
|
+
if (manifest.content_scripts) {
|
|
116
|
+
for (const contentScript of manifest.content_scripts)if (contentScript.js) for (const js of contentScript.js){
|
|
117
|
+
const absoluteUrl = external_path_namespaceObject.resolve(projectPath, js);
|
|
118
|
+
if (url.includes(absoluteUrl)) {
|
|
119
|
+
if (source.includes('__EXTENSION_SHADOW_ROOT__')) {
|
|
120
|
+
if ('development' === process.env.EXTENSION_ENV) console.warn(deprecatedShadowRoot());
|
|
121
|
+
return `${patchCssTag}${source}`;
|
|
122
|
+
}
|
|
123
|
+
return `${source}`;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
return source;
|
|
128
|
+
}
|
|
129
|
+
exports["default"] = __webpack_exports__["default"];
|
|
130
|
+
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
131
|
+
"default"
|
|
132
|
+
].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
133
|
+
Object.defineProperty(exports, '__esModule', {
|
|
134
|
+
value: true
|
|
135
|
+
});
|
package/dist/dev.d.ts
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { Configuration } from '@rspack/core';
|
|
2
|
+
export type BrowserType = 'chrome' | 'edge' | 'firefox' | 'chromium-based' | 'gecko-based';
|
|
3
|
+
export interface BrowserOptionsBase {
|
|
4
|
+
open?: boolean;
|
|
5
|
+
profile?: string | false;
|
|
6
|
+
startingUrl?: string;
|
|
7
|
+
browser: BrowserType;
|
|
8
|
+
}
|
|
9
|
+
export interface ChromiumOptions extends BrowserOptionsBase {
|
|
10
|
+
browser: 'chromium-based';
|
|
11
|
+
chromiumBinary?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface GeckoOptions extends BrowserOptionsBase {
|
|
14
|
+
browser: 'gecko-based';
|
|
15
|
+
geckoBinary?: string;
|
|
16
|
+
}
|
|
17
|
+
export interface NonBinaryOptions extends BrowserOptionsBase {
|
|
18
|
+
browser: Exclude<BrowserType, 'chromium-based' | 'gecko-based'>;
|
|
19
|
+
}
|
|
20
|
+
export type ExtendedBrowserOptions = ChromiumOptions | GeckoOptions | NonBinaryOptions;
|
|
21
|
+
export interface DevOptions extends BrowserOptionsBase {
|
|
22
|
+
mode: 'development' | 'production' | 'none';
|
|
23
|
+
polyfill?: boolean;
|
|
24
|
+
port?: string | number | undefined;
|
|
25
|
+
chromiumBinary?: ChromiumOptions['chromiumBinary'];
|
|
26
|
+
geckoBinary?: GeckoOptions['geckoBinary'];
|
|
27
|
+
source?: string;
|
|
28
|
+
watchSource?: boolean;
|
|
29
|
+
}
|
|
30
|
+
export interface BuildOptions {
|
|
31
|
+
browser: BrowserOptionsBase['browser'];
|
|
32
|
+
zipFilename?: string;
|
|
33
|
+
zip?: boolean;
|
|
34
|
+
zipSource?: boolean;
|
|
35
|
+
polyfill?: boolean;
|
|
36
|
+
silent?: boolean;
|
|
37
|
+
}
|
|
38
|
+
export interface PreviewOptions extends BrowserOptionsBase {
|
|
39
|
+
mode: 'production';
|
|
40
|
+
outputPath?: string;
|
|
41
|
+
chromiumBinary?: ChromiumOptions['chromiumBinary'];
|
|
42
|
+
geckoBinary?: GeckoOptions['geckoBinary'];
|
|
43
|
+
}
|
|
44
|
+
export interface StartOptions extends BrowserOptionsBase {
|
|
45
|
+
mode: 'production';
|
|
46
|
+
polyfill?: boolean;
|
|
47
|
+
chromiumBinary?: ChromiumOptions['chromiumBinary'];
|
|
48
|
+
geckoBinary?: GeckoOptions['geckoBinary'];
|
|
49
|
+
}
|
|
50
|
+
export interface BrowserConfig extends BrowserOptionsBase {
|
|
51
|
+
browserFlags?: string[];
|
|
52
|
+
excludeBrowserFlags?: string[];
|
|
53
|
+
preferences?: Record<string, unknown>;
|
|
54
|
+
chromiumBinary?: ChromiumOptions['chromiumBinary'];
|
|
55
|
+
geckoBinary?: GeckoOptions['geckoBinary'];
|
|
56
|
+
reuseProfile?: boolean;
|
|
57
|
+
}
|
|
58
|
+
export interface FileConfig {
|
|
59
|
+
browser?: {
|
|
60
|
+
chrome?: BrowserConfig;
|
|
61
|
+
firefox?: BrowserConfig;
|
|
62
|
+
edge?: BrowserConfig;
|
|
63
|
+
'chromium-based'?: BrowserConfig;
|
|
64
|
+
'gecko-based'?: BrowserConfig;
|
|
65
|
+
};
|
|
66
|
+
commands?: {
|
|
67
|
+
dev?: Pick<DevOptions, 'browser' | 'profile' | 'chromiumBinary' | 'geckoBinary' | 'open' | 'polyfill'> & {
|
|
68
|
+
browserFlags?: string[];
|
|
69
|
+
excludeBrowserFlags?: string[];
|
|
70
|
+
preferences?: Record<string, unknown>;
|
|
71
|
+
};
|
|
72
|
+
start?: Pick<StartOptions, 'browser' | 'profile' | 'chromiumBinary' | 'geckoBinary' | 'polyfill'> & {
|
|
73
|
+
browserFlags?: string[];
|
|
74
|
+
excludeBrowserFlags?: string[];
|
|
75
|
+
preferences?: Record<string, unknown>;
|
|
76
|
+
};
|
|
77
|
+
preview?: Pick<PreviewOptions, 'browser' | 'profile' | 'chromiumBinary' | 'geckoBinary'> & {
|
|
78
|
+
browserFlags?: string[];
|
|
79
|
+
excludeBrowserFlags?: string[];
|
|
80
|
+
preferences?: Record<string, unknown>;
|
|
81
|
+
};
|
|
82
|
+
build?: Pick<BuildOptions, 'browser' | 'zipFilename' | 'zip' | 'zipSource' | 'polyfill'>;
|
|
83
|
+
};
|
|
84
|
+
config?: (config: Configuration) => Configuration;
|
|
85
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function downloadAndExtractZip(url: string, targetPath: string): Promise<string>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function generateExtensionTypes(projectPath: string): Promise<void>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Configuration } from '@rspack/core';
|
|
2
|
+
import { BrowserConfig, DevOptions } from './config-types';
|
|
3
|
+
export declare function loadCustomWebpackConfig(projectPath: string): Promise<(config: Configuration) => Configuration>;
|
|
4
|
+
export declare function loadCommandConfig(projectPath: string, command: 'dev' | 'build' | 'start' | 'preview'): Promise<{}>;
|
|
5
|
+
export declare function loadBrowserConfig(projectPath: string, browser?: DevOptions['browser']): Promise<BrowserConfig>;
|
|
6
|
+
export declare function isUsingExperimentalConfig(projectPath: string): Promise<boolean>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export interface ProjectStructure {
|
|
2
|
+
manifestPath: string;
|
|
3
|
+
packageJsonPath: string;
|
|
4
|
+
}
|
|
5
|
+
export declare function getProjectPath(pathOrRemoteUrl: string | undefined): Promise<string>;
|
|
6
|
+
export declare function getProjectStructure(pathOrRemoteUrl: string | undefined): Promise<ProjectStructure>;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Manifest } from '../webpack/webpack-types';
|
|
2
|
+
import { type DevOptions } from './config-types';
|
|
3
|
+
export declare function manifestNotFoundError(manifestPath: string): string;
|
|
4
|
+
export declare function packageJsonNotFoundError(manifestPath: string): string;
|
|
5
|
+
export declare function building(browser: DevOptions['browser']): string;
|
|
6
|
+
export declare function runningInProduction(outputPath: string): string;
|
|
7
|
+
export declare function ready(mode: DevOptions['mode'], browser: DevOptions['browser']): string;
|
|
8
|
+
export declare function previewing(browser: DevOptions['browser']): string;
|
|
9
|
+
export declare function previewWebpack(): string;
|
|
10
|
+
export declare function buildWebpack(projectDir: string, stats: any, browser: DevOptions['browser']): string;
|
|
11
|
+
export declare function buildSuccess(): string;
|
|
12
|
+
export declare function fetchingProjectPath(owner: string, project: string): string;
|
|
13
|
+
export declare function downloadingProjectPath(projectName: string): string;
|
|
14
|
+
export declare function creatingProjectPath(projectPath: string): string;
|
|
15
|
+
export declare function noGitIgnoreFound(projectDir: string): string;
|
|
16
|
+
export declare function packagingSourceFiles(zipPath: string): string;
|
|
17
|
+
export declare function packagingDistributionFiles(zipPath: string): string;
|
|
18
|
+
export declare function treeWithSourceAndDistFiles(browser: DevOptions['browser'], name: string, sourceZip: string, destZip: string): string;
|
|
19
|
+
export declare function treeWithDistFilesbrowser(name: string, ext: string, browser: DevOptions['browser'], zipPath: string): string;
|
|
20
|
+
export declare function treeWithSourceFiles(name: string, ext: string, browser: DevOptions['browser'], zipPath: string): string;
|
|
21
|
+
export declare function failedToCompressError(error: any): string;
|
|
22
|
+
export declare function writingTypeDefinitions(manifest: Manifest): string;
|
|
23
|
+
export declare function writingTypeDefinitionsError(error: any): string;
|
|
24
|
+
export declare function downloadingText(url: string): string;
|
|
25
|
+
export declare function unpackagingExtension(zipFilePath: string): string;
|
|
26
|
+
export declare function unpackagedSuccessfully(): string;
|
|
27
|
+
export declare function failedToDownloadOrExtractZIPFileError(error: any): string;
|
|
28
|
+
export declare function isUsingExperimentalConfig(integration: any): string;
|
|
29
|
+
export declare function installingDependencies(): string;
|
|
30
|
+
export declare function installingDependenciesFailed(gitCommand: string, gitArgs: string[], code: number | null): string;
|
|
31
|
+
export declare function installingDependenciesProcessError(error: any): string;
|
|
32
|
+
export declare function cantInstallDependencies(error: any): string;
|
|
33
|
+
export declare function portInUse(requestedPort: number, newPort: number): string;
|
|
34
|
+
export declare function configLoadingError(configPath: string, error: unknown): string;
|
|
35
|
+
export declare function managedDependencyConflict(duplicates: string[], userPackageJsonPath: string): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function assertNoManagedDependencyConflicts(userPackageJsonPath: string, projectPath: string): void;
|
|
@@ -1,3 +1,74 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
5
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: definition[key]
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
})();
|
|
11
|
+
(()=>{
|
|
12
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
13
|
+
})();
|
|
14
|
+
(()=>{
|
|
15
|
+
__webpack_require__.r = (exports1)=>{
|
|
16
|
+
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
|
+
value: 'Module'
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
20
|
+
value: true
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
})();
|
|
24
|
+
var __webpack_exports__ = {};
|
|
25
|
+
__webpack_require__.r(__webpack_exports__);
|
|
26
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
+
default: ()=>ensureHMRForScripts
|
|
28
|
+
});
|
|
29
|
+
const external_path_namespaceObject = require("path");
|
|
30
|
+
const external_loader_utils_namespaceObject = require("loader-utils");
|
|
31
|
+
const external_schema_utils_namespaceObject = require("schema-utils");
|
|
32
|
+
const schema = {
|
|
33
|
+
type: 'object',
|
|
34
|
+
properties: {
|
|
35
|
+
test: {
|
|
36
|
+
type: 'string'
|
|
37
|
+
},
|
|
38
|
+
manifestPath: {
|
|
39
|
+
type: 'string'
|
|
40
|
+
},
|
|
41
|
+
includeList: {
|
|
42
|
+
type: 'object'
|
|
43
|
+
},
|
|
44
|
+
excludeList: {
|
|
45
|
+
type: 'object'
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
function ensureHMRForScripts(source) {
|
|
50
|
+
const options = this.getOptions();
|
|
51
|
+
const manifestPath = options.manifestPath;
|
|
52
|
+
external_path_namespaceObject.dirname(manifestPath);
|
|
53
|
+
try {
|
|
54
|
+
(0, external_schema_utils_namespaceObject.validate)(schema, options, {
|
|
55
|
+
name: "html:ensure-hmr-for-scripts",
|
|
56
|
+
baseDataPath: 'options'
|
|
57
|
+
});
|
|
58
|
+
} catch (error) {
|
|
59
|
+
throw error;
|
|
60
|
+
}
|
|
61
|
+
const resourcePath = this.resourcePath || '';
|
|
62
|
+
(0, external_loader_utils_namespaceObject.urlToRequest)(resourcePath);
|
|
63
|
+
const reloadCode = `
|
|
64
|
+
if (import.meta.webpackHot) { import.meta.webpackHot.accept() }
|
|
65
|
+
`;
|
|
66
|
+
return `${reloadCode}${source}`;
|
|
67
|
+
}
|
|
68
|
+
exports["default"] = __webpack_exports__["default"];
|
|
69
|
+
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
70
|
+
"default"
|
|
71
|
+
].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
72
|
+
Object.defineProperty(exports, '__esModule', {
|
|
73
|
+
value: true
|
|
74
|
+
});
|
|
@@ -2,7 +2,7 @@ import {createExtensionsPageTab, handleFirstRun} from './define-initial-tab.js'
|
|
|
2
2
|
import {connect, disconnect, keepAlive} from './reload-service.js'
|
|
3
3
|
|
|
4
4
|
function bgGreen(str) {
|
|
5
|
-
return `background:
|
|
5
|
+
return `background: transparent; color: #0971fe; ${str}`
|
|
6
6
|
}
|
|
7
7
|
chrome.tabs.query({active: true}, async ([initialTab]) => {
|
|
8
8
|
console.log(
|
|
@@ -60,7 +60,17 @@ export async function handleFirstRun() {
|
|
|
60
60
|
return
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
|
|
63
|
+
// Guard against opening multiple welcome pages
|
|
64
|
+
chrome.tabs.query(
|
|
65
|
+
{url: chrome.runtime.getURL('pages/welcome.html')},
|
|
66
|
+
(tabs) => {
|
|
67
|
+
if (Array.isArray(tabs) && tabs.length > 0) {
|
|
68
|
+
// Already open; do not create another
|
|
69
|
+
return
|
|
70
|
+
}
|
|
71
|
+
chrome.tabs.create({url: 'pages/welcome.html'})
|
|
72
|
+
}
|
|
73
|
+
)
|
|
64
74
|
// Ensure the welcome page shows only once per extension installation
|
|
65
75
|
chrome.storage.local.set({[devExtension.id]: {didRun: true}})
|
|
66
76
|
})
|
|
Binary file
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "Extension
|
|
3
|
-
"description": "Extension.js developer tools for
|
|
4
|
-
"version": "1.0",
|
|
2
|
+
"name": "Extension.js DevTools",
|
|
3
|
+
"description": "Extension.js built-in developer tools for browser instance ID __INSTANCE_ID__",
|
|
4
|
+
"version": "1.0.0",
|
|
5
5
|
"manifest_version": 3,
|
|
6
6
|
"key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAolEJq/DBHxY5dBpOqBRWNCl7vRPBvJPlpEzF19fYFVzzaH44AF6+sKjN3jwIKlsgI82F3TIuwoNFiN1yBu5Unf8SVBE4BTO92P02/ACcGYQxicgCLFUGQKlq4uSrwSPaBYl7FHcYl5SERgxnIGCGnaGMdL2vC7waCj2/U/iKoBF9I1lBH9/aKCSjTd3h2UYo7gg6n5nY/ENbzylDt42T3ATmvnVJfYhSNKA9Dv/zryknfnHYYgBKHtz7pDZwWnYdxs78n2VEKwGj7TgbXuIPDpCkrMnU9PTKpHbXFYARA4H9qYORQmYazfIxUZRnKQNSR+GAOGrb8JK+ijeQdwzDAwIDAQAB",
|
|
7
7
|
"background": {
|
|
@@ -3,10 +3,7 @@
|
|
|
3
3
|
<head>
|
|
4
4
|
<title>Welcome!</title>
|
|
5
5
|
<meta charset="UTF-8" />
|
|
6
|
-
<link
|
|
7
|
-
rel="icon"
|
|
8
|
-
href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>🧩</text></svg>"
|
|
9
|
-
/>
|
|
6
|
+
<link rel="icon" type="image/png" href="../images/logo.png" />
|
|
10
7
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
11
8
|
<link rel="stylesheet" href="./sakura.css" media="screen" />
|
|
12
9
|
<link
|
|
@@ -37,8 +34,8 @@
|
|
|
37
34
|
<a target="_blank" href="https://github.com/cezaraugusto/extension"
|
|
38
35
|
>🧩 Extension.js</a
|
|
39
36
|
>
|
|
40
|
-
is a development
|
|
41
|
-
|
|
37
|
+
is a development toolkit for building cross-browser extensions with
|
|
38
|
+
modern web technologies.
|
|
42
39
|
</p>
|
|
43
40
|
<button id="learnMore">
|
|
44
41
|
🧩 Learn more about developing cross-browser extensions
|