artifacty 0.1.2 → 0.3.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/src/lib/i18n.js CHANGED
@@ -15,7 +15,11 @@ const TRANSLATIONS = {
15
15
  "language.english": "English",
16
16
  "language.korean": "Korean",
17
17
  "dashboard.count": "{count} artifacts",
18
+ "dashboard.range": "{start}-{end} of {total} artifacts",
19
+ "dashboard.searchBackend": "{backend} search",
18
20
  "dashboard.empty": "No artifacts published yet.",
21
+ "dashboard.previous": "Previous",
22
+ "dashboard.next": "Next",
19
23
  "filter.search": "Search",
20
24
  "filter.tag": "Tag",
21
25
  "filter.source": "Source",
@@ -69,7 +73,11 @@ const TRANSLATIONS = {
69
73
  "language.english": "영어",
70
74
  "language.korean": "한국어",
71
75
  "dashboard.count": "아티팩트 {count}개",
76
+ "dashboard.range": "아티팩트 {total}개 중 {start}-{end}",
77
+ "dashboard.searchBackend": "{backend} 검색",
72
78
  "dashboard.empty": "아직 게시된 아티팩트가 없습니다.",
79
+ "dashboard.previous": "이전",
80
+ "dashboard.next": "다음",
73
81
  "filter.search": "검색",
74
82
  "filter.tag": "태그",
75
83
  "filter.source": "소스",
@@ -3,7 +3,8 @@ import { existsSync } from "node:fs";
3
3
  import { homedir } from "node:os";
4
4
  import path from "node:path";
5
5
 
6
- const SUPPORTED_AGENTS = new Set(["all", "claude", "codex", "gemini"]);
6
+ const INSTALL_TARGETS = ["claude", "codex", "gemini", "copilot", "cursor"];
7
+ const SUPPORTED_AGENTS = new Set(["all", ...INSTALL_TARGETS, "github-copilot", "vscode"]);
7
8
  const DEFAULT_MCP_TIMEOUT_MS = 30000;
8
9
 
9
10
  export async function installAgent(agent, options = {}) {
@@ -14,7 +15,7 @@ export async function installAgent(agent, options = {}) {
14
15
 
15
16
  if (normalized === "all") {
16
17
  const results = [];
17
- for (const target of ["claude", "codex", "gemini"]) {
18
+ for (const target of INSTALL_TARGETS) {
18
19
  results.push(await installAgent(target, options));
19
20
  }
20
21
  return {
@@ -29,7 +30,13 @@ export async function installAgent(agent, options = {}) {
29
30
  if (normalized === "codex") {
30
31
  return installCodex(options);
31
32
  }
32
- return installGemini(options);
33
+ if (normalized === "gemini") {
34
+ return installGemini(options);
35
+ }
36
+ if (normalized === "copilot") {
37
+ return installCopilot(options);
38
+ }
39
+ return installCursor(options);
33
40
  }
34
41
 
35
42
  export function createMcpServerConfig(options = {}) {
@@ -96,6 +103,49 @@ export async function installGemini(options = {}) {
96
103
  });
97
104
  }
98
105
 
106
+ export async function installCopilot(options = {}) {
107
+ const projectDir = path.resolve(options.projectDir || process.cwd());
108
+ const targetPath = path.resolve(options.configPath || path.join(projectDir, ".vscode", "mcp.json"));
109
+ const existing = await readJsonFile(targetPath, {});
110
+ const next = {
111
+ ...existing,
112
+ servers: {
113
+ ...(existing.servers || {}),
114
+ artifacty: {
115
+ type: "stdio",
116
+ ...createMcpServerConfig(options)
117
+ }
118
+ }
119
+ };
120
+
121
+ return writeInstallFile({
122
+ agent: "copilot",
123
+ path: targetPath,
124
+ dryRun: options.dryRun,
125
+ content: `${JSON.stringify(next, null, 2)}\n`
126
+ });
127
+ }
128
+
129
+ export async function installCursor(options = {}) {
130
+ const projectDir = path.resolve(options.projectDir || process.cwd());
131
+ const targetPath = path.resolve(options.configPath || path.join(projectDir, ".cursor", "mcp.json"));
132
+ const existing = await readJsonFile(targetPath, {});
133
+ const next = {
134
+ ...existing,
135
+ mcpServers: {
136
+ ...(existing.mcpServers || {}),
137
+ artifacty: createMcpServerConfig(options)
138
+ }
139
+ };
140
+
141
+ return writeInstallFile({
142
+ agent: "cursor",
143
+ path: targetPath,
144
+ dryRun: options.dryRun,
145
+ content: `${JSON.stringify(next, null, 2)}\n`
146
+ });
147
+ }
148
+
99
149
  export async function installCodex(options = {}) {
100
150
  const targetPath = path.resolve(options.configPath || path.join(homedir(), ".codex", "config.toml"));
101
151
  const existing = await readTextFile(targetPath, "");
@@ -179,7 +229,11 @@ async function readTextFile(filePath, fallback) {
179
229
  }
180
230
 
181
231
  function normalizeAgent(agent) {
182
- return String(agent || "").trim().toLowerCase();
232
+ const normalized = String(agent || "").trim().toLowerCase();
233
+ if (normalized === "github-copilot" || normalized === "vscode") {
234
+ return "copilot";
235
+ }
236
+ return normalized;
183
237
  }
184
238
 
185
239
  function normalizeTimeoutMs(value) {