@teambit/mover 1.0.151 → 1.0.152

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,4 +1,4 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <testsuites>
3
- <testsuite name="teambit.component/mover@1.0.151" tests="0" failures="0" errors="0" skipped="0"/>
3
+ <testsuite name="teambit.component/mover@1.0.152" tests="0" failures="0" errors="0" skipped="0"/>
4
4
  </testsuites>
@@ -39,13 +39,6 @@ function _workspace() {
39
39
  };
40
40
  return data;
41
41
  }
42
- function _generalError() {
43
- const data = _interopRequireDefault(require("@teambit/legacy/dist/error/general-error"));
44
- _generalError = function () {
45
- return data;
46
- };
47
- return data;
48
- }
49
42
  function _utils() {
50
43
  const data = require("@teambit/legacy/dist/utils");
51
44
  _utils = function () {
@@ -106,7 +99,7 @@ class MoverMain {
106
99
  if (fromExists && toExists) {
107
100
  throw new (_bitError().BitError)(`unable to move because both paths from (${from}) and to (${to}) already exist`);
108
101
  }
109
- if (!fromExists && !toExists) throw new (_generalError().default)(`both paths from (${from}) and to (${to}) do not exist`);
102
+ if (!fromExists && !toExists) throw new (_bitError().BitError)(`both paths from (${from}) and to (${to}) do not exist`);
110
103
  if (!consumer.isLegacy && fromExists && !(0, _utils().isDir)(from)) {
111
104
  throw new (_bitError().BitError)(`bit move supports moving directories only, not files.
112
105
  files withing a component dir are automatically tracked, no action is needed.
@@ -132,7 +125,7 @@ class MoverMain {
132
125
  moveExistingComponent(component, oldPath, newPath) {
133
126
  const consumer = this.workspace.consumer;
134
127
  if (_fsExtra().default.existsSync(newPath)) {
135
- throw new (_generalError().default)(`could not move the component ${component.id.toString()} from ${oldPath} to ${newPath} as the destination path already exists`);
128
+ throw new (_bitError().BitError)(`could not move the component ${component.id.toString()} from ${oldPath} to ${newPath} as the destination path already exists`);
136
129
  }
137
130
  const componentMap = consumer.bitMap.getComponent(component.id);
138
131
  const oldPathRelative = consumer.getPathRelativeToConsumer(oldPath);
@@ -1 +1 @@
1
- {"version":3,"names":["_fsExtra","data","_interopRequireDefault","require","_bitError","_cli","_lodash","_workspace","_generalError","_utils","_moveSync","_workspaceModules","_removePath","_mover","_moveCmd","obj","__esModule","default","_defineProperty","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","String","r","e","Symbol","toPrimitive","call","TypeError","Number","MoverMain","constructor","workspace","movePaths","from","to","consumer","fromExists","fs","existsSync","toExists","BitError","GeneralError","isLegacy","isDir","fromRelative","getPathRelativeToConsumer","toRelative","fromAbsolute","toAbsolutePath","toAbsolute","existingPath","changes","bitMap","updatePathLocation","moveSync","isEmpty","componentsIds","map","c","id","linkToNodeModulesByIds","write","moveExistingComponent","component","oldPath","newPath","toString","componentMap","getComponent","oldPathRelative","newPathRelative","updateDirLocation","markAsChanged","dataToPersist","files","forEach","file","newRelative","relative","replace","updatePaths","newBase","removePath","RemovePath","writtenPath","provider","cli","moverMain","register","MoveCmd","exports","CLIAspect","WorkspaceAspect","MainRuntime","MoverAspect","addRuntime","_default"],"sources":["mover.main.runtime.ts"],"sourcesContent":["import fs from 'fs-extra';\nimport { BitError } from '@teambit/bit-error';\nimport { CLIAspect, CLIMain, MainRuntime } from '@teambit/cli';\nimport { isEmpty } from 'lodash';\nimport WorkspaceAspect, { Workspace } from '@teambit/workspace';\nimport GeneralError from '@teambit/legacy/dist/error/general-error';\nimport { isDir } from '@teambit/legacy/dist/utils';\nimport moveSync from '@teambit/legacy/dist/utils/fs/move-sync';\nimport { PathOsBasedAbsolute, PathOsBasedRelative } from '@teambit/legacy/dist/utils/path';\nimport { linkToNodeModulesByIds } from '@teambit/workspace.modules.node-modules-linker';\nimport { PathChangeResult } from '@teambit/legacy/dist/consumer/bit-map/bit-map';\nimport Component from '@teambit/legacy/dist/consumer/component/consumer-component';\nimport RemovePath from '@teambit/legacy/dist/consumer/component/sources/remove-path';\nimport { MoverAspect } from './mover.aspect';\nimport { MoveCmd } from './move-cmd';\n\nexport class MoverMain {\n constructor(private workspace: Workspace) {}\n\n async movePaths({ from, to }: { from: PathOsBasedRelative; to: PathOsBasedRelative }): Promise<PathChangeResult[]> {\n const consumer = await this.workspace.consumer;\n const fromExists = fs.existsSync(from);\n const toExists = fs.existsSync(to);\n if (fromExists && toExists) {\n throw new BitError(`unable to move because both paths from (${from}) and to (${to}) already exist`);\n }\n if (!fromExists && !toExists) throw new GeneralError(`both paths from (${from}) and to (${to}) do not exist`);\n if (!consumer.isLegacy && fromExists && !isDir(from)) {\n throw new BitError(`bit move supports moving directories only, not files.\n files withing a component dir are automatically tracked, no action is needed.\n to change the main-file, use \"bit add <component-dir> --main <new-main-file>\"`);\n }\n const fromRelative = consumer.getPathRelativeToConsumer(from);\n const toRelative = consumer.getPathRelativeToConsumer(to);\n const fromAbsolute = consumer.toAbsolutePath(fromRelative);\n const toAbsolute = consumer.toAbsolutePath(toRelative);\n const existingPath = fromExists ? fromAbsolute : toAbsolute;\n const changes = consumer.bitMap.updatePathLocation(fromRelative, toRelative, existingPath);\n if (fromExists && !toExists) {\n // user would like to physically move the file. Otherwise (!fromExists and toExists), user would like to only update bit.map\n moveSync(fromAbsolute, toAbsolute);\n }\n if (!isEmpty(changes)) {\n const componentsIds = changes.map((c) => c.id);\n await linkToNodeModulesByIds(this.workspace, componentsIds);\n }\n await this.workspace.bitMap.write('move');\n return changes;\n }\n\n moveExistingComponent(component: Component, oldPath: PathOsBasedAbsolute, newPath: PathOsBasedAbsolute) {\n const consumer = this.workspace.consumer;\n if (fs.existsSync(newPath)) {\n throw new GeneralError(\n `could not move the component ${component.id.toString()} from ${oldPath} to ${newPath} as the destination path already exists`\n );\n }\n const componentMap = consumer.bitMap.getComponent(component.id);\n const oldPathRelative = consumer.getPathRelativeToConsumer(oldPath);\n const newPathRelative = consumer.getPathRelativeToConsumer(newPath);\n componentMap.updateDirLocation(oldPathRelative, newPathRelative);\n consumer.bitMap.markAsChanged();\n component.dataToPersist.files.forEach((file) => {\n // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n const newRelative = file.relative.replace(oldPathRelative, newPathRelative);\n file.updatePaths({ newRelative, newBase: newPathRelative });\n });\n component.dataToPersist.removePath(new RemovePath(oldPathRelative));\n component.writtenPath = newPathRelative;\n }\n\n static slots = [];\n static dependencies = [CLIAspect, WorkspaceAspect];\n static runtime = MainRuntime;\n\n static async provider([cli, workspace]: [CLIMain, Workspace]) {\n const moverMain = new MoverMain(workspace);\n cli.register(new MoveCmd(moverMain));\n return moverMain;\n }\n}\n\nMoverAspect.addRuntime(MoverMain);\n\nexport default MoverMain;\n"],"mappings":";;;;;;AAAA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,UAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,SAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,KAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,IAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,QAAA;EAAA,MAAAL,IAAA,GAAAE,OAAA;EAAAG,OAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,WAAA;EAAA,MAAAN,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAI,UAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAO,cAAA;EAAA,MAAAP,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAK,aAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAQ,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lodash","_workspace","_utils","_moveSync","_workspaceModules","_removePath","_mover","_moveCmd","obj","__esModule","default","_defineProperty","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","String","r","e","Symbol","toPrimitive","call","TypeError","Number","MoverMain","constructor","workspace","movePaths","from","to","consumer","fromExists","fs","existsSync","toExists","BitError","isLegacy","isDir","fromRelative","getPathRelativeToConsumer","toRelative","fromAbsolute","toAbsolutePath","toAbsolute","existingPath","changes","bitMap","updatePathLocation","moveSync","isEmpty","componentsIds","map","c","id","linkToNodeModulesByIds","write","moveExistingComponent","component","oldPath","newPath","toString","componentMap","getComponent","oldPathRelative","newPathRelative","updateDirLocation","markAsChanged","dataToPersist","files","forEach","file","newRelative","relative","replace","updatePaths","newBase","removePath","RemovePath","writtenPath","provider","cli","moverMain","register","MoveCmd","exports","CLIAspect","WorkspaceAspect","MainRuntime","MoverAspect","addRuntime","_default"],"sources":["mover.main.runtime.ts"],"sourcesContent":["import fs from 'fs-extra';\nimport { BitError } from '@teambit/bit-error';\nimport { CLIAspect, CLIMain, MainRuntime } from '@teambit/cli';\nimport { isEmpty } from 'lodash';\nimport WorkspaceAspect, { Workspace } from '@teambit/workspace';\nimport { isDir } from '@teambit/legacy/dist/utils';\nimport moveSync from '@teambit/legacy/dist/utils/fs/move-sync';\nimport { PathOsBasedAbsolute, PathOsBasedRelative } from '@teambit/legacy/dist/utils/path';\nimport { linkToNodeModulesByIds } from '@teambit/workspace.modules.node-modules-linker';\nimport { PathChangeResult } from '@teambit/legacy/dist/consumer/bit-map/bit-map';\nimport Component from '@teambit/legacy/dist/consumer/component/consumer-component';\nimport RemovePath from '@teambit/legacy/dist/consumer/component/sources/remove-path';\nimport { MoverAspect } from './mover.aspect';\nimport { MoveCmd } from './move-cmd';\n\nexport class MoverMain {\n constructor(private workspace: Workspace) {}\n\n async movePaths({ from, to }: { from: PathOsBasedRelative; to: PathOsBasedRelative }): Promise<PathChangeResult[]> {\n const consumer = await this.workspace.consumer;\n const fromExists = fs.existsSync(from);\n const toExists = fs.existsSync(to);\n if (fromExists && toExists) {\n throw new BitError(`unable to move because both paths from (${from}) and to (${to}) already exist`);\n }\n if (!fromExists && !toExists) throw new BitError(`both paths from (${from}) and to (${to}) do not exist`);\n if (!consumer.isLegacy && fromExists && !isDir(from)) {\n throw new BitError(`bit move supports moving directories only, not files.\n files withing a component dir are automatically tracked, no action is needed.\n to change the main-file, use \"bit add <component-dir> --main <new-main-file>\"`);\n }\n const fromRelative = consumer.getPathRelativeToConsumer(from);\n const toRelative = consumer.getPathRelativeToConsumer(to);\n const fromAbsolute = consumer.toAbsolutePath(fromRelative);\n const toAbsolute = consumer.toAbsolutePath(toRelative);\n const existingPath = fromExists ? fromAbsolute : toAbsolute;\n const changes = consumer.bitMap.updatePathLocation(fromRelative, toRelative, existingPath);\n if (fromExists && !toExists) {\n // user would like to physically move the file. Otherwise (!fromExists and toExists), user would like to only update bit.map\n moveSync(fromAbsolute, toAbsolute);\n }\n if (!isEmpty(changes)) {\n const componentsIds = changes.map((c) => c.id);\n await linkToNodeModulesByIds(this.workspace, componentsIds);\n }\n await this.workspace.bitMap.write('move');\n return changes;\n }\n\n moveExistingComponent(component: Component, oldPath: PathOsBasedAbsolute, newPath: PathOsBasedAbsolute) {\n const consumer = this.workspace.consumer;\n if (fs.existsSync(newPath)) {\n throw new BitError(\n `could not move the component ${component.id.toString()} from ${oldPath} to ${newPath} as the destination path already exists`\n );\n }\n const componentMap = consumer.bitMap.getComponent(component.id);\n const oldPathRelative = consumer.getPathRelativeToConsumer(oldPath);\n const newPathRelative = consumer.getPathRelativeToConsumer(newPath);\n componentMap.updateDirLocation(oldPathRelative, newPathRelative);\n consumer.bitMap.markAsChanged();\n component.dataToPersist.files.forEach((file) => {\n // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n const newRelative = file.relative.replace(oldPathRelative, newPathRelative);\n file.updatePaths({ newRelative, newBase: newPathRelative });\n });\n component.dataToPersist.removePath(new RemovePath(oldPathRelative));\n component.writtenPath = newPathRelative;\n }\n\n static slots = [];\n static dependencies = [CLIAspect, WorkspaceAspect];\n static runtime = MainRuntime;\n\n static async provider([cli, workspace]: [CLIMain, Workspace]) {\n const moverMain = new MoverMain(workspace);\n cli.register(new MoveCmd(moverMain));\n return moverMain;\n }\n}\n\nMoverAspect.addRuntime(MoverMain);\n\nexport default MoverMain;\n"],"mappings":";;;;;;AAAA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,UAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,SAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,KAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,IAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,QAAA;EAAA,MAAAL,IAAA,GAAAE,OAAA;EAAAG,OAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,WAAA;EAAA,MAAAN,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAI,UAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAO,OAAA;EAAA,MAAAP,IAAA,GAAAE,OAAA;EAAAK,MAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAQ,UAAA;EAAA,MAAAR,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAM,SAAA,YAAAA,CAAA;IAAA,OAAAR,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAS,kBAAA;E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AAO,CAAEC,IAAI,IAAK;MAC9C;MACA,MAAMC,WAAW,GAAGD,IAAI,CAACE,QAAQ,CAACC,OAAO,CAACV,eAAe,EAAEC,eAAe,CAAC;MAC3EM,IAAI,CAACI,WAAW,CAAC;QAAEH,WAAW;QAAEI,OAAO,EAAEX;MAAgB,CAAC,CAAC;IAC7D,CAAC,CAAC;IACFP,SAAS,CAACU,aAAa,CAACS,UAAU,CAAC,KAAIC,qBAAU,EAACd,eAAe,CAAC,CAAC;IACnEN,SAAS,CAACqB,WAAW,GAAGd,eAAe;EACzC;EAMA,aAAae,QAAQA,CAAC,CAACC,GAAG,EAAEtD,SAAS,CAAuB,EAAE;IAC5D,MAAMuD,SAAS,GAAG,IAAIzD,SAAS,CAACE,SAAS,CAAC;IAC1CsD,GAAG,CAACE,QAAQ,CAAC,KAAIC,kBAAO,EAACF,SAAS,CAAC,CAAC;IACpC,OAAOA,SAAS;EAClB;AACF;AAACG,OAAA,CAAA5D,SAAA,GAAAA,SAAA;AAAApB,eAAA,CAhEYoB,SAAS,WAuDL,EAAE;AAAApB,eAAA,CAvDNoB,SAAS,kBAwDE,CAAC6D,gBAAS,EAAEC,oBAAe,CAAC;AAAAlF,eAAA,CAxDvCoB,SAAS,aAyDH+D,kBAAW;AAS9BC,oBAAW,CAACC,UAAU,CAACjE,SAAS,CAAC;AAAC,IAAAkE,QAAA,GAAAN,OAAA,CAAAjF,OAAA,GAEnBqB,SAAS"}
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/mover",
3
- "version": "1.0.151",
3
+ "version": "1.0.152",
4
4
  "homepage": "https://bit.cloud/teambit/component/mover",
5
5
  "main": "dist/index.js",
6
6
  "componentId": {
7
7
  "scope": "teambit.component",
8
8
  "name": "mover",
9
- "version": "1.0.151"
9
+ "version": "1.0.152"
10
10
  },
11
11
  "dependencies": {
12
12
  "chalk": "2.4.2",
@@ -14,9 +14,9 @@
14
14
  "lodash": "4.17.21",
15
15
  "@teambit/harmony": "0.4.6",
16
16
  "@teambit/bit-error": "0.0.404",
17
- "@teambit/cli": "0.0.849",
17
+ "@teambit/cli": "0.0.850",
18
18
  "@teambit/workspace.modules.node-modules-linker": "0.0.163",
19
- "@teambit/workspace": "1.0.151"
19
+ "@teambit/workspace": "1.0.152"
20
20
  },
21
21
  "devDependencies": {
22
22
  "@types/fs-extra": "9.0.7",