react-cosmos 7.3.1-canary.a9c456b.0 → 7.4.0

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.
@@ -3,7 +3,7 @@ import { resolveSilent } from '../utils/resolveSilent.js';
3
3
  export const pluginEndpointPlugin = {
4
4
  name: 'pluginEndpoint',
5
5
  devServer({ app }) {
6
- app.get('/_plugin/*.js', (req, res) => {
6
+ app.get(/^\/_plugin\/(.+\.js)$/, (req, res) => {
7
7
  const modulePath = req.params['0'];
8
8
  if (!modulePath) {
9
9
  res.sendStatus(404);
@@ -4,5 +4,5 @@ type Args = {
4
4
  relativePaths: boolean;
5
5
  ignore?: string[];
6
6
  };
7
- export declare function findCosmosPluginConfigs({ rootDir, relativePaths, ignore }: Args): Promise<CosmosPluginConfig[]>;
7
+ export declare function findCosmosPluginConfigs({ rootDir, relativePaths, ignore, }: Args): Promise<CosmosPluginConfig[]>;
8
8
  export {};
@@ -4,5 +4,5 @@ type GetPluginConfigArgs = {
4
4
  config: CosmosConfig;
5
5
  relativePaths: boolean;
6
6
  };
7
- export declare function getPluginConfigs({ config, relativePaths }: GetPluginConfigArgs): Promise<CosmosPluginConfig[]>;
7
+ export declare function getPluginConfigs({ config, relativePaths, }: GetPluginConfigArgs): Promise<CosmosPluginConfig[]>;
8
8
  export {};
@@ -4,5 +4,5 @@ type ReadCosmosPluginConfigArgs = {
4
4
  configPath: string;
5
5
  relativePaths: boolean;
6
6
  };
7
- export declare function readCosmosPluginConfig({ rootDir, configPath, relativePaths }: ReadCosmosPluginConfigArgs): Promise<CosmosPluginConfig>;
7
+ export declare function readCosmosPluginConfig({ rootDir, configPath, relativePaths, }: ReadCosmosPluginConfigArgs): Promise<CosmosPluginConfig>;
8
8
  export {};
@@ -1,9 +1,8 @@
1
1
  import http from 'http';
2
- import https from 'https';
3
2
  import type { CosmosConfig } from '../cosmosConfig/types.js';
4
3
  type RequestListener = (request: http.IncomingMessage, response: http.ServerResponse) => void;
5
4
  export declare function createHttpServer(config: CosmosConfig, requestListener: RequestListener): Promise<{
6
- server: http.Server<typeof http.IncomingMessage, typeof http.ServerResponse> | https.Server<typeof http.IncomingMessage, typeof http.ServerResponse>;
5
+ server: http.Server<typeof http.IncomingMessage, typeof http.ServerResponse>;
7
6
  start: () => Promise<void>;
8
7
  stop: () => Promise<void>;
9
8
  }>;
@@ -4,5 +4,5 @@ type UserModules = {
4
4
  fixtures: ByPath<ReactFixtureModule>;
5
5
  decorators: ByPath<ReactDecoratorModule>;
6
6
  };
7
- export declare function importUserModules({ rootDir, fixturesDir, fixtureFileSuffix, ignore }: CosmosConfig): Promise<UserModules>;
7
+ export declare function importUserModules({ rootDir, fixturesDir, fixtureFileSuffix, ignore, }: CosmosConfig): Promise<UserModules>;
8
8
  export {};
@@ -7,5 +7,5 @@ type Args = {
7
7
  mode: CosmosMode;
8
8
  platform: CosmosPlatform;
9
9
  };
10
- export declare function applyServerConfigPlugins({ config, serverPlugins, mode, platform }: Args): Promise<CosmosConfig>;
10
+ export declare function applyServerConfigPlugins({ config, serverPlugins, mode, platform, }: Args): Promise<CosmosConfig>;
11
11
  export {};
@@ -5,5 +5,5 @@ type FindUserModulePathsArgs = {
5
5
  fixtureFileSuffix: string;
6
6
  ignore: string[];
7
7
  };
8
- export declare function findUserModulePaths({ rootDir, fixturesDir, fixtureFileSuffix, ignore }: FindUserModulePathsArgs): Promise<UserModulePaths>;
8
+ export declare function findUserModulePaths({ rootDir, fixturesDir, fixtureFileSuffix, ignore, }: FindUserModulePathsArgs): Promise<UserModulePaths>;
9
9
  export {};
@@ -8,5 +8,5 @@ type Args<T extends RendererConfig> = {
8
8
  relativeToDir: string | null;
9
9
  typeScript: boolean;
10
10
  };
11
- export declare function generateUserImports<T extends RendererConfig>({ config, modulePaths, rendererConfig, relativeToDir, typeScript }: Args<T>): string;
11
+ export declare function generateUserImports<T extends RendererConfig>({ config, modulePaths, rendererConfig, relativeToDir, typeScript, }: Args<T>): string;
12
12
  export {};
@@ -1,2 +1,2 @@
1
1
  import type { UserImportsTemplateArgs } from './shared.js';
2
- export declare function userImportsLazyTemplate({ globalImports, modulePaths: { fixturePaths, decoratorPaths }, rendererConfig, rootDir, relativeToDir, typeScript }: UserImportsTemplateArgs): string;
2
+ export declare function userImportsLazyTemplate({ globalImports, modulePaths: { fixturePaths, decoratorPaths }, rendererConfig, rootDir, relativeToDir, typeScript, }: UserImportsTemplateArgs): string;
@@ -1,2 +1,2 @@
1
1
  import type { UserImportsTemplateArgs } from './shared.js';
2
- export declare function userImportsTemplate({ globalImports, modulePaths: { fixturePaths, decoratorPaths }, rendererConfig, rootDir, relativeToDir, typeScript }: UserImportsTemplateArgs): string;
2
+ export declare function userImportsTemplate({ globalImports, modulePaths: { fixturePaths, decoratorPaths }, rendererConfig, rootDir, relativeToDir, typeScript, }: UserImportsTemplateArgs): string;
@@ -1,6 +1 @@
1
- export declare function getCliArgs(): {
2
- [x: string]: unknown;
3
- $0: string;
4
- _: (string | number)[];
5
- lazy: boolean | undefined;
6
- };
1
+ export declare function getCliArgs(): any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-cosmos",
3
- "version": "7.3.1-canary.a9c456b.0+a9c456b",
3
+ "version": "7.4.0",
4
4
  "description": "Sandbox for developing and testing UI components in isolation",
5
5
  "repository": "https://github.com/react-cosmos/react-cosmos/tree/main/packages/react-cosmos",
6
6
  "license": "MIT",
@@ -8,18 +8,18 @@
8
8
  "main": "./index.js",
9
9
  "dependencies": {
10
10
  "@skidding/launch-editor": "2.13.2",
11
- "chokidar": "3.6.0",
12
- "express": "4.22.1",
13
- "glob": "10.5.0",
14
- "http-proxy-middleware": "3.0.5",
11
+ "chokidar": "5.0.0",
12
+ "express": "5.2.1",
13
+ "glob": "13.0.6",
14
+ "http-proxy-middleware": "3.0.7",
15
15
  "micromatch": "4.0.8",
16
- "open": "10.2.0",
17
- "pem": "1.15.1",
18
- "react-cosmos-core": "7.3.1-canary.a9c456b.0+a9c456b",
19
- "react-cosmos-renderer": "7.3.1-canary.a9c456b.0+a9c456b",
20
- "react-cosmos-ui": "7.3.1-canary.a9c456b.0+a9c456b",
21
- "ws": "8.19.0",
22
- "yargs": "17.7.2"
16
+ "open": "11.0.0",
17
+ "pem": "1.14.8",
18
+ "react-cosmos-core": "^7.4.0",
19
+ "react-cosmos-renderer": "^7.4.0",
20
+ "react-cosmos-ui": "^7.4.0",
21
+ "ws": "8.21.3",
22
+ "yargs": "18.1.0"
23
23
  },
24
24
  "peerDependencies": {
25
25
  "react": ">=18",
@@ -30,5 +30,5 @@
30
30
  "cosmos-export": "./bin/cosmos-export.js",
31
31
  "cosmos-native": "./bin/cosmos-native.js"
32
32
  },
33
- "gitHead": "a9c456b7b18e632df61c8ad74709f626410b0bb2"
33
+ "gitHead": "9204571f3970c5cff07af04c56b135151410a471"
34
34
  }
@@ -1 +0,0 @@
1
- {"version":"7.0.0-dev.20260417.1","root":["./src/client.ts","./src/index.ts","./src/vitest.ts","./src/@types/launch-editor.d.ts","./src/@types/mdx.d.ts","./src/@types/yargs.d.ts","./src/corePlugins/fixtureWatcherPlugin.ts","./src/corePlugins/fixturesJsonPlugin.ts","./src/corePlugins/httpProxyPlugin.ts","./src/corePlugins/index.ts","./src/corePlugins/openFilePlugin.ts","./src/corePlugins/pluginEndpointPlugin.ts","./src/corePlugins/portRetryPlugin.ts","./src/corePlugins/remoteRendererUrlPlugin.ts","./src/cosmosConfig/createCosmosConfig.ts","./src/cosmosConfig/detectCosmosConfig.ts","./src/cosmosConfig/getCosmosConfigAtPath.ts","./src/cosmosConfig/shared.ts","./src/cosmosConfig/types.ts","./src/cosmosPlugin/findCosmosPluginConfigs.ts","./src/cosmosPlugin/pluginConfigs.ts","./src/cosmosPlugin/readCosmosPluginConfig.ts","./src/cosmosPlugin/types.ts","./src/devServer/expressApp.ts","./src/devServer/httpServer.ts","./src/devServer/httpsCreds.ts","./src/devServer/messageHandler.ts","./src/devServer/startDevServer.ts","./src/export/generateExport.ts","./src/getFixtures/getFixtures.ts","./src/getFixtures/importUserModules.ts","./src/shared/applyServerConfigPlugins.ts","./src/shared/findNextAvailablePort.ts","./src/shared/getServerPlugins.ts","./src/shared/importServerPlugins.ts","./src/shared/logPluginInfo.ts","./src/shared/playgroundHtml.ts","./src/shared/playgroundUrl.ts","./src/shared/remoteRendererUrl.ts","./src/shared/serverAddress.ts","./src/shared/serverFixtureList.ts","./src/shared/staticPath.ts","./src/shared/staticServer.ts","./src/shared/webSocketUrl.ts","./src/userModules/findUserModulePaths.ts","./src/userModules/fixtureWatcher.ts","./src/userModules/generateUserImports.ts","./src/userModules/shared.ts","./src/userModules/userImportsLazyTemplate.ts","./src/userModules/userImportsTemplate.ts","./src/utils/cli.ts","./src/utils/findUp.ts","./src/utils/fs.ts","./src/utils/isNodeError.ts","./src/utils/json.ts","./src/utils/requireModule.ts","./src/utils/resolve.ts","./src/utils/resolveLoose.ts","./src/utils/resolveSilent.ts","./src/utils/slash.ts"]}