extension 4.1.20 → 4.1.21

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.
@@ -0,0 +1,27 @@
1
+ import type { SafariPipelineTools } from '../run-safari/safari-launch/index.js';
2
+ export interface FakeSafariToolsOptions {
3
+ platformOk?: boolean;
4
+ toolchainOk?: boolean;
5
+ converter?: {
6
+ code?: number;
7
+ output?: string;
8
+ };
9
+ xcodebuild?: {
10
+ code?: number;
11
+ output?: string;
12
+ };
13
+ pid?: number | null;
14
+ registered?: boolean;
15
+ }
16
+ export interface FakeSafariTools extends SafariPipelineTools {
17
+ calls: {
18
+ converter: string[][];
19
+ xcodebuild: string[][];
20
+ openApp: string[];
21
+ openSafari: string[];
22
+ resolvePid: string[];
23
+ pluginkit: number;
24
+ };
25
+ events: string[];
26
+ }
27
+ export declare function fakeSafariTools(options?: FakeSafariToolsOptions): FakeSafariTools;
@@ -78,6 +78,7 @@ export declare function safariDryRunConverter(cmd: string): string;
78
78
  export declare function safariDryRunXcodebuild(cmd: string): string;
79
79
  export declare function safariNextSteps(appName: string, signed?: boolean): string;
80
80
  export declare function safariRegistered(appName: string): string;
81
+ export declare function safariPidUnresolved(appName: string): string;
81
82
  export declare function safariNotYetRegistered(appName: string): string;
82
83
  export declare function safariRebuilt(appName: string): string;
83
84
  export declare function safariProjectStale(): string;
@@ -0,0 +1 @@
1
+ export declare function writeJsonAtomic(filePath: string, value: unknown): boolean;
@@ -46,7 +46,7 @@ export interface BrowserController {
46
46
  }
47
47
  export declare function launchBrowser(opts: BrowserLaunchOptions): Promise<BrowserController>;
48
48
  export { runOnlyPreviewBrowser } from './run-only.js';
49
- export { packageSafariExtension, type SafariBuildPreflight, type SafariPackageResult, type SafariPipelineMode, safariBuildPreflight, safariPreflightError } from './run-safari/safari-launch/index.js';
49
+ export { packageSafariExtension, type SafariBuildPreflight, type SafariPackageResult, type SafariPipelineMode, type SafariPipelineTools, type SafariToolResult, safariBuildPreflight, safariPreflightError } from './run-safari/safari-launch/index.js';
50
50
  export { builtAppPath, isValidBundleId, macOsSchemeName, resolveSafariBuildConfig, xcodeProjectPath } from './run-safari/safari-launch/safari-config.js';
51
51
  export { createSafariPackager, type SafariPackagerFn, type SafariPackagerOptions, type SafariPackagerOverrides } from './run-safari/safari-packager.js';
52
52
  export type { SafariBuildConfig, SafariPluginLike } from './run-safari/safari-types.js';
@@ -1,6 +1,6 @@
1
1
  import type { BrowserLogger } from '../../browsers-types.js';
2
2
  import type { SafariPluginLike } from '../safari-types.js';
3
- export declare function toolOutputTail(output: string): string;
3
+ export { type SafariPipelineTools, type SafariToolResult, toolOutputTail } from './tools.js';
4
4
  export declare function converterWarnings(output: string): string[];
5
5
  export type SafariPipelineMode = 'full' | 'resync';
6
6
  export interface SafariPackageResult {
@@ -0,0 +1,17 @@
1
+ import { type SafariToolchain } from './toolchain.js';
2
+ export declare function toolOutputTail(output: string): string;
3
+ export interface SafariToolResult {
4
+ ok: boolean;
5
+ code: number | null;
6
+ output: string;
7
+ }
8
+ export interface SafariPipelineTools {
9
+ detectToolchain(): SafariToolchain;
10
+ runConverter(args: string[]): Promise<SafariToolResult>;
11
+ runXcodebuild(args: string[]): Promise<SafariToolResult>;
12
+ openApp(target: string): Promise<SafariToolResult>;
13
+ openSafari(binary: string): Promise<SafariToolResult>;
14
+ resolvePid(bundleId: string): Promise<number | null>;
15
+ pluginkitList(): Promise<string>;
16
+ }
17
+ export declare function createSafariTools(): SafariPipelineTools;
@@ -1,5 +1,5 @@
1
1
  import type { BrowserLogger } from '../browsers-types.js';
2
- import { type SafariPackageResult, type SafariPipelineMode } from './safari-launch/index.js';
2
+ import { type SafariPackageResult, type SafariPipelineMode, type SafariPipelineTools } from './safari-launch/index.js';
3
3
  export interface SafariPackagerOverrides {
4
4
  appName?: string;
5
5
  bundleId?: string;
@@ -14,6 +14,7 @@ export interface SafariPackagerOptions extends SafariPackagerOverrides {
14
14
  noOpen?: boolean;
15
15
  dryRun?: boolean;
16
16
  logger?: BrowserLogger;
17
+ tools?: SafariPipelineTools;
17
18
  }
18
19
  export type SafariPackagerFn = (distPath: string, mode?: SafariPipelineMode, overrides?: SafariPackagerOverrides) => Promise<SafariPackageResult>;
19
20
  export declare function createSafariPackager(options?: SafariPackagerOptions): SafariPackagerFn;
@@ -1,4 +1,5 @@
1
1
  import type { PluginInterface } from '../browsers-types.js';
2
+ import type { SafariPipelineTools } from './safari-launch/tools.js';
2
3
  export type SafariPluginLike = Pick<PluginInterface, 'extension' | 'noOpen' | 'instanceId' | 'dryRun'> & {
3
4
  browser: PluginInterface['browser'];
4
5
  safariBinary?: string;
@@ -8,6 +9,7 @@ export type SafariPluginLike = Pick<PluginInterface, 'extension' | 'noOpen' | 'i
8
9
  macOsOnly?: boolean;
9
10
  forceRegenerate?: boolean;
10
11
  announceDevReady?: boolean;
12
+ tools?: SafariPipelineTools;
11
13
  };
12
14
  export interface SafariBuildConfig {
13
15
  extensionDir: string;
@@ -50,8 +50,11 @@ export interface BrowserConfig extends BrowserLaunchConfig {
50
50
  geckoBinary?: string;
51
51
  firefoxBinary?: string;
52
52
  }
53
- /** Asset categories the perf-budgets plugin recognizes. */
54
- export type PerfBudgetCategory = 'content-script' | 'service-worker' | 'page' | 'ignored';
53
+ /**
54
+ * Asset categories the perf-budgets plugin recognizes. `runtime` covers
55
+ * wasm cores and root-level runtime helpers emitted outside a surface folder.
56
+ */
57
+ export type PerfBudgetCategory = 'content-script' | 'service-worker' | 'page' | 'runtime' | 'ignored';
55
58
  /**
56
59
  * Per-category asset size budgets (bytes) for compiling commands.
57
60
  * Set at the top level, or per command via `commands.dev|build.perfBudgets`.
@@ -280,9 +280,16 @@ export declare function programAIHelpJSON(version: string): ProgramAIHelpJSON;
280
280
  export declare function invalidAIHelpFormat(value: string): string;
281
281
  export declare function removedNoRunnerFlag(): string;
282
282
  export declare function deprecatedOutputAlias(flag: string): string;
283
+ export declare function openedSurface(surface: string): string;
284
+ export declare function replayedActionClick(listeners: number): string;
285
+ export declare function replayedCommand(listeners: number, command?: string): string;
286
+ export declare function openSurfaceWarning(warning: string): string;
287
+ export declare function openSurfaceFailed(surface: string, reason: string, engine?: string, remedy?: string): string;
283
288
  export declare function openSurfaceGestureStep(surface: string): string;
284
289
  export declare function openSurfaceNeedsGesturePlain(surface: string): string;
285
290
  export declare function openSurfaceNeedsGesture(surface: string): string;
291
+ export declare function doctorHeader(browser: string, passes: number, total: number): string;
292
+ export declare function doctorRemedy(check: string, remediation: string): string;
286
293
  export declare function controlDisabledInSessionPlain(browser: string, port: number | undefined, flag: string): string;
287
294
  export declare function controlDisabledInSession(browser: string, port: number | undefined, flag: string): string;
288
295
  export declare function noBrowserNotSupportedForCommand(command?: string): string;
@@ -1,7 +1,9 @@
1
1
  export declare function isSupportedNodeVersion(version: string): boolean;
2
2
  export declare function isSupportedDenoVersion(version: string): boolean;
3
+ export declare function isSupportedBunVersion(version: string): boolean;
3
4
  export declare function detectBunVersion(versions?: NodeJS.ProcessVersions): string | undefined;
4
5
  export declare function detectDenoVersion(versions?: NodeJS.ProcessVersions): string | undefined;
5
6
  export declare function unsupportedDenoVersionMessage(version: string): string;
6
- export declare function unsupportedNodeVersionMessage(version: string, bunVersion?: string): string;
7
+ export declare function unsupportedBunVersionMessage(version: string): string;
8
+ export declare function unsupportedNodeVersionMessage(version: string): string;
7
9
  export declare function enforceSupportedNodeVersion(version?: string, bunVersion?: string | undefined, denoVersion?: string | undefined): void;
@@ -1,6 +1,6 @@
1
1
  export declare const DEFAULT_TEMPLATE = "typescript";
2
2
  export declare const BUNDLED_TEMPLATES: readonly string[];
3
- export declare const TEMPLATE_CATALOG_URL = "https://github.com/extension-js/examples/tree/39448a235ea1b02516e6d555bcae409db2258b7f/examples";
3
+ export declare const TEMPLATE_CATALOG_URL = "https://github.com/extension-js/examples/tree/06d33e35894516a460409dca06d1614e291e6252/examples";
4
4
  export interface TemplateGroup {
5
5
  title: string;
6
6
  summary: string;
@@ -1,3 +1,3 @@
1
1
  export declare const TEMPLATE_CORPUS_REPO = "extension-js/examples";
2
- export declare const TEMPLATE_CORPUS_REF = "39448a235ea1b02516e6d555bcae409db2258b7f";
2
+ export declare const TEMPLATE_CORPUS_REF = "06d33e35894516a460409dca06d1614e291e6252";
3
3
  export declare const TEMPLATE_CORPUS_SLUGS: readonly string[];
package/package.json CHANGED
@@ -38,7 +38,7 @@
38
38
  "extension": "./bin/extension.cjs"
39
39
  },
40
40
  "name": "extension",
41
- "version": "4.1.20",
41
+ "version": "4.1.21",
42
42
  "description": "The cross-browser extension framework. Build Chrome, Edge, Firefox, and Safari extensions with no build configuration.",
43
43
  "homepage": "https://extension.js.org/",
44
44
  "bugs": {
@@ -98,7 +98,6 @@
98
98
  "brave-location": "3.1.1",
99
99
  "chrome-location2": "4.1.1",
100
100
  "chromium-location": "2.1.2",
101
- "cross-spawn": "^7.0.6",
102
101
  "edge-location": "2.3.1",
103
102
  "firefox-location2": "3.1.1",
104
103
  "librewolf-location": "1.2.1",
@@ -106,9 +105,9 @@
106
105
  "vivaldi-location2": "2.1.1",
107
106
  "waterfox-location": "2.1.1",
108
107
  "yandex-location": "2.1.1",
109
- "extension-create": "4.1.20",
110
- "extension-develop": "4.1.20",
111
- "extension-install": "4.1.20",
108
+ "extension-create": "4.1.21",
109
+ "extension-develop": "4.1.21",
110
+ "extension-install": "4.1.21",
112
111
  "commander": "^15.0.0",
113
112
  "pintor": "0.3.0",
114
113
  "semver": "^7.7.3",
@@ -122,7 +121,6 @@
122
121
  },
123
122
  "devDependencies": {
124
123
  "@rslib/core": "^1.0.0",
125
- "@types/cross-spawn": "^6.0.6",
126
124
  "@types/semver": "^7.7.1",
127
125
  "@types/ws": "^8.18.1",
128
126
  "webextension-polyfill": "^0.12.0",