@teambit/forking 0.0.107 → 0.0.110
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/fork.cmd.d.ts +1 -0
- package/dist/fork.cmd.js +1 -1
- package/dist/fork.cmd.js.map +1 -1
- package/dist/forking.main.runtime.d.ts +6 -3
- package/dist/forking.main.runtime.js +39 -4
- package/dist/forking.main.runtime.js.map +1 -1
- package/package-tar/teambit-forking-0.0.110.tgz +0 -0
- package/package.json +13 -11
- package/{preview-1649301819971.js → preview-1649647448813.js} +2 -2
- package/package-tar/teambit-forking-0.0.107.tgz +0 -0
package/dist/fork.cmd.d.ts
CHANGED
package/dist/fork.cmd.js
CHANGED
@@ -41,7 +41,7 @@ to set the default-scope, please use --scope flag`);
|
|
41
41
|
(0, _defineProperty2().default)(this, "group", 'collaborate');
|
42
42
|
(0, _defineProperty2().default)(this, "skipWorkspace", true);
|
43
43
|
(0, _defineProperty2().default)(this, "alias", '');
|
44
|
-
(0, _defineProperty2().default)(this, "options", [['s', 'scope <string>', 'default scope for the newly created component'], ['p', 'path <string>', 'relative path in the workspace. by default the path is `<scope>/<namespace>/<name>`']]);
|
44
|
+
(0, _defineProperty2().default)(this, "options", [['s', 'scope <string>', 'default scope for the newly created component'], ['p', 'path <string>', 'relative path in the workspace. by default the path is `<scope>/<namespace>/<name>`'], ['r', 'refactor', 'change the source code of all components using the original component with the new package-name']]);
|
45
45
|
(0, _defineProperty2().default)(this, "loader", true);
|
46
46
|
(0, _defineProperty2().default)(this, "migration", true);
|
47
47
|
(0, _defineProperty2().default)(this, "remoteOp", true);
|
package/dist/fork.cmd.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["fork.cmd.ts"],"names":["ForkCmd","constructor","forking","report","sourceId","targetId","options","results","fork","targetIdStr","toString","chalk","green","bold"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;
|
1
|
+
{"version":3,"sources":["fork.cmd.ts"],"names":["ForkCmd","constructor","forking","report","sourceId","targetId","options","results","fork","targetIdStr","toString","chalk","green","bold"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAUO,MAAMA,OAAN,CAAiC;AAqBtCC,EAAAA,WAAW,CAASC,OAAT,EAA+B;AAAA,SAAtBA,OAAsB,GAAtBA,OAAsB;AAAA,kDApBnC,gCAoBmC;AAAA,yDAnB5B,6DAmB4B;AAAA,iEAlBnB;AACzB,kDAiB4C;AAAA,mDAhBlC,aAgBkC;AAAA,2DAf1B,IAe0B;AAAA,mDAdlC,EAckC;AAAA,qDAbhC,CACR,CAAC,GAAD,EAAM,gBAAN,EAAwB,+CAAxB,CADQ,EAER,CAAC,GAAD,EAAM,eAAN,EAAuB,qFAAvB,CAFQ,EAGR,CACE,GADF,EAEE,UAFF,EAGE,iGAHF,CAHQ,CAagC;AAAA,oDAJjC,IAIiC;AAAA,uDAH9B,IAG8B;AAAA,sDAF/B,IAE+B;AAAE;;AAEhC,QAANC,MAAM,CAAC,CAACC,QAAD,EAAWC,QAAX,CAAD,EAAyCC,OAAzC,EAAgF;AAC1F,UAAMC,OAAO,GAAG,MAAM,KAAKL,OAAL,CAAaM,IAAb,CAAkBJ,QAAlB,EAA4BC,QAA5B,EAAsCC,OAAtC,CAAtB;AACA,UAAMG,WAAW,GAAGF,OAAO,CAACG,QAAR,EAApB;AACA,WAAOC,iBAAMC,KAAN,CAAa,uBAAsBD,iBAAME,IAAN,CAAWJ,WAAX,CAAwB,SAAQE,iBAAME,IAAN,CAAWT,QAAX,CAAqB,EAAxF,CAAP;AACD;;AA3BqC","sourcesContent":["import chalk from 'chalk';\nimport { Command, CommandOptions } from '@teambit/cli';\nimport { ForkingMain } from '.';\n\nexport type ForkOptions = {\n scope?: string;\n path?: string;\n refactor?: boolean;\n};\n\nexport class ForkCmd implements Command {\n name = 'fork <source-id> [target-name]';\n description = 'EXPERIMENTAL. create a new component out of an existing one';\n extendedDescription = `note that [target-name] is the name only without the scope.\nto set the default-scope, please use --scope flag`;\n group = 'collaborate';\n skipWorkspace = true;\n alias = '';\n options = [\n ['s', 'scope <string>', 'default scope for the newly created component'],\n ['p', 'path <string>', 'relative path in the workspace. by default the path is `<scope>/<namespace>/<name>`'],\n [\n 'r',\n 'refactor',\n 'change the source code of all components using the original component with the new package-name',\n ],\n ] as CommandOptions;\n loader = true;\n migration = 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"]}
|
@@ -4,6 +4,7 @@ import { Workspace } from '@teambit/workspace';
|
|
4
4
|
import { Component, ComponentID, ComponentMain } from '@teambit/component';
|
5
5
|
import { ComponentIdObj } from '@teambit/component-id';
|
6
6
|
import { GraphqlMain } from '@teambit/graphql';
|
7
|
+
import { RefactoringMain } from '@teambit/refactoring';
|
7
8
|
import { NewComponentHelperMain } from '@teambit/new-component-helper';
|
8
9
|
import { ForkOptions } from './fork.cmd';
|
9
10
|
export declare type ForkInfo = {
|
@@ -13,7 +14,8 @@ export declare class ForkingMain {
|
|
13
14
|
private workspace;
|
14
15
|
private dependencyResolver;
|
15
16
|
private newComponentHelper;
|
16
|
-
|
17
|
+
private refactoring;
|
18
|
+
constructor(workspace: Workspace, dependencyResolver: DependencyResolverMain, newComponentHelper: NewComponentHelperMain, refactoring: RefactoringMain);
|
17
19
|
fork(sourceIdStr: string, targetId?: string, options?: ForkOptions): Promise<ComponentID>;
|
18
20
|
getForkInfo(component: Component): ForkInfo | null;
|
19
21
|
private forkExistingInWorkspace;
|
@@ -22,13 +24,14 @@ export declare class ForkingMain {
|
|
22
24
|
static slots: never[];
|
23
25
|
static dependencies: import("@teambit/harmony").Aspect[];
|
24
26
|
static runtime: import("@teambit/harmony").RuntimeDefinition;
|
25
|
-
static provider([cli, workspace, dependencyResolver, componentMain, newComponentHelper, graphql]: [
|
27
|
+
static provider([cli, workspace, dependencyResolver, componentMain, newComponentHelper, graphql, refactoring]: [
|
26
28
|
CLIMain,
|
27
29
|
Workspace,
|
28
30
|
DependencyResolverMain,
|
29
31
|
ComponentMain,
|
30
32
|
NewComponentHelperMain,
|
31
|
-
GraphqlMain
|
33
|
+
GraphqlMain,
|
34
|
+
RefactoringMain
|
32
35
|
]): Promise<ForkingMain>;
|
33
36
|
}
|
34
37
|
export declare type ForkConfig = {
|
@@ -81,6 +81,26 @@ function _graphql() {
|
|
81
81
|
return data;
|
82
82
|
}
|
83
83
|
|
84
|
+
function _refactoring() {
|
85
|
+
const data = _interopRequireDefault(require("@teambit/refactoring"));
|
86
|
+
|
87
|
+
_refactoring = function () {
|
88
|
+
return data;
|
89
|
+
};
|
90
|
+
|
91
|
+
return data;
|
92
|
+
}
|
93
|
+
|
94
|
+
function _bitError() {
|
95
|
+
const data = require("@teambit/bit-error");
|
96
|
+
|
97
|
+
_bitError = function () {
|
98
|
+
return data;
|
99
|
+
};
|
100
|
+
|
101
|
+
return data;
|
102
|
+
}
|
103
|
+
|
84
104
|
function _newComponentHelper() {
|
85
105
|
const data = _interopRequireDefault(require("@teambit/new-component-helper"));
|
86
106
|
|
@@ -140,10 +160,11 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
140
160
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2().default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
141
161
|
|
142
162
|
class ForkingMain {
|
143
|
-
constructor(workspace, dependencyResolver, newComponentHelper) {
|
163
|
+
constructor(workspace, dependencyResolver, newComponentHelper, refactoring) {
|
144
164
|
this.workspace = workspace;
|
145
165
|
this.dependencyResolver = dependencyResolver;
|
146
166
|
this.newComponentHelper = newComponentHelper;
|
167
|
+
this.refactoring = refactoring;
|
147
168
|
}
|
148
169
|
|
149
170
|
async fork(sourceIdStr, targetId, options) {
|
@@ -178,10 +199,24 @@ please specify the target-id arg`);
|
|
178
199
|
const targetCompId = this.newComponentHelper.getNewComponentId(targetId, undefined, options === null || options === void 0 ? void 0 : options.scope);
|
179
200
|
const config = await this.getConfig(existing);
|
180
201
|
await this.newComponentHelper.writeAndAddNewComp(existing, targetCompId, options, config);
|
202
|
+
|
203
|
+
if (options !== null && options !== void 0 && options.refactor) {
|
204
|
+
const allComponents = await this.workspace.list();
|
205
|
+
const {
|
206
|
+
changedComponents
|
207
|
+
} = await this.refactoring.refactorDependencyName(allComponents, existing.id, targetId);
|
208
|
+
await Promise.all(changedComponents.map(comp => this.workspace.write(comp)));
|
209
|
+
}
|
210
|
+
|
181
211
|
return targetCompId;
|
182
212
|
}
|
183
213
|
|
184
214
|
async forkRemoteComponent(sourceId, targetId, options) {
|
215
|
+
if (options !== null && options !== void 0 && options.refactor) {
|
216
|
+
throw new (_bitError().BitError)(`the component ${sourceId.toStringWithoutVersion()} is not in the workspace, you can't use the --refactor flag.
|
217
|
+
the 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`);
|
218
|
+
}
|
219
|
+
|
185
220
|
const targetName = targetId || sourceId.fullName;
|
186
221
|
const targetCompId = this.newComponentHelper.getNewComponentId(targetName, undefined, options === null || options === void 0 ? void 0 : options.scope);
|
187
222
|
const comp = await this.workspace.scope.getRemoteComponent(sourceId);
|
@@ -223,8 +258,8 @@ please specify the target-id arg`);
|
|
223
258
|
});
|
224
259
|
}
|
225
260
|
|
226
|
-
static async provider([cli, workspace, dependencyResolver, componentMain, newComponentHelper, graphql]) {
|
227
|
-
const forkingMain = new ForkingMain(workspace, dependencyResolver, newComponentHelper);
|
261
|
+
static async provider([cli, workspace, dependencyResolver, componentMain, newComponentHelper, graphql, refactoring]) {
|
262
|
+
const forkingMain = new ForkingMain(workspace, dependencyResolver, newComponentHelper, refactoring);
|
228
263
|
cli.register(new (_fork().ForkCmd)(forkingMain));
|
229
264
|
graphql.register((0, _forking3().forkingSchema)(forkingMain));
|
230
265
|
componentMain.registerShowFragments([new (_forking2().ForkingFragment)(forkingMain)]);
|
@@ -235,7 +270,7 @@ please specify the target-id arg`);
|
|
235
270
|
|
236
271
|
exports.ForkingMain = ForkingMain;
|
237
272
|
(0, _defineProperty2().default)(ForkingMain, "slots", []);
|
238
|
-
(0, _defineProperty2().default)(ForkingMain, "dependencies", [_cli().CLIAspect, _workspace().default, _dependencyResolver().DependencyResolverAspect, _component().default, _newComponentHelper().default, _graphql().default]);
|
273
|
+
(0, _defineProperty2().default)(ForkingMain, "dependencies", [_cli().CLIAspect, _workspace().default, _dependencyResolver().DependencyResolverAspect, _component().default, _newComponentHelper().default, _graphql().default, _refactoring().default]);
|
239
274
|
(0, _defineProperty2().default)(ForkingMain, "runtime", _cli().MainRuntime);
|
240
275
|
|
241
276
|
_forking().ForkingAspect.addRuntime(ForkingMain);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["forking.main.runtime.ts"],"names":["ForkingMain","constructor","workspace","dependencyResolver","newComponentHelper","fork","sourceIdStr","targetId","options","sourceId","resolveComponentId","exists","existingInWorkspace","get","forkExistingInWorkspace","sourceIdWithScope","_legacy","scope","ComponentID","fromLegacy","BitId","parse","forkRemoteComponent","getForkInfo","component","forkConfig","state","aspects","ForkingAspect","id","config","forkedFrom","fromObject","existing","Error","toStringWithoutVersion","targetCompId","getNewComponentId","undefined","getConfig","writeAndAddNewComp","targetName","fullName","comp","getRemoteComponent","deps","getDependencies","workspacePolicyEntries","filter","dep","source","map","dependencyId","getPackageName","lifecycleType","lifecycle","value","version","addToRootPolicy","updateExisting","persistConfig","path","install","dedupe","import","copyPeerToRuntimeOnRoot","copyPeerToRuntimeOnComponents","fromExisting","getConfigFromExistingToNewComponent","toObject","provider","cli","componentMain","graphql","forkingMain","register","ForkCmd","registerShowFragments","ForkingFragment","CLIAspect","WorkspaceAspect","DependencyResolverAspect","ComponentAspect","NewComponentHelperAspect","GraphqlAspect","MainRuntime","addRuntime"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAEA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;;;;;;;;;AAMO,MAAMA,WAAN,CAAkB;AACvBC,EAAAA,WAAW,CACDC,SADC,EAEDC,kBAFC,EAGDC,kBAHC,EAIT;AAAA,SAHQF,SAGR,GAHQA,SAGR;AAAA,SAFQC,kBAER,GAFQA,kBAER;AAAA,SADQC,kBACR,GADQA,kBACR;AAAE;;AAEM,QAAJC,IAAI,CAACC,WAAD,EAAsBC,QAAtB,EAAyCC,OAAzC,EAAsF;AAC9F,UAAMC,QAAQ,GAAG,MAAM,KAAKP,SAAL,CAAeQ,kBAAf,CAAkCJ,WAAlC,CAAvB;AACA,UAAMK,MAAM,GAAG,KAAKT,SAAL,CAAeS,MAAf,CAAsB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B;;;gCAAZ1E,W,WAiFI,E;gCAjFJA,W,kBAkFW,CACpB+E,gBADoB,EAEpBC,oBAFoB,EAGpBC,8CAHoB,EAIpBC,oBAJoB,EAKpBC,6BALoB,EAMpBC,kBANoB,C;gCAlFXpF,W,aA0FMqF,kB;;AAiBnBzD,yBAAc0D,UAAd,CAAyBtF,WAAzB","sourcesContent":["import { CLIAspect, CLIMain, MainRuntime } from '@teambit/cli';\nimport { DependencyResolverAspect, DependencyResolverMain } from '@teambit/dependency-resolver';\nimport { BitId } from '@teambit/legacy-bit-id';\nimport WorkspaceAspect, { Workspace } from '@teambit/workspace';\nimport ComponentAspect, { Component, ComponentID, ComponentMain } from '@teambit/component';\nimport { ComponentIdObj } from '@teambit/component-id';\nimport GraphqlAspect, { GraphqlMain } from '@teambit/graphql';\nimport NewComponentHelperAspect, { NewComponentHelperMain } from '@teambit/new-component-helper';\nimport { ForkCmd, ForkOptions } from './fork.cmd';\nimport { ForkingAspect } from './forking.aspect';\nimport { ForkingFragment } from './forking.fragment';\nimport { forkingSchema } from './forking.graphql';\n\nexport type ForkInfo = {\n forkedFrom: ComponentID;\n};\n\nexport class ForkingMain {\n constructor(\n private workspace: Workspace,\n private dependencyResolver: DependencyResolverMain,\n private newComponentHelper: NewComponentHelperMain\n ) {}\n\n async fork(sourceIdStr: string, targetId?: string, options?: ForkOptions): Promise<ComponentID> {\n const sourceId = await this.workspace.resolveComponentId(sourceIdStr);\n const exists = this.workspace.exists(sourceId);\n if (exists) {\n const existingInWorkspace = await this.workspace.get(sourceId);\n return this.forkExistingInWorkspace(existingInWorkspace, targetId, options);\n }\n const sourceIdWithScope = sourceId._legacy.scope\n ? sourceId\n : ComponentID.fromLegacy(BitId.parse(sourceIdStr, true));\n return this.forkRemoteComponent(sourceIdWithScope, targetId, options);\n }\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 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);\n await this.newComponentHelper.writeAndAddNewComp(existing, targetCompId, options, config);\n\n return targetCompId;\n }\n private async forkRemoteComponent(sourceId: ComponentID, targetId?: string, options?: ForkOptions) {\n const targetName = targetId || sourceId.fullName;\n const targetCompId = this.newComponentHelper.getNewComponentId(targetName, undefined, options?.scope);\n const comp = await this.workspace.scope.getRemoteComponent(sourceId);\n\n const deps = await this.dependencyResolver.getDependencies(comp);\n // only bring auto-resolved dependencies, others should be set in the workspace.jsonc template\n const workspacePolicyEntries = deps\n .filter((dep) => dep.source === 'auto')\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 this.dependencyResolver.addToRootPolicy(workspacePolicyEntries, { updateExisting: true });\n const config = await this.getConfig(comp);\n await this.newComponentHelper.writeAndAddNewComp(comp, targetCompId, options, config);\n await this.dependencyResolver.persistConfig(this.workspace.path);\n await this.workspace.install(undefined, {\n dedupe: true,\n import: false,\n copyPeerToRuntimeOnRoot: true,\n copyPeerToRuntimeOnComponents: false,\n updateExisting: false,\n });\n\n return targetCompId;\n }\n\n private async getConfig(comp: Component) {\n const fromExisting = await this.newComponentHelper.getConfigFromExistingToNewComponent(comp);\n return {\n ...fromExisting,\n [ForkingAspect.id]: {\n forkedFrom: comp.id.toObject(),\n },\n };\n }\n\n static slots = [];\n static dependencies = [\n CLIAspect,\n WorkspaceAspect,\n DependencyResolverAspect,\n ComponentAspect,\n NewComponentHelperAspect,\n GraphqlAspect,\n ];\n static runtime = MainRuntime;\n static async provider([cli, workspace, dependencyResolver, componentMain, newComponentHelper, graphql]: [\n CLIMain,\n Workspace,\n DependencyResolverMain,\n ComponentMain,\n NewComponentHelperMain,\n GraphqlMain\n ]) {\n const forkingMain = new ForkingMain(workspace, dependencyResolver, newComponentHelper);\n cli.register(new ForkCmd(forkingMain));\n graphql.register(forkingSchema(forkingMain));\n componentMain.registerShowFragments([new ForkingFragment(forkingMain)]);\n return forkingMain;\n }\n}\n\nForkingAspect.addRuntime(ForkingMain);\n\nexport type ForkConfig = {\n forkedFrom: ComponentIdObj;\n};\n"]}
|
1
|
+
{"version":3,"sources":["forking.main.runtime.ts"],"names":["ForkingMain","constructor","workspace","dependencyResolver","newComponentHelper","refactoring","fork","sourceIdStr","targetId","options","sourceId","resolveComponentId","exists","existingInWorkspace","get","forkExistingInWorkspace","sourceIdWithScope","_legacy","scope","ComponentID","fromLegacy","BitId","parse","forkRemoteComponent","getForkInfo","component","forkConfig","state","aspects","ForkingAspect","id","config","forkedFrom","fromObject","existing","Error","toStringWithoutVersion","targetCompId","getNewComponentId","undefined","getConfig","writeAndAddNewComp","refactor","allComponents","list","changedComponents","refactorDependencyName","Promise","all","map","comp","write","BitError","targetName","fullName","getRemoteComponent","deps","getDependencies","workspacePolicyEntries","filter","dep","source","dependencyId","getPackageName","lifecycleType","lifecycle","value","version","addToRootPolicy","updateExisting","persistConfig","path","install","dedupe","import","copyPeerToRuntimeOnRoot","copyPeerToRuntimeOnComponents","fromExisting","getConfigFromExistingToNewComponent","toObject","provider","cli","componentMain","graphql","forkingMain","register","ForkCmd","registerShowFragments","ForkingFragment","CLIAspect","WorkspaceAspect","DependencyResolverAspect","ComponentAspect","NewComponentHelperAspect","GraphqlAspect","RefactoringAspect","MainRuntime","addRuntime"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA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E,WAAjF,CAAD,EAQlB;AACD,UAAM+E,WAAW,GAAG,IAAIpF,WAAJ,CAAgBE,SAAhB,EAA2BC,kBAA3B,EAA+CC,kBAA/C,EAAmEC,WAAnE,CAApB;AACA4E,IAAAA,GAAG,CAACI,QAAJ,CAAa,KAAIC,eAAJ,EAAYF,WAAZ,CAAb;AACAD,IAAAA,OAAO,CAACE,QAAR,CAAiB,+BAAcD,WAAd,CAAjB;AACAF,IAAAA,aAAa,CAACK,qBAAd,CAAoC,CAAC,KAAIC,2BAAJ,EAAoBJ,WAApB,CAAD,CAApC;AACA,WAAOA,WAAP;AACD;;AAnHsB;;;gCAAZpF,W,WA0FI,E;gCA1FJA,W,kBA2FW,CACpByF,gBADoB,EAEpBC,oBAFoB,EAGpBC,8CAHoB,EAIpBC,oBAJoB,EAKpBC,6BALoB,EAMpBC,kBANoB,EAOpBC,sBAPoB,C;gCA3FX/F,W,aAoGMgG,kB;;AAkBnBnE,yBAAcoE,UAAd,CAAyBjG,WAAzB","sourcesContent":["import { CLIAspect, CLIMain, MainRuntime } from '@teambit/cli';\nimport { DependencyResolverAspect, DependencyResolverMain } from '@teambit/dependency-resolver';\nimport { BitId } from '@teambit/legacy-bit-id';\nimport WorkspaceAspect, { Workspace } from '@teambit/workspace';\nimport ComponentAspect, { Component, ComponentID, ComponentMain } from '@teambit/component';\nimport { ComponentIdObj } from '@teambit/component-id';\nimport GraphqlAspect, { GraphqlMain } from '@teambit/graphql';\nimport RefactoringAspect, { RefactoringMain } from '@teambit/refactoring';\nimport { BitError } from '@teambit/bit-error';\nimport NewComponentHelperAspect, { NewComponentHelperMain } from '@teambit/new-component-helper';\nimport { ForkCmd, ForkOptions } from './fork.cmd';\nimport { ForkingAspect } from './forking.aspect';\nimport { ForkingFragment } from './forking.fragment';\nimport { forkingSchema } from './forking.graphql';\n\nexport type ForkInfo = {\n forkedFrom: ComponentID;\n};\n\nexport class ForkingMain {\n constructor(\n private workspace: Workspace,\n private dependencyResolver: DependencyResolverMain,\n private newComponentHelper: NewComponentHelperMain,\n private refactoring: RefactoringMain\n ) {}\n\n async fork(sourceIdStr: string, targetId?: string, options?: ForkOptions): Promise<ComponentID> {\n const sourceId = await this.workspace.resolveComponentId(sourceIdStr);\n const exists = this.workspace.exists(sourceId);\n if (exists) {\n const existingInWorkspace = await this.workspace.get(sourceId);\n return this.forkExistingInWorkspace(existingInWorkspace, targetId, options);\n }\n const sourceIdWithScope = sourceId._legacy.scope\n ? sourceId\n : ComponentID.fromLegacy(BitId.parse(sourceIdStr, true));\n return this.forkRemoteComponent(sourceIdWithScope, targetId, options);\n }\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 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);\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 private async forkRemoteComponent(sourceId: ComponentID, targetId?: string, options?: ForkOptions) {\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 comp = await this.workspace.scope.getRemoteComponent(sourceId);\n\n const deps = await this.dependencyResolver.getDependencies(comp);\n // only bring auto-resolved dependencies, others should be set in the workspace.jsonc template\n const workspacePolicyEntries = deps\n .filter((dep) => dep.source === 'auto')\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 this.dependencyResolver.addToRootPolicy(workspacePolicyEntries, { updateExisting: true });\n const config = await this.getConfig(comp);\n await this.newComponentHelper.writeAndAddNewComp(comp, targetCompId, options, config);\n await this.dependencyResolver.persistConfig(this.workspace.path);\n await this.workspace.install(undefined, {\n dedupe: true,\n import: false,\n copyPeerToRuntimeOnRoot: true,\n copyPeerToRuntimeOnComponents: false,\n updateExisting: false,\n });\n\n return targetCompId;\n }\n\n private async getConfig(comp: Component) {\n const fromExisting = await this.newComponentHelper.getConfigFromExistingToNewComponent(comp);\n return {\n ...fromExisting,\n [ForkingAspect.id]: {\n forkedFrom: comp.id.toObject(),\n },\n };\n }\n\n static slots = [];\n static dependencies = [\n CLIAspect,\n WorkspaceAspect,\n DependencyResolverAspect,\n ComponentAspect,\n NewComponentHelperAspect,\n GraphqlAspect,\n RefactoringAspect,\n ];\n static runtime = MainRuntime;\n static async provider([cli, workspace, dependencyResolver, componentMain, newComponentHelper, graphql, refactoring]: [\n CLIMain,\n Workspace,\n DependencyResolverMain,\n ComponentMain,\n NewComponentHelperMain,\n GraphqlMain,\n RefactoringMain\n ]) {\n const forkingMain = new ForkingMain(workspace, dependencyResolver, newComponentHelper, refactoring);\n cli.register(new ForkCmd(forkingMain));\n graphql.register(forkingSchema(forkingMain));\n componentMain.registerShowFragments([new ForkingFragment(forkingMain)]);\n return forkingMain;\n }\n}\n\nForkingAspect.addRuntime(ForkingMain);\n\nexport type ForkConfig = {\n forkedFrom: ComponentIdObj;\n};\n"]}
|
Binary file
|
package/package.json
CHANGED
@@ -1,27 +1,29 @@
|
|
1
1
|
{
|
2
2
|
"name": "@teambit/forking",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.110",
|
4
4
|
"homepage": "https://bit.dev/teambit/component/forking",
|
5
5
|
"main": "dist/index.js",
|
6
6
|
"componentId": {
|
7
7
|
"scope": "teambit.component",
|
8
8
|
"name": "forking",
|
9
|
-
"version": "0.0.
|
9
|
+
"version": "0.0.110"
|
10
10
|
},
|
11
11
|
"dependencies": {
|
12
12
|
"chalk": "2.4.2",
|
13
|
-
"@teambit/harmony": "0.2.11",
|
14
13
|
"graphql-tag": "2.12.1",
|
15
14
|
"@babel/runtime": "7.12.18",
|
16
15
|
"core-js": "^3.0.0",
|
17
|
-
"@teambit/
|
18
|
-
"@teambit/
|
19
|
-
"@teambit/
|
16
|
+
"@teambit/harmony": "0.3.3",
|
17
|
+
"@teambit/cli": "0.0.470",
|
18
|
+
"@teambit/component": "0.0.706",
|
19
|
+
"@teambit/graphql": "0.0.706",
|
20
|
+
"@teambit/bit-error": "0.0.394",
|
20
21
|
"@teambit/component-id": "0.0.402",
|
21
|
-
"@teambit/dependency-resolver": "0.0.
|
22
|
+
"@teambit/dependency-resolver": "0.0.706",
|
22
23
|
"@teambit/legacy-bit-id": "0.0.399",
|
23
|
-
"@teambit/new-component-helper": "0.0.
|
24
|
-
"@teambit/
|
24
|
+
"@teambit/new-component-helper": "0.0.110",
|
25
|
+
"@teambit/refactoring": "0.0.3",
|
26
|
+
"@teambit/workspace": "0.0.706"
|
25
27
|
},
|
26
28
|
"devDependencies": {
|
27
29
|
"@types/react": "^17.0.8",
|
@@ -32,7 +34,7 @@
|
|
32
34
|
"@types/node": "12.20.4"
|
33
35
|
},
|
34
36
|
"peerDependencies": {
|
35
|
-
"@teambit/legacy": "1.0.
|
37
|
+
"@teambit/legacy": "1.0.247",
|
36
38
|
"react-dom": "^16.8.0 || ^17.0.0",
|
37
39
|
"react": "^16.8.0 || ^17.0.0"
|
38
40
|
},
|
@@ -60,7 +62,7 @@
|
|
60
62
|
"react": "-"
|
61
63
|
},
|
62
64
|
"peerDependencies": {
|
63
|
-
"@teambit/legacy": "1.0.
|
65
|
+
"@teambit/legacy": "1.0.247",
|
64
66
|
"react-dom": "^16.8.0 || ^17.0.0",
|
65
67
|
"react": "^16.8.0 || ^17.0.0"
|
66
68
|
}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
export const compositions = [require('/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_forking@0.0.
|
2
|
-
export const overview = [require('/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_forking@0.0.
|
1
|
+
export const compositions = [require('/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_forking@0.0.110/dist/forking.composition.js')]
|
2
|
+
export const overview = [require('/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_forking@0.0.110/dist/forking.docs.mdx')]
|
Binary file
|