@teambit/remove 0.0.57 → 0.0.59
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/index.js +0 -5
- package/dist/index.js.map +1 -1
- package/dist/remove-cmd.js +6 -42
- package/dist/remove-cmd.js.map +1 -1
- package/dist/remove.aspect.js +0 -5
- package/dist/remove.aspect.js.map +1 -1
- package/dist/remove.fragment.js +0 -10
- package/dist/remove.fragment.js.map +1 -1
- package/dist/remove.main.runtime.js +3 -80
- package/dist/remove.main.runtime.js.map +1 -1
- package/package-tar/teambit-remove-0.0.59.tgz +0 -0
- package/package.json +7 -7
- /package/{preview-1666312873430.js → preview-1666496165706.js} +0 -0
- package/package-tar/teambit-remove-0.0.57.tgz +0 -0
package/dist/index.js
CHANGED
|
@@ -10,19 +10,14 @@ Object.defineProperty(exports, "RemoveAspect", {
|
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
12
|
exports.default = void 0;
|
|
13
|
-
|
|
14
13
|
function _remove() {
|
|
15
14
|
const data = require("./remove.aspect");
|
|
16
|
-
|
|
17
15
|
_remove = function () {
|
|
18
16
|
return data;
|
|
19
17
|
};
|
|
20
|
-
|
|
21
18
|
return data;
|
|
22
19
|
}
|
|
23
|
-
|
|
24
20
|
var _default = _remove().RemoveAspect;
|
|
25
|
-
|
|
26
21
|
exports.default = _default;
|
|
27
22
|
|
|
28
23
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["RemoveAspect"],"sources":["index.ts"],"sourcesContent":["import { RemoveAspect } from './remove.aspect';\n\nexport type { RemoveMain } from './remove.main.runtime';\nexport default RemoveAspect;\nexport { RemoveAspect };\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["RemoveAspect"],"sources":["index.ts"],"sourcesContent":["import { RemoveAspect } from './remove.aspect';\n\nexport type { RemoveMain } from './remove.main.runtime';\nexport default RemoveAspect;\nexport { RemoveAspect };\n"],"mappings":";;;;;;;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAA+C,eAGhCA,sBAAY;AAAA"}
|
package/dist/remove-cmd.js
CHANGED
|
@@ -1,96 +1,68 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
require("core-js/modules/es.array.iterator.js");
|
|
6
|
-
|
|
7
5
|
require("core-js/modules/es.promise.js");
|
|
8
|
-
|
|
9
6
|
Object.defineProperty(exports, "__esModule", {
|
|
10
7
|
value: true
|
|
11
8
|
});
|
|
12
9
|
exports.RemoveCmd = void 0;
|
|
13
|
-
|
|
14
10
|
function _defineProperty2() {
|
|
15
11
|
const data = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
16
|
-
|
|
17
12
|
_defineProperty2 = function () {
|
|
18
13
|
return data;
|
|
19
14
|
};
|
|
20
|
-
|
|
21
15
|
return data;
|
|
22
16
|
}
|
|
23
|
-
|
|
24
17
|
function _chalk() {
|
|
25
18
|
const data = _interopRequireDefault(require("chalk"));
|
|
26
|
-
|
|
27
19
|
_chalk = function () {
|
|
28
20
|
return data;
|
|
29
21
|
};
|
|
30
|
-
|
|
31
22
|
return data;
|
|
32
23
|
}
|
|
33
|
-
|
|
34
24
|
function _yn() {
|
|
35
25
|
const data = _interopRequireDefault(require("yn"));
|
|
36
|
-
|
|
37
26
|
_yn = function () {
|
|
38
27
|
return data;
|
|
39
28
|
};
|
|
40
|
-
|
|
41
29
|
return data;
|
|
42
30
|
}
|
|
43
|
-
|
|
44
31
|
function _bitError() {
|
|
45
32
|
const data = require("@teambit/bit-error");
|
|
46
|
-
|
|
47
33
|
_bitError = function () {
|
|
48
34
|
return data;
|
|
49
35
|
};
|
|
50
|
-
|
|
51
36
|
return data;
|
|
52
37
|
}
|
|
53
|
-
|
|
54
38
|
function _prompts() {
|
|
55
39
|
const data = require("@teambit/legacy/dist/prompts");
|
|
56
|
-
|
|
57
40
|
_prompts = function () {
|
|
58
41
|
return data;
|
|
59
42
|
};
|
|
60
|
-
|
|
61
43
|
return data;
|
|
62
44
|
}
|
|
63
|
-
|
|
64
45
|
function _loader() {
|
|
65
46
|
const data = _interopRequireDefault(require("@teambit/legacy/dist/cli/loader"));
|
|
66
|
-
|
|
67
47
|
_loader = function () {
|
|
68
48
|
return data;
|
|
69
49
|
};
|
|
70
|
-
|
|
71
50
|
return data;
|
|
72
51
|
}
|
|
73
|
-
|
|
74
52
|
function _removeTemplate() {
|
|
75
53
|
const data = _interopRequireDefault(require("@teambit/legacy/dist/cli/templates/remove-template"));
|
|
76
|
-
|
|
77
54
|
_removeTemplate = function () {
|
|
78
55
|
return data;
|
|
79
56
|
};
|
|
80
|
-
|
|
81
57
|
return data;
|
|
82
58
|
}
|
|
83
|
-
|
|
84
59
|
function _constants() {
|
|
85
60
|
const data = require("@teambit/legacy/dist/constants");
|
|
86
|
-
|
|
87
61
|
_constants = function () {
|
|
88
62
|
return data;
|
|
89
63
|
};
|
|
90
|
-
|
|
91
64
|
return data;
|
|
92
65
|
}
|
|
93
|
-
|
|
94
66
|
class RemoveCmd {
|
|
95
67
|
constructor(remove) {
|
|
96
68
|
this.remove = remove;
|
|
@@ -109,7 +81,6 @@ class RemoveCmd {
|
|
|
109
81
|
(0, _defineProperty2().default)(this, "migration", true);
|
|
110
82
|
(0, _defineProperty2().default)(this, "remoteOp", true);
|
|
111
83
|
}
|
|
112
|
-
|
|
113
84
|
async report([componentsPattern], {
|
|
114
85
|
soft = false,
|
|
115
86
|
force = false,
|
|
@@ -131,23 +102,19 @@ ${removedCompIds.join('\n')}
|
|
|
131
102
|
|
|
132
103
|
${_chalk().default.bold('to update the remote, please tag/snap and then export')}`;
|
|
133
104
|
}
|
|
134
|
-
|
|
135
105
|
if (deleteFiles) {
|
|
136
|
-
_loader().default.stop();
|
|
137
|
-
|
|
138
|
-
|
|
106
|
+
_loader().default.stop();
|
|
107
|
+
// eslint-disable-next-line no-console
|
|
139
108
|
console.warn(_chalk().default.yellow('--delete-files flag is deprecated. by default the files are deleted, unless --keep-files was provided'));
|
|
140
109
|
}
|
|
141
|
-
|
|
142
110
|
if (!silent) {
|
|
143
111
|
const willDeleteFiles = !remote && !keepFiles;
|
|
144
|
-
const removePromptResult = await (0, _prompts().removePrompt)(willDeleteFiles, remote)();
|
|
145
|
-
|
|
112
|
+
const removePromptResult = await (0, _prompts().removePrompt)(willDeleteFiles, remote)();
|
|
113
|
+
// @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
|
|
146
114
|
if (!(0, _yn().default)(removePromptResult.shouldRemove)) {
|
|
147
115
|
throw new (_bitError().BitError)('the operation has been canceled');
|
|
148
116
|
}
|
|
149
117
|
}
|
|
150
|
-
|
|
151
118
|
const {
|
|
152
119
|
localResult,
|
|
153
120
|
remoteResult = []
|
|
@@ -158,17 +125,14 @@ ${_chalk().default.bold('to update the remote, please tag/snap and then export')
|
|
|
158
125
|
track,
|
|
159
126
|
deleteFiles: !keepFiles,
|
|
160
127
|
fromLane
|
|
161
|
-
});
|
|
162
|
-
|
|
128
|
+
});
|
|
129
|
+
// @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
|
|
163
130
|
return (0, _removeTemplate().default)(localResult, false) + this.paintArray(remoteResult);
|
|
164
131
|
}
|
|
165
|
-
|
|
166
132
|
paintArray(removedObjectsArray) {
|
|
167
133
|
return removedObjectsArray.map(item => (0, _removeTemplate().default)(item, true));
|
|
168
134
|
}
|
|
169
|
-
|
|
170
135
|
}
|
|
171
|
-
|
|
172
136
|
exports.RemoveCmd = RemoveCmd;
|
|
173
137
|
|
|
174
138
|
//# sourceMappingURL=remove-cmd.js.map
|
package/dist/remove-cmd.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["RemoveCmd","constructor","remove","name","description","COMPONENT_PATTERN_HELP","report","componentsPattern","soft","force","remote","fromLane","track","deleteFiles","silent","keepFiles","BitError","removedCompIds","softRemove","chalk","green","join","bold","loader","stop","console","warn","yellow","willDeleteFiles","removePromptResult","removePrompt","yn","shouldRemove","localResult","remoteResult","paintRemoved","paintArray","removedObjectsArray","map","item"],"sources":["remove-cmd.ts"],"sourcesContent":["import chalk from 'chalk';\nimport yn from 'yn';\nimport { Command, CommandOptions } from '@teambit/cli';\nimport { BitError } from '@teambit/bit-error';\nimport { removePrompt } from '@teambit/legacy/dist/prompts';\nimport RemovedObjects from '@teambit/legacy/dist/scope/removed-components';\nimport RemovedLocalObjects from '@teambit/legacy/dist/scope/removed-local-objects';\nimport loader from '@teambit/legacy/dist/cli/loader';\nimport paintRemoved from '@teambit/legacy/dist/cli/templates/remove-template';\nimport { COMPONENT_PATTERN_HELP } from '@teambit/legacy/dist/constants';\nimport { RemoveMain } from './remove.main.runtime';\n\nexport class RemoveCmd implements Command {\n name = 'remove <component-pattern>';\n description = 'remove component(s) from the workspace, or a remote scope';\n arguments = [\n {\n name: 'component-pattern',\n description: COMPONENT_PATTERN_HELP,\n },\n ];\n group = 'collaborate';\n helpUrl = 'components/removing-components';\n skipWorkspace = true;\n alias = 'rm';\n options = [\n ['', 'soft', 'EXPERIMENTAL. mark the component as deleted. after tag/snap and export the remote will be updated'],\n [\n 'r',\n 'remote',\n 'remove a component completely from a remote scope (Careful! this is a permanent change. prefer --soft and tag+export)',\n ],\n ['', 'from-lane', 'revert to main if exists on currently checked out lane, otherwise, remove it'],\n ['t', 'track', 'keep tracking component in .bitmap (default = false), helps transform a tagged-component to new'],\n ['d', 'delete-files', 'DEPRECATED (this is now the default). delete local component files'],\n ['', 'keep-files', 'keep component files (just untrack the component)'],\n [\n 'f',\n 'force',\n 'removes the component from the scope, even if used as a dependency. WARNING: components that depend on this component will corrupt',\n ],\n ['s', 'silent', 'skip confirmation'],\n ] as CommandOptions;\n loader = true;\n migration = true;\n remoteOp = true;\n\n constructor(private remove: RemoveMain) {}\n\n async report(\n [componentsPattern]: [string],\n {\n soft = false,\n force = false,\n remote = false,\n fromLane = false,\n track = false,\n deleteFiles = false,\n silent = false,\n keepFiles = false,\n }: {\n force: boolean;\n remote: boolean;\n track: boolean;\n fromLane: boolean;\n deleteFiles: boolean;\n silent: boolean;\n keepFiles: boolean;\n soft: boolean;\n }\n ) {\n if (soft) {\n if (remote)\n throw new BitError(\n `error: --remote and --soft cannot be used together. soft delete can only be done locally, after tag/snap and export it updates the remote`\n );\n if (track) throw new BitError(`error: please use either --soft or --track, not both`);\n if (keepFiles) throw new BitError(`error: please use either --soft or --keep-files, not both`);\n if (fromLane) throw new BitError(`error: please use either --soft or --from-lane, not both`);\n const removedCompIds = await this.remove.softRemove(componentsPattern);\n return `${chalk.green('successfully soft-removed the following components:')}\n${removedCompIds.join('\\n')}\n\n${chalk.bold('to update the remote, please tag/snap and then export')}`;\n }\n\n if (deleteFiles) {\n loader.stop();\n // eslint-disable-next-line no-console\n console.warn(\n chalk.yellow(\n '--delete-files flag is deprecated. by default the files are deleted, unless --keep-files was provided'\n )\n );\n }\n if (!silent) {\n const willDeleteFiles = !remote && !keepFiles;\n const removePromptResult = await removePrompt(willDeleteFiles, remote)();\n // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n if (!yn(removePromptResult.shouldRemove)) {\n throw new BitError('the operation has been canceled');\n }\n }\n const {\n localResult,\n remoteResult = [],\n }: {\n localResult: RemovedLocalObjects;\n remoteResult: RemovedObjects[];\n } = await this.remove.remove({ componentsPattern, remote, force, track, deleteFiles: !keepFiles, fromLane });\n // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n return paintRemoved(localResult, false) + this.paintArray(remoteResult);\n }\n paintArray(removedObjectsArray: RemovedObjects[]) {\n return removedObjectsArray.map((item) => paintRemoved(item, true));\n }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["RemoveCmd","constructor","remove","name","description","COMPONENT_PATTERN_HELP","report","componentsPattern","soft","force","remote","fromLane","track","deleteFiles","silent","keepFiles","BitError","removedCompIds","softRemove","chalk","green","join","bold","loader","stop","console","warn","yellow","willDeleteFiles","removePromptResult","removePrompt","yn","shouldRemove","localResult","remoteResult","paintRemoved","paintArray","removedObjectsArray","map","item"],"sources":["remove-cmd.ts"],"sourcesContent":["import chalk from 'chalk';\nimport yn from 'yn';\nimport { Command, CommandOptions } from '@teambit/cli';\nimport { BitError } from '@teambit/bit-error';\nimport { removePrompt } from '@teambit/legacy/dist/prompts';\nimport RemovedObjects from '@teambit/legacy/dist/scope/removed-components';\nimport RemovedLocalObjects from '@teambit/legacy/dist/scope/removed-local-objects';\nimport loader from '@teambit/legacy/dist/cli/loader';\nimport paintRemoved from '@teambit/legacy/dist/cli/templates/remove-template';\nimport { COMPONENT_PATTERN_HELP } from '@teambit/legacy/dist/constants';\nimport { RemoveMain } from './remove.main.runtime';\n\nexport class RemoveCmd implements Command {\n name = 'remove <component-pattern>';\n description = 'remove component(s) from the workspace, or a remote scope';\n arguments = [\n {\n name: 'component-pattern',\n description: COMPONENT_PATTERN_HELP,\n },\n ];\n group = 'collaborate';\n helpUrl = 'components/removing-components';\n skipWorkspace = true;\n alias = 'rm';\n options = [\n ['', 'soft', 'EXPERIMENTAL. mark the component as deleted. after tag/snap and export the remote will be updated'],\n [\n 'r',\n 'remote',\n 'remove a component completely from a remote scope (Careful! this is a permanent change. prefer --soft and tag+export)',\n ],\n ['', 'from-lane', 'revert to main if exists on currently checked out lane, otherwise, remove it'],\n ['t', 'track', 'keep tracking component in .bitmap (default = false), helps transform a tagged-component to new'],\n ['d', 'delete-files', 'DEPRECATED (this is now the default). delete local component files'],\n ['', 'keep-files', 'keep component files (just untrack the component)'],\n [\n 'f',\n 'force',\n 'removes the component from the scope, even if used as a dependency. WARNING: components that depend on this component will corrupt',\n ],\n ['s', 'silent', 'skip confirmation'],\n ] as CommandOptions;\n loader = true;\n migration = true;\n remoteOp = true;\n\n constructor(private remove: RemoveMain) {}\n\n async report(\n [componentsPattern]: [string],\n {\n soft = false,\n force = false,\n remote = false,\n fromLane = false,\n track = false,\n deleteFiles = false,\n silent = false,\n keepFiles = false,\n }: {\n force: boolean;\n remote: boolean;\n track: boolean;\n fromLane: boolean;\n deleteFiles: boolean;\n silent: boolean;\n keepFiles: boolean;\n soft: boolean;\n }\n ) {\n if (soft) {\n if (remote)\n throw new BitError(\n `error: --remote and --soft cannot be used together. soft delete can only be done locally, after tag/snap and export it updates the remote`\n );\n if (track) throw new BitError(`error: please use either --soft or --track, not both`);\n if (keepFiles) throw new BitError(`error: please use either --soft or --keep-files, not both`);\n if (fromLane) throw new BitError(`error: please use either --soft or --from-lane, not both`);\n const removedCompIds = await this.remove.softRemove(componentsPattern);\n return `${chalk.green('successfully soft-removed the following components:')}\n${removedCompIds.join('\\n')}\n\n${chalk.bold('to update the remote, please tag/snap and then export')}`;\n }\n\n if (deleteFiles) {\n loader.stop();\n // eslint-disable-next-line no-console\n console.warn(\n chalk.yellow(\n '--delete-files flag is deprecated. by default the files are deleted, unless --keep-files was provided'\n )\n );\n }\n if (!silent) {\n const willDeleteFiles = !remote && !keepFiles;\n const removePromptResult = await removePrompt(willDeleteFiles, remote)();\n // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n if (!yn(removePromptResult.shouldRemove)) {\n throw new BitError('the operation has been canceled');\n }\n }\n const {\n localResult,\n remoteResult = [],\n }: {\n localResult: RemovedLocalObjects;\n remoteResult: RemovedObjects[];\n } = await this.remove.remove({ componentsPattern, remote, force, track, deleteFiles: !keepFiles, fromLane });\n // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n return paintRemoved(localResult, false) + this.paintArray(remoteResult);\n }\n paintArray(removedObjectsArray: RemovedObjects[]) {\n return removedObjectsArray.map((item) => paintRemoved(item, true));\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAA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AEJ;IAAS,CAAC,CAAC;IAC5G;IACA,OAAO,IAAAwB,yBAAY,EAACF,WAAW,EAAE,KAAK,CAAC,GAAG,IAAI,CAACG,UAAU,CAACF,YAAY,CAAC;EACzE;EACAE,UAAU,CAACC,mBAAqC,EAAE;IAChD,OAAOA,mBAAmB,CAACC,GAAG,CAAEC,IAAI,IAAK,IAAAJ,yBAAY,EAACI,IAAI,EAAE,IAAI,CAAC,CAAC;EACpE;AACF;AAAC"}
|
package/dist/remove.aspect.js
CHANGED
|
@@ -4,21 +4,16 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.RemoveAspect = void 0;
|
|
7
|
-
|
|
8
7
|
function _harmony() {
|
|
9
8
|
const data = require("@teambit/harmony");
|
|
10
|
-
|
|
11
9
|
_harmony = function () {
|
|
12
10
|
return data;
|
|
13
11
|
};
|
|
14
|
-
|
|
15
12
|
return data;
|
|
16
13
|
}
|
|
17
|
-
|
|
18
14
|
const RemoveAspect = _harmony().Aspect.create({
|
|
19
15
|
id: 'teambit.component/remove'
|
|
20
16
|
});
|
|
21
|
-
|
|
22
17
|
exports.RemoveAspect = RemoveAspect;
|
|
23
18
|
|
|
24
19
|
//# sourceMappingURL=remove.aspect.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["RemoveAspect","Aspect","create","id"],"sources":["remove.aspect.ts"],"sourcesContent":["import { Aspect } from '@teambit/harmony';\n\nexport const RemoveAspect = Aspect.create({\n id: 'teambit.component/remove',\n});\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["RemoveAspect","Aspect","create","id"],"sources":["remove.aspect.ts"],"sourcesContent":["import { Aspect } from '@teambit/harmony';\n\nexport const RemoveAspect = Aspect.create({\n id: 'teambit.component/remove',\n});\n"],"mappings":";;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEO,MAAMA,YAAY,GAAGC,iBAAM,CAACC,MAAM,CAAC;EACxCC,EAAE,EAAE;AACN,CAAC,CAAC;AAAC"}
|
package/dist/remove.fragment.js
CHANGED
|
@@ -1,31 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
require("core-js/modules/es.promise.js");
|
|
6
|
-
|
|
7
5
|
Object.defineProperty(exports, "__esModule", {
|
|
8
6
|
value: true
|
|
9
7
|
});
|
|
10
8
|
exports.RemoveFragment = void 0;
|
|
11
|
-
|
|
12
9
|
function _defineProperty2() {
|
|
13
10
|
const data = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
14
|
-
|
|
15
11
|
_defineProperty2 = function () {
|
|
16
12
|
return data;
|
|
17
13
|
};
|
|
18
|
-
|
|
19
14
|
return data;
|
|
20
15
|
}
|
|
21
|
-
|
|
22
16
|
class RemoveFragment {
|
|
23
17
|
constructor(remove) {
|
|
24
18
|
this.remove = remove;
|
|
25
19
|
(0, _defineProperty2().default)(this, "title", 'removed');
|
|
26
20
|
(0, _defineProperty2().default)(this, "weight", 3);
|
|
27
21
|
}
|
|
28
|
-
|
|
29
22
|
async renderRow(component) {
|
|
30
23
|
const isRemoved = this.remove.isRemoved(component);
|
|
31
24
|
return {
|
|
@@ -34,16 +27,13 @@ class RemoveFragment {
|
|
|
34
27
|
content: isRemoved ? isRemoved.toString() : ''
|
|
35
28
|
};
|
|
36
29
|
}
|
|
37
|
-
|
|
38
30
|
async json(component) {
|
|
39
31
|
return {
|
|
40
32
|
title: this.title,
|
|
41
33
|
json: this.remove.getRemoveInfo(component)
|
|
42
34
|
};
|
|
43
35
|
}
|
|
44
|
-
|
|
45
36
|
}
|
|
46
|
-
|
|
47
37
|
exports.RemoveFragment = RemoveFragment;
|
|
48
38
|
|
|
49
39
|
//# sourceMappingURL=remove.fragment.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["RemoveFragment","constructor","remove","renderRow","component","isRemoved","title","content","toString","json","getRemoveInfo"],"sources":["remove.fragment.ts"],"sourcesContent":["import { Component, ShowFragment } from '@teambit/component';\nimport { RemoveMain } from './remove.main.runtime';\n\nexport class RemoveFragment implements ShowFragment {\n constructor(private remove: RemoveMain) {}\n\n title = 'removed';\n\n async renderRow(component: Component) {\n const isRemoved = this.remove.isRemoved(component);\n return {\n title: this.title,\n // when it's not removed, set as an empty string so then it won't be shown in bit-show\n content: isRemoved ? isRemoved.toString() : '',\n };\n }\n\n async json(component: Component) {\n return {\n title: this.title,\n json: this.remove.getRemoveInfo(component),\n };\n }\n\n weight = 3;\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["RemoveFragment","constructor","remove","renderRow","component","isRemoved","title","content","toString","json","getRemoveInfo"],"sources":["remove.fragment.ts"],"sourcesContent":["import { Component, ShowFragment } from '@teambit/component';\nimport { RemoveMain } from './remove.main.runtime';\n\nexport class RemoveFragment implements ShowFragment {\n constructor(private remove: RemoveMain) {}\n\n title = 'removed';\n\n async renderRow(component: Component) {\n const isRemoved = this.remove.isRemoved(component);\n return {\n title: this.title,\n // when it's not removed, set as an empty string so then it won't be shown in bit-show\n content: isRemoved ? isRemoved.toString() : '',\n };\n }\n\n async json(component: Component) {\n return {\n title: this.title,\n json: this.remove.getRemoveInfo(component),\n };\n }\n\n weight = 3;\n}\n"],"mappings":";;;;;;;;;;;;;;;AAGO,MAAMA,cAAc,CAAyB;EAClDC,WAAW,CAASC,MAAkB,EAAE;IAAA,KAApBA,MAAkB,GAAlBA,MAAkB;IAAA,+CAE9B,SAAS;IAAA,gDAkBR,CAAC;EApB+B;EAIzC,MAAMC,SAAS,CAACC,SAAoB,EAAE;IACpC,MAAMC,SAAS,GAAG,IAAI,CAACH,MAAM,CAACG,SAAS,CAACD,SAAS,CAAC;IAClD,OAAO;MACLE,KAAK,EAAE,IAAI,CAACA,KAAK;MACjB;MACAC,OAAO,EAAEF,SAAS,GAAGA,SAAS,CAACG,QAAQ,EAAE,GAAG;IAC9C,CAAC;EACH;EAEA,MAAMC,IAAI,CAACL,SAAoB,EAAE;IAC/B,OAAO;MACLE,KAAK,EAAE,IAAI,CAACA,KAAK;MACjBG,IAAI,EAAE,IAAI,CAACP,MAAM,CAACQ,aAAa,CAACN,SAAS;IAC3C,CAAC;EACH;AAGF;AAAC"}
|
|
@@ -1,194 +1,137 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
require("core-js/modules/es.array.iterator.js");
|
|
6
|
-
|
|
7
5
|
require("core-js/modules/es.promise.js");
|
|
8
|
-
|
|
9
6
|
Object.defineProperty(exports, "__esModule", {
|
|
10
7
|
value: true
|
|
11
8
|
});
|
|
12
9
|
exports.default = exports.RemoveMain = void 0;
|
|
13
|
-
|
|
14
10
|
function _defineProperty2() {
|
|
15
11
|
const data = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
16
|
-
|
|
17
12
|
_defineProperty2 = function () {
|
|
18
13
|
return data;
|
|
19
14
|
};
|
|
20
|
-
|
|
21
15
|
return data;
|
|
22
16
|
}
|
|
23
|
-
|
|
24
17
|
function _cli() {
|
|
25
18
|
const data = require("@teambit/cli");
|
|
26
|
-
|
|
27
19
|
_cli = function () {
|
|
28
20
|
return data;
|
|
29
21
|
};
|
|
30
|
-
|
|
31
22
|
return data;
|
|
32
23
|
}
|
|
33
|
-
|
|
34
24
|
function _logger() {
|
|
35
25
|
const data = require("@teambit/logger");
|
|
36
|
-
|
|
37
26
|
_logger = function () {
|
|
38
27
|
return data;
|
|
39
28
|
};
|
|
40
|
-
|
|
41
29
|
return data;
|
|
42
30
|
}
|
|
43
|
-
|
|
44
31
|
function _workspace() {
|
|
45
32
|
const data = _interopRequireDefault(require("@teambit/workspace"));
|
|
46
|
-
|
|
47
33
|
_workspace = function () {
|
|
48
34
|
return data;
|
|
49
35
|
};
|
|
50
|
-
|
|
51
36
|
return data;
|
|
52
37
|
}
|
|
53
|
-
|
|
54
38
|
function _legacyBitId() {
|
|
55
39
|
const data = require("@teambit/legacy-bit-id");
|
|
56
|
-
|
|
57
40
|
_legacyBitId = function () {
|
|
58
41
|
return data;
|
|
59
42
|
};
|
|
60
|
-
|
|
61
43
|
return data;
|
|
62
44
|
}
|
|
63
|
-
|
|
64
45
|
function _bitId() {
|
|
65
46
|
const data = require("@teambit/legacy/dist/bit-id");
|
|
66
|
-
|
|
67
47
|
_bitId = function () {
|
|
68
48
|
return data;
|
|
69
49
|
};
|
|
70
|
-
|
|
71
50
|
return data;
|
|
72
51
|
}
|
|
73
|
-
|
|
74
52
|
function _removeComponents() {
|
|
75
53
|
const data = _interopRequireDefault(require("@teambit/legacy/dist/consumer/component-ops/remove-components"));
|
|
76
|
-
|
|
77
54
|
_removeComponents = function () {
|
|
78
55
|
return data;
|
|
79
56
|
};
|
|
80
|
-
|
|
81
57
|
return data;
|
|
82
58
|
}
|
|
83
|
-
|
|
84
59
|
function _exceptions() {
|
|
85
60
|
const data = require("@teambit/legacy/dist/consumer/exceptions");
|
|
86
|
-
|
|
87
61
|
_exceptions = function () {
|
|
88
62
|
return data;
|
|
89
63
|
};
|
|
90
|
-
|
|
91
64
|
return data;
|
|
92
65
|
}
|
|
93
|
-
|
|
94
66
|
function _hasWildcard() {
|
|
95
67
|
const data = _interopRequireDefault(require("@teambit/legacy/dist/utils/string/has-wildcard"));
|
|
96
|
-
|
|
97
68
|
_hasWildcard = function () {
|
|
98
69
|
return data;
|
|
99
70
|
};
|
|
100
|
-
|
|
101
71
|
return data;
|
|
102
72
|
}
|
|
103
|
-
|
|
104
73
|
function _listScope() {
|
|
105
74
|
const data = require("@teambit/legacy/dist/api/consumer/lib/list-scope");
|
|
106
|
-
|
|
107
75
|
_listScope = function () {
|
|
108
76
|
return data;
|
|
109
77
|
};
|
|
110
|
-
|
|
111
78
|
return data;
|
|
112
79
|
}
|
|
113
|
-
|
|
114
80
|
function _bitError() {
|
|
115
81
|
const data = require("@teambit/bit-error");
|
|
116
|
-
|
|
117
82
|
_bitError = function () {
|
|
118
83
|
return data;
|
|
119
84
|
};
|
|
120
|
-
|
|
121
85
|
return data;
|
|
122
86
|
}
|
|
123
|
-
|
|
124
87
|
function _deleteComponentFiles() {
|
|
125
88
|
const data = _interopRequireDefault(require("@teambit/legacy/dist/consumer/component-ops/delete-component-files"));
|
|
126
|
-
|
|
127
89
|
_deleteComponentFiles = function () {
|
|
128
90
|
return data;
|
|
129
91
|
};
|
|
130
|
-
|
|
131
92
|
return data;
|
|
132
93
|
}
|
|
133
|
-
|
|
134
94
|
function _component() {
|
|
135
95
|
const data = _interopRequireDefault(require("@teambit/component"));
|
|
136
|
-
|
|
137
96
|
_component = function () {
|
|
138
97
|
return data;
|
|
139
98
|
};
|
|
140
|
-
|
|
141
99
|
return data;
|
|
142
100
|
}
|
|
143
|
-
|
|
144
101
|
function _packageJsonUtils() {
|
|
145
102
|
const data = require("@teambit/legacy/dist/consumer/component/package-json-utils");
|
|
146
|
-
|
|
147
103
|
_packageJsonUtils = function () {
|
|
148
104
|
return data;
|
|
149
105
|
};
|
|
150
|
-
|
|
151
106
|
return data;
|
|
152
107
|
}
|
|
153
|
-
|
|
154
108
|
function _removeCmd() {
|
|
155
109
|
const data = require("./remove-cmd");
|
|
156
|
-
|
|
157
110
|
_removeCmd = function () {
|
|
158
111
|
return data;
|
|
159
112
|
};
|
|
160
|
-
|
|
161
113
|
return data;
|
|
162
114
|
}
|
|
163
|
-
|
|
164
115
|
function _remove() {
|
|
165
116
|
const data = require("./remove.aspect");
|
|
166
|
-
|
|
167
117
|
_remove = function () {
|
|
168
118
|
return data;
|
|
169
119
|
};
|
|
170
|
-
|
|
171
120
|
return data;
|
|
172
121
|
}
|
|
173
|
-
|
|
174
122
|
function _remove2() {
|
|
175
123
|
const data = require("./remove.fragment");
|
|
176
|
-
|
|
177
124
|
_remove2 = function () {
|
|
178
125
|
return data;
|
|
179
126
|
};
|
|
180
|
-
|
|
181
127
|
return data;
|
|
182
128
|
}
|
|
183
|
-
|
|
184
129
|
const BEFORE_REMOVE = 'removing components';
|
|
185
|
-
|
|
186
130
|
class RemoveMain {
|
|
187
131
|
constructor(workspace, logger) {
|
|
188
132
|
this.workspace = workspace;
|
|
189
133
|
this.logger = logger;
|
|
190
134
|
}
|
|
191
|
-
|
|
192
135
|
async remove({
|
|
193
136
|
componentsPattern,
|
|
194
137
|
force,
|
|
@@ -198,11 +141,9 @@ class RemoveMain {
|
|
|
198
141
|
fromLane
|
|
199
142
|
}) {
|
|
200
143
|
var _this$workspace;
|
|
201
|
-
|
|
202
144
|
this.logger.setStatusLine(BEFORE_REMOVE);
|
|
203
145
|
const bitIds = remote ? await this.getRemoteBitIdsToRemove(componentsPattern) : await this.getLocalBitIdsToRemove(componentsPattern);
|
|
204
146
|
this.logger.setStatusLine(BEFORE_REMOVE); // again because the loader might changed when talking to the remote
|
|
205
|
-
|
|
206
147
|
const consumer = (_this$workspace = this.workspace) === null || _this$workspace === void 0 ? void 0 : _this$workspace.consumer;
|
|
207
148
|
const removeResults = await (0, _removeComponents().default)({
|
|
208
149
|
consumer,
|
|
@@ -216,71 +157,57 @@ class RemoveMain {
|
|
|
216
157
|
if (consumer) await consumer.onDestroy();
|
|
217
158
|
return removeResults;
|
|
218
159
|
}
|
|
219
|
-
|
|
220
160
|
async softRemove(componentsPattern) {
|
|
221
161
|
if (!this.workspace) throw new (_exceptions().ConsumerNotFound)();
|
|
222
162
|
const componentIds = await this.workspace.idsByPattern(componentsPattern);
|
|
223
163
|
const components = await this.workspace.getMany(componentIds);
|
|
224
164
|
const newComps = components.filter(c => !c.id.hasVersion());
|
|
225
|
-
|
|
226
165
|
if (newComps.length) {
|
|
227
166
|
throw new (_bitError().BitError)(`unable to soft-remove the following new component(s), please remove them without --soft\n${newComps.map(c => c.id.toString()).join('\n')}`);
|
|
228
167
|
}
|
|
229
|
-
|
|
230
|
-
|
|
168
|
+
await (0, _packageJsonUtils().removeComponentsFromNodeModules)(this.workspace.consumer, components.map(c => c.state._consumer));
|
|
169
|
+
// don't use `this.workspace.addSpecificComponentConfig`, if the component has component.json it will be deleted
|
|
231
170
|
// during this removal along with the entire component dir.
|
|
232
|
-
|
|
233
171
|
componentIds.map(compId => this.workspace.bitMap.addComponentConfig(compId, _remove().RemoveAspect.id, {
|
|
234
172
|
removed: true
|
|
235
173
|
}));
|
|
236
174
|
await this.workspace.bitMap.write();
|
|
237
|
-
|
|
238
175
|
const bitIds = _bitId().BitIds.fromArray(componentIds.map(id => id._legacy));
|
|
239
|
-
|
|
240
176
|
await (0, _deleteComponentFiles().default)(this.workspace.consumer, bitIds);
|
|
241
177
|
return componentIds;
|
|
242
178
|
}
|
|
243
|
-
|
|
244
179
|
getRemoveInfo(component) {
|
|
245
180
|
var _component$config$ext;
|
|
246
|
-
|
|
247
181
|
const data = (_component$config$ext = component.config.extensions.findExtension(_remove().RemoveAspect.id)) === null || _component$config$ext === void 0 ? void 0 : _component$config$ext.config;
|
|
248
182
|
return {
|
|
249
183
|
removed: (data === null || data === void 0 ? void 0 : data.removed) || false
|
|
250
184
|
};
|
|
251
185
|
}
|
|
252
|
-
|
|
253
186
|
isRemoved(component) {
|
|
254
187
|
return this.getRemoveInfo(component).removed;
|
|
255
188
|
}
|
|
189
|
+
|
|
256
190
|
/**
|
|
257
191
|
* get components that were soft-removed and tagged/snapped but not exported yet.
|
|
258
192
|
*/
|
|
259
|
-
|
|
260
|
-
|
|
261
193
|
async getRemovedStaged() {
|
|
262
194
|
const stagedConfig = await this.workspace.scope.getStagedConfig();
|
|
263
195
|
return stagedConfig.getAll().filter(compConfig => {
|
|
264
196
|
var _compConfig$config, _compConfig$config$Re;
|
|
265
|
-
|
|
266
197
|
return (_compConfig$config = compConfig.config) === null || _compConfig$config === void 0 ? void 0 : (_compConfig$config$Re = _compConfig$config[_remove().RemoveAspect.id]) === null || _compConfig$config$Re === void 0 ? void 0 : _compConfig$config$Re.removed;
|
|
267
198
|
}).map(compConfig => compConfig.id);
|
|
268
199
|
}
|
|
269
|
-
|
|
270
200
|
async getLocalBitIdsToRemove(componentsPattern) {
|
|
271
201
|
if (!this.workspace) throw new (_exceptions().ConsumerNotFound)();
|
|
272
202
|
const componentIds = await this.workspace.idsByPattern(componentsPattern);
|
|
273
203
|
return componentIds.map(id => id._legacy);
|
|
274
204
|
}
|
|
275
|
-
|
|
276
205
|
async getRemoteBitIdsToRemove(componentsPattern) {
|
|
277
206
|
if ((0, _hasWildcard().default)(componentsPattern)) {
|
|
278
207
|
return (0, _listScope().getRemoteBitIdsByWildcards)(componentsPattern);
|
|
279
208
|
}
|
|
280
|
-
|
|
281
209
|
return [_legacyBitId().BitId.parse(componentsPattern, true)];
|
|
282
210
|
}
|
|
283
|
-
|
|
284
211
|
static async provider([workspace, cli, loggerMain, componentAspect]) {
|
|
285
212
|
const logger = loggerMain.createLogger(_remove().RemoveAspect.id);
|
|
286
213
|
const removeMain = new RemoveMain(workspace, logger);
|
|
@@ -288,16 +215,12 @@ class RemoveMain {
|
|
|
288
215
|
cli.register(new (_removeCmd().RemoveCmd)(removeMain));
|
|
289
216
|
return new RemoveMain(workspace, logger);
|
|
290
217
|
}
|
|
291
|
-
|
|
292
218
|
}
|
|
293
|
-
|
|
294
219
|
exports.RemoveMain = RemoveMain;
|
|
295
220
|
(0, _defineProperty2().default)(RemoveMain, "slots", []);
|
|
296
221
|
(0, _defineProperty2().default)(RemoveMain, "dependencies", [_workspace().default, _cli().CLIAspect, _logger().LoggerAspect, _component().default]);
|
|
297
222
|
(0, _defineProperty2().default)(RemoveMain, "runtime", _cli().MainRuntime);
|
|
298
|
-
|
|
299
223
|
_remove().RemoveAspect.addRuntime(RemoveMain);
|
|
300
|
-
|
|
301
224
|
var _default = RemoveMain;
|
|
302
225
|
exports.default = _default;
|
|
303
226
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["BEFORE_REMOVE","RemoveMain","constructor","workspace","logger","remove","componentsPattern","force","remote","track","deleteFiles","fromLane","setStatusLine","bitIds","getRemoteBitIdsToRemove","getLocalBitIdsToRemove","consumer","removeResults","removeComponents","ids","BitIds","fromArray","onDestroy","softRemove","ConsumerNotFound","componentIds","idsByPattern","components","getMany","newComps","filter","c","id","hasVersion","length","BitError","map","toString","join","removeComponentsFromNodeModules","state","_consumer","compId","bitMap","addComponentConfig","RemoveAspect","removed","write","_legacy","deleteComponentsFiles","getRemoveInfo","component","data","config","extensions","findExtension","isRemoved","getRemovedStaged","stagedConfig","scope","getStagedConfig","getAll","compConfig","hasWildcard","getRemoteBitIdsByWildcards","BitId","parse","provider","cli","loggerMain","componentAspect","createLogger","removeMain","registerShowFragments","RemoveFragment","register","RemoveCmd","WorkspaceAspect","CLIAspect","LoggerAspect","ComponentAspect","MainRuntime","addRuntime"],"sources":["remove.main.runtime.ts"],"sourcesContent":["import { CLIAspect, CLIMain, MainRuntime } from '@teambit/cli';\nimport { Logger, LoggerAspect, LoggerMain } from '@teambit/logger';\nimport WorkspaceAspect, { Workspace } from '@teambit/workspace';\nimport { BitId } from '@teambit/legacy-bit-id';\nimport { BitIds } from '@teambit/legacy/dist/bit-id';\nimport removeComponents from '@teambit/legacy/dist/consumer/component-ops/remove-components';\nimport { ConsumerNotFound } from '@teambit/legacy/dist/consumer/exceptions';\nimport hasWildcard from '@teambit/legacy/dist/utils/string/has-wildcard';\nimport { getRemoteBitIdsByWildcards } from '@teambit/legacy/dist/api/consumer/lib/list-scope';\nimport { ComponentID } from '@teambit/component-id';\nimport { BitError } from '@teambit/bit-error';\nimport deleteComponentsFiles from '@teambit/legacy/dist/consumer/component-ops/delete-component-files';\nimport ComponentAspect, { Component, ComponentMain } from '@teambit/component';\nimport { removeComponentsFromNodeModules } from '@teambit/legacy/dist/consumer/component/package-json-utils';\nimport { RemoveCmd } from './remove-cmd';\nimport { RemoveAspect } from './remove.aspect';\nimport { RemoveFragment } from './remove.fragment';\n\nconst BEFORE_REMOVE = 'removing components';\n\nexport type RemoveInfo = {\n removed: boolean;\n};\n\nexport class RemoveMain {\n constructor(private workspace: Workspace, private logger: Logger) {}\n\n async remove({\n componentsPattern,\n force,\n remote,\n track,\n deleteFiles,\n fromLane,\n }: {\n componentsPattern: string;\n force: boolean;\n remote: boolean;\n track: boolean;\n deleteFiles: boolean;\n fromLane: boolean;\n }): Promise<any> {\n this.logger.setStatusLine(BEFORE_REMOVE);\n const bitIds = remote\n ? await this.getRemoteBitIdsToRemove(componentsPattern)\n : await this.getLocalBitIdsToRemove(componentsPattern);\n this.logger.setStatusLine(BEFORE_REMOVE); // again because the loader might changed when talking to the remote\n const consumer = this.workspace?.consumer;\n const removeResults = await removeComponents({\n consumer,\n ids: BitIds.fromArray(bitIds),\n force,\n remote,\n track,\n deleteFiles,\n fromLane,\n });\n if (consumer) await consumer.onDestroy();\n return removeResults;\n }\n\n async softRemove(componentsPattern: string): Promise<ComponentID[]> {\n if (!this.workspace) throw new ConsumerNotFound();\n const componentIds = await this.workspace.idsByPattern(componentsPattern);\n const components = await this.workspace.getMany(componentIds);\n const newComps = components.filter((c) => !c.id.hasVersion());\n if (newComps.length) {\n throw new BitError(\n `unable to soft-remove the following new component(s), please remove them without --soft\\n${newComps\n .map((c) => c.id.toString())\n .join('\\n')}`\n );\n }\n await removeComponentsFromNodeModules(\n this.workspace.consumer,\n components.map((c) => c.state._consumer)\n );\n // don't use `this.workspace.addSpecificComponentConfig`, if the component has component.json it will be deleted\n // during this removal along with the entire component dir.\n componentIds.map((compId) =>\n this.workspace.bitMap.addComponentConfig(compId, RemoveAspect.id, {\n removed: true,\n })\n );\n await this.workspace.bitMap.write();\n const bitIds = BitIds.fromArray(componentIds.map((id) => id._legacy));\n await deleteComponentsFiles(this.workspace.consumer, bitIds);\n\n return componentIds;\n }\n\n getRemoveInfo(component: Component): RemoveInfo {\n const data = component.config.extensions.findExtension(RemoveAspect.id)?.config as RemoveInfo | undefined;\n return {\n removed: data?.removed || false,\n };\n }\n\n isRemoved(component: Component): boolean {\n return this.getRemoveInfo(component).removed;\n }\n\n /**\n * get components that were soft-removed and tagged/snapped but not exported yet.\n */\n async getRemovedStaged(): Promise<ComponentID[]> {\n const stagedConfig = await this.workspace.scope.getStagedConfig();\n return stagedConfig\n .getAll()\n .filter((compConfig) => compConfig.config?.[RemoveAspect.id]?.removed)\n .map((compConfig) => compConfig.id);\n }\n\n private async getLocalBitIdsToRemove(componentsPattern: string): Promise<BitId[]> {\n if (!this.workspace) throw new ConsumerNotFound();\n const componentIds = await this.workspace.idsByPattern(componentsPattern);\n return componentIds.map((id) => id._legacy);\n }\n\n private async getRemoteBitIdsToRemove(componentsPattern: string): Promise<BitId[]> {\n if (hasWildcard(componentsPattern)) {\n return getRemoteBitIdsByWildcards(componentsPattern);\n }\n return [BitId.parse(componentsPattern, true)];\n }\n\n static slots = [];\n static dependencies = [WorkspaceAspect, CLIAspect, LoggerAspect, ComponentAspect];\n static runtime = MainRuntime;\n\n static async provider([workspace, cli, loggerMain, componentAspect]: [\n Workspace,\n CLIMain,\n LoggerMain,\n ComponentMain\n ]) {\n const logger = loggerMain.createLogger(RemoveAspect.id);\n const removeMain = new RemoveMain(workspace, logger);\n componentAspect.registerShowFragments([new RemoveFragment(removeMain)]);\n cli.register(new RemoveCmd(removeMain));\n return new RemoveMain(workspace, logger);\n }\n}\n\nRemoveAspect.addRuntime(RemoveMain);\n\nexport default RemoveMain;\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;;AACA;EAAA;;EA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,IAAAyD,sBAAA,EAAYzD,iBAAZ,CAAJ,EAAoC;MAClC,OAAO,IAAA0D,uCAAA,EAA2B1D,iBAA3B,CAAP;IACD;;IACD,OAAO,CAAC2D,oBAAA,CAAMC,KAAN,CAAY5D,iBAAZ,EAA+B,IAA/B,CAAD,CAAP;EACD;;EAMoB,aAAR6D,QAAQ,CAAC,CAAChE,SAAD,EAAYiE,GAAZ,EAAiBC,UAAjB,EAA6BC,eAA7B,CAAD,EAKlB;IACD,MAAMlE,MAAM,GAAGiE,UAAU,CAACE,YAAX,CAAwB1B,sBAAA,CAAab,EAArC,CAAf;IACA,MAAMwC,UAAU,GAAG,IAAIvE,UAAJ,CAAeE,SAAf,EAA0BC,MAA1B,CAAnB;IACAkE,eAAe,CAACG,qBAAhB,CAAsC,CAAC,KAAIC,yBAAJ,EAAmBF,UAAnB,CAAD,CAAtC;IACAJ,GAAG,CAACO,QAAJ,CAAa,KAAIC,sBAAJ,EAAcJ,UAAd,CAAb;IACA,OAAO,IAAIvE,UAAJ,CAAeE,SAAf,EAA0BC,MAA1B,CAAP;EACD;;AArHqB;;;gCAAXH,U,WAsGI,E;gCAtGJA,U,kBAuGW,CAAC4E,oBAAD,EAAkBC,gBAAlB,EAA6BC,sBAA7B,EAA2CC,oBAA3C,C;gCAvGX/E,U,aAwGMgF,kB;;AAgBnBpC,sBAAA,CAAaqC,UAAb,CAAwBjF,UAAxB;;eAEeA,U"}
|
|
1
|
+
{"version":3,"names":["BEFORE_REMOVE","RemoveMain","constructor","workspace","logger","remove","componentsPattern","force","remote","track","deleteFiles","fromLane","setStatusLine","bitIds","getRemoteBitIdsToRemove","getLocalBitIdsToRemove","consumer","removeResults","removeComponents","ids","BitIds","fromArray","onDestroy","softRemove","ConsumerNotFound","componentIds","idsByPattern","components","getMany","newComps","filter","c","id","hasVersion","length","BitError","map","toString","join","removeComponentsFromNodeModules","state","_consumer","compId","bitMap","addComponentConfig","RemoveAspect","removed","write","_legacy","deleteComponentsFiles","getRemoveInfo","component","data","config","extensions","findExtension","isRemoved","getRemovedStaged","stagedConfig","scope","getStagedConfig","getAll","compConfig","hasWildcard","getRemoteBitIdsByWildcards","BitId","parse","provider","cli","loggerMain","componentAspect","createLogger","removeMain","registerShowFragments","RemoveFragment","register","RemoveCmd","WorkspaceAspect","CLIAspect","LoggerAspect","ComponentAspect","MainRuntime","addRuntime"],"sources":["remove.main.runtime.ts"],"sourcesContent":["import { CLIAspect, CLIMain, MainRuntime } from '@teambit/cli';\nimport { Logger, LoggerAspect, LoggerMain } from '@teambit/logger';\nimport WorkspaceAspect, { Workspace } from '@teambit/workspace';\nimport { BitId } from '@teambit/legacy-bit-id';\nimport { BitIds } from '@teambit/legacy/dist/bit-id';\nimport removeComponents from '@teambit/legacy/dist/consumer/component-ops/remove-components';\nimport { ConsumerNotFound } from '@teambit/legacy/dist/consumer/exceptions';\nimport hasWildcard from '@teambit/legacy/dist/utils/string/has-wildcard';\nimport { getRemoteBitIdsByWildcards } from '@teambit/legacy/dist/api/consumer/lib/list-scope';\nimport { ComponentID } from '@teambit/component-id';\nimport { BitError } from '@teambit/bit-error';\nimport deleteComponentsFiles from '@teambit/legacy/dist/consumer/component-ops/delete-component-files';\nimport ComponentAspect, { Component, ComponentMain } from '@teambit/component';\nimport { removeComponentsFromNodeModules } from '@teambit/legacy/dist/consumer/component/package-json-utils';\nimport { RemoveCmd } from './remove-cmd';\nimport { RemoveAspect } from './remove.aspect';\nimport { RemoveFragment } from './remove.fragment';\n\nconst BEFORE_REMOVE = 'removing components';\n\nexport type RemoveInfo = {\n removed: boolean;\n};\n\nexport class RemoveMain {\n constructor(private workspace: Workspace, private logger: Logger) {}\n\n async remove({\n componentsPattern,\n force,\n remote,\n track,\n deleteFiles,\n fromLane,\n }: {\n componentsPattern: string;\n force: boolean;\n remote: boolean;\n track: boolean;\n deleteFiles: boolean;\n fromLane: boolean;\n }): Promise<any> {\n this.logger.setStatusLine(BEFORE_REMOVE);\n const bitIds = remote\n ? await this.getRemoteBitIdsToRemove(componentsPattern)\n : await this.getLocalBitIdsToRemove(componentsPattern);\n this.logger.setStatusLine(BEFORE_REMOVE); // again because the loader might changed when talking to the remote\n const consumer = this.workspace?.consumer;\n const removeResults = await removeComponents({\n consumer,\n ids: BitIds.fromArray(bitIds),\n force,\n remote,\n track,\n deleteFiles,\n fromLane,\n });\n if (consumer) await consumer.onDestroy();\n return removeResults;\n }\n\n async softRemove(componentsPattern: string): Promise<ComponentID[]> {\n if (!this.workspace) throw new ConsumerNotFound();\n const componentIds = await this.workspace.idsByPattern(componentsPattern);\n const components = await this.workspace.getMany(componentIds);\n const newComps = components.filter((c) => !c.id.hasVersion());\n if (newComps.length) {\n throw new BitError(\n `unable to soft-remove the following new component(s), please remove them without --soft\\n${newComps\n .map((c) => c.id.toString())\n .join('\\n')}`\n );\n }\n await removeComponentsFromNodeModules(\n this.workspace.consumer,\n components.map((c) => c.state._consumer)\n );\n // don't use `this.workspace.addSpecificComponentConfig`, if the component has component.json it will be deleted\n // during this removal along with the entire component dir.\n componentIds.map((compId) =>\n this.workspace.bitMap.addComponentConfig(compId, RemoveAspect.id, {\n removed: true,\n })\n );\n await this.workspace.bitMap.write();\n const bitIds = BitIds.fromArray(componentIds.map((id) => id._legacy));\n await deleteComponentsFiles(this.workspace.consumer, bitIds);\n\n return componentIds;\n }\n\n getRemoveInfo(component: Component): RemoveInfo {\n const data = component.config.extensions.findExtension(RemoveAspect.id)?.config as RemoveInfo | undefined;\n return {\n removed: data?.removed || false,\n };\n }\n\n isRemoved(component: Component): boolean {\n return this.getRemoveInfo(component).removed;\n }\n\n /**\n * get components that were soft-removed and tagged/snapped but not exported yet.\n */\n async getRemovedStaged(): Promise<ComponentID[]> {\n const stagedConfig = await this.workspace.scope.getStagedConfig();\n return stagedConfig\n .getAll()\n .filter((compConfig) => compConfig.config?.[RemoveAspect.id]?.removed)\n .map((compConfig) => compConfig.id);\n }\n\n private async getLocalBitIdsToRemove(componentsPattern: string): Promise<BitId[]> {\n if (!this.workspace) throw new ConsumerNotFound();\n const componentIds = await this.workspace.idsByPattern(componentsPattern);\n return componentIds.map((id) => id._legacy);\n }\n\n private async getRemoteBitIdsToRemove(componentsPattern: string): Promise<BitId[]> {\n if (hasWildcard(componentsPattern)) {\n return getRemoteBitIdsByWildcards(componentsPattern);\n }\n return [BitId.parse(componentsPattern, true)];\n }\n\n static slots = [];\n static dependencies = [WorkspaceAspect, CLIAspect, LoggerAspect, ComponentAspect];\n static runtime = MainRuntime;\n\n static async provider([workspace, cli, loggerMain, componentAspect]: [\n Workspace,\n CLIMain,\n LoggerMain,\n ComponentMain\n ]) {\n const logger = loggerMain.createLogger(RemoveAspect.id);\n const removeMain = new RemoveMain(workspace, logger);\n componentAspect.registerShowFragments([new RemoveFragment(removeMain)]);\n cli.register(new RemoveCmd(removeMain));\n return new RemoveMain(workspace, logger);\n }\n}\n\nRemoveAspect.addRuntime(RemoveMain);\n\nexport default RemoveMain;\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;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA;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;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,UAAU,CAACE,SAAS,EAAEC,MAAM,CAAC;IACpDkE,eAAe,CAACG,qBAAqB,CAAC,CAAC,KAAIC,yBAAc,EAACF,UAAU,CAAC,CAAC,CAAC;IACvEJ,GAAG,CAACO,QAAQ,CAAC,KAAIC,sBAAS,EAACJ,UAAU,CAAC,CAAC;IACvC,OAAO,IAAIvE,UAAU,CAACE,SAAS,EAAEC,MAAM,CAAC;EAC1C;AACF;AAAC;AAAA,gCAtHYH,UAAU,WAsGN,EAAE;AAAA,gCAtGNA,UAAU,kBAuGC,CAAC4E,oBAAe,EAAEC,gBAAS,EAAEC,sBAAY,EAAEC,oBAAe,CAAC;AAAA,gCAvGtE/E,UAAU,aAwGJgF,kBAAW;AAgB9BpC,sBAAY,CAACqC,UAAU,CAACjF,UAAU,CAAC;AAAC,eAErBA,UAAU;AAAA"}
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/remove",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.59",
|
|
4
4
|
"homepage": "https://bit.dev/teambit/component/remove",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.component",
|
|
8
8
|
"name": "remove",
|
|
9
|
-
"version": "0.0.
|
|
9
|
+
"version": "0.0.59"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"chalk": "2.4.2",
|
|
@@ -15,12 +15,12 @@
|
|
|
15
15
|
"core-js": "^3.0.0",
|
|
16
16
|
"@teambit/harmony": "0.3.3",
|
|
17
17
|
"@teambit/bit-error": "0.0.400",
|
|
18
|
-
"@teambit/cli": "0.0.
|
|
19
|
-
"@teambit/component": "0.0.
|
|
18
|
+
"@teambit/cli": "0.0.591",
|
|
19
|
+
"@teambit/component": "0.0.882",
|
|
20
20
|
"@teambit/component-id": "0.0.418",
|
|
21
21
|
"@teambit/legacy-bit-id": "0.0.414",
|
|
22
|
-
"@teambit/logger": "0.0.
|
|
23
|
-
"@teambit/workspace": "0.0.
|
|
22
|
+
"@teambit/logger": "0.0.684",
|
|
23
|
+
"@teambit/workspace": "0.0.882"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@types/mocha": "9.1.0",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"@types/node": "12.20.4"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
|
-
"@teambit/legacy": "1.0.
|
|
34
|
+
"@teambit/legacy": "1.0.374",
|
|
35
35
|
"react-dom": "^16.8.0 || ^17.0.0",
|
|
36
36
|
"react": "^16.8.0 || ^17.0.0"
|
|
37
37
|
},
|
|
File without changes
|
|
Binary file
|