@storybook/angular 10.1.0-beta.2 → 10.1.0-beta.4
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/_node-chunks/{chunk-H3OJXHRP.js → chunk-DV65XE7X.js} +20 -18
- package/dist/_node-chunks/{chunk-ZYERJ3PK.js → chunk-HEM23HU4.js} +6 -6
- package/dist/builders/build-storybook/index.js +79 -88
- package/dist/builders/start-storybook/index.js +101 -107
- package/dist/node/index.js +6 -6
- package/dist/preset.js +6 -6
- package/dist/server/framework-preset-angular-cli.js +7 -7
- package/dist/server/framework-preset-angular-ivy.js +6 -6
- package/package.json +4 -4
- package/preset.js +1 -0
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_4xtch81m7at from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_4xtch81m7at from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_4xtch81m7at from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_4xtch81m7at.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_4xtch81m7at.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_4xtch81m7at.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
12
|
import {
|
|
13
13
|
up
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-HEM23HU4.js";
|
|
15
15
|
|
|
16
16
|
// ../../node_modules/empathic/package.mjs
|
|
17
17
|
function up2(options) {
|
|
@@ -34,25 +34,27 @@ var printErrorDetails = (error) => {
|
|
|
34
34
|
// src/builders/utils/run-compodoc.ts
|
|
35
35
|
import { isAbsolute, relative } from "node:path";
|
|
36
36
|
import { JsPackageManagerFactory } from "storybook/internal/common";
|
|
37
|
-
import {
|
|
38
|
-
var hasTsConfigArg = (args) => args.indexOf("-p") !== -1, hasOutputArg = (args) => args.indexOf("-d") !== -1 || args.indexOf("--output") !== -1, toRelativePath = (pathToTsConfig) => isAbsolute(pathToTsConfig) ? relative(".", pathToTsConfig) : pathToTsConfig, runCompodoc = ({ compodocArgs, tsconfig }, context) =>
|
|
37
|
+
import { prompt } from "storybook/internal/node-logger";
|
|
38
|
+
var hasTsConfigArg = (args) => args.indexOf("-p") !== -1, hasOutputArg = (args) => args.indexOf("-d") !== -1 || args.indexOf("--output") !== -1, toRelativePath = (pathToTsConfig) => isAbsolute(pathToTsConfig) ? relative(".", pathToTsConfig) : pathToTsConfig, runCompodoc = async ({ compodocArgs, tsconfig }, context) => {
|
|
39
39
|
let tsConfigPath = toRelativePath(tsconfig), finalCompodocArgs = [
|
|
40
40
|
"compodoc",
|
|
41
41
|
...hasTsConfigArg(compodocArgs) ? [] : ["-p", tsConfigPath],
|
|
42
42
|
...hasOutputArg(compodocArgs) ? [] : ["-d", `${context.workspaceRoot || "."}`],
|
|
43
43
|
...compodocArgs
|
|
44
44
|
], packageManager = JsPackageManagerFactory.getPackageManager();
|
|
45
|
-
|
|
46
|
-
packageManager.runPackageCommand({
|
|
45
|
+
await prompt.executeTaskWithSpinner(
|
|
46
|
+
() => packageManager.runPackageCommand({
|
|
47
47
|
args: finalCompodocArgs,
|
|
48
48
|
cwd: context.workspaceRoot
|
|
49
|
-
})
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}
|
|
49
|
+
}),
|
|
50
|
+
{
|
|
51
|
+
id: "compodoc",
|
|
52
|
+
intro: "Generating documentation with Compodoc",
|
|
53
|
+
success: "Compodoc finished successfully",
|
|
54
|
+
error: "Compodoc failed"
|
|
55
|
+
}
|
|
56
|
+
);
|
|
57
|
+
};
|
|
56
58
|
|
|
57
59
|
export {
|
|
58
60
|
up2 as up,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_4xtch81m7at from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_4xtch81m7at from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_4xtch81m7at from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_4xtch81m7at.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_4xtch81m7at.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_4xtch81m7at.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_4xtch81m7at from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_4xtch81m7at from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_4xtch81m7at from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_4xtch81m7at.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_4xtch81m7at.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_4xtch81m7at.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -14,10 +14,10 @@ import {
|
|
|
14
14
|
printErrorDetails,
|
|
15
15
|
runCompodoc,
|
|
16
16
|
up as up2
|
|
17
|
-
} from "../../_node-chunks/chunk-
|
|
17
|
+
} from "../../_node-chunks/chunk-DV65XE7X.js";
|
|
18
18
|
import {
|
|
19
19
|
up
|
|
20
|
-
} from "../../_node-chunks/chunk-
|
|
20
|
+
} from "../../_node-chunks/chunk-HEM23HU4.js";
|
|
21
21
|
|
|
22
22
|
// src/builders/build-storybook/index.ts
|
|
23
23
|
import { readFileSync } from "node:fs";
|
|
@@ -26,78 +26,70 @@ import { buildStaticStandalone, withTelemetry } from "storybook/internal/core-se
|
|
|
26
26
|
import { addToGlobalContext } from "storybook/internal/telemetry";
|
|
27
27
|
import { logger } from "storybook/internal/node-logger";
|
|
28
28
|
import { createBuilder, targetFromTargetString } from "@angular-devkit/architect";
|
|
29
|
-
import { from, of, throwError } from "rxjs";
|
|
30
|
-
import { catchError, map, mapTo, switchMap } from "rxjs/operators";
|
|
31
29
|
import { VERSION } from "@angular/core";
|
|
32
30
|
addToGlobalContext("cliVersion", versions.storybook);
|
|
33
|
-
var commandBuilder = (options, context) =>
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
previewUrl
|
|
96
|
-
};
|
|
97
|
-
}),
|
|
98
|
-
switchMap((standaloneOptions) => runInstance({ ...standaloneOptions, mode: "static" })),
|
|
99
|
-
map(() => ({ success: !0 }))
|
|
100
|
-
), build_storybook_default = createBuilder(commandBuilder);
|
|
31
|
+
var commandBuilder = async (options, context) => {
|
|
32
|
+
logger.intro("Building Storybook");
|
|
33
|
+
let { tsConfig } = await setup(options, context), docTSConfig = up("tsconfig.doc.json", {
|
|
34
|
+
cwd: options.configDir,
|
|
35
|
+
last: getProjectRoot()
|
|
36
|
+
});
|
|
37
|
+
options.compodoc && await runCompodoc(
|
|
38
|
+
{ compodocArgs: options.compodocArgs, tsconfig: docTSConfig ?? tsConfig },
|
|
39
|
+
context
|
|
40
|
+
), getEnvConfig(options, {
|
|
41
|
+
staticDir: "SBCONFIG_STATIC_DIR",
|
|
42
|
+
outputDir: "SBCONFIG_OUTPUT_DIR",
|
|
43
|
+
configDir: "SBCONFIG_CONFIG_DIR"
|
|
44
|
+
});
|
|
45
|
+
let {
|
|
46
|
+
browserTarget,
|
|
47
|
+
stylePreprocessorOptions,
|
|
48
|
+
styles,
|
|
49
|
+
configDir,
|
|
50
|
+
docs,
|
|
51
|
+
loglevel,
|
|
52
|
+
test,
|
|
53
|
+
outputDir,
|
|
54
|
+
quiet,
|
|
55
|
+
enableProdMode = !0,
|
|
56
|
+
webpackStatsJson,
|
|
57
|
+
statsJson,
|
|
58
|
+
debugWebpack,
|
|
59
|
+
disableTelemetry,
|
|
60
|
+
assets,
|
|
61
|
+
previewUrl,
|
|
62
|
+
sourceMap = !1,
|
|
63
|
+
preserveSymlinks = !1,
|
|
64
|
+
experimentalZoneless = !!(VERSION.major && Number(VERSION.major) >= 21)
|
|
65
|
+
} = options, packageJsonPath = up2({ cwd: __dirname }), standaloneOptions = {
|
|
66
|
+
packageJson: packageJsonPath != null ? JSON.parse(readFileSync(packageJsonPath, "utf8")) : null,
|
|
67
|
+
configDir,
|
|
68
|
+
...docs ? { docs } : {},
|
|
69
|
+
loglevel,
|
|
70
|
+
outputDir,
|
|
71
|
+
test,
|
|
72
|
+
quiet,
|
|
73
|
+
enableProdMode,
|
|
74
|
+
disableTelemetry,
|
|
75
|
+
angularBrowserTarget: browserTarget,
|
|
76
|
+
angularBuilderContext: context,
|
|
77
|
+
angularBuilderOptions: {
|
|
78
|
+
...stylePreprocessorOptions ? { stylePreprocessorOptions } : {},
|
|
79
|
+
...styles ? { styles } : {},
|
|
80
|
+
...assets ? { assets } : {},
|
|
81
|
+
sourceMap,
|
|
82
|
+
preserveSymlinks,
|
|
83
|
+
experimentalZoneless
|
|
84
|
+
},
|
|
85
|
+
tsConfig,
|
|
86
|
+
webpackStatsJson,
|
|
87
|
+
statsJson,
|
|
88
|
+
debugWebpack,
|
|
89
|
+
previewUrl
|
|
90
|
+
};
|
|
91
|
+
return await runInstance({ ...standaloneOptions, mode: "static" }), logger.outro("Storybook build completed successfully"), { success: !0 };
|
|
92
|
+
}, build_storybook_default = createBuilder(commandBuilder);
|
|
101
93
|
async function setup(options, context) {
|
|
102
94
|
let browserOptions, browserTarget;
|
|
103
95
|
return options.browserTarget && (browserTarget = targetFromTargetString(options.browserTarget), browserOptions = await context.validateOptions(
|
|
@@ -107,22 +99,21 @@ async function setup(options, context) {
|
|
|
107
99
|
tsConfig: options.tsConfig ?? up("tsconfig.json", { cwd: options.configDir, last: getProjectRoot() }) ?? browserOptions.tsConfig
|
|
108
100
|
};
|
|
109
101
|
}
|
|
110
|
-
function runInstance(options) {
|
|
111
|
-
|
|
112
|
-
withTelemetry(
|
|
102
|
+
async function runInstance(options) {
|
|
103
|
+
try {
|
|
104
|
+
await withTelemetry(
|
|
113
105
|
"build",
|
|
114
106
|
{
|
|
115
107
|
cliOptions: options,
|
|
116
108
|
presetOptions: { ...options, corePresets: [], overridePresets: [] },
|
|
117
109
|
printError: printErrorDetails
|
|
118
110
|
},
|
|
119
|
-
async () =>
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
).pipe(catchError((error) => throwError(errorSummary(error))));
|
|
111
|
+
async () => await buildStaticStandalone(options)
|
|
112
|
+
);
|
|
113
|
+
} catch (error) {
|
|
114
|
+
let summary = errorSummary(error);
|
|
115
|
+
throw new Error(summary);
|
|
116
|
+
}
|
|
126
117
|
}
|
|
127
118
|
export {
|
|
128
119
|
build_storybook_default as default
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_4xtch81m7at from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_4xtch81m7at from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_4xtch81m7at from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_4xtch81m7at.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_4xtch81m7at.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_4xtch81m7at.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -14,10 +14,10 @@ import {
|
|
|
14
14
|
printErrorDetails,
|
|
15
15
|
runCompodoc,
|
|
16
16
|
up as up2
|
|
17
|
-
} from "../../_node-chunks/chunk-
|
|
17
|
+
} from "../../_node-chunks/chunk-DV65XE7X.js";
|
|
18
18
|
import {
|
|
19
19
|
up
|
|
20
|
-
} from "../../_node-chunks/chunk-
|
|
20
|
+
} from "../../_node-chunks/chunk-HEM23HU4.js";
|
|
21
21
|
|
|
22
22
|
// src/builders/start-storybook/index.ts
|
|
23
23
|
import { readFileSync } from "node:fs";
|
|
@@ -26,99 +26,91 @@ import { buildDevStandalone, withTelemetry } from "storybook/internal/core-serve
|
|
|
26
26
|
import { addToGlobalContext } from "storybook/internal/telemetry";
|
|
27
27
|
import { logger } from "storybook/internal/node-logger";
|
|
28
28
|
import { createBuilder, targetFromTargetString } from "@angular-devkit/architect";
|
|
29
|
-
import { Observable, from, of } from "rxjs";
|
|
30
|
-
import { map, mapTo, switchMap } from "rxjs/operators";
|
|
31
29
|
import { VERSION } from "@angular/core";
|
|
32
30
|
addToGlobalContext("cliVersion", versions.storybook);
|
|
33
|
-
var commandBuilder = (options, context) =>
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
previewUrl
|
|
117
|
-
};
|
|
118
|
-
}),
|
|
119
|
-
switchMap((standaloneOptions) => runInstance(standaloneOptions)),
|
|
120
|
-
map((port) => ({ success: !0, info: { port } }))
|
|
121
|
-
), start_storybook_default = createBuilder(commandBuilder);
|
|
31
|
+
var commandBuilder = async (options, context) => {
|
|
32
|
+
logger.intro("Starting Storybook");
|
|
33
|
+
let { tsConfig } = await setup(options, context), docTSConfig = up("tsconfig.doc.json", {
|
|
34
|
+
cwd: options.configDir,
|
|
35
|
+
last: getProjectRoot()
|
|
36
|
+
});
|
|
37
|
+
options.compodoc && await runCompodoc(
|
|
38
|
+
{
|
|
39
|
+
compodocArgs: [...options.compodocArgs, ...options.quiet ? ["--silent"] : []],
|
|
40
|
+
tsconfig: docTSConfig ?? tsConfig
|
|
41
|
+
},
|
|
42
|
+
context
|
|
43
|
+
), getEnvConfig(options, {
|
|
44
|
+
port: "SBCONFIG_PORT",
|
|
45
|
+
host: "SBCONFIG_HOSTNAME",
|
|
46
|
+
staticDir: "SBCONFIG_STATIC_DIR",
|
|
47
|
+
configDir: "SBCONFIG_CONFIG_DIR",
|
|
48
|
+
ci: "CI"
|
|
49
|
+
}), options.port = parseInt(`${options.port}`, 10);
|
|
50
|
+
let {
|
|
51
|
+
browserTarget,
|
|
52
|
+
stylePreprocessorOptions,
|
|
53
|
+
styles,
|
|
54
|
+
ci,
|
|
55
|
+
configDir,
|
|
56
|
+
docs,
|
|
57
|
+
host,
|
|
58
|
+
https,
|
|
59
|
+
port,
|
|
60
|
+
quiet,
|
|
61
|
+
enableProdMode = !1,
|
|
62
|
+
smokeTest,
|
|
63
|
+
sslCa,
|
|
64
|
+
sslCert,
|
|
65
|
+
sslKey,
|
|
66
|
+
disableTelemetry,
|
|
67
|
+
assets,
|
|
68
|
+
initialPath,
|
|
69
|
+
open,
|
|
70
|
+
debugWebpack,
|
|
71
|
+
loglevel,
|
|
72
|
+
webpackStatsJson,
|
|
73
|
+
statsJson,
|
|
74
|
+
previewUrl,
|
|
75
|
+
sourceMap = !1,
|
|
76
|
+
preserveSymlinks = !1,
|
|
77
|
+
experimentalZoneless = !!(VERSION.major && Number(VERSION.major) >= 21)
|
|
78
|
+
} = options, packageJsonPath = up2({ cwd: __dirname }), standaloneOptions = {
|
|
79
|
+
packageJson: packageJsonPath != null ? JSON.parse(readFileSync(packageJsonPath, "utf8")) : null,
|
|
80
|
+
ci,
|
|
81
|
+
configDir,
|
|
82
|
+
...docs ? { docs } : {},
|
|
83
|
+
host,
|
|
84
|
+
https,
|
|
85
|
+
port,
|
|
86
|
+
quiet,
|
|
87
|
+
enableProdMode,
|
|
88
|
+
smokeTest,
|
|
89
|
+
sslCa,
|
|
90
|
+
sslCert,
|
|
91
|
+
sslKey,
|
|
92
|
+
disableTelemetry,
|
|
93
|
+
angularBrowserTarget: browserTarget,
|
|
94
|
+
angularBuilderContext: context,
|
|
95
|
+
angularBuilderOptions: {
|
|
96
|
+
...stylePreprocessorOptions ? { stylePreprocessorOptions } : {},
|
|
97
|
+
...styles ? { styles } : {},
|
|
98
|
+
...assets ? { assets } : {},
|
|
99
|
+
preserveSymlinks,
|
|
100
|
+
sourceMap,
|
|
101
|
+
experimentalZoneless
|
|
102
|
+
},
|
|
103
|
+
tsConfig,
|
|
104
|
+
initialPath,
|
|
105
|
+
open,
|
|
106
|
+
debugWebpack,
|
|
107
|
+
webpackStatsJson,
|
|
108
|
+
statsJson,
|
|
109
|
+
loglevel,
|
|
110
|
+
previewUrl
|
|
111
|
+
};
|
|
112
|
+
return { success: !0, info: { port: await runInstance(standaloneOptions) } };
|
|
113
|
+
}, start_storybook_default = createBuilder(commandBuilder);
|
|
122
114
|
async function setup(options, context) {
|
|
123
115
|
let browserOptions, browserTarget;
|
|
124
116
|
return options.browserTarget && (browserTarget = targetFromTargetString(options.browserTarget), browserOptions = await context.validateOptions(
|
|
@@ -128,20 +120,22 @@ async function setup(options, context) {
|
|
|
128
120
|
tsConfig: options.tsConfig ?? up("tsconfig.json", { cwd: options.configDir }) ?? browserOptions.tsConfig
|
|
129
121
|
};
|
|
130
122
|
}
|
|
131
|
-
function runInstance(options) {
|
|
132
|
-
|
|
133
|
-
withTelemetry(
|
|
123
|
+
async function runInstance(options) {
|
|
124
|
+
try {
|
|
125
|
+
let { port } = await withTelemetry(
|
|
134
126
|
"dev",
|
|
135
127
|
{
|
|
136
128
|
cliOptions: options,
|
|
137
129
|
presetOptions: { ...options, corePresets: [], overridePresets: [] },
|
|
138
130
|
printError: printErrorDetails
|
|
139
131
|
},
|
|
140
|
-
() =>
|
|
141
|
-
)
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
132
|
+
() => buildDevStandalone(options)
|
|
133
|
+
);
|
|
134
|
+
return port;
|
|
135
|
+
} catch (error) {
|
|
136
|
+
let summarized = errorSummary(error);
|
|
137
|
+
throw new Error(String(summarized));
|
|
138
|
+
}
|
|
145
139
|
}
|
|
146
140
|
export {
|
|
147
141
|
start_storybook_default as default
|
package/dist/node/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_4xtch81m7at from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_4xtch81m7at from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_4xtch81m7at from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_4xtch81m7at.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_4xtch81m7at.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_4xtch81m7at.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
package/dist/preset.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_4xtch81m7at from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_4xtch81m7at from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_4xtch81m7at from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_4xtch81m7at.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_4xtch81m7at.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_4xtch81m7at.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_4xtch81m7at from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_4xtch81m7at from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_4xtch81m7at from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_4xtch81m7at.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_4xtch81m7at.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_4xtch81m7at.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
12
|
import {
|
|
13
13
|
up
|
|
14
|
-
} from "../_node-chunks/chunk-
|
|
14
|
+
} from "../_node-chunks/chunk-HEM23HU4.js";
|
|
15
15
|
|
|
16
16
|
// src/server/framework-preset-angular-cli.ts
|
|
17
17
|
import { logger } from "storybook/internal/node-logger";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_4xtch81m7at from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_4xtch81m7at from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_4xtch81m7at from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_4xtch81m7at.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_4xtch81m7at.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_4xtch81m7at.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/angular",
|
|
3
|
-
"version": "10.1.0-beta.
|
|
3
|
+
"version": "10.1.0-beta.4",
|
|
4
4
|
"description": "Storybook for Angular: Develop, document, and test UI components in isolation",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"prep": "jiti ../../../scripts/build/build-package.ts"
|
|
62
62
|
},
|
|
63
63
|
"dependencies": {
|
|
64
|
-
"@storybook/builder-webpack5": "10.1.0-beta.
|
|
64
|
+
"@storybook/builder-webpack5": "10.1.0-beta.4",
|
|
65
65
|
"@storybook/global": "^5.0.0",
|
|
66
66
|
"telejson": "8.0.0",
|
|
67
67
|
"ts-dedent": "^2.0.0",
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
"@angular/forms": "^19.1.1",
|
|
82
82
|
"@angular/platform-browser": "^19.1.1",
|
|
83
83
|
"@angular/platform-browser-dynamic": "^19.1.1",
|
|
84
|
-
"@storybook/core-webpack": "10.1.0-beta.
|
|
84
|
+
"@storybook/core-webpack": "10.1.0-beta.4",
|
|
85
85
|
"@types/node": "^22.0.0",
|
|
86
86
|
"empathic": "^2.0.0",
|
|
87
87
|
"rimraf": "^6.0.1",
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
"@angular/platform-browser": ">=18.0.0 < 22.0.0",
|
|
103
103
|
"@angular/platform-browser-dynamic": ">=18.0.0 < 22.0.0",
|
|
104
104
|
"rxjs": "^6.5.3 || ^7.4.0",
|
|
105
|
-
"storybook": "^10.1.0-beta.
|
|
105
|
+
"storybook": "^10.1.0-beta.4",
|
|
106
106
|
"typescript": "^4.9.0 || ^5.0.0",
|
|
107
107
|
"zone.js": ">=0.14.0"
|
|
108
108
|
},
|
package/preset.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './dist/preset.js';
|