@storybook/angular 10.2.0-alpha.1 → 10.2.0-alpha.3
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/build-schema.json +5 -1
- package/dist/_node-chunks/{chunk-VXFDRQ2G.js → chunk-SYQMCAHJ.js} +8 -8
- package/dist/_node-chunks/{chunk-7FLQA2IO.js → chunk-T2H76TKT.js} +11 -11
- package/dist/builders/build-storybook/index.js +15 -11
- package/dist/builders/start-storybook/index.js +19 -10
- package/dist/node/index.d.ts +1 -1
- package/dist/node/index.js +6 -6
- package/dist/preset.js +6 -6
- package/dist/server/framework-preset-angular-cli.js +8 -8
- package/dist/server/framework-preset-angular-ivy.js +6 -6
- package/package.json +4 -8
- package/start-schema.json +5 -1
package/build-schema.json
CHANGED
|
@@ -32,7 +32,11 @@
|
|
|
32
32
|
"loglevel": {
|
|
33
33
|
"type": "string",
|
|
34
34
|
"description": "Controls level of logging during build. Can be one of: [silly, verbose, info (default), warn, error, silent].",
|
|
35
|
-
"pattern": "(
|
|
35
|
+
"pattern": "(trace|debug|info|warn|error|silent)"
|
|
36
|
+
},
|
|
37
|
+
"logfile": {
|
|
38
|
+
"type": "string",
|
|
39
|
+
"description": "If provided, the log output will be written to the specified file path."
|
|
36
40
|
},
|
|
37
41
|
"debugWebpack": {
|
|
38
42
|
"type": "boolean",
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_ziisvekxp7 from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_ziisvekxp7 from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_ziisvekxp7 from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_ziisvekxp7.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_ziisvekxp7.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_ziisvekxp7.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-T2H76TKT.js";
|
|
15
15
|
|
|
16
|
-
//
|
|
16
|
+
// ../../../node_modules/empathic/package.mjs
|
|
17
17
|
function up2(options) {
|
|
18
18
|
return up("package.json", options);
|
|
19
19
|
}
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_ziisvekxp7 from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_ziisvekxp7 from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_ziisvekxp7 from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_ziisvekxp7.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_ziisvekxp7.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_ziisvekxp7.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
|
|
|
13
|
-
//
|
|
13
|
+
// ../../../node_modules/empathic/find.mjs
|
|
14
14
|
import { join as join2 } from "node:path";
|
|
15
15
|
import { existsSync, statSync } from "node:fs";
|
|
16
16
|
|
|
17
|
-
//
|
|
17
|
+
// ../../../node_modules/empathic/walk.mjs
|
|
18
18
|
import { dirname } from "node:path";
|
|
19
19
|
|
|
20
|
-
//
|
|
20
|
+
// ../../../node_modules/empathic/resolve.mjs
|
|
21
21
|
import { isAbsolute, join, resolve } from "node:path";
|
|
22
22
|
function absolute(input, root) {
|
|
23
23
|
return isAbsolute(input) ? input : resolve(root || ".", input);
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
//
|
|
26
|
+
// ../../../node_modules/empathic/walk.mjs
|
|
27
27
|
function up(base, options) {
|
|
28
28
|
let { last, cwd } = options || {}, tmp = absolute(base, cwd), root = absolute(last || "/", cwd), prev, arr = [];
|
|
29
29
|
for (; prev !== root && (arr.push(tmp), tmp = dirname(prev = tmp), tmp !== prev); )
|
|
@@ -31,7 +31,7 @@ function up(base, options) {
|
|
|
31
31
|
return arr;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
//
|
|
34
|
+
// ../../../node_modules/empathic/find.mjs
|
|
35
35
|
function up2(name, options) {
|
|
36
36
|
let dir, tmp, start = options && options.cwd || "";
|
|
37
37
|
for (dir of up(start, options))
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_ziisvekxp7 from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_ziisvekxp7 from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_ziisvekxp7 from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_ziisvekxp7.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_ziisvekxp7.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_ziisvekxp7.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -14,22 +14,22 @@ import {
|
|
|
14
14
|
printErrorDetails,
|
|
15
15
|
runCompodoc,
|
|
16
16
|
up as up2
|
|
17
|
-
} from "../../_node-chunks/chunk-
|
|
17
|
+
} from "../../_node-chunks/chunk-SYQMCAHJ.js";
|
|
18
18
|
import {
|
|
19
19
|
up
|
|
20
|
-
} from "../../_node-chunks/chunk-
|
|
20
|
+
} from "../../_node-chunks/chunk-T2H76TKT.js";
|
|
21
21
|
|
|
22
22
|
// src/builders/build-storybook/index.ts
|
|
23
23
|
import { readFileSync } from "node:fs";
|
|
24
24
|
import { getEnvConfig, getProjectRoot, versions } from "storybook/internal/common";
|
|
25
25
|
import { buildStaticStandalone, withTelemetry } from "storybook/internal/core-server";
|
|
26
26
|
import { addToGlobalContext } from "storybook/internal/telemetry";
|
|
27
|
-
import { logger } from "storybook/internal/node-logger";
|
|
27
|
+
import { logger, logTracker } from "storybook/internal/node-logger";
|
|
28
28
|
import { createBuilder, targetFromTargetString } from "@angular-devkit/architect";
|
|
29
29
|
import { VERSION } from "@angular/core";
|
|
30
30
|
addToGlobalContext("cliVersion", versions.storybook);
|
|
31
31
|
var commandBuilder = async (options, context) => {
|
|
32
|
-
logger.intro("Building Storybook");
|
|
32
|
+
options.loglevel && logger.setLogLevel(options.loglevel), options.logfile && logTracker.enableLogWriting(), logger.intro("Building Storybook");
|
|
33
33
|
let { tsConfig } = await setup(options, context), docTSConfig = up("tsconfig.doc.json", {
|
|
34
34
|
cwd: options.configDir,
|
|
35
35
|
last: getProjectRoot()
|
|
@@ -88,7 +88,11 @@ var commandBuilder = async (options, context) => {
|
|
|
88
88
|
debugWebpack,
|
|
89
89
|
previewUrl
|
|
90
90
|
};
|
|
91
|
-
|
|
91
|
+
if (await runInstance({ ...standaloneOptions, mode: "static" }), logTracker.shouldWriteLogsToFile) {
|
|
92
|
+
let logFile = await logTracker.writeToFile(options.logfile);
|
|
93
|
+
logger.info(`Debug logs are written to: ${logFile}`);
|
|
94
|
+
}
|
|
95
|
+
return logger.outro("Storybook build completed successfully"), { success: !0 };
|
|
92
96
|
}, build_storybook_default = createBuilder(commandBuilder);
|
|
93
97
|
async function setup(options, context) {
|
|
94
98
|
let browserOptions, browserTarget;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_ziisvekxp7 from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_ziisvekxp7 from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_ziisvekxp7 from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_ziisvekxp7.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_ziisvekxp7.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_ziisvekxp7.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -14,17 +14,17 @@ import {
|
|
|
14
14
|
printErrorDetails,
|
|
15
15
|
runCompodoc,
|
|
16
16
|
up as up2
|
|
17
|
-
} from "../../_node-chunks/chunk-
|
|
17
|
+
} from "../../_node-chunks/chunk-SYQMCAHJ.js";
|
|
18
18
|
import {
|
|
19
19
|
up
|
|
20
|
-
} from "../../_node-chunks/chunk-
|
|
20
|
+
} from "../../_node-chunks/chunk-T2H76TKT.js";
|
|
21
21
|
|
|
22
22
|
// src/builders/start-storybook/index.ts
|
|
23
23
|
import { readFileSync } from "node:fs";
|
|
24
24
|
import { getEnvConfig, getProjectRoot, versions } from "storybook/internal/common";
|
|
25
25
|
import { buildDevStandalone, withTelemetry } from "storybook/internal/core-server";
|
|
26
26
|
import { addToGlobalContext } from "storybook/internal/telemetry";
|
|
27
|
-
import { logger } from "storybook/internal/node-logger";
|
|
27
|
+
import { logger, logTracker } from "storybook/internal/node-logger";
|
|
28
28
|
import { createBuilder, targetFromTargetString } from "@angular-devkit/architect";
|
|
29
29
|
import { Observable } from "rxjs";
|
|
30
30
|
import { VERSION } from "@angular/core";
|
|
@@ -32,7 +32,7 @@ addToGlobalContext("cliVersion", versions.storybook);
|
|
|
32
32
|
var commandBuilder = (options, context) => new Observable((observer) => {
|
|
33
33
|
(async () => {
|
|
34
34
|
try {
|
|
35
|
-
logger.intro("Starting Storybook");
|
|
35
|
+
options.loglevel && logger.setLogLevel(options.loglevel), options.logfile && logTracker.enableLogWriting(), logger.intro("Starting Storybook");
|
|
36
36
|
let { tsConfig } = await setup(options, context), docTSConfig = up("tsconfig.doc.json", {
|
|
37
37
|
cwd: options.configDir,
|
|
38
38
|
last: getProjectRoot()
|
|
@@ -114,6 +114,15 @@ var commandBuilder = (options, context) => new Observable((observer) => {
|
|
|
114
114
|
}, startedPort = await runInstance(standaloneOptions);
|
|
115
115
|
observer.next({ success: !0, info: { port: startedPort } });
|
|
116
116
|
} catch (error) {
|
|
117
|
+
try {
|
|
118
|
+
if (logTracker.shouldWriteLogsToFile)
|
|
119
|
+
try {
|
|
120
|
+
let logFile = await logTracker.writeToFile(options.logfile);
|
|
121
|
+
logger.outro(`Debug logs are written to: ${logFile}`);
|
|
122
|
+
} catch {
|
|
123
|
+
}
|
|
124
|
+
} catch {
|
|
125
|
+
}
|
|
117
126
|
observer.error(error);
|
|
118
127
|
}
|
|
119
128
|
})();
|
package/dist/node/index.d.ts
CHANGED
package/dist/node/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_ziisvekxp7 from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_ziisvekxp7 from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_ziisvekxp7 from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_ziisvekxp7.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_ziisvekxp7.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_ziisvekxp7.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_ziisvekxp7 from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_ziisvekxp7 from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_ziisvekxp7 from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_ziisvekxp7.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_ziisvekxp7.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_ziisvekxp7.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_ziisvekxp7 from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_ziisvekxp7 from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_ziisvekxp7 from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_ziisvekxp7.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_ziisvekxp7.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_ziisvekxp7.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-T2H76TKT.js";
|
|
15
15
|
|
|
16
16
|
// src/server/framework-preset-angular-cli.ts
|
|
17
17
|
import { logger } from "storybook/internal/node-logger";
|
|
@@ -172,7 +172,7 @@ var require2 = createRequire(import.meta.url), {
|
|
|
172
172
|
// src/server/framework-preset-angular-cli.ts
|
|
173
173
|
import { getProjectRoot, resolvePackageDir } from "storybook/internal/common";
|
|
174
174
|
|
|
175
|
-
//
|
|
175
|
+
// ../../../node_modules/pathe/dist/shared/pathe.ff20891b.mjs
|
|
176
176
|
var _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
|
|
177
177
|
function normalizeWindowsPath(input = "") {
|
|
178
178
|
return input && input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase());
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_ziisvekxp7 from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_ziisvekxp7 from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_ziisvekxp7 from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_ziisvekxp7.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_ziisvekxp7.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_ziisvekxp7.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.2.0-alpha.
|
|
3
|
+
"version": "10.2.0-alpha.3",
|
|
4
4
|
"description": "Storybook for Angular: Develop, document, and test UI components in isolation",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook",
|
|
@@ -56,12 +56,8 @@
|
|
|
56
56
|
"*.d.ts",
|
|
57
57
|
"!src/**/*"
|
|
58
58
|
],
|
|
59
|
-
"scripts": {
|
|
60
|
-
"check": "jiti ../../../scripts/check/check-package.ts",
|
|
61
|
-
"prep": "jiti ../../../scripts/build/build-package.ts"
|
|
62
|
-
},
|
|
63
59
|
"dependencies": {
|
|
64
|
-
"@storybook/builder-webpack5": "10.2.0-alpha.
|
|
60
|
+
"@storybook/builder-webpack5": "10.2.0-alpha.3",
|
|
65
61
|
"@storybook/global": "^5.0.0",
|
|
66
62
|
"telejson": "8.0.0",
|
|
67
63
|
"ts-dedent": "^2.0.0",
|
|
@@ -81,7 +77,7 @@
|
|
|
81
77
|
"@angular/forms": "^19.1.1",
|
|
82
78
|
"@angular/platform-browser": "^19.1.1",
|
|
83
79
|
"@angular/platform-browser-dynamic": "^19.1.1",
|
|
84
|
-
"@storybook/core-webpack": "10.2.0-alpha.
|
|
80
|
+
"@storybook/core-webpack": "10.2.0-alpha.3",
|
|
85
81
|
"@types/node": "^22.0.0",
|
|
86
82
|
"empathic": "^2.0.0",
|
|
87
83
|
"rimraf": "^6.0.1",
|
|
@@ -102,7 +98,7 @@
|
|
|
102
98
|
"@angular/platform-browser": ">=18.0.0 < 22.0.0",
|
|
103
99
|
"@angular/platform-browser-dynamic": ">=18.0.0 < 22.0.0",
|
|
104
100
|
"rxjs": "^6.5.3 || ^7.4.0",
|
|
105
|
-
"storybook": "^10.2.0-alpha.
|
|
101
|
+
"storybook": "^10.2.0-alpha.3",
|
|
106
102
|
"typescript": "^4.9.0 || ^5.0.0",
|
|
107
103
|
"zone.js": ">=0.14.0"
|
|
108
104
|
},
|
package/start-schema.json
CHANGED
|
@@ -148,7 +148,11 @@
|
|
|
148
148
|
"loglevel": {
|
|
149
149
|
"type": "string",
|
|
150
150
|
"description": "Controls level of logging during build. Can be one of: [silly, verbose, info (default), warn, error, silent].",
|
|
151
|
-
"pattern": "(
|
|
151
|
+
"pattern": "(trace|debug|info|warn|error|silent)"
|
|
152
|
+
},
|
|
153
|
+
"logfile": {
|
|
154
|
+
"type": "string",
|
|
155
|
+
"description": "If provided, the log output will be written to the specified file path."
|
|
152
156
|
},
|
|
153
157
|
"sourceMap": {
|
|
154
158
|
"type": ["boolean", "object"],
|