@blocklet/pages-kit-block-studio 0.1.39 → 0.4.22
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-resource-router.js +2 -0
- package/lib/cjs/plugins/vite-plugin-block-studio.js +92 -47
- package/lib/cjs/plugins/vite-plugin-remote-script-localizer.js +1 -0
- package/lib/cjs/tsconfig.tsbuildinfo +1 -1
- package/lib/cjs/utils/generate-wrapper-code.js +5 -5
- package/lib/esm/middlewares/init-resource-router.js +2 -0
- package/lib/esm/plugins/vite-plugin-block-studio.js +93 -48
- package/lib/esm/plugins/vite-plugin-remote-script-localizer.js +1 -0
- package/lib/esm/tsconfig.tsbuildinfo +1 -1
- package/lib/esm/utils/generate-wrapper-code.js +5 -5
- package/lib/types/plugins/vite-plugin-block-studio.d.ts +3 -1
- package/lib/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +12 -6
|
@@ -24,7 +24,7 @@ export function generateWrapperCode(_a) {
|
|
|
24
24
|
'@blocklet/pages-kit': 'latest',
|
|
25
25
|
'@blocklet/uploader-server': 'latest',
|
|
26
26
|
'@arcblock/ux': 'latest',
|
|
27
|
-
'@mui/material': '5.16.
|
|
27
|
+
'@mui/material': '5.16.14',
|
|
28
28
|
},
|
|
29
29
|
dependencies: {
|
|
30
30
|
'@blocklet/pages-kit-runtime': 'latest',
|
|
@@ -32,7 +32,7 @@ export function generateWrapperCode(_a) {
|
|
|
32
32
|
'@blocklet/pages-kit': 'latest',
|
|
33
33
|
'@blocklet/uploader-server': 'latest',
|
|
34
34
|
'@arcblock/ux': 'latest',
|
|
35
|
-
'@mui/material': '5.16.
|
|
35
|
+
'@mui/material': '5.16.14',
|
|
36
36
|
},
|
|
37
37
|
exports: {
|
|
38
38
|
'.': {
|
|
@@ -107,7 +107,7 @@ router.get('/api/pages', async (req, res) => {
|
|
|
107
107
|
const data = tempStates.find((state) => state.blockletId === did);
|
|
108
108
|
return res.json(data);
|
|
109
109
|
}
|
|
110
|
-
|
|
110
|
+
|
|
111
111
|
// Case 2: Using projectId
|
|
112
112
|
const tmpProjectId = projectId || PROJECT_ID;
|
|
113
113
|
if (tmpProjectId) {
|
|
@@ -126,14 +126,14 @@ router.get('/api/pages', async (req, res) => {
|
|
|
126
126
|
|
|
127
127
|
const apiUrl = joinURL(pagesKitBaseUrl, 'api/projects', tmpProjectId, 'pages');
|
|
128
128
|
console.log('apiUrl', apiUrl);
|
|
129
|
-
|
|
129
|
+
|
|
130
130
|
// 使用 axios 发起请求
|
|
131
131
|
const { data } = await axios.get(apiUrl, {
|
|
132
132
|
params: {
|
|
133
133
|
secret: 'chunchunchunchun',
|
|
134
134
|
},
|
|
135
135
|
});
|
|
136
|
-
|
|
136
|
+
|
|
137
137
|
return res.json(data);
|
|
138
138
|
}
|
|
139
139
|
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import type { Plugin } from 'vite';
|
|
1
|
+
import type { Plugin, LibraryFormats } from 'vite';
|
|
2
2
|
export declare function initBlockStudioPlugins(options?: {
|
|
3
3
|
cwd?: string;
|
|
4
4
|
entryFilesPattern?: string;
|
|
5
5
|
blockExternals?: Record<string, string> | ((defaults: Record<string, string>) => Record<string, string>);
|
|
6
|
+
formats?: LibraryFormats[];
|
|
7
|
+
transpileBuiltinModule?: boolean;
|
|
6
8
|
}): Plugin[];
|
|
7
9
|
export default initBlockStudioPlugins;
|