extension-develop 4.1.34-canary.1791598059.418cd395 → 4.1.34

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 (30) hide show
  1. package/dist/117~0.mjs +20 -0
  2. package/dist/{616~0.mjs → 285~0.mjs} +2 -18
  3. package/dist/363~0.mjs +2 -2
  4. package/dist/469~0.mjs +4 -1
  5. package/dist/832~0.mjs +3510 -190
  6. package/dist/840~0.mjs +50 -3
  7. package/dist/852~0.mjs +2 -0
  8. package/dist/bridge.mjs +3 -2
  9. package/dist/command-preview.d.ts +8 -1
  10. package/dist/contract/codes.json +8 -0
  11. package/dist/dev-server/control-bridge/broker.d.ts +12 -0
  12. package/dist/dev-server/control-bridge/producer-runtime.d.ts +1 -1
  13. package/dist/dev-server/control-bridge/production-control.d.ts +32 -0
  14. package/dist/dev-server~0.mjs +13 -1090
  15. package/dist/extension-js-devtools/build-stamp.json +2 -2
  16. package/dist/extension-js-theme/build-stamp.json +2 -2
  17. package/dist/lib/messages.d.ts +1 -0
  18. package/dist/lib/messaging.d.ts +2 -0
  19. package/dist/plugin-browsers/index.d.ts +4 -0
  20. package/dist/plugin-playwright/index.d.ts +4 -0
  21. package/dist/plugin-reload/classify-reload.d.ts +2 -0
  22. package/dist/plugin-reload/index.d.ts +2 -2
  23. package/dist/plugin-reload/reload-dispatch.d.ts +3 -0
  24. package/dist/plugin-reload/steps/inject-bridge-relay.d.ts +5 -0
  25. package/dist/plugin-web-extension/feature-manifest/steps/apply-dev-defaults-lib/dev-injected-permissions.d.ts +1 -0
  26. package/dist/plugin-web-extension/feature-manifest/steps/apply-dev-defaults-lib/webkit-guarded-ranges.d.ts +10 -0
  27. package/dist/plugin-web-extension/feature-manifest/steps/warn-gecko-unsupported-apis.d.ts +5 -2
  28. package/dist/rspack-config~0.mjs +435 -1901
  29. package/dist/types.d.ts +12 -0
  30. package/package.json +1 -1
package/dist/117~0.mjs ADDED
@@ -0,0 +1,20 @@
1
+ import { createRequire as __extjsCreateRequire } from "node:module"; const require = __extjsCreateRequire(import.meta.url);
2
+ import * as __rspack_external_node_fs_1b05aee1 from "node:fs";
3
+ import * as __rspack_external_node_path_806ed179 from "node:path";
4
+ function readPersistedControlPort(filePath) {
5
+ try {
6
+ const port = parseInt(__rspack_external_node_fs_1b05aee1.readFileSync(filePath, 'utf8').trim(), 10);
7
+ return Number.isInteger(port) && port > 0 && port < 65536 ? port : null;
8
+ } catch {
9
+ return null;
10
+ }
11
+ }
12
+ function writePersistedControlPort(filePath, port) {
13
+ try {
14
+ __rspack_external_node_fs_1b05aee1.mkdirSync(__rspack_external_node_path_806ed179.dirname(filePath), {
15
+ recursive: true
16
+ });
17
+ __rspack_external_node_fs_1b05aee1.writeFileSync(filePath, `${port}\n`);
18
+ } catch {}
19
+ }
20
+ export { readPersistedControlPort, writePersistedControlPort };
@@ -1,8 +1,8 @@
1
1
  import { createRequire as __extjsCreateRequire } from "node:module"; const require = __extjsCreateRequire(import.meta.url);
2
2
  import { CONTROL_TOKEN_FILE_PREFIX, controlTokenPath, legacyControlTokenPath, sessionStateDir } from "./771~0.mjs";
3
+ import * as __rspack_external_node_crypto_2e7c4b46 from "node:crypto";
3
4
  import * as __rspack_external_node_fs_1b05aee1 from "node:fs";
4
5
  import * as __rspack_external_node_path_806ed179 from "node:path";
5
- import * as __rspack_external_node_crypto_2e7c4b46 from "node:crypto";
6
6
  const LOG_CONTEXTS = [
7
7
  'background',
8
8
  'content',
@@ -23,22 +23,6 @@ const REFUSAL_URL_REFUSED = 'url_refused';
23
23
  const REFUSAL_TAB_NOT_FOUND = 'tab_not_found';
24
24
  const REFUSAL_SURFACE_NOT_DECLARED = 'surface_not_declared';
25
25
  const CONTROL_WS_PATH = '/extjs-control';
26
- function readPersistedControlPort(filePath) {
27
- try {
28
- const port = parseInt(__rspack_external_node_fs_1b05aee1.readFileSync(filePath, 'utf8').trim(), 10);
29
- return Number.isInteger(port) && port > 0 && port < 65536 ? port : null;
30
- } catch {
31
- return null;
32
- }
33
- }
34
- function writePersistedControlPort(filePath, port) {
35
- try {
36
- __rspack_external_node_fs_1b05aee1.mkdirSync(__rspack_external_node_path_806ed179.dirname(filePath), {
37
- recursive: true
38
- });
39
- __rspack_external_node_fs_1b05aee1.writeFileSync(filePath, `${port}\n`);
40
- } catch {}
41
- }
42
26
  function writeControlToken(projectPath, browser) {
43
27
  const token = __rspack_external_node_crypto_2e7c4b46.randomBytes(32).toString('hex');
44
28
  const file = controlTokenPath(projectPath, browser);
@@ -100,4 +84,4 @@ function clearControlToken(projectPath, browser) {
100
84
  });
101
85
  } catch {}
102
86
  }
103
- export { CONTROL_WS_PATH, LOG_CONTEXTS, REFUSAL_API_UNAVAILABLE, REFUSAL_NEEDS_HEADED_WINDOW, REFUSAL_NEEDS_USER_GESTURE, REFUSAL_SURFACE_NOT_DECLARED, REFUSAL_SURFACE_NOT_OPEN, REFUSAL_TAB_NOT_FOUND, REFUSAL_URL_REFUSED, clearControlToken, readControlToken, readPersistedControlPort, writeControlToken, writePersistedControlPort };
87
+ export { CONTROL_WS_PATH, LOG_CONTEXTS, REFUSAL_API_UNAVAILABLE, REFUSAL_NEEDS_HEADED_WINDOW, REFUSAL_NEEDS_USER_GESTURE, REFUSAL_SURFACE_NOT_DECLARED, REFUSAL_SURFACE_NOT_OPEN, REFUSAL_TAB_NOT_FOUND, REFUSAL_URL_REFUSED, clearControlToken, readControlToken, writeControlToken };
package/dist/363~0.mjs CHANGED
@@ -1105,7 +1105,7 @@ function safariUnsupportedApi(file, api, detail) {
1105
1105
  const lines = [];
1106
1106
  lines.push(`${messaging_prefix('warn')} ${pintor.underline(file)} calls chrome.${api}, which Safari does not have.`);
1107
1107
  lines.push(detail);
1108
- lines.push(`Move the call behind a build-time branch on ${pintor.blue('import.meta.env.EXTENSION_PUBLIC_BROWSER')}, or guard it with ${pintor.yellow(`chrome.${api}?.`)}.`);
1108
+ lines.push(`Move the call behind a build-time branch on ${pintor.blue('import.meta.env.EXTENSION_PUBLIC_BROWSER')}, guard it with ${pintor.yellow(`chrome.${api}?.`)}, or keep it inside an ${pintor.yellow(`if (chrome.${api})`)} branch.`);
1109
1109
  return lines.join('\n');
1110
1110
  }
1111
1111
  const safariBackgroundDies = "The call throws when the script runs, Safari drops the background, and nothing reports an error.";
@@ -1173,7 +1173,7 @@ function safariMemberUnsupported(file, api, member, kind) {
1173
1173
  const lines = [];
1174
1174
  lines.push(`${messaging_prefix('warn')} ${pintor.underline(file)} calls chrome.${api}.${member}, which Safari does not have.`);
1175
1175
  lines.push(safariMissingMemberDetails[`${api}.${member}`] || `Safari ships chrome.${api} without this member. ${safariBackgroundDies}`);
1176
- lines.push(`Safari has ${pintor.blue(`chrome.${api}`)} itself, so a guard on the namespace does not help. Move the call behind a build-time branch on ${pintor.blue('import.meta.env.EXTENSION_PUBLIC_BROWSER')}, or guard it with ${pintor.yellow(guard)}.`);
1176
+ lines.push(`Safari has ${pintor.blue(`chrome.${api}`)} itself, so a guard on the namespace does not help. Move the call behind a build-time branch on ${pintor.blue('import.meta.env.EXTENSION_PUBLIC_BROWSER')}, guard it with ${pintor.yellow(guard)}, or keep it inside an ${pintor.yellow(`if (chrome.${api}.${member})`)} branch.`);
1177
1177
  return lines.join('\n');
1178
1178
  }
1179
1179
  function geckoActionUnsupportedOnMv2(file) {
package/dist/469~0.mjs CHANGED
@@ -665,6 +665,9 @@ function debugOutputPath(pathValue) {
665
665
  function previewingCustomOutput(browser, outputPath, distPath) {
666
666
  return `${getLoggingPrefix('info')} Previewing ${String(browser)} from ${outputPath}.\nThis is not the build folder ${distPath}. The run record describes the folder loaded.`;
667
667
  }
668
+ function productionControlOpen(browser, controlledPath, distPath, allowEval) {
669
+ return `${getLoggingPrefix('info')} Control channel open for the ${String(browser)} production build (${allowEval ? 'eval, ' : ''}storage, reload, open).\nThe browser loads ${controlledPath}, a copy of ${distPath} with the control producer prepended to the background. ${distPath} is unchanged.`;
670
+ }
668
671
  function debugPreviewOutput(outputPath, distPath) {
669
672
  return `${messaging_prefix('debug')} preview output=${outputPath} dist=${distPath}`;
670
673
  }
@@ -1193,4 +1196,4 @@ function resolveProjectStructureSync(projectPath, options = {}) {
1193
1196
  } : {}
1194
1197
  };
1195
1198
  }
1196
- export { addonLintDependencyAttribution, addonLintFailed, addonLintFailedDebug, addonLintFinding, addonLintMore, addonLintNotInstalled, addonLintSummary, anotherDevSessionActive, anotherDevSessionRefused, asAbsolute, authorInstallNotice, browserLaunchFailed, buildAssetsTree, buildCommandFailed, buildComplete, buildFailed, buildShareHint, buildWarningsDetails, codedError, collapseHomeDir, computePreviewOutputPath, configBrowserOrThrow, configLoadingError, configResolvedChangeIgnored, configUnknownKeys, configWrongShape, debugBrowser, debugContextPath, debugDirs, debugExtensionsToLoad, debugOutputPath, debugPreviewOutput, debugSplitChunksNarrowed, devCommandFailed, devtoolsEngineFor, displayPath, downloadingText, extensionLoadRecovered, extensionLoadStillRefused, failedToDownloadOrWriteZIPFileError, failedToWriteZIPFileError, getDirs, getDistPath, getProjectStructure, invalidRemoteZip, isUsingExperimentalConfig, listOutputFiles, localZipNotFound, localZipUnreadable, managedDependencyCopyWarning, manifestInvalidJson, needsInstall, noCompanionExtensionsResolved, normalizeBrowser, notAZipArchive, operaBuildUnminified, packagingDistributionFiles, packagingSourceFiles, previewHasNothingToRun, previewing, previewingCustomOutput, previewingSourceFallback, projectInstallFallbackToNpm, projectInstallInWorkspaceRoot, projectInstallScriptsDisabled, relativeToDir, remoteSourceDestinationTaken, remoteZipDamaged, resolveProjectStructureSync, runtimeChunkKeptInline, safariBuildOutputNotFound, safariInvalidBundleId, sessionStateIgnoreAdded, starting, toPosixPath, treeWithDistFilesBrowser, treeWithSourceAndDistFiles, treeWithSourceFiles, unpackagedSuccessfully, unpackagingExtension, updatingTypeDefinitions, writingTypeDefinitions, writingTypeDefinitionsError, zipArtifactNotCreated, zipArtifactReady, zipEntryOutsideFolder, zipSkippedSymlinks };
1199
+ export { addonLintDependencyAttribution, addonLintFailed, addonLintFailedDebug, addonLintFinding, addonLintMore, addonLintNotInstalled, addonLintSummary, anotherDevSessionActive, anotherDevSessionRefused, asAbsolute, authorInstallNotice, browserLaunchFailed, buildAssetsTree, buildCommandFailed, buildComplete, buildFailed, buildShareHint, buildWarningsDetails, codedError, collapseHomeDir, computePreviewOutputPath, configBrowserOrThrow, configLoadingError, configResolvedChangeIgnored, configUnknownKeys, configWrongShape, debugBrowser, debugContextPath, debugDirs, debugExtensionsToLoad, debugOutputPath, debugPreviewOutput, debugSplitChunksNarrowed, devCommandFailed, devtoolsEngineFor, displayPath, downloadingText, extensionLoadRecovered, extensionLoadStillRefused, failedToDownloadOrWriteZIPFileError, failedToWriteZIPFileError, getDirs, getDistPath, getProjectStructure, invalidRemoteZip, isUsingExperimentalConfig, listOutputFiles, localZipNotFound, localZipUnreadable, managedDependencyCopyWarning, manifestInvalidJson, needsInstall, noCompanionExtensionsResolved, normalizeBrowser, notAZipArchive, operaBuildUnminified, packagingDistributionFiles, packagingSourceFiles, previewHasNothingToRun, previewing, previewingCustomOutput, previewingSourceFallback, productionControlOpen, projectInstallFallbackToNpm, projectInstallInWorkspaceRoot, projectInstallScriptsDisabled, relativeToDir, remoteSourceDestinationTaken, remoteZipDamaged, resolveProjectStructureSync, runtimeChunkKeptInline, safariBuildOutputNotFound, safariInvalidBundleId, sessionStateIgnoreAdded, starting, toPosixPath, treeWithDistFilesBrowser, treeWithSourceAndDistFiles, treeWithSourceFiles, unpackagedSuccessfully, unpackagingExtension, updatingTypeDefinitions, writingTypeDefinitions, writingTypeDefinitionsError, zipArtifactNotCreated, zipArtifactReady, zipEntryOutsideFolder, zipSkippedSymlinks };