@blocklet/pages-kit-block-studio 0.5.55 → 0.5.56
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/lib/cjs/middlewares/init-block-studio-router.js +9 -9
- package/lib/cjs/middlewares/init-resource-router.js +1 -1
- package/lib/cjs/tsconfig.tsbuildinfo +1 -1
- package/lib/cjs/utils/generate-wrapper-code.js +1 -1
- package/lib/esm/middlewares/init-block-studio-router.js +9 -9
- package/lib/esm/middlewares/init-resource-router.js +1 -1
- package/lib/esm/tsconfig.tsbuildinfo +1 -1
- package/lib/esm/utils/generate-wrapper-code.js +1 -1
- package/lib/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
|
@@ -154,7 +154,7 @@ exports.initBlockStudioRouter.get('/', async (req, res) => {
|
|
|
154
154
|
return res.json(metadata);
|
|
155
155
|
}
|
|
156
156
|
catch (error) {
|
|
157
|
-
return res.status(
|
|
157
|
+
return res.status(400).json({ error: 'Failed to read file' });
|
|
158
158
|
}
|
|
159
159
|
});
|
|
160
160
|
exports.initBlockStudioRouter.post('/', async (req, res) => {
|
|
@@ -202,7 +202,7 @@ exports.initBlockStudioRouter.post('/', async (req, res) => {
|
|
|
202
202
|
return res.json({ success: true, content: mergedContent, message: 'Updated' });
|
|
203
203
|
}
|
|
204
204
|
catch (error) {
|
|
205
|
-
return res.status(
|
|
205
|
+
return res.status(400).json({ error: 'Failed to write file' });
|
|
206
206
|
}
|
|
207
207
|
});
|
|
208
208
|
exports.initBlockStudioRouter.post('/create', async (req, res) => {
|
|
@@ -264,7 +264,7 @@ exports.initBlockStudioRouter.post('/create', async (req, res) => {
|
|
|
264
264
|
}
|
|
265
265
|
catch (error) {
|
|
266
266
|
console.error('Failed to create block:', error);
|
|
267
|
-
return res.status(
|
|
267
|
+
return res.status(400).json({ error: 'Failed to create block' });
|
|
268
268
|
}
|
|
269
269
|
});
|
|
270
270
|
exports.initBlockStudioRouter.get('/resources', async (req, res) => {
|
|
@@ -358,7 +358,7 @@ exports.initBlockStudioRouter.post('/properties-to-interface', async (req, res)
|
|
|
358
358
|
}
|
|
359
359
|
catch (conversionError) {
|
|
360
360
|
console.error('Failed to convert properties to interface:', conversionError);
|
|
361
|
-
return res.status(
|
|
361
|
+
return res.status(400).json({
|
|
362
362
|
success: false,
|
|
363
363
|
error: `Failed to convert properties to interface: ${conversionError.message}`,
|
|
364
364
|
});
|
|
@@ -366,7 +366,7 @@ exports.initBlockStudioRouter.post('/properties-to-interface', async (req, res)
|
|
|
366
366
|
}
|
|
367
367
|
catch (error) {
|
|
368
368
|
console.error('Failed to generate interface:', error);
|
|
369
|
-
return res.status(
|
|
369
|
+
return res.status(400).json({
|
|
370
370
|
success: false,
|
|
371
371
|
error: `Failed to generate interface: ${error.message}`,
|
|
372
372
|
});
|
|
@@ -424,7 +424,7 @@ exports.initBlockStudioRouter.post('/interface-to-properties', async (req, res)
|
|
|
424
424
|
}
|
|
425
425
|
catch (conversionError) {
|
|
426
426
|
console.error('Failed to convert interface to properties:', conversionError);
|
|
427
|
-
return res.status(
|
|
427
|
+
return res.status(400).json({
|
|
428
428
|
success: false,
|
|
429
429
|
error: `Failed to convert interface to properties: ${conversionError.message}`,
|
|
430
430
|
});
|
|
@@ -432,7 +432,7 @@ exports.initBlockStudioRouter.post('/interface-to-properties', async (req, res)
|
|
|
432
432
|
}
|
|
433
433
|
catch (error) {
|
|
434
434
|
console.error('Failed to generate metadata:', error);
|
|
435
|
-
return res.status(
|
|
435
|
+
return res.status(400).json({
|
|
436
436
|
success: false,
|
|
437
437
|
error: `Failed to generate metadata: ${error.message}`,
|
|
438
438
|
});
|
|
@@ -494,7 +494,7 @@ exports.initBlockStudioRouter.delete('/delete', async (req, res) => {
|
|
|
494
494
|
}
|
|
495
495
|
catch (deleteError) {
|
|
496
496
|
console.error('Failed to delete component directory:', deleteError);
|
|
497
|
-
return res.status(
|
|
497
|
+
return res.status(400).json({
|
|
498
498
|
success: false,
|
|
499
499
|
error: `Failed to delete component directory: ${deleteError.message}`,
|
|
500
500
|
});
|
|
@@ -502,7 +502,7 @@ exports.initBlockStudioRouter.delete('/delete', async (req, res) => {
|
|
|
502
502
|
}
|
|
503
503
|
catch (error) {
|
|
504
504
|
console.error('Failed to delete component:', error);
|
|
505
|
-
return res.status(
|
|
505
|
+
return res.status(400).json({
|
|
506
506
|
success: false,
|
|
507
507
|
error: `Failed to delete component: ${error.message}`,
|
|
508
508
|
});
|
|
@@ -292,7 +292,7 @@ exports.initResourceRouter.post('/', async (req, res) => {
|
|
|
292
292
|
}
|
|
293
293
|
catch (error) {
|
|
294
294
|
console.error('Build failed:', error);
|
|
295
|
-
res.status(
|
|
295
|
+
res.status(400).json({ error: 'Build failed' });
|
|
296
296
|
}
|
|
297
297
|
});
|
|
298
298
|
exports.default = exports.initResourceRouter;
|