@teambit/workspace-config-files 0.0.117 → 0.0.119
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{preview-1692674301863.js → preview-1692847103766.js} +1 -1
- package/dist/workspace-config-files.main.runtime.d.ts +8 -0
- package/dist/workspace-config-files.main.runtime.js +12 -0
- package/dist/workspace-config-files.main.runtime.js.map +1 -1
- package/package.json +7 -7
- package/.bit-capsule-ready +0 -0
- package/package-tar/teambit-workspace-config-files-0.0.117.tgz +0 -0
|
@@ -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.
|
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.workspace_workspace-config-files@0.0.119/dist/workspace-config-files.docs.mdx';
|
|
3
3
|
|
|
4
4
|
export const compositions = [];
|
|
5
5
|
export const overview = [overview_0];
|
|
@@ -11,6 +11,7 @@ import { EnvsWrittenExtendingConfigFiles, EnvsWrittenRealConfigFiles } from './w
|
|
|
11
11
|
*/
|
|
12
12
|
export declare type WorkspaceConfigFilesAspectConfig = {
|
|
13
13
|
configsRootDir?: string;
|
|
14
|
+
enableWorkspaceConfigWrite?: boolean;
|
|
14
15
|
};
|
|
15
16
|
export declare type EnvConfigWriter = {
|
|
16
17
|
envId: string;
|
|
@@ -92,6 +93,12 @@ export declare class WorkspaceConfigFilesMain {
|
|
|
92
93
|
* @returns An array of strings.
|
|
93
94
|
*/
|
|
94
95
|
cleanConfigFiles(options?: CleanConfigFilesOptions): Promise<string[]>;
|
|
96
|
+
/**
|
|
97
|
+
* The function checks if the auto writing of workspace configuration is enabled.
|
|
98
|
+
* if it's enabled we will re-generate the configuration files upon bit create
|
|
99
|
+
* @returns the boolean value of `!!this.config.enableWorkspaceConfigWrite`.
|
|
100
|
+
*/
|
|
101
|
+
isWorkspaceConfigWriteEnabled(): boolean;
|
|
95
102
|
/**
|
|
96
103
|
* It returns a list of all the config writers that have been registered with the config writer slot
|
|
97
104
|
* @returns An array of objects with aspectId and configWriter properties.
|
|
@@ -120,6 +127,7 @@ export declare class WorkspaceConfigFilesMain {
|
|
|
120
127
|
static slots: never[];
|
|
121
128
|
static dependencies: import("@teambit/harmony").Aspect[];
|
|
122
129
|
static runtime: import("@teambit/harmony").RuntimeDefinition;
|
|
130
|
+
static defaultConfig: Partial<WorkspaceConfigFilesAspectConfig>;
|
|
123
131
|
static provider([cli, workspace, envs, loggerAspect]: [CLIMain, Workspace, EnvsMain, LoggerMain], config: WorkspaceConfigFilesAspectConfig): Promise<WorkspaceConfigFilesMain>;
|
|
124
132
|
}
|
|
125
133
|
export default WorkspaceConfigFilesMain;
|
|
@@ -192,6 +192,15 @@ class WorkspaceConfigFilesMain {
|
|
|
192
192
|
return cleanResults;
|
|
193
193
|
}
|
|
194
194
|
|
|
195
|
+
/**
|
|
196
|
+
* The function checks if the auto writing of workspace configuration is enabled.
|
|
197
|
+
* if it's enabled we will re-generate the configuration files upon bit create
|
|
198
|
+
* @returns the boolean value of `!!this.config.enableWorkspaceConfigWrite`.
|
|
199
|
+
*/
|
|
200
|
+
isWorkspaceConfigWriteEnabled() {
|
|
201
|
+
return !!this.config.enableWorkspaceConfigWrite;
|
|
202
|
+
}
|
|
203
|
+
|
|
195
204
|
/**
|
|
196
205
|
* It returns a list of all the config writers that have been registered with the config writer slot
|
|
197
206
|
* @returns An array of objects with aspectId and configWriter properties.
|
|
@@ -369,6 +378,9 @@ exports.WorkspaceConfigFilesMain = WorkspaceConfigFilesMain;
|
|
|
369
378
|
// in case you need to use another aspect API.
|
|
370
379
|
(0, _defineProperty2().default)(WorkspaceConfigFilesMain, "dependencies", [_cli().CLIAspect, _workspace().WorkspaceAspect, _envs().EnvsAspect, _logger().LoggerAspect]);
|
|
371
380
|
(0, _defineProperty2().default)(WorkspaceConfigFilesMain, "runtime", _cli().MainRuntime);
|
|
381
|
+
(0, _defineProperty2().default)(WorkspaceConfigFilesMain, "defaultConfig", {
|
|
382
|
+
enableWorkspaceConfigWrite: false
|
|
383
|
+
});
|
|
372
384
|
_workspaceConfigFiles().WorkspaceConfigFilesAspect.addRuntime(WorkspaceConfigFilesMain);
|
|
373
385
|
var _default = WorkspaceConfigFilesMain;
|
|
374
386
|
exports.default = _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_fsExtra","data","_interopRequireDefault","require","_path","_globby","_chalk","_exceptions","_pMapSeries","_yesno","_lodash","_cli","_workspace","_envs","_logger","_workspaceConfigFiles","_wsConfig","_writeFailed","_workspaceConfigFiles2","_writers","WorkspaceConfigFilesMain","constructor","workspace","envs","logger","config","_defineProperty2","default","writeConfigFiles","options","execContext","getExecContext","cleanResults","clean","writeResults","write","err","info","WriteConfigFilesFailed","wsDir","path","cleanConfigFiles","listConfigWriters","execContexts","result","map","executionContext","configWriters","getConfigWriters","envId","envRuntime","id","groupByWriterId","writerList","reduce","acc","envConfigWriter","forEach","configWriter","push","envsExecutionContext","opts","envCompDirsMap","getEnvComponentsDirsMap","configsRootDir","getConfigsRootDir","writerIdsToEnvEntriesMap","filteredWriterIdsToEnvEntriesMap","writers","pick","totalRealConfigFiles","totalExtendingConfigFiles","results","pMapSeries","Object","entries","writerId","envEntries","oneResult","handleOneIdWriter","totalWrittenFiles","writersResult","envCompsDirsMap","writtenRealConfigFilesMap","handleRealConfigFiles","writtenExtendingConfigFiles","handleExtendingConfigFiles","writtenRealConfigFiles","values","length","curr","extendingConfigFile","filePaths","realConfigFiles","extendingConfigFiles","userConfiguredDir","join","getCacheDir","rootDir","components","list","runtime","createEnvironment","getEnvExecutionContext","envExecution","toString","value","env","paths","c","componentDir","undefined","relative","envExecutionContext","workspaceConfig","isFunction","addToEnvsNotImplementing","getFlatConfigWriters","flatMap","dryRun","silent","filteredConfigWriters","filter","includes","uniq","patterns","currPaths","globby","sync","cwd","dot","onlyFiles","ignore","filteredPaths","fullPath","isBitGenerated","flat","promptForCleaning","deleteFiles","envsNotImplementing","getEnvsNotImplementing","keys","clearStatusLine","ok","yesno","question","chalk","underline","bold","PromptCanceled","Promise","all","f","fs","remove","provider","cli","loggerAspect","createLogger","WorkspaceConfigFilesAspect","registerService","WorkspaceConfigFilesService","workspaceConfigFilesMain","wsConfigCmd","WsConfigCmd","commands","WsConfigWriteCmd","WsConfigCleanCmd","WsConfigListCmd","register","exports","CLIAspect","WorkspaceAspect","EnvsAspect","LoggerAspect","MainRuntime","addRuntime","_default"],"sources":["workspace-config-files.main.runtime.ts"],"sourcesContent":["import 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 { flatMap, isFunction, pick, uniq } from 'lodash';\nimport { CLIAspect, CLIMain, MainRuntime } from '@teambit/cli';\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 { ConfigWriterEntry } from './config-writer-entry';\nimport { WsConfigCleanCmd, WsConfigCmd, WsConfigListCmd, WsConfigWriteCmd } from './ws-config.cmd';\nimport WriteConfigFilesFailed from './exceptions/write-failed';\nimport { WorkspaceConfigFilesService } from './workspace-config-files.service';\nimport {\n handleRealConfigFiles,\n handleExtendingConfigFiles,\n EnvsWrittenExtendingConfigFiles,\n EnvsWrittenRealConfigFiles,\n} from './writers';\n\n/**\n * Configs that can be configured in the workspace.jsonc file\n */\nexport type WorkspaceConfigFilesAspectConfig = {\n configsRootDir?: string;\n};\n\nexport type EnvConfigWriter = {\n envId: string;\n executionContext: ExecutionContext;\n configWriters: ConfigWriterEntry[];\n};\n\nexport type EnvConfigWriterEntry = {\n envId: string;\n configWriter: ConfigWriterEntry;\n executionContext: ExecutionContext;\n};\n\ntype WriterIdsToEnvEntriesMap = {\n [writerId: string]: EnvConfigWriterEntry[];\n};\n\nexport type EnvConfigWritersList = Array<EnvConfigWriter>;\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 CompPathExtendingHashMap = { [compPath: string]: string };\n\nexport type EnvMapValue = { env: Environment; id: string[]; paths: string[] };\nexport type EnvCompsDirsMap = { [envId: string]: EnvMapValue };\n\nexport type OneConfigWriterIdResult = {\n writerId: string;\n totalWrittenFiles: number;\n realConfigFiles: EnvsWrittenRealConfigFiles;\n totalRealConfigFiles: number;\n extendingConfigFiles: EnvsWrittenExtendingConfigFiles;\n totalExtendingConfigFiles: number;\n};\n\nexport type WriteResults = {\n writersResult: OneConfigWriterIdResult[];\n totalWrittenFiles: number;\n totalRealConfigFiles: number;\n totalExtendingConfigFiles: number;\n};\n\nexport type WriteConfigFilesResult = {\n cleanResults?: string[];\n writeResults: WriteResults;\n wsDir: string;\n};\n\nexport class WorkspaceConfigFilesMain {\n private envsNotImplementing = {};\n\n constructor(\n private workspace: Workspace,\n private envs: EnvsMain,\n private logger: Logger,\n private config: WorkspaceConfigFilesAspectConfig\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 writeResults;\n try {\n writeResults = await this.write(execContext, options);\n } catch (err) {\n this.logger.info('writeConfigFiles failed', err);\n throw new WriteConfigFilesFailed();\n }\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 async listConfigWriters(): Promise<EnvConfigWritersList> {\n const execContexts = await this.getExecContext();\n\n const result: EnvConfigWritersList = execContexts.map((executionContext) => {\n const configWriters = this.getConfigWriters(executionContext);\n return { envId: executionContext.envRuntime.id, executionContext, configWriters };\n });\n return result;\n }\n\n private groupByWriterId(writerList: EnvConfigWritersList): WriterIdsToEnvEntriesMap {\n return writerList.reduce((acc, envConfigWriter: EnvConfigWriter) => {\n envConfigWriter.configWriters.forEach((configWriter: ConfigWriterEntry) => {\n acc[configWriter.id] = acc[configWriter.id] || [];\n acc[configWriter.id].push({ configWriter, envId: envConfigWriter.envId });\n });\n return acc;\n }, {});\n }\n\n private async write(envsExecutionContext: ExecutionContext[], opts: WriteConfigFilesOptions): Promise<WriteResults> {\n const envCompDirsMap = this.getEnvComponentsDirsMap(envsExecutionContext);\n const configsRootDir = this.getConfigsRootDir();\n const configWriters = await this.listConfigWriters();\n const writerIdsToEnvEntriesMap = this.groupByWriterId(configWriters);\n const filteredWriterIdsToEnvEntriesMap = opts.writers\n ? pick(writerIdsToEnvEntriesMap, opts.writers)\n : writerIdsToEnvEntriesMap;\n let totalRealConfigFiles = 0;\n let totalExtendingConfigFiles = 0;\n const results = await pMapSeries(\n Object.entries(filteredWriterIdsToEnvEntriesMap),\n async ([writerId, envEntries]) => {\n const oneResult = await this.handleOneIdWriter(writerId, envEntries, envCompDirsMap, configsRootDir, opts);\n totalRealConfigFiles += oneResult.totalRealConfigFiles;\n totalExtendingConfigFiles += oneResult.totalExtendingConfigFiles;\n return oneResult;\n }\n );\n\n const totalWrittenFiles = totalRealConfigFiles + totalExtendingConfigFiles;\n return { writersResult: results, totalWrittenFiles, totalRealConfigFiles, totalExtendingConfigFiles };\n }\n\n private async handleOneIdWriter(\n writerId: string,\n envEntries: EnvConfigWriterEntry[],\n envCompsDirsMap: EnvCompsDirsMap,\n configsRootDir: string,\n opts: WriteConfigFilesOptions\n ): Promise<OneConfigWriterIdResult> {\n const writtenRealConfigFilesMap = await handleRealConfigFiles(envEntries, envCompsDirsMap, configsRootDir, opts);\n const writtenExtendingConfigFiles = await handleExtendingConfigFiles(\n envEntries,\n envCompsDirsMap,\n writtenRealConfigFilesMap,\n configsRootDir,\n this.workspace.path,\n opts\n );\n\n const writtenRealConfigFiles = Object.values(writtenRealConfigFilesMap);\n const totalRealConfigFiles = writtenRealConfigFiles.length;\n const totalExtendingConfigFiles = writtenExtendingConfigFiles.reduce(\n (acc, curr) => acc + curr.extendingConfigFile.filePaths.length,\n 0\n );\n const totalWrittenFiles = totalRealConfigFiles + totalExtendingConfigFiles;\n return {\n writerId,\n totalWrittenFiles,\n realConfigFiles: writtenRealConfigFiles,\n totalRealConfigFiles,\n extendingConfigFiles: writtenExtendingConfigFiles,\n totalExtendingConfigFiles,\n };\n }\n\n private getConfigsRootDir(): string {\n const userConfiguredDir = this.config.configsRootDir;\n return userConfiguredDir ? join(this.workspace.path, userConfiguredDir) : 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(envExecutionContext: ExecutionContext): ConfigWriterEntry[] {\n if (envExecutionContext.env.workspaceConfig && isFunction(envExecutionContext.env.workspaceConfig)) {\n return envExecutionContext.env.workspaceConfig();\n }\n this.addToEnvsNotImplementing(envExecutionContext.env.id);\n return [];\n }\n\n private getFlatConfigWriters(envsExecutionContext: ExecutionContext[]): ConfigWriterEntry[] {\n return flatMap(envsExecutionContext, (envExecutionContext) => {\n return this.getConfigWriters(envExecutionContext);\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 execContext = await this.getExecContext();\n const configWriters = this.getFlatConfigWriters(execContext);\n const filteredConfigWriters = writers\n ? configWriters.filter((configWriter) => writers.includes(configWriter.id))\n : configWriters;\n\n const paths = uniq(\n 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 );\n if (dryRun) return paths;\n if (!silent) await this.promptForCleaning(paths);\n await this.deleteFiles(paths);\n return paths;\n }\n\n private addToEnvsNotImplementing(envId: string) {\n this.envsNotImplementing[envId] = true;\n }\n\n getEnvsNotImplementing() {\n return Object.keys(this.envsNotImplementing);\n }\n\n private async promptForCleaning(paths: string[]) {\n this.logger.clearStatusLine();\n const ok = await yesno({\n question: `${chalk.underline('The following files 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 static slots = [];\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: WorkspaceConfigFilesAspectConfig\n ) {\n const logger = loggerAspect.createLogger(WorkspaceConfigFilesAspect.id);\n envs.registerService(new WorkspaceConfigFilesService(logger));\n\n const workspaceConfigFilesMain = new WorkspaceConfigFilesMain(workspace, envs, logger, config);\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,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA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AwB,aAsPlB2J,kBAAW;AAqB9BhB,kDAA0B,CAACiB,UAAU,CAAC5J,wBAAwB,CAAC;AAAC,IAAA6J,QAAA,GAEjD7J,wBAAwB;AAAAsJ,OAAA,CAAA/I,OAAA,GAAAsJ,QAAA"}
|
|
1
|
+
{"version":3,"names":["_fsExtra","data","_interopRequireDefault","require","_path","_globby","_chalk","_exceptions","_pMapSeries","_yesno","_lodash","_cli","_workspace","_envs","_logger","_workspaceConfigFiles","_wsConfig","_writeFailed","_workspaceConfigFiles2","_writers","WorkspaceConfigFilesMain","constructor","workspace","envs","logger","config","_defineProperty2","default","writeConfigFiles","options","execContext","getExecContext","cleanResults","clean","writeResults","write","err","info","WriteConfigFilesFailed","wsDir","path","cleanConfigFiles","isWorkspaceConfigWriteEnabled","enableWorkspaceConfigWrite","listConfigWriters","execContexts","result","map","executionContext","configWriters","getConfigWriters","envId","envRuntime","id","groupByWriterId","writerList","reduce","acc","envConfigWriter","forEach","configWriter","push","envsExecutionContext","opts","envCompDirsMap","getEnvComponentsDirsMap","configsRootDir","getConfigsRootDir","writerIdsToEnvEntriesMap","filteredWriterIdsToEnvEntriesMap","writers","pick","totalRealConfigFiles","totalExtendingConfigFiles","results","pMapSeries","Object","entries","writerId","envEntries","oneResult","handleOneIdWriter","totalWrittenFiles","writersResult","envCompsDirsMap","writtenRealConfigFilesMap","handleRealConfigFiles","writtenExtendingConfigFiles","handleExtendingConfigFiles","writtenRealConfigFiles","values","length","curr","extendingConfigFile","filePaths","realConfigFiles","extendingConfigFiles","userConfiguredDir","join","getCacheDir","rootDir","components","list","runtime","createEnvironment","getEnvExecutionContext","envExecution","toString","value","env","paths","c","componentDir","undefined","relative","envExecutionContext","workspaceConfig","isFunction","addToEnvsNotImplementing","getFlatConfigWriters","flatMap","dryRun","silent","filteredConfigWriters","filter","includes","uniq","patterns","currPaths","globby","sync","cwd","dot","onlyFiles","ignore","filteredPaths","fullPath","isBitGenerated","flat","promptForCleaning","deleteFiles","envsNotImplementing","getEnvsNotImplementing","keys","clearStatusLine","ok","yesno","question","chalk","underline","bold","PromptCanceled","Promise","all","f","fs","remove","provider","cli","loggerAspect","createLogger","WorkspaceConfigFilesAspect","registerService","WorkspaceConfigFilesService","workspaceConfigFilesMain","wsConfigCmd","WsConfigCmd","commands","WsConfigWriteCmd","WsConfigCleanCmd","WsConfigListCmd","register","exports","CLIAspect","WorkspaceAspect","EnvsAspect","LoggerAspect","MainRuntime","addRuntime","_default"],"sources":["workspace-config-files.main.runtime.ts"],"sourcesContent":["import 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 { flatMap, isFunction, pick, uniq } from 'lodash';\nimport { CLIAspect, CLIMain, MainRuntime } from '@teambit/cli';\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 { ConfigWriterEntry } from './config-writer-entry';\nimport { WsConfigCleanCmd, WsConfigCmd, WsConfigListCmd, WsConfigWriteCmd } from './ws-config.cmd';\nimport WriteConfigFilesFailed from './exceptions/write-failed';\nimport { WorkspaceConfigFilesService } from './workspace-config-files.service';\nimport {\n handleRealConfigFiles,\n handleExtendingConfigFiles,\n EnvsWrittenExtendingConfigFiles,\n EnvsWrittenRealConfigFiles,\n} from './writers';\n\n/**\n * Configs that can be configured in the workspace.jsonc file\n */\nexport type WorkspaceConfigFilesAspectConfig = {\n configsRootDir?: string;\n enableWorkspaceConfigWrite?: boolean;\n};\n\nexport type EnvConfigWriter = {\n envId: string;\n executionContext: ExecutionContext;\n configWriters: ConfigWriterEntry[];\n};\n\nexport type EnvConfigWriterEntry = {\n envId: string;\n configWriter: ConfigWriterEntry;\n executionContext: ExecutionContext;\n};\n\ntype WriterIdsToEnvEntriesMap = {\n [writerId: string]: EnvConfigWriterEntry[];\n};\n\nexport type EnvConfigWritersList = Array<EnvConfigWriter>;\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 CompPathExtendingHashMap = { [compPath: string]: string };\n\nexport type EnvMapValue = { env: Environment; id: string[]; paths: string[] };\nexport type EnvCompsDirsMap = { [envId: string]: EnvMapValue };\n\nexport type OneConfigWriterIdResult = {\n writerId: string;\n totalWrittenFiles: number;\n realConfigFiles: EnvsWrittenRealConfigFiles;\n totalRealConfigFiles: number;\n extendingConfigFiles: EnvsWrittenExtendingConfigFiles;\n totalExtendingConfigFiles: number;\n};\n\nexport type WriteResults = {\n writersResult: OneConfigWriterIdResult[];\n totalWrittenFiles: number;\n totalRealConfigFiles: number;\n totalExtendingConfigFiles: number;\n};\n\nexport type WriteConfigFilesResult = {\n cleanResults?: string[];\n writeResults: WriteResults;\n wsDir: string;\n};\n\nexport class WorkspaceConfigFilesMain {\n private envsNotImplementing = {};\n\n constructor(\n private workspace: Workspace,\n private envs: EnvsMain,\n private logger: Logger,\n private config: WorkspaceConfigFilesAspectConfig\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 writeResults;\n try {\n writeResults = await this.write(execContext, options);\n } catch (err) {\n this.logger.info('writeConfigFiles failed', err);\n throw new WriteConfigFilesFailed();\n }\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 * The function checks if the auto writing of workspace configuration is enabled.\n * if it's enabled we will re-generate the configuration files upon bit create\n * @returns the boolean value of `!!this.config.enableWorkspaceConfigWrite`.\n */\n isWorkspaceConfigWriteEnabled() {\n return !!this.config.enableWorkspaceConfigWrite;\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 async listConfigWriters(): Promise<EnvConfigWritersList> {\n const execContexts = await this.getExecContext();\n\n const result: EnvConfigWritersList = execContexts.map((executionContext) => {\n const configWriters = this.getConfigWriters(executionContext);\n return { envId: executionContext.envRuntime.id, executionContext, configWriters };\n });\n return result;\n }\n\n private groupByWriterId(writerList: EnvConfigWritersList): WriterIdsToEnvEntriesMap {\n return writerList.reduce((acc, envConfigWriter: EnvConfigWriter) => {\n envConfigWriter.configWriters.forEach((configWriter: ConfigWriterEntry) => {\n acc[configWriter.id] = acc[configWriter.id] || [];\n acc[configWriter.id].push({ configWriter, envId: envConfigWriter.envId });\n });\n return acc;\n }, {});\n }\n\n private async write(envsExecutionContext: ExecutionContext[], opts: WriteConfigFilesOptions): Promise<WriteResults> {\n const envCompDirsMap = this.getEnvComponentsDirsMap(envsExecutionContext);\n const configsRootDir = this.getConfigsRootDir();\n const configWriters = await this.listConfigWriters();\n const writerIdsToEnvEntriesMap = this.groupByWriterId(configWriters);\n const filteredWriterIdsToEnvEntriesMap = opts.writers\n ? pick(writerIdsToEnvEntriesMap, opts.writers)\n : writerIdsToEnvEntriesMap;\n let totalRealConfigFiles = 0;\n let totalExtendingConfigFiles = 0;\n const results = await pMapSeries(\n Object.entries(filteredWriterIdsToEnvEntriesMap),\n async ([writerId, envEntries]) => {\n const oneResult = await this.handleOneIdWriter(writerId, envEntries, envCompDirsMap, configsRootDir, opts);\n totalRealConfigFiles += oneResult.totalRealConfigFiles;\n totalExtendingConfigFiles += oneResult.totalExtendingConfigFiles;\n return oneResult;\n }\n );\n\n const totalWrittenFiles = totalRealConfigFiles + totalExtendingConfigFiles;\n return { writersResult: results, totalWrittenFiles, totalRealConfigFiles, totalExtendingConfigFiles };\n }\n\n private async handleOneIdWriter(\n writerId: string,\n envEntries: EnvConfigWriterEntry[],\n envCompsDirsMap: EnvCompsDirsMap,\n configsRootDir: string,\n opts: WriteConfigFilesOptions\n ): Promise<OneConfigWriterIdResult> {\n const writtenRealConfigFilesMap = await handleRealConfigFiles(envEntries, envCompsDirsMap, configsRootDir, opts);\n const writtenExtendingConfigFiles = await handleExtendingConfigFiles(\n envEntries,\n envCompsDirsMap,\n writtenRealConfigFilesMap,\n configsRootDir,\n this.workspace.path,\n opts\n );\n\n const writtenRealConfigFiles = Object.values(writtenRealConfigFilesMap);\n const totalRealConfigFiles = writtenRealConfigFiles.length;\n const totalExtendingConfigFiles = writtenExtendingConfigFiles.reduce(\n (acc, curr) => acc + curr.extendingConfigFile.filePaths.length,\n 0\n );\n const totalWrittenFiles = totalRealConfigFiles + totalExtendingConfigFiles;\n return {\n writerId,\n totalWrittenFiles,\n realConfigFiles: writtenRealConfigFiles,\n totalRealConfigFiles,\n extendingConfigFiles: writtenExtendingConfigFiles,\n totalExtendingConfigFiles,\n };\n }\n\n private getConfigsRootDir(): string {\n const userConfiguredDir = this.config.configsRootDir;\n return userConfiguredDir ? join(this.workspace.path, userConfiguredDir) : 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(envExecutionContext: ExecutionContext): ConfigWriterEntry[] {\n if (envExecutionContext.env.workspaceConfig && isFunction(envExecutionContext.env.workspaceConfig)) {\n return envExecutionContext.env.workspaceConfig();\n }\n this.addToEnvsNotImplementing(envExecutionContext.env.id);\n return [];\n }\n\n private getFlatConfigWriters(envsExecutionContext: ExecutionContext[]): ConfigWriterEntry[] {\n return flatMap(envsExecutionContext, (envExecutionContext) => {\n return this.getConfigWriters(envExecutionContext);\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 execContext = await this.getExecContext();\n const configWriters = this.getFlatConfigWriters(execContext);\n const filteredConfigWriters = writers\n ? configWriters.filter((configWriter) => writers.includes(configWriter.id))\n : configWriters;\n\n const paths = uniq(\n 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 );\n if (dryRun) return paths;\n if (!silent) await this.promptForCleaning(paths);\n await this.deleteFiles(paths);\n return paths;\n }\n\n private addToEnvsNotImplementing(envId: string) {\n this.envsNotImplementing[envId] = true;\n }\n\n getEnvsNotImplementing() {\n return Object.keys(this.envsNotImplementing);\n }\n\n private async promptForCleaning(paths: string[]) {\n this.logger.clearStatusLine();\n const ok = await yesno({\n question: `${chalk.underline('The following files 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 static slots = [];\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 defaultConfig: Partial<WorkspaceConfigFilesAspectConfig> = {\n enableWorkspaceConfigWrite: false,\n };\n\n static async provider(\n [cli, workspace, envs, loggerAspect]: [CLIMain, Workspace, EnvsMain, LoggerMain],\n config: WorkspaceConfigFilesAspectConfig\n ) {\n const logger = loggerAspect.createLogger(WorkspaceConfigFilesAspect.id);\n envs.registerService(new WorkspaceConfigFilesService(logger));\n\n const workspaceConfigFilesMain = new WorkspaceConfigFilesMain(workspace, envs, logger, config);\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":";;;;;;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CAAAxJ,wBAAA,GAAAA,wBAAA;AAAA,IAAAM,gBAAA,GAAAC,OAAA,EAtRYP,wBAAwB,WA0PpB,EAAE;AACjB;AACA;AAAA,IAAAM,gBAAA,GAAAC,OAAA,EA5PWP,wBAAwB,kBA6Pb,CAACyJ,gBAAS,EAAEC,4BAAe,EAAEC,kBAAU,EAAEC,sBAAY,CAAC;AAAA,IAAAtJ,gBAAA,GAAAC,OAAA,EA7PjEP,wBAAwB,aA+PlB6J,kBAAW;AAAA,IAAAvJ,gBAAA,GAAAC,OAAA,EA/PjBP,wBAAwB,mBAiQ+B;EAChEuB,0BAA0B,EAAE;AAC9B,CAAC;AAqBHsH,kDAA0B,CAACiB,UAAU,CAAC9J,wBAAwB,CAAC;AAAC,IAAA+J,QAAA,GAEjD/J,wBAAwB;AAAAwJ,OAAA,CAAAjJ,OAAA,GAAAwJ,QAAA"}
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/workspace-config-files",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.119",
|
|
4
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.
|
|
9
|
+
"version": "0.0.119"
|
|
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.
|
|
24
|
-
"@teambit/cli": "0.0.
|
|
25
|
-
"@teambit/logger": "0.0.
|
|
26
|
-
"@teambit/workspace": "0.0.
|
|
23
|
+
"@teambit/envs": "0.0.1139",
|
|
24
|
+
"@teambit/cli": "0.0.763",
|
|
25
|
+
"@teambit/logger": "0.0.856",
|
|
26
|
+
"@teambit/workspace": "0.0.1139",
|
|
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.
|
|
43
|
+
"@teambit/legacy": "1.0.547",
|
|
44
44
|
"react": "^16.8.0 || ^17.0.0",
|
|
45
45
|
"react-dom": "^16.8.0 || ^17.0.0"
|
|
46
46
|
},
|
package/.bit-capsule-ready
DELETED
|
File without changes
|
|
Binary file
|