@penpair/docker 0.1.3 → 0.2.0
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/init.js +1 -1
- package/dist/lifecycle.js +6 -3
- package/package.json +2 -2
package/dist/init.js
CHANGED
|
@@ -30,7 +30,7 @@ export async function initDocker(root, options = {}) {
|
|
|
30
30
|
config = await loadConfig(root);
|
|
31
31
|
}
|
|
32
32
|
catch (error) {
|
|
33
|
-
if (!(error instanceof ConfigError) ||
|
|
33
|
+
if (!(error instanceof ConfigError) || error.code !== "missing")
|
|
34
34
|
throw error;
|
|
35
35
|
const free = options.isFree ?? isPortFree;
|
|
36
36
|
const frontend = options.port ?? (await firstFreePort(9001, [], free));
|
package/dist/lifecycle.js
CHANGED
|
@@ -2,7 +2,7 @@ import { createHash } from "node:crypto";
|
|
|
2
2
|
import { createReadStream } from "node:fs";
|
|
3
3
|
import { mkdir, readFile, stat, writeFile } from "node:fs/promises";
|
|
4
4
|
import path from "node:path";
|
|
5
|
-
import { composeProjectOf, endpointIsInstance, frontendUrl, instancePaths, LifecycleError, } from "@penpair/core";
|
|
5
|
+
import { composeProjectOf, endpointIsInstance, frontendUrl, fileIdentityCheck, instancePaths, LifecycleError, } from "@penpair/core";
|
|
6
6
|
import { readEnvValues } from "./secrets.js";
|
|
7
7
|
const defaultSleep = (milliseconds) => new Promise((resolve) => setTimeout(resolve, milliseconds));
|
|
8
8
|
const sleepOf = (c) => c.sleep ?? defaultSleep;
|
|
@@ -261,11 +261,14 @@ export async function doctor(c, options = {}) {
|
|
|
261
261
|
}
|
|
262
262
|
else if (options.mcp) {
|
|
263
263
|
try {
|
|
264
|
-
const
|
|
264
|
+
const actual = await options.mcp.connect();
|
|
265
|
+
const { file } = actual;
|
|
265
266
|
add("editor and plugin", true, `connected to file "${file}"`);
|
|
267
|
+
if (c.config.file)
|
|
268
|
+
out.push(fileIdentityCheck(c.config, actual));
|
|
266
269
|
}
|
|
267
270
|
catch (error) {
|
|
268
|
-
add("editor and plugin", false, String(error.message).split("\n")[0] ?? "not connected", "Open a file in Penpot, choose File, MCP Server, Connect, and keep the tab visible.");
|
|
271
|
+
add("editor and plugin", false, String(error.message).split("\n")[0] ?? "not connected", "Open a file in Penpot, choose File, MCP Server, Connect, and keep the tab visible in a separate window if needed.");
|
|
269
272
|
}
|
|
270
273
|
}
|
|
271
274
|
return out;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@penpair/docker",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Everything in @penpair/core, plus running Penpot in Docker on your computer: one instance per project, generated secrets, up and down, backup, verify and restore.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"access": "public"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@penpair/core": "0.
|
|
45
|
+
"@penpair/core": "0.2.0"
|
|
46
46
|
},
|
|
47
47
|
"bin": {
|
|
48
48
|
"penpair": "dist/cli.js"
|