@teambit/forking 1.0.425 → 1.0.427

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,4 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <testsuites tests="0" failures="0" errors="0" skipped="0">
3
- <testsuite name="teambit.component/forking@1.0.425" tests="0" failures="0" errors="0" skipped="0"/>
3
+ <testsuite name="teambit.component/forking@1.0.427" tests="0" failures="0" errors="0" skipped="0"/>
4
4
  </testsuites>
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["teambit.component/forking-preview"]=t():e["teambit.component/forking-preview"]=t()}(self,(()=>(()=>{"use strict";var e={41427:(e,t,o)=>{var n={id:"teambit.component/forking@1.0.425",homepage:"https://bit.cloud/teambit/component/forking",exported:!0};function r(){const e=i(o(41594));return r=function(){return e},e}function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Logo=void 0,r.__bit_component=n,i.__bit_component=n;const c=()=>r().default.createElement("div",{style:{height:"100%",display:"flex",justifyContent:"center"}},r().default.createElement("img",{style:{width:70},src:"https://static.bit.dev/extensions-icons/forking.svg"}));c.__bit_component=n,t.Logo=c},41594:e=>{e.exports=React}},t={};function o(n){var r=t[n];if(void 0!==r)return r.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,o),i.exports}o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};o.r(n),o.d(n,{compositions:()=>d,compositions_metadata:()=>v,overview:()=>m});var r={};o.r(r),o.d(r,{default:()=>l});var i=o(41427);o(41594);const c=MdxJsReact,a=TeambitMdxUiMdxScopeContext;var p=["components"];function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)({}).hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},s.apply(null,arguments)}var u={},f="wrapper";function l(e){var t=e.components,o=function(e,t){if(null==e)return{};var o,n,r=function(e,t){if(null==e)return{};var o={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.includes(n))continue;o[n]=e[n]}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)o=i[n],t.includes(o)||{}.propertyIsEnumerable.call(e,o)&&(r[o]=e[o])}return r}(e,p);return(0,c.mdx)(f,s({},u,o,{components:t,mdxType:"MDXLayout"}),(0,c.mdx)(a.MDXScopeProvider,{components:{},mdxType:"MDXScopeProvider"}))}l.isMDXComponent=!0;const d=[i],m=[r],v={compositions:[{displayName:"Logo",identifier:"Logo"}]};return n})()));
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["teambit.component/forking-preview"]=t():e["teambit.component/forking-preview"]=t()}(self,(()=>(()=>{"use strict";var e={965:(e,t,o)=>{var n={id:"teambit.component/forking@1.0.427",homepage:"https://bit.cloud/teambit/component/forking",exported:!0};function r(){const e=i(o(594));return r=function(){return e},e}function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Logo=void 0,r.__bit_component=n,i.__bit_component=n;const c=()=>r().default.createElement("div",{style:{height:"100%",display:"flex",justifyContent:"center"}},r().default.createElement("img",{style:{width:70},src:"https://static.bit.dev/extensions-icons/forking.svg"}));c.__bit_component=n,t.Logo=c},594:e=>{e.exports=React}},t={};function o(n){var r=t[n];if(void 0!==r)return r.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,o),i.exports}o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};o.r(n),o.d(n,{compositions:()=>d,compositions_metadata:()=>v,overview:()=>m});var r={};o.r(r),o.d(r,{default:()=>l});var i=o(965);o(594);const c=MdxJsReact,a=TeambitMdxUiMdxScopeContext;var p=["components"];function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)({}).hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},s.apply(null,arguments)}var u={},f="wrapper";function l(e){var t=e.components,o=function(e,t){if(null==e)return{};var o,n,r=function(e,t){if(null==e)return{};var o={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.includes(n))continue;o[n]=e[n]}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)o=i[n],t.includes(o)||{}.propertyIsEnumerable.call(e,o)&&(r[o]=e[o])}return r}(e,p);return(0,c.mdx)(f,s({},u,o,{components:t,mdxType:"MDXLayout"}),(0,c.mdx)(a.MDXScopeProvider,{components:{},mdxType:"MDXScopeProvider"}))}l.isMDXComponent=!0;const d=[i],m=[r],v={compositions:[{displayName:"Logo",identifier:"Logo"}]};return n})()));
@@ -2174,7 +2174,7 @@
2174
2174
  "componentId": {
2175
2175
  "scope": "teambit.component",
2176
2176
  "name": "forking",
2177
- "version": "1.0.425"
2177
+ "version": "1.0.427"
2178
2178
  },
2179
2179
  "taggedModuleExports": []
2180
2180
  }
@@ -1 +1 @@
1
- {"version":3,"names":["_chalk","data","_interopRequireDefault","require","e","__esModule","default","_defineProperty","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","ForkCmd","constructor","forking","name","description","report","sourceId","targetId","options","results","fork","targetIdStr","toString","chalk","green","bold","exports"],"sources":["fork.cmd.ts"],"sourcesContent":["import { Command, CommandOptions } from '@teambit/cli';\nimport { ComponentConfig } from '@teambit/generator';\nimport chalk from 'chalk';\nimport { ForkingMain } from './forking.main.runtime';\n\nexport type ForkOptions = {\n scope?: string;\n path?: string;\n refactor?: boolean;\n skipDependencyInstallation?: boolean;\n skipConfig?: boolean;\n preserve?: boolean;\n noLink?: boolean;\n env?: string;\n config?: ComponentConfig;\n ast?: boolean;\n};\n\nexport class ForkCmd implements Command {\n name = 'fork <source-component-id> [target-component-name]';\n description = 'create a new component forked from an existing one (copies source files and configs)';\n helpUrl = 'docs/getting-started/collaborate/importing-components#fork-a-component';\n arguments = [\n { name: 'source-component-id', description: 'the component id of the source component' },\n {\n name: 'target-component-name',\n description:\n \"the name for the new component (component name without scope, e.g. name/spaces/my-button). to set a different scope, use the '--scope' flag\",\n },\n ];\n group = 'collaborate';\n skipWorkspace = true;\n alias = '';\n\n options = [\n ['s', 'scope <string>', 'default scope for the new component'],\n [\n 'p',\n 'path <string>',\n 'relative path in the workspace for the new component. by default the path is `<scope>/<namespace>/<name>`',\n ],\n ['r', 'refactor', 'update the import/require statements in all dependent components (in the same workspace)'],\n ['x', 'skip-dependency-installation', 'do not install packages of the imported components'],\n ['e', 'env <string>', 'set the environment for the new component'],\n [\n '',\n 'skip-config',\n 'do not copy the config (aspects-config, env, etc) to the new component. helpful when it fails during aspect loading',\n ],\n ['', 'preserve', 'avoid refactoring file and variable/class names according to the new component name'],\n ['', 'no-link', 'avoid saving a reference to the original component'],\n ['', 'ast', 'use ast to transform files instead of regex'],\n ] as CommandOptions;\n\n example: [\n {\n cmd: 'fork teambit.base-ui/input/button ui/button';\n description: \"create a component named 'ui/button', forked from the remote 'input/button' component\";\n }\n ];\n loader = true;\n remoteOp = true;\n\n constructor(private forking: ForkingMain) {}\n\n async report([sourceId, targetId]: [string, string], options: ForkOptions): Promise<string> {\n const results = await this.forking.fork(sourceId, targetId, options);\n const targetIdStr = results.toString();\n return chalk.green(`successfully forked ${chalk.bold(targetIdStr)} from ${chalk.bold(sourceId)}`);\n }\n}\n"],"mappings":";;;;;;AAEA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA0B,SAAAC,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAG,gBAAAH,CAAA,EAAAI,CAAA,EAAAC,CAAA,YAAAD,CAAA,GAAAE,cAAA,CAAAF,CAAA,MAAAJ,CAAA,GAAAO,MAAA,CAAAC,cAAA,CAAAR,CAAA,EAAAI,CAAA,IAAAK,KAAA,EAAAJ,CAAA,EAAAK,UAAA,MAAAC,YAAA,MAAAC,QAAA,UAAAZ,CAAA,CAAAI,CAAA,IAAAC,CAAA,EAAAL,CAAA;AAAA,SAAAM,eAAAD,CAAA,QAAAQ,CAAA,GAAAC,YAAA,CAAAT,CAAA,uCAAAQ,CAAA,GAAAA,CAAA,GAAAA,CAAA;AAAA,SAAAC,aAAAT,CAAA,EAAAD,CAAA,2BAAAC,CAAA,KAAAA,CAAA,SAAAA,CAAA,MAAAL,CAAA,GAAAK,CAAA,CAAAU,MAAA,CAAAC,WAAA,kBAAAhB,CAAA,QAAAa,CAAA,GAAAb,CAAA,CAAAiB,IAAA,CAAAZ,CAAA,EAAAD,CAAA,uCAAAS,CAAA,SAAAA,CAAA,YAAAK,SAAA,yEAAAd,CAAA,GAAAe,MAAA,GAAAC,MAAA,EAAAf,CAAA;AAgBnB,MAAMgB,OAAO,CAAoB;EA6CtCC,WAAWA,CAASC,OAAoB,EAAE;IAAA,KAAtBA,OAAoB,GAApBA,OAAoB;IAAApB,eAAA,eA5CjC,oDAAoD;IAAAA,eAAA,sBAC7C,sF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AAACU,OAAA,CAAAhB,OAAA,GAAAA,OAAA","ignoreList":[]}
1
+ {"version":3,"names":["_chalk","data","_interopRequireDefault","require","e","__esModule","default","_defineProperty","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","ForkCmd","constructor","forking","name","description","report","sourceId","targetId","options","results","fork","targetIdStr","toString","chalk","green","bold","exports"],"sources":["fork.cmd.ts"],"sourcesContent":["import { Command, CommandOptions } from '@teambit/cli';\nimport { ComponentConfig } from '@teambit/generator';\nimport chalk from 'chalk';\nimport { ForkingMain } from './forking.main.runtime';\n\nexport type ForkOptions = {\n scope?: string;\n path?: string;\n refactor?: boolean;\n skipDependencyInstallation?: boolean;\n skipConfig?: boolean;\n preserve?: boolean;\n noLink?: boolean;\n env?: string;\n config?: ComponentConfig;\n ast?: boolean;\n};\n\nexport class ForkCmd implements Command {\n name = 'fork <source-component-id> [target-component-name]';\n description = 'create a new component forked from an existing one (copies source files and configs)';\n helpUrl = 'docs/getting-started/collaborate/importing-components#fork-a-component';\n arguments = [\n { name: 'source-component-id', description: 'the component id of the source component' },\n {\n name: 'target-component-name',\n description:\n \"the name for the new component (component name without scope, e.g. name/spaces/my-button). to set a different scope, use the '--scope' flag\",\n },\n ];\n group = 'collaborate';\n skipWorkspace = true;\n alias = '';\n\n options = [\n ['s', 'scope <string>', 'default scope for the new component'],\n [\n 'p',\n 'path <string>',\n 'relative path in the workspace for the new component. by default the path is `<scope>/<namespace>/<name>`',\n ],\n ['r', 'refactor', 'update the import/require statements in all dependent components (in the same workspace)'],\n ['x', 'skip-dependency-installation', 'do not install packages of the imported components'],\n ['e', 'env <string>', 'set the environment for the new component'],\n [\n '',\n 'skip-config',\n 'do not copy the config (aspects-config, env, etc) to the new component. helpful when it fails during aspect loading',\n ],\n ['', 'preserve', 'avoid refactoring file and variable/class names according to the new component name'],\n ['', 'no-link', 'avoid saving a reference to the original component'],\n ['', 'ast', 'use ast to transform files instead of regex'],\n ] as CommandOptions;\n\n example: [\n {\n cmd: 'fork teambit.base-ui/input/button ui/button';\n description: \"create a component named 'ui/button', forked from the remote 'input/button' component\";\n },\n ];\n loader = true;\n remoteOp = true;\n\n constructor(private forking: ForkingMain) {}\n\n async report([sourceId, targetId]: [string, string], options: ForkOptions): Promise<string> {\n const results = await this.forking.fork(sourceId, targetId, options);\n const targetIdStr = results.toString();\n return chalk.green(`successfully forked ${chalk.bold(targetIdStr)} from ${chalk.bold(sourceId)}`);\n }\n}\n"],"mappings":";;;;;;AAEA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA0B,SAAAC,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAG,gBAAAH,CAAA,EAAAI,CAAA,EAAAC,CAAA,YAAAD,CAAA,GAAAE,cAAA,CAAAF,CAAA,MAAAJ,CAAA,GAAAO,MAAA,CAAAC,cAAA,CAAAR,CAAA,EAAAI,CAAA,IAAAK,KAAA,EAAAJ,CAAA,EAAAK,UAAA,MAAAC,YAAA,MAAAC,QAAA,UAAAZ,CAAA,CAAAI,CAAA,IAAAC,CAAA,EAAAL,CAAA;AAAA,SAAAM,eAAAD,CAAA,QAAAQ,CAAA,GAAAC,YAAA,CAAAT,CAAA,uCAAAQ,CAAA,GAAAA,CAAA,GAAAA,CAAA;AAAA,SAAAC,aAAAT,CAAA,EAAAD,CAAA,2BAAAC,CAAA,KAAAA,CAAA,SAAAA,CAAA,MAAAL,CAAA,GAAAK,CAAA,CAAAU,MAAA,CAAAC,WAAA,kBAAAhB,CAAA,QAAAa,CAAA,GAAAb,CAAA,CAAAiB,IAAA,CAAAZ,CAAA,EAAAD,CAAA,uCAAAS,CAAA,SAAAA,CAAA,YA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AO,CAAC;IACpE,MAAMG,WAAW,GAAGF,OAAO,CAACG,QAAQ,CAAC,CAAC;IACtC,OAAOC,gBAAK,CAACC,KAAK,CAAC,uBAAuBD,gBAAK,CAACE,IAAI,CAACJ,WAAW,CAAC,SAASE,gBAAK,CAACE,IAAI,CAACT,QAAQ,CAAC,EAAE,CAAC;EACnG;AACF;AAACU,OAAA,CAAAhB,OAAA,GAAAA,OAAA","ignoreList":[]}
@@ -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,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,GAAAC,OAAA;EAAAG,UAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,oBAAA;EAAA,MAAAL,IAAA,GAAAC,OAAA;EAAAI,mBAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAM,SAAA;EAAA,MAAAN,IAAA,GAAAC,OAAA;EAAAK,QAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAO,kBAAA;EAAA,MAAAP,IAAA,GAAAC,OAAA;EAAAM,iBAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAQ,SAAA;EAAA,MAAAR,IAAA,GAAAC,OAAA;EAAAO,QAAA,YAAAA,CAAA;IAAA,OAAAR,IAAA;EAAA;EAAA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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","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,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,GAAAC,OAAA;EAAAG,UAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,oBAAA;EAAA,MAAAL,IAAA,GAAAC,OAAA;EAAAI,mBAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAM,SAAA;EAAA,MAAAN,IAAA,GAAAC,OAAA;EAAAK,QAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAO,kBAAA;EAAA,MAAAP,IAAA,GAAAC,OAAA;EAAAM,iBAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAQ,SAAA;EAAA,MAAAR,IAAA,GAAAC,OAAA;EAAAO,QAAA,YAAAA,CAAA;IAAA,OAAAR,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAS,aAAA;EAAA,MAAAT,IAAA,GAAAC,OAA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iB,EACjBC,gBAAS,EACTC,wBAAa,CACd;AAAA3M,eAAA,CAxTUgB,WAAW,aAyTL4L,kBAAW;AAkC9B1J,wBAAa,CAAC2J,UAAU,CAAC7L,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.425/dist/forking.composition.js';
2
- import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.component_forking@1.0.425/dist/forking.docs.mdx';
1
+ import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.component_forking@1.0.427/dist/forking.composition.js';
2
+ import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.component_forking@1.0.427/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.425",
3
+ "version": "1.0.427",
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.425"
9
+ "version": "1.0.427"
10
10
  },
11
11
  "dependencies": {
12
12
  "chalk": "2.4.2",
@@ -18,18 +18,18 @@
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.1002",
22
- "@teambit/generator": "1.0.426",
23
- "@teambit/component": "1.0.425",
24
- "@teambit/graphql": "1.0.425",
21
+ "@teambit/cli": "0.0.1004",
22
+ "@teambit/generator": "1.0.428",
23
+ "@teambit/component": "1.0.427",
24
+ "@teambit/graphql": "1.0.427",
25
25
  "@teambit/component-package-version": "0.0.434",
26
- "@teambit/dependency-resolver": "1.0.425",
27
- "@teambit/install": "1.0.425",
28
- "@teambit/new-component-helper": "1.0.425",
29
- "@teambit/pkg": "1.0.425",
30
- "@teambit/refactoring": "1.0.425",
31
- "@teambit/typescript": "1.0.425",
32
- "@teambit/workspace": "1.0.425"
26
+ "@teambit/dependency-resolver": "1.0.427",
27
+ "@teambit/install": "1.0.427",
28
+ "@teambit/new-component-helper": "1.0.427",
29
+ "@teambit/pkg": "1.0.427",
30
+ "@teambit/refactoring": "1.0.427",
31
+ "@teambit/typescript": "1.0.427",
32
+ "@teambit/workspace": "1.0.427"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@types/lodash": "4.14.165",