@cloudflare/vite-plugin 1.11.4 → 1.11.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.
- package/dist/index.js +24 -0
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -705,6 +705,29 @@ function resolveDockerHost(dockerPath) {
|
|
|
705
705
|
}
|
|
706
706
|
return process.platform === "win32" ? "//./pipe/docker_engine" : "unix:///var/run/docker.sock";
|
|
707
707
|
}
|
|
708
|
+
async function getImageRepoTags(dockerPath, imageTag) {
|
|
709
|
+
try {
|
|
710
|
+
const output = await dockerImageInspect(dockerPath, {
|
|
711
|
+
imageTag,
|
|
712
|
+
formatString: "{{ range .RepoTags }}{{ . }}\n{{ end }}"
|
|
713
|
+
});
|
|
714
|
+
return output.split("\n").filter((tag) => tag.trim() !== "");
|
|
715
|
+
} catch {
|
|
716
|
+
return [];
|
|
717
|
+
}
|
|
718
|
+
}
|
|
719
|
+
async function cleanupDuplicateImageTags(dockerPath, imageTag) {
|
|
720
|
+
try {
|
|
721
|
+
const repoTags = await getImageRepoTags(dockerPath, imageTag);
|
|
722
|
+
const tagsToRemove = repoTags.filter(
|
|
723
|
+
(tag) => tag !== imageTag && tag.startsWith("cloudflare-dev")
|
|
724
|
+
);
|
|
725
|
+
if (tagsToRemove.length > 0) {
|
|
726
|
+
runDockerCmdWithOutput(dockerPath, ["rmi", ...tagsToRemove]);
|
|
727
|
+
}
|
|
728
|
+
} catch {
|
|
729
|
+
}
|
|
730
|
+
}
|
|
708
731
|
|
|
709
732
|
// ../workers-shared/asset-worker/src/utils/rules-engine.ts
|
|
710
733
|
var ESCAPE_REGEX_CHARACTERS = /[-/\\^$*+?.()|[\]{}]/g;
|
|
@@ -14615,6 +14638,7 @@ To use an existing image from another repository, see https://developers.cloudfl
|
|
|
14615
14638
|
});
|
|
14616
14639
|
}
|
|
14617
14640
|
if (!aborted) {
|
|
14641
|
+
await cleanupDuplicateImageTags(dockerPath, options.image_tag);
|
|
14618
14642
|
await checkExposedPorts(dockerPath, options);
|
|
14619
14643
|
}
|
|
14620
14644
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudflare/vite-plugin",
|
|
3
|
-
"version": "1.11.
|
|
3
|
+
"version": "1.11.5",
|
|
4
4
|
"description": "Cloudflare plugin for Vite",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cloudflare",
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
"unenv": "2.0.0-rc.19",
|
|
42
42
|
"ws": "8.18.0",
|
|
43
43
|
"@cloudflare/unenv-preset": "2.6.1",
|
|
44
|
-
"
|
|
45
|
-
"
|
|
44
|
+
"wrangler": "4.30.0",
|
|
45
|
+
"miniflare": "4.20250813.1"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@cloudflare/workers-types": "^4.20250813.0",
|
|
@@ -54,14 +54,14 @@
|
|
|
54
54
|
"typescript": "^5.8.3",
|
|
55
55
|
"vite": "7.0.0",
|
|
56
56
|
"vitest": "~3.2.0",
|
|
57
|
-
"@cloudflare/containers-shared": "0.2.9",
|
|
58
57
|
"@cloudflare/mock-npm-registry": "0.0.0",
|
|
58
|
+
"@cloudflare/containers-shared": "0.2.10",
|
|
59
59
|
"@cloudflare/workers-shared": "0.18.5",
|
|
60
60
|
"@cloudflare/workers-tsconfig": "0.0.0"
|
|
61
61
|
},
|
|
62
62
|
"peerDependencies": {
|
|
63
63
|
"vite": "^6.1.0 || ^7.0.0",
|
|
64
|
-
"wrangler": "^4.
|
|
64
|
+
"wrangler": "^4.30.0"
|
|
65
65
|
},
|
|
66
66
|
"publishConfig": {
|
|
67
67
|
"access": "public"
|