@storybook/core-server 7.0.0-alpha.43 → 7.0.0-alpha.45
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/presets/common-preset.js +6 -4
- package/dist/cjs/utils/StoryIndexGenerator.js +6 -0
- package/dist/cjs/utils/__mockdata__/src/A.stories.js +5 -2
- package/dist/cjs/utils/__mockdata__/src/nested/Button.stories.js +2 -1
- package/dist/cjs/utils/middleware.js +2 -2
- package/dist/cjs/withTelemetry.js +3 -1
- package/dist/esm/build-dev.js +1 -1
- package/dist/esm/build-static.js +1 -1
- package/dist/esm/presets/common-preset.js +6 -3
- package/dist/esm/utils/StoryIndexGenerator.js +6 -0
- package/dist/esm/utils/__mockdata__/src/A.stories.js +5 -2
- package/dist/esm/utils/__mockdata__/src/nested/Button.stories.js +2 -1
- package/dist/esm/utils/middleware.js +2 -2
- package/dist/esm/withTelemetry.js +3 -1
- package/dist/types/build-dev.d.ts +1 -1
- package/dist/types/build-static.d.ts +1 -1
- package/dist/types/dev-server.d.ts +3 -3
- package/dist/types/presets/common-preset.d.ts +2 -3
- package/dist/types/utils/StoryIndexGenerator.d.ts +15 -16
- package/dist/types/utils/__mockdata__/src/nested/Button.stories.d.ts +1 -0
- package/dist/types/utils/get-builders.d.ts +1 -1
- package/dist/types/utils/output-startup-information.d.ts +1 -1
- package/dist/types/utils/output-stats.d.ts +1 -1
- package/dist/types/utils/release-notes.d.ts +1 -1
- package/dist/types/utils/server-statics.d.ts +1 -1
- package/dist/types/utils/stories-json.d.ts +4 -5
- package/dist/types/utils/update-check.d.ts +1 -1
- package/dist/types/utils/watch-story-specifiers.d.ts +3 -4
- package/dist/types/withTelemetry.d.ts +1 -1
- package/package.json +12 -11
|
@@ -7,7 +7,7 @@ exports.typescript = exports.title = exports.storyIndexers = exports.previewMain
|
|
|
7
7
|
|
|
8
8
|
var _fsExtra = _interopRequireDefault(require("fs-extra"));
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _nodeLogger = require("@storybook/node-logger");
|
|
11
11
|
|
|
12
12
|
var _coreCommon = require("@storybook/core-common");
|
|
13
13
|
|
|
@@ -21,8 +21,6 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
21
21
|
|
|
22
22
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
23
23
|
|
|
24
|
-
var warnConfigField = (0, _utilDeprecate.default)(function () {}, `You (or an addon) are using the 'config' preset field. This has been replaced by 'previewAnnotations' and will be removed in 8.0`);
|
|
25
|
-
|
|
26
24
|
var babel = async function (_, options) {
|
|
27
25
|
var presets = options.presets;
|
|
28
26
|
return presets.apply('babelDefault', {}, options);
|
|
@@ -133,7 +131,11 @@ exports.core = core;
|
|
|
133
131
|
|
|
134
132
|
var previewAnnotations = async function (base, options) {
|
|
135
133
|
var config = await options.presets.apply('config', [], options);
|
|
136
|
-
|
|
134
|
+
|
|
135
|
+
if (config.length > 0) {
|
|
136
|
+
(0, _nodeLogger.deprecate)(`You (or an addon) are using the 'config' preset field. This has been replaced by 'previewAnnotations' and will be removed in 8.0`);
|
|
137
|
+
}
|
|
138
|
+
|
|
137
139
|
return [...config, ...base];
|
|
138
140
|
};
|
|
139
141
|
|
|
@@ -209,17 +209,21 @@ class StoryIndexGenerator {
|
|
|
209
209
|
var csf = await storyIndexer.indexer(absolutePath, {
|
|
210
210
|
makeTitle: makeTitle
|
|
211
211
|
});
|
|
212
|
+
var componentTags = csf.meta.tags;
|
|
212
213
|
csf.stories.forEach(function ({
|
|
213
214
|
id: id,
|
|
214
215
|
name: name,
|
|
216
|
+
tags: storyTags,
|
|
215
217
|
parameters: parameters
|
|
216
218
|
}) {
|
|
217
219
|
if (!(parameters !== null && parameters !== void 0 && parameters.docsOnly)) {
|
|
220
|
+
var tags = [...(storyTags || componentTags || []), 'story'];
|
|
218
221
|
entries.push({
|
|
219
222
|
id: id,
|
|
220
223
|
title: csf.meta.title,
|
|
221
224
|
name: name,
|
|
222
225
|
importPath: importPath,
|
|
226
|
+
tags: tags,
|
|
223
227
|
type: 'story'
|
|
224
228
|
});
|
|
225
229
|
}
|
|
@@ -237,6 +241,7 @@ class StoryIndexGenerator {
|
|
|
237
241
|
name: name,
|
|
238
242
|
importPath: importPath,
|
|
239
243
|
type: 'docs',
|
|
244
|
+
tags: [...(componentTags || []), 'docs'],
|
|
240
245
|
storiesImports: [],
|
|
241
246
|
standalone: false
|
|
242
247
|
});
|
|
@@ -325,6 +330,7 @@ class StoryIndexGenerator {
|
|
|
325
330
|
return dep.entries[0].importPath;
|
|
326
331
|
}),
|
|
327
332
|
type: 'docs',
|
|
333
|
+
tags: [...(result.tags || []), 'docs'],
|
|
328
334
|
standalone: true
|
|
329
335
|
};
|
|
330
336
|
return docsEntry;
|
|
@@ -6,8 +6,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = exports.StoryOne = void 0;
|
|
7
7
|
var component = {};
|
|
8
8
|
var _default = {
|
|
9
|
-
component: component
|
|
9
|
+
component: component,
|
|
10
|
+
tags: ['component-tag']
|
|
10
11
|
};
|
|
11
12
|
exports.default = _default;
|
|
12
|
-
var StoryOne = {
|
|
13
|
+
var StoryOne = {
|
|
14
|
+
tags: ['story-tag']
|
|
15
|
+
};
|
|
13
16
|
exports.StoryOne = StoryOne;
|
|
@@ -6,7 +6,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = exports.StoryOne = void 0;
|
|
7
7
|
var component = {};
|
|
8
8
|
var _default = {
|
|
9
|
-
component: component
|
|
9
|
+
component: component,
|
|
10
|
+
tags: ['component-tag']
|
|
10
11
|
};
|
|
11
12
|
exports.default = _default;
|
|
12
13
|
var StoryOne = {};
|
|
@@ -22,11 +22,11 @@ function getMiddleware(configDir) {
|
|
|
22
22
|
var middlewarePath = fileExists(_path.default.resolve(configDir, 'middleware'));
|
|
23
23
|
|
|
24
24
|
if (middlewarePath) {
|
|
25
|
-
|
|
25
|
+
// eslint-disable-next-line global-require, import/no-dynamic-require
|
|
26
|
+
var middlewareModule = require(middlewarePath); // eslint-disable-next-line no-underscore-dangle
|
|
26
27
|
|
|
27
28
|
|
|
28
29
|
if (middlewareModule.__esModule) {
|
|
29
|
-
// eslint-disable-line
|
|
30
30
|
middlewareModule = middlewareModule.default;
|
|
31
31
|
}
|
|
32
32
|
|
|
@@ -20,7 +20,9 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
20
20
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
21
21
|
|
|
22
22
|
var promptCrashReports = async function () {
|
|
23
|
-
if (process.env.CI && process.env.NODE_ENV !== 'test')
|
|
23
|
+
if (process.env.CI && process.env.NODE_ENV !== 'test') {
|
|
24
|
+
return undefined;
|
|
25
|
+
}
|
|
24
26
|
|
|
25
27
|
var _await$prompts = await (0, _prompts.default)({
|
|
26
28
|
type: 'confirm',
|
package/dist/esm/build-dev.js
CHANGED
|
@@ -16,7 +16,7 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
16
16
|
|
|
17
17
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
18
18
|
|
|
19
|
-
import {
|
|
19
|
+
import { cache, loadAllPresets, loadMainConfig, resolveAddonName, resolvePathInStorybookCache, validateFrameworkName } from '@storybook/core-common';
|
|
20
20
|
import prompts from 'prompts';
|
|
21
21
|
import global from 'global';
|
|
22
22
|
import { join, resolve } from 'path';
|
package/dist/esm/build-static.js
CHANGED
|
@@ -23,7 +23,7 @@ import { dedent } from 'ts-dedent';
|
|
|
23
23
|
import global from 'global';
|
|
24
24
|
import { logger } from '@storybook/node-logger';
|
|
25
25
|
import { telemetry } from '@storybook/telemetry';
|
|
26
|
-
import { loadAllPresets,
|
|
26
|
+
import { loadAllPresets, loadMainConfig, logConfig, normalizeStories, resolveAddonName } from '@storybook/core-common';
|
|
27
27
|
import { outputStats } from './utils/output-stats';
|
|
28
28
|
import { copyAllStaticFiles, copyAllStaticFilesRelativeToMain } from './utils/copy-all-static-files';
|
|
29
29
|
import { getBuilders } from './utils/get-builders';
|
|
@@ -5,10 +5,9 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
5
5
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
6
|
|
|
7
7
|
import fs from 'fs-extra';
|
|
8
|
-
import deprecate from '
|
|
8
|
+
import { deprecate } from '@storybook/node-logger';
|
|
9
9
|
import { getPreviewBodyTemplate, getPreviewHeadTemplate, getPreviewMainTemplate, loadEnvs } from '@storybook/core-common';
|
|
10
10
|
import { loadCsf } from '@storybook/csf-tools';
|
|
11
|
-
var warnConfigField = deprecate(function () {}, `You (or an addon) are using the 'config' preset field. This has been replaced by 'previewAnnotations' and will be removed in 8.0`);
|
|
12
11
|
export var babel = async function (_, options) {
|
|
13
12
|
var presets = options.presets;
|
|
14
13
|
return presets.apply('babelDefault', {}, options);
|
|
@@ -93,7 +92,11 @@ export var core = async function (existing, options) {
|
|
|
93
92
|
};
|
|
94
93
|
export var previewAnnotations = async function (base, options) {
|
|
95
94
|
var config = await options.presets.apply('config', [], options);
|
|
96
|
-
|
|
95
|
+
|
|
96
|
+
if (config.length > 0) {
|
|
97
|
+
deprecate(`You (or an addon) are using the 'config' preset field. This has been replaced by 'previewAnnotations' and will be removed in 8.0`);
|
|
98
|
+
}
|
|
99
|
+
|
|
97
100
|
return [...config, ...base];
|
|
98
101
|
};
|
|
99
102
|
export var features = async function (existing) {
|
|
@@ -190,17 +190,21 @@ export class StoryIndexGenerator {
|
|
|
190
190
|
var csf = await storyIndexer.indexer(absolutePath, {
|
|
191
191
|
makeTitle: makeTitle
|
|
192
192
|
});
|
|
193
|
+
var componentTags = csf.meta.tags;
|
|
193
194
|
csf.stories.forEach(function ({
|
|
194
195
|
id: id,
|
|
195
196
|
name: name,
|
|
197
|
+
tags: storyTags,
|
|
196
198
|
parameters: parameters
|
|
197
199
|
}) {
|
|
198
200
|
if (!(parameters !== null && parameters !== void 0 && parameters.docsOnly)) {
|
|
201
|
+
var tags = [...(storyTags || componentTags || []), 'story'];
|
|
199
202
|
entries.push({
|
|
200
203
|
id: id,
|
|
201
204
|
title: csf.meta.title,
|
|
202
205
|
name: name,
|
|
203
206
|
importPath: importPath,
|
|
207
|
+
tags: tags,
|
|
204
208
|
type: 'story'
|
|
205
209
|
});
|
|
206
210
|
}
|
|
@@ -218,6 +222,7 @@ export class StoryIndexGenerator {
|
|
|
218
222
|
name: name,
|
|
219
223
|
importPath: importPath,
|
|
220
224
|
type: 'docs',
|
|
225
|
+
tags: [...(componentTags || []), 'docs'],
|
|
221
226
|
storiesImports: [],
|
|
222
227
|
standalone: false
|
|
223
228
|
});
|
|
@@ -305,6 +310,7 @@ export class StoryIndexGenerator {
|
|
|
305
310
|
return dep.entries[0].importPath;
|
|
306
311
|
}),
|
|
307
312
|
type: 'docs',
|
|
313
|
+
tags: [...(result.tags || []), 'docs'],
|
|
308
314
|
standalone: true
|
|
309
315
|
};
|
|
310
316
|
return docsEntry;
|
|
@@ -12,11 +12,11 @@ export function getMiddleware(configDir) {
|
|
|
12
12
|
var middlewarePath = fileExists(path.resolve(configDir, 'middleware'));
|
|
13
13
|
|
|
14
14
|
if (middlewarePath) {
|
|
15
|
-
|
|
15
|
+
// eslint-disable-next-line global-require, import/no-dynamic-require
|
|
16
|
+
var middlewareModule = require(middlewarePath); // eslint-disable-next-line no-underscore-dangle
|
|
16
17
|
|
|
17
18
|
|
|
18
19
|
if (middlewareModule.__esModule) {
|
|
19
|
-
// eslint-disable-line
|
|
20
20
|
middlewareModule = middlewareModule.default;
|
|
21
21
|
}
|
|
22
22
|
|
|
@@ -9,7 +9,9 @@ import { loadAllPresets, cache } from '@storybook/core-common';
|
|
|
9
9
|
import { telemetry } from '@storybook/telemetry';
|
|
10
10
|
|
|
11
11
|
var promptCrashReports = async function () {
|
|
12
|
-
if (process.env.CI && process.env.NODE_ENV !== 'test')
|
|
12
|
+
if (process.env.CI && process.env.NODE_ENV !== 'test') {
|
|
13
|
+
return undefined;
|
|
14
|
+
}
|
|
13
15
|
|
|
14
16
|
var _await$prompts = await prompts({
|
|
15
17
|
type: 'confirm',
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { CLIOptions, LoadOptions
|
|
1
|
+
import type { BuilderOptions, CLIOptions, LoadOptions } from '@storybook/types';
|
|
2
2
|
export declare function buildDevStandalone(options: CLIOptions & LoadOptions & BuilderOptions): Promise<void>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { BuilderOptions, CLIOptions, LoadOptions } from '@storybook/types';
|
|
2
2
|
export declare function buildStaticStandalone(options: CLIOptions & LoadOptions & BuilderOptions & {
|
|
3
3
|
outputDir: string;
|
|
4
4
|
}): Promise<void>;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { Router } from 'express';
|
|
2
|
-
import { Options } from '@storybook/
|
|
2
|
+
import type { Options } from '@storybook/types';
|
|
3
3
|
export declare const router: Router;
|
|
4
4
|
export declare const DEBOUNCE = 100;
|
|
5
5
|
export declare function storybookDevServer(options: Options): Promise<{
|
|
6
6
|
previewResult: void | {
|
|
7
|
-
stats?: import("@storybook/
|
|
7
|
+
stats?: import("@storybook/types").Stats;
|
|
8
8
|
totalTime: [number, number];
|
|
9
9
|
bail: (e?: Error) => Promise<void>;
|
|
10
10
|
};
|
|
11
11
|
managerResult: void | {
|
|
12
|
-
stats?: import("@storybook/
|
|
12
|
+
stats?: import("@storybook/types").Stats;
|
|
13
13
|
totalTime: [number, number];
|
|
14
14
|
bail: (e?: Error) => Promise<void>;
|
|
15
15
|
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { CLIOptions } from '@storybook/
|
|
2
|
-
import type { Options, CoreConfig, StorybookConfig, StoryIndexer } from '@storybook/core-common';
|
|
1
|
+
import type { CLIOptions, CoreCommon_StoryIndexer, CoreConfig, Options, StorybookConfig } from '@storybook/types';
|
|
3
2
|
export declare const babel: (_: unknown, options: Options) => Promise<{}>;
|
|
4
3
|
export declare const title: (previous: string, options: Options) => string | false;
|
|
5
4
|
export declare const logLevel: (previous: any, options: Options) => any;
|
|
@@ -26,6 +25,6 @@ export declare const typescript: () => {
|
|
|
26
25
|
export declare const core: (existing: CoreConfig, options: Options) => Promise<CoreConfig>;
|
|
27
26
|
export declare const previewAnnotations: (base: any, options: Options) => Promise<any[]>;
|
|
28
27
|
export declare const features: (existing: StorybookConfig['features']) => Promise<StorybookConfig['features']>;
|
|
29
|
-
export declare const storyIndexers: (indexers?:
|
|
28
|
+
export declare const storyIndexers: (indexers?: CoreCommon_StoryIndexer[]) => Promise<CoreCommon_StoryIndexer[]>;
|
|
30
29
|
export declare const frameworkOptions: (_: never, options: Options) => Promise<Record<string, any> | null>;
|
|
31
30
|
export declare const docs: (docsOptions: StorybookConfig['docs'], { docs: docsMode }: CLIOptions) => StorybookConfig['docs'];
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { StoryIndexer, NormalizedStoriesSpecifier, DocsOptions } from '@storybook/core-common';
|
|
1
|
+
import type { Addon_IndexEntry, Addon_StandaloneDocsIndexEntry, Addon_StoryIndexEntry, Addon_TemplateDocsIndexEntry, CoreCommon_NormalizedStoriesSpecifier, CoreCommon_StoryIndexer, DocsOptions, Path, Store_StoryIndex } from '@storybook/types';
|
|
3
2
|
/** A .mdx file will produce a "standalone" docs entry */
|
|
4
|
-
declare type DocsCacheEntry =
|
|
3
|
+
declare type DocsCacheEntry = Addon_StandaloneDocsIndexEntry;
|
|
5
4
|
/** A *.stories.* file will produce a list of stories and possibly a docs entry */
|
|
6
5
|
declare type StoriesCacheEntry = {
|
|
7
|
-
entries: (
|
|
6
|
+
entries: (Addon_StoryIndexEntry | Addon_TemplateDocsIndexEntry)[];
|
|
8
7
|
dependents: Path[];
|
|
9
8
|
type: 'stories';
|
|
10
9
|
};
|
|
@@ -28,39 +27,39 @@ declare type CacheEntry = false | StoriesCacheEntry | DocsCacheEntry;
|
|
|
28
27
|
* standalone docs entries are preferred to templates (with warnings).
|
|
29
28
|
*/
|
|
30
29
|
export declare class StoryIndexGenerator {
|
|
31
|
-
readonly specifiers:
|
|
30
|
+
readonly specifiers: CoreCommon_NormalizedStoriesSpecifier[];
|
|
32
31
|
readonly options: {
|
|
33
32
|
workingDir: Path;
|
|
34
33
|
configDir: Path;
|
|
35
34
|
storiesV2Compatibility: boolean;
|
|
36
35
|
storyStoreV7: boolean;
|
|
37
|
-
storyIndexers:
|
|
36
|
+
storyIndexers: CoreCommon_StoryIndexer[];
|
|
38
37
|
docs: DocsOptions;
|
|
39
38
|
};
|
|
40
39
|
private specifierToCache;
|
|
41
40
|
private lastIndex?;
|
|
42
|
-
constructor(specifiers:
|
|
41
|
+
constructor(specifiers: CoreCommon_NormalizedStoriesSpecifier[], options: {
|
|
43
42
|
workingDir: Path;
|
|
44
43
|
configDir: Path;
|
|
45
44
|
storiesV2Compatibility: boolean;
|
|
46
45
|
storyStoreV7: boolean;
|
|
47
|
-
storyIndexers:
|
|
46
|
+
storyIndexers: CoreCommon_StoryIndexer[];
|
|
48
47
|
docs: DocsOptions;
|
|
49
48
|
});
|
|
50
49
|
initialize(): Promise<void>;
|
|
51
50
|
/**
|
|
52
51
|
* Run the updater function over all the empty cache entries
|
|
53
52
|
*/
|
|
54
|
-
updateExtracted(updater: (specifier:
|
|
53
|
+
updateExtracted(updater: (specifier: CoreCommon_NormalizedStoriesSpecifier, absolutePath: Path, existingEntry: CacheEntry) => Promise<CacheEntry>, overwrite?: boolean): Promise<void>;
|
|
55
54
|
isDocsMdx(absolutePath: Path): boolean;
|
|
56
|
-
ensureExtracted(): Promise<
|
|
55
|
+
ensureExtracted(): Promise<Addon_IndexEntry[]>;
|
|
57
56
|
findDependencies(absoluteImports: Path[]): StoriesCacheEntry[];
|
|
58
|
-
extractStories(specifier:
|
|
59
|
-
extractDocs(specifier:
|
|
60
|
-
chooseDuplicate(firstEntry:
|
|
61
|
-
sortStories(storiesList:
|
|
62
|
-
getIndex(): Promise<
|
|
63
|
-
invalidate(specifier:
|
|
57
|
+
extractStories(specifier: CoreCommon_NormalizedStoriesSpecifier, absolutePath: Path): Promise<StoriesCacheEntry>;
|
|
58
|
+
extractDocs(specifier: CoreCommon_NormalizedStoriesSpecifier, absolutePath: Path): Promise<false | Addon_StandaloneDocsIndexEntry>;
|
|
59
|
+
chooseDuplicate(firstEntry: Addon_IndexEntry, secondEntry: Addon_IndexEntry): Addon_IndexEntry;
|
|
60
|
+
sortStories(storiesList: Addon_IndexEntry[]): Promise<Record<string, Addon_IndexEntry>>;
|
|
61
|
+
getIndex(): Promise<Store_StoryIndex>;
|
|
62
|
+
invalidate(specifier: CoreCommon_NormalizedStoriesSpecifier, importPath: Path, removed: boolean): void;
|
|
64
63
|
getStorySortParameter(): Promise<any>;
|
|
65
64
|
storyFileNames(): string[];
|
|
66
65
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { Options, Builder } from '@storybook/
|
|
1
|
+
import type { Options, Builder } from '@storybook/types';
|
|
2
2
|
export declare function getBuilders({ presets, configDir }: Options): Promise<Builder<unknown>[]>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { Stats } from '@storybook/
|
|
1
|
+
import type { Stats } from '@storybook/types';
|
|
2
2
|
export declare function outputStats(directory: string, previewStats?: any, managerStats?: any): Promise<void>;
|
|
3
3
|
export declare const writeStats: (directory: string, name: string, stats: Stats) => Promise<string>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Options } from '@storybook/
|
|
1
|
+
import type { Options } from '@storybook/types';
|
|
2
2
|
export declare function useStatics(router: any, options: Options): Promise<void>;
|
|
3
3
|
export declare const parseStaticDir: (arg: string) => Promise<{
|
|
4
4
|
staticDir: string;
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { Router } from 'express';
|
|
2
|
-
import type {
|
|
3
|
-
import type { StoryIndex, StoryIndexV3 } from '@storybook/store';
|
|
2
|
+
import type { CoreCommon_NormalizedStoriesSpecifier, Store_StoryIndex, Store_StoryIndexV3 } from '@storybook/types';
|
|
4
3
|
import { StoryIndexGenerator } from './StoryIndexGenerator';
|
|
5
4
|
import { ServerChannel } from './get-server-channel';
|
|
6
5
|
export declare const DEBOUNCE = 100;
|
|
7
|
-
export declare function extractStoriesJson(outputFile: string, initializedStoryIndexGenerator: Promise<StoryIndexGenerator>, transform?: (index:
|
|
6
|
+
export declare function extractStoriesJson(outputFile: string, initializedStoryIndexGenerator: Promise<StoryIndexGenerator>, transform?: (index: Store_StoryIndex) => any): Promise<void>;
|
|
8
7
|
export declare function useStoriesJson({ router, initializedStoryIndexGenerator, workingDir, serverChannel, normalizedStories, }: {
|
|
9
8
|
router: Router;
|
|
10
9
|
initializedStoryIndexGenerator: Promise<StoryIndexGenerator>;
|
|
11
10
|
serverChannel: ServerChannel;
|
|
12
11
|
workingDir?: string;
|
|
13
|
-
normalizedStories:
|
|
12
|
+
normalizedStories: CoreCommon_NormalizedStoriesSpecifier[];
|
|
14
13
|
}): void;
|
|
15
|
-
export declare const convertToIndexV3: (index:
|
|
14
|
+
export declare const convertToIndexV3: (index: Store_StoryIndex) => Store_StoryIndexV3;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { VersionCheck } from '@storybook/
|
|
1
|
+
import type { VersionCheck } from '@storybook/types';
|
|
2
2
|
export declare const updateCheck: (version: string) => Promise<VersionCheck>;
|
|
3
3
|
export declare function createUpdateMessage(updateInfo: VersionCheck, version: string): string;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
export declare function watchStorySpecifiers(specifiers: NormalizedStoriesSpecifier[], options: {
|
|
1
|
+
import type { CoreCommon_NormalizedStoriesSpecifier, Path } from '@storybook/types';
|
|
2
|
+
export declare function watchStorySpecifiers(specifiers: CoreCommon_NormalizedStoriesSpecifier[], options: {
|
|
4
3
|
workingDir: Path;
|
|
5
|
-
}, onInvalidate: (specifier:
|
|
4
|
+
}, onInvalidate: (specifier: CoreCommon_NormalizedStoriesSpecifier, path: Path, removed: boolean) => void): () => any;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/core-server",
|
|
3
|
-
"version": "7.0.0-alpha.
|
|
3
|
+
"version": "7.0.0-alpha.45",
|
|
4
4
|
"description": "Storybook framework-agnostic API",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook"
|
|
@@ -35,16 +35,17 @@
|
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@aw-web-design/x-default-browser": "1.4.88",
|
|
37
37
|
"@discoveryjs/json-ext": "^0.5.3",
|
|
38
|
-
"@storybook/builder-manager": "7.0.0-alpha.
|
|
39
|
-
"@storybook/core-client": "7.0.0-alpha.
|
|
40
|
-
"@storybook/core-common": "7.0.0-alpha.
|
|
41
|
-
"@storybook/core-events": "7.0.0-alpha.
|
|
38
|
+
"@storybook/builder-manager": "7.0.0-alpha.45",
|
|
39
|
+
"@storybook/core-client": "7.0.0-alpha.45",
|
|
40
|
+
"@storybook/core-common": "7.0.0-alpha.45",
|
|
41
|
+
"@storybook/core-events": "7.0.0-alpha.45",
|
|
42
42
|
"@storybook/csf": "next",
|
|
43
|
-
"@storybook/csf-tools": "7.0.0-alpha.
|
|
43
|
+
"@storybook/csf-tools": "7.0.0-alpha.45",
|
|
44
44
|
"@storybook/docs-mdx": "0.0.1-canary.12433cf.0",
|
|
45
|
-
"@storybook/node-logger": "7.0.0-alpha.
|
|
46
|
-
"@storybook/store": "7.0.0-alpha.
|
|
47
|
-
"@storybook/telemetry": "7.0.0-alpha.
|
|
45
|
+
"@storybook/node-logger": "7.0.0-alpha.45",
|
|
46
|
+
"@storybook/store": "7.0.0-alpha.45",
|
|
47
|
+
"@storybook/telemetry": "7.0.0-alpha.45",
|
|
48
|
+
"@storybook/types": "7.0.0-alpha.45",
|
|
48
49
|
"@types/node": "^16.0.0",
|
|
49
50
|
"@types/node-fetch": "^2.5.7",
|
|
50
51
|
"@types/pretty-hrtime": "^1.0.0",
|
|
@@ -76,7 +77,7 @@
|
|
|
76
77
|
"ws": "^8.2.3"
|
|
77
78
|
},
|
|
78
79
|
"devDependencies": {
|
|
79
|
-
"@storybook/builder-webpack5": "7.0.0-alpha.
|
|
80
|
+
"@storybook/builder-webpack5": "7.0.0-alpha.45",
|
|
80
81
|
"@types/compression": "^1.7.0",
|
|
81
82
|
"@types/ip": "^1.1.0",
|
|
82
83
|
"@types/serve-favicon": "^2.5.2",
|
|
@@ -102,5 +103,5 @@
|
|
|
102
103
|
"publishConfig": {
|
|
103
104
|
"access": "public"
|
|
104
105
|
},
|
|
105
|
-
"gitHead": "
|
|
106
|
+
"gitHead": "3ef14366115c56c1d45c0359ff681cc47ed50532"
|
|
106
107
|
}
|