@blocklet/pages-kit-block-studio 0.1.29 → 0.1.31

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.
@@ -54,6 +54,14 @@ function generateWrapperCode(_a) {
54
54
  main: 'index.cjs',
55
55
  module: 'index.js',
56
56
  types: 'index.d.ts',
57
+ peerDependencies: {
58
+ '@blocklet/pages-kit-runtime': 'latest',
59
+ '@blocklet/pages-kit-inner-components': 'latest',
60
+ '@blocklet/pages-kit': 'latest',
61
+ '@blocklet/uploader-server': 'latest',
62
+ '@arcblock/ux': 'latest',
63
+ '@mui/material': '5.16.7',
64
+ },
57
65
  dependencies: {
58
66
  '@blocklet/pages-kit-runtime': 'latest',
59
67
  '@blocklet/pages-kit-inner-components': 'latest',
@@ -4,9 +4,7 @@ import express, { Router } from 'express';
4
4
  import { PAGES_KIT_DID, PAGES_KIT_RESOURCE_TYPE, MEDIA_KIT_DID, MEDIA_KIT_RESOURCE_TYPE, PAGES_KIT_BLOCK_STUDIO_DID, PAGES_KIT_BLOCK_STUDIO_RESOURCE_TYPE, } from '../constants';
5
5
  // init uploader router
6
6
  export const initUploaderRouter = Router();
7
- initUploaderRouter.use('/', initProxyToMediaKitUploadsMiddleware({
8
- express,
9
- }), initStaticResourceMiddleware({
7
+ const staticResourceMiddleware = initStaticResourceMiddleware({
10
8
  express,
11
9
  resourceTypes: [
12
10
  // image bin resource
@@ -18,18 +16,24 @@ initUploaderRouter.use('/', initProxyToMediaKitUploadsMiddleware({
18
16
  {
19
17
  type: PAGES_KIT_RESOURCE_TYPE,
20
18
  did: PAGES_KIT_DID,
21
- folder: ['pages', 'components'],
19
+ folder: ['pages', 'components', 'chunks'],
22
20
  blacklist: ['.yml'],
23
21
  },
24
22
  // pages kit block studio resource
25
23
  {
26
24
  type: PAGES_KIT_BLOCK_STUDIO_RESOURCE_TYPE,
27
25
  did: PAGES_KIT_BLOCK_STUDIO_DID,
28
- folder: ['pages', 'components'],
26
+ folder: ['pages', 'components', 'chunks'],
29
27
  blacklist: ['.yml'],
30
28
  },
31
29
  ],
32
- }), (_req, res) => {
30
+ });
31
+ initUploaderRouter.use('/uploads', initProxyToMediaKitUploadsMiddleware({
32
+ express,
33
+ }), staticResourceMiddleware, (_req, res) => {
33
34
  res.status(404).send('404 NOT FOUND').end();
34
35
  });
36
+ initUploaderRouter.use('/chunks', staticResourceMiddleware, (_req, res) => {
37
+ res.status(404).send('CHUNK NOT FOUND').end();
38
+ });
35
39
  export default initUploaderRouter;