@ject-5-fe/figma-plugin 0.1.0 → 0.1.1

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.
@@ -4,6 +4,10 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
5
  var __getProtoOf = Object.getPrototypeOf;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
7
11
  var __copyProps = (to, from, except, desc) => {
8
12
  if (from && typeof from === "object" || typeof from === "function") {
9
13
  for (let key of __getOwnPropNames(from))
@@ -20,14 +24,20 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
20
24
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
21
25
  mod
22
26
  ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
23
28
 
24
29
  // src/server.ts
30
+ var server_exports = {};
31
+ __export(server_exports, {
32
+ compressData: () => compressData
33
+ });
34
+ module.exports = __toCommonJS(server_exports);
25
35
  var import_mcp = require("@modelcontextprotocol/sdk/server/mcp.js");
26
36
  var import_stdio = require("@modelcontextprotocol/sdk/server/stdio.js");
27
37
  var import_uuid = require("uuid");
28
38
  var import_ws = __toESM(require("ws"), 1);
29
- var import_zod = require("zod");
30
39
  var import_zlib = require("zlib");
40
+ var import_zod = require("zod");
31
41
  var logger = {
32
42
  info: (message) => process.stderr.write(`[INFO] ${message}
33
43
  `),
@@ -41,10 +51,13 @@ var logger = {
41
51
  `)
42
52
  };
43
53
  function compressData(data) {
44
- const jsonString = JSON.stringify(data, null, 0);
54
+ const jsonString = JSON.stringify(data);
45
55
  const compressed = (0, import_zlib.gzipSync)(jsonString);
46
56
  const base64 = compressed.toString("base64");
47
- logger.info(`Compression: ${jsonString.length} bytes -> ${base64.length} bytes (${Math.round(base64.length / jsonString.length * 100)}%)`);
57
+ const originalBytes = Buffer.byteLength(jsonString, "utf8");
58
+ console.info(
59
+ `Compression: ${originalBytes} bytes -> ${compressed.length} bytes (ratio ${(compressed.length / originalBytes * 100).toFixed(1)}%)`
60
+ );
48
61
  return base64;
49
62
  }
50
63
  var ws = null;
@@ -96,7 +109,9 @@ server.tool(
96
109
  content: [
97
110
  {
98
111
  type: "text",
99
- text: `[GZIP_BASE64]${compressed}`
112
+ text: `IMPORTANT: \uC774 \uB370\uC774\uD130\uB97C \uC989\uC2DC /Users/jh/JECT-5-FE/shared/figma-plugin/temp-figma-data.txt \uD30C\uC77C\uC5D0 \uC800\uC7A5\uD558\uC138\uC694. \uC808\uB300\uB85C \uB514\uCF54\uB529\uC744 \uC2DC\uB3C4\uD558\uC9C0 \uB9C8\uC138\uC694.
113
+
114
+ [GZIP_BASE64]${compressed}`
100
115
  }
101
116
  ]
102
117
  };
@@ -316,3 +331,7 @@ main().catch((error) => {
316
331
  );
317
332
  process.exit(1);
318
333
  });
334
+ // Annotate the CommonJS export names for ESM import in node:
335
+ 0 && (module.exports = {
336
+ compressData
337
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ject-5-fe/figma-plugin",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "type": "module",
5
5
  "private": "false",
6
6
  "scripts": {