@teambit/react 0.0.881 → 0.0.882

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 (236) hide show
  1. package/artifacts/__bit_junit.xml +2 -2
  2. package/artifacts/env-template/public/{238.2ddc5a20aad2fef149e6.js → 700.fcb0085dcdf160cc65c9.js} +15 -15
  3. package/artifacts/env-template/public/assets-manifest.json +16 -16
  4. package/artifacts/env-template/public/{compositions.c4e18d110cce13606364.js → compositions.d36450c5ae70173e7a70.js} +1 -1
  5. package/artifacts/env-template/public/compositions.html +1 -1
  6. package/artifacts/env-template/public/{overview.085d128a4f5272ef7319.js → overview.ca1695b4bf4d507d7a28.js} +1 -1
  7. package/artifacts/env-template/public/overview.html +1 -1
  8. package/artifacts/env-template/public/peers.9642cecf0c09b9d93f54.js +1 -0
  9. package/artifacts/env-template/public/{preview-root.b9ea187989f25bad7bf4.js → preview-root.a829360e0cc95e341dfd.js} +1 -1
  10. package/artifacts/env-template/public/static/css/700.bd8655a5.css +1 -0
  11. package/artifacts/env-template/public/static/css/compositions.e163efe5.css +1 -0
  12. package/artifacts/env-template/public/static/css/{overview.367aeb5b.css → overview.18adf1ee.css} +1 -1
  13. package/artifacts/preview/teambit_react_react-preview.js +1 -1
  14. package/{compositions-1666409808293.js → compositions-1666496165706.js} +0 -0
  15. package/dist/apps/web/compute-results.js +0 -2
  16. package/dist/apps/web/compute-results.js.map +1 -1
  17. package/dist/apps/web/index.js +0 -3
  18. package/dist/apps/web/index.js.map +1 -1
  19. package/dist/apps/web/plugins/index.js +0 -3
  20. package/dist/apps/web/plugins/index.js.map +1 -1
  21. package/dist/apps/web/plugins/prerender.js +0 -14
  22. package/dist/apps/web/plugins/prerender.js.map +1 -1
  23. package/dist/apps/web/react.app-type.js +0 -7
  24. package/dist/apps/web/react.app-type.js.map +1 -1
  25. package/dist/apps/web/react.application.js +11 -76
  26. package/dist/apps/web/react.application.js.map +1 -1
  27. package/dist/apps/web/ssr/ssr-express.js +0 -31
  28. package/dist/apps/web/ssr/ssr-express.js.map +1 -1
  29. package/dist/apps/web/webpack/mutators.js +0 -13
  30. package/dist/apps/web/webpack/mutators.js.map +1 -1
  31. package/dist/apps/web/webpack/webpack.app.ssr.config.js +0 -11
  32. package/dist/apps/web/webpack/webpack.app.ssr.config.js.map +1 -1
  33. package/dist/eslint/eslintrc.js +1 -1
  34. package/dist/eslint/eslintrc.js.map +1 -1
  35. package/dist/highlighter-widget.js +0 -16
  36. package/dist/highlighter-widget.js.map +1 -1
  37. package/dist/index.js +0 -3
  38. package/dist/index.js.map +1 -1
  39. package/dist/jest/index.js +0 -7
  40. package/dist/jest/index.js.map +1 -1
  41. package/dist/jest/jest.base.config.js +3 -3
  42. package/dist/jest/jest.base.config.js.map +1 -1
  43. package/dist/jest/jest.cjs.config.js +0 -10
  44. package/dist/jest/jest.cjs.config.js.map +1 -1
  45. package/dist/jest/jest.config.js +1 -1
  46. package/dist/jest/jest.config.js.map +1 -1
  47. package/dist/jest/jest.esm.config.js +0 -10
  48. package/dist/jest/jest.esm.config.js.map +1 -1
  49. package/dist/jest/setupTests.js.map +1 -1
  50. package/dist/jest/transformers/base-transformer-plugins.js +1 -0
  51. package/dist/jest/transformers/base-transformer-plugins.js.map +1 -1
  52. package/dist/jest/transformers/base-transformer-presets.js +1 -0
  53. package/dist/jest/transformers/base-transformer-presets.js.map +1 -1
  54. package/dist/jest/transformers/base-transformer-process.js +0 -2
  55. package/dist/jest/transformers/base-transformer-process.js.map +1 -1
  56. package/dist/jest/transformers/cjs-transformer.js +0 -5
  57. package/dist/jest/transformers/cjs-transformer.js.map +1 -1
  58. package/dist/jest/transformers/css-transform.js +1 -2
  59. package/dist/jest/transformers/css-transform.js.map +1 -1
  60. package/dist/jest/transformers/esm-transformer.js +1 -5
  61. package/dist/jest/transformers/esm-transformer.js.map +1 -1
  62. package/dist/jest/transformers/file-transform.js +2 -6
  63. package/dist/jest/transformers/file-transform.js.map +1 -1
  64. package/dist/prettier/prettier.config.js.map +1 -1
  65. package/dist/react.aspect.js +0 -5
  66. package/dist/react.aspect.js.map +1 -1
  67. package/dist/react.composition.js +0 -6
  68. package/dist/react.composition.js.map +1 -1
  69. package/dist/react.env.js +34 -143
  70. package/dist/react.env.js.map +1 -1
  71. package/dist/react.graphql.js +0 -6
  72. package/dist/react.graphql.js.map +1 -1
  73. package/dist/react.main.runtime.js +23 -152
  74. package/dist/react.main.runtime.js.map +1 -1
  75. package/dist/react.preview.runtime.js +0 -32
  76. package/dist/react.preview.runtime.js.map +1 -1
  77. package/dist/react.templates.js +0 -46
  78. package/dist/react.templates.js.map +1 -1
  79. package/dist/react.ui.runtime.js +0 -35
  80. package/dist/react.ui.runtime.js.map +1 -1
  81. package/dist/templates/react-app/files/app-plugin.js +0 -1
  82. package/dist/templates/react-app/files/app-plugin.js.map +1 -1
  83. package/dist/templates/react-app/files/app-root.js +0 -1
  84. package/dist/templates/react-app/files/app-root.js.map +1 -1
  85. package/dist/templates/react-app/files/app.js +0 -1
  86. package/dist/templates/react-app/files/app.js.map +1 -1
  87. package/dist/templates/react-app/files/compositions.js +0 -1
  88. package/dist/templates/react-app/files/compositions.js.map +1 -1
  89. package/dist/templates/react-app/files/doc.js +0 -1
  90. package/dist/templates/react-app/files/doc.js.map +1 -1
  91. package/dist/templates/react-app/files/index.js +0 -1
  92. package/dist/templates/react-app/files/index.js.map +1 -1
  93. package/dist/templates/react-app/index.js +0 -19
  94. package/dist/templates/react-app/index.js.map +1 -1
  95. package/dist/templates/react-component/files/component.js +0 -2
  96. package/dist/templates/react-component/files/component.js.map +1 -1
  97. package/dist/templates/react-component/files/composition.js +0 -2
  98. package/dist/templates/react-component/files/composition.js.map +1 -1
  99. package/dist/templates/react-component/files/docs.js +0 -2
  100. package/dist/templates/react-component/files/docs.js.map +1 -1
  101. package/dist/templates/react-component/files/index-file.js +0 -2
  102. package/dist/templates/react-component/files/index-file.js.map +1 -1
  103. package/dist/templates/react-component/files/test.js +0 -2
  104. package/dist/templates/react-component/files/test.js.map +1 -1
  105. package/dist/templates/react-component/index.js +0 -24
  106. package/dist/templates/react-component/index.js.map +1 -1
  107. package/dist/templates/react-component-js/files/component.js +0 -2
  108. package/dist/templates/react-component-js/files/component.js.map +1 -1
  109. package/dist/templates/react-component-js/files/composition.js +0 -2
  110. package/dist/templates/react-component-js/files/composition.js.map +1 -1
  111. package/dist/templates/react-component-js/files/docs.js +0 -2
  112. package/dist/templates/react-component-js/files/docs.js.map +1 -1
  113. package/dist/templates/react-component-js/files/test.js +0 -2
  114. package/dist/templates/react-component-js/files/test.js.map +1 -1
  115. package/dist/templates/react-component-js/index.js +0 -21
  116. package/dist/templates/react-component-js/index.js.map +1 -1
  117. package/dist/templates/react-context/files/composition.js +0 -2
  118. package/dist/templates/react-context/files/composition.js.map +1 -1
  119. package/dist/templates/react-context/files/context-provider.js +0 -2
  120. package/dist/templates/react-context/files/context-provider.js.map +1 -1
  121. package/dist/templates/react-context/files/context.js +0 -2
  122. package/dist/templates/react-context/files/context.js.map +1 -1
  123. package/dist/templates/react-context/files/docs.js +0 -2
  124. package/dist/templates/react-context/files/docs.js.map +1 -1
  125. package/dist/templates/react-context/files/index-file.js +0 -2
  126. package/dist/templates/react-context/files/index-file.js.map +1 -1
  127. package/dist/templates/react-context/files/test.js +0 -2
  128. package/dist/templates/react-context/files/test.js.map +1 -1
  129. package/dist/templates/react-context/index.js +0 -19
  130. package/dist/templates/react-context/index.js.map +1 -1
  131. package/dist/templates/react-env/files/aspect.js +0 -1
  132. package/dist/templates/react-env/files/aspect.js.map +1 -1
  133. package/dist/templates/react-env/files/doc.js +0 -1
  134. package/dist/templates/react-env/files/doc.js.map +1 -1
  135. package/dist/templates/react-env/files/index.js +0 -1
  136. package/dist/templates/react-env/files/index.js.map +1 -1
  137. package/dist/templates/react-env/files/jest.config.js +0 -1
  138. package/dist/templates/react-env/files/jest.config.js.map +1 -1
  139. package/dist/templates/react-env/files/main.runtime.js +0 -1
  140. package/dist/templates/react-env/files/main.runtime.js.map +1 -1
  141. package/dist/templates/react-env/files/preview.runtime.js +0 -1
  142. package/dist/templates/react-env/files/preview.runtime.js.map +1 -1
  143. package/dist/templates/react-env/files/typescript/styles.js +0 -1
  144. package/dist/templates/react-env/files/typescript/styles.js.map +1 -1
  145. package/dist/templates/react-env/files/typescript/ts-transformer.js +0 -1
  146. package/dist/templates/react-env/files/typescript/ts-transformer.js.map +1 -1
  147. package/dist/templates/react-env/files/typescript/typescript.config.js +0 -1
  148. package/dist/templates/react-env/files/typescript/typescript.config.js.map +1 -1
  149. package/dist/templates/react-env/files/webpack.config.js +0 -1
  150. package/dist/templates/react-env/files/webpack.config.js.map +1 -1
  151. package/dist/templates/react-env/index.js +0 -31
  152. package/dist/templates/react-env/index.js.map +1 -1
  153. package/dist/templates/react-hook/files/component.js +0 -2
  154. package/dist/templates/react-hook/files/component.js.map +1 -1
  155. package/dist/templates/react-hook/files/composition.js +0 -2
  156. package/dist/templates/react-hook/files/composition.js.map +1 -1
  157. package/dist/templates/react-hook/files/docs.js +0 -2
  158. package/dist/templates/react-hook/files/docs.js.map +1 -1
  159. package/dist/templates/react-hook/files/index-file.js +0 -2
  160. package/dist/templates/react-hook/files/index-file.js.map +1 -1
  161. package/dist/templates/react-hook/files/index-file.spec.js +0 -6
  162. package/dist/templates/react-hook/files/index-file.spec.js.map +1 -1
  163. package/dist/templates/react-hook/files/test.js +0 -2
  164. package/dist/templates/react-hook/files/test.js.map +1 -1
  165. package/dist/templates/react-hook/index.js +0 -16
  166. package/dist/templates/react-hook/index.js.map +1 -1
  167. package/dist/templates/react-workspace/index.js +2 -6
  168. package/dist/templates/react-workspace/index.js.map +1 -1
  169. package/dist/templates/react-workspace-analytics/index.js +0 -5
  170. package/dist/templates/react-workspace-analytics/index.js.map +1 -1
  171. package/dist/templates/react-workspace-app/index.js +2 -13
  172. package/dist/templates/react-workspace-app/index.js.map +1 -1
  173. package/dist/templates/react-workspace-blog/index.js +0 -5
  174. package/dist/templates/react-workspace-blog/index.js.map +1 -1
  175. package/dist/templates/react-workspace-data-fetching/index.js +0 -5
  176. package/dist/templates/react-workspace-data-fetching/index.js.map +1 -1
  177. package/dist/templates/react-workspace-deprecated/index.js +0 -5
  178. package/dist/templates/react-workspace-deprecated/index.js.map +1 -1
  179. package/dist/templates/react-workspace-design-system/index.js +0 -5
  180. package/dist/templates/react-workspace-design-system/index.js.map +1 -1
  181. package/dist/templates/react-workspace-lib/index.js +0 -5
  182. package/dist/templates/react-workspace-lib/index.js.map +1 -1
  183. package/dist/templates/react-workspace-wiki/index.js +0 -5
  184. package/dist/templates/react-workspace-wiki/index.js.map +1 -1
  185. package/dist/templates/workspace-common/constants.js.map +1 -1
  186. package/dist/templates/workspace-common/files/eslint-config.js.map +1 -1
  187. package/dist/templates/workspace-common/files/git-ignore.js +0 -1
  188. package/dist/templates/workspace-common/files/git-ignore.js.map +1 -1
  189. package/dist/templates/workspace-common/files/launch-json.js +0 -2
  190. package/dist/templates/workspace-common/files/launch-json.js.map +1 -1
  191. package/dist/templates/workspace-common/files/prettier-config.js.map +1 -1
  192. package/dist/templates/workspace-common/files/readme-file.js +0 -1
  193. package/dist/templates/workspace-common/files/readme-file.js.map +1 -1
  194. package/dist/templates/workspace-common/files/ts-config.js.map +1 -1
  195. package/dist/templates/workspace-common/files/types/asset.js.map +1 -1
  196. package/dist/templates/workspace-common/files/types/style.js.map +1 -1
  197. package/dist/templates/workspace-common/files/workspace-config.js +0 -14
  198. package/dist/templates/workspace-common/files/workspace-config.js.map +1 -1
  199. package/dist/templates/workspace-common/generate-files.js +0 -29
  200. package/dist/templates/workspace-common/generate-files.js.map +1 -1
  201. package/dist/templates/workspace-common/index.js +0 -3
  202. package/dist/templates/workspace-common/index.js.map +1 -1
  203. package/dist/webpack/html.js +3 -2
  204. package/dist/webpack/html.js.map +1 -1
  205. package/dist/webpack/index.js +0 -3
  206. package/dist/webpack/index.js.map +1 -1
  207. package/dist/webpack/overlay/formatWebpackMessages.js +26 -37
  208. package/dist/webpack/overlay/formatWebpackMessages.js.map +1 -1
  209. package/dist/webpack/overlay/launchEditorEndpoint.js +2 -2
  210. package/dist/webpack/overlay/launchEditorEndpoint.js.map +1 -1
  211. package/dist/webpack/overlay/refreshOverlayInterop.js +1 -3
  212. package/dist/webpack/overlay/refreshOverlayInterop.js.map +1 -1
  213. package/dist/webpack/overlay/webpackHotDevClient.js +54 -71
  214. package/dist/webpack/overlay/webpackHotDevClient.js.map +1 -1
  215. package/dist/webpack/postcss.config.js +6 -3
  216. package/dist/webpack/postcss.config.js.map +1 -1
  217. package/dist/webpack/webpack.config.base.js +28 -53
  218. package/dist/webpack/webpack.config.base.js.map +1 -1
  219. package/dist/webpack/webpack.config.base.prod.js +10 -14
  220. package/dist/webpack/webpack.config.base.prod.js.map +1 -1
  221. package/dist/webpack/webpack.config.component.dev.js +10 -17
  222. package/dist/webpack/webpack.config.component.dev.js.map +1 -1
  223. package/dist/webpack/webpack.config.component.prod.js +3 -6
  224. package/dist/webpack/webpack.config.component.prod.js.map +1 -1
  225. package/dist/webpack/webpack.config.env.dev.js +5 -5
  226. package/dist/webpack/webpack.config.env.dev.js.map +1 -1
  227. package/dist/webpack/webpack.config.env.template.js +0 -1
  228. package/dist/webpack/webpack.config.env.template.js.map +1 -1
  229. package/{overview-1666409808293.js → overview-1666496165706.js} +0 -0
  230. package/package-tar/teambit-react-0.0.882.tgz +0 -0
  231. package/package.json +25 -25
  232. package/{preview-1666409808293.js → preview-1666496165706.js} +2 -2
  233. package/artifacts/env-template/public/peers.df1b33444b47cc9becfc.js +0 -1
  234. package/artifacts/env-template/public/static/css/238.a0238c25.css +0 -1
  235. package/artifacts/env-template/public/static/css/compositions.6d8c7702.css +0 -1
  236. package/package-tar/teambit-react-0.0.881.tgz +0 -0
@@ -1,12 +1,10 @@
1
1
  "use strict";
2
2
 
3
3
  require("core-js/modules/es.regexp.exec.js");
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.launchJson = launchJson;
9
-
10
8
  function launchJson({
11
9
  defaultScope
12
10
  }) {
@@ -1 +1 @@
1
- {"version":3,"names":["launchJson","defaultScope","scopedRegistry","split"],"sources":["launch-json.ts"],"sourcesContent":["import { WorkspaceContext } from '@teambit/generator';\n\nexport function launchJson({ defaultScope }: WorkspaceContext) {\n const scopedRegistry = defaultScope ? `@${defaultScope.split('.')[0]}` : '@my-org';\n return `{\n // Use IntelliSense to learn about possible attributes.\n // Hover to view descriptions of existing attributes.\n // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387\n \"version\": \"0.2.0\",\n \"configurations\": [\n {\n \"type\": \"node\",\n \"request\": \"launch\",\n \"name\": \"test\",\n \"program\": \"\\${workspaceFolder}/node_modules/@teambit/bit/dist/app.js\",\n \"args\": [\"test\"],\n \"resolveSourceMapLocations\": [\n \"\\${workspaceFolder}/node_modules/${scopedRegistry}/**/*.js\"\n ],\n \"outFiles\": [\n \"\\${workspaceFolder}/node_modules/${scopedRegistry}/**/*.js\"\n ],\n \"console\": \"integratedTerminal\",\n \"sourceMaps\": true,\n \"internalConsoleOptions\": \"neverOpen\",\n \"cwd\": \"\\${workspaceFolder}\"\n }\n ]\n}`;\n}\n"],"mappings":";;;;;;;;;AAEO,SAASA,UAAT,CAAoB;EAAEC;AAAF,CAApB,EAAwD;EAC7D,MAAMC,cAAc,GAAGD,YAAY,GAAI,IAAGA,YAAY,CAACE,KAAb,CAAmB,GAAnB,EAAwB,CAAxB,CAA2B,EAAlC,GAAsC,SAAzE;EACA,OAAQ;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4CD,cAAe;AAC3D;AACA;AACA,4CAA4CA,cAAe;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAxBE;AAyBD"}
1
+ {"version":3,"names":["launchJson","defaultScope","scopedRegistry","split"],"sources":["launch-json.ts"],"sourcesContent":["import { WorkspaceContext } from '@teambit/generator';\n\nexport function launchJson({ defaultScope }: WorkspaceContext) {\n const scopedRegistry = defaultScope ? `@${defaultScope.split('.')[0]}` : '@my-org';\n return `{\n // Use IntelliSense to learn about possible attributes.\n // Hover to view descriptions of existing attributes.\n // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387\n \"version\": \"0.2.0\",\n \"configurations\": [\n {\n \"type\": \"node\",\n \"request\": \"launch\",\n \"name\": \"test\",\n \"program\": \"\\${workspaceFolder}/node_modules/@teambit/bit/dist/app.js\",\n \"args\": [\"test\"],\n \"resolveSourceMapLocations\": [\n \"\\${workspaceFolder}/node_modules/${scopedRegistry}/**/*.js\"\n ],\n \"outFiles\": [\n \"\\${workspaceFolder}/node_modules/${scopedRegistry}/**/*.js\"\n ],\n \"console\": \"integratedTerminal\",\n \"sourceMaps\": true,\n \"internalConsoleOptions\": \"neverOpen\",\n \"cwd\": \"\\${workspaceFolder}\"\n }\n ]\n}`;\n}\n"],"mappings":";;;;;;;AAEO,SAASA,UAAU,CAAC;EAAEC;AAA+B,CAAC,EAAE;EAC7D,MAAMC,cAAc,GAAGD,YAAY,GAAI,IAAGA,YAAY,CAACE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAE,EAAC,GAAG,SAAS;EAClF,OAAQ;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4CD,cAAe;AAC3D;AACA;AACA,4CAA4CA,cAAe;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF"}
@@ -1 +1 @@
1
- {"version":3,"names":["prettierConfig"],"sources":["prettier-config.ts"],"sourcesContent":["export const prettierConfig = `const baseConfig = require(\"@teambit/react/prettier/prettier.config\");\nmodule.exports = {\n ...baseConfig,\n};\n`;\n"],"mappings":";;;;;;AAAO,MAAMA,cAAc,GAAI;AAC/B;AACA;AACA;AACA,CAJO"}
1
+ {"version":3,"names":["prettierConfig"],"sources":["prettier-config.ts"],"sourcesContent":["export const prettierConfig = `const baseConfig = require(\"@teambit/react/prettier/prettier.config\");\nmodule.exports = {\n ...baseConfig,\n};\n`;\n"],"mappings":";;;;;;AAAO,MAAMA,cAAc,GAAI;AAC/B;AACA;AACA;AACA,CAAC;AAAC"}
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.readme = readme;
7
-
8
7
  function readme() {
9
8
  return `# Welcome to your Bit Workspace
10
9
 
@@ -1 +1 @@
1
- {"version":3,"names":["readme"],"sources":["readme-file.ts"],"sourcesContent":["export function readme() {\n return `# Welcome to your Bit Workspace\n\nTo get started straight away run \\`bit start\\` and open [localhost:3000](http://localhost:3000). It may take a while to build the first time you run this command as it is building the whole User Interface for your development environment.\n\n\\`\\`\\`bash\nbit start\n\\`\\`\\`\n\n## What's included\n\n- **workspace.jsonc**\n\nThis is the main configuration file of your bit workspace. Here you can modify the workspace name and icon as well as default directory and scope. It is where dependencies are found when you install anything. It is also where you register aspects, bit extensions as well as apply the environments for your components. This workspace has been setup so that all components use the React env. However you can create other components and apply other envs to them such as node, html, angular and aspect envs.\n\n- **.bitmap**\n\nThis is an auto-generated file and includes the mapping of your components. There is one component included here. In order to remove this component you can run the following command.\n\n\n- **Demo Components**\n\nA folder (unless the --empty flag was used) containing demo components are included in this workspace. These components are used to demonstrate the different features of Bit. If you would like to remove these components you can run the following command.\n\n\\`\\`\\`jsx\nbit remove \"ui/*\" --delete files\n\\`\\`\\`\n\nThis removes the components from the bitmap as well as removes the files.\n\n\n- **.gitignore**\n\nIgnoring any files from version control\n`;\n}\n"],"mappings":";;;;;;;AAAO,SAASA,MAAT,GAAkB;EACvB,OAAQ;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAjCE;AAkCD"}
1
+ {"version":3,"names":["readme"],"sources":["readme-file.ts"],"sourcesContent":["export function readme() {\n return `# Welcome to your Bit Workspace\n\nTo get started straight away run \\`bit start\\` and open [localhost:3000](http://localhost:3000). It may take a while to build the first time you run this command as it is building the whole User Interface for your development environment.\n\n\\`\\`\\`bash\nbit start\n\\`\\`\\`\n\n## What's included\n\n- **workspace.jsonc**\n\nThis is the main configuration file of your bit workspace. Here you can modify the workspace name and icon as well as default directory and scope. It is where dependencies are found when you install anything. It is also where you register aspects, bit extensions as well as apply the environments for your components. This workspace has been setup so that all components use the React env. However you can create other components and apply other envs to them such as node, html, angular and aspect envs.\n\n- **.bitmap**\n\nThis is an auto-generated file and includes the mapping of your components. There is one component included here. In order to remove this component you can run the following command.\n\n\n- **Demo Components**\n\nA folder (unless the --empty flag was used) containing demo components are included in this workspace. These components are used to demonstrate the different features of Bit. If you would like to remove these components you can run the following command.\n\n\\`\\`\\`jsx\nbit remove \"ui/*\" --delete files\n\\`\\`\\`\n\nThis removes the components from the bitmap as well as removes the files.\n\n\n- **.gitignore**\n\nIgnoring any files from version control\n`;\n}\n"],"mappings":";;;;;;AAAO,SAASA,MAAM,GAAG;EACvB,OAAQ;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD"}
@@ -1 +1 @@
1
- {"version":3,"names":["tsConfig"],"sources":["ts-config.ts"],"sourcesContent":["export const tsConfig = `{\n \"extends\": \"./node_modules/@teambit/react/typescript/tsconfig.json\",\n // \"include\": [],\n \"compilerOptions\": {\n \"noEmit\": true\n },\n \"exclude\": [\n \"dist\"\n ]\n}`;\n"],"mappings":";;;;;;AAAO,MAAMA,QAAQ,GAAI;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EATO"}
1
+ {"version":3,"names":["tsConfig"],"sources":["ts-config.ts"],"sourcesContent":["export const tsConfig = `{\n \"extends\": \"./node_modules/@teambit/react/typescript/tsconfig.json\",\n // \"include\": [],\n \"compilerOptions\": {\n \"noEmit\": true\n },\n \"exclude\": [\n \"dist\"\n ]\n}`;\n"],"mappings":";;;;;;AAAO,MAAMA,QAAQ,GAAI;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AAAC"}
@@ -1 +1 @@
1
- {"version":3,"names":["assetTypes"],"sources":["asset.ts"],"sourcesContent":["export const assetTypes = `declare module '*.png' {\n const value: any;\n export = value;\n}\ndeclare module '*.svg' {\n import type { FunctionComponent, SVGProps } from 'react';\n\n export const ReactComponent: FunctionComponent<SVGProps<SVGSVGElement> & { title?: string }>;\n const src: string;\n export default src;\n}\ndeclare module '*.jpg' {\n const value: any;\n export = value;\n}\ndeclare module '*.jpeg' {\n const value: any;\n export = value;\n}\ndeclare module '*.gif' {\n const value: any;\n export = value;\n}\ndeclare module '*.bmp' {\n const value: any;\n export = value;\n}\n`;\n"],"mappings":";;;;;;AAAO,MAAMA,UAAU,GAAI;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CA3BO"}
1
+ {"version":3,"names":["assetTypes"],"sources":["asset.ts"],"sourcesContent":["export const assetTypes = `declare module '*.png' {\n const value: any;\n export = value;\n}\ndeclare module '*.svg' {\n import type { FunctionComponent, SVGProps } from 'react';\n\n export const ReactComponent: FunctionComponent<SVGProps<SVGSVGElement> & { title?: string }>;\n const src: string;\n export default src;\n}\ndeclare module '*.jpg' {\n const value: any;\n export = value;\n}\ndeclare module '*.jpeg' {\n const value: any;\n export = value;\n}\ndeclare module '*.gif' {\n const value: any;\n export = value;\n}\ndeclare module '*.bmp' {\n const value: any;\n export = value;\n}\n`;\n"],"mappings":";;;;;;AAAO,MAAMA,UAAU,GAAI;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAAC"}
@@ -1 +1 @@
1
- {"version":3,"names":["styleTypes"],"sources":["style.ts"],"sourcesContent":["export const styleTypes = `declare module '*.module.css' {\n const classes: { readonly [key: string]: string };\n export default classes;\n}\ndeclare module '*.module.scss' {\n const classes: { readonly [key: string]: string };\n export default classes;\n}\ndeclare module '*.module.sass' {\n const classes: { readonly [key: string]: string };\n export default classes;\n}\n\ndeclare module '*.module.less' {\n const classes: { readonly [key: string]: string };\n export default classes;\n}\n\ndeclare module '*.less' {\n const classes: { readonly [key: string]: string };\n export default classes;\n}\n\ndeclare module '*.css' {\n const classes: { readonly [key: string]: string };\n export default classes;\n}\n\ndeclare module '*.sass' {\n const classes: { readonly [key: string]: string };\n export default classes;\n}\n\ndeclare module '*.scss' {\n const classes: { readonly [key: string]: string };\n export default classes;\n}\n\ndeclare module '*.mdx' {\n const component: any;\n export default component;\n}\n`;\n"],"mappings":";;;;;;AAAO,MAAMA,UAAU,GAAI;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CA1CO"}
1
+ {"version":3,"names":["styleTypes"],"sources":["style.ts"],"sourcesContent":["export const styleTypes = `declare module '*.module.css' {\n const classes: { readonly [key: string]: string };\n export default classes;\n}\ndeclare module '*.module.scss' {\n const classes: { readonly [key: string]: string };\n export default classes;\n}\ndeclare module '*.module.sass' {\n const classes: { readonly [key: string]: string };\n export default classes;\n}\n\ndeclare module '*.module.less' {\n const classes: { readonly [key: string]: string };\n export default classes;\n}\n\ndeclare module '*.less' {\n const classes: { readonly [key: string]: string };\n export default classes;\n}\n\ndeclare module '*.css' {\n const classes: { readonly [key: string]: string };\n export default classes;\n}\n\ndeclare module '*.sass' {\n const classes: { readonly [key: string]: string };\n export default classes;\n}\n\ndeclare module '*.scss' {\n const classes: { readonly [key: string]: string };\n export default classes;\n}\n\ndeclare module '*.mdx' {\n const component: any;\n export default component;\n}\n`;\n"],"mappings":";;;;;;AAAO,MAAMA,UAAU,GAAI;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAAC"}
@@ -1,48 +1,36 @@
1
1
  "use strict";
2
2
 
3
3
  require("core-js/modules/es.promise.js");
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.workspaceConfig = workspaceConfig;
9
-
10
8
  function _config() {
11
9
  const data = require("@teambit/config");
12
-
13
10
  _config = function () {
14
11
  return data;
15
12
  };
16
-
17
13
  return data;
18
14
  }
19
-
20
15
  function _commentJson() {
21
16
  const data = require("comment-json");
22
-
23
17
  _commentJson = function () {
24
18
  return data;
25
19
  };
26
-
27
20
  return data;
28
21
  }
29
-
30
22
  function _constants() {
31
23
  const data = require("../constants");
32
-
33
24
  _constants = function () {
34
25
  return data;
35
26
  };
36
-
37
27
  return data;
38
28
  }
39
-
40
29
  async function workspaceConfig({
41
30
  name,
42
31
  defaultScope
43
32
  }, extraConfig) {
44
33
  const scope = defaultScope || _constants().DEFAULT_SCOPE_NAME;
45
-
46
34
  const configParsed = await (0, _config().getWorkspaceConfigTemplateParsed)();
47
35
  configParsed['teambit.workspace/workspace'].name = name;
48
36
  configParsed['teambit.workspace/workspace'].defaultScope = scope;
@@ -68,11 +56,9 @@ async function workspaceConfig({
68
56
  'teambit.workspace/variants': (0, _commentJson().parse)(`{}`)
69
57
  };
70
58
  let configMerged = (0, _commentJson().assign)(configParsed, variants);
71
-
72
59
  if (extraConfig) {
73
60
  configMerged = (0, _commentJson().assign)(configMerged, extraConfig);
74
61
  }
75
-
76
62
  return (0, _config().stringifyWorkspaceConfig)(configMerged);
77
63
  }
78
64
 
@@ -1 +1 @@
1
- {"version":3,"names":["workspaceConfig","name","defaultScope","extraConfig","scope","DEFAULT_SCOPE_NAME","configParsed","getWorkspaceConfigTemplateParsed","packageManager","policy","dependencies","peerDependencies","react","variants","parse","configMerged","assign","stringifyWorkspaceConfig"],"sources":["workspace-config.ts"],"sourcesContent":["import { WorkspaceContext } from '@teambit/generator';\nimport { getWorkspaceConfigTemplateParsed, stringifyWorkspaceConfig } from '@teambit/config';\nimport { parse, assign } from 'comment-json';\nimport { DEFAULT_SCOPE_NAME } from '../constants';\n\nexport async function workspaceConfig({ name, defaultScope }: WorkspaceContext, extraConfig?: Record<string, any>) {\n const scope = defaultScope || DEFAULT_SCOPE_NAME;\n const configParsed = await getWorkspaceConfigTemplateParsed();\n configParsed['teambit.workspace/workspace'].name = name;\n configParsed['teambit.workspace/workspace'].defaultScope = scope;\n configParsed['teambit.dependencies/dependency-resolver'].packageManager = 'teambit.dependencies/pnpm';\n configParsed['teambit.dependencies/dependency-resolver'].policy = {\n dependencies: {\n '@teambit/eslint-config-bit-react': '~0.0.367',\n '@typescript-eslint/eslint-plugin': '4.29.3',\n 'eslint-import-resolver-node': '0.3.6',\n 'eslint-plugin-import': '2.22.1',\n 'eslint-plugin-jest': '24.4.0',\n 'eslint-plugin-jsx-a11y': '6.4.1',\n 'eslint-plugin-mdx': '1.15.0',\n 'eslint-plugin-react': '7.25.1',\n },\n peerDependencies: {\n '@testing-library/react': '^12.1.5',\n react: '17.0.2',\n 'react-dom': '17.0.2',\n },\n };\n\n const variants = {\n 'teambit.workspace/variants': parse(`{}`),\n };\n\n let configMerged = assign(configParsed, variants);\n\n if (extraConfig) {\n configMerged = assign(configMerged, extraConfig);\n }\n\n return stringifyWor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["workspaceConfig","name","defaultScope","extraConfig","scope","DEFAULT_SCOPE_NAME","configParsed","getWorkspaceConfigTemplateParsed","packageManager","policy","dependencies","peerDependencies","react","variants","parse","configMerged","assign","stringifyWorkspaceConfig"],"sources":["workspace-config.ts"],"sourcesContent":["import { WorkspaceContext } from '@teambit/generator';\nimport { getWorkspaceConfigTemplateParsed, stringifyWorkspaceConfig } from '@teambit/config';\nimport { parse, assign } from 'comment-json';\nimport { DEFAULT_SCOPE_NAME } from '../constants';\n\nexport async function workspaceConfig({ name, defaultScope }: WorkspaceContext, extraConfig?: Record<string, any>) {\n const scope = defaultScope || DEFAULT_SCOPE_NAME;\n const configParsed = await getWorkspaceConfigTemplateParsed();\n configParsed['teambit.workspace/workspace'].name = name;\n configParsed['teambit.workspace/workspace'].defaultScope = scope;\n configParsed['teambit.dependencies/dependency-resolver'].packageManager = 'teambit.dependencies/pnpm';\n configParsed['teambit.dependencies/dependency-resolver'].policy = {\n dependencies: {\n '@teambit/eslint-config-bit-react': '~0.0.367',\n '@typescript-eslint/eslint-plugin': '4.29.3',\n 'eslint-import-resolver-node': '0.3.6',\n 'eslint-plugin-import': '2.22.1',\n 'eslint-plugin-jest': '24.4.0',\n 'eslint-plugin-jsx-a11y': '6.4.1',\n 'eslint-plugin-mdx': '1.15.0',\n 'eslint-plugin-react': '7.25.1',\n },\n peerDependencies: {\n '@testing-library/react': '^12.1.5',\n react: '17.0.2',\n 'react-dom': '17.0.2',\n },\n };\n\n const variants = {\n 'teambit.workspace/variants': parse(`{}`),\n };\n\n let configMerged = assign(configParsed, variants);\n\n if (extraConfig) {\n configMerged = assign(configMerged, extraConfig);\n }\n\n return stringifyWorkspaceConfig(configMerged);\n}\n"],"mappings":";;;;;;;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEO,eAAeA,eAAe,CAAC;EAAEC,IAAI;EAAEC;AAA+B,CAAC,EAAEC,WAAiC,EAAE;EACjH,MAAMC,KAAK,GAAGF,YAAY,IAAIG,+BAAkB;EAChD,MAAMC,YAAY,GAAG,MAAM,IAAAC,0CAAgC,GAAE;EAC7DD,YAAY,CAAC,6BAA6B,CAAC,CAACL,IAAI,GAAGA,IAAI;EACvDK,YAAY,CAAC,6BAA6B,CAAC,CAACJ,YAAY,GAAGE,KAAK;EAChEE,YAAY,CAAC,0CAA0C,CAAC,CAACE,cAAc,GAAG,2BAA2B;EACrGF,YAAY,CAAC,0CAA0C,CAAC,CAACG,MAAM,GAAG;IAChEC,YAAY,EAAE;MACZ,kCAAkC,EAAE,UAAU;MAC9C,kCAAkC,EAAE,QAAQ;MAC5C,6BAA6B,EAAE,OAAO;MACtC,sBAAsB,EAAE,QAAQ;MAChC,oBAAoB,EAAE,QAAQ;MAC9B,wBAAwB,EAAE,OAAO;MACjC,mBAAmB,EAAE,QAAQ;MAC7B,qBAAqB,EAAE;IACzB,CAAC;IACDC,gBAAgB,EAAE;MAChB,wBAAwB,EAAE,SAAS;MACnCC,KAAK,EAAE,QAAQ;MACf,WAAW,EAAE;IACf;EACF,CAAC;EAED,MAAMC,QAAQ,GAAG;IACf,4BAA4B,EAAE,IAAAC,oBAAK,EAAE,IAAG;EAC1C,CAAC;EAED,IAAIC,YAAY,GAAG,IAAAC,qBAAM,EAACV,YAAY,EAAEO,QAAQ,CAAC;EAEjD,IAAIV,WAAW,EAAE;IACfY,YAAY,GAAG,IAAAC,qBAAM,EAACD,YAAY,EAAEZ,WAAW,CAAC;EAClD;EAEA,OAAO,IAAAc,kCAAwB,EAACF,YAAY,CAAC;AAC/C"}
@@ -1,102 +1,73 @@
1
1
  "use strict";
2
2
 
3
3
  require("core-js/modules/es.promise.js");
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.generateFiles = generateFiles;
9
-
10
8
  function _workspaceConfig() {
11
9
  const data = require("./files/workspace-config");
12
-
13
10
  _workspaceConfig = function () {
14
11
  return data;
15
12
  };
16
-
17
13
  return data;
18
14
  }
19
-
20
15
  function _readmeFile() {
21
16
  const data = require("./files/readme-file");
22
-
23
17
  _readmeFile = function () {
24
18
  return data;
25
19
  };
26
-
27
20
  return data;
28
21
  }
29
-
30
22
  function _gitIgnore() {
31
23
  const data = require("./files/git-ignore");
32
-
33
24
  _gitIgnore = function () {
34
25
  return data;
35
26
  };
36
-
37
27
  return data;
38
28
  }
39
-
40
29
  function _asset() {
41
30
  const data = require("./files/types/asset");
42
-
43
31
  _asset = function () {
44
32
  return data;
45
33
  };
46
-
47
34
  return data;
48
35
  }
49
-
50
36
  function _style() {
51
37
  const data = require("./files/types/style");
52
-
53
38
  _style = function () {
54
39
  return data;
55
40
  };
56
-
57
41
  return data;
58
42
  }
59
-
60
43
  function _eslintConfig() {
61
44
  const data = require("./files/eslint-config");
62
-
63
45
  _eslintConfig = function () {
64
46
  return data;
65
47
  };
66
-
67
48
  return data;
68
49
  }
69
-
70
50
  function _tsConfig() {
71
51
  const data = require("./files/ts-config");
72
-
73
52
  _tsConfig = function () {
74
53
  return data;
75
54
  };
76
-
77
55
  return data;
78
56
  }
79
-
80
57
  function _prettierConfig() {
81
58
  const data = require("./files/prettier-config");
82
-
83
59
  _prettierConfig = function () {
84
60
  return data;
85
61
  };
86
-
87
62
  return data;
88
63
  }
89
-
90
64
  function _launchJson() {
91
65
  const data = require("./files/launch-json");
92
-
93
66
  _launchJson = function () {
94
67
  return data;
95
68
  };
96
-
97
69
  return data;
98
70
  }
99
-
100
71
  async function generateFiles(context, extraConfig) {
101
72
  return [{
102
73
  relativePath: 'workspace.jsonc',
@@ -1 +1 @@
1
- {"version":3,"names":["generateFiles","context","extraConfig","relativePath","content","workspaceConfig","gitIgnore","launchJson","readme","eslintConfig","tsConfig","prettierConfig","assetTypes","styleTypes"],"sources":["generate-files.ts"],"sourcesContent":["import { WorkspaceContext } from '@teambit/generator';\nimport { workspaceConfig } from './files/workspace-config';\nimport { readme } from './files/readme-file';\nimport { gitIgnore } from './files/git-ignore';\nimport { assetTypes } from './files/types/asset';\nimport { styleTypes } from './files/types/style';\nimport { eslintConfig } from './files/eslint-config';\nimport { tsConfig } from './files/ts-config';\nimport { prettierConfig } from './files/prettier-config';\nimport { launchJson } from './files/launch-json';\n\ntype GeneratedFile = {\n relativePath: string;\n content: string;\n};\n\nexport async function generateFiles(\n context: WorkspaceContext,\n extraConfig?: Record<string, any>\n): Promise<GeneratedFile[]> {\n return [\n {\n relativePath: 'workspace.jsonc',\n content: await workspaceConfig(context, extraConfig),\n },\n {\n relativePath: `.gitignore`,\n content: gitIgnore(),\n },\n {\n relativePath: '.vscode/launch.json',\n content: launchJson(context),\n },\n {\n relativePath: `README.md`,\n content: readme(),\n },\n {\n relativePath: `.eslintrc.js`,\n content: eslintConfig,\n },\n {\n relativePath: `tsconfig.json`,\n content: tsConfig,\n },\n {\n relativePath: `.prettierrc.js`,\n content: prettierConfig,\n },\n {\n relativePath: `types/asset.d.ts`,\n content: assetTypes,\n },\n {\n relativePath: `types/style.d.ts`,\n content: styleTypes,\n },\n ];\n}\n"],"mappings":";;;;;;;;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAOO,eAAeA,aAAf,CACLC,OADK,EAELC,WAFK,EAGqB;EAC1B,OAAO,CACL;IACEC,YAAY,EAAE,iBADhB;IAEEC,OAAO,EAAE,MAAM,IAAAC,kCAAA,EAAgBJ,OAAhB,EAAyBC,WAAzB;EAFjB,CADK,EAKL;IACEC,YAAY,EAAG,YADjB;IAEEC,OAAO,EAAE,IAAAE,sBAAA;EAFX,CALK,EASL;IACEH,YAAY,EAAE,qBADhB;IAEEC,OAAO,EAAE,IAAAG,wBAAA,EAAWN,OAAX;EAFX,CATK,EAaL;IACEE,YAAY,EAAG,WADjB;IAEEC,OAAO,EAAE,IAAAI,oBAAA;EAFX,CAbK,EAiBL;IACEL,YAAY,EAAG,cADjB;IAEEC,OAAO,EAAEK;EAFX,CAjBK,EAqBL;IACEN,YAAY,EAAG,eADjB;IAEEC,OAAO,EAAEM;EAFX,CArBK,EAyBL;IACEP,YAAY,EAAG,gBADjB;IAEEC,OAAO,EAAEO;EAFX,CAzBK,EA6BL;IACER,YAAY,EAAG,kBADjB;IAEEC,OAAO,EAAEQ;EAFX,CA7BK,EAiCL;IACET,YAAY,EAAG,kBADjB;IAEEC,OAAO,EAAES;EAFX,CAjCK,CAAP;AAsCD"}
1
+ {"version":3,"names":["generateFiles","context","extraConfig","relativePath","content","workspaceConfig","gitIgnore","launchJson","readme","eslintConfig","tsConfig","prettierConfig","assetTypes","styleTypes"],"sources":["generate-files.ts"],"sourcesContent":["import { WorkspaceContext } from '@teambit/generator';\nimport { workspaceConfig } from './files/workspace-config';\nimport { readme } from './files/readme-file';\nimport { gitIgnore } from './files/git-ignore';\nimport { assetTypes } from './files/types/asset';\nimport { styleTypes } from './files/types/style';\nimport { eslintConfig } from './files/eslint-config';\nimport { tsConfig } from './files/ts-config';\nimport { prettierConfig } from './files/prettier-config';\nimport { launchJson } from './files/launch-json';\n\ntype GeneratedFile = {\n relativePath: string;\n content: string;\n};\n\nexport async function generateFiles(\n context: WorkspaceContext,\n extraConfig?: Record<string, any>\n): Promise<GeneratedFile[]> {\n return [\n {\n relativePath: 'workspace.jsonc',\n content: await workspaceConfig(context, extraConfig),\n },\n {\n relativePath: `.gitignore`,\n content: gitIgnore(),\n },\n {\n relativePath: '.vscode/launch.json',\n content: launchJson(context),\n },\n {\n relativePath: `README.md`,\n content: readme(),\n },\n {\n relativePath: `.eslintrc.js`,\n content: eslintConfig,\n },\n {\n relativePath: `tsconfig.json`,\n content: tsConfig,\n },\n {\n relativePath: `.prettierrc.js`,\n content: prettierConfig,\n },\n {\n relativePath: `types/asset.d.ts`,\n content: assetTypes,\n },\n {\n relativePath: `types/style.d.ts`,\n content: styleTypes,\n },\n ];\n}\n"],"mappings":";;;;;;;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAOO,eAAeA,aAAa,CACjCC,OAAyB,EACzBC,WAAiC,EACP;EAC1B,OAAO,CACL;IACEC,YAAY,EAAE,iBAAiB;IAC/BC,OAAO,EAAE,MAAM,IAAAC,kCAAe,EAACJ,OAAO,EAAEC,WAAW;EACrD,CAAC,EACD;IACEC,YAAY,EAAG,YAAW;IAC1BC,OAAO,EAAE,IAAAE,sBAAS;EACpB,CAAC,EACD;IACEH,YAAY,EAAE,qBAAqB;IACnCC,OAAO,EAAE,IAAAG,wBAAU,EAACN,OAAO;EAC7B,CAAC,EACD;IACEE,YAAY,EAAG,WAAU;IACzBC,OAAO,EAAE,IAAAI,oBAAM;EACjB,CAAC,EACD;IACEL,YAAY,EAAG,cAAa;IAC5BC,OAAO,EAAEK;EACX,CAAC,EACD;IACEN,YAAY,EAAG,eAAc;IAC7BC,OAAO,EAAEM;EACX,CAAC,EACD;IACEP,YAAY,EAAG,gBAAe;IAC9BC,OAAO,EAAEO;EACX,CAAC,EACD;IACER,YAAY,EAAG,kBAAiB;IAChCC,OAAO,EAAEQ;EACX,CAAC,EACD;IACET,YAAY,EAAG,kBAAiB;IAChCC,OAAO,EAAES;EACX,CAAC,CACF;AACH"}
@@ -9,14 +9,11 @@ Object.defineProperty(exports, "generateFiles", {
9
9
  return _generateFiles().generateFiles;
10
10
  }
11
11
  });
12
-
13
12
  function _generateFiles() {
14
13
  const data = require("./generate-files");
15
-
16
14
  _generateFiles = function () {
17
15
  return data;
18
16
  };
19
-
20
17
  return data;
21
18
  }
22
19
 
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { generateFiles } from './generate-files';\n"],"mappings":";;;;;;;;;;;;AAAA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA"}
1
+ {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { generateFiles } from './generate-files';\n"],"mappings":";;;;;;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA"}
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.html = html;
7
-
8
7
  /** html template for Previews (docs, compositions, etc) */
9
8
  function html(title) {
10
9
  return `
@@ -26,6 +25,8 @@ function html(title) {
26
25
  </body>
27
26
  </html>
28
27
  `;
29
- } // <style> html { height: 100%; } body { margin: 0; height: 100%; } #root { height: 100%; } </style>
28
+ }
29
+
30
+ // <style> html { height: 100%; } body { margin: 0; height: 100%; } #root { height: 100%; } </style>
30
31
 
31
32
  //# sourceMappingURL=html.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["html","title"],"sources":["html.ts"],"sourcesContent":["/** html template for Previews (docs, compositions, etc) */\nexport function html(title: string) {\n return `\n <!DOCTYPE html>\n <html lang=\"en\">\n <head>\n <meta charset=\"utf-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <title>${title}</title>\n <script>\n // Allow to use react dev-tools inside the examples\n try { window.__REACT_DEVTOOLS_GLOBAL_HOOK__ = window.parent.__REACT_DEVTOOLS_GLOBAL_HOOK__; } catch {}\n </script>\n <!-- minimal css resets -->\n <style> body { margin: 0; } </style>\n </head>\n <body>\n <div id=\"root\"></div>\n </body>\n </html>\n `;\n}\n\n// <style> html { height: 100%; } body { margin: 0; height: 100%; } #root { height: 100%; } </style>\n"],"mappings":";;;;;;;AAAA;AACO,SAASA,IAAT,CAAcC,KAAd,EAA6B;EAClC,OAAQ;AACV;AACA;AACA;AACA;AACA;AACA,eAAeA,KAAM;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAlBE;AAmBD,C,CAED"}
1
+ {"version":3,"names":["html","title"],"sources":["html.ts"],"sourcesContent":["/** html template for Previews (docs, compositions, etc) */\nexport function html(title: string) {\n return `\n <!DOCTYPE html>\n <html lang=\"en\">\n <head>\n <meta charset=\"utf-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <title>${title}</title>\n <script>\n // Allow to use react dev-tools inside the examples\n try { window.__REACT_DEVTOOLS_GLOBAL_HOOK__ = window.parent.__REACT_DEVTOOLS_GLOBAL_HOOK__; } catch {}\n </script>\n <!-- minimal css resets -->\n <style> body { margin: 0; } </style>\n </head>\n <body>\n <div id=\"root\"></div>\n </body>\n </html>\n `;\n}\n\n// <style> html { height: 100%; } body { margin: 0; height: 100%; } #root { height: 100%; } </style>\n"],"mappings":";;;;;;AAAA;AACO,SAASA,IAAI,CAACC,KAAa,EAAE;EAClC,OAAQ;AACV;AACA;AACA;AACA;AACA;AACA,eAAeA,KAAM;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA"}
@@ -9,14 +9,11 @@ Object.defineProperty(exports, "html", {
9
9
  return _html().html;
10
10
  }
11
11
  });
12
-
13
12
  function _html() {
14
13
  const data = require("./html");
15
-
16
14
  _html = function () {
17
15
  return data;
18
16
  };
19
-
20
17
  return data;
21
18
  }
22
19
 
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { html } from './html';\n"],"mappings":";;;;;;;;;;;;AAAA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA"}
1
+ {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { html } from './html';\n"],"mappings":";;;;;;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA"}
@@ -1,31 +1,25 @@
1
1
  /* eslint-disable */
2
-
3
2
  /**
4
3
  * Copyright (c) 2015-present, Facebook, Inc.
5
4
  *
6
5
  * This source code is licensed under the MIT license found in the
7
6
  * LICENSE file in the root directory of this source tree.
8
7
  */
8
+
9
9
  'use strict';
10
10
 
11
11
  require("core-js/modules/es.array.iterator.js");
12
-
13
12
  require("core-js/modules/es.regexp.exec.js");
14
-
15
13
  require("core-js/modules/es.string.replace.js");
16
-
17
14
  require("core-js/modules/es.string.trim.js");
18
-
19
15
  const friendlySyntaxErrorLabel = 'Syntax error:';
20
-
21
16
  function isLikelyASyntaxError(message) {
22
17
  return message.indexOf(friendlySyntaxErrorLabel) !== -1;
23
- } // Cleans up webpack error messages.
24
-
18
+ }
25
19
 
20
+ // Cleans up webpack error messages.
26
21
  function formatMessage(message) {
27
22
  let lines = [];
28
-
29
23
  if (typeof message === 'string') {
30
24
  lines = message.split('\n');
31
25
  } else if ('message' in message) {
@@ -36,66 +30,64 @@ function formatMessage(message) {
36
30
  lines = message['message'].split('\n');
37
31
  }
38
32
  });
39
- } // Strip webpack-added headers off errors/warnings
40
- // https://github.com/webpack/webpack/blob/master/lib/ModuleError.js
33
+ }
41
34
 
35
+ // Strip webpack-added headers off errors/warnings
36
+ // https://github.com/webpack/webpack/blob/master/lib/ModuleError.js
37
+ lines = lines.filter(line => !/Module [A-z ]+\(from/.test(line));
42
38
 
43
- lines = lines.filter(line => !/Module [A-z ]+\(from/.test(line)); // Transform parsing error into syntax error
39
+ // Transform parsing error into syntax error
44
40
  // TODO: move this to our ESLint formatter?
45
-
46
41
  lines = lines.map(line => {
47
42
  const parsingError = /Line (\d+):(?:(\d+):)?\s*Parsing error: (.+)$/.exec(line);
48
-
49
43
  if (!parsingError) {
50
44
  return line;
51
45
  }
52
-
53
46
  const [, errorLine, errorColumn, errorMessage] = parsingError;
54
47
  return `${friendlySyntaxErrorLabel} ${errorMessage} (${errorLine}:${errorColumn})`;
55
48
  });
56
- message = lines.join('\n'); // Smoosh syntax errors (commonly found in CSS)
57
-
58
- message = message.replace(/SyntaxError\s+\((\d+):(\d+)\)\s*(.+?)\n/g, `${friendlySyntaxErrorLabel} $3 ($1:$2)\n`); // Clean up export errors
59
-
49
+ message = lines.join('\n');
50
+ // Smoosh syntax errors (commonly found in CSS)
51
+ message = message.replace(/SyntaxError\s+\((\d+):(\d+)\)\s*(.+?)\n/g, `${friendlySyntaxErrorLabel} $3 ($1:$2)\n`);
52
+ // Clean up export errors
60
53
  message = message.replace(/^.*export '(.+?)' was not found in '(.+?)'.*$/gm, `Attempted import error: '$1' is not exported from '$2'.`);
61
54
  message = message.replace(/^.*export 'default' \(imported as '(.+?)'\) was not found in '(.+?)'.*$/gm, `Attempted import error: '$2' does not contain a default export (imported as '$1').`);
62
55
  message = message.replace(/^.*export '(.+?)' \(imported as '(.+?)'\) was not found in '(.+?)'.*$/gm, `Attempted import error: '$1' is not exported from '$3' (imported as '$2').`);
63
- lines = message.split('\n'); // Remove leading newline
56
+ lines = message.split('\n');
64
57
 
58
+ // Remove leading newline
65
59
  if (lines.length > 2 && lines[1].trim() === '') {
66
60
  lines.splice(1, 1);
67
- } // Clean up file name
68
-
69
-
70
- lines[0] = lines[0].replace(/^(.*) \d+:\d+-\d+$/, '$1'); // Cleans up verbose "module not found" messages for files and packages.
61
+ }
62
+ // Clean up file name
63
+ lines[0] = lines[0].replace(/^(.*) \d+:\d+-\d+$/, '$1');
71
64
 
65
+ // Cleans up verbose "module not found" messages for files and packages.
72
66
  if (lines[1] && lines[1].indexOf('Module not found: ') === 0) {
73
67
  lines = [lines[0], lines[1].replace('Error: ', '').replace('Module not found: Cannot find file:', 'Cannot find file:')];
74
- } // Add helpful message for users trying to use Sass for the first time
75
-
68
+ }
76
69
 
70
+ // Add helpful message for users trying to use Sass for the first time
77
71
  if (lines[1] && lines[1].match(/Cannot find module.+sass/)) {
78
72
  lines[1] = 'To import Sass files, you first need to install sass.\n';
79
73
  lines[1] += 'Run `bit install sass` inside your workspace.';
80
74
  }
81
-
82
- message = lines.join('\n'); // Internal stacks are generally useless so we strip them... with the
75
+ message = lines.join('\n');
76
+ // Internal stacks are generally useless so we strip them... with the
83
77
  // exception of stacks containing `webpack:` because they're normally
84
78
  // from user code generated by webpack. For more information see
85
79
  // https://github.com/facebook/create-react-app/pull/1050
86
-
87
80
  message = message.replace(/^\s*at\s((?!webpack:).)*:\d+:\d+[\s)]*(\n|$)/gm, ''); // at ... ...:x:y
88
-
89
81
  message = message.replace(/^\s*at\s<anonymous>(\n|$)/gm, ''); // at <anonymous>
82
+ lines = message.split('\n');
90
83
 
91
- lines = message.split('\n'); // Remove duplicated newlines
92
-
93
- lines = lines.filter((line, index, arr) => index === 0 || line.trim() !== '' || line.trim() !== arr[index - 1].trim()); // Reassemble the message
84
+ // Remove duplicated newlines
85
+ lines = lines.filter((line, index, arr) => index === 0 || line.trim() !== '' || line.trim() !== arr[index - 1].trim());
94
86
 
87
+ // Reassemble the message
95
88
  message = lines.join('\n');
96
89
  return message.trim();
97
90
  }
98
-
99
91
  function formatWebpackMessages(json) {
100
92
  const formattedErrors = json.errors.map(formatMessage);
101
93
  const formattedWarnings = json.warnings.map(formatMessage);
@@ -103,15 +95,12 @@ function formatWebpackMessages(json) {
103
95
  errors: formattedErrors,
104
96
  warnings: formattedWarnings
105
97
  };
106
-
107
98
  if (result.errors.some(isLikelyASyntaxError)) {
108
99
  // If there are any syntax errors, show just them.
109
100
  result.errors = result.errors.filter(isLikelyASyntaxError);
110
101
  }
111
-
112
102
  return result;
113
103
  }
114
-
115
104
  module.exports = formatWebpackMessages;
116
105
 
117
106
  //# sourceMappingURL=formatWebpackMessages.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["friendlySyntaxErrorLabel","isLikelyASyntaxError","message","indexOf","formatMessage","lines","split","Array","isArray","forEach","filter","line","test","map","parsingError","exec","errorLine","errorColumn","errorMessage","join","replace","length","trim","splice","match","index","arr","formatWebpackMessages","json","formattedErrors","errors","formattedWarnings","warnings","result","some","module","exports"],"sources":["formatWebpackMessages.js"],"sourcesContent":["/* eslint-disable */\n/**\n * Copyright (c) 2015-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nconst friendlySyntaxErrorLabel = 'Syntax error:';\n\nfunction isLikelyASyntaxError(message) {\n return message.indexOf(friendlySyntaxErrorLabel) !== -1;\n}\n\n// Cleans up webpack error messages.\nfunction formatMessage(message) {\n let lines = [];\n\n if (typeof message === 'string') {\n lines = message.split('\\n');\n } else if ('message' in message) {\n lines = message['message'].split('\\n');\n } else if (Array.isArray(message)) {\n message.forEach((message) => {\n if ('message' in message) {\n lines = message['message'].split('\\n');\n }\n });\n }\n\n // Strip webpack-added headers off errors/warnings\n // https://github.com/webpack/webpack/blob/master/lib/ModuleError.js\n lines = lines.filter((line) => !/Module [A-z ]+\\(from/.test(line));\n\n // Transform parsing error into syntax error\n // TODO: move this to our ESLint formatter?\n lines = lines.map((line) => {\n const parsingError = /Line (\\d+):(?:(\\d+):)?\\s*Parsing error: (.+)$/.exec(line);\n if (!parsingError) {\n return line;\n }\n const [, errorLine, errorColumn, errorMessage] = parsingError;\n return `${friendlySyntaxErrorLabel} ${errorMessage} (${errorLine}:${errorColumn})`;\n });\n\n message = lines.join('\\n');\n // Smoosh syntax errors (commonly found in CSS)\n message = message.replace(/SyntaxError\\s+\\((\\d+):(\\d+)\\)\\s*(.+?)\\n/g, `${friendlySyntaxErrorLabel} $3 ($1:$2)\\n`);\n // Clean up export errors\n message = message.replace(\n /^.*export '(.+?)' was not found in '(.+?)'.*$/gm,\n `Attempted import error: '$1' is not exported from '$2'.`\n );\n message = message.replace(\n /^.*export 'default' \\(imported as '(.+?)'\\) was not found in '(.+?)'.*$/gm,\n `Attempted import error: '$2' does not contain a default export (imported as '$1').`\n );\n message = message.replace(\n /^.*export '(.+?)' \\(imported as '(.+?)'\\) was not found in '(.+?)'.*$/gm,\n `Attempted import error: '$1' is not exported from '$3' (imported as '$2').`\n );\n lines = message.split('\\n');\n\n // Remove leading newline\n if (lines.length > 2 && lines[1].trim() === '') {\n lines.splice(1, 1);\n }\n // Clean up file name\n lines[0] = lines[0].replace(/^(.*) \\d+:\\d+-\\d+$/, '$1');\n\n // Cleans up verbose \"module not found\" messages for files and packages.\n if (lines[1] && lines[1].indexOf('Module not found: ') === 0) {\n lines = [\n lines[0],\n lines[1].replace('Error: ', '').replace('Module not found: Cannot find file:', 'Cannot find file:'),\n ];\n }\n\n // Add helpful message for users trying to use Sass for the first time\n if (lines[1] && lines[1].match(/Cannot find module.+sass/)) {\n lines[1] = 'To import Sass files, you first need to install sass.\\n';\n lines[1] += 'Run `bit install sass` inside your workspace.';\n }\n\n message = lines.join('\\n');\n // Internal stacks are generally useless so we strip them... with the\n // exception of stacks containing `webpack:` because they're normally\n // from user code generated by webpack. For more information see\n // https://github.com/facebook/create-react-app/pull/1050\n message = message.replace(/^\\s*at\\s((?!webpack:).)*:\\d+:\\d+[\\s)]*(\\n|$)/gm, ''); // at ... ...:x:y\n message = message.replace(/^\\s*at\\s<anonymous>(\\n|$)/gm, ''); // at <anonymous>\n lines = message.split('\\n');\n\n // Remove duplicated newlines\n lines = lines.filter(\n (line, index, arr) => index === 0 || line.trim() !== '' || line.trim() !== arr[index - 1].trim()\n );\n\n // Reassemble the message\n message = lines.join('\\n');\n return message.trim();\n}\n\nfunction formatWebpackMessages(json) {\n const formattedErrors = json.errors.map(formatMessage);\n const formattedWarnings = json.warnings.map(formatMessage);\n const result = { errors: formattedErrors, warnings: formattedWarnings };\n if (result.errors.some(isLikelyASyntaxError)) {\n // If there are any syntax errors, show just them.\n result.errors = result.errors.filter(isLikelyASyntaxError);\n }\n return result;\n}\n\nmodule.exports = formatWebpackMessages;\n"],"mappings":"AAAA;;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;;;;;;;;;;AAEA,MAAMA,wBAAwB,GAAG,eAAjC;;AAEA,SAASC,oBAAT,CAA8BC,OAA9B,EAAuC;EACrC,OAAOA,OAAO,CAACC,OAAR,CAAgBH,wBAAhB,MAA8C,CAAC,CAAtD;AACD,C,CAED;;;AACA,SAASI,aAAT,CAAuBF,OAAvB,EAAgC;EAC9B,IAAIG,KAAK,GAAG,EAAZ;;EAEA,IAAI,OAAOH,OAAP,KAAmB,QAAvB,EAAiC;IAC/BG,KAAK,GAAGH,OAAO,CAACI,KAAR,CAAc,IAAd,CAAR;EACD,CAFD,MAEO,IAAI,aAAaJ,OAAjB,EAA0B;IAC/BG,KAAK,GAAGH,OAAO,CAAC,SAAD,CAAP,CAAmBI,KAAnB,CAAyB,IAAzB,CAAR;EACD,CAFM,MAEA,IAAIC,KAAK,CAACC,OAAN,CAAcN,OAAd,CAAJ,EAA4B;IACjCA,OAAO,CAACO,OAAR,CAAiBP,OAAD,IAAa;MAC3B,IAAI,aAAaA,OAAjB,EAA0B;QACxBG,KAAK,GAAGH,OAAO,CAAC,SAAD,CAAP,CAAmBI,KAAnB,CAAyB,IAAzB,CAAR;MACD;IACF,CAJD;EAKD,CAb6B,CAe9B;EACA;;;EACAD,KAAK,GAAGA,KAAK,CAACK,MAAN,CAAcC,IAAD,IAAU,CAAC,uBAAuBC,IAAvB,CAA4BD,IAA5B,CAAxB,CAAR,CAjB8B,CAmB9B;EACA;;EACAN,KAAK,GAAGA,KAAK,CAACQ,GAAN,CAAWF,IAAD,IAAU;IAC1B,MAAMG,YAAY,GAAG,gDAAgDC,IAAhD,CAAq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,CAA1B;EACA,MAAM6B,MAAM,GAAG;IAAEH,MAAM,EAAED,eAAV;IAA2BG,QAAQ,EAAED;EAArC,CAAf;;EACA,IAAIE,MAAM,CAACH,MAAP,CAAcI,IAAd,CAAmBjC,oBAAnB,CAAJ,EAA8C;IAC5C;IACAgC,MAAM,CAACH,MAAP,GAAgBG,MAAM,CAACH,MAAP,CAAcpB,MAAd,CAAqBT,oBAArB,CAAhB;EACD;;EACD,OAAOgC,MAAP;AACD;;AAEDE,MAAM,CAACC,OAAP,GAAiBT,qBAAjB"}
1
+ {"version":3,"names":["friendlySyntaxErrorLabel","isLikelyASyntaxError","message","indexOf","formatMessage","lines","split","Array","isArray","forEach","filter","line","test","map","parsingError","exec","errorLine","errorColumn","errorMessage","join","replace","length","trim","splice","match","index","arr","formatWebpackMessages","json","formattedErrors","errors","formattedWarnings","warnings","result","some","module","exports"],"sources":["formatWebpackMessages.js"],"sourcesContent":["/* eslint-disable */\n/**\n * Copyright (c) 2015-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nconst friendlySyntaxErrorLabel = 'Syntax error:';\n\nfunction isLikelyASyntaxError(message) {\n return message.indexOf(friendlySyntaxErrorLabel) !== -1;\n}\n\n// Cleans up webpack error messages.\nfunction formatMessage(message) {\n let lines = [];\n\n if (typeof message === 'string') {\n lines = message.split('\\n');\n } else if ('message' in message) {\n lines = message['message'].split('\\n');\n } else if (Array.isArray(message)) {\n message.forEach((message) => {\n if ('message' in message) {\n lines = message['message'].split('\\n');\n }\n });\n }\n\n // Strip webpack-added headers off errors/warnings\n // https://github.com/webpack/webpack/blob/master/lib/ModuleError.js\n lines = lines.filter((line) => !/Module [A-z ]+\\(from/.test(line));\n\n // Transform parsing error into syntax error\n // TODO: move this to our ESLint formatter?\n lines = lines.map((line) => {\n const parsingError = /Line (\\d+):(?:(\\d+):)?\\s*Parsing error: (.+)$/.exec(line);\n if (!parsingError) {\n return line;\n }\n const [, errorLine, errorColumn, errorMessage] = parsingError;\n return `${friendlySyntaxErrorLabel} ${errorMessage} (${errorLine}:${errorColumn})`;\n });\n\n message = lines.join('\\n');\n // Smoosh syntax errors (commonly found in CSS)\n message = message.replace(/SyntaxError\\s+\\((\\d+):(\\d+)\\)\\s*(.+?)\\n/g, `${friendlySyntaxErrorLabel} $3 ($1:$2)\\n`);\n // Clean up export errors\n message = message.replace(\n /^.*export '(.+?)' was not found in '(.+?)'.*$/gm,\n `Attempted import error: '$1' is not exported from '$2'.`\n );\n message = message.replace(\n /^.*export 'default' \\(imported as '(.+?)'\\) was not found in '(.+?)'.*$/gm,\n `Attempted import error: '$2' does not contain a default export (imported as '$1').`\n );\n message = message.replace(\n /^.*export '(.+?)' \\(imported as '(.+?)'\\) was not found in '(.+?)'.*$/gm,\n `Attempted import error: '$1' is not exported from '$3' (imported as '$2').`\n );\n lines = message.split('\\n');\n\n // Remove leading newline\n if (lines.length > 2 && lines[1].trim() === '') {\n lines.splice(1, 1);\n }\n // Clean up file name\n lines[0] = lines[0].replace(/^(.*) \\d+:\\d+-\\d+$/, '$1');\n\n // Cleans up verbose \"module not found\" messages for files and packages.\n if (lines[1] && lines[1].indexOf('Module not found: ') === 0) {\n lines = [\n lines[0],\n lines[1].replace('Error: ', '').replace('Module not found: Cannot find file:', 'Cannot find file:'),\n ];\n }\n\n // Add helpful message for users trying to use Sass for the first time\n if (lines[1] && lines[1].match(/Cannot find module.+sass/)) {\n lines[1] = 'To import Sass files, you first need to install sass.\\n';\n lines[1] += 'Run `bit install sass` inside your workspace.';\n }\n\n message = lines.join('\\n');\n // Internal stacks are generally useless so we strip them... with the\n // exception of stacks containing `webpack:` because they're normally\n // from user code generated by webpack. For more information see\n // https://github.com/facebook/create-react-app/pull/1050\n message = message.replace(/^\\s*at\\s((?!webpack:).)*:\\d+:\\d+[\\s)]*(\\n|$)/gm, ''); // at ... ...:x:y\n message = message.replace(/^\\s*at\\s<anonymous>(\\n|$)/gm, ''); // at <anonymous>\n lines = message.split('\\n');\n\n // Remove duplicated newlines\n lines = lines.filter(\n (line, index, arr) => index === 0 || line.trim() !== '' || line.trim() !== arr[index - 1].trim()\n );\n\n // Reassemble the message\n message = lines.join('\\n');\n return message.trim();\n}\n\nfunction formatWebpackMessages(json) {\n const formattedErrors = json.errors.map(formatMessage);\n const formattedWarnings = json.warnings.map(formatMessage);\n const result = { errors: formattedErrors, warnings: formattedWarnings };\n if (result.errors.some(isLikelyASyntaxError)) {\n // If there are any syntax errors, show just them.\n result.errors = result.errors.filter(isLikelyASyntaxError);\n }\n return result;\n}\n\nmodule.exports = formatWebpackMessages;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,YAAY;;AAAC;AAAA;AAAA;AAAA;AAEb,MAAMA,wBAAwB,GAAG,eAAe;AAEhD,SAASC,oBAAoB,CAACC,OAAO,EAAE;EACrC,OAAOA,OAAO,CAACC,OAAO,CAACH,wBAAwB,CAAC,KAAK,CAAC,CAAC;AACzD;;AAEA;AACA,SAASI,aAAa,CAACF,OAAO,EAAE;EAC9B,IAAIG,KAAK,GAAG,EAAE;EAEd,IAAI,OAAOH,OAAO,KAAK,QAAQ,EAAE;IAC/BG,KAAK,GAAGH,OAAO,CAACI,KAAK,CAAC,IAAI,CAAC;EAC7B,CAAC,MAAM,IAAI,SAAS,IAAIJ,OAAO,EAAE;IAC/BG,KAAK,GAAGH,OAAO,CAAC,SAAS,CAAC,CAACI,KAAK,CAAC,IAAI,CAAC;EACxC,CAAC,MAAM,IAAIC,KAAK,CAACC,OAAO,CAACN,OAAO,CAAC,EAAE;IACjCA,OAAO,CAACO,OAAO,CAAEP,OAAO,IAAK;MAC3B,IAAI,SAAS,IAAIA,OAAO,EAAE;QACxBG,KAAK,GAAGH,OAAO,CAAC,SAAS,CAAC,CAACI,KAAK,CAAC,IAAI,CAAC;MACxC;IACF,CAAC,CAAC;EACJ;;EAEA;EACA;EACAD,KAAK,GAAGA,KAAK,CAACK,M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aAAa,CAAC;EACtD,MAAM2B,iBAAiB,GAAGH,IAAI,CAACI,QAAQ,CAACnB,GAAG,CAACT,aAAa,CAAC;EAC1D,MAAM6B,MAAM,GAAG;IAAEH,MAAM,EAAED,eAAe;IAAEG,QAAQ,EAAED;EAAkB,CAAC;EACvE,IAAIE,MAAM,CAACH,MAAM,CAACI,IAAI,CAACjC,oBAAoB,CAAC,EAAE;IAC5C;IACAgC,MAAM,CAACH,MAAM,GAAGG,MAAM,CAACH,MAAM,CAACpB,MAAM,CAACT,oBAAoB,CAAC;EAC5D;EACA,OAAOgC,MAAM;AACf;AAEAE,MAAM,CAACC,OAAO,GAAGT,qBAAqB"}
@@ -1,13 +1,13 @@
1
1
  /* eslint-disable */
2
-
3
2
  /**
4
3
  * Copyright (c) 2015-present, Facebook, Inc.
5
4
  *
6
5
  * This source code is licensed under the MIT license found in the
7
6
  * LICENSE file in the root directory of this source tree.
8
7
  */
9
- 'use strict'; // TODO: we might want to make this injectable to support DEV-time non-root URLs.
8
+ 'use strict';
10
9
 
10
+ // TODO: we might want to make this injectable to support DEV-time non-root URLs.
11
11
  module.exports = '/__open-stack-frame-in-editor';
12
12
 
13
13
  //# sourceMappingURL=launchEditorEndpoint.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["module","exports"],"sources":["launchEditorEndpoint.js"],"sourcesContent":["/* eslint-disable */\n/**\n * Copyright (c) 2015-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';\n\n// TODO: we might want to make this injectable to support DEV-time non-root URLs.\nmodule.exports = '/__open-stack-frame-in-editor';\n"],"mappings":"AAAA;;AACA;AACA;AACA;AACA;AACA;AACA;AACA,a,CAEA;;AACAA,MAAM,CAACC,OAAP,GAAiB,+BAAjB"}
1
+ {"version":3,"names":["module","exports"],"sources":["launchEditorEndpoint.js"],"sourcesContent":["/* eslint-disable */\n/**\n * Copyright (c) 2015-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';\n\n// TODO: we might want to make this injectable to support DEV-time non-root URLs.\nmodule.exports = '/__open-stack-frame-in-editor';\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;;AAEZ;AACAA,MAAM,CAACC,OAAO,GAAG,+BAA+B"}
@@ -1,8 +1,7 @@
1
1
  /* eslint-disable */
2
-
3
2
  /** this file was copied as is from react-dev-utils/refreshOverlayInterop */
4
- // @remove-on-eject-begin
5
3
 
4
+ // @remove-on-eject-begin
6
5
  /**
7
6
  * Copyright (c) 2015-present, Facebook, Inc.
8
7
  *
@@ -16,7 +15,6 @@ const {
16
15
  dismissRuntimeErrors,
17
16
  reportRuntimeError
18
17
  } = require('react-error-overlay');
19
-
20
18
  module.exports = {
21
19
  clearRuntimeErrors: dismissRuntimeErrors,
22
20
  handleRuntimeError: reportRuntimeError
@@ -1 +1 @@
1
- {"version":3,"names":["dismissRuntimeErrors","reportRuntimeError","require","module","exports","clearRuntimeErrors","handleRuntimeError"],"sources":["refreshOverlayInterop.js"],"sourcesContent":["/* eslint-disable */\n/** this file was copied as is from react-dev-utils/refreshOverlayInterop */\n\n// @remove-on-eject-begin\n/**\n * Copyright (c) 2015-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n// @remove-on-eject-end\n'use strict';\n\nconst { dismissRuntimeErrors, reportRuntimeError } = require('react-error-overlay');\n\nmodule.exports = {\n clearRuntimeErrors: dismissRuntimeErrors,\n handleRuntimeError: reportRuntimeError,\n};\n"],"mappings":"AAAA;;AACA;AAEA;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAM;EAAEA,oBAAF;EAAwBC;AAAxB,IAA+CC,OAAO,CAAC,qBAAD,CAA5D;;AAEAC,MAAM,CAACC,OAAP,GAAiB;EACfC,kBAAkB,EAAEL,oBADL;EAEfM,kBAAkB,EAAEL;AAFL,CAAjB"}
1
+ {"version":3,"names":["dismissRuntimeErrors","reportRuntimeError","require","module","exports","clearRuntimeErrors","handleRuntimeError"],"sources":["refreshOverlayInterop.js"],"sourcesContent":["/* eslint-disable */\n/** this file was copied as is from react-dev-utils/refreshOverlayInterop */\n\n// @remove-on-eject-begin\n/**\n * Copyright (c) 2015-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n// @remove-on-eject-end\n'use strict';\n\nconst { dismissRuntimeErrors, reportRuntimeError } = require('react-error-overlay');\n\nmodule.exports = {\n clearRuntimeErrors: dismissRuntimeErrors,\n handleRuntimeError: reportRuntimeError,\n};\n"],"mappings":"AAAA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;;AAEZ,MAAM;EAAEA,oBAAoB;EAAEC;AAAmB,CAAC,GAAGC,OAAO,CAAC,qBAAqB,CAAC;AAEnFC,MAAM,CAACC,OAAO,GAAG;EACfC,kBAAkB,EAAEL,oBAAoB;EACxCM,kBAAkB,EAAEL;AACtB,CAAC"}