@rainbow-robotics/muscat-plugin-kit 1.3.8-dev.1 → 1.3.8-dev.2
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/cli/src/cpp.mjs +2 -2
- package/cli/src/muscatLocal.mjs +2 -2
- package/cli/src/python.mjs +2 -2
- package/cli/src/ros2.mjs +2 -2
- package/cli/src/util.mjs +4 -0
- package/cli/storybook-dist/project.json +1 -1
- package/package.json +3 -3
package/cli/src/cpp.mjs
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// Used by dev:back (interactive dev loop) and build (export the binary into the ZIP).
|
|
4
4
|
import { spawnSync } from "node:child_process";
|
|
5
5
|
import { dirname } from "node:path";
|
|
6
|
-
import { canSkipImageBuild, cppSdkVersion, pluginRootOrNull, imageKey, imageKeyLabel, dockerUserFlags, hasBin, log, pruneMuskatImages, resolveDockerfile } from "./util.mjs";
|
|
6
|
+
import { canSkipImageBuild, cppSdkVersion, pluginRootOrNull, imageKey, imageKeyLabel, dockerUserFlags, hasBin, log, pruneMuskatImages, resolveDockerfile, buildCacheFlags } from "./util.mjs";
|
|
7
7
|
import { syncCppIde } from "./cppIde.mjs";
|
|
8
8
|
|
|
9
9
|
export const CPP_DEV_IMAGE = "muscat-pk-cpp-dev";
|
|
@@ -35,7 +35,7 @@ async function buildImage(image, platform, root) {
|
|
|
35
35
|
const buildArgs = [...(sdkVer ? ["--build-arg", `RB_SDK_VERSION=${sdkVer}`] : []), ...imageKeyLabel(key)];
|
|
36
36
|
const r = spawnSync(
|
|
37
37
|
"docker",
|
|
38
|
-
["build", ...platformFlags, ...buildArgs, "-t", image, "-f", dockerfile, dirname(dockerfile)],
|
|
38
|
+
["build", ...buildCacheFlags(), ...platformFlags, ...buildArgs, "-t", image, "-f", dockerfile, dirname(dockerfile)],
|
|
39
39
|
{ stdio: "inherit" },
|
|
40
40
|
);
|
|
41
41
|
if (r.status !== 0) throw new Error("docker build failed.");
|
package/cli/src/muscatLocal.mjs
CHANGED
|
@@ -10,7 +10,7 @@ import { chmodSync, existsSync, mkdirSync, readFileSync, rmSync, writeFileSync }
|
|
|
10
10
|
import { homedir } from "node:os";
|
|
11
11
|
import { resolve } from "node:path";
|
|
12
12
|
import { mediaPortFlags, MEDIA_PORTS, publishPortFlags } from "./ports.mjs";
|
|
13
|
-
import { canSkipImageBuild, hasBin, log } from "./util.mjs";
|
|
13
|
+
import { canSkipImageBuild, hasBin, log, buildCacheFlags } from "./util.mjs";
|
|
14
14
|
|
|
15
15
|
export const MUSCAT_CONTAINER = "muscat-pk-muscat";
|
|
16
16
|
// Ports published for the backend (it shares this container's netns); a different set recreates it.
|
|
@@ -75,7 +75,7 @@ async function ensureRuntimeImage(total) {
|
|
|
75
75
|
log.step(`docker build -t ${image} (first run downloads MongoDB/InfluxDB/ROS base — slow, then cached)…`);
|
|
76
76
|
const r = spawnSync(
|
|
77
77
|
"docker",
|
|
78
|
-
["build", "-t", image, "-f", resolve(dir, "Dockerfile.runtime"), "--label", "com.rainbow-robotics.muscat-pk=true", dir],
|
|
78
|
+
["build", ...buildCacheFlags(), "-t", image, "-f", resolve(dir, "Dockerfile.runtime"), "--label", "com.rainbow-robotics.muscat-pk=true", dir],
|
|
79
79
|
{ stdio: "inherit" },
|
|
80
80
|
);
|
|
81
81
|
if (r.status !== 0) throw new Error("docker build failed (Muscat runtime image).");
|
package/cli/src/python.mjs
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { spawnSync } from "node:child_process";
|
|
4
4
|
import { existsSync, readFileSync } from "node:fs";
|
|
5
5
|
import { dirname, resolve } from "node:path";
|
|
6
|
-
import { canSkipImageBuild, imageKey, imageKeyLabel, dockerUserFlags, hasBin, log, pruneMuskatImages, resolveDockerfile } from "./util.mjs";
|
|
6
|
+
import { canSkipImageBuild, imageKey, imageKeyLabel, dockerUserFlags, hasBin, log, pruneMuskatImages, resolveDockerfile, buildCacheFlags } from "./util.mjs";
|
|
7
7
|
|
|
8
8
|
export const PYTHON_DEV_IMAGE = "muscat-pk-python-dev";
|
|
9
9
|
|
|
@@ -25,7 +25,7 @@ export async function ensureImage(image = PYTHON_DEV_IMAGE, { platform = null }
|
|
|
25
25
|
const platformFlags = platform ? ["--platform", platform] : [];
|
|
26
26
|
const r = spawnSync(
|
|
27
27
|
"docker",
|
|
28
|
-
["build", ...platformFlags, ...imageKeyLabel(key), "-t", image, "-f", dockerfile, dirname(dockerfile)],
|
|
28
|
+
["build", ...buildCacheFlags(), ...platformFlags, ...imageKeyLabel(key), "-t", image, "-f", dockerfile, dirname(dockerfile)],
|
|
29
29
|
{ stdio: "inherit" },
|
|
30
30
|
);
|
|
31
31
|
if (r.status !== 0) throw new Error("docker build failed.");
|
package/cli/src/ros2.mjs
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { spawnSync } from "node:child_process";
|
|
4
4
|
import { existsSync, readdirSync } from "node:fs";
|
|
5
5
|
import { dirname, resolve } from "node:path";
|
|
6
|
-
import { canSkipImageBuild, cppSdkVersion, pluginRootOrNull, imageKey, imageKeyLabel, dockerUserFlags, hasBin, log, pruneMuskatImages, resolveDockerfile } from "./util.mjs";
|
|
6
|
+
import { canSkipImageBuild, cppSdkVersion, pluginRootOrNull, imageKey, imageKeyLabel, dockerUserFlags, hasBin, log, pruneMuskatImages, resolveDockerfile, buildCacheFlags } from "./util.mjs";
|
|
7
7
|
import { syncCppIde } from "./cppIde.mjs";
|
|
8
8
|
|
|
9
9
|
export const ROS2_DEV_IMAGE = "muscat-pk-ros2-dev";
|
|
@@ -50,7 +50,7 @@ async function buildImage(image, platform, root) {
|
|
|
50
50
|
const buildArgs = [...(sdkVer ? ["--build-arg", `RB_SDK_VERSION=${sdkVer}`] : []), ...imageKeyLabel(key)];
|
|
51
51
|
const r = spawnSync(
|
|
52
52
|
"docker",
|
|
53
|
-
["build", ...platformFlags, ...buildArgs, "-t", image, "-f", dockerfile, dirname(dockerfile)],
|
|
53
|
+
["build", ...buildCacheFlags(), ...platformFlags, ...buildArgs, "-t", image, "-f", dockerfile, dirname(dockerfile)],
|
|
54
54
|
{ stdio: "inherit" },
|
|
55
55
|
);
|
|
56
56
|
if (r.status !== 0) throw new Error("docker build failed.");
|
package/cli/src/util.mjs
CHANGED
|
@@ -323,6 +323,10 @@ export function imageKey(dockerfile, extra = "") {
|
|
|
323
323
|
return createHash("sha256").update(readFileSync(dockerfile)).update(extra).digest("hex").slice(0, 16);
|
|
324
324
|
}
|
|
325
325
|
|
|
326
|
+
// MUSCAT_PK_NO_BUILD_CACHE=1 (CI): build images without Docker's layer cache, so an apt/PyPI/GitHub
|
|
327
|
+
// change that breaks a fresh build fails the test too instead of hiding behind a cached layer.
|
|
328
|
+
export const buildCacheFlags = () => (process.env.MUSCAT_PK_NO_BUILD_CACHE === "1" ? ["--no-cache"] : []);
|
|
329
|
+
|
|
326
330
|
export function imageKeyLabel(key) {
|
|
327
331
|
return ["--label", `${IMAGE_KEY_LABEL}=${key}`];
|
|
328
332
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"generatedAt":
|
|
1
|
+
{"generatedAt":1792588886374,"userSince":1750932757926,"hasCustomBabel":false,"hasCustomWebpack":false,"hasStaticDirs":false,"hasStorybookEslint":true,"refCount":0,"testPackages":{"@vitest/browser":"3.2.4","@vitest/coverage-v8":"3.2.4","playwright":"1.59.1","vitest":"3.2.4"},"hasRouterPackage":false,"monorepo":"Turborepo","packageManager":{"type":"yarn","version":"berry","agent":"yarn@berry"},"preview":{"usesGlobals":false},"framework":{"name":"@storybook/react-vite","options":{}},"builder":"@storybook/builder-vite","renderer":"@storybook/react","portableStoriesFileCount":0,"applicationFileCount":0,"storybookVersion":"8.6.18","storybookVersionSpecifier":"^8.6.4","language":"typescript","storybookPackages":{"@chromatic-com/storybook":{"version":"3.2.7"},"@storybook/addon-essentials":{"version":"8.6.18"},"@storybook/addon-links":{"version":"8.6.18"},"@storybook/addon-onboarding":{"version":"8.6.18"},"@storybook/addon-themes":{"version":"8.6.18"},"@storybook/blocks":{"version":"8.6.18"},"@storybook/experimental-addon-test":{"version":"8.6.18"},"@storybook/react":{"version":"8.6.18"},"@storybook/react-vite":{"version":"8.6.18"},"@storybook/test":{"version":"8.6.18"},"@storybook/theming":{"version":"8.6.18"},"eslint-plugin-storybook":{"version":"0.11.6"},"storybook":{"version":"8.6.18"},"storybook-addon-react-docgen":{"version":"1.2.44"}},"addons":{"$SNIP/node_modules/@storybook/addon-links":{"version":null},"$SNIP/node_modules/@storybook/addon-essentials":{"version":null},"$SNIP/node_modules/@chromatic-com/storybook":{"version":null},"$SNIP/node_modules/@storybook/addon-themes":{"version":null},"$SNIP/node_modules/@storybook/experimental-addon-test":{"version":null}}}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rainbow-robotics/muscat-plugin-kit",
|
|
3
|
-
"version": "1.3.8-dev.
|
|
3
|
+
"version": "1.3.8-dev.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=20"
|
|
@@ -53,8 +53,8 @@
|
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
55
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
56
|
-
"@rainbow-robotics/plugin-ui": "1.3.8-dev.
|
|
57
|
-
"@rainbow-robotics/preview-host": "1.3.8-dev.
|
|
56
|
+
"@rainbow-robotics/plugin-ui": "1.3.8-dev.2",
|
|
57
|
+
"@rainbow-robotics/preview-host": "1.3.8-dev.2",
|
|
58
58
|
"postcss": "^8.5.8",
|
|
59
59
|
"typescript": "^5.8.0",
|
|
60
60
|
"vite-plugin-css-injected-by-js": "^3.5.2",
|