@ship-ui/core 0.19.3 → 0.19.4

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/bin/mcp/index.js CHANGED
@@ -13684,13 +13684,21 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
13684
13684
  const { name, arguments: args } = request.params;
13685
13685
  if (name === "search_components") {
13686
13686
  const { query } = args;
13687
- const results = components.filter((c) => c.name.toLowerCase().includes(query.toLowerCase()) || c.selector.toLowerCase().includes(query.toLowerCase()));
13687
+ const results = components.filter((c) => {
13688
+ const q = query.toLowerCase();
13689
+ return c.name.toLowerCase().includes(q) || c.selector.toLowerCase().includes(q) || c.keywords?.some((k) => k.toLowerCase().includes(q));
13690
+ });
13688
13691
  return {
13689
13692
  content: [
13690
13693
  {
13691
13694
  type: "text",
13692
- text: JSON.stringify(results.map((c) => ({ name: c.name, selector: c.selector, description: c.description?.split(`
13693
- `)[0] })), null, 2)
13695
+ text: JSON.stringify(results.map((c) => ({
13696
+ name: c.name,
13697
+ selector: c.selector,
13698
+ description: c.description?.split(`
13699
+ `)[0],
13700
+ keywords: c.keywords
13701
+ })), null, 2)
13694
13702
  }
13695
13703
  ]
13696
13704
  };
@@ -13760,6 +13768,9 @@ Here are the component details:
13760
13768
  Description:
13761
13769
  ${component.description || "No description available"}
13762
13770
 
13771
+ Keywords:
13772
+ ${component.keywords?.join(", ") || "None"}
13773
+
13763
13774
  Inputs:
13764
13775
  ${component.inputs.map((i) => `- ${i.name} (${i.type})${i.defaultValue ? ` (default: ${i.defaultValue})` : ""}${i.options ? ` [options: ${i.options.join(", ")}]` : ""}${i.description ? `: ${i.description}` : ""}`).join(`
13765
13776
  `)}
Binary file
package/bin/ship-fg.mjs CHANGED
@@ -3235,7 +3235,7 @@ import { parseArgs } from "util";
3235
3235
  // bin/src/ship-fg.ts
3236
3236
  import { spawnSync } from "child_process";
3237
3237
  import { watch } from "fs";
3238
- import { readFile as readFile2, writeFile, readdir } from "fs/promises";
3238
+ import { readFile as readFile2, writeFile, readdir, mkdir } from "fs/promises";
3239
3239
  import { dirname, join, resolve } from "path";
3240
3240
  import { fileURLToPath } from "url";
3241
3241
  import { gzipSync } from "zlib";
@@ -3576,7 +3576,12 @@ var textMateSnippet = async (GLYPH_MAP) => {
3576
3576
  }
3577
3577
  }
3578
3578
  `;
3579
- await writeFile("./.vscode/html.code-snippets", iconsSnippetContent);
3579
+ try {
3580
+ await mkdir("./.vscode", { recursive: true });
3581
+ await writeFile("./.vscode/html.code-snippets", iconsSnippetContent);
3582
+ } catch (error) {
3583
+ console.warn("⚠️ Could not generate VS Code snippets:", error);
3584
+ }
3580
3585
  };
3581
3586
  function capitalize(str) {
3582
3587
  return str.charAt(0).toUpperCase() + str.slice(1);
@@ -2,7 +2,7 @@
2
2
 
3
3
  import { spawnSync } from 'child_process';
4
4
  import { FSWatcher, watch } from 'fs';
5
- import { readFile, writeFile, readdir } from 'fs/promises';
5
+ import { readFile, writeFile, readdir, mkdir } from 'fs/promises';
6
6
  import { dirname, join, resolve } from 'path';
7
7
  import { fileURLToPath } from 'url';
8
8
  import { gzipSync } from 'zlib';
@@ -309,7 +309,13 @@ const textMateSnippet = async (GLYPH_MAP: Record<string, [string, string]>) => {
309
309
  }
310
310
  `;
311
311
 
312
- await writeFile('./.vscode/html.code-snippets', iconsSnippetContent);
312
+ try {
313
+ await mkdir('./.vscode', { recursive: true });
314
+ await writeFile('./.vscode/html.code-snippets', iconsSnippetContent);
315
+ } catch (error) {
316
+ // Gracefully ignore snippet generation failures (e.g. in read-only CI environments)
317
+ console.warn('⚠️ Could not generate VS Code snippets:', error);
318
+ }
313
319
  };
314
320
 
315
321
  function capitalize(str: string) {