@teambit/renaming 1.0.623 → 1.0.625

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
- import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.component_renaming@1.0.623/dist/renaming.composition.js';
2
- import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.component_renaming@1.0.623/dist/renaming.docs.mdx';
1
+ import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.component_renaming@1.0.625/dist/renaming.composition.js';
2
+ import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.component_renaming@1.0.625/dist/renaming.docs.mdx';
3
3
 
4
4
  export const compositions = [compositions_0];
5
5
  export const overview = [overview_0];
@@ -28,7 +28,7 @@ class RenameCmd {
28
28
  name: 'new-name',
29
29
  description: "the new component name (without its scope name. use --scope to define the new component's scope)"
30
30
  }]);
31
- _defineProperty(this, "group", 'collaborate');
31
+ _defineProperty(this, "group", 'component-development');
32
32
  _defineProperty(this, "skipWorkspace", true);
33
33
  _defineProperty(this, "alias", '');
34
34
  _defineProperty(this, "options", [['s', 'scope <scope-name>', 'define the scope for the new component'], ['r', 'refactor', 'update the import/require statements in all dependent components (in the same workspace)'], ['', 'preserve', 'avoid renaming files and variables/classes according to the new component name'], ['', 'ast', 'use ast to transform files instead of regex'], ['', 'delete', 'DEPRECATED. this is now the default'], ['', 'deprecate', 'instead of deleting the original component, deprecating it'], ['p', 'path <relative-path>', 'relative path in the workspace to place new component in. by default, the directory of the new component is from your workspace\'s "defaultScope" value']]);
@@ -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","RenameCmd","constructor","renaming","name","description","report","sourceId","targetId","options","results","rename","chalk","green","bold","toString","exports"],"sources":["rename.cmd.ts"],"sourcesContent":["import chalk from 'chalk';\nimport { Command, CommandOptions } from '@teambit/cli';\nimport { RenamingMain } from './renaming.main.runtime';\n\nexport type RenameOptions = {\n scope?: string;\n path?: string;\n refactor?: boolean;\n preserve?: boolean;\n ast?: boolean;\n deprecate?: boolean;\n};\n\nexport class RenameCmd implements Command {\n name = 'rename <current-name> <new-name>';\n description =\n 'rename component. if exported, create a new component and delete the original component. otherwise just renames current component';\n helpUrl = 'reference/components/renaming-components';\n arguments = [\n {\n name: 'current-name',\n description: 'the current component name (without its scope name)',\n },\n {\n name: 'new-name',\n description: \"the new component name (without its scope name. use --scope to define the new component's scope)\",\n },\n ];\n group = 'collaborate';\n skipWorkspace = true;\n alias = '';\n options = [\n ['s', 'scope <scope-name>', 'define the scope for the new component'],\n ['r', 'refactor', 'update the import/require statements in all dependent components (in the same workspace)'],\n ['', 'preserve', 'avoid renaming files and variables/classes according to the new component name'],\n ['', 'ast', 'use ast to transform files instead of regex'],\n ['', 'delete', 'DEPRECATED. this is now the default'],\n ['', 'deprecate', 'instead of deleting the original component, deprecating it'],\n [\n 'p',\n 'path <relative-path>',\n 'relative path in the workspace to place new component in. by default, the directory of the new component is from your workspace\\'s \"defaultScope\" value',\n ],\n ] as CommandOptions;\n loader = true;\n remoteOp = true;\n\n constructor(private renaming: RenamingMain) {}\n\n async report([sourceId, targetId]: [string, string], options: RenameOptions): Promise<string> {\n const results = await this.renaming.rename(sourceId, targetId, options);\n return chalk.green(\n `successfully renamed ${chalk.bold(results.sourceId.toString())} to ${chalk.bold(results.targetId.toString())}`\n );\n }\n}\n"],"mappings":";;;;;;AAAA,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,IAA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AAE,wCAAwC,CAAC,EACrE,CAAC,GAAG,EAAE,UAAU,EAAE,0FAA0F,CAAC,EAC7G,CAAC,EAAE,EAAE,UAAU,EAAE,gFAAgF,CAAC,EAClG,CAAC,EAAE,EAAE,KAAK,EAAE,6CAA6C,CAAC,EAC1D,CAAC,EAAE,EAAE,QAAQ,EAAE,qCAAqC,CAAC,EACrD,CAAC,EAAE,EAAE,WAAW,EAAE,4DAA4D,CAAC,EAC/E,CACE,GAAG,EACH,sBAAsB,EACtB,yJAAyJ,CAC1J,CACF;IAAAA,eAAA,iBACQ,IAAI;IAAAA,eAAA,mBACF,IAAI;EAE8B;EAE7C,MAAMuB,MAAMA,CAAC,CAACC,QAAQ,EAAEC,QAAQ,CAAmB,EAAEC,OAAsB,EAAmB;IAC5F,MAAMC,OAAO,GAAG,MAAM,IAAI,CAACP,QAAQ,CAACQ,MAAM,CAACJ,QAAQ,EAAEC,QAAQ,EAAEC,OAAO,CAAC;IACvE,OAAOG,gBAAK,CAACC,KAAK,CAChB,wBAAwBD,gBAAK,CAACE,IAAI,CAACJ,OAAO,CAACH,QAAQ,CAACQ,QAAQ,CAAC,CAAC,CAAC,OAAOH,gBAAK,CAACE,IAAI,CAACJ,OAAO,CAACF,QAAQ,CAACO,QAAQ,CAAC,CAAC,CAAC,EAC/G,CAAC;EACH;AACF;AAACC,OAAA,CAAAf,SAAA,GAAAA,SAAA","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","RenameCmd","constructor","renaming","name","description","report","sourceId","targetId","options","results","rename","chalk","green","bold","toString","exports"],"sources":["rename.cmd.ts"],"sourcesContent":["import chalk from 'chalk';\nimport { Command, CommandOptions } from '@teambit/cli';\nimport { RenamingMain } from './renaming.main.runtime';\n\nexport type RenameOptions = {\n scope?: string;\n path?: string;\n refactor?: boolean;\n preserve?: boolean;\n ast?: boolean;\n deprecate?: boolean;\n};\n\nexport class RenameCmd implements Command {\n name = 'rename <current-name> <new-name>';\n description =\n 'rename component. if exported, create a new component and delete the original component. otherwise just renames current component';\n helpUrl = 'reference/components/renaming-components';\n arguments = [\n {\n name: 'current-name',\n description: 'the current component name (without its scope name)',\n },\n {\n name: 'new-name',\n description: \"the new component name (without its scope name. use --scope to define the new component's scope)\",\n },\n ];\n group = 'component-development';\n skipWorkspace = true;\n alias = '';\n options = [\n ['s', 'scope <scope-name>', 'define the scope for the new component'],\n ['r', 'refactor', 'update the import/require statements in all dependent components (in the same workspace)'],\n ['', 'preserve', 'avoid renaming files and variables/classes according to the new component name'],\n ['', 'ast', 'use ast to transform files instead of regex'],\n ['', 'delete', 'DEPRECATED. this is now the default'],\n ['', 'deprecate', 'instead of deleting the original component, deprecating it'],\n [\n 'p',\n 'path <relative-path>',\n 'relative path in the workspace to place new component in. by default, the directory of the new component is from your workspace\\'s \"defaultScope\" value',\n ],\n ] as CommandOptions;\n loader = true;\n remoteOp = true;\n\n constructor(private renaming: RenamingMain) {}\n\n async report([sourceId, targetId]: [string, string], options: RenameOptions): Promise<string> {\n const results = await this.renaming.rename(sourceId, targetId, options);\n return chalk.green(\n `successfully renamed ${chalk.bold(results.sourceId.toString())} to ${chalk.bold(results.targetId.toString())}`\n );\n }\n}\n"],"mappings":";;;;;;AAAA,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,MAA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CAAC,EAAE,EAAE,QAAQ,EAAE,qCAAqC,CAAC,EACrD,CAAC,EAAE,EAAE,WAAW,EAAE,4DAA4D,CAAC,EAC/E,CACE,GAAG,EACH,sBAAsB,EACtB,yJAAyJ,CAC1J,CACF;IAAAA,eAAA,iBACQ,IAAI;IAAAA,eAAA,mBACF,IAAI;EAE8B;EAE7C,MAAMuB,MAAMA,CAAC,CAACC,QAAQ,EAAEC,QAAQ,CAAmB,EAAEC,OAAsB,EAAmB;IAC5F,MAAMC,OAAO,GAAG,MAAM,IAAI,CAACP,QAAQ,CAACQ,MAAM,CAACJ,QAAQ,EAAEC,QAAQ,EAAEC,OAAO,CAAC;IACvE,OAAOG,gBAAK,CAACC,KAAK,CAChB,wBAAwBD,gBAAK,CAACE,IAAI,CAACJ,OAAO,CAACH,QAAQ,CAACQ,QAAQ,CAAC,CAAC,CAAC,OAAOH,gBAAK,CAACE,IAAI,CAACJ,OAAO,CAACF,QAAQ,CAACO,QAAQ,CAAC,CAAC,CAAC,EAC/G,CAAC;EACH;AACF;AAACC,OAAA,CAAAf,SAAA,GAAAA,SAAA","ignoreList":[]}
@@ -35,7 +35,7 @@ class ScopeRenameOwnerCmd {
35
35
  description: 'a new owner name to replace the current owner name'
36
36
  }]);
37
37
  _defineProperty(this, "options", [['r', 'refactor', 'update the import statements in all dependent components to the new package name (that contains the new owner name)'], ['', 'ast', 'use ast to transform files instead of regex']]);
38
- _defineProperty(this, "group", 'development');
38
+ _defineProperty(this, "group", 'component-config');
39
39
  }
40
40
  async report([oldName, newName], {
41
41
  refactor
@@ -1 +1 @@
1
- {"version":3,"names":["_chalk","data","_interopRequireDefault","require","_scopeRename","e","__esModule","default","_defineProperty","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","ScopeRenameOwnerCmd","constructor","renaming","name","description","report","oldName","newName","refactor","results","renameOwner","title","chalk","green","renameOutput","renameScopeOutput","exports"],"sources":["scope-rename-owner.cmd.ts"],"sourcesContent":["import { Command, CommandOptions } from '@teambit/cli';\nimport chalk from 'chalk';\nimport { RenamingMain } from './renaming.main.runtime';\nimport { renameScopeOutput } from './scope-rename.cmd';\n\nexport class ScopeRenameOwnerCmd implements Command {\n name = 'rename-owner <current-owner-name> <new-owner-name>';\n description = \"Renames the owner part of the scope-name for all components with the specified 'current owner name'\";\n arguments = [\n { name: 'current-owner-name', description: 'the owner name to be replaced by another owner name' },\n { name: 'new-owner-name', description: 'a new owner name to replace the current owner name' },\n ];\n options = [\n [\n 'r',\n 'refactor',\n 'update the import statements in all dependent components to the new package name (that contains the new owner name)',\n ],\n ['', 'ast', 'use ast to transform files instead of regex'],\n ] as CommandOptions;\n group = 'development';\n\n constructor(private renaming: RenamingMain) {}\n\n async report([oldName, newName]: [string, string], { refactor }: { refactor?: boolean }) {\n const results = await this.renaming.renameOwner(oldName, newName, { refactor });\n const title = chalk.green(`successfully replaced \"${oldName}\" owner with \"${newName}\"`);\n const renameOutput = renameScopeOutput(results);\n return `${title}\\n${renameOutput}`;\n }\n}\n"],"mappings":";;;;;;AACA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAG,aAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,YAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAAuD,SAAAC,uBAAAG,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,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AC/E,MAAMG,KAAK,GAAGC,gBAAK,CAACC,KAAK,CAAC,0BAA0BP,OAAO,iBAAiBC,OAAO,GAAG,CAAC;IACvF,MAAMO,YAAY,GAAG,IAAAC,gCAAiB,EAACN,OAAO,CAAC;IAC/C,OAAO,GAAGE,KAAK,KAAKG,YAAY,EAAE;EACpC;AACF;AAACE,OAAA,CAAAhB,mBAAA,GAAAA,mBAAA","ignoreList":[]}
1
+ {"version":3,"names":["_chalk","data","_interopRequireDefault","require","_scopeRename","e","__esModule","default","_defineProperty","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","ScopeRenameOwnerCmd","constructor","renaming","name","description","report","oldName","newName","refactor","results","renameOwner","title","chalk","green","renameOutput","renameScopeOutput","exports"],"sources":["scope-rename-owner.cmd.ts"],"sourcesContent":["import { Command, CommandOptions } from '@teambit/cli';\nimport chalk from 'chalk';\nimport { RenamingMain } from './renaming.main.runtime';\nimport { renameScopeOutput } from './scope-rename.cmd';\n\nexport class ScopeRenameOwnerCmd implements Command {\n name = 'rename-owner <current-owner-name> <new-owner-name>';\n description = \"Renames the owner part of the scope-name for all components with the specified 'current owner name'\";\n arguments = [\n { name: 'current-owner-name', description: 'the owner name to be replaced by another owner name' },\n { name: 'new-owner-name', description: 'a new owner name to replace the current owner name' },\n ];\n options = [\n [\n 'r',\n 'refactor',\n 'update the import statements in all dependent components to the new package name (that contains the new owner name)',\n ],\n ['', 'ast', 'use ast to transform files instead of regex'],\n ] as CommandOptions;\n group = 'component-config';\n\n constructor(private renaming: RenamingMain) {}\n\n async report([oldName, newName]: [string, string], { refactor }: { refactor?: boolean }) {\n const results = await this.renaming.renameOwner(oldName, newName, { refactor });\n const title = chalk.green(`successfully replaced \"${oldName}\" owner with \"${newName}\"`);\n const renameOutput = renameScopeOutput(results);\n return `${title}\\n${renameOutput}`;\n }\n}\n"],"mappings":";;;;;;AACA,SAAAA,OAAA;EAAA,MAAA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,oBACvG,CACV;MAAEqB,IAAI,EAAE,oBAAoB;MAAEC,WAAW,EAAE;IAAsD,CAAC,EAClG;MAAED,IAAI,EAAE,gBAAgB;MAAEC,WAAW,EAAE;IAAqD,CAAC,CAC9F;IAAAtB,eAAA,kBACS,CACR,CACE,GAAG,EACH,UAAU,EACV,qHAAqH,CACtH,EACD,CAAC,EAAE,EAAE,KAAK,EAAE,6CAA6C,CAAC,CAC3D;IAAAA,eAAA,gBACO,kBAAkB;EAEmB;EAE7C,MAAMuB,MAAMA,CAAC,CAACC,OAAO,EAAEC,OAAO,CAAmB,EAAE;IAAEC;EAAiC,CAAC,EAAE;IACvF,MAAMC,OAAO,GAAG,MAAM,IAAI,CAACP,QAAQ,CAACQ,WAAW,CAACJ,OAAO,EAAEC,OAAO,EAAE;MAAEC;IAAS,CAAC,CAAC;IAC/E,MAAMG,KAAK,GAAGC,gBAAK,CAACC,KAAK,CAAC,0BAA0BP,OAAO,iBAAiBC,OAAO,GAAG,CAAC;IACvF,MAAMO,YAAY,GAAG,IAAAC,gCAAiB,EAACN,OAAO,CAAC;IAC/C,OAAO,GAAGE,KAAK,KAAKG,YAAY,EAAE;EACpC;AACF;AAACE,OAAA,CAAAhB,mBAAA,GAAAA,mBAAA","ignoreList":[]}
@@ -32,7 +32,7 @@ as a result of this change`);
32
32
  description: 'a new scope name to replace the current scope name'
33
33
  }]);
34
34
  _defineProperty(this, "options", [['', 'preserve', 'avoid renaming files and variables/classes according to the new scope name'], ['r', 'refactor', 'update the import statements in all dependent components to the new package name (i.e. with the new scope name)'], ['', 'deprecate', 'for exported components, instead of deleting the original components, deprecating them']]);
35
- _defineProperty(this, "group", 'development');
35
+ _defineProperty(this, "group", 'component-config');
36
36
  }
37
37
  async report([oldName, newName], {
38
38
  refactor,
@@ -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","ScopeRenameCmd","constructor","renaming","name","description","report","oldName","newName","refactor","deprecate","preserve","result","renameScope","title","chalk","green","renameOutput","renameScopeOutput","exports","renameResult","renameData","refactoredIds","renamedIdsStr","length","bold","map","item","sourceId","toStringWithoutVersion","isTagged","targetId","toString","join","refactoredStr"],"sources":["scope-rename.cmd.ts"],"sourcesContent":["import { Command, CommandOptions } from '@teambit/cli';\nimport chalk from 'chalk';\nimport { RenameResult, RenamingMain } from './renaming.main.runtime';\n\nexport class ScopeRenameCmd implements Command {\n name = 'rename <current-scope-name> <new-scope-name>';\n description =\n \"rename the scope name for all components with the specified 'current scope name'. if exported, create new components and delete the original ones\";\n extendedDescription = `Note: if \\`<current-scope-name>\\` is also the defaultScope for the workspace, this command will set \\`<new-scope-name>\\`\nas the defaultScope instead, and that will then be set for all components by default. You may see updates in your .bitmap file\nas a result of this change`;\n arguments = [\n { name: 'current-scope-name', description: 'the scope name to be replaced by another scope name' },\n { name: 'new-scope-name', description: 'a new scope name to replace the current scope name' },\n ];\n options = [\n ['', 'preserve', 'avoid renaming files and variables/classes according to the new scope name'],\n [\n 'r',\n 'refactor',\n 'update the import statements in all dependent components to the new package name (i.e. with the new scope name)',\n ],\n ['', 'deprecate', 'for exported components, instead of deleting the original components, deprecating them'],\n ] as CommandOptions;\n group = 'development';\n\n constructor(private renaming: RenamingMain) {}\n\n async report(\n [oldName, newName]: [string, string],\n { refactor, deprecate, preserve }: { refactor?: boolean; deprecate?: boolean; preserve?: boolean }\n ) {\n const result = await this.renaming.renameScope(oldName, newName, { refactor, deprecate, preserve });\n const title = chalk.green(`successfully replaced \"${oldName}\" scope with \"${newName}\"`);\n const renameOutput = renameScopeOutput(result);\n return `${title}\\n${renameOutput}`;\n }\n}\n\nexport function renameScopeOutput(renameResult: RenameResult): string {\n const { renameData, refactoredIds } = renameResult;\n const renamedIdsStr = renameData.length\n ? `\\n${chalk.bold('the following components were affected by this scope-name change:')}\\n${renameData\n .map(\n (item) =>\n `${item.sourceId.toStringWithoutVersion()} ${\n item.isTagged ? '(deprecated) ' : ''\n }-> ${item.targetId.toString()}`\n )\n .join('\\n')}`\n : '';\n const refactoredStr = refactoredIds.length\n ? `\\n\\n${chalk.bold('the following components have been refactored:')}\\n${refactoredIds.join('\\n')}`\n : '';\n return renamedIdsStr + refactoredStr;\n}\n"],"mappings":";;;;;;;AACA,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;AAGnB,MAAMgB,cAAc,CAAoB;EAsB7C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,CAAC,KAAKJ,UAAU,CAChGK,GAAG,CACDC,IAAI,IACH,GAAGA,IAAI,CAACC,QAAQ,CAACC,sBAAsB,CAAC,CAAC,IACvCF,IAAI,CAACG,QAAQ,GAAG,eAAe,GAAG,EAAE,MAChCH,IAAI,CAACI,QAAQ,CAACC,QAAQ,CAAC,CAAC,EAClC,CAAC,CACAC,IAAI,CAAC,IAAI,CAAC,EAAE,GACf,EAAE;EACN,MAAMC,aAAa,GAAGZ,aAAa,CAACE,MAAM,GACtC,OAAOT,gBAAK,CAACU,IAAI,CAAC,gDAAgD,CAAC,KAAKH,aAAa,CAACW,IAAI,CAAC,IAAI,CAAC,EAAE,GAClG,EAAE;EACN,OAAOV,aAAa,GAAGW,aAAa;AACtC","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","ScopeRenameCmd","constructor","renaming","name","description","report","oldName","newName","refactor","deprecate","preserve","result","renameScope","title","chalk","green","renameOutput","renameScopeOutput","exports","renameResult","renameData","refactoredIds","renamedIdsStr","length","bold","map","item","sourceId","toStringWithoutVersion","isTagged","targetId","toString","join","refactoredStr"],"sources":["scope-rename.cmd.ts"],"sourcesContent":["import { Command, CommandOptions } from '@teambit/cli';\nimport chalk from 'chalk';\nimport { RenameResult, RenamingMain } from './renaming.main.runtime';\n\nexport class ScopeRenameCmd implements Command {\n name = 'rename <current-scope-name> <new-scope-name>';\n description =\n \"rename the scope name for all components with the specified 'current scope name'. if exported, create new components and delete the original ones\";\n extendedDescription = `Note: if \\`<current-scope-name>\\` is also the defaultScope for the workspace, this command will set \\`<new-scope-name>\\`\nas the defaultScope instead, and that will then be set for all components by default. You may see updates in your .bitmap file\nas a result of this change`;\n arguments = [\n { name: 'current-scope-name', description: 'the scope name to be replaced by another scope name' },\n { name: 'new-scope-name', description: 'a new scope name to replace the current scope name' },\n ];\n options = [\n ['', 'preserve', 'avoid renaming files and variables/classes according to the new scope name'],\n [\n 'r',\n 'refactor',\n 'update the import statements in all dependent components to the new package name (i.e. with the new scope name)',\n ],\n ['', 'deprecate', 'for exported components, instead of deleting the original components, deprecating them'],\n ] as CommandOptions;\n group = 'component-config';\n\n constructor(private renaming: RenamingMain) {}\n\n async report(\n [oldName, newName]: [string, string],\n { refactor, deprecate, preserve }: { refactor?: boolean; deprecate?: boolean; preserve?: boolean }\n ) {\n const result = await this.renaming.renameScope(oldName, newName, { refactor, deprecate, preserve });\n const title = chalk.green(`successfully replaced \"${oldName}\" scope with \"${newName}\"`);\n const renameOutput = renameScopeOutput(result);\n return `${title}\\n${renameOutput}`;\n }\n}\n\nexport function renameScopeOutput(renameResult: RenameResult): string {\n const { renameData, refactoredIds } = renameResult;\n const renamedIdsStr = renameData.length\n ? `\\n${chalk.bold('the following components were affected by this scope-name change:')}\\n${renameData\n .map(\n (item) =>\n `${item.sourceId.toStringWithoutVersion()} ${\n item.isTagged ? '(deprecated) ' : ''\n }-> ${item.targetId.toString()}`\n )\n .join('\\n')}`\n : '';\n const refactoredStr = refactoredIds.length\n ? `\\n\\n${chalk.bold('the following components have been refactored:')}\\n${refactoredIds.join('\\n')}`\n : '';\n return renamedIdsStr + refactoredStr;\n}\n"],"mappings":";;;;;;;AACA,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,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0E,CAAC,EAClG;IACA,MAAMC,MAAM,GAAG,MAAM,IAAI,CAACT,QAAQ,CAACU,WAAW,CAACN,OAAO,EAAEC,OAAO,EAAE;MAAEC,QAAQ;MAAEC,SAAS;MAAEC;IAAS,CAAC,CAAC;IACnG,MAAMG,KAAK,GAAGC,gBAAK,CAACC,KAAK,CAAC,0BAA0BT,OAAO,iBAAiBC,OAAO,GAAG,CAAC;IACvF,MAAMS,YAAY,GAAGC,iBAAiB,CAACN,MAAM,CAAC;IAC9C,OAAO,GAAGE,KAAK,KAAKG,YAAY,EAAE;EACpC;AACF;AAACE,OAAA,CAAAlB,cAAA,GAAAA,cAAA;AAEM,SAASiB,iBAAiBA,CAACE,YAA0B,EAAU;EACpE,MAAM;IAAEC,UAAU;IAAEC;EAAc,CAAC,GAAGF,YAAY;EAClD,MAAMG,aAAa,GAAGF,UAAU,CAACG,MAAM,GACnC,KAAKT,gBAAK,CAACU,IAAI,CAAC,mEAAmE,CAAC,KAAKJ,UAAU,CAChGK,GAAG,CACDC,IAAI,IACH,GAAGA,IAAI,CAACC,QAAQ,CAACC,sBAAsB,CAAC,CAAC,IACvCF,IAAI,CAACG,QAAQ,GAAG,eAAe,GAAG,EAAE,MAChCH,IAAI,CAACI,QAAQ,CAACC,QAAQ,CAAC,CAAC,EAClC,CAAC,CACAC,IAAI,CAAC,IAAI,CAAC,EAAE,GACf,EAAE;EACN,MAAMC,aAAa,GAAGZ,aAAa,CAACE,MAAM,GACtC,OAAOT,gBAAK,CAACU,IAAI,CAAC,gDAAgD,CAAC,KAAKH,aAAa,CAACW,IAAI,CAAC,IAAI,CAAC,EAAE,GAClG,EAAE;EACN,OAAOV,aAAa,GAAGW,aAAa;AACtC","ignoreList":[]}
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/renaming",
3
- "version": "1.0.623",
3
+ "version": "1.0.625",
4
4
  "homepage": "https://bit.cloud/teambit/component/renaming",
5
5
  "main": "dist/index.js",
6
6
  "componentId": {
7
7
  "scope": "teambit.component",
8
8
  "name": "renaming",
9
- "version": "1.0.623"
9
+ "version": "1.0.625"
10
10
  },
11
11
  "dependencies": {
12
12
  "chalk": "4.1.2",
@@ -17,21 +17,21 @@
17
17
  "@teambit/harmony": "0.4.7",
18
18
  "@teambit/legacy-bit-id": "1.1.3",
19
19
  "@teambit/bit-error": "0.0.404",
20
- "@teambit/cli": "0.0.1200",
21
- "@teambit/component": "1.0.623",
22
- "@teambit/graphql": "1.0.623",
23
- "@teambit/compiler": "1.0.623",
24
- "@teambit/component-writer": "1.0.623",
25
- "@teambit/config": "0.0.1374",
26
- "@teambit/deprecation": "1.0.623",
27
- "@teambit/envs": "1.0.623",
28
- "@teambit/install": "1.0.623",
29
- "@teambit/logger": "0.0.1293",
30
- "@teambit/new-component-helper": "1.0.623",
31
- "@teambit/refactoring": "1.0.623",
32
- "@teambit/remove": "1.0.623",
20
+ "@teambit/cli": "0.0.1202",
21
+ "@teambit/component": "1.0.625",
22
+ "@teambit/graphql": "1.0.625",
23
+ "@teambit/compiler": "1.0.625",
24
+ "@teambit/component-writer": "1.0.625",
25
+ "@teambit/config": "0.0.1376",
26
+ "@teambit/deprecation": "1.0.625",
27
+ "@teambit/envs": "1.0.625",
28
+ "@teambit/install": "1.0.625",
29
+ "@teambit/logger": "0.0.1295",
30
+ "@teambit/new-component-helper": "1.0.625",
31
+ "@teambit/refactoring": "1.0.625",
32
+ "@teambit/remove": "1.0.625",
33
33
  "@teambit/workspace.modules.node-modules-linker": "0.0.278",
34
- "@teambit/workspace": "1.0.623"
34
+ "@teambit/workspace": "1.0.625"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@types/fs-extra": "9.0.7",