@storybook/angular 6.5.9 → 7.0.0-alpha.10

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 (275) hide show
  1. package/dist/{ts3.9 → types}/builders/build-storybook/index.d.ts +1 -1
  2. package/dist/types/builders/build-storybook/index.js +56 -0
  3. package/dist/{ts3.9 → types}/builders/build-storybook/schema.json +0 -0
  4. package/dist/{ts3.9 → types}/builders/builders.json +0 -0
  5. package/dist/{ts3.9 → types}/builders/start-storybook/index.d.ts +1 -1
  6. package/dist/types/builders/start-storybook/index.js +64 -0
  7. package/dist/{ts3.9 → types}/builders/start-storybook/schema.json +0 -0
  8. package/dist/{ts3.9 → types}/builders/utils/build-standalone-errors-handler.d.ts +0 -0
  9. package/dist/{ts3.9 → types}/builders/utils/build-standalone-errors-handler.js +5 -5
  10. package/dist/{ts3.9 → types}/builders/utils/run-compodoc.d.ts +0 -0
  11. package/dist/{ts3.9 → types}/builders/utils/run-compodoc.js +9 -4
  12. package/dist/types/builders/utils/standalone-options.d.ts +12 -0
  13. package/dist/{ts3.9/client/docs/types.js → types/builders/utils/standalone-options.js} +0 -0
  14. package/dist/{ts3.9/client/preview/angular/components → types/client/angular}/app.component.d.ts +1 -1
  15. package/dist/{ts3.9/client/preview/angular/components → types/client/angular}/app.component.js +5 -5
  16. package/dist/{ts3.9/client/preview → types/client}/angular/app.token.d.ts +0 -0
  17. package/dist/{ts3.9/client/preview → types/client}/angular/app.token.js +0 -0
  18. package/dist/{ts3.9/client/preview → types/client}/angular/helpers.d.ts +1 -1
  19. package/dist/{ts3.9/client/preview → types/client}/angular/helpers.js +7 -7
  20. package/dist/{ts3.9/client/preview → types/client}/angular-beta/AbstractRenderer.d.ts +1 -2
  21. package/dist/{ts3.9/client/preview → types/client}/angular-beta/AbstractRenderer.js +40 -48
  22. package/dist/{ts3.9/client/preview → types/client}/angular-beta/CanvasRenderer.d.ts +1 -2
  23. package/dist/types/client/angular-beta/CanvasRenderer.js +16 -0
  24. package/dist/{ts3.9/client/preview → types/client}/angular-beta/ComputesTemplateFromComponent.d.ts +0 -0
  25. package/dist/{ts3.9/client/preview → types/client}/angular-beta/ComputesTemplateFromComponent.js +10 -8
  26. package/dist/{ts3.9/client/preview → types/client}/angular-beta/DocsRenderer.d.ts +1 -2
  27. package/dist/types/client/angular-beta/DocsRenderer.js +41 -0
  28. package/dist/{ts3.9/client/preview → types/client}/angular-beta/RendererFactory.d.ts +0 -0
  29. package/dist/types/client/angular-beta/RendererFactory.js +55 -0
  30. package/dist/{ts3.9/client/preview → types/client}/angular-beta/StorybookModule.d.ts +0 -0
  31. package/dist/{ts3.9/client/preview → types/client}/angular-beta/StorybookModule.js +18 -17
  32. package/dist/{ts3.9/client/preview → types/client}/angular-beta/StorybookProvider.d.ts +0 -0
  33. package/dist/{ts3.9/client/preview → types/client}/angular-beta/StorybookProvider.js +2 -1
  34. package/dist/{ts3.9/client/preview → types/client}/angular-beta/StorybookWrapperComponent.d.ts +0 -0
  35. package/dist/{ts3.9/client/preview → types/client}/angular-beta/StorybookWrapperComponent.js +11 -10
  36. package/dist/{ts3.9/client/preview → types/client}/angular-beta/utils/NgComponentAnalyzer.d.ts +0 -0
  37. package/dist/{ts3.9/client/preview → types/client}/angular-beta/utils/NgComponentAnalyzer.js +24 -13
  38. package/dist/{ts3.9/client/preview → types/client}/angular-beta/utils/NgModulesAnalyzer.d.ts +0 -0
  39. package/dist/{ts3.9/client/preview → types/client}/angular-beta/utils/NgModulesAnalyzer.js +3 -2
  40. package/dist/{ts3.9/client/preview → types/client}/config.d.ts +1 -1
  41. package/dist/{ts3.9/client/preview → types/client}/config.js +1 -1
  42. package/dist/{ts3.9/client/preview → types/client}/decorateStory.d.ts +1 -1
  43. package/dist/{ts3.9/client/preview → types/client}/decorateStory.js +11 -6
  44. package/dist/{ts3.9/client/preview → types/client}/decorators.d.ts +1 -2
  45. package/dist/{ts3.9/client/preview → types/client}/decorators.js +23 -11
  46. package/dist/{ts3.9 → types}/client/docs/compodoc.d.ts +0 -0
  47. package/dist/{ts3.9 → types}/client/docs/compodoc.js +47 -34
  48. package/dist/{ts3.9 → types}/client/docs/config.d.ts +3 -4
  49. package/dist/{ts3.9 → types}/client/docs/config.js +0 -2
  50. package/dist/{ts3.9 → types}/client/docs/index.d.ts +0 -0
  51. package/dist/{ts3.9 → types}/client/docs/index.js +6 -2
  52. package/dist/{ts3.9 → types}/client/docs/sourceDecorator.d.ts +2 -2
  53. package/dist/{ts3.9 → types}/client/docs/sourceDecorator.js +10 -9
  54. package/dist/{ts3.9 → types}/client/docs/types.d.ts +0 -0
  55. package/dist/{ts3.9/client/preview → types/client/docs}/types.js +0 -0
  56. package/dist/{ts3.9/client/preview/angular-polyfills.d.ts → types/client/globals.d.ts} +0 -10
  57. package/dist/{ts3.9/client/preview/angular-polyfills.js → types/client/globals.js} +7 -1
  58. package/dist/types/client/index.d.ts +5 -0
  59. package/dist/types/client/index.js +25 -0
  60. package/dist/{ts3.9/client/preview/index.d.ts → types/client/public-api.d.ts} +2 -4
  61. package/dist/types/client/public-api.js +43 -0
  62. package/dist/{ts3.9/client/preview/types-6-0.d.ts → types/client/public-types.d.ts} +4 -19
  63. package/dist/{ts3.9/client/preview/types-6-0.js → types/client/public-types.js} +0 -0
  64. package/dist/{ts3.9/client/preview → types/client}/render.d.ts +1 -1
  65. package/dist/types/client/render.js +24 -0
  66. package/dist/{ts3.9/client/preview → types/client}/types.d.ts +13 -0
  67. package/dist/{ts3.9/client/preview/types-7-0.js → types/client/types.js} +0 -0
  68. package/dist/types/index.d.ts +2 -0
  69. package/dist/{ts3.9/public_api.js → types/index.js} +8 -3
  70. package/dist/types/preset.d.ts +6 -0
  71. package/dist/types/preset.js +36 -0
  72. package/dist/types/renderer.d.ts +4 -0
  73. package/dist/{ts3.9 → types}/renderer.js +5 -4
  74. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/empty-projects-entry/angular.json +0 -0
  75. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/minimal-config/angular.json +0 -0
  76. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/minimal-config/src/main.d.ts +0 -0
  77. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/minimal-config/src/main.js +0 -0
  78. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/minimal-config/src/tsconfig.app.json +0 -0
  79. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/minimal-config/tsconfig.json +0 -0
  80. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/some-config/angular.json +0 -0
  81. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/some-config/src/main.d.ts +0 -0
  82. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/some-config/src/main.js +0 -0
  83. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/some-config/src/tsconfig.app.json +0 -0
  84. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/some-config/tsconfig.json +0 -0
  85. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-angularBrowserTarget/angular.json +0 -0
  86. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-angularBrowserTarget/src/main.d.ts +0 -0
  87. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-angularBrowserTarget/src/main.js +0 -0
  88. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-angularBrowserTarget/src/tsconfig.app.json +0 -0
  89. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-angularBrowserTarget/tsconfig.json +0 -0
  90. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-lib/angular.json +0 -0
  91. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-lib/projects/pattern-lib/src/main.d.ts +0 -0
  92. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-lib/projects/pattern-lib/src/main.js +0 -0
  93. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-lib/projects/pattern-lib/tsconfig.lib.json +0 -0
  94. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-lib/tsconfig.json +0 -0
  95. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-nx/angular.json +0 -0
  96. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-nx/nx.json +0 -0
  97. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-nx/src/main.d.ts +0 -0
  98. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-nx/src/main.js +0 -0
  99. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-nx/src/tsconfig.app.json +0 -0
  100. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-nx/tsconfig.json +0 -0
  101. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-nx-workspace/nx.json +0 -0
  102. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-nx-workspace/src/main.d.ts +0 -0
  103. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-nx-workspace/src/main.js +0 -0
  104. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-nx-workspace/src/tsconfig.app.json +0 -0
  105. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-nx-workspace/tsconfig.json +0 -0
  106. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-nx-workspace/workspace.json +0 -0
  107. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-options-styles/angular.json +0 -0
  108. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-options-styles/src/main.d.ts +0 -0
  109. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-options-styles/src/main.js +0 -0
  110. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-options-styles/src/tsconfig.app.json +0 -0
  111. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-options-styles/tsconfig.json +0 -0
  112. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/without-architect-build/angular.json +0 -0
  113. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/without-architect-build-options/angular.json +0 -0
  114. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/without-compatible-projects/angular.json +0 -0
  115. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/without-projects-entry/angular.json +0 -0
  116. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/without-projects-entry/projects/pattern-lib/src/main.d.ts +0 -0
  117. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/without-projects-entry/projects/pattern-lib/src/main.js +0 -0
  118. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/without-projects-entry/projects/pattern-lib/tsconfig.lib.json +0 -0
  119. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/without-projects-entry/tsconfig.json +0 -0
  120. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/without-tsConfig/angular.json +0 -0
  121. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/without-tsConfig/src/main.d.ts +0 -0
  122. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/without-tsConfig/src/main.js +0 -0
  123. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/without-tsConfig/src/tsconfig.app.json +0 -0
  124. package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/without-tsConfig/tsconfig.json +0 -0
  125. package/dist/{ts3.9 → types}/server/angular-cli-webpack-12.2.x.d.ts +0 -0
  126. package/dist/types/server/angular-cli-webpack-12.2.x.js +66 -0
  127. package/dist/{ts3.9 → types}/server/angular-cli-webpack-13.x.x.d.ts +0 -0
  128. package/dist/types/server/angular-cli-webpack-13.x.x.js +70 -0
  129. package/dist/types/server/angular-cli-webpack-older.d.ts +6 -0
  130. package/dist/types/server/angular-cli-webpack-older.js +111 -0
  131. package/dist/{ts3.9 → types}/server/angular-devkit-build-webpack.d.ts +6 -6
  132. package/dist/{ts3.9 → types}/server/angular-devkit-build-webpack.js +66 -54
  133. package/dist/{ts3.9 → types}/server/angular-read-workspace.d.ts +0 -0
  134. package/dist/{ts3.9 → types}/server/angular-read-workspace.js +8 -14
  135. package/dist/{ts3.9 → types}/server/create-fork-ts-checker-plugin.d.ts +0 -0
  136. package/dist/{ts3.9 → types}/server/create-fork-ts-checker-plugin.js +1 -1
  137. package/dist/{ts3.9 → types}/server/framework-preset-angular-cli.d.ts +1 -1
  138. package/dist/types/server/framework-preset-angular-cli.js +175 -0
  139. package/dist/{ts3.9 → types}/server/framework-preset-angular-docs.d.ts +0 -0
  140. package/dist/{ts3.9 → types}/server/framework-preset-angular-docs.js +4 -3
  141. package/dist/{ts3.9 → types}/server/framework-preset-angular-ivy.d.ts +1 -1
  142. package/dist/{ts3.9 → types}/server/framework-preset-angular-ivy.js +26 -22
  143. package/dist/{ts3.9 → types}/server/framework-preset-angular.d.ts +0 -0
  144. package/dist/types/server/framework-preset-angular.js +103 -0
  145. package/dist/{ts3.9 → types}/server/ngx-template-loader/index.d.ts +0 -0
  146. package/dist/{ts3.9 → types}/server/ngx-template-loader/index.js +0 -0
  147. package/dist/{ts3.9/server/options.d.ts → types/server/preset-options.d.ts} +1 -3
  148. package/dist/{ts3.9/types/index.js → types/server/preset-options.js} +0 -0
  149. package/dist/{ts3.9 → types}/server/ts_config.d.ts +0 -0
  150. package/dist/{ts3.9 → types}/server/ts_config.js +0 -0
  151. package/dist/{ts3.9 → types}/server/utils/filter-out-styling-rules.d.ts +0 -0
  152. package/dist/{ts3.9 → types}/server/utils/filter-out-styling-rules.js +2 -1
  153. package/dist/{ts3.9 → types}/server/utils/module-is-available.d.ts +0 -0
  154. package/dist/{ts3.9 → types}/server/utils/module-is-available.js +2 -1
  155. package/dist/{ts3.4 → types}/server/utils/normalize-asset-patterns.d.ts +7 -6
  156. package/dist/{ts3.9 → types}/server/utils/normalize-asset-patterns.js +9 -9
  157. package/dist/{ts3.9 → types}/server/utils/normalize-optimization.d.ts +1 -1
  158. package/dist/{ts3.9 → types}/server/utils/normalize-optimization.js +3 -2
  159. package/dist/types/types.d.ts +28 -0
  160. package/dist/types/types.js +2 -0
  161. package/jest.config.js +1 -0
  162. package/package.json +47 -57
  163. package/preset.js +1 -1
  164. package/renderer.d.ts +1 -1
  165. package/renderer.js +1 -1
  166. package/bin/build.js +0 -4
  167. package/bin/index.js +0 -3
  168. package/demo.d.ts +0 -4
  169. package/demo.js +0 -5
  170. package/dist/ts3.4/builders/build-storybook/index.d.ts +0 -15
  171. package/dist/ts3.4/builders/start-storybook/index.d.ts +0 -15
  172. package/dist/ts3.4/builders/utils/build-standalone-errors-handler.d.ts +0 -1
  173. package/dist/ts3.4/builders/utils/run-compodoc.d.ts +0 -6
  174. package/dist/ts3.4/client/docs/compodoc.d.ts +0 -18
  175. package/dist/ts3.4/client/docs/config.d.ts +0 -15
  176. package/dist/ts3.4/client/docs/index.d.ts +0 -1
  177. package/dist/ts3.4/client/docs/prepareForInline.d.ts +0 -7
  178. package/dist/ts3.4/client/docs/sourceDecorator.d.ts +0 -9
  179. package/dist/ts3.4/client/docs/types.d.ts +0 -102
  180. package/dist/ts3.4/client/index.d.ts +0 -4
  181. package/dist/ts3.4/client/preview/angular/app.token.d.ts +0 -3
  182. package/dist/ts3.4/client/preview/angular/components/app.component.d.ts +0 -38
  183. package/dist/ts3.4/client/preview/angular/helpers.d.ts +0 -8
  184. package/dist/ts3.4/client/preview/angular-beta/AbstractRenderer.d.ts +0 -57
  185. package/dist/ts3.4/client/preview/angular-beta/CanvasRenderer.d.ts +0 -14
  186. package/dist/ts3.4/client/preview/angular-beta/ComputesTemplateFromComponent.d.ts +0 -17
  187. package/dist/ts3.4/client/preview/angular-beta/DocsRenderer.d.ts +0 -14
  188. package/dist/ts3.4/client/preview/angular-beta/RendererFactory.d.ts +0 -11
  189. package/dist/ts3.4/client/preview/angular-beta/StorybookModule.d.ts +0 -9
  190. package/dist/ts3.4/client/preview/angular-beta/StorybookProvider.d.ts +0 -5
  191. package/dist/ts3.4/client/preview/angular-beta/StorybookWrapperComponent.d.ts +0 -9
  192. package/dist/ts3.4/client/preview/angular-beta/utils/NgComponentAnalyzer.d.ts +0 -29
  193. package/dist/ts3.4/client/preview/angular-beta/utils/NgModulesAnalyzer.d.ts +0 -6
  194. package/dist/ts3.4/client/preview/angular-polyfills.d.ts +0 -41
  195. package/dist/ts3.4/client/preview/config.d.ts +0 -6
  196. package/dist/ts3.4/client/preview/decorateStory.d.ts +0 -4
  197. package/dist/ts3.4/client/preview/decorators.d.ts +0 -6
  198. package/dist/ts3.4/client/preview/globals.d.ts +0 -1
  199. package/dist/ts3.4/client/preview/index.d.ts +0 -25
  200. package/dist/ts3.4/client/preview/render.d.ts +0 -7
  201. package/dist/ts3.4/client/preview/types-6-0.d.ts +0 -42
  202. package/dist/ts3.4/client/preview/types-7-0.d.ts +0 -9
  203. package/dist/ts3.4/client/preview/types.d.ts +0 -29
  204. package/dist/ts3.4/demo/button.component.d.ts +0 -5
  205. package/dist/ts3.4/demo/welcome.component.d.ts +0 -4
  206. package/dist/ts3.4/public_api.d.ts +0 -1
  207. package/dist/ts3.4/renderer.d.ts +0 -4
  208. package/dist/ts3.4/server/__mocks-ng-workspace__/minimal-config/src/main.d.ts +0 -1
  209. package/dist/ts3.4/server/__mocks-ng-workspace__/some-config/src/main.d.ts +0 -1
  210. package/dist/ts3.4/server/__mocks-ng-workspace__/with-angularBrowserTarget/src/main.d.ts +0 -1
  211. package/dist/ts3.4/server/__mocks-ng-workspace__/with-lib/projects/pattern-lib/src/main.d.ts +0 -1
  212. package/dist/ts3.4/server/__mocks-ng-workspace__/with-nx/src/main.d.ts +0 -1
  213. package/dist/ts3.4/server/__mocks-ng-workspace__/with-nx-workspace/src/main.d.ts +0 -1
  214. package/dist/ts3.4/server/__mocks-ng-workspace__/with-options-styles/src/main.d.ts +0 -1
  215. package/dist/ts3.4/server/__mocks-ng-workspace__/without-projects-entry/projects/pattern-lib/src/main.d.ts +0 -1
  216. package/dist/ts3.4/server/__mocks-ng-workspace__/without-tsConfig/src/main.d.ts +0 -1
  217. package/dist/ts3.4/server/angular-cli-webpack-12.2.x.d.ts +0 -1
  218. package/dist/ts3.4/server/angular-cli-webpack-13.x.x.d.ts +0 -1
  219. package/dist/ts3.4/server/angular-cli-webpack-older.d.ts +0 -73
  220. package/dist/ts3.4/server/angular-devkit-build-webpack.d.ts +0 -30
  221. package/dist/ts3.4/server/angular-read-workspace.d.ts +0 -13
  222. package/dist/ts3.4/server/build.d.ts +0 -1
  223. package/dist/ts3.4/server/create-fork-ts-checker-plugin.d.ts +0 -3
  224. package/dist/ts3.4/server/framework-preset-angular-cli.d.ts +0 -3
  225. package/dist/ts3.4/server/framework-preset-angular-docs.d.ts +0 -2
  226. package/dist/ts3.4/server/framework-preset-angular-ivy.d.ts +0 -10
  227. package/dist/ts3.4/server/framework-preset-angular.d.ts +0 -5
  228. package/dist/ts3.4/server/index.d.ts +0 -1
  229. package/dist/ts3.4/server/ngx-template-loader/index.d.ts +0 -1
  230. package/dist/ts3.4/server/options.d.ts +0 -14
  231. package/dist/ts3.4/server/preset.d.ts +0 -3
  232. package/dist/ts3.4/server/ts_config.d.ts +0 -2
  233. package/dist/ts3.4/server/utils/filter-out-styling-rules.d.ts +0 -2
  234. package/dist/ts3.4/server/utils/module-is-available.d.ts +0 -1
  235. package/dist/ts3.4/server/utils/normalize-optimization.d.ts +0 -3
  236. package/dist/ts3.4/types/index.d.ts +0 -6
  237. package/dist/ts3.9/builders/build-storybook/index.js +0 -65
  238. package/dist/ts3.9/builders/start-storybook/index.js +0 -73
  239. package/dist/ts3.9/client/docs/prepareForInline.d.ts +0 -7
  240. package/dist/ts3.9/client/docs/prepareForInline.js +0 -45
  241. package/dist/ts3.9/client/index.d.ts +0 -4
  242. package/dist/ts3.9/client/index.js +0 -28
  243. package/dist/ts3.9/client/preview/angular-beta/CanvasRenderer.js +0 -34
  244. package/dist/ts3.9/client/preview/angular-beta/DocsRenderer.js +0 -59
  245. package/dist/ts3.9/client/preview/angular-beta/RendererFactory.js +0 -65
  246. package/dist/ts3.9/client/preview/globals.d.ts +0 -1
  247. package/dist/ts3.9/client/preview/globals.js +0 -9
  248. package/dist/ts3.9/client/preview/index.js +0 -27
  249. package/dist/ts3.9/client/preview/render.js +0 -34
  250. package/dist/ts3.9/client/preview/types-7-0.d.ts +0 -9
  251. package/dist/ts3.9/demo/button.component.d.ts +0 -5
  252. package/dist/ts3.9/demo/button.component.js +0 -46
  253. package/dist/ts3.9/demo/welcome.component.d.ts +0 -4
  254. package/dist/ts3.9/demo/welcome.component.js +0 -99
  255. package/dist/ts3.9/public_api.d.ts +0 -1
  256. package/dist/ts3.9/renderer.d.ts +0 -4
  257. package/dist/ts3.9/server/angular-cli-webpack-12.2.x.js +0 -56
  258. package/dist/ts3.9/server/angular-cli-webpack-13.x.x.js +0 -60
  259. package/dist/ts3.9/server/angular-cli-webpack-older.d.ts +0 -73
  260. package/dist/ts3.9/server/angular-cli-webpack-older.js +0 -110
  261. package/dist/ts3.9/server/build.d.ts +0 -1
  262. package/dist/ts3.9/server/build.js +0 -28
  263. package/dist/ts3.9/server/framework-preset-angular-cli.js +0 -177
  264. package/dist/ts3.9/server/framework-preset-angular.js +0 -100
  265. package/dist/ts3.9/server/index.d.ts +0 -1
  266. package/dist/ts3.9/server/index.js +0 -8
  267. package/dist/ts3.9/server/options.js +0 -8
  268. package/dist/ts3.9/server/preset.d.ts +0 -3
  269. package/dist/ts3.9/server/preset.js +0 -13
  270. package/dist/ts3.9/server/utils/normalize-asset-patterns.d.ts +0 -6
  271. package/dist/ts3.9/types/index.d.ts +0 -6
  272. package/standalone.d.ts +0 -21
  273. package/standalone.js +0 -8
  274. package/types-6-0.d.ts +0 -1
  275. package/types-7-0.d.ts +0 -1
@@ -1,10 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- var ComputesTemplateFromComponent_1 = require("./client/preview/angular-beta/ComputesTemplateFromComponent");
3
+ exports.getStorybookModuleMetadata = exports.AbstractRenderer = exports.rendererFactory = exports.computesTemplateSourceFromComponent = void 0;
4
+ var ComputesTemplateFromComponent_1 = require("./client/angular-beta/ComputesTemplateFromComponent");
4
5
  Object.defineProperty(exports, "computesTemplateSourceFromComponent", { enumerable: true, get: function () { return ComputesTemplateFromComponent_1.computesTemplateSourceFromComponent; } });
5
- var render_1 = require("./client/preview/render");
6
+ var render_1 = require("./client/render");
6
7
  Object.defineProperty(exports, "rendererFactory", { enumerable: true, get: function () { return render_1.rendererFactory; } });
7
- var AbstractRenderer_1 = require("./client/preview/angular-beta/AbstractRenderer");
8
+ var AbstractRenderer_1 = require("./client/angular-beta/AbstractRenderer");
8
9
  Object.defineProperty(exports, "AbstractRenderer", { enumerable: true, get: function () { return AbstractRenderer_1.AbstractRenderer; } });
9
- var StorybookModule_1 = require("./client/preview/angular-beta/StorybookModule");
10
+ var StorybookModule_1 = require("./client/angular-beta/StorybookModule");
10
11
  Object.defineProperty(exports, "getStorybookModuleMetadata", { enumerable: true, get: function () { return StorybookModule_1.getStorybookModuleMetadata; } });
@@ -0,0 +1,66 @@
1
+ // Private angular devkit stuff
2
+ const { generateI18nBrowserWebpackConfigFromContext, } = require('@angular-devkit/build-angular/src/utils/webpack-browser-config');
3
+ const { getCommonConfig, getStylesConfig, getTypeScriptConfig, } = require('@angular-devkit/build-angular/src/webpack/configs');
4
+ const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin');
5
+ const { filterOutStylingRules } = require('./utils/filter-out-styling-rules');
6
+ /**
7
+ * Extract webpack config from angular-cli 12.2.x
8
+ * ⚠️ This file is in JavaScript to not use TypeScript. Because current storybook TypeScript version is not compatible with Angular CLI.
9
+ * FIXME: Try another way with TypeScript on future storybook version (7 maybe 🤞)
10
+ *
11
+ * @param {*} baseConfig Previous webpack config from storybook
12
+ * @param {*} options { builderOptions, builderContext }
13
+ */
14
+ exports.getWebpackConfig = async (baseConfig, { builderOptions, builderContext }) => {
15
+ /**
16
+ * Get angular-cli Webpack config
17
+ */
18
+ const { config: cliConfig } = await generateI18nBrowserWebpackConfigFromContext({
19
+ // Default options
20
+ index: 'noop-index',
21
+ main: 'noop-main',
22
+ outputPath: 'noop-out',
23
+ // Options provided by user
24
+ ...builderOptions,
25
+ // Fixed options
26
+ optimization: false,
27
+ namedChunks: false,
28
+ progress: false,
29
+ buildOptimizer: false,
30
+ aot: false,
31
+ }, builderContext, (wco) => [getCommonConfig(wco), getStylesConfig(wco), getTypeScriptConfig(wco)]);
32
+ /**
33
+ * Merge baseConfig Webpack with angular-cli Webpack
34
+ */
35
+ const entry = [
36
+ ...baseConfig.entry,
37
+ ...(cliConfig.entry.styles ?? []),
38
+ ...(cliConfig.entry.polyfills ?? []),
39
+ ];
40
+ // Don't use storybooks styling rules because we have to use rules created by @angular-devkit/build-angular
41
+ // because @angular-devkit/build-angular created rules have include/exclude for global style files.
42
+ const rulesExcludingStyles = filterOutStylingRules(baseConfig);
43
+ const module = {
44
+ ...baseConfig.module,
45
+ rules: [...cliConfig.module.rules, ...rulesExcludingStyles],
46
+ };
47
+ const plugins = [...(cliConfig.plugins ?? []), ...baseConfig.plugins];
48
+ const resolve = {
49
+ ...baseConfig.resolve,
50
+ modules: Array.from(new Set([...baseConfig.resolve.modules, ...cliConfig.resolve.modules])),
51
+ plugins: [
52
+ new TsconfigPathsPlugin({
53
+ configFile: builderOptions.tsConfig,
54
+ mainFields: ['browser', 'module', 'main'],
55
+ }),
56
+ ],
57
+ };
58
+ return {
59
+ ...baseConfig,
60
+ entry,
61
+ module,
62
+ plugins,
63
+ resolve,
64
+ resolveLoader: cliConfig.resolveLoader,
65
+ };
66
+ };
@@ -0,0 +1,70 @@
1
+ // Private angular devkit stuff
2
+ const { generateI18nBrowserWebpackConfigFromContext, } = require('@angular-devkit/build-angular/src/utils/webpack-browser-config');
3
+ const { getCommonConfig, getStylesConfig, getDevServerConfig, getTypeScriptConfig, } = require('@angular-devkit/build-angular/src/webpack/configs');
4
+ const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin');
5
+ const { filterOutStylingRules } = require('./utils/filter-out-styling-rules');
6
+ /**
7
+ * Extract webpack config from angular-cli 13.x.x
8
+ * ⚠️ This file is in JavaScript to not use TypeScript. Because current storybook TypeScript version is not compatible with Angular CLI.
9
+ * FIXME: Try another way with TypeScript on future storybook version (7 maybe 🤞)
10
+ *
11
+ * @param {*} baseConfig Previous webpack config from storybook
12
+ * @param {*} options { builderOptions, builderContext }
13
+ */
14
+ exports.getWebpackConfig = async (baseConfig, { builderOptions, builderContext }) => {
15
+ /**
16
+ * Get angular-cli Webpack config
17
+ */
18
+ const { config: cliConfig } = await generateI18nBrowserWebpackConfigFromContext({
19
+ // Default options
20
+ index: 'noop-index',
21
+ main: 'noop-main',
22
+ outputPath: 'noop-out',
23
+ // Options provided by user
24
+ ...builderOptions,
25
+ // Fixed options
26
+ optimization: false,
27
+ namedChunks: false,
28
+ progress: false,
29
+ buildOptimizer: false,
30
+ aot: false,
31
+ }, builderContext, (wco) => [
32
+ getCommonConfig(wco),
33
+ getStylesConfig(wco),
34
+ getTypeScriptConfig ? getTypeScriptConfig(wco) : getDevServerConfig(wco),
35
+ ]);
36
+ /**
37
+ * Merge baseConfig Webpack with angular-cli Webpack
38
+ */
39
+ const entry = [
40
+ ...baseConfig.entry,
41
+ ...(cliConfig.entry.styles ?? []),
42
+ ...(cliConfig.entry.polyfills ?? []),
43
+ ];
44
+ // Don't use storybooks styling rules because we have to use rules created by @angular-devkit/build-angular
45
+ // because @angular-devkit/build-angular created rules have include/exclude for global style files.
46
+ const rulesExcludingStyles = filterOutStylingRules(baseConfig);
47
+ const module = {
48
+ ...baseConfig.module,
49
+ rules: [...cliConfig.module.rules, ...rulesExcludingStyles],
50
+ };
51
+ const plugins = [...(cliConfig.plugins ?? []), ...baseConfig.plugins];
52
+ const resolve = {
53
+ ...baseConfig.resolve,
54
+ modules: Array.from(new Set([...baseConfig.resolve.modules, ...cliConfig.resolve.modules])),
55
+ plugins: [
56
+ new TsconfigPathsPlugin({
57
+ configFile: builderOptions.tsConfig,
58
+ mainFields: ['browser', 'module', 'main'],
59
+ }),
60
+ ],
61
+ };
62
+ return {
63
+ ...baseConfig,
64
+ entry,
65
+ module,
66
+ plugins,
67
+ resolve,
68
+ resolveLoader: cliConfig.resolveLoader,
69
+ };
70
+ };
@@ -0,0 +1,6 @@
1
+ import webpack, { Configuration } from 'webpack';
2
+ import type { PresetOptions } from './preset-options';
3
+ /**
4
+ * Old way currently support version lower than 12.2.x
5
+ */
6
+ export declare function getWebpackConfig(baseConfig: webpack.Configuration, options: PresetOptions): Promise<Configuration>;
@@ -0,0 +1,111 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.getWebpackConfig = void 0;
7
+ const node_logger_1 = require("@storybook/node-logger");
8
+ const tsconfig_paths_webpack_plugin_1 = __importDefault(require("tsconfig-paths-webpack-plugin"));
9
+ const architect_1 = require("@angular-devkit/architect");
10
+ const angular_read_workspace_1 = require("./angular-read-workspace");
11
+ const angular_devkit_build_webpack_1 = require("./angular-devkit-build-webpack");
12
+ const filter_out_styling_rules_1 = require("./utils/filter-out-styling-rules");
13
+ /**
14
+ * Old way currently support version lower than 12.2.x
15
+ */
16
+ async function getWebpackConfig(baseConfig, options) {
17
+ const dirToSearch = process.cwd();
18
+ // Read angular workspace
19
+ let workspaceConfig;
20
+ try {
21
+ workspaceConfig = await (0, angular_read_workspace_1.readAngularWorkspaceConfig)(dirToSearch);
22
+ }
23
+ catch (error) {
24
+ node_logger_1.logger.error(`=> Could not find angular workspace config (angular.json) on this path "${dirToSearch}"`);
25
+ node_logger_1.logger.info(`=> Fail to load angular-cli config. Using base config`);
26
+ return baseConfig;
27
+ }
28
+ // Find angular project target
29
+ let project;
30
+ let target;
31
+ let confName;
32
+ try {
33
+ // Default behavior when `angularBrowserTarget` are not explicitly defined to null
34
+ if (options.angularBrowserTarget !== null) {
35
+ const browserTarget = options.angularBrowserTarget
36
+ ? (0, architect_1.targetFromTargetString)(options.angularBrowserTarget)
37
+ : {
38
+ configuration: undefined,
39
+ project: (0, angular_read_workspace_1.getDefaultProjectName)(workspaceConfig),
40
+ target: 'build',
41
+ };
42
+ const fondProject = (0, angular_read_workspace_1.findAngularProjectTarget)(workspaceConfig, browserTarget.project, browserTarget.target);
43
+ project = fondProject.project;
44
+ target = fondProject.target;
45
+ confName = browserTarget.configuration;
46
+ node_logger_1.logger.info(`=> Using angular project "${browserTarget.project}:${browserTarget.target}${confName ? `:${confName}` : ''}" for configuring Storybook`);
47
+ }
48
+ // Start storybook when only tsConfig is provided.
49
+ if (options.angularBrowserTarget === null && options.tsConfig) {
50
+ node_logger_1.logger.info(`=> Using default angular project with "tsConfig:${options.tsConfig}"`);
51
+ project = { root: '', extensions: {}, targets: undefined };
52
+ target = { builder: '', options: { tsConfig: options.tsConfig } };
53
+ }
54
+ }
55
+ catch (error) {
56
+ node_logger_1.logger.error(`=> Could not find angular project: ${error.message}`);
57
+ node_logger_1.logger.info(`=> Fail to load angular-cli config. Using base config`);
58
+ return baseConfig;
59
+ }
60
+ // Use angular-cli to get some webpack config
61
+ let angularCliWebpackConfig;
62
+ try {
63
+ angularCliWebpackConfig = await (0, angular_devkit_build_webpack_1.extractAngularCliWebpackConfig)(dirToSearch, project, target, confName);
64
+ node_logger_1.logger.info(`=> Using angular-cli webpack config`);
65
+ }
66
+ catch (error) {
67
+ node_logger_1.logger.error(`=> Could not get angular cli webpack config`);
68
+ throw error;
69
+ }
70
+ return mergeAngularCliWebpackConfig(angularCliWebpackConfig, baseConfig);
71
+ }
72
+ exports.getWebpackConfig = getWebpackConfig;
73
+ function mergeAngularCliWebpackConfig({ cliCommonWebpackConfig, cliStyleWebpackConfig, tsConfigPath }, baseConfig) {
74
+ // Don't use storybooks styling rules because we have to use rules created by @angular-devkit/build-angular
75
+ // because @angular-devkit/build-angular created rules have include/exclude for global style files.
76
+ const rulesExcludingStyles = (0, filter_out_styling_rules_1.filterOutStylingRules)(baseConfig);
77
+ // styleWebpackConfig.entry adds global style files to the webpack context
78
+ const entry = [
79
+ ...baseConfig.entry,
80
+ // @ts-ignore
81
+ ...Object.values(cliStyleWebpackConfig.entry).reduce((acc, item) => acc.concat(item), []),
82
+ ];
83
+ const module = {
84
+ ...baseConfig.module,
85
+ rules: [...cliStyleWebpackConfig.module.rules, ...rulesExcludingStyles],
86
+ };
87
+ // We use cliCommonConfig plugins to serve static assets files.
88
+ const plugins = [
89
+ ...cliStyleWebpackConfig.plugins,
90
+ ...cliCommonWebpackConfig.plugins,
91
+ ...baseConfig.plugins,
92
+ ];
93
+ const resolve = {
94
+ ...baseConfig.resolve,
95
+ modules: Array.from(new Set([...baseConfig.resolve.modules, ...cliCommonWebpackConfig.resolve.modules])),
96
+ plugins: [
97
+ new tsconfig_paths_webpack_plugin_1.default({
98
+ configFile: tsConfigPath,
99
+ mainFields: ['browser', 'module', 'main'],
100
+ }),
101
+ ],
102
+ };
103
+ return {
104
+ ...baseConfig,
105
+ entry,
106
+ module,
107
+ plugins,
108
+ resolve,
109
+ resolveLoader: cliCommonWebpackConfig.resolveLoader,
110
+ };
111
+ }
@@ -4,22 +4,22 @@
4
4
  *
5
5
  * It uses code block of angular cli to extract parts of webpack configuration
6
6
  */
7
- import webpack from 'webpack';
7
+ import { Configuration } from 'webpack';
8
8
  import { workspaces } from '@angular-devkit/core';
9
9
  export declare type AngularCliWebpackConfig = {
10
10
  cliCommonWebpackConfig: {
11
- plugins: webpack.Plugin[];
11
+ plugins: Configuration['plugins'];
12
12
  resolve: {
13
13
  modules: string[];
14
14
  };
15
- resolveLoader: webpack.ResolveLoader;
15
+ resolveLoader: Configuration['resolveLoader'];
16
16
  };
17
17
  cliStyleWebpackConfig: {
18
- entry: string | string[] | webpack.Entry | webpack.EntryFunc;
18
+ entry: Configuration['entry'];
19
19
  module: {
20
- rules: webpack.RuleSetRule[];
20
+ rules: Configuration['module']['rules'];
21
21
  };
22
- plugins: webpack.Plugin[];
22
+ plugins: Configuration['plugins'];
23
23
  };
24
24
  tsConfigPath: string;
25
25
  };
@@ -7,7 +7,11 @@
7
7
  */
8
8
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
9
9
  if (k2 === undefined) k2 = k;
10
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
10
+ var desc = Object.getOwnPropertyDescriptor(m, k);
11
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
12
+ desc = { enumerable: true, get: function() { return m[k]; } };
13
+ }
14
+ Object.defineProperty(o, k2, desc);
11
15
  }) : (function(o, m, k, k2) {
12
16
  if (k2 === undefined) k2 = k;
13
17
  o[k2] = m[k];
@@ -20,19 +24,10 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
20
24
  var __importStar = (this && this.__importStar) || function (mod) {
21
25
  if (mod && mod.__esModule) return mod;
22
26
  var result = {};
23
- if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
27
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
24
28
  __setModuleDefault(result, mod);
25
29
  return result;
26
30
  };
27
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
28
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
29
- return new (P || (P = Promise))(function (resolve, reject) {
30
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
31
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
32
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
33
- step((generator = generator.apply(thisArg, _arguments || [])).next());
34
- });
35
- };
36
31
  var __importDefault = (this && this.__importDefault) || function (mod) {
37
32
  return (mod && mod.__esModule) ? mod : { "default": mod };
38
33
  };
@@ -47,12 +42,12 @@ const normalize_optimization_1 = require("./utils/normalize-optimization");
47
42
  const importAngularCliWebpackConfigGenerator = () => {
48
43
  let angularWebpackConfig;
49
44
  // First we look for webpack config according to directory structure of Angular 11
50
- if (module_is_available_1.moduleIsAvailable('@angular-devkit/build-angular/src/webpack/configs')) {
45
+ if ((0, module_is_available_1.moduleIsAvailable)('@angular-devkit/build-angular/src/webpack/configs')) {
51
46
  // eslint-disable-next-line global-require
52
47
  angularWebpackConfig = require('@angular-devkit/build-angular/src/webpack/configs');
53
48
  }
54
49
  // We fallback on directory structure of Angular 10 (and below)
55
- else if (module_is_available_1.moduleIsAvailable('@angular-devkit/build-angular/src/angular-cli-files/models/webpack-configs')) {
50
+ else if ((0, module_is_available_1.moduleIsAvailable)('@angular-devkit/build-angular/src/angular-cli-files/models/webpack-configs')) {
56
51
  // eslint-disable-next-line global-require
57
52
  angularWebpackConfig = require('@angular-devkit/build-angular/src/angular-cli-files/models/webpack-configs');
58
53
  }
@@ -66,18 +61,18 @@ const importAngularCliWebpackConfigGenerator = () => {
66
61
  };
67
62
  const importAngularCliReadTsconfigUtil = () => {
68
63
  // First we look for webpack config according to directory structure of Angular 11
69
- if (module_is_available_1.moduleIsAvailable('@angular-devkit/build-angular/src/utils/read-tsconfig')) {
64
+ if ((0, module_is_available_1.moduleIsAvailable)('@angular-devkit/build-angular/src/utils/read-tsconfig')) {
70
65
  // eslint-disable-next-line global-require
71
66
  return require('@angular-devkit/build-angular/src/utils/read-tsconfig');
72
67
  }
73
68
  // We fallback on directory structure of Angular 10 (and below)
74
- if (module_is_available_1.moduleIsAvailable('@angular-devkit/build-angular/src/angular-cli-files/utilities/read-tsconfig')) {
69
+ if ((0, module_is_available_1.moduleIsAvailable)('@angular-devkit/build-angular/src/angular-cli-files/utilities/read-tsconfig')) {
75
70
  // eslint-disable-next-line global-require
76
71
  return require('@angular-devkit/build-angular/src/angular-cli-files/utilities/read-tsconfig');
77
72
  }
78
73
  throw new Error('ReadTsconfig not found in "@angular-devkit/build-angular"');
79
74
  };
80
- const buildWebpackConfigOptions = (dirToSearch, project, target, confName) => __awaiter(void 0, void 0, void 0, function* () {
75
+ const buildWebpackConfigOptions = async (dirToSearch, project, target, confName) => {
81
76
  let conf = {};
82
77
  if (confName) {
83
78
  if (!target.configurations) {
@@ -88,65 +83,82 @@ const buildWebpackConfigOptions = (dirToSearch, project, target, confName) => __
88
83
  }
89
84
  conf = target.configurations[confName];
90
85
  }
91
- const projectBuildOptions = Object.assign(Object.assign({}, target.options), conf);
86
+ const projectBuildOptions = { ...target.options, ...conf };
92
87
  const requiredOptions = ['tsConfig'];
93
88
  if (!requiredOptions.every((key) => !!projectBuildOptions[key])) {
94
89
  throw new Error(`Missing required options in project target. Check "${requiredOptions.join(', ')}"`);
95
90
  }
96
- const workspaceRootNormalized = core_1.normalize(dirToSearch);
97
- const projectRootNormalized = core_1.resolve(workspaceRootNormalized, core_1.normalize(project.root || ''));
91
+ const workspaceRootNormalized = (0, core_1.normalize)(dirToSearch);
92
+ const projectRootNormalized = (0, core_1.resolve)(workspaceRootNormalized, (0, core_1.normalize)(project.root || ''));
98
93
  const sourceRootNormalized = project.sourceRoot
99
- ? core_1.resolve(workspaceRootNormalized, core_1.normalize(project.sourceRoot))
94
+ ? (0, core_1.resolve)(workspaceRootNormalized, (0, core_1.normalize)(project.sourceRoot))
100
95
  : undefined;
101
- const tsConfigPath = path_1.default.resolve(core_1.getSystemPath(workspaceRootNormalized), projectBuildOptions.tsConfig);
102
- const tsConfig = importAngularCliReadTsconfigUtil().readTsconfig(tsConfigPath);
103
- const ts = yield Promise.resolve().then(() => __importStar(require('typescript')));
96
+ const tsConfigPath = path_1.default.resolve((0, core_1.getSystemPath)(workspaceRootNormalized), projectBuildOptions.tsConfig);
97
+ const tsConfig = await importAngularCliReadTsconfigUtil().readTsconfig(tsConfigPath);
98
+ const ts = await Promise.resolve().then(() => __importStar(require('typescript')));
104
99
  const scriptTarget = tsConfig.options.target || ts.ScriptTarget.ES5;
105
- const buildOptions = Object.assign(Object.assign({
100
+ const buildOptions = {
106
101
  // Default options
107
- budgets: [], fileReplacements: [], main: '', outputPath: 'dist/storybook-angular', scripts: [], sourceMap: {}, styles: [], lazyModules: [] }, projectBuildOptions), { assets: normalize_asset_patterns_1.normalizeAssetPatterns(projectBuildOptions.assets || [], workspaceRootNormalized, projectRootNormalized, sourceRootNormalized), optimization: normalize_optimization_1.normalizeOptimization(projectBuildOptions.optimization),
102
+ budgets: [],
103
+ fileReplacements: [],
104
+ main: '',
105
+ outputPath: 'dist/storybook-angular',
106
+ scripts: [],
107
+ sourceMap: {},
108
+ styles: [],
109
+ // Deleted in angular 12. Keep for compatibility with versions lower than angular 12
110
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
111
+ // @ts-ignore
112
+ lazyModules: [],
113
+ // Project Options
114
+ ...projectBuildOptions,
115
+ assets: (0, normalize_asset_patterns_1.normalizeAssetPatterns)(projectBuildOptions.assets || [], workspaceRootNormalized, projectRootNormalized, sourceRootNormalized),
116
+ optimization: (0, normalize_optimization_1.normalizeOptimization)(projectBuildOptions.optimization),
108
117
  // Forced options
109
- statsJson: false, forkTypeChecker: false });
118
+ statsJson: false,
119
+ // Deleted in angular 12. Keep for compatibility with versions lower than angular 12
120
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
121
+ // @ts-ignore
122
+ forkTypeChecker: false,
123
+ };
110
124
  return {
111
- root: core_1.getSystemPath(workspaceRootNormalized),
125
+ projectName: 'this-is-just-a-fake-name-for-getting-rid-of-the-error',
126
+ root: (0, core_1.getSystemPath)(workspaceRootNormalized),
112
127
  // The dependency of `@angular-devkit/build-angular` to `@angular-devkit/core` is not exactly the same version as the one for storybook (node modules of node modules ^^)
113
- logger: node_1.createConsoleLogger(),
114
- projectRoot: core_1.getSystemPath(projectRootNormalized),
115
- sourceRoot: sourceRootNormalized ? core_1.getSystemPath(sourceRootNormalized) : undefined,
128
+ logger: (0, node_1.createConsoleLogger)(),
129
+ projectRoot: (0, core_1.getSystemPath)(projectRootNormalized),
130
+ sourceRoot: sourceRootNormalized ? (0, core_1.getSystemPath)(sourceRootNormalized) : undefined,
116
131
  buildOptions,
117
132
  tsConfig,
118
133
  tsConfigPath,
119
134
  scriptTarget,
120
135
  };
121
- });
136
+ };
122
137
  /**
123
138
  * Uses angular cli to extract webpack configuration.
124
139
  * The `AngularCliWebpackConfig` type lists the parts used by storybook
125
140
  */
126
- function extractAngularCliWebpackConfig(dirToSearch, project, target, confName) {
127
- var _a;
128
- return __awaiter(this, void 0, void 0, function* () {
129
- const { getCommonConfig, getStylesConfig } = importAngularCliWebpackConfigGenerator();
130
- const webpackConfigOptions = yield buildWebpackConfigOptions(dirToSearch, project, target, confName);
131
- const cliCommonConfig = getCommonConfig(webpackConfigOptions);
132
- const cliStyleConfig = getStylesConfig(webpackConfigOptions);
133
- return {
134
- cliCommonWebpackConfig: {
135
- plugins: cliCommonConfig.plugins,
136
- resolve: {
137
- modules: (_a = cliCommonConfig.resolve) === null || _a === void 0 ? void 0 : _a.modules,
138
- },
139
- resolveLoader: cliCommonConfig.resolveLoader,
141
+ async function extractAngularCliWebpackConfig(dirToSearch, project, target, confName) {
142
+ const { getCommonConfig, getStylesConfig } = importAngularCliWebpackConfigGenerator();
143
+ const webpackConfigOptions = await buildWebpackConfigOptions(dirToSearch, project, target, confName);
144
+ const cliCommonConfig = getCommonConfig(webpackConfigOptions);
145
+ const cliStyleConfig = getStylesConfig(webpackConfigOptions);
146
+ return {
147
+ cliCommonWebpackConfig: {
148
+ plugins: cliCommonConfig.plugins,
149
+ resolve: {
150
+ modules: cliCommonConfig.resolve?.modules,
140
151
  },
141
- cliStyleWebpackConfig: {
142
- entry: cliStyleConfig.entry,
143
- module: {
144
- rules: [...cliStyleConfig.module.rules],
145
- },
146
- plugins: cliStyleConfig.plugins,
152
+ resolveLoader: cliCommonConfig.resolveLoader,
153
+ },
154
+ cliStyleWebpackConfig: {
155
+ entry: cliStyleConfig.entry,
156
+ module: {
157
+ rules: [...cliStyleConfig.module.rules],
147
158
  },
148
- tsConfigPath: webpackConfigOptions.tsConfigPath,
149
- };
150
- });
159
+ plugins: cliStyleConfig.plugins,
160
+ },
161
+ tsConfigPath: webpackConfigOptions.tsConfigPath,
162
+ };
151
163
  }
152
164
  exports.extractAngularCliWebpackConfig = extractAngularCliWebpackConfig;