@teambit/forking 1.0.26 → 1.0.28
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.
@@ -1,10 +1,10 @@
|
|
1
1
|
import { CLIMain } from '@teambit/cli';
|
2
|
-
import { Component,
|
3
|
-
import { ComponentIdObj } from '@teambit/component-id';
|
2
|
+
import { Component, ComponentMain } from '@teambit/component';
|
4
3
|
import { DependencyResolverMain } from '@teambit/dependency-resolver';
|
5
4
|
import { ComponentConfig } from '@teambit/generator';
|
6
5
|
import { GraphqlMain } from '@teambit/graphql';
|
7
6
|
import { InstallMain } from '@teambit/install';
|
7
|
+
import { ComponentID, ComponentIdObj } from '@teambit/component-id';
|
8
8
|
import { NewComponentHelperMain } from '@teambit/new-component-helper';
|
9
9
|
import { PkgMain } from '@teambit/pkg';
|
10
10
|
import { RefactoringMain } from '@teambit/refactoring';
|
@@ -26,7 +26,7 @@ function _typescript() {
|
|
26
26
|
return data;
|
27
27
|
}
|
28
28
|
function _component() {
|
29
|
-
const data =
|
29
|
+
const data = _interopRequireDefault(require("@teambit/component"));
|
30
30
|
_component = function () {
|
31
31
|
return data;
|
32
32
|
};
|
@@ -53,16 +53,9 @@ function _install() {
|
|
53
53
|
};
|
54
54
|
return data;
|
55
55
|
}
|
56
|
-
function
|
57
|
-
const data = require("@teambit/
|
58
|
-
|
59
|
-
return data;
|
60
|
-
};
|
61
|
-
return data;
|
62
|
-
}
|
63
|
-
function _bitId() {
|
64
|
-
const data = require("@teambit/legacy/dist/bit-id");
|
65
|
-
_bitId = function () {
|
56
|
+
function _componentId() {
|
57
|
+
const data = require("@teambit/component-id");
|
58
|
+
_componentId = function () {
|
66
59
|
return data;
|
67
60
|
};
|
68
61
|
return data;
|
@@ -144,9 +137,9 @@ function _scopeFork() {
|
|
144
137
|
};
|
145
138
|
return data;
|
146
139
|
}
|
147
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
148
140
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
149
141
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
142
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
150
143
|
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; }
|
151
144
|
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; }
|
152
145
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
@@ -175,7 +168,7 @@ class ForkingMain {
|
|
175
168
|
const existingInWorkspace = await this.workspace.get(sourceCompId);
|
176
169
|
return this.forkExistingInWorkspace(existingInWorkspace, targetId, options);
|
177
170
|
}
|
178
|
-
const sourceIdWithScope = sourceCompId._legacy.scope ? sourceCompId :
|
171
|
+
const sourceIdWithScope = sourceCompId._legacy.scope ? sourceCompId : _componentId().ComponentID.fromString(sourceId);
|
179
172
|
const {
|
180
173
|
targetCompId,
|
181
174
|
component
|
@@ -193,7 +186,7 @@ class ForkingMain {
|
|
193
186
|
const forkConfig = (_component$state$aspe = component.state.aspects.get(_forking().ForkingAspect.id)) === null || _component$state$aspe === void 0 ? void 0 : _component$state$aspe.config;
|
194
187
|
if (!forkConfig) return null;
|
195
188
|
return {
|
196
|
-
forkedFrom:
|
189
|
+
forkedFrom: _componentId().ComponentID.fromObject(forkConfig.forkedFrom)
|
197
190
|
};
|
198
191
|
}
|
199
192
|
async forkMultipleFromRemote(componentsToFork, options = {}) {
|
@@ -209,7 +202,7 @@ class ForkingMain {
|
|
209
202
|
config
|
210
203
|
}) => {
|
211
204
|
const sourceCompId = await this.workspace.resolveComponentId(sourceId);
|
212
|
-
const sourceIdWithScope = sourceCompId._legacy.scope ? sourceCompId :
|
205
|
+
const sourceIdWithScope = sourceCompId._legacy.scope ? sourceCompId : _componentId().ComponentID.fromString(sourceId);
|
213
206
|
const {
|
214
207
|
targetCompId,
|
215
208
|
component
|
@@ -290,9 +283,9 @@ class ForkingMain {
|
|
290
283
|
throw new Error(`unable to find components to fork from ${originalScope}`);
|
291
284
|
}
|
292
285
|
const workspaceIds = await this.workspace.listIds();
|
293
|
-
const workspaceBitIds =
|
286
|
+
const workspaceBitIds = _componentId().ComponentIdList.fromArray(workspaceIds.map(id => id));
|
294
287
|
idsFromOriginalScope.forEach(id => {
|
295
|
-
const existInWorkspace = workspaceBitIds.searchWithoutVersion(id
|
288
|
+
const existInWorkspace = workspaceBitIds.searchWithoutVersion(id);
|
296
289
|
if (existInWorkspace) {
|
297
290
|
throw new Error(`unable to fork "${id.toString()}". the workspace has a component "${existInWorkspace.toString()}" with the same name and same scope`);
|
298
291
|
}
|
@@ -301,7 +294,7 @@ class ForkingMain {
|
|
301
294
|
const components = await this.workspace.scope.getManyRemoteComponents(idsFromOriginalScope);
|
302
295
|
await (0, _pMapSeries().default)(components, async component => {
|
303
296
|
const config = await this.getConfig(component);
|
304
|
-
const targetCompId =
|
297
|
+
const targetCompId = _componentId().ComponentID.fromObject({
|
305
298
|
name: component.id.fullName
|
306
299
|
}, newScope);
|
307
300
|
await this.newComponentHelper.writeAndAddNewComp(component, targetCompId, {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_bitError","data","require","_cli","_typescript","_component","_interopRequireWildcard","_dependencyResolver","_graphql","_interopRequireDefault","_install","_legacyBitId","_bitId","_newComponentHelper","_pkg","_refactoring","_workspace","_lodash","_pMapSeries","_fork","_forking","_forking2","_forking3","_scopeFork","obj","__esModule","default","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","ownKeys","e","r","t","keys","getOwnPropertySymbols","o","filter","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","value","_toPropertyKey","configurable","writable","arg","_toPrimitive","String","input","hint","prim","Symbol","toPrimitive","undefined","res","TypeError","Number","ForkingMain","constructor","workspace","install","dependencyResolver","newComponentHelper","refactoring","pkg","fork","sourceId","targetId","options","OutsideWorkspaceError","sourceCompId","resolveComponentId","exists","existingInWorkspace","forkExistingInWorkspace","sourceIdWithScope","_legacy","scope","ComponentID","fromLegacy","BitId","parse","targetCompId","component","forkRemoteComponent","saveDeps","skipDependencyInstallation","installDeps","getForkInfo","_component$state$aspe","forkConfig","state","aspects","ForkingAspect","id","config","forkedFrom","fromObject","forkMultipleFromRemote","componentsToFork","componentsToForkSorted","sortComponentsToFork","results","pMapSeries","path","env","refactorMultipleAndInstall","sort","a","b","oldPackages","stringsToReplace","map","oldPackageName","getPackageName","newName","fullName","replace","scopeToReplace","newPackageName","oldStr","newStr","toStringWithoutVersion","flat","allComponents","list","refactor","changedComponents","replaceMultipleStrings","ast","importTransformer","exportTransformer","Promise","all","comp","write","forkedComponents","result","policy","extractDeps","policyFlatAndUnique","uniqBy","policyWithoutWorkspaceComps","dep","includes","dependencyId","addToRootPolicy","updateExisting","persistConfig","forkScope","originalScope","newScope","idsFromOriginalScope","listRemoteScope","Error","workspaceIds","listIds","workspaceBitIds","BitIds","fromArray","existInWorkspace","searchWithoutVersion","toString","multipleForkInfo","components","getManyRemoteComponents","getConfig","name","writeAndAddNewComp","info","existing","getNewComponentId","refactorDependencyName","BitError","targetName","getRemoteComponent","preserve","refactorVariableAndClasses","refactorFilenames","workspacePolicyEntries","dedupe","import","copyPeerToRuntimeOnRoot","copyPeerToRuntimeOnComponents","deps","getDependencies","excludePackages","excludeCompIds","getCompIdsThatShouldNotBeInPolicy","source","ComponentDependency","compIdStr","componentId","_dep$getPackageName","lifecycleType","lifecycle","version","fromExisting","skipConfig","getConfigFromExistingToNewComponent","linkToOriginal","noLink","toObject","provider","cli","componentMain","graphql","_scopeCommand$command","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, ComponentID, ComponentMain } from '@teambit/component';\nimport { ComponentIdObj } from '@teambit/component-id';\nimport { ComponentDependency, DependencyResolverAspect, DependencyResolverMain } from '@teambit/dependency-resolver';\nimport { ComponentConfig } from '@teambit/generator';\nimport GraphqlAspect, { GraphqlMain } from '@teambit/graphql';\nimport { InstallAspect, InstallMain } from '@teambit/install';\nimport { BitId } from '@teambit/legacy-bit-id';\nimport { BitIds } from '@teambit/legacy/dist/bit-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 { uniqBy } from 'lodash';\nimport pMapSeries from 'p-map-series';\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 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\n ? sourceCompId\n : ComponentID.fromLegacy(BitId.parse(sourceId, true));\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) 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(componentsToForkSorted, async ({ sourceId, targetId, path, env, config }) => {\n const sourceCompId = await this.workspace.resolveComponentId(sourceId);\n const sourceIdWithScope = sourceCompId._legacy.scope\n ? sourceCompId\n : ComponentID.fromLegacy(BitId.parse(sourceId, true));\n const { targetCompId, component } = await this.forkRemoteComponent(sourceIdWithScope, targetId, {\n scope,\n path,\n env,\n config,\n });\n return { targetCompId, sourceId, component };\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 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 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(this.workspace.path);\n if (options.install) {\n await this.installDeps();\n }\n }\n\n /**\n * fork all components of the given scope\n */\n async forkScope(originalScope: string, newScope: string, options?: ScopeForkOptions): Promise<ComponentID[]> {\n const idsFromOriginalScope = await this.workspace.scope.listRemoteScope(originalScope);\n if (!idsFromOriginalScope.length) {\n throw new Error(`unable to find components to fork from ${originalScope}`);\n }\n const workspaceIds = await this.workspace.listIds();\n const workspaceBitIds = BitIds.fromArray(workspaceIds.map((id) => id._legacy));\n idsFromOriginalScope.forEach((id) => {\n const existInWorkspace = workspaceBitIds.searchWithoutVersion(id._legacy);\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(component, targetCompId, { scope: newScope }, config);\n multipleForkInfo.push({ targetCompId, sourceId: component.id.toStringWithoutVersion(), component });\n });\n await this.refactorMultipleAndInstall(multipleForkInfo, { refactor: true, install: true, ast: options?.ast });\n return multipleForkInfo.map((info) => info.targetCompId);\n }\n\n private async forkExistingInWorkspace(existing: Component, targetId?: string, options?: ForkOptions) {\n if (!targetId) {\n throw new Error(`error: unable to create \"${existing.id.toStringWithoutVersion()}\" component, a component with the same name already exists.\nplease specify the target-id arg`);\n }\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 ): 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 await this.refactoring.refactorVariableAndClasses(component, sourceId, targetCompId);\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 = await this.extractDeps(component);\n this.dependencyResolver.addToRootPolicy(workspacePolicyEntries, { updateExisting: true });\n await this.dependencyResolver.persistConfig(this.workspace.path);\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 async extractDeps(component: Component) {\n const deps = await 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 dependencyId: dep.getPackageName?.() || dep.id,\n lifecycleType: dep.lifecycle === 'dev' ? 'runtime' : dep.lifecycle,\n value: {\n version: dep.version,\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,IAAA;AAAA;AACA,SAAAG,YAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,WAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,WAAA;EAAA,MAAAJ,IAAA,GAAAK,uBAAA,CAAAJ,OAAA;EAAAG,UAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAM,oBAAA;EAAA,MAAAN,IAAA,GAAAC,OAAA;EAAAK,mBAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAO,SAAA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BAAA,eAAtBA,qBAAA,CAAwB/K,IAAI,CAAC,KAAIyL,yBAAY,EAACT,WAAW,CAAC,CAAC;IAE3D,OAAOA,WAAW;EACpB;AACF;AAACU,OAAA,CAAAjK,WAAA,GAAAA,WAAA;AAAAnB,eAAA,CAhSYmB,WAAW,WAoPP,EAAE;AAAAnB,eAAA,CApPNmB,WAAW,kBAqPA,CACpBkK,gBAAS,EACTC,oBAAe,EACfC,8CAAwB,EACxBC,oBAAe,EACfC,6BAAwB,EACxBC,kBAAa,EACbC,sBAAiB,EACjBC,cAAS,EACTC,wBAAa,CACd;AAAA7L,eAAA,CA/PUmB,WAAW,aAgQL2K,kBAAW;AAkC9BvI,wBAAa,CAACwI,UAAU,CAAC5K,WAAW,CAAC"}
|
1
|
+
{"version":3,"names":["_bitError","data","require","_cli","_typescript","_component","_interopRequireDefault","_dependencyResolver","_graphql","_install","_componentId","_newComponentHelper","_pkg","_refactoring","_workspace","_interopRequireWildcard","_lodash","_pMapSeries","_fork","_forking","_forking2","_forking3","_scopeFork","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","ownKeys","e","r","t","keys","getOwnPropertySymbols","o","filter","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","value","_toPropertyKey","configurable","writable","arg","_toPrimitive","String","input","hint","prim","Symbol","toPrimitive","undefined","res","TypeError","Number","ForkingMain","constructor","workspace","install","dependencyResolver","newComponentHelper","refactoring","pkg","fork","sourceId","targetId","options","OutsideWorkspaceError","sourceCompId","resolveComponentId","exists","existingInWorkspace","forkExistingInWorkspace","sourceIdWithScope","_legacy","scope","ComponentID","fromString","targetCompId","component","forkRemoteComponent","saveDeps","skipDependencyInstallation","installDeps","getForkInfo","_component$state$aspe","forkConfig","state","aspects","ForkingAspect","id","config","forkedFrom","fromObject","forkMultipleFromRemote","componentsToFork","componentsToForkSorted","sortComponentsToFork","results","pMapSeries","path","env","refactorMultipleAndInstall","sort","a","b","oldPackages","stringsToReplace","map","oldPackageName","getPackageName","newName","fullName","replace","scopeToReplace","newPackageName","oldStr","newStr","toStringWithoutVersion","flat","allComponents","list","refactor","changedComponents","replaceMultipleStrings","ast","importTransformer","exportTransformer","Promise","all","comp","write","forkedComponents","result","policy","extractDeps","policyFlatAndUnique","uniqBy","policyWithoutWorkspaceComps","dep","includes","dependencyId","addToRootPolicy","updateExisting","persistConfig","forkScope","originalScope","newScope","idsFromOriginalScope","listRemoteScope","Error","workspaceIds","listIds","workspaceBitIds","ComponentIdList","fromArray","existInWorkspace","searchWithoutVersion","toString","multipleForkInfo","components","getManyRemoteComponents","getConfig","name","writeAndAddNewComp","info","existing","getNewComponentId","refactorDependencyName","BitError","targetName","getRemoteComponent","preserve","refactorVariableAndClasses","refactorFilenames","workspacePolicyEntries","dedupe","import","copyPeerToRuntimeOnRoot","copyPeerToRuntimeOnComponents","deps","getDependencies","excludePackages","excludeCompIds","getCompIdsThatShouldNotBeInPolicy","source","ComponentDependency","compIdStr","componentId","_dep$getPackageName","lifecycleType","lifecycle","version","fromExisting","skipConfig","getConfigFromExistingToNewComponent","linkToOriginal","noLink","toObject","provider","cli","componentMain","graphql","_scopeCommand$command","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 { 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 { uniqBy } from 'lodash';\nimport pMapSeries from 'p-map-series';\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 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) 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(componentsToForkSorted, async ({ sourceId, targetId, path, env, config }) => {\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(sourceIdWithScope, targetId, {\n scope,\n path,\n env,\n config,\n });\n return { targetCompId, sourceId, component };\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 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 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(this.workspace.path);\n if (options.install) {\n await this.installDeps();\n }\n }\n\n /**\n * fork all components of the given scope\n */\n async forkScope(originalScope: string, newScope: string, options?: ScopeForkOptions): Promise<ComponentID[]> {\n const idsFromOriginalScope = await this.workspace.scope.listRemoteScope(originalScope);\n if (!idsFromOriginalScope.length) {\n throw new Error(`unable to find components to fork from ${originalScope}`);\n }\n const workspaceIds = await 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(component, targetCompId, { scope: newScope }, config);\n multipleForkInfo.push({ targetCompId, sourceId: component.id.toStringWithoutVersion(), component });\n });\n await this.refactorMultipleAndInstall(multipleForkInfo, { refactor: true, install: true, ast: options?.ast });\n return multipleForkInfo.map((info) => info.targetCompId);\n }\n\n private async forkExistingInWorkspace(existing: Component, targetId?: string, options?: ForkOptions) {\n if (!targetId) {\n throw new Error(`error: unable to create \"${existing.id.toStringWithoutVersion()}\" component, a component with the same name already exists.\nplease specify the target-id arg`);\n }\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 ): 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 await this.refactoring.refactorVariableAndClasses(component, sourceId, targetCompId);\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 = await this.extractDeps(component);\n this.dependencyResolver.addToRootPolicy(workspacePolicyEntries, { updateExisting: true });\n await this.dependencyResolver.persistConfig(this.workspace.path);\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 async extractDeps(component: Component) {\n const deps = await 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 dependencyId: dep.getPackageName?.() || dep.id,\n lifecycleType: dep.lifecycle === 'dev' ? 'runtime' : dep.lifecycle,\n value: {\n version: dep.version,\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,IAAA;AAAA;AACA,SAAAG,YAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,WAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,WAAA;EAAA,MAAAJ,IAAA,GAAAK,sBAAA,CAAAJ,OAAA;EAAAG,UAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,oBAAA;EAAA,MAAAN,IAAA,GAAAC,OAAA;EAAAK,mBAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAO,SAAA;EAAA,MAAAP,IAAA,GAAAK,sBAAA,CAAAJ,OAAA;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B,EACxBC,kBAAa,EACbC,sBAAiB,EACjBC,cAAS,EACTC,wBAAa,CACd;AAAA3L,eAAA,CA3PUmB,WAAW,aA4PLyK,kBAAW;AAkC9BvI,wBAAa,CAACwI,UAAU,CAAC1K,WAAW,CAAC"}
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import * as compositions_0 from '/Users/davidfirst/Library/Caches/Bit/capsules/4ff44c81b43ba7bd510274165d0509db76ae43db/teambit.component_forking@1.0.28/dist/forking.composition.js';
|
2
|
+
import * as overview_0 from '/Users/davidfirst/Library/Caches/Bit/capsules/4ff44c81b43ba7bd510274165d0509db76ae43db/teambit.component_forking@1.0.28/dist/forking.docs.mdx';
|
3
|
+
|
4
|
+
export const compositions = [compositions_0];
|
5
|
+
export const overview = [overview_0];
|
6
|
+
|
7
|
+
export const compositions_metadata = {"compositions":[{"displayName":"Logo","identifier":"Logo"}]};
|
package/package.json
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
{
|
2
2
|
"name": "@teambit/forking",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.28",
|
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.
|
9
|
+
"version": "1.0.28"
|
10
10
|
},
|
11
11
|
"dependencies": {
|
12
12
|
"chalk": "2.4.2",
|
@@ -16,20 +16,19 @@
|
|
16
16
|
"core-js": "^3.0.0",
|
17
17
|
"@babel/runtime": "7.20.0",
|
18
18
|
"@teambit/harmony": "0.4.6",
|
19
|
-
"@teambit/cli": "0.0.799",
|
20
|
-
"@teambit/generator": "1.0.27",
|
21
|
-
"@teambit/component": "1.0.26",
|
22
|
-
"@teambit/graphql": "1.0.26",
|
23
19
|
"@teambit/bit-error": "0.0.404",
|
24
|
-
"@teambit/component-id": "1.0
|
25
|
-
"@teambit/
|
26
|
-
"@teambit/
|
27
|
-
"@teambit/
|
28
|
-
"@teambit/
|
29
|
-
"@teambit/
|
30
|
-
"@teambit/
|
31
|
-
"@teambit/
|
32
|
-
"@teambit/
|
20
|
+
"@teambit/component-id": "1.1.0",
|
21
|
+
"@teambit/cli": "0.0.800",
|
22
|
+
"@teambit/generator": "1.0.29",
|
23
|
+
"@teambit/component": "1.0.28",
|
24
|
+
"@teambit/graphql": "1.0.28",
|
25
|
+
"@teambit/dependency-resolver": "1.0.28",
|
26
|
+
"@teambit/install": "1.0.28",
|
27
|
+
"@teambit/new-component-helper": "1.0.28",
|
28
|
+
"@teambit/pkg": "1.0.28",
|
29
|
+
"@teambit/refactoring": "1.0.28",
|
30
|
+
"@teambit/typescript": "1.0.28",
|
31
|
+
"@teambit/workspace": "1.0.28"
|
33
32
|
},
|
34
33
|
"devDependencies": {
|
35
34
|
"@types/react": "^17.0.8",
|
@@ -41,7 +40,7 @@
|
|
41
40
|
"@types/testing-library__jest-dom": "5.9.5"
|
42
41
|
},
|
43
42
|
"peerDependencies": {
|
44
|
-
"@teambit/legacy": "1.0.
|
43
|
+
"@teambit/legacy": "1.0.580",
|
45
44
|
"react": "^16.8.0 || ^17.0.0",
|
46
45
|
"react-dom": "^16.8.0 || ^17.0.0"
|
47
46
|
},
|
@@ -1,7 +0,0 @@
|
|
1
|
-
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_forking@1.0.26/dist/forking.composition.js';
|
2
|
-
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_forking@1.0.26/dist/forking.docs.mdx';
|
3
|
-
|
4
|
-
export const compositions = [compositions_0];
|
5
|
-
export const overview = [overview_0];
|
6
|
-
|
7
|
-
export const compositions_metadata = {"compositions":[{"displayName":"Logo","identifier":"Logo"}]};
|