@teambit/forking 1.0.440 → 1.0.441

Sign up to get free protection for your applications and to get access to all the features.
@@ -11,6 +11,7 @@ import { RefactoringMain } from '@teambit/refactoring';
11
11
  import { Workspace } from '@teambit/workspace';
12
12
  import { ForkOptions } from './fork.cmd';
13
13
  import { ScopeForkOptions } from './scope-fork.cmd';
14
+ import { ScopeMain } from '@teambit/scope';
14
15
  export type ForkInfo = {
15
16
  forkedFrom: ComponentID;
16
17
  };
@@ -30,12 +31,13 @@ type MultipleForkOptions = {
30
31
  };
31
32
  export declare class ForkingMain {
32
33
  private workspace;
34
+ private scope;
33
35
  private install;
34
36
  private dependencyResolver;
35
37
  private newComponentHelper;
36
38
  private refactoring;
37
39
  private pkg;
38
- constructor(workspace: Workspace, install: InstallMain, dependencyResolver: DependencyResolverMain, newComponentHelper: NewComponentHelperMain, refactoring: RefactoringMain, pkg: PkgMain);
40
+ constructor(workspace: Workspace, scope: ScopeMain, install: InstallMain, dependencyResolver: DependencyResolverMain, newComponentHelper: NewComponentHelperMain, refactoring: RefactoringMain, pkg: PkgMain);
39
41
  /**
40
42
  * create a new copy of existing/remote component.
41
43
  * the new component holds a reference to the old one for future reference.
@@ -46,7 +48,11 @@ export declare class ForkingMain {
46
48
  * get the forking data, such as the source where a component was forked from
47
49
  */
48
50
  getForkInfo(component: Component): ForkInfo | null;
49
- forkMultipleFromRemote(componentsToFork: MultipleComponentsToFork, options?: MultipleForkOptions): Promise<void>;
51
+ forkMultipleFromRemote(componentsToFork: MultipleComponentsToFork, options?: MultipleForkOptions): Promise<{
52
+ targetCompId: ComponentID;
53
+ sourceId: string;
54
+ component: Component;
55
+ }[]>;
50
56
  /**
51
57
  * sort the components to fork so that components without "env" prop will be forked first.
52
58
  * this way, if some components are envs, their "env" prop is empty and will be forked first, then components that
@@ -61,7 +67,10 @@ export declare class ForkingMain {
61
67
  forkScope(originalScope: string, newOptionalScope?: string, // if not specified, it'll be the default scope
62
68
  pattern?: string, options?: ScopeForkOptions): Promise<ComponentID[]>;
63
69
  private forkExistingInWorkspace;
64
- private forkRemoteComponent;
70
+ forkRemoteComponent(sourceId: ComponentID, targetId?: string, options?: ForkOptions, shouldRefactorVariablesAndClasses?: boolean): Promise<{
71
+ targetCompId: ComponentID;
72
+ component: Component;
73
+ }>;
65
74
  private saveDeps;
66
75
  private installDeps;
67
76
  private extractDeps;
@@ -69,9 +78,10 @@ export declare class ForkingMain {
69
78
  static slots: never[];
70
79
  static dependencies: import("@teambit/harmony").Aspect[];
71
80
  static runtime: import("@teambit/harmony").RuntimeDefinition;
72
- static provider([cli, workspace, dependencyResolver, componentMain, newComponentHelper, graphql, refactoring, pkg, install,]: [
81
+ static provider([cli, workspace, scope, dependencyResolver, componentMain, newComponentHelper, graphql, refactoring, pkg, install,]: [
73
82
  CLIMain,
74
83
  Workspace,
84
+ ScopeMain,
75
85
  DependencyResolverMain,
76
86
  ComponentMain,
77
87
  NewComponentHelperMain,
@@ -158,6 +158,13 @@ function _scopeFork() {
158
158
  };
159
159
  return data;
160
160
  }
161
+ function _scope() {
162
+ const data = require("@teambit/scope");
163
+ _scope = function () {
164
+ return data;
165
+ };
166
+ return data;
167
+ }
161
168
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
162
169
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
163
170
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
@@ -165,8 +172,9 @@ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object
165
172
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
166
173
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
167
174
  class ForkingMain {
168
- constructor(workspace, install, dependencyResolver, newComponentHelper, refactoring, pkg) {
175
+ constructor(workspace, scope, install, dependencyResolver, newComponentHelper, refactoring, pkg) {
169
176
  this.workspace = workspace;
177
+ this.scope = scope;
170
178
  this.install = install;
171
179
  this.dependencyResolver = dependencyResolver;
172
180
  this.newComponentHelper = newComponentHelper;
@@ -238,6 +246,7 @@ class ForkingMain {
238
246
  };
239
247
  });
240
248
  await this.refactorMultipleAndInstall(results, options);
249
+ return results;
241
250
  }
242
251
 
243
252
  /**
@@ -377,7 +386,7 @@ the reason is that the refactor changes the components using ${sourceId.toString
377
386
  }
378
387
  const targetName = targetId || sourceId.fullName;
379
388
  const targetCompId = this.newComponentHelper.getNewComponentId(targetName, undefined, options?.scope);
380
- const component = await this.workspace.scope.getRemoteComponent(sourceId);
389
+ const component = await this.scope.getRemoteComponent(sourceId);
381
390
  await this.refactoring.replaceMultipleStrings([component], [{
382
391
  oldStr: sourceId.toStringWithoutVersion(),
383
392
  newStr: targetCompId.toStringWithoutVersion()
@@ -389,7 +398,9 @@ the reason is that the refactor changes the components using ${sourceId.toString
389
398
  this.refactoring.refactorFilenames(component, sourceId, targetCompId);
390
399
  }
391
400
  const config = await this.getConfig(component, options);
392
- await this.newComponentHelper.writeAndAddNewComp(component, targetCompId, options, config);
401
+ if (this.workspace) {
402
+ await this.newComponentHelper.writeAndAddNewComp(component, targetCompId, options, config);
403
+ }
393
404
  return {
394
405
  targetCompId,
395
406
  component
@@ -446,8 +457,8 @@ the reason is that the refactor changes the components using ${sourceId.toString
446
457
  };
447
458
  return _objectSpread(_objectSpread(_objectSpread({}, fromExisting), linkToOriginal), config);
448
459
  }
449
- static async provider([cli, workspace, dependencyResolver, componentMain, newComponentHelper, graphql, refactoring, pkg, install]) {
450
- const forkingMain = new ForkingMain(workspace, install, dependencyResolver, newComponentHelper, refactoring, pkg);
460
+ static async provider([cli, workspace, scope, dependencyResolver, componentMain, newComponentHelper, graphql, refactoring, pkg, install]) {
461
+ const forkingMain = new ForkingMain(workspace, scope, install, dependencyResolver, newComponentHelper, refactoring, pkg);
451
462
  cli.register(new (_fork().ForkCmd)(forkingMain));
452
463
  graphql.register((0, _forking3().forkingSchema)(forkingMain));
453
464
  componentMain.registerShowFragments([new (_forking2().ForkingFragment)(forkingMain)]);
@@ -458,7 +469,7 @@ the reason is that the refactor changes the components using ${sourceId.toString
458
469
  }
459
470
  exports.ForkingMain = ForkingMain;
460
471
  _defineProperty(ForkingMain, "slots", []);
461
- _defineProperty(ForkingMain, "dependencies", [_cli().CLIAspect, _workspace().WorkspaceAspect, _dependencyResolver().DependencyResolverAspect, _component().ComponentAspect, _newComponentHelper().NewComponentHelperAspect, _graphql().GraphqlAspect, _refactoring().RefactoringAspect, _pkg().PkgAspect, _install().InstallAspect]);
472
+ _defineProperty(ForkingMain, "dependencies", [_cli().CLIAspect, _workspace().WorkspaceAspect, _scope().ScopeAspect, _dependencyResolver().DependencyResolverAspect, _component().ComponentAspect, _newComponentHelper().NewComponentHelperAspect, _graphql().GraphqlAspect, _refactoring().RefactoringAspect, _pkg().PkgAspect, _install().InstallAspect]);
462
473
  _defineProperty(ForkingMain, "runtime", _cli().MainRuntime);
463
474
  _forking().ForkingAspect.addRuntime(ForkingMain);
464
475
 
@@ -1 +1 @@
1
- {"version":3,"names":["_bitError","data","require","_cli","_typescript","_component","_dependencyResolver","_graphql","_componentVersion","_install","_componentId","_newComponentHelper","_pkg","_refactoring","_workspace","_componentPackageVersion","_lodash","_pMapSeries","_interopRequireDefault","_semver","_fork","_forking","_forking2","_forking3","_scopeFork","e","__esModule","default","ownKeys","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","_toPropertyKey","value","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","ForkingMain","constructor","workspace","install","dependencyResolver","newComponentHelper","refactoring","pkg","fork","sourceId","targetId","options","OutsideWorkspaceError","sourceCompId","resolveComponentId","exists","existingInWorkspace","get","forkExistingInWorkspace","sourceIdWithScope","_legacy","scope","ComponentID","fromString","targetCompId","component","forkRemoteComponent","saveDeps","skipDependencyInstallation","installDeps","getForkInfo","forkConfig","state","aspects","ForkingAspect","id","config","forkedFrom","fromObject","forkMultipleFromRemote","componentsToFork","componentsToForkSorted","sortComponentsToFork","results","pMapSeries","path","env","targetScope","refactorMultipleAndInstall","sort","a","b","oldPackages","stringsToReplace","map","oldPackageName","getPackageName","newName","fullName","replace","scopeToReplace","newPackageName","oldStr","newStr","toStringWithoutVersion","flat","stringsToReplaceForVariable","name","getStringReplacementsForVariablesAndClasses","allComponents","list","refactor","changedComponents","replaceMultipleStrings","ast","importTransformer","exportTransformer","undefined","Promise","all","comp","write","changedComponentsVariables","forkedComponents","result","policy","extractDeps","policyFlatAndUnique","uniqBy","policyWithoutWorkspaceComps","dep","includes","dependencyId","addToRootPolicy","updateExisting","persistConfig","forkScope","originalScope","newOptionalScope","pattern","newScope","defaultScope","allIdsFromOriginalScope","listRemoteScope","Error","getPatternWithScopeName","startsWith","patternWithScopeName","idsFromOriginalScope","filterIdsFromPoolIdsByPattern","workspaceIds","listIds","workspaceBitIds","ComponentIdList","fromArray","existInWorkspace","searchWithoutVersion","toString","multipleForkInfo","components","getManyRemoteComponents","getConfig","writeAndAddNewComp","incrementPathIfConflicted","info","existing","getNewComponentId","refactorDependencyName","shouldRefactorVariablesAndClasses","BitError","targetName","getRemoteComponent","preserve","refactorVariableAndClasses","refactorFilenames","workspacePolicyEntries","dedupe","import","copyPeerToRuntimeOnRoot","copyPeerToRuntimeOnComponents","deps","getDependencies","excludePackages","excludeCompIds","getCompIdsThatShouldNotBeInPolicy","source","ComponentDependency","compIdStr","componentId","parsedVersion","parse","version","versionWithPrefix","getVersionWithSavePrefix","isHash","snapToSemver","lifecycleType","lifecycle","fromExisting","skipConfig","getConfigFromExistingToNewComponent","linkToOriginal","noLink","toObject","provider","cli","componentMain","graphql","forkingMain","register","ForkCmd","forkingSchema","registerShowFragments","ForkingFragment","scopeCommand","getCommand","commands","ScopeForkCmd","exports","CLIAspect","WorkspaceAspect","DependencyResolverAspect","ComponentAspect","NewComponentHelperAspect","GraphqlAspect","RefactoringAspect","PkgAspect","InstallAspect","MainRuntime","addRuntime"],"sources":["forking.main.runtime.ts"],"sourcesContent":["import { BitError } from '@teambit/bit-error';\nimport { CLIAspect, CLIMain, MainRuntime } from '@teambit/cli';\nimport { importTransformer, exportTransformer } from '@teambit/typescript';\nimport { ComponentAspect, Component, ComponentMain } from '@teambit/component';\nimport { ComponentDependency, DependencyResolverAspect, DependencyResolverMain } from '@teambit/dependency-resolver';\nimport { ComponentConfig } from '@teambit/generator';\nimport { GraphqlAspect, GraphqlMain } from '@teambit/graphql';\nimport { isHash } from '@teambit/component-version';\nimport { InstallAspect, InstallMain } from '@teambit/install';\nimport { ComponentID, ComponentIdObj, ComponentIdList } from '@teambit/component-id';\nimport { NewComponentHelperAspect, NewComponentHelperMain } from '@teambit/new-component-helper';\nimport { PkgAspect, PkgMain } from '@teambit/pkg';\nimport { RefactoringAspect, MultipleStringsReplacement, RefactoringMain } from '@teambit/refactoring';\nimport { WorkspaceAspect, OutsideWorkspaceError, Workspace } from '@teambit/workspace';\nimport { snapToSemver } from '@teambit/component-package-version';\nimport { uniqBy } from 'lodash';\nimport pMapSeries from 'p-map-series';\nimport { parse } from 'semver';\nimport { ForkCmd, ForkOptions } from './fork.cmd';\nimport { ForkingAspect } from './forking.aspect';\nimport { ForkingFragment } from './forking.fragment';\nimport { forkingSchema } from './forking.graphql';\nimport { ScopeForkCmd, ScopeForkOptions } from './scope-fork.cmd';\n\nexport type ForkInfo = {\n forkedFrom: ComponentID;\n};\n\ntype MultipleForkInfo = {\n targetCompId: ComponentID;\n sourceId: string;\n component: Component;\n};\n\ntype MultipleComponentsToFork = Array<{\n sourceId: string;\n targetId?: string; // if not specified, it'll be the same as the source\n targetScope?: string; // if not specified, it'll be taken from the options or from the default scope\n path?: string; // if not specified, use the default component path\n env?: string; // if not specified, use the default env\n config?: ComponentConfig; // if specified, adds to/overrides the existing config\n}>;\n\ntype MultipleForkOptions = {\n refactor?: boolean;\n scope?: string; // different scope-name than the original components\n install?: boolean; // whether to run \"bit install\" once done.\n ast?: boolean; // whether to use AST to transform files instead of regex\n};\n\nexport class ForkingMain {\n constructor(\n private workspace: Workspace,\n private install: InstallMain,\n private dependencyResolver: DependencyResolverMain,\n private newComponentHelper: NewComponentHelperMain,\n private refactoring: RefactoringMain,\n private pkg: PkgMain\n ) {}\n\n /**\n * create a new copy of existing/remote component.\n * the new component holds a reference to the old one for future reference.\n * if refactor option is enable, change the source-code to update all dependencies with the new name.\n */\n async fork(sourceId: string, targetId?: string, options?: ForkOptions): Promise<ComponentID> {\n if (!this.workspace) throw new OutsideWorkspaceError();\n const sourceCompId = await this.workspace.resolveComponentId(sourceId);\n const exists = this.workspace.exists(sourceCompId);\n if (exists) {\n const existingInWorkspace = await this.workspace.get(sourceCompId);\n return this.forkExistingInWorkspace(existingInWorkspace, targetId, options);\n }\n const sourceIdWithScope = sourceCompId._legacy.scope ? sourceCompId : ComponentID.fromString(sourceId);\n const { targetCompId, component } = await this.forkRemoteComponent(sourceIdWithScope, targetId, options);\n await this.saveDeps(component);\n if (!options?.skipDependencyInstallation) await this.installDeps();\n return targetCompId;\n }\n\n /**\n * get the forking data, such as the source where a component was forked from\n */\n getForkInfo(component: Component): ForkInfo | null {\n const forkConfig = component.state.aspects.get(ForkingAspect.id)?.config as ForkConfig | undefined;\n if (!forkConfig?.forkedFrom) return null;\n return {\n forkedFrom: ComponentID.fromObject(forkConfig.forkedFrom),\n };\n }\n\n async forkMultipleFromRemote(componentsToFork: MultipleComponentsToFork, options: MultipleForkOptions = {}) {\n const componentsToForkSorted = this.sortComponentsToFork(componentsToFork);\n const { scope } = options;\n const results = await pMapSeries(\n componentsToForkSorted,\n async ({ sourceId, targetId, path, env, config, targetScope }) => {\n const sourceCompId = await this.workspace.resolveComponentId(sourceId);\n const sourceIdWithScope = sourceCompId._legacy.scope ? sourceCompId : ComponentID.fromString(sourceId);\n const { targetCompId, component } = await this.forkRemoteComponent(\n sourceIdWithScope,\n targetId,\n {\n scope: targetScope || scope,\n path,\n env,\n config,\n },\n false\n );\n return { targetCompId, sourceId, component };\n }\n );\n await this.refactorMultipleAndInstall(results, options);\n }\n\n /**\n * sort the components to fork so that components without \"env\" prop will be forked first.\n * this way, if some components are envs, their \"env\" prop is empty and will be forked first, then components that\n * depends on them.\n * otherwise, forking the components first result in errors when loading them as their envs are missing at that point\n */\n private sortComponentsToFork(componentsToFork: MultipleComponentsToFork) {\n return componentsToFork.sort((a, b) => {\n if (a.env && b.env) return 0;\n if (a.env) return 1;\n return -1;\n });\n }\n\n private async refactorMultipleAndInstall(results: MultipleForkInfo[], options: MultipleForkOptions = {}) {\n const oldPackages: string[] = [];\n const stringsToReplace: MultipleStringsReplacement = results\n .map(({ targetCompId, sourceId, component }) => {\n const oldPackageName = this.pkg.getPackageName(component);\n oldPackages.push(oldPackageName);\n const newName = targetCompId.fullName.replace(/\\//g, '.');\n const scopeToReplace = targetCompId.scope.replace('.', '/');\n const newPackageName = `@${scopeToReplace}.${newName}`;\n return [\n { oldStr: oldPackageName, newStr: newPackageName },\n { oldStr: sourceId, newStr: targetCompId.toStringWithoutVersion() },\n ];\n })\n .flat();\n\n const stringsToReplaceForVariable: MultipleStringsReplacement = results\n .map(({ targetCompId, sourceId }) => {\n const sourceCompId = ComponentID.fromString(sourceId);\n if (sourceCompId.name === targetCompId.name) return [];\n return this.refactoring.getStringReplacementsForVariablesAndClasses(sourceCompId, targetCompId);\n })\n .flat();\n\n const allComponents = await this.workspace.list();\n if (options.refactor) {\n const { changedComponents } = await this.refactoring.replaceMultipleStrings(\n allComponents,\n stringsToReplace,\n options.ast ? [importTransformer, exportTransformer] : undefined\n );\n await Promise.all(changedComponents.map((comp) => this.workspace.write(comp)));\n\n const { changedComponents: changedComponentsVariables } = await this.refactoring.replaceMultipleStrings(\n allComponents,\n stringsToReplaceForVariable,\n options.ast ? [importTransformer, exportTransformer] : undefined,\n true\n );\n\n await Promise.all(changedComponentsVariables.map((comp) => this.workspace.write(comp)));\n }\n const forkedComponents = results.map((result) => result.component);\n const policy = await Promise.all(forkedComponents.map((comp) => this.extractDeps(comp)));\n const policyFlatAndUnique = uniqBy(policy.flat(), 'dependencyId');\n const policyWithoutWorkspaceComps = policyFlatAndUnique.filter((dep) => !oldPackages.includes(dep.dependencyId));\n this.dependencyResolver.addToRootPolicy(policyWithoutWorkspaceComps, { updateExisting: true });\n await this.dependencyResolver.persistConfig('fork');\n if (options.install) {\n await this.installDeps();\n }\n }\n\n /**\n * fork all components of the given scope\n */\n async forkScope(\n originalScope: string,\n newOptionalScope?: string, // if not specified, it'll be the default scope\n pattern?: string,\n options?: ScopeForkOptions\n ): Promise<ComponentID[]> {\n if (!this.workspace) throw new OutsideWorkspaceError();\n const newScope = newOptionalScope || this.workspace.defaultScope;\n const allIdsFromOriginalScope = await this.workspace.scope.listRemoteScope(originalScope);\n if (!allIdsFromOriginalScope.length) {\n throw new Error(`unable to find components to fork from ${originalScope}`);\n }\n const getPatternWithScopeName = () => {\n if (!pattern) return undefined;\n if (pattern.startsWith(`${originalScope}/`)) return pattern;\n return `${originalScope}/${pattern}`;\n };\n const patternWithScopeName = getPatternWithScopeName();\n const idsFromOriginalScope = patternWithScopeName\n ? await this.workspace.scope.filterIdsFromPoolIdsByPattern(patternWithScopeName, allIdsFromOriginalScope)\n : allIdsFromOriginalScope;\n const workspaceIds = this.workspace.listIds();\n const workspaceBitIds = ComponentIdList.fromArray(workspaceIds.map((id) => id));\n idsFromOriginalScope.forEach((id) => {\n const existInWorkspace = workspaceBitIds.searchWithoutVersion(id);\n if (existInWorkspace) {\n throw new Error(\n `unable to fork \"${id.toString()}\". the workspace has a component \"${existInWorkspace.toString()}\" with the same name and same scope`\n );\n }\n });\n const multipleForkInfo: MultipleForkInfo[] = [];\n const components = await this.workspace.scope.getManyRemoteComponents(idsFromOriginalScope);\n await pMapSeries(components, async (component) => {\n const config = await this.getConfig(component);\n const targetCompId = ComponentID.fromObject({ name: component.id.fullName }, newScope);\n await this.newComponentHelper.writeAndAddNewComp(\n component,\n targetCompId,\n {\n scope: newScope,\n incrementPathIfConflicted: true,\n },\n config\n );\n multipleForkInfo.push({ targetCompId, sourceId: component.id.toStringWithoutVersion(), component });\n });\n await this.refactorMultipleAndInstall(multipleForkInfo, {\n refactor: true,\n install: !options?.skipDependencyInstallation,\n ast: options?.ast,\n });\n return multipleForkInfo.map((info) => info.targetCompId);\n }\n\n private async forkExistingInWorkspace(existing: Component, targetId?: string, options?: ForkOptions) {\n targetId = targetId || existing.id.fullName;\n const targetCompId = this.newComponentHelper.getNewComponentId(targetId, undefined, options?.scope);\n\n const config = await this.getConfig(existing, options);\n await this.newComponentHelper.writeAndAddNewComp(existing, targetCompId, options, config);\n if (options?.refactor) {\n const allComponents = await this.workspace.list();\n const { changedComponents } = await this.refactoring.refactorDependencyName(allComponents, existing.id, targetId);\n await Promise.all(changedComponents.map((comp) => this.workspace.write(comp)));\n }\n return targetCompId;\n }\n\n private async forkRemoteComponent(\n sourceId: ComponentID,\n targetId?: string,\n options?: ForkOptions,\n shouldRefactorVariablesAndClasses = true\n ): Promise<{\n targetCompId: ComponentID;\n component: Component;\n }> {\n if (options?.refactor) {\n throw new BitError(`the component ${sourceId.toStringWithoutVersion()} is not in the workspace, you can't use the --refactor flag.\nthe reason is that the refactor changes the components using ${sourceId.toStringWithoutVersion()}, since it's not in the workspace, no components were using it, so nothing to refactor`);\n }\n const targetName = targetId || sourceId.fullName;\n const targetCompId = this.newComponentHelper.getNewComponentId(targetName, undefined, options?.scope);\n const component = await this.workspace.scope.getRemoteComponent(sourceId);\n await this.refactoring.replaceMultipleStrings(\n [component],\n [\n {\n oldStr: sourceId.toStringWithoutVersion(),\n newStr: targetCompId.toStringWithoutVersion(),\n },\n ],\n options?.ast ? [importTransformer, exportTransformer] : undefined\n );\n if (!options?.preserve) {\n if (shouldRefactorVariablesAndClasses) {\n await this.refactoring.refactorVariableAndClasses(component, sourceId, targetCompId, options);\n }\n this.refactoring.refactorFilenames(component, sourceId, targetCompId);\n }\n const config = await this.getConfig(component, options);\n await this.newComponentHelper.writeAndAddNewComp(component, targetCompId, options, config);\n\n return { targetCompId, component };\n }\n\n private async saveDeps(component: Component) {\n const workspacePolicyEntries = this.extractDeps(component);\n this.dependencyResolver.addToRootPolicy(workspacePolicyEntries, { updateExisting: true });\n await this.dependencyResolver.persistConfig('fork (save deps)');\n }\n\n private async installDeps() {\n await this.install.install(undefined, {\n dedupe: true,\n import: false,\n copyPeerToRuntimeOnRoot: true,\n copyPeerToRuntimeOnComponents: false,\n updateExisting: false,\n });\n }\n\n private extractDeps(component: Component) {\n const deps = this.dependencyResolver.getDependencies(component);\n const excludePackages = ['@teambit/legacy'];\n const excludeCompIds = this.dependencyResolver.getCompIdsThatShouldNotBeInPolicy();\n return deps\n .filter((dep) => dep.source === 'auto')\n .filter((dep) => {\n if (dep instanceof ComponentDependency) {\n const compIdStr = dep.componentId.toStringWithoutVersion();\n return !excludeCompIds.includes(compIdStr);\n }\n return !excludePackages.includes(dep.id);\n })\n .map((dep) => {\n const parsedVersion = parse(dep.version);\n const versionWithPrefix = parsedVersion\n ? this.dependencyResolver.getVersionWithSavePrefix({ version: dep.version })\n : dep.version;\n const version = isHash(versionWithPrefix) ? snapToSemver(versionWithPrefix) : versionWithPrefix;\n return {\n dependencyId: dep.getPackageName?.() || dep.id,\n lifecycleType: dep.lifecycle === 'dev' ? 'runtime' : dep.lifecycle,\n value: {\n version,\n },\n };\n });\n }\n\n private async getConfig(comp: Component, options?: ForkOptions) {\n const config = options?.config || {};\n const fromExisting = options?.skipConfig\n ? {}\n : await this.newComponentHelper.getConfigFromExistingToNewComponent(comp);\n const linkToOriginal = options?.noLink ? {} : { [ForkingAspect.id]: { forkedFrom: comp.id.toObject() } };\n return {\n ...fromExisting,\n ...linkToOriginal,\n ...config,\n };\n }\n\n static slots = [];\n static dependencies = [\n CLIAspect,\n WorkspaceAspect,\n DependencyResolverAspect,\n ComponentAspect,\n NewComponentHelperAspect,\n GraphqlAspect,\n RefactoringAspect,\n PkgAspect,\n InstallAspect,\n ];\n static runtime = MainRuntime;\n static async provider([\n cli,\n workspace,\n dependencyResolver,\n componentMain,\n newComponentHelper,\n graphql,\n refactoring,\n pkg,\n install,\n ]: [\n CLIMain,\n Workspace,\n DependencyResolverMain,\n ComponentMain,\n NewComponentHelperMain,\n GraphqlMain,\n RefactoringMain,\n PkgMain,\n InstallMain,\n ]) {\n const forkingMain = new ForkingMain(workspace, install, dependencyResolver, newComponentHelper, refactoring, pkg);\n cli.register(new ForkCmd(forkingMain));\n graphql.register(forkingSchema(forkingMain));\n componentMain.registerShowFragments([new ForkingFragment(forkingMain)]);\n\n const scopeCommand = cli.getCommand('scope');\n scopeCommand?.commands?.push(new ScopeForkCmd(forkingMain));\n\n return forkingMain;\n }\n}\n\nForkingAspect.addRuntime(ForkingMain);\n\nexport type ForkConfig = {\n forkedFrom: ComponentIdObj;\n};\n"],"mappings":";;;;;;AAAA,SAAAA,UAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,SAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,KAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,IAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IA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kBAAkB,EAClBkK,OAAO,EACPjK,WAAW,EACXC,GAAG,EACHJ,OAAO,CAWR,EAAE;IACD,MAAMqK,WAAW,GAAG,IAAIxK,WAAW,CAACE,SAAS,EAAEC,OAAO,EAAEC,kBAAkB,EAAEC,kBAAkB,EAAEC,WAAW,EAAEC,GAAG,CAAC;IACjH8J,GAAG,CAACI,QAAQ,CAAC,KAAIC,eAAO,EAACF,WAAW,CAAC,CAAC;IACtCD,OAAO,CAACE,QAAQ,CAAC,IAAAE,yBAAa,EAACH,WAAW,CAAC,CAAC;IAC5CF,aAAa,CAACM,qBAAqB,CAAC,CAAC,KAAIC,2BAAe,EAACL,WAAW,CAAC,CAAC,CAAC;IAEvE,MAAMM,YAAY,GAAGT,GAAG,CAACU,UAAU,CAAC,OAAO,CAAC;IAC5CD,YAAY,EAAEE,QAAQ,EAAEtM,IAAI,CAAC,KAAIuM,yBAAY,EAACT,WAAW,CAAC,CAAC;IAE3D,OAAOA,WAAW;EACpB;AACF;AAACU,OAAA,CAAAlL,WAAA,GAAAA,WAAA;AAAAhB,eAAA,CAzVYgB,WAAW,WA6SP,EAAE;AAAAhB,eAAA,CA7SNgB,WAAW,kBA8SA,CACpBmL,gBAAS,EACTC,4BAAe,EACfC,8CAAwB,EACxBC,4BAAe,EACfC,8CAAwB,EACxBC,wBAAa,EACbC,gCAAiB,EACjBC,gBAAS,EACTC,wBAAa,CACd;AAAA3M,eAAA,CAxTUgB,WAAW,aAyTL4L,kBAAW;AAkC9B1J,wBAAa,CAAC2J,UAAU,CAAC7L,WAAW,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_bitError","data","require","_cli","_typescript","_component","_dependencyResolver","_graphql","_componentVersion","_install","_componentId","_newComponentHelper","_pkg","_refactoring","_workspace","_componentPackageVersion","_lodash","_pMapSeries","_interopRequireDefault","_semver","_fork","_forking","_forking2","_forking3","_scopeFork","_scope","e","__esModule","default","ownKeys","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","_toPropertyKey","value","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","ForkingMain","constructor","workspace","scope","install","dependencyResolver","newComponentHelper","refactoring","pkg","fork","sourceId","targetId","options","OutsideWorkspaceError","sourceCompId","resolveComponentId","exists","existingInWorkspace","get","forkExistingInWorkspace","sourceIdWithScope","_legacy","ComponentID","fromString","targetCompId","component","forkRemoteComponent","saveDeps","skipDependencyInstallation","installDeps","getForkInfo","forkConfig","state","aspects","ForkingAspect","id","config","forkedFrom","fromObject","forkMultipleFromRemote","componentsToFork","componentsToForkSorted","sortComponentsToFork","results","pMapSeries","path","env","targetScope","refactorMultipleAndInstall","sort","a","b","oldPackages","stringsToReplace","map","oldPackageName","getPackageName","newName","fullName","replace","scopeToReplace","newPackageName","oldStr","newStr","toStringWithoutVersion","flat","stringsToReplaceForVariable","name","getStringReplacementsForVariablesAndClasses","allComponents","list","refactor","changedComponents","replaceMultipleStrings","ast","importTransformer","exportTransformer","undefined","Promise","all","comp","write","changedComponentsVariables","forkedComponents","result","policy","extractDeps","policyFlatAndUnique","uniqBy","policyWithoutWorkspaceComps","dep","includes","dependencyId","addToRootPolicy","updateExisting","persistConfig","forkScope","originalScope","newOptionalScope","pattern","newScope","defaultScope","allIdsFromOriginalScope","listRemoteScope","Error","getPatternWithScopeName","startsWith","patternWithScopeName","idsFromOriginalScope","filterIdsFromPoolIdsByPattern","workspaceIds","listIds","workspaceBitIds","ComponentIdList","fromArray","existInWorkspace","searchWithoutVersion","toString","multipleForkInfo","components","getManyRemoteComponents","getConfig","writeAndAddNewComp","incrementPathIfConflicted","info","existing","getNewComponentId","refactorDependencyName","shouldRefactorVariablesAndClasses","BitError","targetName","getRemoteComponent","preserve","refactorVariableAndClasses","refactorFilenames","workspacePolicyEntries","dedupe","import","copyPeerToRuntimeOnRoot","copyPeerToRuntimeOnComponents","deps","getDependencies","excludePackages","excludeCompIds","getCompIdsThatShouldNotBeInPolicy","source","ComponentDependency","compIdStr","componentId","parsedVersion","parse","version","versionWithPrefix","getVersionWithSavePrefix","isHash","snapToSemver","lifecycleType","lifecycle","fromExisting","skipConfig","getConfigFromExistingToNewComponent","linkToOriginal","noLink","toObject","provider","cli","componentMain","graphql","forkingMain","register","ForkCmd","forkingSchema","registerShowFragments","ForkingFragment","scopeCommand","getCommand","commands","ScopeForkCmd","exports","CLIAspect","WorkspaceAspect","ScopeAspect","DependencyResolverAspect","ComponentAspect","NewComponentHelperAspect","GraphqlAspect","RefactoringAspect","PkgAspect","InstallAspect","MainRuntime","addRuntime"],"sources":["forking.main.runtime.ts"],"sourcesContent":["import { BitError } from '@teambit/bit-error';\nimport { CLIAspect, CLIMain, MainRuntime } from '@teambit/cli';\nimport { importTransformer, exportTransformer } from '@teambit/typescript';\nimport { ComponentAspect, Component, ComponentMain } from '@teambit/component';\nimport { ComponentDependency, DependencyResolverAspect, DependencyResolverMain } from '@teambit/dependency-resolver';\nimport { ComponentConfig } from '@teambit/generator';\nimport { GraphqlAspect, GraphqlMain } from '@teambit/graphql';\nimport { isHash } from '@teambit/component-version';\nimport { InstallAspect, InstallMain } from '@teambit/install';\nimport { ComponentID, ComponentIdObj, ComponentIdList } from '@teambit/component-id';\nimport { NewComponentHelperAspect, NewComponentHelperMain } from '@teambit/new-component-helper';\nimport { PkgAspect, PkgMain } from '@teambit/pkg';\nimport { RefactoringAspect, MultipleStringsReplacement, RefactoringMain } from '@teambit/refactoring';\nimport { WorkspaceAspect, OutsideWorkspaceError, Workspace } from '@teambit/workspace';\nimport { snapToSemver } from '@teambit/component-package-version';\nimport { uniqBy } from 'lodash';\nimport pMapSeries from 'p-map-series';\nimport { parse } from 'semver';\nimport { ForkCmd, ForkOptions } from './fork.cmd';\nimport { ForkingAspect } from './forking.aspect';\nimport { ForkingFragment } from './forking.fragment';\nimport { forkingSchema } from './forking.graphql';\nimport { ScopeForkCmd, ScopeForkOptions } from './scope-fork.cmd';\nimport { ScopeAspect, ScopeMain } from '@teambit/scope';\n\nexport type ForkInfo = {\n forkedFrom: ComponentID;\n};\n\ntype MultipleForkInfo = {\n targetCompId: ComponentID;\n sourceId: string;\n component: Component;\n};\n\ntype MultipleComponentsToFork = Array<{\n sourceId: string;\n targetId?: string; // if not specified, it'll be the same as the source\n targetScope?: string; // if not specified, it'll be taken from the options or from the default scope\n path?: string; // if not specified, use the default component path\n env?: string; // if not specified, use the default env\n config?: ComponentConfig; // if specified, adds to/overrides the existing config\n}>;\n\ntype MultipleForkOptions = {\n refactor?: boolean;\n scope?: string; // different scope-name than the original components\n install?: boolean; // whether to run \"bit install\" once done.\n ast?: boolean; // whether to use AST to transform files instead of regex\n};\n\nexport class ForkingMain {\n constructor(\n private workspace: Workspace,\n private scope: ScopeMain,\n private install: InstallMain,\n private dependencyResolver: DependencyResolverMain,\n private newComponentHelper: NewComponentHelperMain,\n private refactoring: RefactoringMain,\n private pkg: PkgMain\n ) {}\n\n /**\n * create a new copy of existing/remote component.\n * the new component holds a reference to the old one for future reference.\n * if refactor option is enable, change the source-code to update all dependencies with the new name.\n */\n async fork(sourceId: string, targetId?: string, options?: ForkOptions): Promise<ComponentID> {\n if (!this.workspace) throw new OutsideWorkspaceError();\n const sourceCompId = await this.workspace.resolveComponentId(sourceId);\n const exists = this.workspace.exists(sourceCompId);\n if (exists) {\n const existingInWorkspace = await this.workspace.get(sourceCompId);\n return this.forkExistingInWorkspace(existingInWorkspace, targetId, options);\n }\n const sourceIdWithScope = sourceCompId._legacy.scope ? sourceCompId : ComponentID.fromString(sourceId);\n const { targetCompId, component } = await this.forkRemoteComponent(sourceIdWithScope, targetId, options);\n await this.saveDeps(component);\n if (!options?.skipDependencyInstallation) await this.installDeps();\n return targetCompId;\n }\n\n /**\n * get the forking data, such as the source where a component was forked from\n */\n getForkInfo(component: Component): ForkInfo | null {\n const forkConfig = component.state.aspects.get(ForkingAspect.id)?.config as ForkConfig | undefined;\n if (!forkConfig?.forkedFrom) return null;\n return {\n forkedFrom: ComponentID.fromObject(forkConfig.forkedFrom),\n };\n }\n\n async forkMultipleFromRemote(componentsToFork: MultipleComponentsToFork, options: MultipleForkOptions = {}) {\n const componentsToForkSorted = this.sortComponentsToFork(componentsToFork);\n const { scope } = options;\n const results = await pMapSeries(\n componentsToForkSorted,\n async ({ sourceId, targetId, path, env, config, targetScope }) => {\n const sourceCompId = await this.workspace.resolveComponentId(sourceId);\n const sourceIdWithScope = sourceCompId._legacy.scope ? sourceCompId : ComponentID.fromString(sourceId);\n const { targetCompId, component } = await this.forkRemoteComponent(\n sourceIdWithScope,\n targetId,\n {\n scope: targetScope || scope,\n path,\n env,\n config,\n },\n false\n );\n return { targetCompId, sourceId, component };\n }\n );\n await this.refactorMultipleAndInstall(results, options);\n return results;\n }\n\n /**\n * sort the components to fork so that components without \"env\" prop will be forked first.\n * this way, if some components are envs, their \"env\" prop is empty and will be forked first, then components that\n * depends on them.\n * otherwise, forking the components first result in errors when loading them as their envs are missing at that point\n */\n private sortComponentsToFork(componentsToFork: MultipleComponentsToFork) {\n return componentsToFork.sort((a, b) => {\n if (a.env && b.env) return 0;\n if (a.env) return 1;\n return -1;\n });\n }\n\n private async refactorMultipleAndInstall(results: MultipleForkInfo[], options: MultipleForkOptions = {}) {\n const oldPackages: string[] = [];\n const stringsToReplace: MultipleStringsReplacement = results\n .map(({ targetCompId, sourceId, component }) => {\n const oldPackageName = this.pkg.getPackageName(component);\n oldPackages.push(oldPackageName);\n const newName = targetCompId.fullName.replace(/\\//g, '.');\n const scopeToReplace = targetCompId.scope.replace('.', '/');\n const newPackageName = `@${scopeToReplace}.${newName}`;\n return [\n { oldStr: oldPackageName, newStr: newPackageName },\n { oldStr: sourceId, newStr: targetCompId.toStringWithoutVersion() },\n ];\n })\n .flat();\n\n const stringsToReplaceForVariable: MultipleStringsReplacement = results\n .map(({ targetCompId, sourceId }) => {\n const sourceCompId = ComponentID.fromString(sourceId);\n if (sourceCompId.name === targetCompId.name) return [];\n return this.refactoring.getStringReplacementsForVariablesAndClasses(sourceCompId, targetCompId);\n })\n .flat();\n\n const allComponents = await this.workspace.list();\n if (options.refactor) {\n const { changedComponents } = await this.refactoring.replaceMultipleStrings(\n allComponents,\n stringsToReplace,\n options.ast ? [importTransformer, exportTransformer] : undefined\n );\n await Promise.all(changedComponents.map((comp) => this.workspace.write(comp)));\n\n const { changedComponents: changedComponentsVariables } = await this.refactoring.replaceMultipleStrings(\n allComponents,\n stringsToReplaceForVariable,\n options.ast ? [importTransformer, exportTransformer] : undefined,\n true\n );\n\n await Promise.all(changedComponentsVariables.map((comp) => this.workspace.write(comp)));\n }\n const forkedComponents = results.map((result) => result.component);\n const policy = await Promise.all(forkedComponents.map((comp) => this.extractDeps(comp)));\n const policyFlatAndUnique = uniqBy(policy.flat(), 'dependencyId');\n const policyWithoutWorkspaceComps = policyFlatAndUnique.filter((dep) => !oldPackages.includes(dep.dependencyId));\n this.dependencyResolver.addToRootPolicy(policyWithoutWorkspaceComps, { updateExisting: true });\n await this.dependencyResolver.persistConfig('fork');\n if (options.install) {\n await this.installDeps();\n }\n }\n\n /**\n * fork all components of the given scope\n */\n async forkScope(\n originalScope: string,\n newOptionalScope?: string, // if not specified, it'll be the default scope\n pattern?: string,\n options?: ScopeForkOptions\n ): Promise<ComponentID[]> {\n if (!this.workspace) throw new OutsideWorkspaceError();\n const newScope = newOptionalScope || this.workspace.defaultScope;\n const allIdsFromOriginalScope = await this.workspace.scope.listRemoteScope(originalScope);\n if (!allIdsFromOriginalScope.length) {\n throw new Error(`unable to find components to fork from ${originalScope}`);\n }\n const getPatternWithScopeName = () => {\n if (!pattern) return undefined;\n if (pattern.startsWith(`${originalScope}/`)) return pattern;\n return `${originalScope}/${pattern}`;\n };\n const patternWithScopeName = getPatternWithScopeName();\n const idsFromOriginalScope = patternWithScopeName\n ? await this.workspace.scope.filterIdsFromPoolIdsByPattern(patternWithScopeName, allIdsFromOriginalScope)\n : allIdsFromOriginalScope;\n const workspaceIds = this.workspace.listIds();\n const workspaceBitIds = ComponentIdList.fromArray(workspaceIds.map((id) => id));\n idsFromOriginalScope.forEach((id) => {\n const existInWorkspace = workspaceBitIds.searchWithoutVersion(id);\n if (existInWorkspace) {\n throw new Error(\n `unable to fork \"${id.toString()}\". the workspace has a component \"${existInWorkspace.toString()}\" with the same name and same scope`\n );\n }\n });\n const multipleForkInfo: MultipleForkInfo[] = [];\n const components = await this.workspace.scope.getManyRemoteComponents(idsFromOriginalScope);\n await pMapSeries(components, async (component) => {\n const config = await this.getConfig(component);\n const targetCompId = ComponentID.fromObject({ name: component.id.fullName }, newScope);\n await this.newComponentHelper.writeAndAddNewComp(\n component,\n targetCompId,\n {\n scope: newScope,\n incrementPathIfConflicted: true,\n },\n config\n );\n multipleForkInfo.push({ targetCompId, sourceId: component.id.toStringWithoutVersion(), component });\n });\n await this.refactorMultipleAndInstall(multipleForkInfo, {\n refactor: true,\n install: !options?.skipDependencyInstallation,\n ast: options?.ast,\n });\n return multipleForkInfo.map((info) => info.targetCompId);\n }\n\n private async forkExistingInWorkspace(existing: Component, targetId?: string, options?: ForkOptions) {\n targetId = targetId || existing.id.fullName;\n const targetCompId = this.newComponentHelper.getNewComponentId(targetId, undefined, options?.scope);\n\n const config = await this.getConfig(existing, options);\n await this.newComponentHelper.writeAndAddNewComp(existing, targetCompId, options, config);\n if (options?.refactor) {\n const allComponents = await this.workspace.list();\n const { changedComponents } = await this.refactoring.refactorDependencyName(allComponents, existing.id, targetId);\n await Promise.all(changedComponents.map((comp) => this.workspace.write(comp)));\n }\n return targetCompId;\n }\n\n async forkRemoteComponent(\n sourceId: ComponentID,\n targetId?: string,\n options?: ForkOptions,\n shouldRefactorVariablesAndClasses = true\n ): Promise<{\n targetCompId: ComponentID;\n component: Component;\n }> {\n if (options?.refactor) {\n throw new BitError(`the component ${sourceId.toStringWithoutVersion()} is not in the workspace, you can't use the --refactor flag.\nthe reason is that the refactor changes the components using ${sourceId.toStringWithoutVersion()}, since it's not in the workspace, no components were using it, so nothing to refactor`);\n }\n const targetName = targetId || sourceId.fullName;\n const targetCompId = this.newComponentHelper.getNewComponentId(targetName, undefined, options?.scope);\n const component = await this.scope.getRemoteComponent(sourceId);\n await this.refactoring.replaceMultipleStrings(\n [component],\n [\n {\n oldStr: sourceId.toStringWithoutVersion(),\n newStr: targetCompId.toStringWithoutVersion(),\n },\n ],\n options?.ast ? [importTransformer, exportTransformer] : undefined\n );\n if (!options?.preserve) {\n if (shouldRefactorVariablesAndClasses) {\n await this.refactoring.refactorVariableAndClasses(component, sourceId, targetCompId, options);\n }\n this.refactoring.refactorFilenames(component, sourceId, targetCompId);\n }\n const config = await this.getConfig(component, options);\n if (this.workspace) {\n await this.newComponentHelper.writeAndAddNewComp(component, targetCompId, options, config);\n }\n\n return { targetCompId, component };\n }\n\n private async saveDeps(component: Component) {\n const workspacePolicyEntries = this.extractDeps(component);\n this.dependencyResolver.addToRootPolicy(workspacePolicyEntries, { updateExisting: true });\n await this.dependencyResolver.persistConfig('fork (save deps)');\n }\n\n private async installDeps() {\n await this.install.install(undefined, {\n dedupe: true,\n import: false,\n copyPeerToRuntimeOnRoot: true,\n copyPeerToRuntimeOnComponents: false,\n updateExisting: false,\n });\n }\n\n private extractDeps(component: Component) {\n const deps = this.dependencyResolver.getDependencies(component);\n const excludePackages = ['@teambit/legacy'];\n const excludeCompIds = this.dependencyResolver.getCompIdsThatShouldNotBeInPolicy();\n return deps\n .filter((dep) => dep.source === 'auto')\n .filter((dep) => {\n if (dep instanceof ComponentDependency) {\n const compIdStr = dep.componentId.toStringWithoutVersion();\n return !excludeCompIds.includes(compIdStr);\n }\n return !excludePackages.includes(dep.id);\n })\n .map((dep) => {\n const parsedVersion = parse(dep.version);\n const versionWithPrefix = parsedVersion\n ? this.dependencyResolver.getVersionWithSavePrefix({ version: dep.version })\n : dep.version;\n const version = isHash(versionWithPrefix) ? snapToSemver(versionWithPrefix) : versionWithPrefix;\n return {\n dependencyId: dep.getPackageName?.() || dep.id,\n lifecycleType: dep.lifecycle === 'dev' ? 'runtime' : dep.lifecycle,\n value: {\n version,\n },\n };\n });\n }\n\n private async getConfig(comp: Component, options?: ForkOptions) {\n const config = options?.config || {};\n const fromExisting = options?.skipConfig\n ? {}\n : await this.newComponentHelper.getConfigFromExistingToNewComponent(comp);\n const linkToOriginal = options?.noLink ? {} : { [ForkingAspect.id]: { forkedFrom: comp.id.toObject() } };\n return {\n ...fromExisting,\n ...linkToOriginal,\n ...config,\n };\n }\n\n static slots = [];\n static dependencies = [\n CLIAspect,\n WorkspaceAspect,\n ScopeAspect,\n DependencyResolverAspect,\n ComponentAspect,\n NewComponentHelperAspect,\n GraphqlAspect,\n RefactoringAspect,\n PkgAspect,\n InstallAspect,\n ];\n static runtime = MainRuntime;\n static async provider([\n cli,\n workspace,\n scope,\n dependencyResolver,\n componentMain,\n newComponentHelper,\n graphql,\n refactoring,\n pkg,\n install,\n ]: [\n CLIMain,\n Workspace,\n ScopeMain,\n DependencyResolverMain,\n ComponentMain,\n NewComponentHelperMain,\n GraphqlMain,\n RefactoringMain,\n PkgMain,\n InstallMain,\n ]) {\n const forkingMain = new ForkingMain(\n workspace,\n scope,\n install,\n dependencyResolver,\n newComponentHelper,\n refactoring,\n pkg\n );\n cli.register(new ForkCmd(forkingMain));\n graphql.register(forkingSchema(forkingMain));\n componentMain.registerShowFragments([new ForkingFragment(forkingMain)]);\n\n const scopeCommand = cli.getCommand('scope');\n scopeCommand?.commands?.push(new ScopeForkCmd(forkingMain));\n\n return forkingMain;\n }\n}\n\nForkingAspect.addRuntime(ForkingMain);\n\nexport type ForkConfig = {\n forkedFrom: ComponentIdObj;\n};\n"],"mappings":";;;;;;AAAA,SAAAA,UAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,SAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,KAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;E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8TL6L,kBAAW;AA4C9B3J,wBAAa,CAAC4J,UAAU,CAAC9L,WAAW,CAAC","ignoreList":[]}
@@ -1,5 +1,5 @@
1
- import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.component_forking@1.0.440/dist/forking.composition.js';
2
- import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.component_forking@1.0.440/dist/forking.docs.mdx';
1
+ import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.component_forking@1.0.441/dist/forking.composition.js';
2
+ import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.component_forking@1.0.441/dist/forking.docs.mdx';
3
3
 
4
4
  export const compositions = [compositions_0];
5
5
  export const overview = [overview_0];
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/forking",
3
- "version": "1.0.440",
3
+ "version": "1.0.441",
4
4
  "homepage": "https://bit.cloud/teambit/component/forking",
5
5
  "main": "dist/index.js",
6
6
  "componentId": {
7
7
  "scope": "teambit.component",
8
8
  "name": "forking",
9
- "version": "1.0.440"
9
+ "version": "1.0.441"
10
10
  },
11
11
  "dependencies": {
12
12
  "chalk": "2.4.2",
@@ -18,18 +18,19 @@
18
18
  "@teambit/bit-error": "0.0.404",
19
19
  "@teambit/component-id": "1.2.2",
20
20
  "@teambit/component-version": "1.0.3",
21
- "@teambit/cli": "0.0.1017",
22
- "@teambit/generator": "1.0.441",
23
- "@teambit/component": "1.0.440",
24
- "@teambit/graphql": "1.0.440",
21
+ "@teambit/cli": "0.0.1018",
22
+ "@teambit/generator": "1.0.442",
23
+ "@teambit/component": "1.0.441",
24
+ "@teambit/graphql": "1.0.441",
25
25
  "@teambit/component-package-version": "0.0.434",
26
- "@teambit/dependency-resolver": "1.0.440",
27
- "@teambit/install": "1.0.440",
28
- "@teambit/new-component-helper": "1.0.440",
29
- "@teambit/pkg": "1.0.440",
30
- "@teambit/refactoring": "1.0.440",
31
- "@teambit/typescript": "1.0.440",
32
- "@teambit/workspace": "1.0.440"
26
+ "@teambit/dependency-resolver": "1.0.441",
27
+ "@teambit/install": "1.0.441",
28
+ "@teambit/new-component-helper": "1.0.441",
29
+ "@teambit/pkg": "1.0.441",
30
+ "@teambit/refactoring": "1.0.441",
31
+ "@teambit/scope": "1.0.441",
32
+ "@teambit/typescript": "1.0.441",
33
+ "@teambit/workspace": "1.0.441"
33
34
  },
34
35
  "devDependencies": {
35
36
  "@types/lodash": "4.14.165",