extension-develop 4.0.15 → 4.0.16

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.
Files changed (26) hide show
  1. package/README.md +4 -4
  2. package/dist/0~rspack-config.mjs +36 -16
  3. package/dist/101.mjs +33 -4
  4. package/dist/839.mjs +66 -5
  5. package/dist/extension-js-devtools/chrome/content_scripts/content-0.js +2 -2
  6. package/dist/extension-js-devtools/chrome/pages/centralized-logger.css +1 -1
  7. package/dist/extension-js-devtools/chrome/pages/welcome.css +1 -1
  8. package/dist/extension-js-devtools/chrome/pages/welcome.js +3 -3
  9. package/dist/extension-js-devtools/chromium/content_scripts/content-0.js +2 -2
  10. package/dist/extension-js-devtools/chromium/pages/centralized-logger.css +1 -1
  11. package/dist/extension-js-devtools/chromium/pages/welcome.css +1 -1
  12. package/dist/extension-js-devtools/chromium/pages/welcome.js +3 -3
  13. package/dist/extension-js-devtools/edge/content_scripts/content-0.js +2 -2
  14. package/dist/extension-js-devtools/edge/pages/centralized-logger.css +1 -1
  15. package/dist/extension-js-devtools/edge/pages/welcome.css +1 -1
  16. package/dist/extension-js-devtools/edge/pages/welcome.js +3 -3
  17. package/dist/extension-js-devtools/firefox/content_scripts/content-0.js +2 -2
  18. package/dist/extension-js-devtools/firefox/pages/centralized-logger.css +1 -1
  19. package/dist/extension-js-devtools/firefox/pages/welcome.css +1 -1
  20. package/dist/extension-js-devtools/firefox/pages/welcome.js +3 -3
  21. package/dist/lib/manifest-utils.d.ts +2 -0
  22. package/dist/lib/messages.d.ts +3 -0
  23. package/dist/plugin-browsers/index.d.ts +18 -0
  24. package/dist/plugin-web-extension/feature-icons/messages.d.ts +2 -0
  25. package/dist/plugin-web-extension/feature-json/messages.d.ts +1 -0
  26. package/package.json +2 -2
@@ -1,2 +1,4 @@
1
1
  import type { DevOptions, Manifest } from '../types';
2
2
  export declare function filterKeysForThisBrowser(manifest: Manifest, browser: DevOptions['browser']): Manifest;
3
+ export declare function isStaticTheme(manifest: Manifest | undefined | null): boolean;
4
+ export declare function isStaticThemeSource(manifestPath: string | undefined, browser: DevOptions['browser'] | string | undefined): boolean;
@@ -17,6 +17,9 @@ export declare function manifestNotFoundError(manifestPath: string, candidates?:
17
17
  export declare function building(browser: DevOptions['browser']): string;
18
18
  export declare function previewing(browser: DevOptions['browser']): string;
19
19
  export declare function previewSkippedNoBrowser(browser: DevOptions['browser']): string;
20
+ export declare function extensionLoadRecovered(): string;
21
+ export declare function extensionLoadStillRefused(reason: string): string;
22
+ export declare function browserLaunchFailed(browser: DevOptions['browser'], reason: string): string;
20
23
  export declare function authorInstallNotice(target: string): string;
21
24
  export declare function projectInstallFallbackToNpm(pmName: string): string;
22
25
  export declare function projectInstallScriptsDisabled(pmName: string): string;
@@ -59,6 +59,11 @@ export interface BrowserLogSinkEvent {
59
59
  timestamp?: number;
60
60
  }
61
61
  export type BrowserLogSink = (event: BrowserLogSinkEvent) => void;
62
+ export interface ExtensionLoadRetryResult {
63
+ status: 'loaded' | 'refused' | 'unknown';
64
+ reason?: string;
65
+ extensionId?: string;
66
+ }
62
67
  export interface BrowserController {
63
68
  enableUnifiedLogging(opts: {
64
69
  level?: string;
@@ -69,6 +74,10 @@ export interface BrowserController {
69
74
  urlFilter?: string;
70
75
  tabFilter?: number | string;
71
76
  }): Promise<void>;
77
+ /** The browser's refusal reason for this session, or null when it loaded. */
78
+ getExtensionLoadRefusal?(): string | null;
79
+ /** Re-offer the current dist. Only ever called while the session is refused. */
80
+ retryExtensionLoad?(): Promise<ExtensionLoadRetryResult>;
72
81
  }
73
82
  export type BrowserLauncherFn = (opts: BrowserLaunchOptions) => Promise<BrowserController>;
74
83
  export interface RunnerPlugin {
@@ -109,6 +118,7 @@ export declare class BrowsersPlugin implements RunnerPlugin {
109
118
  private controller;
110
119
  private reloadBroker;
111
120
  private logSink;
121
+ private lastReportedRefusal;
112
122
  constructor(options: BrowsersPluginOptions);
113
123
  /**
114
124
  * The dev server injects the control-bridge broker so a launched
@@ -117,5 +127,13 @@ export declare class BrowsersPlugin implements RunnerPlugin {
117
127
  */
118
128
  setReloadBroker(broker: ReloadBroker): void;
119
129
  setLogSink(sink: BrowserLogSink): void;
130
+ /**
131
+ * Re-offer the dist to a browser that refused it at launch. Returns true
132
+ * when the browser has now accepted it, so the caller skips the reload.
133
+ *
134
+ * Only ever runs while the session is refused: re-asking a healthy browser
135
+ * would restart the guest and destroy its HMR state.
136
+ */
137
+ private retryRefusedExtensionLoad;
120
138
  apply(compiler: Compiler): void;
121
139
  }
@@ -1,6 +1,8 @@
1
1
  export declare function iconsMissingFile(manifestField: string, filePath: string, opts?: {
2
2
  publicRootHint?: boolean;
3
+ fatal?: boolean;
3
4
  }): string;
5
+ export declare function themeImageIsEmpty(manifestField: string, filePath: string): string;
4
6
  export declare function manifestIconsEntrypointChange(manifestField?: string, pathAfter?: string, pathBefore?: string): string;
5
7
  export declare function iconsEmitSummary(feature: string, stats: {
6
8
  entries: number;
@@ -1,6 +1,7 @@
1
1
  export declare function entryNotFoundMessageOnly(manifestField: string, absPath?: string): string;
2
2
  export declare function jsonMissingFile(manifestField: string, filePath: string, opts?: {
3
3
  publicRootHint?: boolean;
4
+ fatal?: boolean;
4
5
  }): string;
5
6
  export declare function invalidJsonSyntax(manifestField: string, file: string, cause: string): string;
6
7
  export declare function invalidRulesetStructure(manifestField: string, file: string): string;
package/package.json CHANGED
@@ -34,7 +34,7 @@
34
34
  "runtime"
35
35
  ],
36
36
  "name": "extension-develop",
37
- "version": "4.0.15",
37
+ "version": "4.0.16",
38
38
  "description": "Develop, build, preview, and package Extension.js projects.",
39
39
  "author": {
40
40
  "name": "Cezar Augusto",
@@ -103,7 +103,7 @@
103
103
  "less-loader": "13.0.0",
104
104
  "parse5-utilities": "^1.0.0",
105
105
  "pintor": "0.3.0",
106
- "postcss": "8.5.10",
106
+ "postcss": "8.5.12",
107
107
  "postcss-loader": "8.2.1",
108
108
  "postcss-preset-env": "11.1.1",
109
109
  "postcss-scss": "4.0.9",