@itcase/storybook-config 1.2.67 → 1.2.69
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.
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import svgr from 'vite-plugin-svgr'
|
|
2
2
|
|
|
3
|
+
import { getMediaProxyServerConfig } from '../vite/getMediaProxyServerConfig.js'
|
|
4
|
+
|
|
3
5
|
const MAIN_CONFIG_NEXTJS_VITE = {
|
|
4
6
|
env: (config) => ({
|
|
5
7
|
...config,
|
|
@@ -24,6 +26,7 @@ const MAIN_CONFIG_NEXTJS_VITE = {
|
|
|
24
26
|
...config.resolve,
|
|
25
27
|
tsconfigPaths: true,
|
|
26
28
|
},
|
|
29
|
+
...getMediaProxyServerConfig(),
|
|
27
30
|
})
|
|
28
31
|
},
|
|
29
32
|
core: {
|
|
@@ -2,6 +2,8 @@ import path from 'node:path'
|
|
|
2
2
|
|
|
3
3
|
import svgr from 'vite-plugin-svgr'
|
|
4
4
|
|
|
5
|
+
import { getMediaProxyServerConfig } from '../vite/getMediaProxyServerConfig.js'
|
|
6
|
+
|
|
5
7
|
const MAIN_CONFIG_VITE = {
|
|
6
8
|
viteFinal: async function (config) {
|
|
7
9
|
const { mergeConfig } = await import('vite')
|
|
@@ -65,6 +67,7 @@ const MAIN_CONFIG_VITE = {
|
|
|
65
67
|
: {}),
|
|
66
68
|
usePolling: false,
|
|
67
69
|
},
|
|
70
|
+
...getMediaProxyServerConfig().server,
|
|
68
71
|
},
|
|
69
72
|
})
|
|
70
73
|
},
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
function getMediaProxyServerConfig() {
|
|
2
|
+
const restBaseUrl = process.env.REST_BASE_URL?.replace(/\/$/, '')
|
|
3
|
+
if (!restBaseUrl) {
|
|
4
|
+
return {}
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
return {
|
|
8
|
+
server: {
|
|
9
|
+
proxy: {
|
|
10
|
+
'/media': {
|
|
11
|
+
changeOrigin: true,
|
|
12
|
+
target: restBaseUrl,
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export { getMediaProxyServerConfig }
|
package/dist/utils/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { getFigmaSourceLink } from './getFigmaSourceLink'
|
|
2
|
-
import { getStoryInfoBlocks } from './getStoryInfoBlocks'
|
|
3
|
-
import { handleMSWParameters } from './handleMSWParameters'
|
|
4
|
-
import { hasFormParameters } from './hasFormParameters'
|
|
5
|
-
import { isVitestEnvironment } from './isVitestEnvironment'
|
|
1
|
+
import { getFigmaSourceLink } from './getFigmaSourceLink.js'
|
|
2
|
+
import { getStoryInfoBlocks } from './getStoryInfoBlocks.js'
|
|
3
|
+
import { handleMSWParameters } from './handleMSWParameters.js'
|
|
4
|
+
import { hasFormParameters } from './hasFormParameters.js'
|
|
5
|
+
import { isVitestEnvironment } from './isVitestEnvironment.js'
|
|
6
6
|
|
|
7
|
-
// import { storybookFormMockFactory } from './storybookFormMockFactory'
|
|
7
|
+
// import { storybookFormMockFactory } from './storybookFormMockFactory.js'
|
|
8
8
|
|
|
9
9
|
export {
|
|
10
10
|
getFigmaSourceLink,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itcase/storybook-config",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.69",
|
|
4
4
|
"author": "ITCase",
|
|
5
5
|
"description": "Storybook configuration package",
|
|
6
6
|
"engines": {
|
|
@@ -133,16 +133,16 @@
|
|
|
133
133
|
"vitest": "^4.1.7"
|
|
134
134
|
},
|
|
135
135
|
"devDependencies": {
|
|
136
|
-
"@babel/core": "^7.29.
|
|
137
|
-
"@babel/preset-env": "^7.29.
|
|
138
|
-
"@babel/preset-react": "^7.
|
|
139
|
-
"@babel/runtime": "^7.29.
|
|
136
|
+
"@babel/core": "^7.29.7",
|
|
137
|
+
"@babel/preset-env": "^7.29.7",
|
|
138
|
+
"@babel/preset-react": "^7.29.7",
|
|
139
|
+
"@babel/runtime": "^7.29.7",
|
|
140
140
|
"@commitlint/cli": "^21.0.1",
|
|
141
141
|
"@commitlint/config-conventional": "^21.0.1",
|
|
142
142
|
"@itcase/common": "^1.2.43",
|
|
143
143
|
"@itcase/lint": "^1.1.116",
|
|
144
|
-
"@itcase/ui-core": "^1.10.
|
|
145
|
-
"@itcase/ui-web": "^1.10.
|
|
144
|
+
"@itcase/ui-core": "^1.10.2",
|
|
145
|
+
"@itcase/ui-web": "^1.10.6",
|
|
146
146
|
"@react-native-community/cli": "20.1.3",
|
|
147
147
|
"@react-native-community/cli-platform-android": "20.1.3",
|
|
148
148
|
"@react-native-community/cli-platform-ios": "20.1.3",
|