makecc 0.2.12 → 0.2.13
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/client/assets/index-CXXgu628.css +1 -0
- package/dist/client/assets/index-PJfSWqWr.js +150 -0
- package/dist/client/index.html +3 -3
- package/dist/server/index.js +30 -0
- package/package.json +1 -1
- package/server/index.ts +39 -0
- package/dist/client/assets/index-oO8rpFoq.js +0 -150
- package/dist/client/assets/index-v9IFpWkA.css +0 -1
package/dist/client/index.html
CHANGED
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
|
-
<title>
|
|
8
|
-
<script type="module" crossorigin src="/assets/index-
|
|
9
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
7
|
+
<title>makecc</title>
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-PJfSWqWr.js"></script>
|
|
9
|
+
<link rel="stylesheet" crossorigin href="/assets/index-CXXgu628.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|
|
12
12
|
<div id="root"></div>
|
package/dist/server/index.js
CHANGED
|
@@ -314,6 +314,36 @@ app.post('/api/skill/test', async (req, res) => {
|
|
|
314
314
|
res.status(500).json({ message: errorMessage });
|
|
315
315
|
}
|
|
316
316
|
});
|
|
317
|
+
// Save workflow output to local project
|
|
318
|
+
app.post('/api/save/workflow-output', async (req, res) => {
|
|
319
|
+
try {
|
|
320
|
+
const { workflowName, files } = req.body;
|
|
321
|
+
if (!workflowName || !files || files.length === 0) {
|
|
322
|
+
return res.status(400).json({ message: 'Workflow name and files are required' });
|
|
323
|
+
}
|
|
324
|
+
// output/워크플로우명/ 폴더 생성
|
|
325
|
+
const sanitizedName = workflowName.replace(/[/\\?%*:|"<>]/g, '_').replace(/\s+/g, '_');
|
|
326
|
+
const outputDir = join(fileService.getProjectPath(), 'output', sanitizedName);
|
|
327
|
+
await fs.mkdir(outputDir, { recursive: true });
|
|
328
|
+
const savedFiles = [];
|
|
329
|
+
for (const file of files) {
|
|
330
|
+
const filePath = join(outputDir, file.name);
|
|
331
|
+
await fs.writeFile(filePath, file.content, 'utf-8');
|
|
332
|
+
savedFiles.push({ name: file.name, path: filePath });
|
|
333
|
+
console.log(`Saved workflow output: ${filePath}`);
|
|
334
|
+
}
|
|
335
|
+
res.json({
|
|
336
|
+
success: true,
|
|
337
|
+
outputDir,
|
|
338
|
+
files: savedFiles,
|
|
339
|
+
});
|
|
340
|
+
}
|
|
341
|
+
catch (error) {
|
|
342
|
+
const errorMessage = error instanceof Error ? error.message : 'Unknown error';
|
|
343
|
+
console.error('Save workflow output error:', errorMessage);
|
|
344
|
+
res.status(500).json({ message: errorMessage });
|
|
345
|
+
}
|
|
346
|
+
});
|
|
317
347
|
// Read skill files for preview
|
|
318
348
|
app.get('/api/skill/files', async (req, res) => {
|
|
319
349
|
try {
|
package/package.json
CHANGED
package/server/index.ts
CHANGED
|
@@ -355,6 +355,45 @@ app.post('/api/skill/test', async (req, res) => {
|
|
|
355
355
|
}
|
|
356
356
|
});
|
|
357
357
|
|
|
358
|
+
// Save workflow output to local project
|
|
359
|
+
app.post('/api/save/workflow-output', async (req, res) => {
|
|
360
|
+
try {
|
|
361
|
+
const { workflowName, files } = req.body as {
|
|
362
|
+
workflowName: string;
|
|
363
|
+
files: Array<{ name: string; content: string }>;
|
|
364
|
+
};
|
|
365
|
+
|
|
366
|
+
if (!workflowName || !files || files.length === 0) {
|
|
367
|
+
return res.status(400).json({ message: 'Workflow name and files are required' });
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
// output/워크플로우명/ 폴더 생성
|
|
371
|
+
const sanitizedName = workflowName.replace(/[/\\?%*:|"<>]/g, '_').replace(/\s+/g, '_');
|
|
372
|
+
const outputDir = join(fileService.getProjectPath(), 'output', sanitizedName);
|
|
373
|
+
|
|
374
|
+
await fs.mkdir(outputDir, { recursive: true });
|
|
375
|
+
|
|
376
|
+
const savedFiles: Array<{ name: string; path: string }> = [];
|
|
377
|
+
|
|
378
|
+
for (const file of files) {
|
|
379
|
+
const filePath = join(outputDir, file.name);
|
|
380
|
+
await fs.writeFile(filePath, file.content, 'utf-8');
|
|
381
|
+
savedFiles.push({ name: file.name, path: filePath });
|
|
382
|
+
console.log(`Saved workflow output: ${filePath}`);
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
res.json({
|
|
386
|
+
success: true,
|
|
387
|
+
outputDir,
|
|
388
|
+
files: savedFiles,
|
|
389
|
+
});
|
|
390
|
+
} catch (error) {
|
|
391
|
+
const errorMessage = error instanceof Error ? error.message : 'Unknown error';
|
|
392
|
+
console.error('Save workflow output error:', errorMessage);
|
|
393
|
+
res.status(500).json({ message: errorMessage });
|
|
394
|
+
}
|
|
395
|
+
});
|
|
396
|
+
|
|
358
397
|
// Read skill files for preview
|
|
359
398
|
app.get('/api/skill/files', async (req, res) => {
|
|
360
399
|
try {
|