@modern-js/storybook-builder 2.58.1 → 2.58.2

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/dist/cjs/build.js CHANGED
@@ -90,7 +90,9 @@ const start = async ({ options, router, startTime, server: storybookServer }) =>
90
90
  const rsbuildServer = await builder.createDevServer();
91
91
  server = rsbuildServer;
92
92
  router.use(rsbuildServer.middlewares);
93
- storybookServer.on("upgrade", rsbuildServer.onHTTPUpgrade);
93
+ rsbuildServer.connectWebSocket({
94
+ server: storybookServer
95
+ });
94
96
  await rsbuildServer.afterListen();
95
97
  const stats = await waitFirstCompileDone;
96
98
  return {
@@ -123,13 +123,13 @@ async function prepareStorybookModules(tempDir, cwd, options, builderConfig, sto
123
123
  const themingPath = (0, import_utils2.maybeGetAbsolutePath)(`@storybook/theming`);
124
124
  const storybookPaths = {
125
125
  ...componentsPath ? {
126
- [`@storybook/components`]: componentsPath
126
+ "@storybook/components": componentsPath
127
127
  } : {},
128
128
  ...routerPath ? {
129
- [`@storybook/router`]: routerPath
129
+ "@storybook/router": routerPath
130
130
  } : {},
131
131
  ...themingPath ? {
132
- [`@storybook/theming`]: themingPath
132
+ "@storybook/theming": themingPath
133
133
  } : {}
134
134
  };
135
135
  const [mappingsAlias, write] = await (0, import_utils2.virtualModule)(tempDir, cwd, mappings);
package/dist/esm/build.js CHANGED
@@ -60,7 +60,7 @@ const start = async ({
60
60
  const rsbuildServer = await builder.createDevServer();
61
61
  server = rsbuildServer;
62
62
  router.use(rsbuildServer.middlewares);
63
- storybookServer.on("upgrade", rsbuildServer.onHTTPUpgrade);
63
+ rsbuildServer.connectWebSocket({ server: storybookServer });
64
64
  await rsbuildServer.afterListen();
65
65
  const stats = await waitFirstCompileDone;
66
66
  return {
package/dist/esm/core.js CHANGED
@@ -1,4 +1,6 @@
1
- import { createUniBuilder } from "@modern-js/uni-builder";
1
+ import {
2
+ createUniBuilder
3
+ } from "@modern-js/uni-builder";
2
4
  import { mergeRsbuildConfig } from "@rsbuild/core";
3
5
  import { loadConfig } from "@modern-js/core";
4
6
  import { getConfigFileName, runWithErrorMsg } from "./utils";
@@ -113,10 +113,10 @@ async function prepareStorybookModules(tempDir, cwd, options, builderConfig, sto
113
113
  const themingPath = maybeGetAbsolutePath(`@storybook/theming`);
114
114
  const storybookPaths = {
115
115
  ...componentsPath ? {
116
- [`@storybook/components`]: componentsPath
116
+ "@storybook/components": componentsPath
117
117
  } : {},
118
- ...routerPath ? { [`@storybook/router`]: routerPath } : {},
119
- ...themingPath ? { [`@storybook/theming`]: themingPath } : {}
118
+ ...routerPath ? { "@storybook/router": routerPath } : {},
119
+ ...themingPath ? { "@storybook/theming": themingPath } : {}
120
120
  };
121
121
  const [mappingsAlias, write] = await virtualModule(tempDir, cwd, mappings);
122
122
  (_a = builderConfig.source) != null ? _a : builderConfig.source = {};
@@ -1,2 +1,2 @@
1
- import { DecoratorFunction } from '@storybook/types';
1
+ import type { DecoratorFunction } from '@storybook/types';
2
2
  export declare const withPluginRuntime: DecoratorFunction;
@@ -1,4 +1,4 @@
1
- import { UniBuilderInstance } from '@modern-js/uni-builder';
1
+ import { type UniBuilderInstance } from '@modern-js/uni-builder';
2
2
  import type { Options } from '@storybook/types';
3
3
  import type { BuilderOptions } from './types';
4
4
  export declare function createBuilder(cwd: string, builderOptions: BuilderOptions, options: Options): Promise<UniBuilderInstance>;
@@ -1,6 +1,6 @@
1
1
  import type { Options } from '@storybook/types';
2
2
  import { type RsbuildPlugin } from '@rsbuild/core';
3
- import { BuilderConfig } from './types';
3
+ import type { BuilderConfig } from './types';
4
4
  export declare function finalize(): Promise<void>;
5
5
  export declare const pluginStorybook: (cwd: string, options: Options) => RsbuildPlugin;
6
6
  export declare function addonBabelAdapter(finalConfig: BuilderConfig, options: Options): Promise<BuilderConfig>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@modern-js/storybook-builder",
3
- "version": "2.58.1",
3
+ "version": "2.58.2",
4
4
  "description": "modern.js support for storybook",
5
5
  "repository": {
6
6
  "type": "git",
@@ -51,7 +51,7 @@
51
51
  },
52
52
  "license": "MIT",
53
53
  "dependencies": {
54
- "@rsbuild/core": "1.0.1-beta.13",
54
+ "@rsbuild/core": "1.0.1-beta.14",
55
55
  "@storybook/components": "~7.6.12",
56
56
  "@storybook/core-common": "~7.6.12",
57
57
  "@storybook/csf-plugin": "~7.6.12",
@@ -70,18 +70,18 @@
70
70
  "remark-slug": "^7.0.1",
71
71
  "serve-static": "^1.14.1",
72
72
  "tinypool": "^0.8.0",
73
- "@modern-js/core": "2.58.1",
74
- "@modern-js/runtime": "2.58.1",
75
- "@modern-js/uni-builder": "2.58.1",
76
- "@modern-js/utils": "2.58.1"
73
+ "@modern-js/core": "2.58.2",
74
+ "@modern-js/runtime": "2.58.2",
75
+ "@modern-js/utils": "2.58.2",
76
+ "@modern-js/uni-builder": "2.58.2"
77
77
  },
78
78
  "devDependencies": {
79
79
  "@storybook/types": "~7.6.12",
80
80
  "@types/babel__core": "^7.20.5",
81
81
  "@types/serve-static": "^1.13.10",
82
82
  "typescript": "^5.2.2",
83
- "@modern-js/core": "2.58.1",
84
- "@scripts/build": "2.58.1"
83
+ "@scripts/build": "2.58.2",
84
+ "@modern-js/core": "2.58.2"
85
85
  },
86
86
  "publishConfig": {
87
87
  "registry": "https://registry.npmjs.org/",