@tempad-dev/mcp 0.3.7 → 0.3.8

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.
@@ -7,13 +7,13 @@ import pino from "pino";
7
7
  var package_default = {
8
8
  name: "@tempad-dev/mcp",
9
9
  description: "MCP server for TemPad Dev.",
10
- version: "0.3.7",
10
+ version: "0.3.8",
11
11
  type: "module",
12
- main: "dist/cli.js",
13
- bin: "dist/cli.js",
12
+ main: "dist/cli.mjs",
13
+ bin: "dist/cli.mjs",
14
14
  files: ["dist/**/*", "README.md"],
15
15
  scripts: {
16
- "build": "tsdown && cp src/instructions.md dist/instructions.md",
16
+ "build": "tsdown",
17
17
  "typecheck": "tsc -p tsconfig.json --noEmit",
18
18
  "lint": "eslint . --ext .ts,.mts,.cts,.js,.mjs,.cjs",
19
19
  "format": "prettier --write \"**/*.{js,ts,mjs,cjs,cts,mts,json,md}\"",
@@ -34,6 +34,7 @@ var package_default = {
34
34
  "@types/ws": "^8.5.12",
35
35
  "tsdown": "^0.17.2",
36
36
  "typescript": "^5.9.3",
37
+ "unplugin-raw": "^0.6.3",
37
38
  "zod": "^4.1.12"
38
39
  }
39
40
  };
@@ -89,4 +90,4 @@ const SOCK_PATH = process.platform === "win32" ? "\\\\.\\pipe\\tempad-mcp" : joi
89
90
 
90
91
  //#endregion
91
92
  export { SOCK_PATH as a, log as c, RUNTIME_DIR as i, LOCK_PATH as n, ensureDir as o, PACKAGE_VERSION as r, ensureFile as s, ASSET_DIR as t };
92
- //# sourceMappingURL=shared-DzXJNYhZ.mjs.map
93
+ //# sourceMappingURL=shared-DlR95qf4.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared-DlR95qf4.mjs","names":["packageJson"],"sources":["../package.json","../src/shared.ts"],"sourcesContent":["{\n \"name\": \"@tempad-dev/mcp\",\n \"description\": \"MCP server for TemPad Dev.\",\n \"version\": \"0.3.8\",\n \"type\": \"module\",\n \"main\": \"dist/cli.mjs\",\n \"bin\": \"dist/cli.mjs\",\n \"files\": [\n \"dist/**/*\",\n \"README.md\"\n ],\n \"scripts\": {\n \"build\": \"tsdown\",\n \"typecheck\": \"tsc -p tsconfig.json --noEmit\",\n \"lint\": \"eslint . --ext .ts,.mts,.cts,.js,.mjs,.cjs\",\n \"format\": \"prettier --write \\\"**/*.{js,ts,mjs,cjs,cts,mts,json,md}\\\"\",\n \"prepublishOnly\": \"pnpm run build\"\n },\n \"dependencies\": {\n \"@modelcontextprotocol/sdk\": \"^1.24.0\",\n \"nanoid\": \"^5.1.6\",\n \"pino\": \"^9.14.0\",\n \"pino-pretty\": \"^11.2.2\",\n \"proper-lockfile\": \"^4.1.2\",\n \"ws\": \"^8.18.3\"\n },\n \"devDependencies\": {\n \"@tempad-dev/mcp-shared\": \"workspace:^0.1.0\",\n \"@types/node\": \"^22.10.2\",\n \"@types/proper-lockfile\": \"^4.1.4\",\n \"@types/ws\": \"^8.5.12\",\n \"tsdown\": \"^0.17.2\",\n \"typescript\": \"^5.9.3\",\n \"unplugin-raw\": \"^0.6.3\",\n \"zod\": \"^4.1.12\"\n }\n}\n","import { closeSync, mkdirSync, openSync } from 'node:fs'\nimport { tmpdir } from 'node:os'\nimport { join } from 'node:path'\nimport pino from 'pino'\n\nimport packageJson from '../package.json' assert { type: 'json' }\n\nexport function ensureDir(dirPath: string): void {\n mkdirSync(dirPath, { recursive: true, mode: 0o700 })\n}\n\nconst pkg = packageJson as { version?: unknown }\nexport const PACKAGE_VERSION = typeof pkg.version === 'string' ? pkg.version : '0.0.0'\n\nfunction resolveRuntimeDir(): string {\n if (process.env.TEMPAD_MCP_RUNTIME_DIR) return process.env.TEMPAD_MCP_RUNTIME_DIR\n return join(tmpdir(), 'tempad-dev', 'run')\n}\n\nfunction resolveLogDir(): string {\n if (process.env.TEMPAD_MCP_LOG_DIR) return process.env.TEMPAD_MCP_LOG_DIR\n return join(tmpdir(), 'tempad-dev', 'log')\n}\n\nfunction resolveAssetDir(): string {\n if (process.env.TEMPAD_MCP_ASSET_DIR) return process.env.TEMPAD_MCP_ASSET_DIR\n return join(tmpdir(), 'tempad-dev', 'assets')\n}\n\nexport const RUNTIME_DIR = resolveRuntimeDir()\nexport const LOG_DIR = resolveLogDir()\nexport const ASSET_DIR = resolveAssetDir()\n\nensureDir(RUNTIME_DIR)\nensureDir(LOG_DIR)\nensureDir(ASSET_DIR)\n\nexport function ensureFile(filePath: string): void {\n const fd = openSync(filePath, 'a')\n closeSync(fd)\n}\n\nexport const LOCK_PATH = join(RUNTIME_DIR, 'mcp.lock')\nensureFile(LOCK_PATH)\n\nconst timestamp = new Date().toISOString().replaceAll(':', '-').replaceAll('.', '-')\nconst pid = process.pid\nconst LOG_FILE = join(LOG_DIR, `mcp-${timestamp}-${pid}.log`)\n\nconst prettyTransport = pino.transport({\n target: 'pino-pretty',\n options: {\n translateTime: 'SYS:HH:MM:ss',\n destination: LOG_FILE\n }\n})\n\nexport const log = pino(\n {\n level: process.env.DEBUG ? 'debug' : 'info',\n msgPrefix: '[tempad-dev/mcp] '\n },\n prettyTransport\n)\n\nexport const SOCK_PATH =\n process.platform === 'win32' ? '\\\\\\\\.\\\\pipe\\\\tempad-mcp' : join(RUNTIME_DIR, 'mcp.sock')\n"],"mappings":";;;;;;sBAAA;OACU;cACO;UACJ;OACH;OACA;MACD;QACE,CACP,aACA,YACD;UACU;EACT,SAAS;EACT,aAAa;EACb,QAAQ;EACR,UAAU;EACV,kBAAkB;EACnB;eACe;EACd,6BAA6B;EAC7B,UAAU;EACV,QAAQ;EACR,eAAe;EACf,mBAAmB;EACnB,MAAM;EACP;kBACkB;EACjB,0BAA0B;EAC1B,eAAe;EACf,0BAA0B;EAC1B,aAAa;EACb,UAAU;EACV,cAAc;EACd,gBAAgB;EAChB,OAAO;EACR;CACF;;;;AC7BD,SAAgB,UAAU,SAAuB;AAC/C,WAAU,SAAS;EAAE,WAAW;EAAM,MAAM;EAAO,CAAC;;AAGtD,MAAM,MAAMA;AACZ,MA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",
6
- "main": "dist/cli.js",
7
- "bin": "dist/cli.js",
6
+ "main": "dist/cli.mjs",
7
+ "bin": "dist/cli.mjs",
8
8
  "files": [
9
9
  "dist/**/*",
10
10
  "README.md"
@@ -24,10 +24,11 @@
24
24
  "@types/ws": "^8.5.12",
25
25
  "tsdown": "^0.17.2",
26
26
  "typescript": "^5.9.3",
27
+ "unplugin-raw": "^0.6.3",
27
28
  "zod": "^4.1.12"
28
29
  },
29
30
  "scripts": {
30
- "build": "tsdown && cp src/instructions.md dist/instructions.md",
31
+ "build": "tsdown",
31
32
  "typecheck": "tsc -p tsconfig.json --noEmit",
32
33
  "lint": "eslint . --ext .ts,.mts,.cts,.js,.mjs,.cjs",
33
34
  "format": "prettier --write \"**/*.{js,ts,mjs,cjs,cts,mts,json,md}\""
@@ -1,11 +0,0 @@
1
- You are connected to a Figma design file via the MCP server. Convert design elements into production code, preserving design intent while fitting the user’s codebase conventions.
2
-
3
- - Start from `get_code` as the baseline, then refactor to match project conventions (components, styling system, file structure, naming).
4
- - Layout confidence:
5
- - If `get_code` contains no `data-hint-auto-layout`, it likely indicates the layout is explicit. You can be more confident implementing directly from `get_code`.
6
- - If any `data-hint-auto-layout` is `none` or `inferred`, the corresponding layout may be uncertain. If you feel ambiguity or uncertainty, consult `get_structure` (hierarchy + geometry) and `get_screenshot` (visual intent such as layering/overlap/masks/shadows/translucency).
7
- - If `data-hint-component` plus repetition supports it, extract reusable components/variants aligned with project patterns. Do not preserve hint strings in output.
8
- - Tokens: follow the project’s token/theming framework; if needed, use `get_code.usedToken` metadata (collection, mode) to extend a responsive token system within that framework.
9
- - Assets: follow the project’s existing conventions/practices (icon system, asset pipeline, import/path rules, optimization) to decide how to represent and reference assets. If `get_code` uses resource URIs, you may replace them with the project’s canonical references when appropriate without changing rendering.
10
- - Do not output any `data-*` attributes returned by `get_code`.
11
- - For SVG/vector assets: use the exact provided asset, preserving `path` data, `viewBox`, and full SVG structure. Never redraw or approximate vectors.
@@ -1 +0,0 @@
1
- {"version":3,"file":"shared-DzXJNYhZ.mjs","names":["packageJson"],"sources":["../package.json","../src/shared.ts"],"sourcesContent":["{\n \"name\": \"@tempad-dev/mcp\",\n \"description\": \"MCP server for TemPad Dev.\",\n \"version\": \"0.3.7\",\n \"type\": \"module\",\n \"main\": \"dist/cli.js\",\n \"bin\": \"dist/cli.js\",\n \"files\": [\n \"dist/**/*\",\n \"README.md\"\n ],\n \"scripts\": {\n \"build\": \"tsdown && cp src/instructions.md dist/instructions.md\",\n \"typecheck\": \"tsc -p tsconfig.json --noEmit\",\n \"lint\": \"eslint . --ext .ts,.mts,.cts,.js,.mjs,.cjs\",\n \"format\": \"prettier --write \\\"**/*.{js,ts,mjs,cjs,cts,mts,json,md}\\\"\",\n \"prepublishOnly\": \"pnpm run build\"\n },\n \"dependencies\": {\n \"@modelcontextprotocol/sdk\": \"^1.24.0\",\n \"nanoid\": \"^5.1.6\",\n \"pino\": \"^9.14.0\",\n \"pino-pretty\": \"^11.2.2\",\n \"proper-lockfile\": \"^4.1.2\",\n \"ws\": \"^8.18.3\"\n },\n \"devDependencies\": {\n \"@tempad-dev/mcp-shared\": \"workspace:^0.1.0\",\n \"@types/node\": \"^22.10.2\",\n \"@types/proper-lockfile\": \"^4.1.4\",\n \"@types/ws\": \"^8.5.12\",\n \"tsdown\": \"^0.17.2\",\n \"typescript\": \"^5.9.3\",\n \"zod\": \"^4.1.12\"\n }\n}\n","import { closeSync, mkdirSync, openSync } from 'node:fs'\nimport { tmpdir } from 'node:os'\nimport { join } from 'node:path'\nimport pino from 'pino'\n\nimport packageJson from '../package.json' assert { type: 'json' }\n\nexport function ensureDir(dirPath: string): void {\n mkdirSync(dirPath, { recursive: true, mode: 0o700 })\n}\n\nconst pkg = packageJson as { version?: unknown }\nexport const PACKAGE_VERSION = typeof pkg.version === 'string' ? pkg.version : '0.0.0'\n\nfunction resolveRuntimeDir(): string {\n if (process.env.TEMPAD_MCP_RUNTIME_DIR) return process.env.TEMPAD_MCP_RUNTIME_DIR\n return join(tmpdir(), 'tempad-dev', 'run')\n}\n\nfunction resolveLogDir(): string {\n if (process.env.TEMPAD_MCP_LOG_DIR) return process.env.TEMPAD_MCP_LOG_DIR\n return join(tmpdir(), 'tempad-dev', 'log')\n}\n\nfunction resolveAssetDir(): string {\n if (process.env.TEMPAD_MCP_ASSET_DIR) return process.env.TEMPAD_MCP_ASSET_DIR\n return join(tmpdir(), 'tempad-dev', 'assets')\n}\n\nexport const RUNTIME_DIR = resolveRuntimeDir()\nexport const LOG_DIR = resolveLogDir()\nexport const ASSET_DIR = resolveAssetDir()\n\nensureDir(RUNTIME_DIR)\nensureDir(LOG_DIR)\nensureDir(ASSET_DIR)\n\nexport function ensureFile(filePath: string): void {\n const fd = openSync(filePath, 'a')\n closeSync(fd)\n}\n\nexport const LOCK_PATH = join(RUNTIME_DIR, 'mcp.lock')\nensureFile(LOCK_PATH)\n\nconst timestamp = new Date().toISOString().replaceAll(':', '-').replaceAll('.', '-')\nconst pid = process.pid\nconst LOG_FILE = join(LOG_DIR, `mcp-${timestamp}-${pid}.log`)\n\nconst prettyTransport = pino.transport({\n target: 'pino-pretty',\n options: {\n translateTime: 'SYS:HH:MM:ss',\n destination: LOG_FILE\n }\n})\n\nexport const log = pino(\n {\n level: process.env.DEBUG ? 'debug' : 'info',\n msgPrefix: '[tempad-dev/mcp] '\n },\n prettyTransport\n)\n\nexport const SOCK_PATH =\n process.platform === 'win32' ? '\\\\\\\\.\\\\pipe\\\\tempad-mcp' : join(RUNTIME_DIR, 'mcp.sock')\n"],"mappings":";;;;;;sBAAA;OACU;cACO;UACJ;OACH;OACA;MACD;QACE,CACP,aACA,YACD;UACU;EACT,SAAS;EACT,aAAa;EACb,QAAQ;EACR,UAAU;EACV,kBAAkB;EACnB;eACe;EACd,6BAA6B;EAC7B,UAAU;EACV,QAAQ;EACR,eAAe;EACf,mBAAmB;EACnB,MAAM;EACP;kBACkB;EACjB,0BAA0B;EAC1B,eAAe;EACf,0BAA0B;EAC1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