@teambit/renaming 0.0.249 → 0.0.250
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/renaming.main.runtime.d.ts +6 -3
- package/dist/renaming.main.runtime.js +16 -5
- package/dist/renaming.main.runtime.js.map +1 -1
- package/package-tar/teambit-renaming-0.0.250.tgz +0 -0
- package/package.json +9 -8
- package/{preview-1662521943539.js → preview-1662608124038.js} +2 -2
- package/package-tar/teambit-renaming-0.0.249.tgz +0 -0
|
@@ -5,13 +5,15 @@ import { GraphqlMain } from '@teambit/graphql';
|
|
|
5
5
|
import { NewComponentHelperMain } from '@teambit/new-component-helper';
|
|
6
6
|
import { RefactoringMain } from '@teambit/refactoring';
|
|
7
7
|
import { Workspace } from '@teambit/workspace';
|
|
8
|
+
import { InstallMain } from '@teambit/install';
|
|
8
9
|
import { RenameOptions } from './rename.cmd';
|
|
9
10
|
export declare class RenamingMain {
|
|
10
11
|
private workspace;
|
|
12
|
+
private install;
|
|
11
13
|
private newComponentHelper;
|
|
12
14
|
private deprecation;
|
|
13
15
|
private refactoring;
|
|
14
|
-
constructor(workspace: Workspace, newComponentHelper: NewComponentHelperMain, deprecation: DeprecationMain, refactoring: RefactoringMain);
|
|
16
|
+
constructor(workspace: Workspace, install: InstallMain, newComponentHelper: NewComponentHelperMain, deprecation: DeprecationMain, refactoring: RefactoringMain);
|
|
15
17
|
rename(sourceIdStr: string, targetIdStr: string, options: RenameOptions): Promise<RenameDependencyNameResult>;
|
|
16
18
|
getRenamingInfo(component: Component): RenamingInfo | null;
|
|
17
19
|
/**
|
|
@@ -27,14 +29,15 @@ export declare class RenamingMain {
|
|
|
27
29
|
static slots: never[];
|
|
28
30
|
static dependencies: import("@teambit/harmony").Aspect[];
|
|
29
31
|
static runtime: import("@teambit/harmony").RuntimeDefinition;
|
|
30
|
-
static provider([cli, workspace, deprecation, newComponentHelper, componentMain, graphql, refactoring]: [
|
|
32
|
+
static provider([cli, workspace, deprecation, newComponentHelper, componentMain, graphql, refactoring, install,]: [
|
|
31
33
|
CLIMain,
|
|
32
34
|
Workspace,
|
|
33
35
|
DeprecationMain,
|
|
34
36
|
NewComponentHelperMain,
|
|
35
37
|
ComponentMain,
|
|
36
38
|
GraphqlMain,
|
|
37
|
-
RefactoringMain
|
|
39
|
+
RefactoringMain,
|
|
40
|
+
InstallMain
|
|
38
41
|
]): Promise<RenamingMain>;
|
|
39
42
|
}
|
|
40
43
|
export declare type RenameDependencyNameResult = {
|
|
@@ -121,6 +121,16 @@ function _workspace() {
|
|
|
121
121
|
return data;
|
|
122
122
|
}
|
|
123
123
|
|
|
124
|
+
function _install() {
|
|
125
|
+
const data = require("@teambit/install");
|
|
126
|
+
|
|
127
|
+
_install = function () {
|
|
128
|
+
return data;
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
return data;
|
|
132
|
+
}
|
|
133
|
+
|
|
124
134
|
function _rename() {
|
|
125
135
|
const data = require("./rename.cmd");
|
|
126
136
|
|
|
@@ -180,8 +190,9 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
180
190
|
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; }
|
|
181
191
|
|
|
182
192
|
class RenamingMain {
|
|
183
|
-
constructor(workspace, newComponentHelper, deprecation, refactoring) {
|
|
193
|
+
constructor(workspace, install, newComponentHelper, deprecation, refactoring) {
|
|
184
194
|
this.workspace = workspace;
|
|
195
|
+
this.install = install;
|
|
185
196
|
this.newComponentHelper = newComponentHelper;
|
|
186
197
|
this.deprecation = deprecation;
|
|
187
198
|
this.refactoring = refactoring;
|
|
@@ -210,7 +221,7 @@ class RenamingMain {
|
|
|
210
221
|
await Promise.all(changedComponents.map(comp => this.workspace.write(comp)));
|
|
211
222
|
}
|
|
212
223
|
|
|
213
|
-
await this.
|
|
224
|
+
await this.install.link();
|
|
214
225
|
return {
|
|
215
226
|
sourceId,
|
|
216
227
|
targetId
|
|
@@ -306,10 +317,10 @@ to be able to rename the scope, please untag the components first (using "bit re
|
|
|
306
317
|
});
|
|
307
318
|
}
|
|
308
319
|
|
|
309
|
-
static async provider([cli, workspace, deprecation, newComponentHelper, componentMain, graphql, refactoring]) {
|
|
320
|
+
static async provider([cli, workspace, deprecation, newComponentHelper, componentMain, graphql, refactoring, install]) {
|
|
310
321
|
var _scopeCommand$command;
|
|
311
322
|
|
|
312
|
-
const renaming = new RenamingMain(workspace, newComponentHelper, deprecation, refactoring);
|
|
323
|
+
const renaming = new RenamingMain(workspace, install, newComponentHelper, deprecation, refactoring);
|
|
313
324
|
cli.register(new (_rename().RenameCmd)(renaming));
|
|
314
325
|
const scopeCommand = cli.getCommand('scope');
|
|
315
326
|
scopeCommand === null || scopeCommand === void 0 ? void 0 : (_scopeCommand$command = scopeCommand.commands) === null || _scopeCommand$command === void 0 ? void 0 : _scopeCommand$command.push(new (_scopeRename().ScopeRenameCmd)(renaming));
|
|
@@ -322,7 +333,7 @@ to be able to rename the scope, please untag the components first (using "bit re
|
|
|
322
333
|
|
|
323
334
|
exports.RenamingMain = RenamingMain;
|
|
324
335
|
(0, _defineProperty2().default)(RenamingMain, "slots", []);
|
|
325
|
-
(0, _defineProperty2().default)(RenamingMain, "dependencies", [_cli().CLIAspect, _workspace().default, _deprecation().DeprecationAspect, _newComponentHelper().default, _component().default, _graphql().default, _refactoring().default]);
|
|
336
|
+
(0, _defineProperty2().default)(RenamingMain, "dependencies", [_cli().CLIAspect, _workspace().default, _deprecation().DeprecationAspect, _newComponentHelper().default, _component().default, _graphql().default, _refactoring().default, _install().InstallAspect]);
|
|
326
337
|
(0, _defineProperty2().default)(RenamingMain, "runtime", _cli().MainRuntime);
|
|
327
338
|
|
|
328
339
|
_renaming().RenamingAspect.addRuntime(RenamingMain);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["RenamingMain","constructor","workspace","newComponentHelper","deprecation","refactoring","rename","sourceIdStr","targetIdStr","options","sourceId","resolveComponentId","isTagged","hasVersion","sourceComp","get","targetId","getNewComponentId","undefined","scope","config","getConfig","writeAndAddNewComp","deprecate","bitMap","renameNewComponent","write","refactor","allComponents","list","changedComponents","refactorDependencyName","Promise","all","map","comp","link","getRenamingInfo","component","renameConfig","state","aspects","RenamingAspect","id","renamedFrom","ComponentID","fromObject","renameScope","oldScope","newScope","componentsUsingOldScope","filter","length","defaultScope","BitError","exported","_legacy","hasScope","idsStr","toString","join","tagged","setDefaultScope","forEach","removeDefaultScope","refactoredIds","legacyComps","c","_consumer","packagesToReplace","oldStr","componentIdToPackageName","newStr","bindingPrefix","getBindingPrefixByDefaultScope","replaceMultipleStrings","push","scopeRenamedComponentIds","fromExisting","getConfigFromExistingToNewComponent","toObject","provider","cli","componentMain","graphql","renaming","register","RenameCmd","scopeCommand","getCommand","commands","ScopeRenameCmd","renamingSchema","registerShowFragments","RenamingFragment","CLIAspect","WorkspaceAspect","DeprecationAspect","NewComponentHelperAspect","ComponentAspect","GraphqlAspect","RefactoringAspect","MainRuntime","addRuntime"],"sources":["renaming.main.runtime.ts"],"sourcesContent":["import { BitError } from '@teambit/bit-error';\nimport componentIdToPackageName from '@teambit/legacy/dist/utils/bit/component-id-to-package-name';\nimport { CLIAspect, CLIMain, MainRuntime } from '@teambit/cli';\nimport ComponentAspect, { Component, ComponentID, ComponentMain } from '@teambit/component';\nimport { DeprecationAspect, DeprecationMain } from '@teambit/deprecation';\nimport GraphqlAspect, { GraphqlMain } from '@teambit/graphql';\nimport NewComponentHelperAspect, { NewComponentHelperMain } from '@teambit/new-component-helper';\nimport RefactoringAspect, { MultipleStringsReplacement, RefactoringMain } from '@teambit/refactoring';\nimport { getBindingPrefixByDefaultScope } from '@teambit/legacy/dist/consumer/config/component-config';\nimport WorkspaceAspect, { Workspace } from '@teambit/workspace';\nimport { RenameCmd, RenameOptions } from './rename.cmd';\nimport { RenamingAspect } from './renaming.aspect';\nimport { RenamingFragment } from './renaming.fragment';\nimport { renamingSchema } from './renaming.graphql';\nimport { ScopeRenameCmd } from './scope-rename.cmd';\n\nexport class RenamingMain {\n constructor(\n private workspace: Workspace,\n private newComponentHelper: NewComponentHelperMain,\n private deprecation: DeprecationMain,\n private refactoring: RefactoringMain\n ) {}\n\n async rename(sourceIdStr: string, targetIdStr: string, options: RenameOptions): Promise<RenameDependencyNameResult> {\n const sourceId = await this.workspace.resolveComponentId(sourceIdStr);\n const isTagged = sourceId.hasVersion();\n const sourceComp = await this.workspace.get(sourceId);\n const targetId = this.newComponentHelper.getNewComponentId(targetIdStr, undefined, options?.scope);\n if (isTagged) {\n const config = await this.getConfig(sourceComp);\n await this.newComponentHelper.writeAndAddNewComp(sourceComp, targetId, options, config);\n await this.deprecation.deprecate(sourceId, targetId);\n } else {\n this.workspace.bitMap.renameNewComponent(sourceId, targetId);\n await this.workspace.bitMap.write();\n }\n if (options.refactor) {\n const allComponents = await this.workspace.list();\n const { changedComponents } = await this.refactoring.refactorDependencyName(allComponents, sourceId, targetId);\n await Promise.all(changedComponents.map((comp) => this.workspace.write(comp)));\n }\n\n await this.workspace.link();\n\n return {\n sourceId,\n targetId,\n };\n }\n\n getRenamingInfo(component: Component): RenamingInfo | null {\n const renameConfig = component.state.aspects.get(RenamingAspect.id)?.config as RenamingInfo | undefined;\n if (!renameConfig) return null;\n return {\n renamedFrom: ComponentID.fromObject(renameConfig.renamedFrom),\n };\n }\n\n /**\n * change the default-scope for new components. optionally (if refactor is true), change the source code to match the\n * new scope-name.\n * keep in mind that this is working for new components only, for tagged/exported it's impossible. See the errors\n * thrown in such cases in this method.\n */\n async renameScope(oldScope: string, newScope: string, options: { refactor?: boolean }): Promise<RenameScopeResult> {\n const allComponents = await this.workspace.list();\n const componentsUsingOldScope = allComponents.filter((comp) => comp.id.scope === oldScope);\n if (!componentsUsingOldScope.length && this.workspace.defaultScope !== oldScope) {\n throw new BitError(\n `none of the components is using \"${oldScope}\". also, the workspace is not configured with \"${oldScope}\"`\n );\n }\n // verify they're all new.\n const exported = componentsUsingOldScope.filter((comp) => comp.id._legacy.hasScope());\n if (exported.length) {\n const idsStr = exported.map((comp) => comp.id.toString()).join(', ');\n throw new BitError(`unable to rename the scope for the following exported components:\\n${idsStr}\nbecause these components were exported already, other components may use them and they'll break upon rename.\ninstead, deprecate the above components (using \"bit deprecate\"), tag, export and then eject them.\nonce they are not in the workspace, you can fork them (\"bit fork\") with the new scope-name`);\n }\n const tagged = componentsUsingOldScope.filter((comp) => comp.id.hasVersion());\n if (tagged.length) {\n const idsStr = tagged.map((comp) => comp.id.toString()).join(', ');\n throw new BitError(`unable to rename the scope for the following tagged components:\\n${idsStr}\nbecause these components were tagged, the objects have the dependencies data of the old-scope.\nto be able to rename the scope, please untag the components first (using \"bit reset\" command)`);\n }\n if (this.workspace.defaultScope === oldScope) {\n await this.workspace.setDefaultScope(newScope);\n componentsUsingOldScope.forEach((comp) => this.workspace.bitMap.removeDefaultScope(comp.id));\n } else {\n componentsUsingOldScope.forEach((comp) => this.workspace.bitMap.setDefaultScope(comp.id, newScope));\n }\n await this.workspace.bitMap.write();\n const refactoredIds: ComponentID[] = [];\n if (options.refactor) {\n const legacyComps = componentsUsingOldScope.map((c) => c.state._consumer);\n const packagesToReplace: MultipleStringsReplacement = legacyComps.map((comp) => {\n return {\n oldStr: componentIdToPackageName(comp),\n newStr: componentIdToPackageName({\n ...comp,\n bindingPrefix: getBindingPrefixByDefaultScope(newScope),\n id: comp.id,\n defaultScope: newScope,\n }),\n };\n });\n const { changedComponents } = await this.refactoring.replaceMultipleStrings(allComponents, packagesToReplace);\n await Promise.all(changedComponents.map((comp) => this.workspace.write(comp)));\n refactoredIds.push(...changedComponents.map((c) => c.id));\n }\n\n return { scopeRenamedComponentIds: componentsUsingOldScope.map((comp) => comp.id), refactoredIds };\n }\n\n private async getConfig(comp: Component) {\n const fromExisting = await this.newComponentHelper.getConfigFromExistingToNewComponent(comp);\n return {\n ...fromExisting,\n [RenamingAspect.id]: {\n renamedFrom: comp.id.toObject(),\n },\n };\n }\n\n static slots = [];\n static dependencies = [\n CLIAspect,\n WorkspaceAspect,\n DeprecationAspect,\n NewComponentHelperAspect,\n ComponentAspect,\n GraphqlAspect,\n RefactoringAspect,\n ];\n static runtime = MainRuntime;\n static async provider([cli, workspace, deprecation, newComponentHelper, componentMain, graphql, refactoring]: [\n CLIMain,\n Workspace,\n DeprecationMain,\n NewComponentHelperMain,\n ComponentMain,\n GraphqlMain,\n RefactoringMain\n ]) {\n const renaming = new RenamingMain(workspace, newComponentHelper, deprecation, refactoring);\n cli.register(new RenameCmd(renaming));\n\n const scopeCommand = cli.getCommand('scope');\n scopeCommand?.commands?.push(new ScopeRenameCmd(renaming));\n\n graphql.register(renamingSchema(renaming));\n componentMain.registerShowFragments([new RenamingFragment(renaming)]);\n return renaming;\n }\n}\n\nRenamingAspect.addRuntime(RenamingMain);\n\nexport type RenameDependencyNameResult = { sourceId: ComponentID; targetId: ComponentID };\n\nexport type RenamingInfo = {\n renamedFrom: ComponentID;\n};\n\nexport type RenameScopeResult = { scopeRenamedComponentIds: ComponentID[]; refactoredIds: ComponentID[] };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;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BAJoB,EAKpBC,oBALoB,EAMpBC,kBANoB,EAOpBC,sBAPoB,C;gCAjHXrG,Y,aA0HMsG,kB;;AAsBnB5D,0BAAA,CAAe6D,UAAf,CAA0BvG,YAA1B"}
|
|
1
|
+
{"version":3,"names":["RenamingMain","constructor","workspace","install","newComponentHelper","deprecation","refactoring","rename","sourceIdStr","targetIdStr","options","sourceId","resolveComponentId","isTagged","hasVersion","sourceComp","get","targetId","getNewComponentId","undefined","scope","config","getConfig","writeAndAddNewComp","deprecate","bitMap","renameNewComponent","write","refactor","allComponents","list","changedComponents","refactorDependencyName","Promise","all","map","comp","link","getRenamingInfo","component","renameConfig","state","aspects","RenamingAspect","id","renamedFrom","ComponentID","fromObject","renameScope","oldScope","newScope","componentsUsingOldScope","filter","length","defaultScope","BitError","exported","_legacy","hasScope","idsStr","toString","join","tagged","setDefaultScope","forEach","removeDefaultScope","refactoredIds","legacyComps","c","_consumer","packagesToReplace","oldStr","componentIdToPackageName","newStr","bindingPrefix","getBindingPrefixByDefaultScope","replaceMultipleStrings","push","scopeRenamedComponentIds","fromExisting","getConfigFromExistingToNewComponent","toObject","provider","cli","componentMain","graphql","renaming","register","RenameCmd","scopeCommand","getCommand","commands","ScopeRenameCmd","renamingSchema","registerShowFragments","RenamingFragment","CLIAspect","WorkspaceAspect","DeprecationAspect","NewComponentHelperAspect","ComponentAspect","GraphqlAspect","RefactoringAspect","InstallAspect","MainRuntime","addRuntime"],"sources":["renaming.main.runtime.ts"],"sourcesContent":["import { BitError } from '@teambit/bit-error';\nimport componentIdToPackageName from '@teambit/legacy/dist/utils/bit/component-id-to-package-name';\nimport { CLIAspect, CLIMain, MainRuntime } from '@teambit/cli';\nimport ComponentAspect, { Component, ComponentID, ComponentMain } from '@teambit/component';\nimport { DeprecationAspect, DeprecationMain } from '@teambit/deprecation';\nimport GraphqlAspect, { GraphqlMain } from '@teambit/graphql';\nimport NewComponentHelperAspect, { NewComponentHelperMain } from '@teambit/new-component-helper';\nimport RefactoringAspect, { MultipleStringsReplacement, RefactoringMain } from '@teambit/refactoring';\nimport { getBindingPrefixByDefaultScope } from '@teambit/legacy/dist/consumer/config/component-config';\nimport WorkspaceAspect, { Workspace } from '@teambit/workspace';\nimport { InstallMain, InstallAspect } from '@teambit/install';\nimport { RenameCmd, RenameOptions } from './rename.cmd';\nimport { RenamingAspect } from './renaming.aspect';\nimport { RenamingFragment } from './renaming.fragment';\nimport { renamingSchema } from './renaming.graphql';\nimport { ScopeRenameCmd } from './scope-rename.cmd';\n\nexport class RenamingMain {\n constructor(\n private workspace: Workspace,\n private install: InstallMain,\n private newComponentHelper: NewComponentHelperMain,\n private deprecation: DeprecationMain,\n private refactoring: RefactoringMain\n ) {}\n\n async rename(sourceIdStr: string, targetIdStr: string, options: RenameOptions): Promise<RenameDependencyNameResult> {\n const sourceId = await this.workspace.resolveComponentId(sourceIdStr);\n const isTagged = sourceId.hasVersion();\n const sourceComp = await this.workspace.get(sourceId);\n const targetId = this.newComponentHelper.getNewComponentId(targetIdStr, undefined, options?.scope);\n if (isTagged) {\n const config = await this.getConfig(sourceComp);\n await this.newComponentHelper.writeAndAddNewComp(sourceComp, targetId, options, config);\n await this.deprecation.deprecate(sourceId, targetId);\n } else {\n this.workspace.bitMap.renameNewComponent(sourceId, targetId);\n await this.workspace.bitMap.write();\n }\n if (options.refactor) {\n const allComponents = await this.workspace.list();\n const { changedComponents } = await this.refactoring.refactorDependencyName(allComponents, sourceId, targetId);\n await Promise.all(changedComponents.map((comp) => this.workspace.write(comp)));\n }\n\n await this.install.link();\n\n return {\n sourceId,\n targetId,\n };\n }\n\n getRenamingInfo(component: Component): RenamingInfo | null {\n const renameConfig = component.state.aspects.get(RenamingAspect.id)?.config as RenamingInfo | undefined;\n if (!renameConfig) return null;\n return {\n renamedFrom: ComponentID.fromObject(renameConfig.renamedFrom),\n };\n }\n\n /**\n * change the default-scope for new components. optionally (if refactor is true), change the source code to match the\n * new scope-name.\n * keep in mind that this is working for new components only, for tagged/exported it's impossible. See the errors\n * thrown in such cases in this method.\n */\n async renameScope(oldScope: string, newScope: string, options: { refactor?: boolean }): Promise<RenameScopeResult> {\n const allComponents = await this.workspace.list();\n const componentsUsingOldScope = allComponents.filter((comp) => comp.id.scope === oldScope);\n if (!componentsUsingOldScope.length && this.workspace.defaultScope !== oldScope) {\n throw new BitError(\n `none of the components is using \"${oldScope}\". also, the workspace is not configured with \"${oldScope}\"`\n );\n }\n // verify they're all new.\n const exported = componentsUsingOldScope.filter((comp) => comp.id._legacy.hasScope());\n if (exported.length) {\n const idsStr = exported.map((comp) => comp.id.toString()).join(', ');\n throw new BitError(`unable to rename the scope for the following exported components:\\n${idsStr}\nbecause these components were exported already, other components may use them and they'll break upon rename.\ninstead, deprecate the above components (using \"bit deprecate\"), tag, export and then eject them.\nonce they are not in the workspace, you can fork them (\"bit fork\") with the new scope-name`);\n }\n const tagged = componentsUsingOldScope.filter((comp) => comp.id.hasVersion());\n if (tagged.length) {\n const idsStr = tagged.map((comp) => comp.id.toString()).join(', ');\n throw new BitError(`unable to rename the scope for the following tagged components:\\n${idsStr}\nbecause these components were tagged, the objects have the dependencies data of the old-scope.\nto be able to rename the scope, please untag the components first (using \"bit reset\" command)`);\n }\n if (this.workspace.defaultScope === oldScope) {\n await this.workspace.setDefaultScope(newScope);\n componentsUsingOldScope.forEach((comp) => this.workspace.bitMap.removeDefaultScope(comp.id));\n } else {\n componentsUsingOldScope.forEach((comp) => this.workspace.bitMap.setDefaultScope(comp.id, newScope));\n }\n await this.workspace.bitMap.write();\n const refactoredIds: ComponentID[] = [];\n if (options.refactor) {\n const legacyComps = componentsUsingOldScope.map((c) => c.state._consumer);\n const packagesToReplace: MultipleStringsReplacement = legacyComps.map((comp) => {\n return {\n oldStr: componentIdToPackageName(comp),\n newStr: componentIdToPackageName({\n ...comp,\n bindingPrefix: getBindingPrefixByDefaultScope(newScope),\n id: comp.id,\n defaultScope: newScope,\n }),\n };\n });\n const { changedComponents } = await this.refactoring.replaceMultipleStrings(allComponents, packagesToReplace);\n await Promise.all(changedComponents.map((comp) => this.workspace.write(comp)));\n refactoredIds.push(...changedComponents.map((c) => c.id));\n }\n\n return { scopeRenamedComponentIds: componentsUsingOldScope.map((comp) => comp.id), refactoredIds };\n }\n\n private async getConfig(comp: Component) {\n const fromExisting = await this.newComponentHelper.getConfigFromExistingToNewComponent(comp);\n return {\n ...fromExisting,\n [RenamingAspect.id]: {\n renamedFrom: comp.id.toObject(),\n },\n };\n }\n\n static slots = [];\n static dependencies = [\n CLIAspect,\n WorkspaceAspect,\n DeprecationAspect,\n NewComponentHelperAspect,\n ComponentAspect,\n GraphqlAspect,\n RefactoringAspect,\n InstallAspect,\n ];\n static runtime = MainRuntime;\n static async provider([\n cli,\n workspace,\n deprecation,\n newComponentHelper,\n componentMain,\n graphql,\n refactoring,\n install,\n ]: [\n CLIMain,\n Workspace,\n DeprecationMain,\n NewComponentHelperMain,\n ComponentMain,\n GraphqlMain,\n RefactoringMain,\n InstallMain\n ]) {\n const renaming = new RenamingMain(workspace, install, newComponentHelper, deprecation, refactoring);\n cli.register(new RenameCmd(renaming));\n\n const scopeCommand = cli.getCommand('scope');\n scopeCommand?.commands?.push(new ScopeRenameCmd(renaming));\n\n graphql.register(renamingSchema(renaming));\n componentMain.registerShowFragments([new RenamingFragment(renaming)]);\n return renaming;\n }\n}\n\nRenamingAspect.addRuntime(RenamingMain);\n\nexport type RenameDependencyNameResult = { sourceId: ComponentID; targetId: ComponentID };\n\nexport type RenamingInfo = {\n renamedFrom: ComponentID;\n};\n\nexport type RenameScopeResult = { scopeRenamedComponentIds: ComponentID[]; refactoredIds: ComponentID[] };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;E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IAAAM,2BAAA,EAAeP,QAAf,CAAjB;IACAF,aAAa,CAACU,qBAAd,CAAoC,CAAC,KAAIC,6BAAJ,EAAqBT,QAArB,CAAD,CAApC;IACA,OAAOA,QAAP;EACD;;AAzJuB;;;gCAAbtF,Y,WAiHI,E;gCAjHJA,Y,kBAkHW,CACpBgG,gBADoB,EAEpBC,oBAFoB,EAGpBC,gCAHoB,EAIpBC,6BAJoB,EAKpBC,oBALoB,EAMpBC,kBANoB,EAOpBC,sBAPoB,EAQpBC,wBARoB,C;gCAlHXvG,Y,aA4HMwG,kB;;AAgCnB7D,0BAAA,CAAe8D,UAAf,CAA0BzG,YAA1B"}
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/renaming",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.250",
|
|
4
4
|
"homepage": "https://bit.dev/teambit/component/renaming",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.component",
|
|
8
8
|
"name": "renaming",
|
|
9
|
-
"version": "0.0.
|
|
9
|
+
"version": "0.0.250"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"chalk": "2.4.2",
|
|
@@ -15,13 +15,14 @@
|
|
|
15
15
|
"core-js": "^3.0.0",
|
|
16
16
|
"@teambit/cli": "0.0.564",
|
|
17
17
|
"@teambit/harmony": "0.3.3",
|
|
18
|
-
"@teambit/component": "0.0.
|
|
19
|
-
"@teambit/graphql": "0.0.
|
|
18
|
+
"@teambit/component": "0.0.846",
|
|
19
|
+
"@teambit/graphql": "0.0.846",
|
|
20
20
|
"@teambit/bit-error": "0.0.400",
|
|
21
|
-
"@teambit/deprecation": "0.0.
|
|
22
|
-
"@teambit/
|
|
23
|
-
"@teambit/
|
|
24
|
-
"@teambit/
|
|
21
|
+
"@teambit/deprecation": "0.0.846",
|
|
22
|
+
"@teambit/install": "0.0.1",
|
|
23
|
+
"@teambit/new-component-helper": "0.0.250",
|
|
24
|
+
"@teambit/refactoring": "0.0.143",
|
|
25
|
+
"@teambit/workspace": "0.0.846"
|
|
25
26
|
},
|
|
26
27
|
"devDependencies": {
|
|
27
28
|
"@types/react": "^17.0.8",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_renaming@0.0.
|
|
2
|
-
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_renaming@0.0.
|
|
1
|
+
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_renaming@0.0.250/dist/renaming.composition.js';
|
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_renaming@0.0.250/dist/renaming.docs.mdx';
|
|
3
3
|
|
|
4
4
|
export const compositions = [compositions_0];
|
|
5
5
|
export const overview = [overview_0];
|
|
Binary file
|