@teambit/remove 0.0.1
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.d.ts +4 -0
- package/dist/index.js +28 -0
- package/dist/index.js.map +1 -0
- package/dist/remove-cmd.d.ts +30 -0
- package/dist/remove-cmd.js +159 -0
- package/dist/remove-cmd.js.map +1 -0
- package/dist/remove.aspect.d.ts +2 -0
- package/dist/remove.aspect.js +24 -0
- package/dist/remove.aspect.js.map +1 -0
- package/dist/remove.main.runtime.d.ts +22 -0
- package/dist/remove.main.runtime.js +201 -0
- package/dist/remove.main.runtime.js.map +1 -0
- package/package-tar/teambit-remove-0.0.1.tgz +0 -0
- package/package.json +57 -0
- package/preview-1661225521544.js +5 -0
- package/tsconfig.json +40 -0
- package/types/asset.d.ts +29 -0
- package/types/style.d.ts +42 -0
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "RemoveAspect", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _remove().RemoveAspect;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
exports.default = void 0;
|
|
13
|
+
|
|
14
|
+
function _remove() {
|
|
15
|
+
const data = require("./remove.aspect");
|
|
16
|
+
|
|
17
|
+
_remove = function () {
|
|
18
|
+
return data;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
return data;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
var _default = _remove().RemoveAspect;
|
|
25
|
+
|
|
26
|
+
exports.default = _default;
|
|
27
|
+
|
|
28
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +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":";;;;;;;;;;;;;AAAA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;eAGeA,sB"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Command, CommandOptions } from '@teambit/cli';
|
|
2
|
+
import RemovedObjects from '@teambit/legacy/dist/scope/removed-components';
|
|
3
|
+
import { RemoveMain } from './remove.main.runtime';
|
|
4
|
+
export declare class RemoveCmd implements Command {
|
|
5
|
+
private remove;
|
|
6
|
+
name: string;
|
|
7
|
+
description: string;
|
|
8
|
+
arguments: {
|
|
9
|
+
name: string;
|
|
10
|
+
description: string;
|
|
11
|
+
}[];
|
|
12
|
+
group: string;
|
|
13
|
+
helpUrl: string;
|
|
14
|
+
skipWorkspace: boolean;
|
|
15
|
+
alias: string;
|
|
16
|
+
options: CommandOptions;
|
|
17
|
+
loader: boolean;
|
|
18
|
+
migration: boolean;
|
|
19
|
+
remoteOp: boolean;
|
|
20
|
+
constructor(remove: RemoveMain);
|
|
21
|
+
report([componentsPattern]: [string], { force, remote, track, deleteFiles, silent, keepFiles, }: {
|
|
22
|
+
force: boolean;
|
|
23
|
+
remote: boolean;
|
|
24
|
+
track: boolean;
|
|
25
|
+
deleteFiles: boolean;
|
|
26
|
+
silent: boolean;
|
|
27
|
+
keepFiles: boolean;
|
|
28
|
+
}): Promise<string>;
|
|
29
|
+
paintArray(removedObjectsArray: RemovedObjects[]): string[];
|
|
30
|
+
}
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
require("core-js/modules/es.array.iterator.js");
|
|
6
|
+
|
|
7
|
+
require("core-js/modules/es.promise.js");
|
|
8
|
+
|
|
9
|
+
Object.defineProperty(exports, "__esModule", {
|
|
10
|
+
value: true
|
|
11
|
+
});
|
|
12
|
+
exports.RemoveCmd = void 0;
|
|
13
|
+
|
|
14
|
+
function _defineProperty2() {
|
|
15
|
+
const data = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
16
|
+
|
|
17
|
+
_defineProperty2 = function () {
|
|
18
|
+
return data;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
return data;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
function _chalk() {
|
|
25
|
+
const data = _interopRequireDefault(require("chalk"));
|
|
26
|
+
|
|
27
|
+
_chalk = function () {
|
|
28
|
+
return data;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
return data;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function _yn() {
|
|
35
|
+
const data = _interopRequireDefault(require("yn"));
|
|
36
|
+
|
|
37
|
+
_yn = function () {
|
|
38
|
+
return data;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
return data;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function _bitError() {
|
|
45
|
+
const data = require("@teambit/bit-error");
|
|
46
|
+
|
|
47
|
+
_bitError = function () {
|
|
48
|
+
return data;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
return data;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
function _prompts() {
|
|
55
|
+
const data = require("@teambit/legacy/dist/prompts");
|
|
56
|
+
|
|
57
|
+
_prompts = function () {
|
|
58
|
+
return data;
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
return data;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
function _loader() {
|
|
65
|
+
const data = _interopRequireDefault(require("@teambit/legacy/dist/cli/loader"));
|
|
66
|
+
|
|
67
|
+
_loader = function () {
|
|
68
|
+
return data;
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
return data;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
function _removeTemplate() {
|
|
75
|
+
const data = _interopRequireDefault(require("@teambit/legacy/dist/cli/templates/remove-template"));
|
|
76
|
+
|
|
77
|
+
_removeTemplate = function () {
|
|
78
|
+
return data;
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
return data;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
function _constants() {
|
|
85
|
+
const data = require("@teambit/legacy/dist/constants");
|
|
86
|
+
|
|
87
|
+
_constants = function () {
|
|
88
|
+
return data;
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
return data;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
class RemoveCmd {
|
|
95
|
+
constructor(remove) {
|
|
96
|
+
this.remove = remove;
|
|
97
|
+
(0, _defineProperty2().default)(this, "name", 'remove <component-pattern>');
|
|
98
|
+
(0, _defineProperty2().default)(this, "description", 'remove component(s) from the workspace, or a remote scope');
|
|
99
|
+
(0, _defineProperty2().default)(this, "arguments", [{
|
|
100
|
+
name: 'component-pattern',
|
|
101
|
+
description: _constants().COMPONENT_PATTERN_HELP
|
|
102
|
+
}]);
|
|
103
|
+
(0, _defineProperty2().default)(this, "group", 'collaborate');
|
|
104
|
+
(0, _defineProperty2().default)(this, "helpUrl", 'components/removing-components');
|
|
105
|
+
(0, _defineProperty2().default)(this, "skipWorkspace", true);
|
|
106
|
+
(0, _defineProperty2().default)(this, "alias", 'rm');
|
|
107
|
+
(0, _defineProperty2().default)(this, "options", [['r', 'remote', 'remove a component from a remote scope'], ['t', 'track', 'keep tracking component in .bitmap (default = false), helps transform a tagged-component to new'], ['d', 'delete-files', 'DEPRECATED (this is now the default). delete local component files'], ['', 'keep-files', 'keep component files (just untrack the component)'], ['f', 'force', 'removes the component from the scope, even if used as a dependency. WARNING: components that depend on this component will corrupt'], ['s', 'silent', 'skip confirmation']]);
|
|
108
|
+
(0, _defineProperty2().default)(this, "loader", true);
|
|
109
|
+
(0, _defineProperty2().default)(this, "migration", true);
|
|
110
|
+
(0, _defineProperty2().default)(this, "remoteOp", true);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
async report([componentsPattern], {
|
|
114
|
+
force = false,
|
|
115
|
+
remote = false,
|
|
116
|
+
track = false,
|
|
117
|
+
deleteFiles = false,
|
|
118
|
+
silent = false,
|
|
119
|
+
keepFiles = false
|
|
120
|
+
}) {
|
|
121
|
+
if (deleteFiles) {
|
|
122
|
+
_loader().default.stop(); // eslint-disable-next-line no-console
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
console.warn(_chalk().default.yellow('--delete-files flag is deprecated. by default the files are deleted, unless --keep-files was provided'));
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
if (!silent) {
|
|
129
|
+
const willDeleteFiles = !remote && !keepFiles;
|
|
130
|
+
const removePromptResult = await (0, _prompts().removePrompt)(willDeleteFiles)(); // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
|
|
131
|
+
|
|
132
|
+
if (!(0, _yn().default)(removePromptResult.shouldRemove)) {
|
|
133
|
+
throw new (_bitError().BitError)('the operation has been canceled');
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
const {
|
|
138
|
+
localResult,
|
|
139
|
+
remoteResult = []
|
|
140
|
+
} = await this.remove.remove({
|
|
141
|
+
componentsPattern,
|
|
142
|
+
remote,
|
|
143
|
+
force,
|
|
144
|
+
track,
|
|
145
|
+
deleteFiles: !keepFiles
|
|
146
|
+
}); // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
|
|
147
|
+
|
|
148
|
+
return (0, _removeTemplate().default)(localResult, false) + this.paintArray(remoteResult);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
paintArray(removedObjectsArray) {
|
|
152
|
+
return removedObjectsArray.map(item => (0, _removeTemplate().default)(item, true));
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
exports.RemoveCmd = RemoveCmd;
|
|
158
|
+
|
|
159
|
+
//# sourceMappingURL=remove-cmd.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["RemoveCmd","constructor","remove","name","description","COMPONENT_PATTERN_HELP","report","componentsPattern","force","remote","track","deleteFiles","silent","keepFiles","loader","stop","console","warn","chalk","yellow","willDeleteFiles","removePromptResult","removePrompt","yn","shouldRemove","BitError","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 ['r', 'remote', 'remove a component from a remote scope'],\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 force = false,\n remote = false,\n track = false,\n deleteFiles = false,\n silent = false,\n keepFiles = false,\n }: { force: boolean; remote: boolean; track: boolean; deleteFiles: boolean; silent: boolean; keepFiles: boolean }\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)();\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 });\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;IAAA;EAAA;;EAAA;AAAA;;AAEA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAGA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAGO,MAAMA,SAAN,CAAmC;EA6BxCC,WAAW,CAASC,MAAT,EAA6B;IAAA,KAApBA,MAAoB,GAApBA,MAAoB;IAAA,8CA5BjC,4BA4BiC;IAAA,qDA3B1B,2DA2B0B;IAAA,mDA1B5B,CACV;MACEC,IAAI,EAAE,mBADR;MAEEC,WAAW,EAAEC;IAFf,CADU,C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AAZ,CAAmB;MAAEK,iBAAF;MAAqBE,MAArB;MAA6BD,KAA7B;MAAoCE,KAApC;MAA2CC,WAAW,EAAE,CAACE;IAAzD,CAAnB,CANV,CAlBA,CAyBA;;IACA,OAAO,IAAAe,yBAAA,EAAaF,WAAb,EAA0B,KAA1B,IAAmC,KAAKG,UAAL,CAAgBF,YAAhB,CAA1C;EACD;;EACDE,UAAU,CAACC,mBAAD,EAAwC;IAChD,OAAOA,mBAAmB,CAACC,GAApB,CAAyBC,IAAD,IAAU,IAAAJ,yBAAA,EAAaI,IAAb,EAAmB,IAAnB,CAAlC,CAAP;EACD;;AAvEuC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.RemoveAspect = void 0;
|
|
7
|
+
|
|
8
|
+
function _harmony() {
|
|
9
|
+
const data = require("@teambit/harmony");
|
|
10
|
+
|
|
11
|
+
_harmony = function () {
|
|
12
|
+
return data;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
return data;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const RemoveAspect = _harmony().Aspect.create({
|
|
19
|
+
id: 'teambit.component/remove'
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
exports.RemoveAspect = RemoveAspect;
|
|
23
|
+
|
|
24
|
+
//# sourceMappingURL=remove.aspect.js.map
|
|
@@ -0,0 +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":";;;;;;;AAAA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAEO,MAAMA,YAAY,GAAGC,iBAAA,CAAOC,MAAP,CAAc;EACxCC,EAAE,EAAE;AADoC,CAAd,CAArB"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { CLIMain } from '@teambit/cli';
|
|
2
|
+
import { Logger, LoggerMain } from '@teambit/logger';
|
|
3
|
+
import { Workspace } from '@teambit/workspace';
|
|
4
|
+
export declare class RemoveMain {
|
|
5
|
+
private workspace;
|
|
6
|
+
private logger;
|
|
7
|
+
constructor(workspace: Workspace, logger: Logger);
|
|
8
|
+
remove({ componentsPattern, force, remote, track, deleteFiles, }: {
|
|
9
|
+
componentsPattern: string;
|
|
10
|
+
force: boolean;
|
|
11
|
+
remote: boolean;
|
|
12
|
+
track: boolean;
|
|
13
|
+
deleteFiles: boolean;
|
|
14
|
+
}): Promise<any>;
|
|
15
|
+
private getLocalBitIdsToRemove;
|
|
16
|
+
private getRemoteBitIdsToRemove;
|
|
17
|
+
static slots: never[];
|
|
18
|
+
static dependencies: import("@teambit/harmony").Aspect[];
|
|
19
|
+
static runtime: import("@teambit/harmony").RuntimeDefinition;
|
|
20
|
+
static provider([workspace, cli, loggerMain]: [Workspace, CLIMain, LoggerMain]): Promise<RemoveMain>;
|
|
21
|
+
}
|
|
22
|
+
export default RemoveMain;
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
require("core-js/modules/es.array.iterator.js");
|
|
6
|
+
|
|
7
|
+
require("core-js/modules/es.promise.js");
|
|
8
|
+
|
|
9
|
+
Object.defineProperty(exports, "__esModule", {
|
|
10
|
+
value: true
|
|
11
|
+
});
|
|
12
|
+
exports.default = exports.RemoveMain = void 0;
|
|
13
|
+
|
|
14
|
+
function _defineProperty2() {
|
|
15
|
+
const data = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
16
|
+
|
|
17
|
+
_defineProperty2 = function () {
|
|
18
|
+
return data;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
return data;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
function _cli() {
|
|
25
|
+
const data = require("@teambit/cli");
|
|
26
|
+
|
|
27
|
+
_cli = function () {
|
|
28
|
+
return data;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
return data;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function _logger() {
|
|
35
|
+
const data = require("@teambit/logger");
|
|
36
|
+
|
|
37
|
+
_logger = function () {
|
|
38
|
+
return data;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
return data;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function _workspace() {
|
|
45
|
+
const data = _interopRequireDefault(require("@teambit/workspace"));
|
|
46
|
+
|
|
47
|
+
_workspace = function () {
|
|
48
|
+
return data;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
return data;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
function _legacyBitId() {
|
|
55
|
+
const data = require("@teambit/legacy-bit-id");
|
|
56
|
+
|
|
57
|
+
_legacyBitId = function () {
|
|
58
|
+
return data;
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
return data;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
function _bitId() {
|
|
65
|
+
const data = require("@teambit/legacy/dist/bit-id");
|
|
66
|
+
|
|
67
|
+
_bitId = function () {
|
|
68
|
+
return data;
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
return data;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
function _removeComponents() {
|
|
75
|
+
const data = _interopRequireDefault(require("@teambit/legacy/dist/consumer/component-ops/remove-components"));
|
|
76
|
+
|
|
77
|
+
_removeComponents = function () {
|
|
78
|
+
return data;
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
return data;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
function _exceptions() {
|
|
85
|
+
const data = require("@teambit/legacy/dist/consumer/exceptions");
|
|
86
|
+
|
|
87
|
+
_exceptions = function () {
|
|
88
|
+
return data;
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
return data;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
function _hasWildcard() {
|
|
95
|
+
const data = _interopRequireDefault(require("@teambit/legacy/dist/utils/string/has-wildcard"));
|
|
96
|
+
|
|
97
|
+
_hasWildcard = function () {
|
|
98
|
+
return data;
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
return data;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
function _listScope() {
|
|
105
|
+
const data = require("@teambit/legacy/dist/api/consumer/lib/list-scope");
|
|
106
|
+
|
|
107
|
+
_listScope = function () {
|
|
108
|
+
return data;
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
return data;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
function _removeCmd() {
|
|
115
|
+
const data = require("./remove-cmd");
|
|
116
|
+
|
|
117
|
+
_removeCmd = function () {
|
|
118
|
+
return data;
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
return data;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
function _remove() {
|
|
125
|
+
const data = require("./remove.aspect");
|
|
126
|
+
|
|
127
|
+
_remove = function () {
|
|
128
|
+
return data;
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
return data;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
const BEFORE_REMOVE = 'removing components';
|
|
135
|
+
|
|
136
|
+
class RemoveMain {
|
|
137
|
+
constructor(workspace, logger) {
|
|
138
|
+
this.workspace = workspace;
|
|
139
|
+
this.logger = logger;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
async remove({
|
|
143
|
+
componentsPattern,
|
|
144
|
+
force,
|
|
145
|
+
remote,
|
|
146
|
+
track,
|
|
147
|
+
deleteFiles
|
|
148
|
+
}) {
|
|
149
|
+
var _this$workspace;
|
|
150
|
+
|
|
151
|
+
this.logger.setStatusLine(BEFORE_REMOVE);
|
|
152
|
+
const bitIds = remote ? await this.getRemoteBitIdsToRemove(componentsPattern) : await this.getLocalBitIdsToRemove(componentsPattern);
|
|
153
|
+
this.logger.setStatusLine(BEFORE_REMOVE); // again because the loader might changed when talking to the remote
|
|
154
|
+
|
|
155
|
+
const consumer = (_this$workspace = this.workspace) === null || _this$workspace === void 0 ? void 0 : _this$workspace.consumer;
|
|
156
|
+
const removeResults = await (0, _removeComponents().default)({
|
|
157
|
+
consumer,
|
|
158
|
+
ids: _bitId().BitIds.fromArray(bitIds),
|
|
159
|
+
force,
|
|
160
|
+
remote,
|
|
161
|
+
track,
|
|
162
|
+
deleteFiles
|
|
163
|
+
});
|
|
164
|
+
if (consumer) await consumer.onDestroy();
|
|
165
|
+
return removeResults;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
async getLocalBitIdsToRemove(componentsPattern) {
|
|
169
|
+
if (!this.workspace) throw new (_exceptions().ConsumerNotFound)();
|
|
170
|
+
const componentIds = await this.workspace.idsByPattern(componentsPattern);
|
|
171
|
+
return componentIds.map(id => id._legacy);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
async getRemoteBitIdsToRemove(componentsPattern) {
|
|
175
|
+
if ((0, _hasWildcard().default)(componentsPattern)) {
|
|
176
|
+
return (0, _listScope().getRemoteBitIdsByWildcards)(componentsPattern);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
return [_legacyBitId().BitId.parse(componentsPattern, true)];
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
static async provider([workspace, cli, loggerMain]) {
|
|
183
|
+
const logger = loggerMain.createLogger(_remove().RemoveAspect.id);
|
|
184
|
+
const removeMain = new RemoveMain(workspace, logger);
|
|
185
|
+
cli.register(new (_removeCmd().RemoveCmd)(removeMain));
|
|
186
|
+
return new RemoveMain(workspace, logger);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
exports.RemoveMain = RemoveMain;
|
|
192
|
+
(0, _defineProperty2().default)(RemoveMain, "slots", []);
|
|
193
|
+
(0, _defineProperty2().default)(RemoveMain, "dependencies", [_workspace().default, _cli().CLIAspect, _logger().LoggerAspect]);
|
|
194
|
+
(0, _defineProperty2().default)(RemoveMain, "runtime", _cli().MainRuntime);
|
|
195
|
+
|
|
196
|
+
_remove().RemoveAspect.addRuntime(RemoveMain);
|
|
197
|
+
|
|
198
|
+
var _default = RemoveMain;
|
|
199
|
+
exports.default = _default;
|
|
200
|
+
|
|
201
|
+
//# sourceMappingURL=remove.main.runtime.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["BEFORE_REMOVE","RemoveMain","constructor","workspace","logger","remove","componentsPattern","force","remote","track","deleteFiles","setStatusLine","bitIds","getRemoteBitIdsToRemove","getLocalBitIdsToRemove","consumer","removeResults","removeComponents","ids","BitIds","fromArray","onDestroy","ConsumerNotFound","componentIds","idsByPattern","map","id","_legacy","hasWildcard","getRemoteBitIdsByWildcards","BitId","parse","provider","cli","loggerMain","createLogger","RemoveAspect","removeMain","register","RemoveCmd","WorkspaceAspect","CLIAspect","LoggerAspect","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 { RemoveCmd } from './remove-cmd';\nimport { RemoveAspect } from './remove.aspect';\n\nconst BEFORE_REMOVE = 'removing components';\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 }: {\n componentsPattern: string;\n force: boolean;\n remote: boolean;\n track: boolean;\n deleteFiles: 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 });\n if (consumer) await consumer.onDestroy();\n return removeResults;\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];\n static runtime = MainRuntime;\n\n static async provider([workspace, cli, loggerMain]: [Workspace, CLIMain, LoggerMain]) {\n const logger = loggerMain.createLogger(RemoveAspect.id);\n const removeMain = new RemoveMain(workspace, logger);\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;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"teambit.component",
|
|
7
|
+
"name": "remove",
|
|
8
|
+
"version": "0.0.1"
|
|
9
|
+
},
|
|
10
|
+
"dependencies": {
|
|
11
|
+
"chalk": "2.4.2",
|
|
12
|
+
"yn": "2.0.0",
|
|
13
|
+
"@babel/runtime": "7.12.18",
|
|
14
|
+
"core-js": "^3.0.0",
|
|
15
|
+
"@teambit/harmony": "0.3.3",
|
|
16
|
+
"@teambit/bit-error": "0.0.394",
|
|
17
|
+
"@teambit/cli": "0.0.552",
|
|
18
|
+
"@teambit/legacy-bit-id": "0.0.402",
|
|
19
|
+
"@teambit/logger": "0.0.645",
|
|
20
|
+
"@teambit/workspace": "0.0.824"
|
|
21
|
+
},
|
|
22
|
+
"devDependencies": {
|
|
23
|
+
"@types/mocha": "9.1.0",
|
|
24
|
+
"@types/testing-library__jest-dom": "5.9.5",
|
|
25
|
+
"@types/jest": "^26.0.0",
|
|
26
|
+
"@types/react-dom": "^17.0.5",
|
|
27
|
+
"@types/react": "^17.0.8",
|
|
28
|
+
"@types/node": "12.20.4"
|
|
29
|
+
},
|
|
30
|
+
"peerDependencies": {
|
|
31
|
+
"@teambit/legacy": "1.0.335",
|
|
32
|
+
"react-dom": "^16.8.0 || ^17.0.0",
|
|
33
|
+
"react": "^16.8.0 || ^17.0.0"
|
|
34
|
+
},
|
|
35
|
+
"license": "Apache-2.0",
|
|
36
|
+
"private": false,
|
|
37
|
+
"engines": {
|
|
38
|
+
"node": ">=12.22.0"
|
|
39
|
+
},
|
|
40
|
+
"repository": {
|
|
41
|
+
"type": "git",
|
|
42
|
+
"url": "https://github.com/teambit/bit"
|
|
43
|
+
},
|
|
44
|
+
"keywords": [
|
|
45
|
+
"bit",
|
|
46
|
+
"bit-aspect",
|
|
47
|
+
"components",
|
|
48
|
+
"collaboration",
|
|
49
|
+
"web",
|
|
50
|
+
"react",
|
|
51
|
+
"react-components",
|
|
52
|
+
"angular",
|
|
53
|
+
"angular-components",
|
|
54
|
+
"vue",
|
|
55
|
+
"vue-components"
|
|
56
|
+
]
|
|
57
|
+
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"lib": [
|
|
4
|
+
"es2019",
|
|
5
|
+
"DOM",
|
|
6
|
+
"ES6",
|
|
7
|
+
"DOM.Iterable",
|
|
8
|
+
"ScriptHost"
|
|
9
|
+
],
|
|
10
|
+
"target": "es2015",
|
|
11
|
+
"module": "commonjs",
|
|
12
|
+
"jsx": "react",
|
|
13
|
+
"allowJs": true,
|
|
14
|
+
"composite": true,
|
|
15
|
+
"declaration": true,
|
|
16
|
+
"sourceMap": true,
|
|
17
|
+
"skipLibCheck": true,
|
|
18
|
+
"experimentalDecorators": true,
|
|
19
|
+
"outDir": "dist",
|
|
20
|
+
"moduleResolution": "node",
|
|
21
|
+
"esModuleInterop": true,
|
|
22
|
+
"rootDir": ".",
|
|
23
|
+
"resolveJsonModule": true,
|
|
24
|
+
"emitDeclarationOnly": true,
|
|
25
|
+
"emitDecoratorMetadata": true,
|
|
26
|
+
"allowSyntheticDefaultImports": true,
|
|
27
|
+
"strictPropertyInitialization": false,
|
|
28
|
+
"strict": true,
|
|
29
|
+
"noImplicitAny": false,
|
|
30
|
+
"preserveConstEnums": true
|
|
31
|
+
},
|
|
32
|
+
"exclude": [
|
|
33
|
+
"dist",
|
|
34
|
+
"package.json"
|
|
35
|
+
],
|
|
36
|
+
"include": [
|
|
37
|
+
"**/*",
|
|
38
|
+
"**/*.json"
|
|
39
|
+
]
|
|
40
|
+
}
|
package/types/asset.d.ts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
declare module '*.png' {
|
|
2
|
+
const value: any;
|
|
3
|
+
export = value;
|
|
4
|
+
}
|
|
5
|
+
declare module '*.svg' {
|
|
6
|
+
import type { FunctionComponent, SVGProps } from 'react';
|
|
7
|
+
|
|
8
|
+
export const ReactComponent: FunctionComponent<SVGProps<SVGSVGElement> & { title?: string }>;
|
|
9
|
+
const src: string;
|
|
10
|
+
export default src;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
// @TODO Gilad
|
|
14
|
+
declare module '*.jpg' {
|
|
15
|
+
const value: any;
|
|
16
|
+
export = value;
|
|
17
|
+
}
|
|
18
|
+
declare module '*.jpeg' {
|
|
19
|
+
const value: any;
|
|
20
|
+
export = value;
|
|
21
|
+
}
|
|
22
|
+
declare module '*.gif' {
|
|
23
|
+
const value: any;
|
|
24
|
+
export = value;
|
|
25
|
+
}
|
|
26
|
+
declare module '*.bmp' {
|
|
27
|
+
const value: any;
|
|
28
|
+
export = value;
|
|
29
|
+
}
|
package/types/style.d.ts
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
declare module '*.module.css' {
|
|
2
|
+
const classes: { readonly [key: string]: string };
|
|
3
|
+
export default classes;
|
|
4
|
+
}
|
|
5
|
+
declare module '*.module.scss' {
|
|
6
|
+
const classes: { readonly [key: string]: string };
|
|
7
|
+
export default classes;
|
|
8
|
+
}
|
|
9
|
+
declare module '*.module.sass' {
|
|
10
|
+
const classes: { readonly [key: string]: string };
|
|
11
|
+
export default classes;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
declare module '*.module.less' {
|
|
15
|
+
const classes: { readonly [key: string]: string };
|
|
16
|
+
export default classes;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
declare module '*.less' {
|
|
20
|
+
const classes: { readonly [key: string]: string };
|
|
21
|
+
export default classes;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
declare module '*.css' {
|
|
25
|
+
const classes: { readonly [key: string]: string };
|
|
26
|
+
export default classes;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
declare module '*.sass' {
|
|
30
|
+
const classes: { readonly [key: string]: string };
|
|
31
|
+
export default classes;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
declare module '*.scss' {
|
|
35
|
+
const classes: { readonly [key: string]: string };
|
|
36
|
+
export default classes;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
declare module '*.mdx' {
|
|
40
|
+
const component: any;
|
|
41
|
+
export default component;
|
|
42
|
+
}
|