@blocklet/pages-kit-block-studio 0.1.30 → 0.1.32
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-uploader-router.js +10 -6
- package/lib/cjs/tsconfig.tsbuildinfo +1 -1
- package/lib/cjs/utils/generate-wrapper-code.js +14 -1
- package/lib/esm/middlewares/init-uploader-router.js +10 -6
- package/lib/esm/tsconfig.tsbuildinfo +1 -1
- package/lib/esm/utils/generate-wrapper-code.js +14 -1
- package/lib/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -40,9 +40,7 @@ const express_1 = __importStar(require("express"));
|
|
|
40
40
|
const constants_1 = require("../constants");
|
|
41
41
|
// init uploader router
|
|
42
42
|
exports.initUploaderRouter = (0, express_1.Router)();
|
|
43
|
-
|
|
44
|
-
express: express_1.default,
|
|
45
|
-
}), (0, uploader_server_1.initStaticResourceMiddleware)({
|
|
43
|
+
const staticResourceMiddleware = (0, uploader_server_1.initStaticResourceMiddleware)({
|
|
46
44
|
express: express_1.default,
|
|
47
45
|
resourceTypes: [
|
|
48
46
|
// image bin resource
|
|
@@ -54,18 +52,24 @@ exports.initUploaderRouter.use('/', (0, uploader_server_1.initProxyToMediaKitUpl
|
|
|
54
52
|
{
|
|
55
53
|
type: constants_1.PAGES_KIT_RESOURCE_TYPE,
|
|
56
54
|
did: constants_1.PAGES_KIT_DID,
|
|
57
|
-
folder: ['pages', 'components'],
|
|
55
|
+
folder: ['pages', 'components', 'chunks'],
|
|
58
56
|
blacklist: ['.yml'],
|
|
59
57
|
},
|
|
60
58
|
// pages kit block studio resource
|
|
61
59
|
{
|
|
62
60
|
type: constants_1.PAGES_KIT_BLOCK_STUDIO_RESOURCE_TYPE,
|
|
63
61
|
did: constants_1.PAGES_KIT_BLOCK_STUDIO_DID,
|
|
64
|
-
folder: ['pages', 'components'],
|
|
62
|
+
folder: ['pages', 'components', 'chunks'],
|
|
65
63
|
blacklist: ['.yml'],
|
|
66
64
|
},
|
|
67
65
|
],
|
|
68
|
-
})
|
|
66
|
+
});
|
|
67
|
+
exports.initUploaderRouter.use('/uploads', (0, uploader_server_1.initProxyToMediaKitUploadsMiddleware)({
|
|
68
|
+
express: express_1.default,
|
|
69
|
+
}), staticResourceMiddleware, (_req, res) => {
|
|
69
70
|
res.status(404).send('404 NOT FOUND').end();
|
|
70
71
|
});
|
|
72
|
+
exports.initUploaderRouter.use('/chunks', staticResourceMiddleware, (_req, res) => {
|
|
73
|
+
res.status(404).send('CHUNK NOT FOUND').end();
|
|
74
|
+
});
|
|
71
75
|
exports.default = exports.initUploaderRouter;
|