wxt 0.13.4 → 0.13.5

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.
@@ -1,5 +1,5 @@
1
1
  // package.json
2
- var version = "0.13.4";
2
+ var version = "0.13.5";
3
3
 
4
4
  // src/core/utils/arrays.ts
5
5
  function every(array, predicate) {
@@ -2108,7 +2108,10 @@ function getContentScriptCssWebAccessibleResources(config, contentScripts, conte
2108
2108
  } else {
2109
2109
  resources.push({
2110
2110
  resources: [cssFile],
2111
- matches: script.options.matches
2111
+ matches: resolvePerBrowserOption(
2112
+ script.options.matches,
2113
+ config.browser
2114
+ ).map((matchPattern) => stripPathFromMatchPattern(matchPattern))
2112
2115
  });
2113
2116
  }
2114
2117
  });
@@ -2138,6 +2141,13 @@ function addHostPermission(manifest, hostPermission) {
2138
2141
  return;
2139
2142
  manifest.host_permissions.push(hostPermission);
2140
2143
  }
2144
+ function stripPathFromMatchPattern(pattern) {
2145
+ const protocolSepIndex = pattern.indexOf("://");
2146
+ if (protocolSepIndex === -1)
2147
+ return pattern;
2148
+ const startOfPath = pattern.indexOf("/", protocolSepIndex + 3);
2149
+ return pattern.substring(0, startOfPath) + "/*";
2150
+ }
2141
2151
 
2142
2152
  // src/core/utils/building/rebuild.ts
2143
2153
  async function rebuild(config, entrypointGroups, existingOutput = {
package/dist/cli.js CHANGED
@@ -4,7 +4,7 @@ import "./chunk-VBXJIVYU.js";
4
4
  import cac from "cac";
5
5
 
6
6
  // package.json
7
- var version = "0.13.4";
7
+ var version = "0.13.5";
8
8
 
9
9
  // src/core/utils/fs.ts
10
10
  import fs from "fs-extra";
@@ -2405,7 +2405,10 @@ function getContentScriptCssWebAccessibleResources(config, contentScripts, conte
2405
2405
  } else {
2406
2406
  resources.push({
2407
2407
  resources: [cssFile],
2408
- matches: script.options.matches
2408
+ matches: resolvePerBrowserOption(
2409
+ script.options.matches,
2410
+ config.browser
2411
+ ).map((matchPattern) => stripPathFromMatchPattern(matchPattern))
2409
2412
  });
2410
2413
  }
2411
2414
  });
@@ -2435,6 +2438,13 @@ function addHostPermission(manifest, hostPermission) {
2435
2438
  return;
2436
2439
  manifest.host_permissions.push(hostPermission);
2437
2440
  }
2441
+ function stripPathFromMatchPattern(pattern) {
2442
+ const protocolSepIndex = pattern.indexOf("://");
2443
+ if (protocolSepIndex === -1)
2444
+ return pattern;
2445
+ const startOfPath = pattern.indexOf("/", protocolSepIndex + 3);
2446
+ return pattern.substring(0, startOfPath) + "/*";
2447
+ }
2438
2448
 
2439
2449
  // src/core/utils/building/rebuild.ts
2440
2450
  async function rebuild(config, entrypointGroups, existingOutput = {
package/dist/index.cjs CHANGED
@@ -4337,7 +4337,7 @@ function getChunkSortWeight(filename) {
4337
4337
  var import_picocolors3 = __toESM(require("picocolors"), 1);
4338
4338
 
4339
4339
  // package.json
4340
- var version = "0.13.4";
4340
+ var version = "0.13.5";
4341
4341
 
4342
4342
  // src/core/utils/log/printHeader.ts
4343
4343
  var import_consola2 = require("consola");
@@ -4831,7 +4831,10 @@ function getContentScriptCssWebAccessibleResources(config, contentScripts, conte
4831
4831
  } else {
4832
4832
  resources.push({
4833
4833
  resources: [cssFile],
4834
- matches: script.options.matches
4834
+ matches: resolvePerBrowserOption(
4835
+ script.options.matches,
4836
+ config.browser
4837
+ ).map((matchPattern) => stripPathFromMatchPattern(matchPattern))
4835
4838
  });
4836
4839
  }
4837
4840
  });
@@ -4861,6 +4864,13 @@ function addHostPermission(manifest, hostPermission) {
4861
4864
  return;
4862
4865
  manifest.host_permissions.push(hostPermission);
4863
4866
  }
4867
+ function stripPathFromMatchPattern(pattern) {
4868
+ const protocolSepIndex = pattern.indexOf("://");
4869
+ if (protocolSepIndex === -1)
4870
+ return pattern;
4871
+ const startOfPath = pattern.indexOf("/", protocolSepIndex + 3);
4872
+ return pattern.substring(0, startOfPath) + "/*";
4873
+ }
4864
4874
 
4865
4875
  // src/core/utils/building/rebuild.ts
4866
4876
  async function rebuild(config, entrypointGroups, existingOutput = {
package/dist/index.d.cts CHANGED
@@ -62,6 +62,6 @@ declare function prepare(config: InlineConfig): Promise<void>;
62
62
  */
63
63
  declare function zip(config?: InlineConfig): Promise<string[]>;
64
64
 
65
- var version = "0.13.4";
65
+ var version = "0.13.5";
66
66
 
67
67
  export { BuildOutput, ExtensionRunnerConfig, InlineConfig, UserConfig, WxtDevServer, build, clean, createServer, defineConfig, defineRunnerConfig, initialize, prepare, version, zip };
package/dist/index.d.ts CHANGED
@@ -62,6 +62,6 @@ declare function prepare(config: InlineConfig): Promise<void>;
62
62
  */
63
63
  declare function zip(config?: InlineConfig): Promise<string[]>;
64
64
 
65
- var version = "0.13.4";
65
+ var version = "0.13.5";
66
66
 
67
67
  export { BuildOutput, ExtensionRunnerConfig, InlineConfig, UserConfig, WxtDevServer, build, clean, createServer, defineConfig, defineRunnerConfig, initialize, prepare, version, zip };
package/dist/index.js CHANGED
@@ -15,7 +15,7 @@ import {
15
15
  rebuild,
16
16
  resolvePerBrowserOption,
17
17
  version
18
- } from "./chunk-DHQJ6WF5.js";
18
+ } from "./chunk-4XQPQZIP.js";
19
19
  import "./chunk-VBXJIVYU.js";
20
20
 
21
21
  // src/core/build.ts
package/dist/testing.js CHANGED
@@ -5,7 +5,7 @@ import {
5
5
  tsconfigPaths,
6
6
  unimport,
7
7
  webextensionPolyfillMock
8
- } from "./chunk-DHQJ6WF5.js";
8
+ } from "./chunk-4XQPQZIP.js";
9
9
  import "./chunk-VBXJIVYU.js";
10
10
 
11
11
  // src/testing/fake-browser.ts
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "wxt",
3
3
  "type": "module",
4
- "version": "0.13.4",
4
+ "version": "0.13.5",
5
5
  "description": "Next gen framework for developing web extensions",
6
6
  "engines": {
7
7
  "node": ">=18",