@teambit/workspace-config-files 0.0.6 → 0.0.8

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.
@@ -18,9 +18,13 @@ export declare type ConfigFile = {
18
18
  };
19
19
  export declare type ExtendingConfigFile = ConfigFile & {
20
20
  /**
21
- * Name of the config file that this config file extends.
21
+ * the config file that this config file extends.
22
22
  */
23
- extendingTarget: string;
23
+ extendingTarget: WrittenConfigFile;
24
+ /**
25
+ * When replacing the config file name with the actual path of the config file, use absolute paths.
26
+ */
27
+ useAbsPaths?: boolean;
24
28
  };
25
29
  export declare type PostProcessExtendingConfigFilesArgs = {
26
30
  workspaceDir: string;
@@ -29,6 +33,13 @@ export declare type PostProcessExtendingConfigFilesArgs = {
29
33
  envCompsDirsMap: EnvCompsDirsMap;
30
34
  dryRun: boolean;
31
35
  };
36
+ export declare type GenerateExtendingConfigFilesArgs = {
37
+ workspaceDir: string;
38
+ configsRootDir: string;
39
+ writtenConfigFiles: WrittenConfigFile[];
40
+ envCompsDirsMap: EnvCompsDirsMap;
41
+ dryRun: boolean;
42
+ };
32
43
  export declare type PostProcessConfigFilesOptions = {
33
44
  dryRun: boolean;
34
45
  };
@@ -71,8 +82,13 @@ export interface ConfigWriterEntry {
71
82
  * For example, the tsconfig.json file will extend the real tsconfig.{hash}.json file (that were coming from the env).
72
83
  * That way we can avoid writing the same config file multiple times.
73
84
  * It also reduces the risk of the user manually change the config file and then the changes will be lost.
85
+ * This function support returning a file with content with a dsl using `{}` to replace the config file name.
86
+ * for example:
87
+ * content = `{
88
+ * "extends": {configFile.name},
89
+ * }`
74
90
  */
75
- generateExtendingFile(writtenConfigFiles: WrittenConfigFile[]): ExtendingConfigFile | undefined;
91
+ generateExtendingFile(args: GenerateExtendingConfigFilesArgs): ExtendingConfigFile | undefined;
76
92
  /**
77
93
  * This enables the writer to do some post processing after the extending config files were written.
78
94
  * this is important in case when we need to change a config file / extending config file after it was written based on all
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["config-writer-entry.ts"],"sourcesContent":["import { Environment, ExecutionContext } from '@teambit/envs';\nimport {\n EnvCompsDirsMap,\n EnvMapValue,\n EnvsWrittenExtendingConfigFiles,\n WrittenConfigFile,\n} from './workspace-config-files.main.runtime';\n\nexport type ConfigFile = {\n /**\n * Name of the config file.\n * supports also using `{hash}` in the name, which will be replaced by the hash of the config file.\n */\n name: string;\n /**\n * Content of the config file.\n * I.E the content of the tsconfig.json file.\n */\n content: string;\n /**\n * Hash of the config file.\n */\n hash?: string;\n};\n\nexport type ExtendingConfigFile = ConfigFile & {\n /**\n * Name of the config file that this config file extends.\n */\n extendingTarget: string;\n};\n\nexport type PostProcessExtendingConfigFilesArgs = {\n workspaceDir: string;\n configsRootDir: string;\n writtenExtendingConfigFiles: EnvsWrittenExtendingConfigFiles;\n envCompsDirsMap: EnvCompsDirsMap;\n dryRun: boolean;\n};\n\nexport type PostProcessConfigFilesOptions = {\n dryRun: boolean;\n};\n\nexport interface ConfigWriterEntry {\n /**\n * Name of the config writer.\n * used for outputs and logging.\n */\n name: string;\n\n /**\n * Name that is used to filter the config writer by the cli when using --writers flag.\n */\n cliName: string;\n\n /**\n * Get's the component env and return the config file content\n * for example the eslint config to tsconfig.\n * This also enable to return a hash of the config file, which will be used to determine if\n * 2 config files are the same.\n * If the hash is not provided, the content will be used as the hash.\n * This enables the specific config type to ignore specific fields when calculating the\n * hash in order to ignore theses fields when determining if 2 config files are the same.\n * The calc function also get the target directory of the config file (calculated by this aspect) as sometime there\n * is a need to change the config file content based on the target directory.\n * for example, change the includes/excludes paths to be relative to the target directory.\n * The calc can return undefined if the config file is not relevant for the component. or not supported by the subscriber.\n * for example if the component uses babel to compile, then tsconfig is not relevant.\n * @param env\n */\n calcConfigFiles(executionContext: ExecutionContext, env: Environment, dir: string): ConfigFile[] | undefined;\n\n /**\n * This enables the writer to do some post processing after the config files were written.\n * this is important in case when we need to change a config file after it was written based on all\n * the environments in the ws\n * or based on other config files that were written.\n * @param writtenConfigFiles\n */\n postProcessConfigFiles?(\n writtenConfigFiles: WrittenConfigFile[],\n executionContext: ExecutionContext,\n envMapValue: EnvMapValue,\n options: PostProcessConfigFilesOptions\n ): Promise<void>;\n\n /**\n * This will be used to generate an extending file content.\n * For example, the tsconfig.json file will extend the real tsconfig.{hash}.json file (that were coming from the env).\n * That way we can avoid writing the same config file multiple times.\n * It also reduces the risk of the user manually change the config file and then the changes will be lost.\n */\n generateExtendingFile(writtenConfigFiles: WrittenConfigFile[]): ExtendingConfigFile | undefined;\n\n /**\n * This enables the writer to do some post processing after the extending config files were written.\n * this is important in case when we need to change a config file / extending config file after it was written based on all\n * the environments in the ws\n * or based on other config files that were written.\n * @param args\n */\n postProcessExtendingConfigFiles?(args: PostProcessExtendingConfigFilesArgs): Promise<void>;\n\n /**\n * Find all the files that are relevant for the config type.\n * This is used to clean / delete these files\n * This should return an array of glob patterns (that will passed to the globby/minimatch library)\n * @param dir\n */\n patterns: string[];\n\n /**\n * A function to determine if a file was generated by bit.\n * This is useful to check if the config file was generated by bit to prevent delete user's file.\n * @param filePath\n * @returns\n */\n isBitGenerated?: (filePath: string) => boolean;\n}\n"],"mappings":""}
1
+ {"version":3,"names":[],"sources":["config-writer-entry.ts"],"sourcesContent":["import { Environment, ExecutionContext } from '@teambit/envs';\nimport {\n EnvCompsDirsMap,\n EnvMapValue,\n EnvsWrittenExtendingConfigFiles,\n WrittenConfigFile,\n} from './workspace-config-files.main.runtime';\n\nexport type ConfigFile = {\n /**\n * Name of the config file.\n * supports also using `{hash}` in the name, which will be replaced by the hash of the config file.\n */\n name: string;\n /**\n * Content of the config file.\n * I.E the content of the tsconfig.json file.\n */\n content: string;\n /**\n * Hash of the config file.\n */\n hash?: string;\n};\n\nexport type ExtendingConfigFile = ConfigFile & {\n /**\n * the config file that this config file extends.\n */\n extendingTarget: WrittenConfigFile;\n\n /**\n * When replacing the config file name with the actual path of the config file, use absolute paths.\n */\n useAbsPaths?: boolean;\n};\n\nexport type PostProcessExtendingConfigFilesArgs = {\n workspaceDir: string;\n configsRootDir: string;\n writtenExtendingConfigFiles: EnvsWrittenExtendingConfigFiles;\n envCompsDirsMap: EnvCompsDirsMap;\n dryRun: boolean;\n};\n\nexport type GenerateExtendingConfigFilesArgs = {\n workspaceDir: string;\n configsRootDir: string;\n writtenConfigFiles: WrittenConfigFile[];\n envCompsDirsMap: EnvCompsDirsMap;\n dryRun: boolean;\n};\n\nexport type PostProcessConfigFilesOptions = {\n dryRun: boolean;\n};\n\nexport interface ConfigWriterEntry {\n /**\n * Name of the config writer.\n * used for outputs and logging.\n */\n name: string;\n\n /**\n * Name that is used to filter the config writer by the cli when using --writers flag.\n */\n cliName: string;\n\n /**\n * Get's the component env and return the config file content\n * for example the eslint config to tsconfig.\n * This also enable to return a hash of the config file, which will be used to determine if\n * 2 config files are the same.\n * If the hash is not provided, the content will be used as the hash.\n * This enables the specific config type to ignore specific fields when calculating the\n * hash in order to ignore theses fields when determining if 2 config files are the same.\n * The calc function also get the target directory of the config file (calculated by this aspect) as sometime there\n * is a need to change the config file content based on the target directory.\n * for example, change the includes/excludes paths to be relative to the target directory.\n * The calc can return undefined if the config file is not relevant for the component. or not supported by the subscriber.\n * for example if the component uses babel to compile, then tsconfig is not relevant.\n * @param env\n */\n calcConfigFiles(executionContext: ExecutionContext, env: Environment, dir: string): ConfigFile[] | undefined;\n\n /**\n * This enables the writer to do some post processing after the config files were written.\n * this is important in case when we need to change a config file after it was written based on all\n * the environments in the ws\n * or based on other config files that were written.\n * @param writtenConfigFiles\n */\n postProcessConfigFiles?(\n writtenConfigFiles: WrittenConfigFile[],\n executionContext: ExecutionContext,\n envMapValue: EnvMapValue,\n options: PostProcessConfigFilesOptions\n ): Promise<void>;\n\n /**\n * This will be used to generate an extending file content.\n * For example, the tsconfig.json file will extend the real tsconfig.{hash}.json file (that were coming from the env).\n * That way we can avoid writing the same config file multiple times.\n * It also reduces the risk of the user manually change the config file and then the changes will be lost.\n * This function support returning a file with content with a dsl using `{}` to replace the config file name.\n * for example:\n * content = `{\n * \"extends\": {configFile.name},\n * }`\n */\n generateExtendingFile(args: GenerateExtendingConfigFilesArgs): ExtendingConfigFile | undefined;\n\n /**\n * This enables the writer to do some post processing after the extending config files were written.\n * this is important in case when we need to change a config file / extending config file after it was written based on all\n * the environments in the ws\n * or based on other config files that were written.\n * @param args\n */\n postProcessExtendingConfigFiles?(args: PostProcessExtendingConfigFilesArgs): Promise<void>;\n\n /**\n * Find all the files that are relevant for the config type.\n * This is used to clean / delete these files\n * This should return an array of glob patterns (that will passed to the globby/minimatch library)\n * @param dir\n */\n patterns: string[];\n\n /**\n * A function to determine if a file was generated by bit.\n * This is useful to check if the config file was generated by bit to prevent delete user's file.\n * @param filePath\n * @returns\n */\n isBitGenerated?: (filePath: string) => boolean;\n}\n"],"mappings":""}
@@ -48,27 +48,45 @@ const envCompsDirsMap = {
48
48
  const tsExtendingConfigFilesMap = {
49
49
  '816b7f584991ff21a7682ef8a4229ebf312c457f': {
50
50
  extendingConfigFile: {
51
+ useAbsPaths: false,
51
52
  content: '// bit-generated-typescript-config\n' + '\n' + '{\n' + ' "extends": "/Users/giladshoham/dev/temp/new-react-18-config-files/node_modules/.cache/tsconfig.bit.4957ea3122e57ea3302aadd885eed84127d9c54b.json"\n' + '}',
52
53
  name: 'tsconfig.json',
53
- extendingTarget: '/Users/giladshoham/dev/temp/new-react-18-config-files/node_modules/.cache/tsconfig.bit.4957ea3122e57ea3302aadd885eed84127d9c54b.json',
54
+ extendingTarget: {
55
+ hash: '4957ea3122e57ea3302aadd885eed84127d9c54b',
56
+ content: 'does not matter',
57
+ name: 'tsconfig.bit.4957ea3122e57ea3302aadd885eed84127d9c54b.json',
58
+ filePath: '/Users/giladshoham/dev/temp/new-react-18-config-files/node_modules/.cache/tsconfig.bit.4957ea3122e57ea3302aadd885eed84127d9c54b.json'
59
+ },
54
60
  hash: '816b7f584991ff21a7682ef8a4229ebf312c457f'
55
61
  },
56
62
  envIds: ['teambit.harmony/node', 'teambit.react/react']
57
63
  },
58
64
  '00330a9c547353867d519c34f47e17ddc9f161d1': {
59
65
  extendingConfigFile: {
66
+ useAbsPaths: false,
60
67
  content: '// bit-generated-typescript-config\n' + '\n' + '{\n' + ' "extends": "/Users/giladshoham/dev/temp/new-react-18-config-files/node_modules/.cache/tsconfig.bit.17b99a1071b1d2d86ed04ebce68903b82403f278.json"\n' + '}',
61
68
  name: 'tsconfig.json',
62
- extendingTarget: '/Users/giladshoham/dev/temp/new-react-18-config-files/node_modules/.cache/tsconfig.bit.17b99a1071b1d2d86ed04ebce68903b82403f278.json',
69
+ extendingTarget: {
70
+ hash: '17b99a1071b1d2d86ed04ebce68903b82403f278',
71
+ content: 'does not matter',
72
+ name: 'tsconfig.bit.17b99a1071b1d2d86ed04ebce68903b82403f278.json',
73
+ filePath: '/Users/giladshoham/dev/temp/new-react-18-config-files/node_modules/.cache/tsconfig.bit.17b99a1071b1d2d86ed04ebce68903b82403f278.json'
74
+ },
63
75
  hash: '00330a9c547353867d519c34f47e17ddc9f161d1'
64
76
  },
65
77
  envIds: ['teambit.react/react-env@0.0.44', 'teambit.react/examples/my-react-env@0.0.39']
66
78
  },
67
79
  '3c5960bcad98570b98834a5c37f47dd4729dbef0': {
68
80
  extendingConfigFile: {
81
+ useAbsPaths: false,
69
82
  content: '// bit-generated-typescript-config\n' + '\n' + '{\n' + ' "extends": "/Users/giladshoham/dev/temp/new-react-18-config-files/node_modules/.cache/tsconfig.bit.dab521d0914afe64de248743e05a169cf9b4b50c.json"\n' + '}',
70
83
  name: 'tsconfig.json',
71
- extendingTarget: '/Users/giladshoham/dev/temp/new-react-18-config-files/node_modules/.cache/tsconfig.bit.dab521d0914afe64de248743e05a169cf9b4b50c.json',
84
+ extendingTarget: {
85
+ hash: 'dab521d0914afe64de248743e05a169cf9b4b50c',
86
+ content: 'does not matter',
87
+ name: 'tsconfig.bit.dab521d0914afe64de248743e05a169cf9b4b50c.json',
88
+ filePath: '/Users/giladshoham/dev/temp/new-react-18-config-files/node_modules/.cache/tsconfig.bit.dab521d0914afe64de248743e05a169cf9b4b50c.json'
89
+ },
72
90
  hash: '3c5960bcad98570b98834a5c37f47dd4729dbef0'
73
91
  },
74
92
  envIds: ['teambit.node/node@0.0.16']
@@ -87,36 +105,60 @@ const tsExpectedDedupedPaths = [{
87
105
  const eslintExtendingConfigFilesMap = {
88
106
  '8810839e74a9c41694bb5a2a8587dcae71dc389d': {
89
107
  extendingConfigFile: {
108
+ useAbsPaths: false,
90
109
  content: '// bit-generated-eslint-config\n' + '{\n' + ' "extends": [\n' + ' "/Users/giladshoham/dev/temp/new-react-18-config-files/node_modules/.cache/.eslintrc.bit.be8facfbdcf1db685d5020f8612d8c2c3ac2eb7c.json"\n' + ' ]\n' + '}',
91
110
  name: '.eslintrc.json',
92
- extendingTarget: '/Users/giladshoham/dev/temp/new-react-18-config-files/node_modules/.cache/.eslintrc.bit.be8facfbdcf1db685d5020f8612d8c2c3ac2eb7c.json',
111
+ extendingTarget: {
112
+ hash: 'be8facfbdcf1db685d5020f8612d8c2c3ac2eb7c',
113
+ content: 'does not matter',
114
+ name: '.eslintrc.bit.be8facfbdcf1db685d5020f8612d8c2c3ac2eb7c.json',
115
+ filePath: '/Users/giladshoham/dev/temp/new-react-18-config-files/node_modules/.cache/.eslintrc.bit.be8facfbdcf1db685d5020f8612d8c2c3ac2eb7c.json'
116
+ },
93
117
  hash: '8810839e74a9c41694bb5a2a8587dcae71dc389d'
94
118
  },
95
119
  envIds: ['teambit.harmony/node', 'teambit.react/react', 'teambit.envs/env']
96
120
  },
97
121
  ff6ea265e6f21ce25f7985570beef37dd957d0dc: {
98
122
  extendingConfigFile: {
123
+ useAbsPaths: false,
99
124
  content: '// bit-generated-eslint-config\n' + '{\n' + ' "extends": [\n' + ' "/Users/giladshoham/dev/temp/new-react-18-config-files/node_modules/.cache/.eslintrc.bit.e5ca5528c64e0442b05b949fea42cdda4243d840.json"\n' + ' ]\n' + '}',
100
125
  name: '.eslintrc.json',
101
- extendingTarget: '/Users/giladshoham/dev/temp/new-react-18-config-files/node_modules/.cache/.eslintrc.bit.e5ca5528c64e0442b05b949fea42cdda4243d840.json',
126
+ extendingTarget: {
127
+ hash: 'e5ca5528c64e0442b05b949fea42cdda4243d840',
128
+ content: 'does not matter',
129
+ name: '.eslintrc.bit.e5ca5528c64e0442b05b949fea42cdda4243d840.json',
130
+ filePath: '/Users/giladshoham/dev/temp/new-react-18-config-files/node_modules/.cache/.eslintrc.bit.e5ca5528c64e0442b05b949fea42cdda4243d840.json'
131
+ },
102
132
  hash: 'ff6ea265e6f21ce25f7985570beef37dd957d0dc'
103
133
  },
104
134
  envIds: ['teambit.react/react-env@0.0.44']
105
135
  },
106
136
  '91021f2c973a2940c70b75447639e4ea2a799955': {
107
137
  extendingConfigFile: {
138
+ useAbsPaths: false,
108
139
  content: '// bit-generated-eslint-config\n' + '{\n' + ' "extends": [\n' + ' "/Users/giladshoham/dev/temp/new-react-18-config-files/node_modules/.cache/.eslintrc.bit.7f229bf5ab41e8bfe61916de6c68f9c14c76f23e.json"\n' + ' ]\n' + '}',
109
140
  name: '.eslintrc.json',
110
- extendingTarget: '/Users/giladshoham/dev/temp/new-react-18-config-files/node_modules/.cache/.eslintrc.bit.7f229bf5ab41e8bfe61916de6c68f9c14c76f23e.json',
141
+ extendingTarget: {
142
+ hash: '7f229bf5ab41e8bfe61916de6c68f9c14c76f23e',
143
+ content: 'does not matter',
144
+ name: '.eslintrc.bit.7f229bf5ab41e8bfe61916de6c68f9c14c76f23e.json',
145
+ filePath: '/Users/giladshoham/dev/temp/new-react-18-config-files/node_modules/.cache/.eslintrc.bit.7f229bf5ab41e8bfe61916de6c68f9c14c76f23e.json'
146
+ },
111
147
  hash: '91021f2c973a2940c70b75447639e4ea2a799955'
112
148
  },
113
149
  envIds: ['teambit.mdx/mdx-env@0.0.6', 'teambit.react/examples/my-react-env@0.0.39']
114
150
  },
115
151
  f1743b227e588db0c59d4a43171653e6c4262816: {
116
152
  extendingConfigFile: {
153
+ useAbsPaths: false,
117
154
  content: '// bit-generated-eslint-config\n' + '{\n' + ' "extends": [\n' + ' "/Users/giladshoham/dev/temp/new-react-18-config-files/node_modules/.cache/.eslintrc.bit.c503f7386e2a637d91c74f7df90d8fafe79c4378.json"\n' + ' ]\n' + '}',
118
155
  name: '.eslintrc.json',
119
- extendingTarget: '/Users/giladshoham/dev/temp/new-react-18-config-files/node_modules/.cache/.eslintrc.bit.c503f7386e2a637d91c74f7df90d8fafe79c4378.json',
156
+ extendingTarget: {
157
+ hash: 'c503f7386e2a637d91c74f7df90d8fafe79c4378',
158
+ content: 'does not matter',
159
+ name: '.eslintrc.bit.c503f7386e2a637d91c74f7df90d8fafe79c4378.json',
160
+ filePath: '/Users/giladshoham/dev/temp/new-react-18-config-files/node_modules/.cache/.eslintrc.bit.c503f7386e2a637d91c74f7df90d8fafe79c4378.json'
161
+ },
120
162
  hash: 'f1743b227e588db0c59d4a43171653e6c4262816'
121
163
  },
122
164
  envIds: ['teambit.node/node@0.0.16']
@@ -138,9 +180,15 @@ const eslintExpectedDedupedPaths = [{
138
180
  const prettierExtendingConfigFilesMap = {
139
181
  '082f546b2555ea89e7063b20de47c039d387fc74': {
140
182
  extendingConfigFile: {
183
+ useAbsPaths: false,
141
184
  content: '// bit-generated-prettier-config\n' + 'module.exports = {\n' + " ...require('/Users/giladshoham/dev/temp/new-react-18-config-files/node_modules/.cache/.prettierrc.bit.e4882af8861bcf5b0147891d8b70b40a10428881.cjs')\n" + '}',
142
185
  name: '.prettierrc.cjs',
143
- extendingTarget: '/Users/giladshoham/dev/temp/new-react-18-config-files/node_modules/.cache/.prettierrc.bit.e4882af8861bcf5b0147891d8b70b40a10428881.cjs',
186
+ extendingTarget: {
187
+ hash: 'e4882af8861bcf5b0147891d8b70b40a10428881',
188
+ content: 'does not matter',
189
+ name: '.prettierrc.bit.e4882af8861bcf5b0147891d8b70b40a10428881.cjs',
190
+ filePath: '/Users/giladshoham/dev/temp/new-react-18-config-files/node_modules/.cache/.prettierrc.bit.e4882af8861bcf5b0147891d8b70b40a10428881.cjs'
191
+ },
144
192
  hash: '082f546b2555ea89e7063b20de47c039d387fc74'
145
193
  },
146
194
  envIds: ['teambit.harmony/node', 'teambit.react/react-env@0.0.44', 'teambit.react/react', 'teambit.envs/env', 'teambit.mdx/mdx-env@0.0.6', 'teambit.node/node@0.0.16', 'teambit.react/examples/my-react-env@0.0.39']
@@ -1 +1 @@
1
- {"version":3,"names":["envCompsDirsMap","id","paths","tsExtendingConfigFilesMap","extendingConfigFile","content","name","extendingTarget","hash","envIds","tsExpectedDedupedPaths","fileHash","eslintExtendingConfigFilesMap","ff6ea265e6f21ce25f7985570beef37dd957d0dc","f1743b227e588db0c59d4a43171653e6c4262816","eslintExpectedDedupedPaths","prettierExtendingConfigFilesMap","prettierExpectedDedupedPaths","describe","timeout","result","before","dedupePaths","it","expect","to","have","lengthOf","length","deep","equal"],"sources":["dedup-paths.spec.ts"],"sourcesContent":["import { expect } from 'chai';\nimport { DedupedPaths, dedupePaths } from './dedup-paths';\nimport { ExtendingConfigFilesMap } from './workspace-config-files.main.runtime';\n\nconst envCompsDirsMap = {\n 'teambit.harmony/node': {\n id: 'teambit.harmony/node',\n paths: [\n 'react/apps/react-app-types',\n 'compilation/babel-compiler',\n 'compilation/compiler-task',\n 'mdx/compilers/mdx-compiler',\n 'mdx/compilers/mdx-multi-compiler',\n 'compilation/compilers/multi-compiler',\n 'defender/eslint-linter',\n 'mdx/generator/mdx-starters',\n 'mdx/generator/mdx-templates',\n 'react/generator/react-starters',\n 'react/generator/react-templates',\n 'defender/jest-tester',\n 'react/jest/react-jest',\n 'defender/linter-task',\n 'defender/mocha-tester',\n 'compilation/modules/babel-file-transpiler',\n 'defender/prettier-formatter',\n 'preview/react-preview',\n 'defender/tester-task',\n 'typescript/typescript-compiler',\n 'webpack/webpack-bundler',\n 'webpack/webpack-dev-server',\n 'react/webpack/react-webpack',\n ],\n },\n 'teambit.react/react-env@0.0.44': {\n id: 'teambit.react/react-env@0.0.44',\n paths: ['test-new-envs-app/apps/test-app', 'test-new-env/ui/button2'],\n },\n 'teambit.react/react': {\n id: 'teambit.react/react',\n paths: ['docs/docs-template', 'react/mounter'],\n },\n 'teambit.envs/env': {\n id: 'teambit.envs/env',\n paths: [\n 'react/examples/my-react-env',\n 'mdx/mdx-env',\n 'node/node',\n 'node/node-env-extension',\n 'react/react-env',\n 'react/react-env-extension',\n ],\n },\n 'teambit.mdx/mdx-env@0.0.6': {\n id: 'teambit.mdx/mdx-env@0.0.6',\n paths: ['test-new-env/mdx/content-comp'],\n },\n 'teambit.node/node@0.0.16': {\n id: 'teambit.node/node@0.0.16',\n paths: ['test-new-env/node/node-comp1', 'test-new-env/node/node-comp2'],\n },\n 'teambit.react/examples/my-react-env@0.0.39': {\n id: 'teambit.react/examples/my-react-env@0.0.39',\n paths: ['test-new-env/ui/button'],\n },\n};\n\nconst tsExtendingConfigFilesMap: ExtendingConfigFilesMap = {\n '816b7f584991ff21a7682ef8a4229ebf312c457f': {\n extendingConfigFile: {\n content:\n '// bit-generated-typescript-config\\n' +\n '\\n' +\n '{\\n' +\n ' \"extends\": \"/Users/giladshoham/dev/temp/new-react-18-config-files/node_modules/.cache/tsconfig.bit.4957ea3122e57ea3302aadd885eed84127d9c54b.json\"\\n' +\n '}',\n name: 'tsconfig.json',\n extendingTarget:\n '/Users/giladshoham/dev/temp/new-react-18-config-files/node_modules/.cache/tsconfig.bit.4957ea3122e57ea3302aadd885eed84127d9c54b.json',\n hash: '816b7f584991ff21a7682ef8a4229ebf312c457f',\n },\n envIds: ['teambit.harmony/node', 'teambit.react/react'],\n },\n '00330a9c547353867d519c34f47e17ddc9f161d1': {\n extendingConfigFile: {\n content:\n '// bit-generated-typescript-config\\n' +\n '\\n' +\n '{\\n' +\n ' \"extends\": \"/Users/giladshoham/dev/temp/new-react-18-config-files/node_modules/.cache/tsconfig.bit.17b99a1071b1d2d86ed04ebce68903b82403f278.json\"\\n' +\n '}',\n name: 'tsconfig.json',\n extendingTarget:\n '/Users/giladshoham/dev/temp/new-react-18-config-files/node_modules/.cache/tsconfig.bit.17b99a1071b1d2d86ed04ebce68903b82403f278.json',\n hash: '00330a9c547353867d519c34f47e17ddc9f161d1',\n },\n envIds: ['teambit.react/react-env@0.0.44', 'teambit.react/examples/my-react-env@0.0.39'],\n },\n '3c5960bcad98570b98834a5c37f47dd4729dbef0': {\n extendingConfigFile: {\n content:\n '// bit-generated-typescript-config\\n' +\n '\\n' +\n '{\\n' +\n ' \"extends\": \"/Users/giladshoham/dev/temp/new-react-18-config-files/node_modules/.cache/tsconfig.bit.dab521d0914afe64de248743e05a169cf9b4b50c.json\"\\n' +\n '}',\n name: 'tsconfig.json',\n extendingTarget:\n '/Users/giladshoham/dev/temp/new-react-18-config-files/node_modules/.cache/tsconfig.bit.dab521d0914afe64de248743e05a169cf9b4b50c.json',\n hash: '3c5960bcad98570b98834a5c37f47dd4729dbef0',\n },\n envIds: ['teambit.node/node@0.0.16'],\n },\n};\n\nconst tsExpectedDedupedPaths: DedupedPaths = [\n {\n fileHash: '00330a9c547353867d519c34f47e17ddc9f161d1',\n paths: ['test-new-envs-app', 'test-new-env/ui'],\n },\n {\n fileHash: '3c5960bcad98570b98834a5c37f47dd4729dbef0',\n paths: ['test-new-env/node'],\n },\n {\n fileHash: '816b7f584991ff21a7682ef8a4229ebf312c457f',\n paths: ['.'],\n },\n];\n\nconst eslintExtendingConfigFilesMap: ExtendingConfigFilesMap = {\n '8810839e74a9c41694bb5a2a8587dcae71dc389d': {\n extendingConfigFile: {\n content:\n '// bit-generated-eslint-config\\n' +\n '{\\n' +\n ' \"extends\": [\\n' +\n ' \"/Users/giladshoham/dev/temp/new-react-18-config-files/node_modules/.cache/.eslintrc.bit.be8facfbdcf1db685d5020f8612d8c2c3ac2eb7c.json\"\\n' +\n ' ]\\n' +\n '}',\n name: '.eslintrc.json',\n extendingTarget:\n '/Users/giladshoham/dev/temp/new-react-18-config-files/node_modules/.cache/.eslintrc.bit.be8facfbdcf1db685d5020f8612d8c2c3ac2eb7c.json',\n hash: '8810839e74a9c41694bb5a2a8587dcae71dc389d',\n },\n envIds: ['teambit.harmony/node', 'teambit.react/react', 'teambit.envs/env'],\n },\n ff6ea265e6f21ce25f7985570beef37dd957d0dc: {\n extendingConfigFile: {\n content:\n '// bit-generated-eslint-config\\n' +\n '{\\n' +\n ' \"extends\": [\\n' +\n ' \"/Users/giladshoham/dev/temp/new-react-18-config-files/node_modules/.cache/.eslintrc.bit.e5ca5528c64e0442b05b949fea42cdda4243d840.json\"\\n' +\n ' ]\\n' +\n '}',\n name: '.eslintrc.json',\n extendingTarget:\n '/Users/giladshoham/dev/temp/new-react-18-config-files/node_modules/.cache/.eslintrc.bit.e5ca5528c64e0442b05b949fea42cdda4243d840.json',\n hash: 'ff6ea265e6f21ce25f7985570beef37dd957d0dc',\n },\n envIds: ['teambit.react/react-env@0.0.44'],\n },\n '91021f2c973a2940c70b75447639e4ea2a799955': {\n extendingConfigFile: {\n content:\n '// bit-generated-eslint-config\\n' +\n '{\\n' +\n ' \"extends\": [\\n' +\n ' \"/Users/giladshoham/dev/temp/new-react-18-config-files/node_modules/.cache/.eslintrc.bit.7f229bf5ab41e8bfe61916de6c68f9c14c76f23e.json\"\\n' +\n ' ]\\n' +\n '}',\n name: '.eslintrc.json',\n extendingTarget:\n '/Users/giladshoham/dev/temp/new-react-18-config-files/node_modules/.cache/.eslintrc.bit.7f229bf5ab41e8bfe61916de6c68f9c14c76f23e.json',\n hash: '91021f2c973a2940c70b75447639e4ea2a799955',\n },\n envIds: ['teambit.mdx/mdx-env@0.0.6', 'teambit.react/examples/my-react-env@0.0.39'],\n },\n f1743b227e588db0c59d4a43171653e6c4262816: {\n extendingConfigFile: {\n content:\n '// bit-generated-eslint-config\\n' +\n '{\\n' +\n ' \"extends\": [\\n' +\n ' \"/Users/giladshoham/dev/temp/new-react-18-config-files/node_modules/.cache/.eslintrc.bit.c503f7386e2a637d91c74f7df90d8fafe79c4378.json\"\\n' +\n ' ]\\n' +\n '}',\n name: '.eslintrc.json',\n extendingTarget:\n '/Users/giladshoham/dev/temp/new-react-18-config-files/node_modules/.cache/.eslintrc.bit.c503f7386e2a637d91c74f7df90d8fafe79c4378.json',\n hash: 'f1743b227e588db0c59d4a43171653e6c4262816',\n },\n envIds: ['teambit.node/node@0.0.16'],\n },\n};\n\nconst eslintExpectedDedupedPaths: DedupedPaths = [\n {\n fileHash: 'ff6ea265e6f21ce25f7985570beef37dd957d0dc',\n paths: ['test-new-envs-app', 'test-new-env/ui/button2'],\n },\n {\n fileHash: '91021f2c973a2940c70b75447639e4ea2a799955',\n paths: ['test-new-env/mdx', 'test-new-env/ui/button'],\n },\n {\n fileHash: 'f1743b227e588db0c59d4a43171653e6c4262816',\n paths: ['test-new-env/node'],\n },\n {\n fileHash: '8810839e74a9c41694bb5a2a8587dcae71dc389d',\n paths: ['.'],\n },\n];\n\nconst prettierExtendingConfigFilesMap: ExtendingConfigFilesMap = {\n '082f546b2555ea89e7063b20de47c039d387fc74': {\n extendingConfigFile: {\n content:\n '// bit-generated-prettier-config\\n' +\n 'module.exports = {\\n' +\n \" ...require('/Users/giladshoham/dev/temp/new-react-18-config-files/node_modules/.cache/.prettierrc.bit.e4882af8861bcf5b0147891d8b70b40a10428881.cjs')\\n\" +\n '}',\n name: '.prettierrc.cjs',\n extendingTarget:\n '/Users/giladshoham/dev/temp/new-react-18-config-files/node_modules/.cache/.prettierrc.bit.e4882af8861bcf5b0147891d8b70b40a10428881.cjs',\n hash: '082f546b2555ea89e7063b20de47c039d387fc74',\n },\n envIds: [\n 'teambit.harmony/node',\n 'teambit.react/react-env@0.0.44',\n 'teambit.react/react',\n 'teambit.envs/env',\n 'teambit.mdx/mdx-env@0.0.6',\n 'teambit.node/node@0.0.16',\n 'teambit.react/examples/my-react-env@0.0.39',\n ],\n },\n};\n\nconst prettierExpectedDedupedPaths: DedupedPaths = [\n {\n fileHash: '082f546b2555ea89e7063b20de47c039d387fc74',\n paths: ['.'],\n },\n];\n\ndescribe('Workspace Config files - dedupe paths', function () {\n this.timeout(0);\n\n describe('dedupePaths', () => {\n describe('ts example', () => {\n let result: DedupedPaths;\n before(async () => {\n // @ts-ignore (we don't really care about the env itself here)\n result = dedupePaths(tsExtendingConfigFilesMap, envCompsDirsMap);\n });\n\n it('should reduce files to minimum necessary', async () => {\n expect(result).to.have.lengthOf(tsExpectedDedupedPaths.length);\n });\n\n it('should place files in correct folders', async () => {\n expect(result).to.deep.equal(tsExpectedDedupedPaths);\n });\n });\n\n describe('eslint example', () => {\n let result: DedupedPaths;\n before(async () => {\n // @ts-ignore (we don't really care about the env itself here)\n result = dedupePaths(eslintExtendingConfigFilesMap, envCompsDirsMap);\n });\n\n it('should reduce files to minimum necessary', async () => {\n expect(result).to.have.lengthOf(eslintExpectedDedupedPaths.length);\n });\n\n it('should place files in correct folders', async () => {\n expect(result).to.deep.equal(eslintExpectedDedupedPaths);\n });\n });\n\n describe('prettier example', () => {\n let result: DedupedPaths;\n before(async () => {\n // @ts-ignore (we don't really care about the env itself here)\n result = dedupePaths(prettierExtendingConfigFilesMap, envCompsDirsMap);\n });\n\n it('should reduce files to minimum necessary', async () => {\n expect(result).to.have.lengthOf(prettierExpectedDedupedPaths.length);\n });\n\n it('should place files in correct folders', async () => {\n expect(result).to.deep.equal(prettierExpectedDedupedPaths);\n });\n });\n });\n});\n"],"mappings":";;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAGA,MAAMA,eAAe,GAAG;EACtB,sBAAsB,EAAE;IACtBC,EAAE,EAAE,sBAAsB;IAC1BC,KAAK,EAAE,CACL,4BAA4B,EAC5B,4BAA4B,EAC5B,2BAA2B,EAC3B,4BAA4B,EAC5B,kCAAkC,EAClC,sCAAsC,EACtC,wBAAwB,EACxB,4BAA4B,EAC5B,6BAA6B,EAC7B,gCAAgC,EAChC,iCAAiC,EACj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Y;QACtD,IAAAC,cAAM,EAACJ,MAAM,CAAC,CAACK,EAAE,CAACI,IAAI,CAACC,KAAK,CAACf,0BAA0B,CAAC;MAC1D,CAAC,CAAC;IACJ,CAAC,CAAC;IAEFG,QAAQ,CAAC,kBAAkB,EAAE,MAAM;MACjC,IAAIE,MAAoB;MACxBC,MAAM,CAAC,YAAY;QACjB;QACAD,MAAM,GAAG,IAAAE,yBAAW,EAACN,+BAA+B,EAAEhB,eAAe,CAAC;MACxE,CAAC,CAAC;MAEFuB,EAAE,CAAC,0CAA0C,EAAE,YAAY;QACzD,IAAAC,cAAM,EAACJ,MAAM,CAAC,CAACK,EAAE,CAACC,IAAI,CAACC,QAAQ,CAACV,4BAA4B,CAACW,MAAM,CAAC;MACtE,CAAC,CAAC;MAEFL,EAAE,CAAC,uCAAuC,EAAE,YAAY;QACtD,IAAAC,cAAM,EAACJ,MAAM,CAAC,CAACK,EAAE,CAACI,IAAI,CAACC,KAAK,CAACb,4BAA4B,CAAC;MAC5D,CAAC,CAAC;IACJ,CAAC,CAAC;EACJ,CAAC,CAAC;AACJ,CAAC,CAAC"}
1
+ {"version":3,"names":["envCompsDirsMap","id","paths","tsExtendingConfigFilesMap","extendingConfigFile","useAbsPaths","content","name","extendingTarget","hash","filePath","envIds","tsExpectedDedupedPaths","fileHash","eslintExtendingConfigFilesMap","ff6ea265e6f21ce25f7985570beef37dd957d0dc","f1743b227e588db0c59d4a43171653e6c4262816","eslintExpectedDedupedPaths","prettierExtendingConfigFilesMap","prettierExpectedDedupedPaths","describe","timeout","result","before","dedupePaths","it","expect","to","have","lengthOf","length","deep","equal"],"sources":["dedup-paths.spec.ts"],"sourcesContent":["import { expect } from 'chai';\nimport { DedupedPaths, dedupePaths } from './dedup-paths';\nimport { ExtendingConfigFilesMap } from './workspace-config-files.main.runtime';\n\nconst envCompsDirsMap = {\n 'teambit.harmony/node': {\n id: 'teambit.harmony/node',\n paths: [\n 'react/apps/react-app-types',\n 'compilation/babel-compiler',\n 'compilation/compiler-task',\n 'mdx/compilers/mdx-compiler',\n 'mdx/compilers/mdx-multi-compiler',\n 'compilation/compilers/multi-compiler',\n 'defender/eslint-linter',\n 'mdx/generator/mdx-starters',\n 'mdx/generator/mdx-templates',\n 'react/generator/react-starters',\n 'react/generator/react-templates',\n 'defender/jest-tester',\n 'react/jest/react-jest',\n 'defender/linter-task',\n 'defender/mocha-tester',\n 'compilation/modules/babel-file-transpiler',\n 'defender/prettier-formatter',\n 'preview/react-preview',\n 'defender/tester-task',\n 'typescript/typescript-compiler',\n 'webpack/webpack-bundler',\n 'webpack/webpack-dev-server',\n 'react/webpack/react-webpack',\n ],\n },\n 'teambit.react/react-env@0.0.44': {\n id: 'teambit.react/react-env@0.0.44',\n paths: ['test-new-envs-app/apps/test-app', 'test-new-env/ui/button2'],\n },\n 'teambit.react/react': {\n id: 'teambit.react/react',\n paths: ['docs/docs-template', 'react/mounter'],\n },\n 'teambit.envs/env': {\n id: 'teambit.envs/env',\n paths: [\n 'react/examples/my-react-env',\n 'mdx/mdx-env',\n 'node/node',\n 'node/node-env-extension',\n 'react/react-env',\n 'react/react-env-extension',\n ],\n },\n 'teambit.mdx/mdx-env@0.0.6': {\n id: 'teambit.mdx/mdx-env@0.0.6',\n paths: ['test-new-env/mdx/content-comp'],\n },\n 'teambit.node/node@0.0.16': {\n id: 'teambit.node/node@0.0.16',\n paths: ['test-new-env/node/node-comp1', 'test-new-env/node/node-comp2'],\n },\n 'teambit.react/examples/my-react-env@0.0.39': {\n id: 'teambit.react/examples/my-react-env@0.0.39',\n paths: ['test-new-env/ui/button'],\n },\n};\n\nconst tsExtendingConfigFilesMap: ExtendingConfigFilesMap = {\n '816b7f584991ff21a7682ef8a4229ebf312c457f': {\n extendingConfigFile: {\n useAbsPaths: false,\n content:\n '// bit-generated-typescript-config\\n' +\n '\\n' +\n '{\\n' +\n ' \"extends\": \"/Users/giladshoham/dev/temp/new-react-18-config-files/node_modules/.cache/tsconfig.bit.4957ea3122e57ea3302aadd885eed84127d9c54b.json\"\\n' +\n '}',\n name: 'tsconfig.json',\n extendingTarget: {\n hash: '4957ea3122e57ea3302aadd885eed84127d9c54b',\n content: 'does not matter',\n name: 'tsconfig.bit.4957ea3122e57ea3302aadd885eed84127d9c54b.json',\n filePath:\n '/Users/giladshoham/dev/temp/new-react-18-config-files/node_modules/.cache/tsconfig.bit.4957ea3122e57ea3302aadd885eed84127d9c54b.json',\n },\n\n hash: '816b7f584991ff21a7682ef8a4229ebf312c457f',\n },\n envIds: ['teambit.harmony/node', 'teambit.react/react'],\n },\n '00330a9c547353867d519c34f47e17ddc9f161d1': {\n extendingConfigFile: {\n useAbsPaths: false,\n content:\n '// bit-generated-typescript-config\\n' +\n '\\n' +\n '{\\n' +\n ' \"extends\": \"/Users/giladshoham/dev/temp/new-react-18-config-files/node_modules/.cache/tsconfig.bit.17b99a1071b1d2d86ed04ebce68903b82403f278.json\"\\n' +\n '}',\n name: 'tsconfig.json',\n extendingTarget: {\n hash: '17b99a1071b1d2d86ed04ebce68903b82403f278',\n content: 'does not matter',\n name: 'tsconfig.bit.17b99a1071b1d2d86ed04ebce68903b82403f278.json',\n filePath:\n '/Users/giladshoham/dev/temp/new-react-18-config-files/node_modules/.cache/tsconfig.bit.17b99a1071b1d2d86ed04ebce68903b82403f278.json',\n },\n hash: '00330a9c547353867d519c34f47e17ddc9f161d1',\n },\n envIds: ['teambit.react/react-env@0.0.44', 'teambit.react/examples/my-react-env@0.0.39'],\n },\n '3c5960bcad98570b98834a5c37f47dd4729dbef0': {\n extendingConfigFile: {\n useAbsPaths: false,\n content:\n '// bit-generated-typescript-config\\n' +\n '\\n' +\n '{\\n' +\n ' \"extends\": \"/Users/giladshoham/dev/temp/new-react-18-config-files/node_modules/.cache/tsconfig.bit.dab521d0914afe64de248743e05a169cf9b4b50c.json\"\\n' +\n '}',\n name: 'tsconfig.json',\n extendingTarget: {\n hash: 'dab521d0914afe64de248743e05a169cf9b4b50c',\n content: 'does not matter',\n name: 'tsconfig.bit.dab521d0914afe64de248743e05a169cf9b4b50c.json',\n filePath:\n '/Users/giladshoham/dev/temp/new-react-18-config-files/node_modules/.cache/tsconfig.bit.dab521d0914afe64de248743e05a169cf9b4b50c.json',\n },\n hash: '3c5960bcad98570b98834a5c37f47dd4729dbef0',\n },\n envIds: ['teambit.node/node@0.0.16'],\n },\n};\n\nconst tsExpectedDedupedPaths: DedupedPaths = [\n {\n fileHash: '00330a9c547353867d519c34f47e17ddc9f161d1',\n paths: ['test-new-envs-app', 'test-new-env/ui'],\n },\n {\n fileHash: '3c5960bcad98570b98834a5c37f47dd4729dbef0',\n paths: ['test-new-env/node'],\n },\n {\n fileHash: '816b7f584991ff21a7682ef8a4229ebf312c457f',\n paths: ['.'],\n },\n];\n\nconst eslintExtendingConfigFilesMap: ExtendingConfigFilesMap = {\n '8810839e74a9c41694bb5a2a8587dcae71dc389d': {\n extendingConfigFile: {\n useAbsPaths: false,\n content:\n '// bit-generated-eslint-config\\n' +\n '{\\n' +\n ' \"extends\": [\\n' +\n ' \"/Users/giladshoham/dev/temp/new-react-18-config-files/node_modules/.cache/.eslintrc.bit.be8facfbdcf1db685d5020f8612d8c2c3ac2eb7c.json\"\\n' +\n ' ]\\n' +\n '}',\n name: '.eslintrc.json',\n extendingTarget: {\n hash: 'be8facfbdcf1db685d5020f8612d8c2c3ac2eb7c',\n content: 'does not matter',\n name: '.eslintrc.bit.be8facfbdcf1db685d5020f8612d8c2c3ac2eb7c.json',\n filePath:\n '/Users/giladshoham/dev/temp/new-react-18-config-files/node_modules/.cache/.eslintrc.bit.be8facfbdcf1db685d5020f8612d8c2c3ac2eb7c.json',\n },\n hash: '8810839e74a9c41694bb5a2a8587dcae71dc389d',\n },\n envIds: ['teambit.harmony/node', 'teambit.react/react', 'teambit.envs/env'],\n },\n ff6ea265e6f21ce25f7985570beef37dd957d0dc: {\n extendingConfigFile: {\n useAbsPaths: false,\n content:\n '// bit-generated-eslint-config\\n' +\n '{\\n' +\n ' \"extends\": [\\n' +\n ' \"/Users/giladshoham/dev/temp/new-react-18-config-files/node_modules/.cache/.eslintrc.bit.e5ca5528c64e0442b05b949fea42cdda4243d840.json\"\\n' +\n ' ]\\n' +\n '}',\n name: '.eslintrc.json',\n extendingTarget: {\n hash: 'e5ca5528c64e0442b05b949fea42cdda4243d840',\n content: 'does not matter',\n name: '.eslintrc.bit.e5ca5528c64e0442b05b949fea42cdda4243d840.json',\n filePath:\n '/Users/giladshoham/dev/temp/new-react-18-config-files/node_modules/.cache/.eslintrc.bit.e5ca5528c64e0442b05b949fea42cdda4243d840.json',\n },\n hash: 'ff6ea265e6f21ce25f7985570beef37dd957d0dc',\n },\n envIds: ['teambit.react/react-env@0.0.44'],\n },\n '91021f2c973a2940c70b75447639e4ea2a799955': {\n extendingConfigFile: {\n useAbsPaths: false,\n content:\n '// bit-generated-eslint-config\\n' +\n '{\\n' +\n ' \"extends\": [\\n' +\n ' \"/Users/giladshoham/dev/temp/new-react-18-config-files/node_modules/.cache/.eslintrc.bit.7f229bf5ab41e8bfe61916de6c68f9c14c76f23e.json\"\\n' +\n ' ]\\n' +\n '}',\n name: '.eslintrc.json',\n extendingTarget: {\n hash: '7f229bf5ab41e8bfe61916de6c68f9c14c76f23e',\n content: 'does not matter',\n name: '.eslintrc.bit.7f229bf5ab41e8bfe61916de6c68f9c14c76f23e.json',\n filePath:\n '/Users/giladshoham/dev/temp/new-react-18-config-files/node_modules/.cache/.eslintrc.bit.7f229bf5ab41e8bfe61916de6c68f9c14c76f23e.json',\n },\n hash: '91021f2c973a2940c70b75447639e4ea2a799955',\n },\n envIds: ['teambit.mdx/mdx-env@0.0.6', 'teambit.react/examples/my-react-env@0.0.39'],\n },\n f1743b227e588db0c59d4a43171653e6c4262816: {\n extendingConfigFile: {\n useAbsPaths: false,\n content:\n '// bit-generated-eslint-config\\n' +\n '{\\n' +\n ' \"extends\": [\\n' +\n ' \"/Users/giladshoham/dev/temp/new-react-18-config-files/node_modules/.cache/.eslintrc.bit.c503f7386e2a637d91c74f7df90d8fafe79c4378.json\"\\n' +\n ' ]\\n' +\n '}',\n name: '.eslintrc.json',\n extendingTarget: {\n hash: 'c503f7386e2a637d91c74f7df90d8fafe79c4378',\n content: 'does not matter',\n name: '.eslintrc.bit.c503f7386e2a637d91c74f7df90d8fafe79c4378.json',\n filePath:\n '/Users/giladshoham/dev/temp/new-react-18-config-files/node_modules/.cache/.eslintrc.bit.c503f7386e2a637d91c74f7df90d8fafe79c4378.json',\n },\n hash: 'f1743b227e588db0c59d4a43171653e6c4262816',\n },\n envIds: ['teambit.node/node@0.0.16'],\n },\n};\n\nconst eslintExpectedDedupedPaths: DedupedPaths = [\n {\n fileHash: 'ff6ea265e6f21ce25f7985570beef37dd957d0dc',\n paths: ['test-new-envs-app', 'test-new-env/ui/button2'],\n },\n {\n fileHash: '91021f2c973a2940c70b75447639e4ea2a799955',\n paths: ['test-new-env/mdx', 'test-new-env/ui/button'],\n },\n {\n fileHash: 'f1743b227e588db0c59d4a43171653e6c4262816',\n paths: ['test-new-env/node'],\n },\n {\n fileHash: '8810839e74a9c41694bb5a2a8587dcae71dc389d',\n paths: ['.'],\n },\n];\n\nconst prettierExtendingConfigFilesMap: ExtendingConfigFilesMap = {\n '082f546b2555ea89e7063b20de47c039d387fc74': {\n extendingConfigFile: {\n useAbsPaths: false,\n content:\n '// bit-generated-prettier-config\\n' +\n 'module.exports = {\\n' +\n \" ...require('/Users/giladshoham/dev/temp/new-react-18-config-files/node_modules/.cache/.prettierrc.bit.e4882af8861bcf5b0147891d8b70b40a10428881.cjs')\\n\" +\n '}',\n name: '.prettierrc.cjs',\n extendingTarget: {\n hash: 'e4882af8861bcf5b0147891d8b70b40a10428881',\n content: 'does not matter',\n name: '.prettierrc.bit.e4882af8861bcf5b0147891d8b70b40a10428881.cjs',\n filePath:\n '/Users/giladshoham/dev/temp/new-react-18-config-files/node_modules/.cache/.prettierrc.bit.e4882af8861bcf5b0147891d8b70b40a10428881.cjs',\n },\n hash: '082f546b2555ea89e7063b20de47c039d387fc74',\n },\n envIds: [\n 'teambit.harmony/node',\n 'teambit.react/react-env@0.0.44',\n 'teambit.react/react',\n 'teambit.envs/env',\n 'teambit.mdx/mdx-env@0.0.6',\n 'teambit.node/node@0.0.16',\n 'teambit.react/examples/my-react-env@0.0.39',\n ],\n },\n};\n\nconst prettierExpectedDedupedPaths: DedupedPaths = [\n {\n fileHash: '082f546b2555ea89e7063b20de47c039d387fc74',\n paths: ['.'],\n },\n];\n\ndescribe('Workspace Config files - dedupe paths', function () {\n this.timeout(0);\n\n describe('dedupePaths', () => {\n describe('ts example', () => {\n let result: DedupedPaths;\n before(async () => {\n // @ts-ignore (we don't really care about the env itself here)\n result = dedupePaths(tsExtendingConfigFilesMap, envCompsDirsMap);\n });\n\n it('should reduce files to minimum necessary', async () => {\n expect(result).to.have.lengthOf(tsExpectedDedupedPaths.length);\n });\n\n it('should place files in correct folders', async () => {\n expect(result).to.deep.equal(tsExpectedDedupedPaths);\n });\n });\n\n describe('eslint example', () => {\n let result: DedupedPaths;\n before(async () => {\n // @ts-ignore (we don't really care about the env itself here)\n result = dedupePaths(eslintExtendingConfigFilesMap, envCompsDirsMap);\n });\n\n it('should reduce files to minimum necessary', async () => {\n expect(result).to.have.lengthOf(eslintExpectedDedupedPaths.length);\n });\n\n it('should place files in correct folders', async () => {\n expect(result).to.deep.equal(eslintExpectedDedupedPaths);\n });\n });\n\n describe('prettier example', () => {\n let result: DedupedPaths;\n before(async () => {\n // @ts-ignore (we don't really care about the env itself here)\n result = dedupePaths(prettierExtendingConfigFilesMap, envCompsDirsMap);\n });\n\n it('should reduce files to minimum necessary', async () => {\n expect(result).to.have.lengthOf(prettierExpectedDedupedPaths.length);\n });\n\n it('should place files in correct folders', async () => {\n expect(result).to.deep.equal(prettierExpectedDedupedPaths);\n });\n });\n });\n});\n"],"mappings":";;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAGA,MA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A0B,CAACa,MAAM,CAAC;MACpE,CAAC,CAAC;MAEFL,EAAE,CAAC,uCAAuC,EAAE,YAAY;QACtD,IAAAC,cAAM,EAACJ,MAAM,CAAC,CAACK,EAAE,CAACI,IAAI,CAACC,KAAK,CAACf,0BAA0B,CAAC;MAC1D,CAAC,CAAC;IACJ,CAAC,CAAC;IAEFG,QAAQ,CAAC,kBAAkB,EAAE,MAAM;MACjC,IAAIE,MAAoB;MACxBC,MAAM,CAAC,YAAY;QACjB;QACAD,MAAM,GAAG,IAAAE,yBAAW,EAACN,+BAA+B,EAAElB,eAAe,CAAC;MACxE,CAAC,CAAC;MAEFyB,EAAE,CAAC,0CAA0C,EAAE,YAAY;QACzD,IAAAC,cAAM,EAACJ,MAAM,CAAC,CAACK,EAAE,CAACC,IAAI,CAACC,QAAQ,CAACV,4BAA4B,CAACW,MAAM,CAAC;MACtE,CAAC,CAAC;MAEFL,EAAE,CAAC,uCAAuC,EAAE,YAAY;QACtD,IAAAC,cAAM,EAACJ,MAAM,CAAC,CAACK,EAAE,CAACI,IAAI,CAACC,KAAK,CAACb,4BAA4B,CAAC;MAC5D,CAAC,CAAC;IACJ,CAAC,CAAC;EACJ,CAAC,CAAC;AACJ,CAAC,CAAC"}
@@ -98,7 +98,7 @@ function getExtendingConfigFilesOutput(extendingConfigFiles, wsDir) {
98
98
  function getEnvGroupExtendingConfigFilesOutput(envsWrittenExtendingConfigFile, wsDir) {
99
99
  const title = ` The following paths are according to env(s) ${_chalk().default.bold(envsWrittenExtendingConfigFile.envIds.join(', '))}`;
100
100
  const extendingConfigFile = envsWrittenExtendingConfigFile.extendingConfigFile;
101
- const paths = extendingConfigFile.filePaths.map(p => ` ${(0, _path().relative)(wsDir, p)} --> ${(0, _path().relative)(wsDir, extendingConfigFile.extendingTarget)}`).join('\n ');
101
+ const paths = extendingConfigFile.filePaths.map(p => ` ${(0, _path().relative)(wsDir, p)} --> ${(0, _path().relative)(wsDir, extendingConfigFile.extendingTarget.filePath)}`).join('\n ');
102
102
  return `${title}\n ${paths}`;
103
103
  }
104
104
 
@@ -1 +1 @@
1
- {"version":3,"names":["formatListOutput","result","head","rows","map","entry","aspectId","configWriter","name","cliName","table","Table","style","push","toString","formatWriteOutput","writeConfigFilesResult","flags","cleanResults","writeResults","wsDir","isDryRun","dryRun","dryRunWithContent","cleanResultsOutput","getCleanResultsOutput","writeResultsOutput","getWriteResultsOutput","formatCleanOutput","chalk","green","length","join","totalFiles","totalWrittenFiles","writeTitle","writeOutput","aspectsWritersResults","aspectWritersResults","getOneAspectOutput","title","blue","bold","writersOutput","writersResult","oneWritersResults","getOneWriterOutput","cyan","realConfigFilesOutput","getRealConfigFilesOutput","configFiles","extendingConfigFilesOutput","getExtendingConfigFilesOutput","extendingConfigFiles","envsWrittenConfigFiles","magenta","writtenConfigFilesOutput","envsWrittenConfigFile","getEnvGroupConfigFilesOutput","envIds","filePath","relative","configFile","envsWrittenExtendingConfigFile","getEnvGroupExtendingConfigFilesOutput","extendingConfigFile","paths","filePaths","p","extendingTarget"],"sources":["format-outputs.ts"],"sourcesContent":["import Table from 'cli-table';\nimport chalk from 'chalk';\nimport { relative } from 'path';\nimport {\n AspectWritersResults,\n ConfigWritersList,\n EnvsWrittenConfigFile,\n EnvsWrittenConfigFiles,\n EnvsWrittenExtendingConfigFile,\n EnvsWrittenExtendingConfigFiles,\n OneConfigFileWriterResult,\n WriteConfigFilesResult,\n} from './workspace-config-files.main.runtime';\nimport type { CleanConfigCmdFlags, WriteConfigCmdFlags } from './ws-config.cmd';\n\nexport function formatListOutput(result: ConfigWritersList): string {\n const head = ['Aspect ID', 'name', 'CLI name'];\n\n const rows = result.map((entry) => {\n return [entry.aspectId, entry.configWriter.name, entry.configWriter.cliName];\n });\n const table = new Table({ head, style: { head: ['cyan'] } });\n table.push(...rows);\n return table.toString();\n}\nexport function formatWriteOutput(writeConfigFilesResult: WriteConfigFilesResult, flags: WriteConfigCmdFlags): string {\n const { cleanResults, writeResults, wsDir } = writeConfigFilesResult;\n const isDryRun = !!(flags.dryRun || flags.dryRunWithContent);\n const cleanResultsOutput = getCleanResultsOutput(cleanResults, isDryRun);\n const writeResultsOutput = getWriteResultsOutput(writeResults, wsDir, isDryRun);\n\n return `${cleanResultsOutput}${writeResultsOutput}`;\n}\n\nexport function formatCleanOutput(cleanResults: string[] = [], flags: CleanConfigCmdFlags): string {\n const isDryRun = !!flags.dryRun;\n const cleanResultsOutput = getCleanResultsOutput(cleanResults, isDryRun);\n\n return `${cleanResultsOutput}`;\n}\n\nfunction getCleanResultsOutput(cleanResults: string[] | undefined, isDryRun: boolean) {\n const cleanResultsOutput = cleanResults\n ? `${chalk.green(\n `the following ${cleanResults.length} paths ${isDryRun ? 'will be' : 'were'} deleted:`\n )}\\n ${cleanResults.join('\\n ')}\\n`\n : '';\n return cleanResultsOutput;\n}\nfunction getWriteResultsOutput(writeResults: WriteConfigFilesResult['writeResults'], wsDir: string, isDryRun: boolean) {\n const totalFiles = writeResults.totalWrittenFiles;\n\n const writeTitle = isDryRun\n ? chalk.green(`${totalFiles} files will be written`)\n : chalk.green(`${totalFiles} files have been written successfully`);\n const writeOutput = writeResults.aspectsWritersResults\n .map((aspectWritersResults) => getOneAspectOutput(aspectWritersResults, wsDir))\n .join('\\n\\n');\n return `${writeTitle}\\n${writeOutput}`;\n}\nfunction getOneAspectOutput(aspectWritersResults: AspectWritersResults, wsDir: string): string {\n const title = chalk.blue(\n `The following paths are according to aspect ${chalk.bold(aspectWritersResults.aspectId.toString())}`\n );\n const writersOutput = aspectWritersResults.writersResult\n .map((oneWritersResults) => getOneWriterOutput(oneWritersResults, wsDir))\n .join('\\n\\n');\n return `${title}\\n${writersOutput}`;\n}\nfunction getOneWriterOutput(oneWritersResults: OneConfigFileWriterResult, wsDir: string): string {\n const title = chalk.cyan(` The following paths are according to writer ${chalk.bold(oneWritersResults.name)}`);\n const realConfigFilesOutput = getRealConfigFilesOutput(oneWritersResults.configFiles, wsDir);\n const extendingConfigFilesOutput = getExtendingConfigFilesOutput(oneWritersResults.extendingConfigFiles, wsDir);\n return `${title}\\n${realConfigFilesOutput}\\n\\n${extendingConfigFilesOutput}`;\n}\n\nfunction getRealConfigFilesOutput(envsWrittenConfigFiles: EnvsWrittenConfigFiles, wsDir: string): string {\n const title = chalk.magenta(` Real config files`);\n const writtenConfigFilesOutput = envsWrittenConfigFiles\n .map((envsWrittenConfigFile) => getEnvGroupConfigFilesOutput(envsWrittenConfigFile, wsDir))\n .join('\\n\\n');\n return `${title}\\n${writtenConfigFilesOutput}`;\n}\nfunction getEnvGroupConfigFilesOutput(envsWrittenConfigFile: EnvsWrittenConfigFile, wsDir: string): string {\n const title = ` The following paths are according to env(s) ${chalk.bold(\n envsWrittenConfigFile.envIds.join(', ')\n )}`;\n const filePath = relative(wsDir, envsWrittenConfigFile.configFile.filePath);\n return `${title}\\n ${filePath}`;\n}\nfunction getExtendingConfigFilesOutput(extendingConfigFiles: EnvsWrittenExtendingConfigFiles, wsDir: string): string {\n const title = chalk.magenta(` Extending config files`);\n\n const extendingConfigFilesOutput = extendingConfigFiles\n .map((envsWrittenExtendingConfigFile) =>\n getEnvGroupExtendingConfigFilesOutput(envsWrittenExtendingConfigFile, wsDir)\n )\n .join('\\n\\n');\n return `${title}\\n${extendingConfigFilesOutput}`;\n}\nfunction getEnvGroupExtendingConfigFilesOutput(\n envsWrittenExtendingConfigFile: EnvsWrittenExtendingConfigFile,\n wsDir: string\n): string {\n const title = ` The following paths are according to env(s) ${chalk.bold(\n envsWrittenExtendingConfigFile.envIds.join(', ')\n )}`;\n const extendingConfigFile = envsWrittenExtendingConfigFile.extendingConfigFile;\n const paths = extendingConfigFile.filePaths\n .map((p) => ` ${relative(wsDir, p)} --> ${relative(wsDir, extendingConfigFile.extendingTarget)}`)\n .join('\\n ');\n return `${title}\\n ${paths}`;\n}\n"],"mappings":";;;;;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA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MAAMJ,0BAA0B,GAAGE,oBAAoB,CACpDjD,GAAG,CAAE2D,8BAA8B,IAClCC,qCAAqC,CAACD,8BAA8B,EAAE3C,KAAK,CAAC,CAC7E,CACAY,IAAI,CAAC,MAAM,CAAC;EACf,OAAQ,GAAEQ,KAAM,KAAIW,0BAA2B,EAAC;AAClD;AACA,SAASa,qCAAqC,CAC5CD,8BAA8D,EAC9D3C,KAAa,EACL;EACR,MAAMoB,KAAK,GAAI,mDAAkDX,gBAAK,CAACa,IAAI,CACzEqB,8BAA8B,CAACJ,MAAM,CAAC3B,IAAI,CAAC,IAAI,CAAC,CAChD,EAAC;EACH,MAAMiC,mBAAmB,GAAGF,8BAA8B,CAACE,mBAAmB;EAC9E,MAAMC,KAAK,GAAGD,mBAAmB,CAACE,SAAS,CACxC/D,GAAG,CAAEgE,CAAC,IAAM,KAAI,IAAAP,gBAAQ,EAACzC,KAAK,EAAEgD,CAAC,CAAE,QAAO,IAAAP,gBAAQ,EAACzC,KAAK,EAAE6C,mBAAmB,CAACI,eAAe,CAAE,EAAC,CAAC,CACjGrC,IAAI,CAAC,QAAQ,CAAC;EACjB,OAAQ,GAAEQ,KAAM,SAAQ0B,KAAM,EAAC;AACjC"}
1
+ {"version":3,"names":["formatListOutput","result","head","rows","map","entry","aspectId","configWriter","name","cliName","table","Table","style","push","toString","formatWriteOutput","writeConfigFilesResult","flags","cleanResults","writeResults","wsDir","isDryRun","dryRun","dryRunWithContent","cleanResultsOutput","getCleanResultsOutput","writeResultsOutput","getWriteResultsOutput","formatCleanOutput","chalk","green","length","join","totalFiles","totalWrittenFiles","writeTitle","writeOutput","aspectsWritersResults","aspectWritersResults","getOneAspectOutput","title","blue","bold","writersOutput","writersResult","oneWritersResults","getOneWriterOutput","cyan","realConfigFilesOutput","getRealConfigFilesOutput","configFiles","extendingConfigFilesOutput","getExtendingConfigFilesOutput","extendingConfigFiles","envsWrittenConfigFiles","magenta","writtenConfigFilesOutput","envsWrittenConfigFile","getEnvGroupConfigFilesOutput","envIds","filePath","relative","configFile","envsWrittenExtendingConfigFile","getEnvGroupExtendingConfigFilesOutput","extendingConfigFile","paths","filePaths","p","extendingTarget"],"sources":["format-outputs.ts"],"sourcesContent":["import Table from 'cli-table';\nimport chalk from 'chalk';\nimport { relative } from 'path';\nimport {\n AspectWritersResults,\n ConfigWritersList,\n EnvsWrittenConfigFile,\n EnvsWrittenConfigFiles,\n EnvsWrittenExtendingConfigFile,\n EnvsWrittenExtendingConfigFiles,\n OneConfigFileWriterResult,\n WriteConfigFilesResult,\n} from './workspace-config-files.main.runtime';\nimport type { CleanConfigCmdFlags, WriteConfigCmdFlags } from './ws-config.cmd';\n\nexport function formatListOutput(result: ConfigWritersList): string {\n const head = ['Aspect ID', 'name', 'CLI name'];\n\n const rows = result.map((entry) => {\n return [entry.aspectId, entry.configWriter.name, entry.configWriter.cliName];\n });\n const table = new Table({ head, style: { head: ['cyan'] } });\n table.push(...rows);\n return table.toString();\n}\nexport function formatWriteOutput(writeConfigFilesResult: WriteConfigFilesResult, flags: WriteConfigCmdFlags): string {\n const { cleanResults, writeResults, wsDir } = writeConfigFilesResult;\n const isDryRun = !!(flags.dryRun || flags.dryRunWithContent);\n const cleanResultsOutput = getCleanResultsOutput(cleanResults, isDryRun);\n const writeResultsOutput = getWriteResultsOutput(writeResults, wsDir, isDryRun);\n\n return `${cleanResultsOutput}${writeResultsOutput}`;\n}\n\nexport function formatCleanOutput(cleanResults: string[] = [], flags: CleanConfigCmdFlags): string {\n const isDryRun = !!flags.dryRun;\n const cleanResultsOutput = getCleanResultsOutput(cleanResults, isDryRun);\n\n return `${cleanResultsOutput}`;\n}\n\nfunction getCleanResultsOutput(cleanResults: string[] | undefined, isDryRun: boolean) {\n const cleanResultsOutput = cleanResults\n ? `${chalk.green(\n `the following ${cleanResults.length} paths ${isDryRun ? 'will be' : 'were'} deleted:`\n )}\\n ${cleanResults.join('\\n ')}\\n`\n : '';\n return cleanResultsOutput;\n}\nfunction getWriteResultsOutput(writeResults: WriteConfigFilesResult['writeResults'], wsDir: string, isDryRun: boolean) {\n const totalFiles = writeResults.totalWrittenFiles;\n\n const writeTitle = isDryRun\n ? chalk.green(`${totalFiles} files will be written`)\n : chalk.green(`${totalFiles} files have been written successfully`);\n const writeOutput = writeResults.aspectsWritersResults\n .map((aspectWritersResults) => getOneAspectOutput(aspectWritersResults, wsDir))\n .join('\\n\\n');\n return `${writeTitle}\\n${writeOutput}`;\n}\nfunction getOneAspectOutput(aspectWritersResults: AspectWritersResults, wsDir: string): string {\n const title = chalk.blue(\n `The following paths are according to aspect ${chalk.bold(aspectWritersResults.aspectId.toString())}`\n );\n const writersOutput = aspectWritersResults.writersResult\n .map((oneWritersResults) => getOneWriterOutput(oneWritersResults, wsDir))\n .join('\\n\\n');\n return `${title}\\n${writersOutput}`;\n}\nfunction getOneWriterOutput(oneWritersResults: OneConfigFileWriterResult, wsDir: string): string {\n const title = chalk.cyan(` The following paths are according to writer ${chalk.bold(oneWritersResults.name)}`);\n const realConfigFilesOutput = getRealConfigFilesOutput(oneWritersResults.configFiles, wsDir);\n const extendingConfigFilesOutput = getExtendingConfigFilesOutput(oneWritersResults.extendingConfigFiles, wsDir);\n return `${title}\\n${realConfigFilesOutput}\\n\\n${extendingConfigFilesOutput}`;\n}\n\nfunction getRealConfigFilesOutput(envsWrittenConfigFiles: EnvsWrittenConfigFiles, wsDir: string): string {\n const title = chalk.magenta(` Real config files`);\n const writtenConfigFilesOutput = envsWrittenConfigFiles\n .map((envsWrittenConfigFile) => getEnvGroupConfigFilesOutput(envsWrittenConfigFile, wsDir))\n .join('\\n\\n');\n return `${title}\\n${writtenConfigFilesOutput}`;\n}\nfunction getEnvGroupConfigFilesOutput(envsWrittenConfigFile: EnvsWrittenConfigFile, wsDir: string): string {\n const title = ` The following paths are according to env(s) ${chalk.bold(\n envsWrittenConfigFile.envIds.join(', ')\n )}`;\n const filePath = relative(wsDir, envsWrittenConfigFile.configFile.filePath);\n return `${title}\\n ${filePath}`;\n}\nfunction getExtendingConfigFilesOutput(extendingConfigFiles: EnvsWrittenExtendingConfigFiles, wsDir: string): string {\n const title = chalk.magenta(` Extending config files`);\n\n const extendingConfigFilesOutput = extendingConfigFiles\n .map((envsWrittenExtendingConfigFile) =>\n getEnvGroupExtendingConfigFilesOutput(envsWrittenExtendingConfigFile, wsDir)\n )\n .join('\\n\\n');\n return `${title}\\n${extendingConfigFilesOutput}`;\n}\nfunction getEnvGroupExtendingConfigFilesOutput(\n envsWrittenExtendingConfigFile: EnvsWrittenExtendingConfigFile,\n wsDir: string\n): string {\n const title = ` The following paths are according to env(s) ${chalk.bold(\n envsWrittenExtendingConfigFile.envIds.join(', ')\n )}`;\n const extendingConfigFile = envsWrittenExtendingConfigFile.extendingConfigFile;\n const paths = extendingConfigFile.filePaths\n .map((p) => ` ${relative(wsDir, p)} --> ${relative(wsDir, extendingConfigFile.extendingTarget.filePath)}`)\n .join('\\n ');\n return `${title}\\n ${paths}`;\n}\n"],"mappings":";;;;;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAaO,SAASA,gBAAgB,CAACC,MAAyB,EAAU;EAClE,MAAMC,IAAI,GAAG,CAAC,WAAW,EAAE,MAAM,EAAE,UAAU,CAAC;EAE9C,MAAMC,IAAI,GAAGF,MAAM,CAACG,GAAG,CAAEC,KAAK,IAAK;IACjC,OAAO,CAACA,KAAK,CAACC,QAAQ,EAAED,KAAK,CAACE,YAAY,CAACC,IAAI,EAAEH,KAAK,CAACE,YAAY,CAACE,OAAO,CAAC;EAC9E,CAAC,CAAC;EACF,MAAMC,KAAK,GAAG,KAAIC,mBAAK,EAAC;IAAET,IAAI;IAAEU,KAAK,EAAE;MAAEV,IAAI,EAAE,CAAC,MAAM;IAAE;EAAE,CAAC,CAAC;EAC5DQ,KAAK,CAACG,IAAI,CAAC,GAAGV,IAAI,CAA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IAAAP,gBAAQ,EAACzC,KAAK,EAAEgD,CAAC,CAAE,QAAO,IAAAP,gBAAQ,EAACzC,KAAK,EAAE6C,mBAAmB,CAACI,eAAe,CAACT,QAAQ,CAAE,EAAC,CAAC,CAC1G5B,IAAI,CAAC,QAAQ,CAAC;EACjB,OAAQ,GAAEQ,KAAM,SAAQ0B,KAAM,EAAC;AACjC"}
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { WorkspaceConfigFilesAspect } from './workspace-config-files.aspect';
2
2
  export type { WorkspaceConfigFilesMain, WrittenConfigFile, EnvCompsDirsMap, EnvMapValue, } from './workspace-config-files.main.runtime';
3
- export type { ConfigWriterEntry, ExtendingConfigFile, ConfigFile, PostProcessExtendingConfigFilesArgs, } from './config-writer-entry';
3
+ export type { ConfigWriterEntry, ExtendingConfigFile, ConfigFile, PostProcessExtendingConfigFilesArgs, GenerateExtendingConfigFilesArgs, } from './config-writer-entry';
4
4
  export default WorkspaceConfigFilesAspect;
5
5
  export { WorkspaceConfigFilesAspect };
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"names":["WorkspaceConfigFilesAspect"],"sources":["index.ts"],"sourcesContent":["import { WorkspaceConfigFilesAspect } from './workspace-config-files.aspect';\n\nexport type {\n WorkspaceConfigFilesMain,\n WrittenConfigFile,\n EnvCompsDirsMap,\n EnvMapValue,\n} from './workspace-config-files.main.runtime';\nexport type {\n ConfigWriterEntry,\n ExtendingConfigFile,\n ConfigFile,\n PostProcessExtendingConfigFilesArgs,\n} from './config-writer-entry';\nexport default WorkspaceConfigFilesAspect;\nexport { WorkspaceConfigFilesAspect };\n"],"mappings":";;;;;;;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAA6E,eAc9DA,kDAA0B;AAAA"}
1
+ {"version":3,"names":["WorkspaceConfigFilesAspect"],"sources":["index.ts"],"sourcesContent":["import { WorkspaceConfigFilesAspect } from './workspace-config-files.aspect';\n\nexport type {\n WorkspaceConfigFilesMain,\n WrittenConfigFile,\n EnvCompsDirsMap,\n EnvMapValue,\n} from './workspace-config-files.main.runtime';\nexport type {\n ConfigWriterEntry,\n ExtendingConfigFile,\n ConfigFile,\n PostProcessExtendingConfigFilesArgs,\n GenerateExtendingConfigFilesArgs,\n} from './config-writer-entry';\nexport default WorkspaceConfigFilesAspect;\nexport { WorkspaceConfigFilesAspect };\n"],"mappings":";;;;;;;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAA6E,eAe9DA,kDAA0B;AAAA"}
@@ -1,5 +1,5 @@
1
1
  ;
2
- import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.workspace_workspace-config-files@0.0.6/dist/workspace-config-files.docs.mdx';
2
+ import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.workspace_workspace-config-files@0.0.8/dist/workspace-config-files.docs.mdx';
3
3
 
4
4
  export const compositions = [];
5
5
  export const overview = [overview_0];
@@ -5,6 +5,8 @@ require("core-js/modules/es.array.flat.js");
5
5
  require("core-js/modules/es.array.iterator.js");
6
6
  require("core-js/modules/es.array.unscopables.flat.js");
7
7
  require("core-js/modules/es.promise.js");
8
+ require("core-js/modules/es.regexp.exec.js");
9
+ require("core-js/modules/es.string.replace.js");
8
10
  Object.defineProperty(exports, "__esModule", {
9
11
  value: true
10
12
  });
@@ -258,7 +260,7 @@ class WorkspaceConfigFilesMain {
258
260
  if (!executionContext) throw new Error(`failed finding execution context for env ${envId}`);
259
261
  const writtenConfigFiles = await this.handleRealConfigFiles(envId, envMapValue, executionContext, configWriter, configsRootDir, writtenConfigFilesMap, opts);
260
262
  if (writtenConfigFiles) {
261
- this.buildExtendingConfigFilesMap(configWriter, writtenConfigFiles, envId, extendingConfigFilesMap);
263
+ this.buildExtendingConfigFilesMap(configWriter, writtenConfigFiles, envId, extendingConfigFilesMap, envCompsDirsMap, configsRootDir, opts);
262
264
  }
263
265
  });
264
266
  if (!writtenConfigFilesMap || Object.keys(writtenConfigFilesMap).length === 0) {
@@ -351,8 +353,10 @@ class WorkspaceConfigFilesMain {
351
353
  });
352
354
  const writtenPaths = await Promise.all(paths.map(async path => {
353
355
  const filePath = (0, _path().join)(this.workspace.path, path, name);
356
+ const targetPath = configFile.useAbsPaths ? configFile.extendingTarget.filePath : (0, _path().relative)((0, _path().dirname)(filePath), configFile.extendingTarget.filePath);
357
+ const content = configFile.content.replace(`{${configFile.extendingTarget.name}}`, targetPath);
354
358
  if (!opts.dryRun) {
355
- await _fsExtra().default.outputFile(filePath, configFile.content);
359
+ await _fsExtra().default.outputFile(filePath, content);
356
360
  }
357
361
  return filePath;
358
362
  }));
@@ -370,8 +374,8 @@ class WorkspaceConfigFilesMain {
370
374
  }));
371
375
  return finalResult;
372
376
  }
373
- buildExtendingConfigFilesMap(configWriter, writtenConfigFiles, envId, extendingConfigFilesMap) {
374
- const extendingConfigFile = this.generateExtendingFile(configWriter, writtenConfigFiles);
377
+ buildExtendingConfigFilesMap(configWriter, writtenConfigFiles, envId, extendingConfigFilesMap, envCompsDirsMap, configsRootDir, opts) {
378
+ const extendingConfigFile = this.generateExtendingFile(configWriter, writtenConfigFiles, envCompsDirsMap, configsRootDir, opts);
375
379
  if (!extendingConfigFile) return;
376
380
  if (!extendingConfigFilesMap[extendingConfigFile.hash]) {
377
381
  extendingConfigFilesMap[extendingConfigFile.hash] = {
@@ -381,11 +385,19 @@ class WorkspaceConfigFilesMain {
381
385
  }
382
386
  extendingConfigFilesMap[extendingConfigFile.hash].envIds.push(envId);
383
387
  }
384
- generateExtendingFile(configWriter, writtenConfigFiles) {
385
- const extendingConfigFile = configWriter.generateExtendingFile(writtenConfigFiles);
388
+ generateExtendingFile(configWriter, writtenConfigFiles, envCompsDirsMap, configsRootDir, opts) {
389
+ const args = {
390
+ workspaceDir: this.workspace.path,
391
+ configsRootDir,
392
+ writtenConfigFiles,
393
+ envCompsDirsMap,
394
+ dryRun: !!opts.dryRun
395
+ };
396
+ const extendingConfigFile = configWriter.generateExtendingFile(args);
386
397
  if (!extendingConfigFile) return undefined;
387
398
  const hash = extendingConfigFile.hash || (0, _utils().sha1)(extendingConfigFile.content);
388
399
  return _objectSpread(_objectSpread({}, extendingConfigFile), {}, {
400
+ useAbsPaths: !!extendingConfigFile.useAbsPaths,
389
401
  hash
390
402
  });
391
403
  }
@@ -1 +1 @@
1
- {"version":3,"names":["WorkspaceConfigFilesMain","constructor","configWriterSlot","workspace","envs","logger","writeConfigFiles","options","execContext","getExecContext","cleanResults","clean","aspectsWritersResults","write","err","info","WriteConfigFilesFailed","totalWrittenFiles","reduce","acc","curr","writeResults","wsDir","path","cleanConfigFiles","listConfigWriters","slotEntries","toArray","result","aspectId","configWriters","map","configWriter","concat","envsExecutionContext","opts","envCompDirsMap","getEnvComponentsDirsMap","configsRootDir","getConfigsRootDir","results","pMapSeries","aspectEntry","handleOneAspectWriter","envCompsDirsMap","writers","includes","name","cliName","undefined","handleOneConfigFileWriter","compactResults","compact","writersResult","writtenConfigFilesMap","extendingConfigFilesMap","Object","entries","envId","envMapValue","executionContext","find","context","id","Error","writtenConfigFiles","handleRealConfigFiles","buildExtendingConfigFilesMap","keys","length","configFiles","totalConfigFiles","extendingConfigFiles","totalExtendingConfigFiles","fileHashPerDedupedPaths","dedupePaths","writeExtendingConfigFiles","postProcessExtendingConfigFiles","workspaceDir","writtenExtendingConfigFiles","dryRun","extendingConfigFile","filePaths","values","calculatedConfigFiles","calcConfigFiles","env","Promise","all","configFile","writtenConfigFile","writeConfigFile","hash","envIds","push","postProcessConfigFiles","sha1","content","format","filePath","join","fs","outputFile","res","finalResult","fileHash","paths","envsConfigFile","writtenPaths","extendingTarget","generateExtendingFile","getCacheDir","rootDir","components","list","runtime","createEnvironment","getEnvExecutionContext","envExecution","envRuntime","toString","value","c","componentDir","relative","getConfigWriters","getFlatConfigWriters","silent","filteredConfigWriters","filter","patterns","currPaths","globby","sync","cwd","dot","onlyFiles","ignore","filteredPaths","fullPath","isBitGenerated","flat","promptForCleaning","deleteFiles","clearStatusLine","ok","yesno","question","chalk","underline","bold","PromptCanceled","f","remove","registerConfigWriter","configWriterEntries","register","provider","cli","loggerAspect","_config","createLogger","WorkspaceConfigFilesAspect","workspaceConfigFilesMain","wsConfigCmd","WsConfigCmd","commands","WsConfigWriteCmd","WsConfigCleanCmd","WsConfigListCmd","Slot","withType","CLIAspect","WorkspaceAspect","EnvsAspect","LoggerAspect","MainRuntime","addRuntime"],"sources":["workspace-config-files.main.runtime.ts"],"sourcesContent":["import format from 'string-format';\nimport { sha1 } from '@teambit/legacy/dist/utils';\nimport fs from 'fs-extra';\nimport { join } from 'path';\nimport globby from 'globby';\nimport chalk from 'chalk';\nimport { PromptCanceled } from '@teambit/legacy/dist/prompts/exceptions';\nimport pMapSeries from 'p-map-series';\nimport yesno from 'yesno';\nimport { compact } from 'lodash';\nimport { CLIAspect, CLIMain, MainRuntime } from '@teambit/cli';\nimport { Slot, SlotRegistry } from '@teambit/harmony';\nimport { WorkspaceAspect } from '@teambit/workspace';\nimport type { Workspace } from '@teambit/workspace';\nimport { Environment, EnvsAspect, ExecutionContext } from '@teambit/envs';\nimport type { EnvsMain } from '@teambit/envs';\nimport { Logger, LoggerAspect } from '@teambit/logger';\nimport type { LoggerMain } from '@teambit/logger';\nimport { WorkspaceConfigFilesAspect } from './workspace-config-files.aspect';\nimport { ConfigFile, ConfigWriterEntry, ExtendingConfigFile } from './config-writer-entry';\nimport { WsConfigCleanCmd, WsConfigCmd, WsConfigListCmd, WsConfigWriteCmd } from './ws-config.cmd';\nimport { DedupedPaths, dedupePaths } from './dedup-paths';\nimport WriteConfigFilesFailed from './exceptions/write-failed';\n\nexport type ConfigWriterSlot = SlotRegistry<ConfigWriterEntry[]>;\n\nexport type ConfigWritersList = Array<{\n aspectId: string;\n configWriter: ConfigWriterEntry;\n}>;\n\nexport type CleanConfigFilesOptions = {\n silent?: boolean; // no prompt\n dryRun?: boolean;\n writers?: string[];\n};\n\nexport type WriteConfigFilesOptions = {\n clean?: boolean;\n silent?: boolean; // no prompt\n dedupe?: boolean;\n dryRun?: boolean;\n writers?: string[];\n};\n\nexport type WrittenConfigFile = Required<ConfigFile> & {\n filePath: string;\n};\n\nexport type WrittenExtendingConfigFile = ExtendingConfigFile & {\n filePaths: string[];\n};\n\nexport type WrittenConfigFilesMap = {\n [configFileHash: string]: {\n envIds: string[];\n configFile: WrittenConfigFile;\n };\n};\n\nexport type ExtendingConfigFilesMap = {\n [configFileHash: string]: {\n envIds: string[];\n extendingConfigFile: Required<ExtendingConfigFile>;\n };\n};\n\nexport type CompPathExtendingHashMap = { [compPath: string]: string };\n\nexport type EnvMapValue = { env: Environment; id: string[]; paths: string[] };\nexport type EnvCompsDirsMap = { [envId: string]: EnvMapValue };\n\nexport type EnvsWrittenConfigFile = { envIds: string[]; configFile: WrittenConfigFile };\nexport type EnvsWrittenConfigFiles = Array<EnvsWrittenConfigFile>;\n\nexport type EnvsWrittenExtendingConfigFile = { envIds: string[]; extendingConfigFile: WrittenExtendingConfigFile };\nexport type EnvsWrittenExtendingConfigFiles = Array<EnvsWrittenExtendingConfigFile>;\n\nexport type OneConfigFileWriterResult = {\n name: string;\n totalWrittenFiles: number;\n configFiles: EnvsWrittenConfigFiles;\n totalConfigFiles: number;\n extendingConfigFiles: EnvsWrittenExtendingConfigFiles;\n totalExtendingConfigFiles: number;\n};\n\nexport type AspectWritersResults = {\n aspectId: string;\n writersResult: OneConfigFileWriterResult[];\n totalWrittenFiles: number;\n};\n\nexport type WriteConfigFilesResult = {\n cleanResults?: string[];\n writeResults: { totalWrittenFiles: number; aspectsWritersResults: AspectWritersResults[] };\n wsDir: string;\n};\n\nexport class WorkspaceConfigFilesMain {\n constructor(\n readonly configWriterSlot: ConfigWriterSlot,\n private workspace: Workspace,\n private envs: EnvsMain,\n private logger: Logger\n ) {}\n\n /**\n * It writes the configuration files for the workspace\n * for example: tsconfig, eslint config and prettier config files.\n * @param {WriteConfigFilesOptions} options - WriteConfigFilesOptions = {}\n * @returns An object with the following properties:\n * - writeResults: An object with the following properties:\n * - aspectsWritersResults: An array of objects with the following properties:\n * - aspect: The aspect that was written\n * - totalWrittenFiles: The number of files that were written\n * - totalWrittenFiles: The total number of files that were written\n * - cleanResults: array of deleted paths\n */\n async writeConfigFiles(options: WriteConfigFilesOptions = {}): Promise<WriteConfigFilesResult> {\n const execContext = await this.getExecContext();\n\n let cleanResults: string[] | undefined;\n if (options.clean) {\n cleanResults = await this.clean(options);\n }\n\n let aspectsWritersResults;\n try {\n aspectsWritersResults = await this.write(execContext, options);\n } catch (err) {\n this.logger.info('writeConfigFiles failed', err);\n throw new WriteConfigFilesFailed();\n }\n const totalWrittenFiles = aspectsWritersResults.reduce((acc, curr) => {\n return acc + curr.totalWrittenFiles;\n }, 0);\n const writeResults = { aspectsWritersResults, totalWrittenFiles };\n\n return { writeResults, cleanResults, wsDir: this.workspace.path };\n }\n\n /**\n * It cleans (delete) the config files from the workspace.\n * This will check each file and will only delete it in case it was generated by bit\n * @param {CleanConfigFilesOptions} options - CleanConfigFilesOptions = {}\n * @returns An array of strings.\n */\n async cleanConfigFiles(options: CleanConfigFilesOptions = {}): Promise<string[]> {\n // const execContext = await this.getExecContext();\n const cleanResults = await this.clean(options);\n return cleanResults;\n }\n\n /**\n * It returns a list of all the config writers that have been registered with the config writer slot\n * @returns An array of objects with aspectId and configWriter properties.\n */\n listConfigWriters(): ConfigWritersList {\n const slotEntries = this.configWriterSlot.toArray();\n const result: ConfigWritersList = slotEntries.reduce((acc, [aspectId, configWriters]) => {\n const curr = configWriters.map((configWriter) => ({ aspectId, configWriter }));\n return acc.concat(curr);\n }, [] as ConfigWritersList);\n return result;\n }\n\n private async write(\n envsExecutionContext: ExecutionContext[],\n opts: WriteConfigFilesOptions\n ): Promise<AspectWritersResults[]> {\n const envCompDirsMap = this.getEnvComponentsDirsMap(envsExecutionContext);\n const slotEntries = this.configWriterSlot.toArray();\n const configsRootDir = this.getConfigsRootDir();\n const results = await pMapSeries(slotEntries, async (aspectEntry) => {\n const [aspectId, configWriters] = aspectEntry;\n return this.handleOneAspectWriter(\n aspectId,\n configWriters,\n envCompDirsMap,\n configsRootDir,\n envsExecutionContext,\n opts\n );\n });\n return results;\n }\n\n private async handleOneAspectWriter(\n aspectId: string,\n configWriters: ConfigWriterEntry[],\n envCompsDirsMap: EnvCompsDirsMap,\n configsRootDir: string,\n envsExecutionContext: ExecutionContext[],\n opts: WriteConfigFilesOptions\n ): Promise<AspectWritersResults> {\n const results = await pMapSeries(configWriters, async (configWriter) => {\n if (opts.writers && !(opts.writers.includes(configWriter.name) || opts.writers.includes(configWriter.cliName)))\n return undefined;\n return this.handleOneConfigFileWriter(configWriter, envCompsDirsMap, configsRootDir, envsExecutionContext, opts);\n });\n const compactResults = compact(results);\n const totalWrittenFiles = compactResults.reduce((acc, curr) => {\n return acc + curr.totalWrittenFiles;\n }, 0);\n return { aspectId, writersResult: compactResults, totalWrittenFiles };\n }\n\n private async handleOneConfigFileWriter(\n configWriter: ConfigWriterEntry,\n envCompsDirsMap: EnvCompsDirsMap,\n configsRootDir: string,\n envsExecutionContext: ExecutionContext[],\n opts: WriteConfigFilesOptions\n ): Promise<OneConfigFileWriterResult> {\n const writtenConfigFilesMap: WrittenConfigFilesMap = {};\n const extendingConfigFilesMap: ExtendingConfigFilesMap = {};\n await pMapSeries(Object.entries(envCompsDirsMap), async ([envId, envMapValue]) => {\n const executionContext = envsExecutionContext.find((context) => context.id === envId);\n if (!executionContext) throw new Error(`failed finding execution context for env ${envId}`);\n const writtenConfigFiles = await this.handleRealConfigFiles(\n envId,\n envMapValue,\n executionContext,\n configWriter,\n configsRootDir,\n writtenConfigFilesMap,\n opts\n );\n if (writtenConfigFiles) {\n this.buildExtendingConfigFilesMap(configWriter, writtenConfigFiles, envId, extendingConfigFilesMap);\n }\n });\n if (!writtenConfigFilesMap || Object.keys(writtenConfigFilesMap).length === 0) {\n return {\n name: configWriter.name,\n configFiles: [],\n totalConfigFiles: 0,\n totalWrittenFiles: 0,\n extendingConfigFiles: [],\n totalExtendingConfigFiles: 0,\n };\n }\n\n const fileHashPerDedupedPaths = dedupePaths(extendingConfigFilesMap, envCompsDirsMap);\n const extendingConfigFiles = await this.writeExtendingConfigFiles(\n extendingConfigFilesMap,\n fileHashPerDedupedPaths,\n opts\n );\n if (configWriter.postProcessExtendingConfigFiles) {\n await configWriter.postProcessExtendingConfigFiles({\n workspaceDir: this.workspace.path,\n configsRootDir,\n writtenExtendingConfigFiles: extendingConfigFiles,\n envCompsDirsMap,\n dryRun: !!opts.dryRun,\n });\n }\n const totalExtendingConfigFiles = extendingConfigFiles.reduce(\n (acc, curr) => acc + curr.extendingConfigFile.filePaths.length,\n 0\n );\n const configFiles = Object.values(writtenConfigFilesMap);\n const totalConfigFiles = Object.keys(writtenConfigFilesMap).length;\n const totalWrittenFiles = totalConfigFiles + totalExtendingConfigFiles;\n const result: OneConfigFileWriterResult = {\n name: configWriter.name,\n configFiles,\n totalWrittenFiles,\n totalConfigFiles: Object.keys(writtenConfigFilesMap).length,\n extendingConfigFiles,\n totalExtendingConfigFiles,\n };\n return result;\n }\n\n private async handleRealConfigFiles(\n envId: string,\n envMapValue: EnvMapValue,\n executionContext: ExecutionContext,\n configWriter: ConfigWriterEntry,\n configsRootDir: string,\n writtenConfigFilesMap: WrittenConfigFilesMap,\n opts: WriteConfigFilesOptions\n ): Promise<WrittenConfigFile[] | undefined> {\n const calculatedConfigFiles = configWriter.calcConfigFiles(executionContext, envMapValue.env, configsRootDir);\n if (!calculatedConfigFiles) return undefined;\n const writtenConfigFiles = await Promise.all(\n calculatedConfigFiles.map(async (configFile) => {\n const writtenConfigFile = await this.writeConfigFile(configFile, configsRootDir, opts);\n if (!writtenConfigFilesMap[writtenConfigFile.hash]) {\n writtenConfigFilesMap[writtenConfigFile.hash] = { configFile: writtenConfigFile, envIds: [] };\n }\n writtenConfigFilesMap[writtenConfigFile.hash].envIds.push(envId);\n return writtenConfigFile;\n })\n );\n if (configWriter.postProcessConfigFiles) {\n await configWriter.postProcessConfigFiles(writtenConfigFiles, executionContext, envMapValue, {\n dryRun: !!opts.dryRun,\n });\n }\n return writtenConfigFiles;\n }\n\n private async writeConfigFile(\n configFile: ConfigFile,\n configsRootDir: string,\n opts: WriteConfigFilesOptions\n ): Promise<WrittenConfigFile> {\n const hash = configFile.hash || sha1(configFile.content);\n const name = format(configFile.name, { hash });\n const filePath = join(configsRootDir, name);\n if (!opts.dryRun) {\n // const exists = await fs.pathExists(filePath);\n // if (!exists) {\n await fs.outputFile(filePath, configFile.content);\n // }\n }\n const res = {\n name,\n hash,\n filePath,\n content: configFile.content,\n };\n return res;\n }\n\n private async writeExtendingConfigFiles(\n extendingConfigFilesMap: ExtendingConfigFilesMap,\n fileHashPerDedupedPaths: DedupedPaths,\n opts: WriteConfigFilesOptions\n ): Promise<EnvsWrittenExtendingConfigFiles> {\n const finalResult: EnvsWrittenExtendingConfigFiles = await Promise.all(\n fileHashPerDedupedPaths.map(async ({ fileHash, paths }) => {\n const envsConfigFile = extendingConfigFilesMap[fileHash];\n const configFile = envsConfigFile.extendingConfigFile;\n const hash = configFile.hash || sha1(configFile.content);\n const name = format(configFile.name, { hash });\n const writtenPaths = await Promise.all(\n paths.map(async (path) => {\n const filePath = join(this.workspace.path, path, name);\n if (!opts.dryRun) {\n await fs.outputFile(filePath, configFile.content);\n }\n return filePath;\n })\n );\n const res: EnvsWrittenExtendingConfigFile = {\n envIds: envsConfigFile.envIds,\n extendingConfigFile: {\n name,\n hash,\n content: configFile.content,\n extendingTarget: configFile.extendingTarget,\n filePaths: writtenPaths,\n },\n };\n return res;\n })\n );\n return finalResult;\n }\n\n private buildExtendingConfigFilesMap(\n configWriter: ConfigWriterEntry,\n writtenConfigFiles: WrittenConfigFile[],\n envId: string,\n extendingConfigFilesMap: ExtendingConfigFilesMap\n ) {\n const extendingConfigFile = this.generateExtendingFile(configWriter, writtenConfigFiles);\n if (!extendingConfigFile) return;\n if (!extendingConfigFilesMap[extendingConfigFile.hash]) {\n extendingConfigFilesMap[extendingConfigFile.hash] = { extendingConfigFile, envIds: [] };\n }\n extendingConfigFilesMap[extendingConfigFile.hash].envIds.push(envId);\n }\n\n private generateExtendingFile(\n configWriter: ConfigWriterEntry,\n writtenConfigFiles\n ): Required<ExtendingConfigFile> | undefined {\n const extendingConfigFile = configWriter.generateExtendingFile(writtenConfigFiles);\n if (!extendingConfigFile) return undefined;\n const hash = extendingConfigFile.hash || sha1(extendingConfigFile.content);\n return {\n ...extendingConfigFile,\n hash,\n };\n }\n\n private getConfigsRootDir() {\n return this.getCacheDir(this.workspace.path);\n }\n\n private getCacheDir(rootDir): string {\n return join(rootDir, 'node_modules', '.cache');\n }\n\n private async getExecContext(): Promise<ExecutionContext[]> {\n const components = await this.workspace.list();\n const runtime = await this.envs.createEnvironment(components);\n const execContext = runtime.getEnvExecutionContext();\n return execContext;\n }\n\n private getEnvComponentsDirsMap(envsExecutionContext: ExecutionContext[]): EnvCompsDirsMap {\n const envCompDirsMap = envsExecutionContext.reduce((acc, envExecution) => {\n const envRuntime = envExecution.envRuntime;\n const envId = envRuntime.id.toString();\n const value = {\n id: envRuntime.id,\n env: envRuntime.env,\n paths: envRuntime.components.map((c) => this.workspace.componentDir(c.id, undefined, { relative: true })),\n };\n acc[envId] = value;\n return acc;\n }, {});\n return envCompDirsMap;\n }\n\n private getConfigWriters(): [string, ConfigWriterEntry[]][] {\n return this.configWriterSlot.toArray();\n }\n\n private getFlatConfigWriters(): ConfigWriterEntry[] {\n return this.getConfigWriters().reduce((acc: ConfigWriterEntry[], [, value]) => {\n acc = acc.concat(value);\n return acc;\n }, []);\n }\n\n /**\n * Clean config files written by the config-writers\n * @param envsExecutionContext\n * @param param1\n * @returns Array of paths of deleted config files\n */\n async clean({ dryRun, silent, writers }: WriteConfigFilesOptions): Promise<string[]> {\n const configWriters = this.getFlatConfigWriters();\n const filteredConfigWriters = writers\n ? configWriters.filter(\n (configWriter) => writers.includes(configWriter.name) || writers.includes(configWriter.cliName)\n )\n : configWriters;\n const paths = filteredConfigWriters\n .map((configWriter) => {\n const patterns = configWriter.patterns;\n const currPaths = globby.sync(patterns, {\n cwd: this.workspace.path,\n dot: true,\n onlyFiles: true,\n ignore: ['**/node_modules/**'],\n });\n const filteredPaths = currPaths.filter((path) => {\n const fullPath = join(this.workspace.path, path);\n return configWriter.isBitGenerated ? configWriter.isBitGenerated(fullPath) : true;\n });\n return filteredPaths;\n })\n .flat();\n if (dryRun) return paths;\n if (!silent) await this.promptForCleaning(paths);\n await this.deleteFiles(paths);\n return paths;\n }\n\n private async promptForCleaning(paths: string[]) {\n this.logger.clearStatusLine();\n const ok = await yesno({\n question: `${chalk.underline('The following paths will be deleted:')}\n${paths.join('\\n')}\n${chalk.bold('Do you want to continue? [yes(y)/no(n)]')}`,\n });\n if (!ok) {\n throw new PromptCanceled();\n }\n }\n\n private async deleteFiles(paths: string[]) {\n await Promise.all(paths.map((f) => fs.remove(join(this.workspace.path, f))));\n }\n\n registerConfigWriter(...configWriterEntries: ConfigWriterEntry[]) {\n this.configWriterSlot.register(configWriterEntries);\n }\n\n static slots = [Slot.withType<ConfigWriterEntry[]>()];\n // define your aspect dependencies here.\n // in case you need to use another aspect API.\n static dependencies = [CLIAspect, WorkspaceAspect, EnvsAspect, LoggerAspect];\n\n static runtime = MainRuntime;\n\n static async provider(\n [cli, workspace, envs, loggerAspect]: [CLIMain, Workspace, EnvsMain, LoggerMain],\n _config,\n [configWriterSlot]: [ConfigWriterSlot]\n ) {\n const logger = loggerAspect.createLogger(WorkspaceConfigFilesAspect.id);\n const workspaceConfigFilesMain = new WorkspaceConfigFilesMain(configWriterSlot, workspace, envs, logger);\n const wsConfigCmd = new WsConfigCmd();\n wsConfigCmd.commands = [\n new WsConfigWriteCmd(workspaceConfigFilesMain),\n new WsConfigCleanCmd(workspaceConfigFilesMain),\n new WsConfigListCmd(workspaceConfigFilesMain),\n ];\n cli.register(wsConfigCmd);\n return workspaceConfigFilesMain;\n }\n}\n\nWorkspaceConfigFilesAspect.addRuntime(WorkspaceConfigFilesMain);\n\nexport default WorkspaceConfigFilesMain;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;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;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;AAEA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAA+D;AAAA;AA6ExD,MAAMA,wBAAwB,CAAC;EACpCC,WAAW,CACAC,gBAAkC,EACnCC,SAAoB,EACpBC,IAAc,EACdC,MAAc,EACtB;IAAA,KAJSH,gBAAkC,GAAlCA,gBAAkC;IAAA,KACnCC,SAAoB,GAApBA,SAAoB;IAAA,KACpBC,IAAc,GAAdA,IAAc;IAAA,KACdC,MAAc,GAAdA,MAAc;EACrB;;EAEH;AACF;AACA;AACA;AACA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AAE2J,YAAY,CAA6C,EAChFC,OAAO,EACP,CAAC9J,gBAAgB,CAAqB,EACtC;IACA,MAAMG,MAAM,GAAG0J,YAAY,CAACE,YAAY,CAACC,kDAA0B,CAACnG,EAAE,CAAC;IACvE,MAAMoG,wBAAwB,GAAG,IAAInK,wBAAwB,CAACE,gBAAgB,EAAEC,SAAS,EAAEC,IAAI,EAAEC,MAAM,CAAC;IACxG,MAAM+J,WAAW,GAAG,KAAIC,uBAAW,GAAE;IACrCD,WAAW,CAACE,QAAQ,GAAG,CACrB,KAAIC,4BAAgB,EAACJ,wBAAwB,CAAC,EAC9C,KAAIK,4BAAgB,EAACL,wBAAwB,CAAC,EAC9C,KAAIM,2BAAe,EAACN,wBAAwB,CAAC,CAC9C;IACDL,GAAG,CAACF,QAAQ,CAACQ,WAAW,CAAC;IACzB,OAAOD,wBAAwB;EACjC;AACF;AAAC;AAAA,gCA5ZYnK,wBAAwB,WAqYpB,CAAC0K,eAAI,CAACC,QAAQ,EAAuB,CAAC;AAAA,gCArY1C3K,wBAAwB,kBAwYb,CAAC4K,gBAAS,EAAEC,4BAAe,EAAEC,kBAAU,EAAEC,sBAAY,CAAC;AAAA,gCAxYjE/K,wBAAwB,aA0YlBgL,kBAAW;AAoB9Bd,kDAA0B,CAACe,UAAU,CAACjL,wBAAwB,CAAC;AAAC,eAEjDA,wBAAwB;AAAA"}
1
+ {"version":3,"names":["WorkspaceConfigFilesMain","constructor","configWriterSlot","workspace","envs","logger","writeConfigFiles","options","execContext","getExecContext","cleanResults","clean","aspectsWritersResults","write","err","info","WriteConfigFilesFailed","totalWrittenFiles","reduce","acc","curr","writeResults","wsDir","path","cleanConfigFiles","listConfigWriters","slotEntries","toArray","result","aspectId","configWriters","map","configWriter","concat","envsExecutionContext","opts","envCompDirsMap","getEnvComponentsDirsMap","configsRootDir","getConfigsRootDir","results","pMapSeries","aspectEntry","handleOneAspectWriter","envCompsDirsMap","writers","includes","name","cliName","undefined","handleOneConfigFileWriter","compactResults","compact","writersResult","writtenConfigFilesMap","extendingConfigFilesMap","Object","entries","envId","envMapValue","executionContext","find","context","id","Error","writtenConfigFiles","handleRealConfigFiles","buildExtendingConfigFilesMap","keys","length","configFiles","totalConfigFiles","extendingConfigFiles","totalExtendingConfigFiles","fileHashPerDedupedPaths","dedupePaths","writeExtendingConfigFiles","postProcessExtendingConfigFiles","workspaceDir","writtenExtendingConfigFiles","dryRun","extendingConfigFile","filePaths","values","calculatedConfigFiles","calcConfigFiles","env","Promise","all","configFile","writtenConfigFile","writeConfigFile","hash","envIds","push","postProcessConfigFiles","sha1","content","format","filePath","join","fs","outputFile","res","finalResult","fileHash","paths","envsConfigFile","writtenPaths","targetPath","useAbsPaths","extendingTarget","relative","dirname","replace","generateExtendingFile","args","getCacheDir","rootDir","components","list","runtime","createEnvironment","getEnvExecutionContext","envExecution","envRuntime","toString","value","c","componentDir","getConfigWriters","getFlatConfigWriters","silent","filteredConfigWriters","filter","patterns","currPaths","globby","sync","cwd","dot","onlyFiles","ignore","filteredPaths","fullPath","isBitGenerated","flat","promptForCleaning","deleteFiles","clearStatusLine","ok","yesno","question","chalk","underline","bold","PromptCanceled","f","remove","registerConfigWriter","configWriterEntries","register","provider","cli","loggerAspect","_config","createLogger","WorkspaceConfigFilesAspect","workspaceConfigFilesMain","wsConfigCmd","WsConfigCmd","commands","WsConfigWriteCmd","WsConfigCleanCmd","WsConfigListCmd","Slot","withType","CLIAspect","WorkspaceAspect","EnvsAspect","LoggerAspect","MainRuntime","addRuntime"],"sources":["workspace-config-files.main.runtime.ts"],"sourcesContent":["import format from 'string-format';\nimport { sha1 } from '@teambit/legacy/dist/utils';\nimport fs from 'fs-extra';\nimport { dirname, join, relative } from 'path';\nimport globby from 'globby';\nimport chalk from 'chalk';\nimport { PromptCanceled } from '@teambit/legacy/dist/prompts/exceptions';\nimport pMapSeries from 'p-map-series';\nimport yesno from 'yesno';\nimport { compact } from 'lodash';\nimport { CLIAspect, CLIMain, MainRuntime } from '@teambit/cli';\nimport { Slot, SlotRegistry } from '@teambit/harmony';\nimport { WorkspaceAspect } from '@teambit/workspace';\nimport type { Workspace } from '@teambit/workspace';\nimport { Environment, EnvsAspect, ExecutionContext } from '@teambit/envs';\nimport type { EnvsMain } from '@teambit/envs';\nimport { Logger, LoggerAspect } from '@teambit/logger';\nimport type { LoggerMain } from '@teambit/logger';\nimport { WorkspaceConfigFilesAspect } from './workspace-config-files.aspect';\nimport { ConfigFile, ConfigWriterEntry, ExtendingConfigFile } from './config-writer-entry';\nimport { WsConfigCleanCmd, WsConfigCmd, WsConfigListCmd, WsConfigWriteCmd } from './ws-config.cmd';\nimport { DedupedPaths, dedupePaths } from './dedup-paths';\nimport WriteConfigFilesFailed from './exceptions/write-failed';\n\nexport type ConfigWriterSlot = SlotRegistry<ConfigWriterEntry[]>;\n\nexport type ConfigWritersList = Array<{\n aspectId: string;\n configWriter: ConfigWriterEntry;\n}>;\n\nexport type CleanConfigFilesOptions = {\n silent?: boolean; // no prompt\n dryRun?: boolean;\n writers?: string[];\n};\n\nexport type WriteConfigFilesOptions = {\n clean?: boolean;\n silent?: boolean; // no prompt\n dedupe?: boolean;\n dryRun?: boolean;\n writers?: string[];\n};\n\nexport type WrittenConfigFile = Required<ConfigFile> & {\n filePath: string;\n};\n\nexport type WrittenExtendingConfigFile = ExtendingConfigFile & {\n filePaths: string[];\n};\n\nexport type WrittenConfigFilesMap = {\n [configFileHash: string]: {\n envIds: string[];\n configFile: WrittenConfigFile;\n };\n};\n\nexport type ExtendingConfigFilesMap = {\n [configFileHash: string]: {\n envIds: string[];\n extendingConfigFile: Required<ExtendingConfigFile>;\n };\n};\n\nexport type CompPathExtendingHashMap = { [compPath: string]: string };\n\nexport type EnvMapValue = { env: Environment; id: string[]; paths: string[] };\nexport type EnvCompsDirsMap = { [envId: string]: EnvMapValue };\n\nexport type EnvsWrittenConfigFile = { envIds: string[]; configFile: WrittenConfigFile };\nexport type EnvsWrittenConfigFiles = Array<EnvsWrittenConfigFile>;\n\nexport type EnvsWrittenExtendingConfigFile = { envIds: string[]; extendingConfigFile: WrittenExtendingConfigFile };\nexport type EnvsWrittenExtendingConfigFiles = Array<EnvsWrittenExtendingConfigFile>;\n\nexport type OneConfigFileWriterResult = {\n name: string;\n totalWrittenFiles: number;\n configFiles: EnvsWrittenConfigFiles;\n totalConfigFiles: number;\n extendingConfigFiles: EnvsWrittenExtendingConfigFiles;\n totalExtendingConfigFiles: number;\n};\n\nexport type AspectWritersResults = {\n aspectId: string;\n writersResult: OneConfigFileWriterResult[];\n totalWrittenFiles: number;\n};\n\nexport type WriteConfigFilesResult = {\n cleanResults?: string[];\n writeResults: { totalWrittenFiles: number; aspectsWritersResults: AspectWritersResults[] };\n wsDir: string;\n};\n\nexport class WorkspaceConfigFilesMain {\n constructor(\n readonly configWriterSlot: ConfigWriterSlot,\n private workspace: Workspace,\n private envs: EnvsMain,\n private logger: Logger\n ) {}\n\n /**\n * It writes the configuration files for the workspace\n * for example: tsconfig, eslint config and prettier config files.\n * @param {WriteConfigFilesOptions} options - WriteConfigFilesOptions = {}\n * @returns An object with the following properties:\n * - writeResults: An object with the following properties:\n * - aspectsWritersResults: An array of objects with the following properties:\n * - aspect: The aspect that was written\n * - totalWrittenFiles: The number of files that were written\n * - totalWrittenFiles: The total number of files that were written\n * - cleanResults: array of deleted paths\n */\n async writeConfigFiles(options: WriteConfigFilesOptions = {}): Promise<WriteConfigFilesResult> {\n const execContext = await this.getExecContext();\n\n let cleanResults: string[] | undefined;\n if (options.clean) {\n cleanResults = await this.clean(options);\n }\n\n let aspectsWritersResults;\n try {\n aspectsWritersResults = await this.write(execContext, options);\n } catch (err) {\n this.logger.info('writeConfigFiles failed', err);\n throw new WriteConfigFilesFailed();\n }\n const totalWrittenFiles = aspectsWritersResults.reduce((acc, curr) => {\n return acc + curr.totalWrittenFiles;\n }, 0);\n const writeResults = { aspectsWritersResults, totalWrittenFiles };\n\n return { writeResults, cleanResults, wsDir: this.workspace.path };\n }\n\n /**\n * It cleans (delete) the config files from the workspace.\n * This will check each file and will only delete it in case it was generated by bit\n * @param {CleanConfigFilesOptions} options - CleanConfigFilesOptions = {}\n * @returns An array of strings.\n */\n async cleanConfigFiles(options: CleanConfigFilesOptions = {}): Promise<string[]> {\n // const execContext = await this.getExecContext();\n const cleanResults = await this.clean(options);\n return cleanResults;\n }\n\n /**\n * It returns a list of all the config writers that have been registered with the config writer slot\n * @returns An array of objects with aspectId and configWriter properties.\n */\n listConfigWriters(): ConfigWritersList {\n const slotEntries = this.configWriterSlot.toArray();\n const result: ConfigWritersList = slotEntries.reduce((acc, [aspectId, configWriters]) => {\n const curr = configWriters.map((configWriter) => ({ aspectId, configWriter }));\n return acc.concat(curr);\n }, [] as ConfigWritersList);\n return result;\n }\n\n private async write(\n envsExecutionContext: ExecutionContext[],\n opts: WriteConfigFilesOptions\n ): Promise<AspectWritersResults[]> {\n const envCompDirsMap = this.getEnvComponentsDirsMap(envsExecutionContext);\n const slotEntries = this.configWriterSlot.toArray();\n const configsRootDir = this.getConfigsRootDir();\n const results = await pMapSeries(slotEntries, async (aspectEntry) => {\n const [aspectId, configWriters] = aspectEntry;\n return this.handleOneAspectWriter(\n aspectId,\n configWriters,\n envCompDirsMap,\n configsRootDir,\n envsExecutionContext,\n opts\n );\n });\n return results;\n }\n\n private async handleOneAspectWriter(\n aspectId: string,\n configWriters: ConfigWriterEntry[],\n envCompsDirsMap: EnvCompsDirsMap,\n configsRootDir: string,\n envsExecutionContext: ExecutionContext[],\n opts: WriteConfigFilesOptions\n ): Promise<AspectWritersResults> {\n const results = await pMapSeries(configWriters, async (configWriter) => {\n if (opts.writers && !(opts.writers.includes(configWriter.name) || opts.writers.includes(configWriter.cliName)))\n return undefined;\n return this.handleOneConfigFileWriter(configWriter, envCompsDirsMap, configsRootDir, envsExecutionContext, opts);\n });\n const compactResults = compact(results);\n const totalWrittenFiles = compactResults.reduce((acc, curr) => {\n return acc + curr.totalWrittenFiles;\n }, 0);\n return { aspectId, writersResult: compactResults, totalWrittenFiles };\n }\n\n private async handleOneConfigFileWriter(\n configWriter: ConfigWriterEntry,\n envCompsDirsMap: EnvCompsDirsMap,\n configsRootDir: string,\n envsExecutionContext: ExecutionContext[],\n opts: WriteConfigFilesOptions\n ): Promise<OneConfigFileWriterResult> {\n const writtenConfigFilesMap: WrittenConfigFilesMap = {};\n const extendingConfigFilesMap: ExtendingConfigFilesMap = {};\n await pMapSeries(Object.entries(envCompsDirsMap), async ([envId, envMapValue]) => {\n const executionContext = envsExecutionContext.find((context) => context.id === envId);\n if (!executionContext) throw new Error(`failed finding execution context for env ${envId}`);\n const writtenConfigFiles = await this.handleRealConfigFiles(\n envId,\n envMapValue,\n executionContext,\n configWriter,\n configsRootDir,\n writtenConfigFilesMap,\n opts\n );\n if (writtenConfigFiles) {\n this.buildExtendingConfigFilesMap(\n configWriter,\n writtenConfigFiles,\n envId,\n extendingConfigFilesMap,\n envCompsDirsMap,\n configsRootDir,\n opts\n );\n }\n });\n if (!writtenConfigFilesMap || Object.keys(writtenConfigFilesMap).length === 0) {\n return {\n name: configWriter.name,\n configFiles: [],\n totalConfigFiles: 0,\n totalWrittenFiles: 0,\n extendingConfigFiles: [],\n totalExtendingConfigFiles: 0,\n };\n }\n\n const fileHashPerDedupedPaths = dedupePaths(extendingConfigFilesMap, envCompsDirsMap);\n const extendingConfigFiles = await this.writeExtendingConfigFiles(\n extendingConfigFilesMap,\n fileHashPerDedupedPaths,\n opts\n );\n if (configWriter.postProcessExtendingConfigFiles) {\n await configWriter.postProcessExtendingConfigFiles({\n workspaceDir: this.workspace.path,\n configsRootDir,\n writtenExtendingConfigFiles: extendingConfigFiles,\n envCompsDirsMap,\n dryRun: !!opts.dryRun,\n });\n }\n const totalExtendingConfigFiles = extendingConfigFiles.reduce(\n (acc, curr) => acc + curr.extendingConfigFile.filePaths.length,\n 0\n );\n const configFiles = Object.values(writtenConfigFilesMap);\n const totalConfigFiles = Object.keys(writtenConfigFilesMap).length;\n const totalWrittenFiles = totalConfigFiles + totalExtendingConfigFiles;\n const result: OneConfigFileWriterResult = {\n name: configWriter.name,\n configFiles,\n totalWrittenFiles,\n totalConfigFiles: Object.keys(writtenConfigFilesMap).length,\n extendingConfigFiles,\n totalExtendingConfigFiles,\n };\n return result;\n }\n\n private async handleRealConfigFiles(\n envId: string,\n envMapValue: EnvMapValue,\n executionContext: ExecutionContext,\n configWriter: ConfigWriterEntry,\n configsRootDir: string,\n writtenConfigFilesMap: WrittenConfigFilesMap,\n opts: WriteConfigFilesOptions\n ): Promise<WrittenConfigFile[] | undefined> {\n const calculatedConfigFiles = configWriter.calcConfigFiles(executionContext, envMapValue.env, configsRootDir);\n if (!calculatedConfigFiles) return undefined;\n const writtenConfigFiles = await Promise.all(\n calculatedConfigFiles.map(async (configFile) => {\n const writtenConfigFile = await this.writeConfigFile(configFile, configsRootDir, opts);\n if (!writtenConfigFilesMap[writtenConfigFile.hash]) {\n writtenConfigFilesMap[writtenConfigFile.hash] = { configFile: writtenConfigFile, envIds: [] };\n }\n writtenConfigFilesMap[writtenConfigFile.hash].envIds.push(envId);\n return writtenConfigFile;\n })\n );\n if (configWriter.postProcessConfigFiles) {\n await configWriter.postProcessConfigFiles(writtenConfigFiles, executionContext, envMapValue, {\n dryRun: !!opts.dryRun,\n });\n }\n return writtenConfigFiles;\n }\n\n private async writeConfigFile(\n configFile: ConfigFile,\n configsRootDir: string,\n opts: WriteConfigFilesOptions\n ): Promise<WrittenConfigFile> {\n const hash = configFile.hash || sha1(configFile.content);\n const name = format(configFile.name, { hash });\n const filePath = join(configsRootDir, name);\n if (!opts.dryRun) {\n // const exists = await fs.pathExists(filePath);\n // if (!exists) {\n await fs.outputFile(filePath, configFile.content);\n // }\n }\n const res = {\n name,\n hash,\n filePath,\n content: configFile.content,\n };\n return res;\n }\n\n private async writeExtendingConfigFiles(\n extendingConfigFilesMap: ExtendingConfigFilesMap,\n fileHashPerDedupedPaths: DedupedPaths,\n opts: WriteConfigFilesOptions\n ): Promise<EnvsWrittenExtendingConfigFiles> {\n const finalResult: EnvsWrittenExtendingConfigFiles = await Promise.all(\n fileHashPerDedupedPaths.map(async ({ fileHash, paths }) => {\n const envsConfigFile = extendingConfigFilesMap[fileHash];\n const configFile = envsConfigFile.extendingConfigFile;\n const hash = configFile.hash || sha1(configFile.content);\n const name = format(configFile.name, { hash });\n const writtenPaths = await Promise.all(\n paths.map(async (path) => {\n const filePath = join(this.workspace.path, path, name);\n const targetPath = configFile.useAbsPaths\n ? configFile.extendingTarget.filePath\n : relative(dirname(filePath), configFile.extendingTarget.filePath);\n const content = configFile.content.replace(`{${configFile.extendingTarget.name}}`, targetPath);\n if (!opts.dryRun) {\n await fs.outputFile(filePath, content);\n }\n return filePath;\n })\n );\n const res: EnvsWrittenExtendingConfigFile = {\n envIds: envsConfigFile.envIds,\n extendingConfigFile: {\n name,\n hash,\n content: configFile.content,\n extendingTarget: configFile.extendingTarget,\n filePaths: writtenPaths,\n },\n };\n return res;\n })\n );\n return finalResult;\n }\n\n private buildExtendingConfigFilesMap(\n configWriter: ConfigWriterEntry,\n writtenConfigFiles: WrittenConfigFile[],\n envId: string,\n extendingConfigFilesMap: ExtendingConfigFilesMap,\n envCompsDirsMap: EnvCompsDirsMap,\n configsRootDir: string,\n opts: WriteConfigFilesOptions\n ) {\n const extendingConfigFile = this.generateExtendingFile(\n configWriter,\n writtenConfigFiles,\n envCompsDirsMap,\n configsRootDir,\n opts\n );\n if (!extendingConfigFile) return;\n if (!extendingConfigFilesMap[extendingConfigFile.hash]) {\n extendingConfigFilesMap[extendingConfigFile.hash] = { extendingConfigFile, envIds: [] };\n }\n extendingConfigFilesMap[extendingConfigFile.hash].envIds.push(envId);\n }\n\n private generateExtendingFile(\n configWriter: ConfigWriterEntry,\n writtenConfigFiles,\n envCompsDirsMap: EnvCompsDirsMap,\n configsRootDir: string,\n opts: WriteConfigFilesOptions\n ): Required<ExtendingConfigFile> | undefined {\n const args = {\n workspaceDir: this.workspace.path,\n configsRootDir,\n writtenConfigFiles,\n envCompsDirsMap,\n dryRun: !!opts.dryRun,\n };\n const extendingConfigFile = configWriter.generateExtendingFile(args);\n if (!extendingConfigFile) return undefined;\n const hash = extendingConfigFile.hash || sha1(extendingConfigFile.content);\n return {\n ...extendingConfigFile,\n useAbsPaths: !!extendingConfigFile.useAbsPaths,\n hash,\n };\n }\n\n private getConfigsRootDir() {\n return this.getCacheDir(this.workspace.path);\n }\n\n private getCacheDir(rootDir): string {\n return join(rootDir, 'node_modules', '.cache');\n }\n\n private async getExecContext(): Promise<ExecutionContext[]> {\n const components = await this.workspace.list();\n const runtime = await this.envs.createEnvironment(components);\n const execContext = runtime.getEnvExecutionContext();\n return execContext;\n }\n\n private getEnvComponentsDirsMap(envsExecutionContext: ExecutionContext[]): EnvCompsDirsMap {\n const envCompDirsMap = envsExecutionContext.reduce((acc, envExecution) => {\n const envRuntime = envExecution.envRuntime;\n const envId = envRuntime.id.toString();\n const value = {\n id: envRuntime.id,\n env: envRuntime.env,\n paths: envRuntime.components.map((c) => this.workspace.componentDir(c.id, undefined, { relative: true })),\n };\n acc[envId] = value;\n return acc;\n }, {});\n return envCompDirsMap;\n }\n\n private getConfigWriters(): [string, ConfigWriterEntry[]][] {\n return this.configWriterSlot.toArray();\n }\n\n private getFlatConfigWriters(): ConfigWriterEntry[] {\n return this.getConfigWriters().reduce((acc: ConfigWriterEntry[], [, value]) => {\n acc = acc.concat(value);\n return acc;\n }, []);\n }\n\n /**\n * Clean config files written by the config-writers\n * @param envsExecutionContext\n * @param param1\n * @returns Array of paths of deleted config files\n */\n async clean({ dryRun, silent, writers }: WriteConfigFilesOptions): Promise<string[]> {\n const configWriters = this.getFlatConfigWriters();\n const filteredConfigWriters = writers\n ? configWriters.filter(\n (configWriter) => writers.includes(configWriter.name) || writers.includes(configWriter.cliName)\n )\n : configWriters;\n const paths = filteredConfigWriters\n .map((configWriter) => {\n const patterns = configWriter.patterns;\n const currPaths = globby.sync(patterns, {\n cwd: this.workspace.path,\n dot: true,\n onlyFiles: true,\n ignore: ['**/node_modules/**'],\n });\n const filteredPaths = currPaths.filter((path) => {\n const fullPath = join(this.workspace.path, path);\n return configWriter.isBitGenerated ? configWriter.isBitGenerated(fullPath) : true;\n });\n return filteredPaths;\n })\n .flat();\n if (dryRun) return paths;\n if (!silent) await this.promptForCleaning(paths);\n await this.deleteFiles(paths);\n return paths;\n }\n\n private async promptForCleaning(paths: string[]) {\n this.logger.clearStatusLine();\n const ok = await yesno({\n question: `${chalk.underline('The following paths will be deleted:')}\n${paths.join('\\n')}\n${chalk.bold('Do you want to continue? [yes(y)/no(n)]')}`,\n });\n if (!ok) {\n throw new PromptCanceled();\n }\n }\n\n private async deleteFiles(paths: string[]) {\n await Promise.all(paths.map((f) => fs.remove(join(this.workspace.path, f))));\n }\n\n registerConfigWriter(...configWriterEntries: ConfigWriterEntry[]) {\n this.configWriterSlot.register(configWriterEntries);\n }\n\n static slots = [Slot.withType<ConfigWriterEntry[]>()];\n // define your aspect dependencies here.\n // in case you need to use another aspect API.\n static dependencies = [CLIAspect, WorkspaceAspect, EnvsAspect, LoggerAspect];\n\n static runtime = MainRuntime;\n\n static async provider(\n [cli, workspace, envs, loggerAspect]: [CLIMain, Workspace, EnvsMain, LoggerMain],\n _config,\n [configWriterSlot]: [ConfigWriterSlot]\n ) {\n const logger = loggerAspect.createLogger(WorkspaceConfigFilesAspect.id);\n const workspaceConfigFilesMain = new WorkspaceConfigFilesMain(configWriterSlot, workspace, envs, logger);\n const wsConfigCmd = new WsConfigCmd();\n wsConfigCmd.commands = [\n new WsConfigWriteCmd(workspaceConfigFilesMain),\n new WsConfigCleanCmd(workspaceConfigFilesMain),\n new WsConfigListCmd(workspaceConfigFilesMain),\n ];\n cli.register(wsConfigCmd);\n return workspaceConfigFilesMain;\n }\n}\n\nWorkspaceConfigFilesAspect.addRuntime(WorkspaceConfigFilesMain);\n\nexport default WorkspaceConfigFilesMain;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;EAAA;EAAA;IAAA;E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EAAEC,sBAAY,CAAC;AAAA,gCAxajEpL,wBAAwB,aA0alBqL,kBAAW;AAoB9Bd,kDAA0B,CAACe,UAAU,CAACtL,wBAAwB,CAAC;AAAC,eAEjDA,wBAAwB;AAAA"}
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/workspace-config-files",
3
- "version": "0.0.6",
4
- "homepage": "https://bit.dev/teambit/workspace/workspace-config-files",
3
+ "version": "0.0.8",
4
+ "homepage": "https://bit.cloud/teambit/workspace/workspace-config-files",
5
5
  "main": "dist/index.js",
6
6
  "componentId": {
7
7
  "scope": "teambit.workspace",
8
8
  "name": "workspace-config-files",
9
- "version": "0.0.6"
9
+ "version": "0.0.8"
10
10
  },
11
11
  "dependencies": {
12
12
  "lodash": "4.17.21",
@@ -20,10 +20,10 @@
20
20
  "core-js": "^3.0.0",
21
21
  "@babel/runtime": "7.20.0",
22
22
  "@teambit/harmony": "0.4.6",
23
- "@teambit/envs": "0.0.1026",
24
- "@teambit/cli": "0.0.689",
25
- "@teambit/logger": "0.0.782",
26
- "@teambit/workspace": "0.0.1026",
23
+ "@teambit/envs": "0.0.1028",
24
+ "@teambit/cli": "0.0.691",
25
+ "@teambit/logger": "0.0.784",
26
+ "@teambit/workspace": "0.0.1028",
27
27
  "@teambit/bit-error": "0.0.402"
28
28
  },
29
29
  "devDependencies": {
@@ -40,7 +40,7 @@
40
40
  "@types/testing-library__jest-dom": "5.9.5"
41
41
  },
42
42
  "peerDependencies": {
43
- "@teambit/legacy": "1.0.469",
43
+ "@teambit/legacy": "1.0.471",
44
44
  "react": "^16.8.0 || ^17.0.0",
45
45
  "react-dom": "^16.8.0 || ^17.0.0"
46
46
  },