@nx/storybook 17.0.4 → 17.0.6

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.
Files changed (39) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +4 -9
  3. package/generators.json +2 -2
  4. package/migrations.json +0 -140
  5. package/package.json +7 -7
  6. package/presets/cypress.d.ts +20 -1
  7. package/src/executors/build-storybook/build-storybook.impl.js +1 -1
  8. package/src/executors/storybook/storybook.impl.js +1 -1
  9. package/src/generators/configuration/configuration.d.ts +1 -2
  10. package/src/generators/configuration/configuration.js +32 -69
  11. package/src/generators/configuration/lib/util-functions.d.ts +5 -11
  12. package/src/generators/configuration/lib/util-functions.js +69 -88
  13. package/src/generators/configuration/project-files/.storybook/main.js__tmpl__ +3 -23
  14. package/src/generators/configuration/project-files-ts/.storybook/main.ts__tmpl__ +3 -22
  15. package/src/generators/configuration/schema.d.ts +3 -9
  16. package/src/generators/configuration/schema.json +13 -6
  17. package/src/generators/cypress-project/cypress-project.d.ts +3 -3
  18. package/src/generators/cypress-project/cypress-project.js +8 -3
  19. package/src/generators/cypress-project/schema.json +1 -1
  20. package/src/generators/init/init.d.ts +0 -1
  21. package/src/generators/init/init.js +117 -47
  22. package/src/generators/init/schema.d.ts +4 -5
  23. package/src/generators/init/schema.json +33 -18
  24. package/src/migrations/update-16-5-0/move-storybook-tsconfig.js +0 -1
  25. package/src/utils/models.d.ts +1 -1
  26. package/src/utils/utilities.d.ts +0 -1
  27. package/src/utils/utilities.js +8 -30
  28. package/src/utils/versions.d.ts +7 -6
  29. package/src/utils/versions.js +8 -7
  30. package/plugin.d.ts +0 -1
  31. package/plugin.js +0 -6
  32. package/src/generators/configuration/lib/edit-root-tsconfig.d.ts +0 -8
  33. package/src/generators/configuration/lib/edit-root-tsconfig.js +0 -35
  34. package/src/generators/configuration/lib/ensure-dependencies.d.ts +0 -6
  35. package/src/generators/configuration/lib/ensure-dependencies.js +0 -70
  36. package/src/generators/init/lib/update-gitignore.d.ts +0 -2
  37. package/src/generators/init/lib/update-gitignore.js +0 -16
  38. package/src/plugins/plugin.d.ts +0 -9
  39. package/src/plugins/plugin.js +0 -232
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  (The MIT License)
2
2
 
3
- Copyright (c) 2017-2024 Narwhal Technologies Inc.
3
+ Copyright (c) 2017-2023 Narwhal Technologies Inc.
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining
6
6
  a copy of this software and associated documentation files (the
package/README.md CHANGED
@@ -1,9 +1,4 @@
1
- <p style="text-align: center;">
2
- <picture>
3
- <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-dark.svg">
4
- <img alt="Nx - Smart Monorepos · Fast CI" src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-light.svg" width="100%">
5
- </picture>
6
- </p>
1
+ <p style="text-align: center;"><img src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx.png" width="600" alt="Nx - Smart, Fast and Extensible Build System"></p>
7
2
 
8
3
  <div style="text-align: center;">
9
4
 
@@ -20,9 +15,9 @@
20
15
 
21
16
  <hr>
22
17
 
23
- # Nx: Smart Monorepos · Fast CI
18
+ # Nx: Smart, Fast and Extensible Build System
24
19
 
25
- Nx is a build system with built-in tooling and advanced CI capabilities. It helps you maintain and scale monorepos, both locally and on CI.
20
+ Nx is a next generation build system with first class monorepo support and powerful integrations.
26
21
 
27
22
  This package is a [Storybook plugin for Nx](https://nx.dev/packages/storybook).
28
23
 
@@ -64,5 +59,5 @@ npx nx@latest init
64
59
  - [Blog Posts About Nx](https://blog.nrwl.io/nx/home)
65
60
 
66
61
  <p style="text-align: center;"><a href="https://nx.dev/#learning-materials" target="_blank" rel="noreferrer"><img src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-courses-and-videos.svg"
67
- width="100%" alt="Nx - Smart Monorepos · Fast CI"></a></p>
62
+ width="100%" alt="Nx - Smart, Fast and Extensible Build System"></a></p>
68
63
 
package/generators.json CHANGED
@@ -3,14 +3,14 @@
3
3
  "version": "0.1",
4
4
  "generators": {
5
5
  "init": {
6
- "factory": "./src/generators/init/init#initGeneratorInternal",
6
+ "factory": "./src/generators/init/init",
7
7
  "schema": "./src/generators/init/schema.json",
8
8
  "description": "Add Storybook configuration to the workspace.",
9
9
  "aliases": ["ng-add"],
10
10
  "hidden": true
11
11
  },
12
12
  "configuration": {
13
- "factory": "./src/generators/configuration/configuration#configurationGeneratorInternal",
13
+ "factory": "./src/generators/configuration/configuration",
14
14
  "schema": "./src/generators/configuration/schema.json",
15
15
  "description": "Add Storybook configuration to a UI library or an application.",
16
16
  "hidden": false
package/migrations.json CHANGED
@@ -50,137 +50,6 @@
50
50
  }
51
51
  },
52
52
  "packageJsonUpdates": {
53
- "17.2.0-beta.2": {
54
- "version": "17.2.0-beta.2",
55
- "packages": {
56
- "vite": {
57
- "version": "^5.0.0",
58
- "alwaysAddToPackageJson": false
59
- }
60
- }
61
- },
62
- "17.1.0-beta.4": {
63
- "version": "17.1.0-beta.4",
64
- "packages": {
65
- "@storybook/testing-library": {
66
- "version": "^0.2.2",
67
- "alwaysAddToPackageJson": false
68
- },
69
- "@storybook/jest": {
70
- "version": "^0.2.3",
71
- "alwaysAddToPackageJson": false
72
- }
73
- }
74
- },
75
- "17.1.0": {
76
- "version": "17.1.0-beta.3",
77
- "packages": {
78
- "@storybook/test-runner": {
79
- "version": "^0.13.0",
80
- "alwaysAddToPackageJson": false
81
- },
82
- "@storybook/core-server": {
83
- "version": "^7.5.3",
84
- "alwaysAddToPackageJson": false
85
- },
86
- "@storybook/angular": {
87
- "version": "^7.5.3",
88
- "alwaysAddToPackageJson": false
89
- },
90
- "@storybook/react": {
91
- "version": "^7.5.3",
92
- "alwaysAddToPackageJson": false
93
- },
94
- "@storybook/react-vite": {
95
- "version": "^7.5.3",
96
- "alwaysAddToPackageJson": false
97
- },
98
- "@storybook/react-webpack5": {
99
- "version": "^7.5.3",
100
- "alwaysAddToPackageJson": false
101
- },
102
- "@storybook/web-components-vite": {
103
- "version": "^7.5.3",
104
- "alwaysAddToPackageJson": false
105
- },
106
- "@storybook/web-components-webpack5": {
107
- "version": "^7.5.3",
108
- "alwaysAddToPackageJson": false
109
- },
110
- "@storybook/addon-a11y": {
111
- "version": "^7.5.3",
112
- "alwaysAddToPackageJson": false
113
- },
114
- "@storybook/addon-actions": {
115
- "version": "^7.5.3",
116
- "alwaysAddToPackageJson": false
117
- },
118
- "@storybook/addon-backgrounds": {
119
- "version": "^7.5.3",
120
- "alwaysAddToPackageJson": false
121
- },
122
- "@storybook/addon-controls": {
123
- "version": "^7.5.3",
124
- "alwaysAddToPackageJson": false
125
- },
126
- "@storybook/addon-docs": {
127
- "version": "^7.5.3",
128
- "alwaysAddToPackageJson": false
129
- },
130
- "@storybook/addon-essentials": {
131
- "version": "^7.5.3",
132
- "alwaysAddToPackageJson": false
133
- },
134
- "@storybook/addon-interactions": {
135
- "version": "^7.5.3",
136
- "alwaysAddToPackageJson": false
137
- },
138
- "@storybook/addon-mdx-gfm": {
139
- "version": "^7.5.3",
140
- "alwaysAddToPackageJson": false
141
- },
142
- "@storybook/addon-highlight": {
143
- "version": "^7.5.3",
144
- "alwaysAddToPackageJson": false
145
- },
146
- "@storybook/addon-jest": {
147
- "version": "^7.5.3",
148
- "alwaysAddToPackageJson": false
149
- },
150
- "@storybook/addon-links": {
151
- "version": "^7.5.3",
152
- "alwaysAddToPackageJson": false
153
- },
154
- "@storybook/addon-measure": {
155
- "version": "^7.5.3",
156
- "alwaysAddToPackageJson": false
157
- },
158
- "@storybook/addon-outline": {
159
- "version": "^7.5.3",
160
- "alwaysAddToPackageJson": false
161
- },
162
- "@storybook/addon-storyshots": {
163
- "version": "^7.5.3",
164
- "alwaysAddToPackageJson": false
165
- },
166
- "@storybook/addon-storyshots-puppeteer": {
167
- "version": "^7.5.3",
168
- "alwaysAddToPackageJson": false
169
- },
170
- "@storybook/addon-storysource": {
171
- "version": "^7.5.3",
172
- "alwaysAddToPackageJson": false
173
- },
174
- "@storybook/addon-toolbars": {
175
- "version": "^7.5.3",
176
- "alwaysAddToPackageJson": false
177
- },
178
- "@storybook/addon-viewport": {
179
- "version": "^7.5.3",
180
- "alwaysAddToPackageJson": false
181
- }
182
- }
183
- },
184
53
  "17.0.0": {
185
54
  "version": "17.0.0-rc.3",
186
55
  "packages": {
@@ -963,15 +832,6 @@
963
832
  "alwaysAddToPackageJson": false
964
833
  }
965
834
  }
966
- },
967
- "18.2.0": {
968
- "version": "18.2.0-beta.1",
969
- "packages": {
970
- "core-js": {
971
- "version": "3.36.1",
972
- "alwaysAddToPackageJson": false
973
- }
974
- }
975
835
  }
976
836
  }
977
837
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/storybook",
3
- "version": "17.0.4",
3
+ "version": "v17.0.6",
4
4
  "private": false,
5
5
  "description": "The Nx Plugin for Storybook contains executors and generators for allowing your workspace to use the powerful Storybook integration testing & documenting capabilities.",
6
6
  "repository": {
@@ -30,14 +30,14 @@
30
30
  "migrations": "./migrations.json"
31
31
  },
32
32
  "dependencies": {
33
- "@nx/devkit": "17.0.4",
34
33
  "@phenomnomnominal/tsquery": "~5.0.1",
35
- "semver": "^7.5.3",
34
+ "semver": "7.5.3",
36
35
  "tslib": "^2.3.0",
37
- "@nx/cypress": "17.0.4",
38
- "@nx/js": "17.0.4",
39
- "@nx/eslint": "17.0.4",
40
- "@nrwl/storybook": "17.0.4"
36
+ "@nx/cypress": "v17.0.6",
37
+ "@nx/devkit": "v17.0.6",
38
+ "@nx/js": "v17.0.6",
39
+ "@nx/eslint": "v17.0.6",
40
+ "@nrwl/storybook": "v17.0.6"
41
41
  },
42
42
  "publishConfig": {
43
43
  "access": "public"
@@ -1 +1,20 @@
1
- export declare function nxE2EStorybookPreset(filePath: string): any;
1
+ export declare function nxE2EStorybookPreset(filePath: string): {
2
+ baseUrl: string;
3
+ fileServerFolder: string;
4
+ supportFile: string;
5
+ specPattern: string;
6
+ fixturesFolder: string;
7
+ videosFolder: string;
8
+ screenshotsFolder: string;
9
+ chromeWebSecurity: boolean;
10
+ } | {
11
+ baseUrl: string;
12
+ setupNodeEvents(on: any): void;
13
+ fileServerFolder: string;
14
+ supportFile: string;
15
+ specPattern: string;
16
+ fixturesFolder: string;
17
+ videosFolder: string;
18
+ screenshotsFolder: string;
19
+ chromeWebSecurity: boolean;
20
+ };
@@ -5,7 +5,7 @@ const build = require("@storybook/core-server");
5
5
  const utilities_1 = require("../../utils/utilities");
6
6
  async function buildStorybookExecutor(options, context) {
7
7
  (0, utilities_1.storybookConfigExistsCheck)(options.configDir, context.projectName);
8
- const storybook7 = (0, utilities_1.storybookMajorVersion)() >= 7;
8
+ const storybook7 = (0, utilities_1.storybookMajorVersion)() === 7;
9
9
  if (!storybook7) {
10
10
  throw (0, utilities_1.pleaseUpgrade)();
11
11
  }
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const build = require("@storybook/core-server");
4
4
  const utilities_1 = require("../../utils/utilities");
5
5
  async function* storybookExecutor(options, context) {
6
- const storybook7 = (0, utilities_1.storybookMajorVersion)() >= 7;
6
+ const storybook7 = (0, utilities_1.storybookMajorVersion)() === 7;
7
7
  if (!storybook7) {
8
8
  throw (0, utilities_1.pleaseUpgrade)();
9
9
  }
@@ -1,5 +1,4 @@
1
1
  import { GeneratorCallback, Tree } from '@nx/devkit';
2
2
  import { StorybookConfigureSchema } from './schema';
3
- export declare function configurationGenerator(tree: Tree, schema: StorybookConfigureSchema): Promise<GeneratorCallback>;
4
- export declare function configurationGeneratorInternal(tree: Tree, rawSchema: StorybookConfigureSchema): Promise<GeneratorCallback>;
3
+ export declare function configurationGenerator(tree: Tree, rawSchema: StorybookConfigureSchema): Promise<GeneratorCallback>;
5
4
  export default configurationGenerator;
@@ -1,8 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.configurationGeneratorInternal = exports.configurationGenerator = void 0;
3
+ exports.configurationGenerator = void 0;
4
4
  const devkit_1 = require("@nx/devkit");
5
- const js_1 = require("@nx/js");
6
5
  const cypress_project_1 = require("../cypress-project/cypress-project");
7
6
  const init_1 = require("../init/init");
8
7
  const util_functions_1 = require("./lib/util-functions");
@@ -10,62 +9,40 @@ const eslint_1 = require("@nx/eslint");
10
9
  const utilities_1 = require("../../utils/utilities");
11
10
  const versions_1 = require("../../utils/versions");
12
11
  const interaction_testing_utils_1 = require("./lib/interaction-testing.utils");
13
- const ensure_dependencies_1 = require("./lib/ensure-dependencies");
14
- const edit_root_tsconfig_1 = require("./lib/edit-root-tsconfig");
15
- function configurationGenerator(tree, schema) {
16
- return configurationGeneratorInternal(tree, { addPlugin: false, ...schema });
17
- }
18
- exports.configurationGenerator = configurationGenerator;
19
- async function configurationGeneratorInternal(tree, rawSchema) {
12
+ async function configurationGenerator(tree, rawSchema) {
20
13
  if ((0, utilities_1.storybookMajorVersion)() === 6) {
21
14
  throw new Error((0, utilities_1.pleaseUpgrade)());
22
15
  }
23
- const schema = normalizeSchema(tree, rawSchema);
16
+ const schema = normalizeSchema(rawSchema);
24
17
  const tasks = [];
25
- const { projectType, targets, root } = (0, devkit_1.readProjectConfiguration)(tree, schema.project);
26
- const { compiler } = (0, utilities_1.findStorybookAndBuildTargetsAndCompiler)(targets);
27
- const viteConfig = (0, util_functions_1.findViteConfig)(tree, root);
28
- const viteConfigFilePath = viteConfig?.fullConfigPath;
29
- const viteConfigFileName = viteConfig?.viteConfigFileName;
30
- const nextConfigFilePath = (0, util_functions_1.findNextConfig)(tree, root);
31
- const metroConfigFilePath = (0, util_functions_1.findMetroConfig)(tree, root);
32
- if (viteConfigFilePath) {
18
+ const { projectType, targets, root } = (0, devkit_1.readProjectConfiguration)(tree, schema.name);
19
+ const { nextBuildTarget, compiler, viteBuildTarget } = (0, utilities_1.findStorybookAndBuildTargetsAndCompiler)(targets);
20
+ let viteConfigFilePath;
21
+ if (viteBuildTarget) {
22
+ viteConfigFilePath = (0, util_functions_1.getViteConfigFilePath)(tree, root, targets[viteBuildTarget]?.options?.configFile);
23
+ }
24
+ if (viteBuildTarget) {
33
25
  if (schema.uiFramework === '@storybook/react-webpack5') {
34
- devkit_1.logger.info(`Your project ${schema.project} uses Vite as a bundler.
26
+ devkit_1.logger.info(`Your project ${schema.name} uses Vite as a bundler.
35
27
  Nx will configure Storybook for this project to use Vite as well.`);
36
28
  schema.uiFramework = '@storybook/react-vite';
37
29
  }
38
30
  if (schema.uiFramework === '@storybook/web-components-webpack5') {
39
- devkit_1.logger.info(`Your project ${schema.project} uses Vite as a bundler.
31
+ devkit_1.logger.info(`Your project ${schema.name} uses Vite as a bundler.
40
32
  Nx will configure Storybook for this project to use Vite as well.`);
41
33
  schema.uiFramework = '@storybook/web-components-vite';
42
34
  }
43
35
  }
44
- if (nextConfigFilePath) {
36
+ if (nextBuildTarget) {
45
37
  schema.uiFramework = '@storybook/nextjs';
46
38
  }
47
- const jsInitTask = await (0, js_1.initGenerator)(tree, {
48
- ...schema,
49
- skipFormat: true,
50
- });
51
- tasks.push(jsInitTask);
52
39
  const initTask = await (0, init_1.initGenerator)(tree, {
53
- skipFormat: true,
54
- addPlugin: schema.addPlugin,
40
+ uiFramework: schema.uiFramework,
41
+ js: schema.js,
55
42
  });
56
43
  tasks.push(initTask);
57
- tasks.push((0, ensure_dependencies_1.ensureDependencies)(tree, { uiFramework: schema.uiFramework }));
58
- (0, edit_root_tsconfig_1.editRootTsConfig)(tree);
59
- const nxJson = (0, devkit_1.readNxJson)(tree);
60
- const hasPlugin = nxJson.plugins?.some((p) => typeof p === 'string'
61
- ? p === '@nx/storybook/plugin'
62
- : p.plugin === '@nx/storybook/plugin');
63
- const mainDir = !!nextConfigFilePath && projectType === 'application'
64
- ? 'components'
65
- : 'src';
66
- const usesVite = !!viteConfigFilePath || schema.uiFramework?.endsWith('-vite');
67
- const useReactNative = !!metroConfigFilePath;
68
- (0, util_functions_1.createProjectStorybookDir)(tree, schema.project, schema.uiFramework, schema.js, schema.tsConfiguration, root, projectType, (0, util_functions_1.projectIsRootProjectInStandaloneWorkspace)(root), schema.interactionTests, mainDir, !!nextConfigFilePath, compiler === 'swc', usesVite, viteConfigFilePath, hasPlugin, viteConfigFileName, useReactNative);
44
+ const mainDir = !!nextBuildTarget && projectType === 'application' ? 'components' : 'src';
45
+ (0, util_functions_1.createProjectStorybookDir)(tree, schema.name, schema.uiFramework, schema.js, schema.tsConfiguration, root, projectType, (0, util_functions_1.projectIsRootProjectInStandaloneWorkspace)(root), schema.interactionTests, mainDir, !!nextBuildTarget, compiler === 'swc', !!viteBuildTarget || schema.uiFramework.endsWith('-vite'), viteConfigFilePath);
69
46
  if (schema.uiFramework !== '@storybook/angular') {
70
47
  (0, util_functions_1.createStorybookTsconfigFile)(tree, root, schema.uiFramework, (0, util_functions_1.projectIsRootProjectInStandaloneWorkspace)(root), mainDir);
71
48
  }
@@ -75,30 +52,21 @@ async function configurationGeneratorInternal(tree, rawSchema) {
75
52
  (0, util_functions_1.updateLintConfig)(tree, schema);
76
53
  (0, util_functions_1.addBuildStorybookToCacheableOperations)(tree);
77
54
  (0, util_functions_1.addStorybookToNamedInputs)(tree);
78
- if (!hasPlugin) {
79
- (0, util_functions_1.addStorybookToTargetDefaults)(tree);
80
- }
81
- let devDeps = {};
82
- if (!hasPlugin || schema.addExplicitTargets) {
83
- if (schema.uiFramework === '@storybook/angular') {
84
- (0, util_functions_1.addAngularStorybookTarget)(tree, schema.project, schema.interactionTests);
85
- }
86
- else {
87
- (0, util_functions_1.addStorybookTarget)(tree, schema.project, schema.uiFramework, schema.interactionTests);
88
- }
89
- if (schema.configureStaticServe) {
90
- await (0, util_functions_1.addStaticTarget)(tree, schema);
91
- }
55
+ if (schema.uiFramework === '@storybook/angular') {
56
+ (0, util_functions_1.addAngularStorybookTask)(tree, schema.name, schema.interactionTests);
92
57
  }
93
58
  else {
94
- devDeps['storybook'] = versions_1.storybookVersion;
59
+ (0, util_functions_1.addStorybookTask)(tree, schema.name, schema.uiFramework, schema.interactionTests);
60
+ }
61
+ if (schema.configureStaticServe) {
62
+ (0, util_functions_1.addStaticTarget)(tree, schema);
95
63
  }
96
- // TODO(katerina): Nx 19 -> remove Cypress
64
+ // TODO(katerina): Nx 18 -> remove Cypress
97
65
  if (schema.configureCypress) {
98
- const e2eProject = await (0, util_functions_1.getE2EProjectName)(tree, schema.project);
66
+ const e2eProject = await (0, util_functions_1.getE2EProjectName)(tree, schema.name);
99
67
  if (!e2eProject) {
100
68
  const cypressTask = await (0, cypress_project_1.cypressProjectGenerator)(tree, {
101
- name: schema.project,
69
+ name: schema.name,
102
70
  js: schema.js,
103
71
  linter: schema.linter,
104
72
  directory: schema.cypressDirectory,
@@ -111,15 +79,13 @@ async function configurationGeneratorInternal(tree, rawSchema) {
111
79
  tasks.push(cypressTask);
112
80
  }
113
81
  else {
114
- devkit_1.logger.warn(`There is already an e2e project setup for ${schema.project}, called ${e2eProject}.`);
82
+ devkit_1.logger.warn(`There is already an e2e project setup for ${schema.name}, called ${e2eProject}.`);
115
83
  }
116
84
  }
85
+ let devDeps = {};
117
86
  if (schema.tsConfiguration) {
118
87
  devDeps['ts-node'] = versions_1.tsNodeVersion;
119
88
  }
120
- if (usesVite && !viteConfigFilePath) {
121
- devDeps['tslib'] = versions_1.tsLibVersion;
122
- }
123
89
  if (schema.interactionTests) {
124
90
  devDeps = {
125
91
  ...devDeps,
@@ -133,7 +99,8 @@ async function configurationGeneratorInternal(tree, rawSchema) {
133
99
  schema.uiFramework === '@storybook/react-webpack5') {
134
100
  devDeps['core-js'] = versions_1.coreJsVersion;
135
101
  }
136
- if (schema.uiFramework?.endsWith('-vite') && !viteConfigFilePath) {
102
+ if (schema.uiFramework.endsWith('-vite') &&
103
+ (!viteBuildTarget || !viteConfigFilePath)) {
137
104
  // This means that the user has selected a Vite framework
138
105
  // but the project does not have Vite configuration.
139
106
  // We need to install the @nx/vite plugin in order to be able to use
@@ -146,17 +113,13 @@ async function configurationGeneratorInternal(tree, rawSchema) {
146
113
  }
147
114
  return (0, devkit_1.runTasksInSerial)(...tasks);
148
115
  }
149
- exports.configurationGeneratorInternal = configurationGeneratorInternal;
150
- function normalizeSchema(tree, schema) {
151
- const nxJson = (0, devkit_1.readNxJson)(tree);
152
- const addPlugin = process.env.NX_ADD_PLUGINS !== 'false' &&
153
- nxJson.useInferencePlugins !== false;
116
+ exports.configurationGenerator = configurationGenerator;
117
+ function normalizeSchema(schema) {
154
118
  const defaults = {
155
119
  interactionTests: true,
156
120
  linter: eslint_1.Linter.EsLint,
157
121
  js: false,
158
122
  tsConfiguration: true,
159
- addPlugin,
160
123
  };
161
124
  return {
162
125
  ...defaults,
@@ -1,9 +1,9 @@
1
1
  import { Tree } from '@nx/devkit';
2
2
  import { StorybookConfigureSchema } from '../schema';
3
3
  import { UiFramework } from '../../../utils/models';
4
- export declare function addStorybookTarget(tree: Tree, projectName: string, uiFramework: UiFramework, interactionTests: boolean): void;
5
- export declare function addAngularStorybookTarget(tree: Tree, projectName: string, interactionTests: boolean): void;
6
- export declare function addStaticTarget(tree: Tree, opts: StorybookConfigureSchema): Promise<void>;
4
+ export declare function addStorybookTask(tree: Tree, projectName: string, uiFramework: UiFramework, interactionTests: boolean): void;
5
+ export declare function addAngularStorybookTask(tree: Tree, projectName: string, interactionTests: boolean): void;
6
+ export declare function addStaticTarget(tree: Tree, opts: StorybookConfigureSchema): void;
7
7
  export declare function createStorybookTsconfigFile(tree: Tree, projectRoot: string, uiFramework: UiFramework, isRootProject: boolean, mainDir: 'components' | 'src'): void;
8
8
  export declare function editTsconfigBaseJson(tree: Tree): void;
9
9
  export declare function configureTsProjectConfig(tree: Tree, schema: StorybookConfigureSchema): void;
@@ -18,18 +18,12 @@ export declare function configureTsSolutionConfig(tree: Tree, schema: StorybookC
18
18
  export declare function updateLintConfig(tree: Tree, schema: StorybookConfigureSchema): void;
19
19
  export declare function normalizeSchema(schema: StorybookConfigureSchema): StorybookConfigureSchema;
20
20
  export declare function addStorybookToNamedInputs(tree: Tree): void;
21
- export declare function addStorybookToTargetDefaults(tree: Tree, setCache?: boolean): void;
22
- export declare function createProjectStorybookDir(tree: Tree, projectName: string, uiFramework: UiFramework, js: boolean, tsConfiguration: boolean, root: string, projectType: string, projectIsRootProjectInStandaloneWorkspace: boolean, interactionTests: boolean, mainDir?: string, isNextJs?: boolean, usesSwc?: boolean, usesVite?: boolean, viteConfigFilePath?: string, hasPlugin?: boolean, viteConfigFileName?: string, useReactNative?: boolean): void;
21
+ export declare function createProjectStorybookDir(tree: Tree, projectName: string, uiFramework: UiFramework, js: boolean, tsConfiguration: boolean, root: string, projectType: string, projectIsRootProjectInStandaloneWorkspace: boolean, interactionTests: boolean, mainDir?: string, isNextJs?: boolean, usesSwc?: boolean, usesVite?: boolean, viteConfigFilePath?: string): void;
23
22
  export declare function getTsConfigPath(tree: Tree, projectName: string, path?: string): string;
24
23
  export declare function addBuildStorybookToCacheableOperations(tree: Tree): void;
25
24
  export declare function projectIsRootProjectInStandaloneWorkspace(projectRoot: string): boolean;
26
25
  export declare function workspaceHasRootProject(tree: Tree): boolean;
27
26
  export declare function rootFileIsTs(tree: Tree, rootFileName: string, tsConfiguration: boolean): boolean;
28
27
  export declare function getE2EProjectName(tree: Tree, mainProject: string): Promise<string | undefined>;
29
- export declare function findViteConfig(tree: Tree, projectRoot: string): {
30
- fullConfigPath: string | undefined;
31
- viteConfigFileName: string | undefined;
32
- };
33
- export declare function findNextConfig(tree: Tree, projectRoot: string): string | undefined;
34
- export declare function findMetroConfig(tree: Tree, projectRoot: string): string | undefined;
28
+ export declare function getViteConfigFilePath(tree: Tree, projectRoot: string, configFile?: string): string | undefined;
35
29
  export declare function renameAndMoveOldTsConfig(projectRoot: string, pathToStorybookConfigFile: string, tree: Tree): void;