wxt 0.17.6 → 0.17.7
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/dist/{chunk-3ZE2CHPV.js → chunk-QFL6IFHC.js} +1 -1
- package/dist/cli.js +12 -11
- package/dist/index.cjs +12 -11
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +12 -11
- package/dist/testing.js +1 -1
- package/package.json +1 -1
- package/dist/cli.d.ts +0 -2
package/dist/cli.js
CHANGED
|
@@ -2415,7 +2415,7 @@ function getChunkSortWeight(filename) {
|
|
|
2415
2415
|
import pc4 from "picocolors";
|
|
2416
2416
|
|
|
2417
2417
|
// package.json
|
|
2418
|
-
var version = "0.17.
|
|
2418
|
+
var version = "0.17.7";
|
|
2419
2419
|
|
|
2420
2420
|
// src/core/utils/log/printHeader.ts
|
|
2421
2421
|
import { consola as consola2 } from "consola";
|
|
@@ -3774,9 +3774,9 @@ async function zip(config) {
|
|
|
3774
3774
|
await zipDir(wxt.config.zip.sourcesRoot, sourcesZipPath, {
|
|
3775
3775
|
include: wxt.config.zip.includeSources,
|
|
3776
3776
|
exclude: wxt.config.zip.excludeSources,
|
|
3777
|
-
transform(
|
|
3778
|
-
if (
|
|
3779
|
-
return addOverridesToPackageJson(content, overrides);
|
|
3777
|
+
transform(absolutePath, zipPath, content) {
|
|
3778
|
+
if (zipPath.endsWith("package.json")) {
|
|
3779
|
+
return addOverridesToPackageJson(absolutePath, content, overrides);
|
|
3780
3780
|
}
|
|
3781
3781
|
},
|
|
3782
3782
|
additionalFiles: downloadedPackages
|
|
@@ -3817,7 +3817,7 @@ async function zipDir(directory, outputPath, options) {
|
|
|
3817
3817
|
const content = await fs16.readFile(absolutePath, "utf-8");
|
|
3818
3818
|
archive.file(
|
|
3819
3819
|
file,
|
|
3820
|
-
await options?.transform?.(file, content) || content
|
|
3820
|
+
await options?.transform?.(absolutePath, file, content) || content
|
|
3821
3821
|
);
|
|
3822
3822
|
} else {
|
|
3823
3823
|
const content = await fs16.readFile(absolutePath);
|
|
@@ -3848,22 +3848,23 @@ async function downloadPrivatePackages() {
|
|
|
3848
3848
|
wxt.config.zip.downloadedPackagesDir
|
|
3849
3849
|
);
|
|
3850
3850
|
files.push(tgzPath);
|
|
3851
|
-
overrides[id] =
|
|
3851
|
+
overrides[id] = tgzPath;
|
|
3852
3852
|
}
|
|
3853
3853
|
}
|
|
3854
3854
|
return { overrides, files };
|
|
3855
3855
|
}
|
|
3856
|
-
function addOverridesToPackageJson(content, overrides) {
|
|
3856
|
+
function addOverridesToPackageJson(absolutePackageJsonPath, content, overrides) {
|
|
3857
3857
|
if (Object.keys(overrides).length === 0)
|
|
3858
3858
|
return content;
|
|
3859
|
+
const packageJsonDir = path9.dirname(absolutePackageJsonPath);
|
|
3859
3860
|
const oldPackage = JSON.parse(content);
|
|
3860
3861
|
const newPackage = {
|
|
3861
3862
|
...oldPackage,
|
|
3862
|
-
[wxt.pm.overridesKey]: {
|
|
3863
|
-
...oldPackage[wxt.pm.overridesKey],
|
|
3864
|
-
...overrides
|
|
3865
|
-
}
|
|
3863
|
+
[wxt.pm.overridesKey]: { ...oldPackage[wxt.pm.overridesKey] }
|
|
3866
3864
|
};
|
|
3865
|
+
Object.entries(overrides).forEach(([key, absolutePath]) => {
|
|
3866
|
+
newPackage[wxt.pm.overridesKey][key] = "file://./" + normalizePath(path9.relative(packageJsonDir, absolutePath));
|
|
3867
|
+
});
|
|
3867
3868
|
return JSON.stringify(newPackage, null, 2);
|
|
3868
3869
|
}
|
|
3869
3870
|
|
package/dist/index.cjs
CHANGED
|
@@ -4834,7 +4834,7 @@ function getChunkSortWeight(filename) {
|
|
|
4834
4834
|
var import_picocolors4 = __toESM(require("picocolors"), 1);
|
|
4835
4835
|
|
|
4836
4836
|
// package.json
|
|
4837
|
-
var version = "0.17.
|
|
4837
|
+
var version = "0.17.7";
|
|
4838
4838
|
|
|
4839
4839
|
// src/core/utils/log/printHeader.ts
|
|
4840
4840
|
var import_consola2 = require("consola");
|
|
@@ -6199,9 +6199,9 @@ async function zip(config) {
|
|
|
6199
6199
|
await zipDir(wxt.config.zip.sourcesRoot, sourcesZipPath, {
|
|
6200
6200
|
include: wxt.config.zip.includeSources,
|
|
6201
6201
|
exclude: wxt.config.zip.excludeSources,
|
|
6202
|
-
transform(
|
|
6203
|
-
if (
|
|
6204
|
-
return addOverridesToPackageJson(content, overrides);
|
|
6202
|
+
transform(absolutePath, zipPath, content) {
|
|
6203
|
+
if (zipPath.endsWith("package.json")) {
|
|
6204
|
+
return addOverridesToPackageJson(absolutePath, content, overrides);
|
|
6205
6205
|
}
|
|
6206
6206
|
},
|
|
6207
6207
|
additionalFiles: downloadedPackages
|
|
@@ -6242,7 +6242,7 @@ async function zipDir(directory, outputPath, options) {
|
|
|
6242
6242
|
const content = await import_fs_extra17.default.readFile(absolutePath, "utf-8");
|
|
6243
6243
|
archive.file(
|
|
6244
6244
|
file,
|
|
6245
|
-
await options?.transform?.(file, content) || content
|
|
6245
|
+
await options?.transform?.(absolutePath, file, content) || content
|
|
6246
6246
|
);
|
|
6247
6247
|
} else {
|
|
6248
6248
|
const content = await import_fs_extra17.default.readFile(absolutePath);
|
|
@@ -6273,22 +6273,23 @@ async function downloadPrivatePackages() {
|
|
|
6273
6273
|
wxt.config.zip.downloadedPackagesDir
|
|
6274
6274
|
);
|
|
6275
6275
|
files.push(tgzPath);
|
|
6276
|
-
overrides[id] =
|
|
6276
|
+
overrides[id] = tgzPath;
|
|
6277
6277
|
}
|
|
6278
6278
|
}
|
|
6279
6279
|
return { overrides, files };
|
|
6280
6280
|
}
|
|
6281
|
-
function addOverridesToPackageJson(content, overrides) {
|
|
6281
|
+
function addOverridesToPackageJson(absolutePackageJsonPath, content, overrides) {
|
|
6282
6282
|
if (Object.keys(overrides).length === 0)
|
|
6283
6283
|
return content;
|
|
6284
|
+
const packageJsonDir = import_node_path22.default.dirname(absolutePackageJsonPath);
|
|
6284
6285
|
const oldPackage = JSON.parse(content);
|
|
6285
6286
|
const newPackage = {
|
|
6286
6287
|
...oldPackage,
|
|
6287
|
-
[wxt.pm.overridesKey]: {
|
|
6288
|
-
...oldPackage[wxt.pm.overridesKey],
|
|
6289
|
-
...overrides
|
|
6290
|
-
}
|
|
6288
|
+
[wxt.pm.overridesKey]: { ...oldPackage[wxt.pm.overridesKey] }
|
|
6291
6289
|
};
|
|
6290
|
+
Object.entries(overrides).forEach(([key, absolutePath]) => {
|
|
6291
|
+
newPackage[wxt.pm.overridesKey][key] = "file://./" + normalizePath(import_node_path22.default.relative(packageJsonDir, absolutePath));
|
|
6292
|
+
});
|
|
6292
6293
|
return JSON.stringify(newPackage, null, 2);
|
|
6293
6294
|
}
|
|
6294
6295
|
// Annotate the CommonJS export names for ESM import in node:
|
package/dist/index.d.cts
CHANGED
|
@@ -65,6 +65,6 @@ declare function prepare(config: InlineConfig): Promise<void>;
|
|
|
65
65
|
*/
|
|
66
66
|
declare function zip(config?: InlineConfig): Promise<string[]>;
|
|
67
67
|
|
|
68
|
-
var version = "0.17.
|
|
68
|
+
var version = "0.17.7";
|
|
69
69
|
|
|
70
70
|
export { BuildOutput, ExtensionRunnerConfig, InlineConfig, UserConfig, WxtDevServer, build, clean, createServer, defineConfig, defineRunnerConfig, initialize, prepare, version, zip };
|
package/dist/index.d.ts
CHANGED
|
@@ -65,6 +65,6 @@ declare function prepare(config: InlineConfig): Promise<void>;
|
|
|
65
65
|
*/
|
|
66
66
|
declare function zip(config?: InlineConfig): Promise<string[]>;
|
|
67
67
|
|
|
68
|
-
var version = "0.17.
|
|
68
|
+
var version = "0.17.7";
|
|
69
69
|
|
|
70
70
|
export { BuildOutput, ExtensionRunnerConfig, InlineConfig, UserConfig, WxtDevServer, build, clean, createServer, defineConfig, defineRunnerConfig, initialize, prepare, version, zip };
|
package/dist/index.js
CHANGED
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
unnormalizePath,
|
|
19
19
|
version,
|
|
20
20
|
wxt
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-QFL6IFHC.js";
|
|
22
22
|
import "./chunk-VBXJIVYU.js";
|
|
23
23
|
|
|
24
24
|
// src/core/build.ts
|
|
@@ -577,9 +577,9 @@ async function zip(config) {
|
|
|
577
577
|
await zipDir(wxt.config.zip.sourcesRoot, sourcesZipPath, {
|
|
578
578
|
include: wxt.config.zip.includeSources,
|
|
579
579
|
exclude: wxt.config.zip.excludeSources,
|
|
580
|
-
transform(
|
|
581
|
-
if (
|
|
582
|
-
return addOverridesToPackageJson(content, overrides);
|
|
580
|
+
transform(absolutePath, zipPath, content) {
|
|
581
|
+
if (zipPath.endsWith("package.json")) {
|
|
582
|
+
return addOverridesToPackageJson(absolutePath, content, overrides);
|
|
583
583
|
}
|
|
584
584
|
},
|
|
585
585
|
additionalFiles: downloadedPackages
|
|
@@ -620,7 +620,7 @@ async function zipDir(directory, outputPath, options) {
|
|
|
620
620
|
const content = await fs3.readFile(absolutePath, "utf-8");
|
|
621
621
|
archive.file(
|
|
622
622
|
file,
|
|
623
|
-
await options?.transform?.(file, content) || content
|
|
623
|
+
await options?.transform?.(absolutePath, file, content) || content
|
|
624
624
|
);
|
|
625
625
|
} else {
|
|
626
626
|
const content = await fs3.readFile(absolutePath);
|
|
@@ -651,22 +651,23 @@ async function downloadPrivatePackages() {
|
|
|
651
651
|
wxt.config.zip.downloadedPackagesDir
|
|
652
652
|
);
|
|
653
653
|
files.push(tgzPath);
|
|
654
|
-
overrides[id] =
|
|
654
|
+
overrides[id] = tgzPath;
|
|
655
655
|
}
|
|
656
656
|
}
|
|
657
657
|
return { overrides, files };
|
|
658
658
|
}
|
|
659
|
-
function addOverridesToPackageJson(content, overrides) {
|
|
659
|
+
function addOverridesToPackageJson(absolutePackageJsonPath, content, overrides) {
|
|
660
660
|
if (Object.keys(overrides).length === 0)
|
|
661
661
|
return content;
|
|
662
|
+
const packageJsonDir = path3.dirname(absolutePackageJsonPath);
|
|
662
663
|
const oldPackage = JSON.parse(content);
|
|
663
664
|
const newPackage = {
|
|
664
665
|
...oldPackage,
|
|
665
|
-
[wxt.pm.overridesKey]: {
|
|
666
|
-
...oldPackage[wxt.pm.overridesKey],
|
|
667
|
-
...overrides
|
|
668
|
-
}
|
|
666
|
+
[wxt.pm.overridesKey]: { ...oldPackage[wxt.pm.overridesKey] }
|
|
669
667
|
};
|
|
668
|
+
Object.entries(overrides).forEach(([key, absolutePath]) => {
|
|
669
|
+
newPackage[wxt.pm.overridesKey][key] = "file://./" + normalizePath(path3.relative(packageJsonDir, absolutePath));
|
|
670
|
+
});
|
|
670
671
|
return JSON.stringify(newPackage, null, 2);
|
|
671
672
|
}
|
|
672
673
|
export {
|
package/dist/testing.js
CHANGED
package/package.json
CHANGED
package/dist/cli.d.ts
DELETED