react-cosmos 6.0.0-alpha.15 → 6.0.0-alpha.16
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.
|
@@ -26,7 +26,10 @@ export const openFileServerPlugin = {
|
|
|
26
26
|
// when the editor app is already open, but is favorable because it can
|
|
27
27
|
// open a code file on a specific line & column.
|
|
28
28
|
.catch(err => open(absFilePath))
|
|
29
|
-
.catch(err =>
|
|
29
|
+
.catch(err => {
|
|
30
|
+
console.log(err);
|
|
31
|
+
res.status(500).send('Failed to open file');
|
|
32
|
+
})
|
|
30
33
|
.then(() => res.send());
|
|
31
34
|
});
|
|
32
35
|
},
|
|
@@ -2,7 +2,7 @@ import path from 'node:path';
|
|
|
2
2
|
import { resolveSilent } from '../utils/resolveSilent.js';
|
|
3
3
|
export const pluginEndpointServerPlugin = {
|
|
4
4
|
name: 'pluginEndpoint',
|
|
5
|
-
devServer({
|
|
5
|
+
devServer({ expressApp }) {
|
|
6
6
|
expressApp.get('/_plugin/*.js', (req, res) => {
|
|
7
7
|
const modulePath = req.params['0'];
|
|
8
8
|
if (!modulePath) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { globSync } from 'glob';
|
|
2
2
|
import { readCosmosPluginConfig } from './readCosmosPluginConfig.js';
|
|
3
3
|
export async function findCosmosPluginConfigs({ rootDir, relativePaths, ignore, }) {
|
|
4
4
|
const configPaths = findCosmosPluginConfigPaths(rootDir, ignore);
|
|
@@ -6,7 +6,7 @@ export async function findCosmosPluginConfigs({ rootDir, relativePaths, ignore,
|
|
|
6
6
|
}
|
|
7
7
|
const defaultIgnore = ['**/node_modules/**'];
|
|
8
8
|
function findCosmosPluginConfigPaths(rootDir, ignore = defaultIgnore) {
|
|
9
|
-
return
|
|
9
|
+
return globSync('**/cosmos.plugin.json', {
|
|
10
10
|
cwd: rootDir,
|
|
11
11
|
absolute: true,
|
|
12
12
|
ignore,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { globSync } from 'glob';
|
|
2
2
|
import micromatch from 'micromatch';
|
|
3
3
|
import { getDecoratorPatterns, getFixturePatterns } from './shared.js';
|
|
4
4
|
export function findUserModulePaths({ rootDir, fixturesDir, fixtureFileSuffix, ignore, }) {
|
|
5
|
-
const paths =
|
|
5
|
+
const paths = globSync('**/*', {
|
|
6
6
|
cwd: rootDir,
|
|
7
7
|
absolute: true,
|
|
8
8
|
ignore,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-cosmos",
|
|
3
|
-
"version": "6.0.0-alpha.
|
|
3
|
+
"version": "6.0.0-alpha.16",
|
|
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",
|
|
@@ -10,16 +10,16 @@
|
|
|
10
10
|
"@skidding/launch-editor": "^2.2.3",
|
|
11
11
|
"chokidar": "^3.5.3",
|
|
12
12
|
"express": "^4.18.2",
|
|
13
|
-
"glob": "^
|
|
13
|
+
"glob": "^10.2.2",
|
|
14
14
|
"http-proxy-middleware": "^2.0.6",
|
|
15
15
|
"lodash-es": "^4.17.21",
|
|
16
16
|
"micromatch": "^4.0.5",
|
|
17
17
|
"open": "^8.4.2",
|
|
18
|
-
"pem": "^1.14.
|
|
18
|
+
"pem": "^1.14.7",
|
|
19
19
|
"pkg-up": "^4.0.0",
|
|
20
|
-
"react-cosmos-core": "6.0.0-alpha.
|
|
21
|
-
"react-cosmos-ui": "6.0.0-alpha.
|
|
22
|
-
"ws": "^8.
|
|
20
|
+
"react-cosmos-core": "6.0.0-alpha.16",
|
|
21
|
+
"react-cosmos-ui": "6.0.0-alpha.16",
|
|
22
|
+
"ws": "^8.13.0",
|
|
23
23
|
"yargs": "^17.7.1"
|
|
24
24
|
},
|
|
25
25
|
"bin": {
|
|
@@ -27,5 +27,5 @@
|
|
|
27
27
|
"cosmos-export": "./bin/cosmos-export.js",
|
|
28
28
|
"cosmos-native": "./bin/cosmos-native.js"
|
|
29
29
|
},
|
|
30
|
-
"gitHead": "
|
|
30
|
+
"gitHead": "2a4ec3107303a4a47e09d63e557cee5f8cceb972"
|
|
31
31
|
}
|