@storybook/core-server 6.5.7 → 7.0.0-alpha.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.
- package/README.md +0 -1
- package/dist/cjs/build-dev.js +55 -140
- package/dist/cjs/build-static.js +45 -75
- package/dist/cjs/dev-server.js +10 -7
- package/dist/cjs/presets/babel-cache-preset.js +2 -4
- package/dist/cjs/presets/common-preset.js +32 -16
- package/dist/cjs/standalone.js +9 -1
- package/dist/cjs/utils/StoryIndexGenerator.js +16 -4
- package/dist/cjs/utils/{get-manager-builder.js → get-builders.js} +31 -25
- package/dist/esm/build-dev.js +53 -130
- package/dist/esm/build-static.js +40 -64
- package/dist/esm/dev-server.js +10 -6
- package/dist/esm/presets/babel-cache-preset.js +1 -2
- package/dist/esm/presets/common-preset.js +24 -15
- package/dist/esm/standalone.js +8 -1
- package/dist/esm/utils/StoryIndexGenerator.js +17 -5
- package/dist/esm/utils/get-builders.js +36 -0
- package/dist/types/build-dev.d.ts +2 -0
- package/dist/{ts3.9 → types}/build-static.d.ts +0 -1
- package/dist/{ts3.9 → types}/dev-server.d.ts +0 -0
- package/dist/{ts3.9 → types}/index.d.ts +0 -0
- package/dist/types/presets/babel-cache-preset.d.ts +1 -0
- package/dist/{ts3.4 → types}/presets/common-preset.d.ts +29 -31
- package/dist/{ts3.9 → types}/standalone.d.ts +0 -0
- package/dist/{ts3.9 → types}/utils/StoryIndexGenerator.d.ts +4 -1
- package/dist/{ts3.9 → types}/utils/__mockdata__/E.stories.d.ts +0 -0
- package/dist/{ts3.9 → types}/utils/__mockdata__/deeply/nested/single/File.stories.d.ts +0 -0
- package/dist/{ts3.9 → types}/utils/__mockdata__/src/B.stories.d.ts +0 -0
- package/dist/{ts3.9 → types}/utils/__mockdata__/src/NoMeta.stories.d.ts +0 -0
- package/dist/{ts3.9 → types}/utils/__mockdata__/src/nested/Button.d.ts +0 -0
- package/dist/{ts3.9 → types}/utils/__mockdata__/src/nested/Button.stories.d.ts +0 -0
- package/dist/{ts3.9 → types}/utils/__mockdata__/src/second-nested/G.stories.d.ts +0 -0
- package/dist/{ts3.9 → types}/utils/copy-all-static-files.d.ts +0 -0
- package/dist/types/utils/get-builders.d.ts +2 -0
- package/dist/{ts3.9 → types}/utils/get-server-channel.d.ts +0 -0
- package/dist/{ts3.9 → types}/utils/metadata.d.ts +0 -0
- package/dist/{ts3.9 → types}/utils/middleware.d.ts +0 -0
- package/dist/{ts3.9 → types}/utils/open-in-browser.d.ts +0 -0
- package/dist/{ts3.9 → types}/utils/output-startup-information.d.ts +0 -0
- package/dist/{ts3.4 → types}/utils/output-stats.d.ts +3 -3
- package/dist/{ts3.9 → types}/utils/release-notes.d.ts +0 -0
- package/dist/{ts3.9 → types}/utils/server-address.d.ts +0 -0
- package/dist/{ts3.9 → types}/utils/server-init.d.ts +0 -0
- package/dist/{ts3.9 → types}/utils/server-statics.d.ts +0 -0
- package/dist/{ts3.9 → types}/utils/stories-json.d.ts +0 -0
- package/dist/{ts3.9 → types}/utils/update-check.d.ts +0 -0
- package/dist/{ts3.9 → types}/utils/watch-story-specifiers.d.ts +0 -0
- package/package.json +14 -23
- package/dist/cjs/cli/dev.js +0 -63
- package/dist/cjs/cli/index.js +0 -31
- package/dist/cjs/cli/prod.js +0 -43
- package/dist/cjs/cli/utils.js +0 -63
- package/dist/cjs/utils/get-preview-builder.js +0 -47
- package/dist/esm/cli/dev.js +0 -44
- package/dist/esm/cli/index.js +0 -2
- package/dist/esm/cli/prod.js +0 -26
- package/dist/esm/cli/utils.js +0 -48
- package/dist/esm/utils/get-manager-builder.js +0 -26
- package/dist/esm/utils/get-preview-builder.js +0 -28
- package/dist/modern/build-dev.js +0 -232
- package/dist/modern/build-static.js +0 -237
- package/dist/modern/cli/dev.js +0 -44
- package/dist/modern/cli/index.js +0 -2
- package/dist/modern/cli/prod.js +0 -26
- package/dist/modern/cli/utils.js +0 -48
- package/dist/modern/dev-server.js +0 -200
- package/dist/modern/index.js +0 -4
- package/dist/modern/presets/babel-cache-preset.js +0 -18
- package/dist/modern/presets/common-preset.js +0 -124
- package/dist/modern/standalone.js +0 -30
- package/dist/modern/utils/StoryIndexGenerator.js +0 -222
- package/dist/modern/utils/__mockdata__/E.stories.js +0 -5
- package/dist/modern/utils/__mockdata__/deeply/nested/single/File.stories.js +0 -4
- package/dist/modern/utils/__mockdata__/preview.js +0 -1
- package/dist/modern/utils/__mockdata__/src/A.stories.js +0 -5
- package/dist/modern/utils/__mockdata__/src/B.stories.js +0 -5
- package/dist/modern/utils/__mockdata__/src/C.js +0 -1
- package/dist/modern/utils/__mockdata__/src/D.stories.js +0 -5
- package/dist/modern/utils/__mockdata__/src/NoMeta.stories.js +0 -4
- package/dist/modern/utils/__mockdata__/src/first-nested/deeply/F.stories.js +0 -5
- package/dist/modern/utils/__mockdata__/src/nested/Button.js +0 -1
- package/dist/modern/utils/__mockdata__/src/nested/Button.stories.js +0 -5
- package/dist/modern/utils/__mockdata__/src/second-nested/G.stories.js +0 -5
- package/dist/modern/utils/copy-all-static-files.js +0 -62
- package/dist/modern/utils/get-manager-builder.js +0 -26
- package/dist/modern/utils/get-preview-builder.js +0 -28
- package/dist/modern/utils/get-server-channel.js +0 -39
- package/dist/modern/utils/metadata.js +0 -14
- package/dist/modern/utils/middleware.js +0 -27
- package/dist/modern/utils/open-in-browser.js +0 -26
- package/dist/modern/utils/output-startup-information.js +0 -54
- package/dist/modern/utils/output-stats.js +0 -37
- package/dist/modern/utils/release-notes.js +0 -63
- package/dist/modern/utils/server-address.js +0 -20
- package/dist/modern/utils/server-init.js +0 -29
- package/dist/modern/utils/server-statics.js +0 -97
- package/dist/modern/utils/stories-json.js +0 -42
- package/dist/modern/utils/update-check.js +0 -65
- package/dist/modern/utils/watch-story-specifiers.js +0 -99
- package/dist/ts3.4/build-dev.d.ts +0 -3
- package/dist/ts3.4/build-static.d.ts +0 -3
- package/dist/ts3.4/cli/dev.d.ts +0 -6
- package/dist/ts3.4/cli/index.d.ts +0 -2
- package/dist/ts3.4/cli/prod.d.ts +0 -7
- package/dist/ts3.4/cli/utils.d.ts +0 -5
- package/dist/ts3.4/dev-server.d.ts +0 -24
- package/dist/ts3.4/index.d.ts +0 -4
- package/dist/ts3.4/presets/babel-cache-preset.d.ts +0 -2
- package/dist/ts3.4/standalone.d.ts +0 -2
- package/dist/ts3.4/utils/StoryIndexGenerator.d.ts +0 -27
- package/dist/ts3.4/utils/__mockdata__/E.stories.d.ts +0 -5
- package/dist/ts3.4/utils/__mockdata__/deeply/nested/single/File.stories.d.ts +0 -5
- package/dist/ts3.4/utils/__mockdata__/src/B.stories.d.ts +0 -5
- package/dist/ts3.4/utils/__mockdata__/src/NoMeta.stories.d.ts +0 -1
- package/dist/ts3.4/utils/__mockdata__/src/nested/Button.d.ts +0 -1
- package/dist/ts3.4/utils/__mockdata__/src/nested/Button.stories.d.ts +0 -5
- package/dist/ts3.4/utils/__mockdata__/src/second-nested/G.stories.d.ts +0 -5
- package/dist/ts3.4/utils/copy-all-static-files.d.ts +0 -2
- package/dist/ts3.4/utils/get-manager-builder.d.ts +0 -2
- package/dist/ts3.4/utils/get-preview-builder.d.ts +0 -2
- package/dist/ts3.4/utils/get-server-channel.d.ts +0 -9
- package/dist/ts3.4/utils/metadata.d.ts +0 -3
- package/dist/ts3.4/utils/middleware.d.ts +0 -1
- package/dist/ts3.4/utils/open-in-browser.d.ts +0 -1
- package/dist/ts3.4/utils/output-startup-information.d.ts +0 -16
- package/dist/ts3.4/utils/release-notes.d.ts +0 -8
- package/dist/ts3.4/utils/server-address.d.ts +0 -8
- package/dist/ts3.4/utils/server-init.d.ts +0 -10
- package/dist/ts3.4/utils/server-statics.d.ts +0 -8
- package/dist/ts3.4/utils/stories-json.d.ts +0 -13
- package/dist/ts3.4/utils/update-check.d.ts +0 -3
- package/dist/ts3.4/utils/watch-story-specifiers.d.ts +0 -5
- package/dist/ts3.9/build-dev.d.ts +0 -3
- package/dist/ts3.9/cli/dev.d.ts +0 -6
- package/dist/ts3.9/cli/index.d.ts +0 -2
- package/dist/ts3.9/cli/prod.d.ts +0 -7
- package/dist/ts3.9/cli/utils.d.ts +0 -5
- package/dist/ts3.9/presets/babel-cache-preset.d.ts +0 -2
- package/dist/ts3.9/presets/common-preset.d.ts +0 -31
- package/dist/ts3.9/utils/get-manager-builder.d.ts +0 -2
- package/dist/ts3.9/utils/get-preview-builder.d.ts +0 -2
- package/dist/ts3.9/utils/output-stats.d.ts +0 -3
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Options } from '@storybook/core-common';
|
|
2
|
-
export declare function useStatics(router: any, options: Options): Promise<void>;
|
|
3
|
-
export declare const parseStaticDir: (arg: string) => Promise<{
|
|
4
|
-
staticDir: string;
|
|
5
|
-
staticPath: string;
|
|
6
|
-
targetDir: string;
|
|
7
|
-
targetEndpoint: string;
|
|
8
|
-
}>;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Router } from 'express';
|
|
2
|
-
import { NormalizedStoriesSpecifier } from '@storybook/core-common';
|
|
3
|
-
import { StoryIndexGenerator } from './StoryIndexGenerator';
|
|
4
|
-
import { ServerChannel } from './get-server-channel';
|
|
5
|
-
export declare const DEBOUNCE = 100;
|
|
6
|
-
export declare function extractStoriesJson(outputFile: string, initializedStoryIndexGenerator: Promise<StoryIndexGenerator>): Promise<void>;
|
|
7
|
-
export declare function useStoriesJson({ router, initializedStoryIndexGenerator, workingDir, serverChannel, normalizedStories, }: {
|
|
8
|
-
router: Router;
|
|
9
|
-
initializedStoryIndexGenerator: Promise<StoryIndexGenerator>;
|
|
10
|
-
serverChannel: ServerChannel;
|
|
11
|
-
workingDir?: string;
|
|
12
|
-
normalizedStories: NormalizedStoriesSpecifier[];
|
|
13
|
-
}): void;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { NormalizedStoriesSpecifier } from '@storybook/core-common';
|
|
2
|
-
import { Path } from '@storybook/store';
|
|
3
|
-
export declare function watchStorySpecifiers(specifiers: NormalizedStoriesSpecifier[], options: {
|
|
4
|
-
workingDir: Path;
|
|
5
|
-
}, onInvalidate: (specifier: NormalizedStoriesSpecifier, path: Path, removed: boolean) => void): () => any;
|
package/dist/ts3.9/cli/dev.d.ts
DELETED
package/dist/ts3.9/cli/prod.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { CommanderStatic } from 'commander';
|
|
2
|
-
import type { CLIOptions } from '@storybook/core-common';
|
|
3
|
-
export declare type ProdCliOptions = Pick<CLIOptions, 'configDir' | 'debugWebpack' | 'dll' | 'docs' | 'docsDll' | 'forceBuildPreview' | 'loglevel' | 'modern' | 'outputDir' | 'previewUrl' | 'quiet' | 'staticDir' | 'uiDll'>;
|
|
4
|
-
export declare function getProdCli(packageJson: {
|
|
5
|
-
version: string;
|
|
6
|
-
name: string;
|
|
7
|
-
}): CommanderStatic & ProdCliOptions;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { CLIOptions } from '@storybook/core-common';
|
|
2
|
-
import type { ProdCliOptions } from './prod';
|
|
3
|
-
export declare function parseList(str: string): string[];
|
|
4
|
-
export declare function getEnvConfig(program: Record<string, any>, configEnv: Record<string, any>): void;
|
|
5
|
-
export declare function checkDeprecatedFlags({ dll, uiDll, docsDll, staticDir, }: CLIOptions | ProdCliOptions): void;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { CoreConfig, StorybookConfig } from '@storybook/core-common';
|
|
2
|
-
import type { Options } from '@storybook/core-common';
|
|
3
|
-
export declare const babel: (_: unknown, options: Options) => Promise<{}>;
|
|
4
|
-
export declare const logLevel: (previous: any, options: Options) => any;
|
|
5
|
-
export declare const previewHead: (base: any, { configDir, presets }: Options) => Promise<string>;
|
|
6
|
-
export declare const env: () => Promise<Record<string, string>>;
|
|
7
|
-
export declare const previewBody: (base: any, { configDir, presets }: Options) => Promise<string>;
|
|
8
|
-
export declare const previewMainTemplate: () => string;
|
|
9
|
-
export declare const managerMainTemplate: () => string;
|
|
10
|
-
export declare const previewEntries: (entries: any[], options: {
|
|
11
|
-
modern?: boolean;
|
|
12
|
-
}) => any[];
|
|
13
|
-
export declare const typescript: () => {
|
|
14
|
-
check: boolean;
|
|
15
|
-
reactDocgen: string;
|
|
16
|
-
reactDocgenTypescriptOptions: {
|
|
17
|
-
shouldExtractLiteralValuesFromEnum: boolean;
|
|
18
|
-
shouldRemoveUndefinedFromOptional: boolean;
|
|
19
|
-
propFilter: (prop: any) => boolean;
|
|
20
|
-
savePropValueAsString: boolean;
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
/**
|
|
24
|
-
* If for some reason this config is not applied, the reason is that
|
|
25
|
-
* likely there is an addon that does `export core = () => ({ someConfig })`,
|
|
26
|
-
* instead of `export core = (existing) => ({ ...existing, someConfig })`,
|
|
27
|
-
* just overwriting everything and not merging with the existing values.
|
|
28
|
-
*/
|
|
29
|
-
export declare const core: (existing: CoreConfig, options: Options) => Promise<CoreConfig>;
|
|
30
|
-
export declare const config: (base: any, options: Options) => Promise<any[]>;
|
|
31
|
-
export declare const features: (existing: StorybookConfig['features']) => Promise<StorybookConfig['features']>;
|