diff --git a/scopes/harmony/config/workspace-config.ts b/scopes/harmony/config/workspace-config.ts index 288f03247099..73cb3b239ab4 100644 --- a/scopes/harmony/config/workspace-config.ts +++ b/scopes/harmony/config/workspace-config.ts @@ -37,6 +37,7 @@ export type ComponentScopeDirMapEntry = { export type ComponentScopeDirMap = Array; export type WorkspaceExtensionProps = { + name?: string; defaultScope?: string; defaultDirectory?: string; components?: ComponentScopeDirMap; diff --git a/scopes/harmony/host-initializer/init-cmd.ts b/scopes/harmony/host-initializer/init-cmd.ts index ce01777b03d9..a46172217d4c 100644 --- a/scopes/harmony/host-initializer/init-cmd.ts +++ b/scopes/harmony/host-initializer/init-cmd.ts @@ -19,6 +19,7 @@ export class InitCmd implements Command { alias = ''; loadAspects = false; options = [ + ['n', 'name ', 'name of the workspace'], [ 'T', 'standalone', @@ -57,6 +58,7 @@ export class InitCmd implements Command { async report([path]: [string], flags: Record) { const { + name, bare, shared, standalone, @@ -84,6 +86,7 @@ export class InitCmd implements Command { const workspaceExtensionProps: WorkspaceExtensionProps = { defaultDirectory: defaultDirectory ?? getSync(CFG_INIT_DEFAULT_DIRECTORY), defaultScope: defaultScope ?? getSync(CFG_INIT_DEFAULT_SCOPE), + name, }; const { created } = await HostInitializerMain.init( path, diff --git a/src/consumer/consumer.ts b/src/consumer/consumer.ts index 0aff94e72867..71fd73741afa 100644 --- a/src/consumer/consumer.ts +++ b/src/consumer/consumer.ts @@ -467,19 +467,6 @@ export default class Consumer { fs.writeJSONSync(packageJsonPath, jsonContent, { spaces: 2 }); } - // /** - // * if resetHard, delete consumer-files: bitMap and workspace.jsonc and also the local scope (.bit dir). - // * otherwise, delete the consumer-files only when they are corrupted - // */ - // static async reset(projectPath: PathOsBasedAbsolute, resetHard: boolean, noGit = false): Promise { - // const resolvedScopePath = Consumer._getScopePath(projectPath, noGit); - // BitMap.reset(projectPath, resetHard); - // const scopeP = Scope.reset(resolvedScopePath, resetHard); - // const configP = WorkspaceConfig.reset(projectPath, resolvedScopePath, resetHard); - // const packageJsonP = PackageJsonFile.reset(projectPath); - // await Promise.all([scopeP, configP, packageJsonP]); - // } - async resetNew() { this.bitMap.resetToNewComponents(); await Scope.reset(this.scope.path, true);