@teambit/workspace 0.0.685 → 0.0.686

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.
Files changed (27) hide show
  1. package/dist/workspace.provider.js +0 -11
  2. package/dist/workspace.provider.js.map +1 -1
  3. package/dist/workspace.ui.drawer.d.ts +8 -0
  4. package/dist/workspace.ui.drawer.js +65 -0
  5. package/dist/workspace.ui.drawer.js.map +1 -0
  6. package/dist/workspace.ui.runtime.d.ts +16 -4
  7. package/dist/workspace.ui.runtime.js +46 -8
  8. package/dist/workspace.ui.runtime.js.map +1 -1
  9. package/package-tar/teambit-workspace-0.0.686.tgz +0 -0
  10. package/package.json +32 -40
  11. package/{preview-1648006106088.js → preview-1648092203429.js} +2 -2
  12. package/workspace.ui.drawer.tsx +32 -0
  13. package/workspace.ui.runtime.tsx +47 -5
  14. package/dist/tag-cmd.d.ts +0 -29
  15. package/dist/tag-cmd.js +0 -312
  16. package/dist/tag-cmd.js.map +0 -1
  17. package/dist/ui/workspace-components-drawer/index.d.ts +0 -1
  18. package/dist/ui/workspace-components-drawer/index.js +0 -23
  19. package/dist/ui/workspace-components-drawer/index.js.map +0 -1
  20. package/dist/ui/workspace-components-drawer/workspace-components-drawer.module.scss +0 -51
  21. package/dist/ui/workspace-components-drawer/workspace-components.drawer.d.ts +0 -15
  22. package/dist/ui/workspace-components-drawer/workspace-components.drawer.js +0 -270
  23. package/dist/ui/workspace-components-drawer/workspace-components.drawer.js.map +0 -1
  24. package/package-tar/teambit-workspace-0.0.685.tgz +0 -0
  25. package/ui/workspace-components-drawer/index.ts +0 -1
  26. package/ui/workspace-components-drawer/workspace-components-drawer.module.scss +0 -51
  27. package/ui/workspace-components-drawer/workspace-components.drawer.tsx +0 -149
@@ -8,15 +8,22 @@ import SidebarAspect, { SidebarUI, SidebarItem, SidebarItemSlot } from '@teambit
8
8
  import { MenuItemSlot, MenuItem } from '@teambit/ui-foundation.ui.main-dropdown';
9
9
  import { UIAspect, UIRootUI as UIRoot, UIRuntime, UiUI } from '@teambit/ui';
10
10
  import { GraphAspect, GraphUI } from '@teambit/graph';
11
- import React from 'react';
11
+ import React, { ReactNode } from 'react';
12
12
  import { RouteProps } from 'react-router-dom';
13
13
  import CommandBarAspect, { CommandBarUI, ComponentSearcher, CommandHandler } from '@teambit/command-bar';
14
14
  import { MenuLinkItem } from '@teambit/design.ui.surfaces.menu.link-item';
15
15
  import type { DrawerType } from '@teambit/ui-foundation.ui.tree.drawer';
16
- import { WorkspaceComponentsDrawer } from './ui/workspace-components-drawer';
16
+ import { ComponentFilters, DeprecateFilter, EnvsFilter } from '@teambit/component.ui.component-filters';
17
+ import {
18
+ DrawerWidgetSlot,
19
+ FilterWidget,
20
+ TreeToggleWidget,
21
+ ComponentFiltersSlot,
22
+ } from '@teambit/component.ui.component-drawer';
17
23
  import { ComponentTreeWidget } from './component-tree.widget';
18
24
  import { Workspace } from './ui';
19
25
  import { WorkspaceAspect } from './workspace.aspect';
26
+ import { workspaceDrawer } from './workspace.ui.drawer';
20
27
 
21
28
  export type SidebarWidgetSlot = SlotRegistry<ComponentTreeNode>;
22
29
 
@@ -48,6 +55,10 @@ export class WorkspaceUI {
48
55
  */
49
56
  private sidebarItemSlot: SidebarItemSlot,
50
57
 
58
+ private drawerWidgetSlot: DrawerWidgetSlot,
59
+
60
+ private drawerComponentsFiltersSlot: ComponentFiltersSlot,
61
+
51
62
  private commandBarUI: CommandBarUI,
52
63
 
53
64
  reactRouterUI: ReactRouterUI
@@ -94,9 +105,27 @@ export class WorkspaceUI {
94
105
 
95
106
  componentSearcher: ComponentSearcher;
96
107
 
108
+ /**
109
+ * register component filters
110
+ */
111
+ registerDrawerComponentFilters = (filters: ComponentFilters) => {
112
+ this.drawerComponentsFiltersSlot.register(filters);
113
+ };
114
+
115
+ registerDrawerWidgets = (widgets: ReactNode[]) => {
116
+ this.drawerWidgetSlot.register(widgets);
117
+ };
118
+
97
119
  uiRoot(): UIRoot {
98
120
  this.commandBarUI.addSearcher(this.componentSearcher);
99
- this.registerDrawers(new WorkspaceComponentsDrawer(this.sidebarSlot));
121
+ this.registerDrawers(
122
+ workspaceDrawer({
123
+ treeWidgets: this.sidebarSlot,
124
+ drawerWidgetSlot: this.drawerWidgetSlot,
125
+ filtersSlot: this.drawerComponentsFiltersSlot,
126
+ })
127
+ );
128
+
100
129
  const [setKeyBindHandler] = this.commandBarUI.addCommand({
101
130
  id: 'sidebar.toggle', // TODO - extract to a component!
102
131
  handler: () => {},
@@ -156,6 +185,8 @@ export class WorkspaceUI {
156
185
  Slot.withType<ComponentTreeNode>(),
157
186
  Slot.withType<MenuItemSlot>(),
158
187
  Slot.withType<SidebarItemSlot>(),
188
+ Slot.withType<DrawerWidgetSlot>(),
189
+ Slot.withType<ComponentFiltersSlot>(),
159
190
  ];
160
191
 
161
192
  static async provider(
@@ -169,12 +200,14 @@ export class WorkspaceUI {
169
200
  GraphUI
170
201
  ],
171
202
  config,
172
- [routeSlot, menuSlot, menuItemSlot, sidebarSlot, sidebarItemSlot]: [
203
+ [routeSlot, menuSlot, menuItemSlot, sidebarSlot, sidebarItemSlot, drawerWidgetSlot, drawerComponentsFiltersSlot]: [
173
204
  RouteSlot,
174
205
  RouteSlot,
175
206
  MenuItemSlot,
176
207
  SidebarWidgetSlot,
177
- SidebarItemSlot
208
+ SidebarItemSlot,
209
+ DrawerWidgetSlot,
210
+ ComponentFiltersSlot
178
211
  ]
179
212
  ) {
180
213
  componentTree.registerTreeNode(new ComponentTreeWidget());
@@ -189,9 +222,17 @@ export class WorkspaceUI {
189
222
  sidebar,
190
223
  sidebarSlot,
191
224
  sidebarItemSlot,
225
+ drawerWidgetSlot,
226
+ drawerComponentsFiltersSlot,
192
227
  commandBarUI,
193
228
  reactRouterUI
194
229
  );
230
+
231
+ workspaceUI.registerDrawerComponentFilters([DeprecateFilter, EnvsFilter]);
232
+ workspaceUI.registerDrawerWidgets([
233
+ <FilterWidget key={'workspace-filter-widget'} />,
234
+ <TreeToggleWidget key={'workspace-tree-toggle-widget'} />,
235
+ ]);
195
236
  ui.registerRoot(workspaceUI.uiRoot.bind(workspaceUI));
196
237
  workspaceUI.registerMenuItem(workspaceUI.menuItems);
197
238
 
@@ -219,6 +260,7 @@ export class WorkspaceUI {
219
260
  children: workspaceUI.componentUi.getComponentUI(WorkspaceAspect.id),
220
261
  },
221
262
  ]);
263
+
222
264
  return workspaceUI;
223
265
  }
224
266
  }
package/dist/tag-cmd.d.ts DELETED
@@ -1,29 +0,0 @@
1
- import { Command, CommandOptions } from '@teambit/cli';
2
- import { BasicTagParams } from '@teambit/legacy/dist/api/consumer/lib/tag';
3
- export declare class Tag implements Command {
4
- private docsDomain;
5
- name: string;
6
- group: string;
7
- shortDescription: string;
8
- description: string;
9
- alias: string;
10
- loader: boolean;
11
- options: CommandOptions;
12
- migration: boolean;
13
- remoteOp: boolean;
14
- constructor(docsDomain: string);
15
- report([id]: [string[]], { message, ver, all, editor, snapped, patch, minor, major, preRelease, force, verbose, ignoreUnresolvedDependencies, ignoreIssues, ignoreNewestVersion, skipTests, skipAutoTag, scope, build, soft, persist, disableDeployPipeline, disableTagPipeline, forceDeploy, incrementBy, }: {
16
- all?: boolean | string;
17
- snapped?: boolean | string;
18
- ver?: string;
19
- patch?: boolean;
20
- minor?: boolean;
21
- major?: boolean;
22
- ignoreUnresolvedDependencies?: boolean;
23
- ignoreIssues?: string;
24
- scope?: string | boolean;
25
- incrementBy?: number;
26
- disableDeployPipeline?: boolean;
27
- disableTagPipeline?: boolean;
28
- } & Partial<BasicTagParams>): Promise<string>;
29
- }
package/dist/tag-cmd.js DELETED
@@ -1,312 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
- require("core-js/modules/es.symbol.description.js");
6
-
7
- require("core-js/modules/es.array.iterator.js");
8
-
9
- require("core-js/modules/es.promise.js");
10
-
11
- Object.defineProperty(exports, "__esModule", {
12
- value: true
13
- });
14
- exports.Tag = void 0;
15
-
16
- function _defineProperty2() {
17
- const data = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
18
-
19
- _defineProperty2 = function () {
20
- return data;
21
- };
22
-
23
- return data;
24
- }
25
-
26
- function _chalk() {
27
- const data = _interopRequireDefault(require("chalk"));
28
-
29
- _chalk = function () {
30
- return data;
31
- };
32
-
33
- return data;
34
- }
35
-
36
- function _semver() {
37
- const data = _interopRequireDefault(require("semver"));
38
-
39
- _semver = function () {
40
- return data;
41
- };
42
-
43
- return data;
44
- }
45
-
46
- function _consumer() {
47
- const data = require("@teambit/legacy/dist/api/consumer");
48
-
49
- _consumer = function () {
50
- return data;
51
- };
52
-
53
- return data;
54
- }
55
-
56
- function _tag() {
57
- const data = require("@teambit/legacy/dist/api/consumer/lib/tag");
58
-
59
- _tag = function () {
60
- return data;
61
- };
62
-
63
- return data;
64
- }
65
-
66
- function _utils() {
67
- const data = require("@teambit/legacy/dist/utils");
68
-
69
- _utils = function () {
70
- return data;
71
- };
72
-
73
- return data;
74
- }
75
-
76
- function _constants() {
77
- const data = require("@teambit/legacy/dist/constants");
78
-
79
- _constants = function () {
80
- return data;
81
- };
82
-
83
- return data;
84
- }
85
-
86
- function _generalError() {
87
- const data = _interopRequireDefault(require("@teambit/legacy/dist/error/general-error"));
88
-
89
- _generalError = function () {
90
- return data;
91
- };
92
-
93
- return data;
94
- }
95
-
96
- function _featureToggle() {
97
- const data = require("@teambit/legacy/dist/api/consumer/lib/feature-toggle");
98
-
99
- _featureToggle = function () {
100
- return data;
101
- };
102
-
103
- return data;
104
- }
105
-
106
- function _componentIssues() {
107
- const data = require("@teambit/component-issues");
108
-
109
- _componentIssues = function () {
110
- return data;
111
- };
112
-
113
- return data;
114
- }
115
-
116
- class Tag {
117
- // In case a compiler / tester is not installed
118
- constructor(docsDomain) {
119
- this.docsDomain = docsDomain;
120
- (0, _defineProperty2().default)(this, "name", 'tag [id...]');
121
- (0, _defineProperty2().default)(this, "group", 'development');
122
- (0, _defineProperty2().default)(this, "shortDescription", 'record component changes and lock versions');
123
- (0, _defineProperty2().default)(this, "description", void 0);
124
- (0, _defineProperty2().default)(this, "alias", 't');
125
- (0, _defineProperty2().default)(this, "loader", true);
126
- (0, _defineProperty2().default)(this, "options", [['m', 'message <message>', 'log message describing the user changes'], ['a', 'all [version]', 'tag all new and modified components'], ['s', 'scope [version]', 'tag all components of the current scope'], ['', 'editor [editor]', 'EXPERIMENTAL. open an editor to edit the tag messages per component, optionally specify the editor-name, default to vim'], ['', 'snapped [version]', 'tag components that their head is a snap (not a tag)'], ['', 'ver <version>', 'tag specified components with the given version'], ['p', 'patch', 'increment the patch version number'], ['', 'minor', 'increment the minor version number'], ['', 'major', 'increment the major version number'], ['', 'pre-release [identifier]', 'EXPERIMENTAL. increment a pre-release version (e.g. 1.0.0-dev.1)'], ['f', 'force', 'force-tag even if tests are failing and even when component has not changed'], ['v', 'verbose', 'show specs output on failure'], ['I', 'ignore-newest-version', 'ignore existing of newer versions (default = false)'], ['', 'skip-tests', 'skip running component tests during tag process'], ['', 'skip-auto-tag', 'skip auto tagging dependents'], ['b', 'build', 'EXPERIMENTAL. not needed for now. run the pipeline build and complete the tag'], ['', 'soft', 'do not persist. only keep note of the changes to be made'], ['', 'persist', 'persist the changes generated by --soft tag'], ['', 'disable-deploy-pipeline', 'DEPRECATED. use --disable-tag-pipeline instead'], ['', 'disable-tag-pipeline', 'skip the tag pipeline to avoid publishing the components'], ['', 'force-deploy', 'run the tag pipeline although the build failed'], ['', 'increment-by <number>', '(default to 1) increment semver flag (patch/minor/major) by. e.g. incrementing patch by 2: 0.0.1 -> 0.0.3.'], ['i', 'ignore-issues [issues]', `ignore component issues (shown in "bit status" as "issues found"), issues to ignore:
127
- [${Object.keys(_componentIssues().IssuesClasses).join(', ')}]
128
- to ignore multiple issues, separate them by a comma and wrap with quotes. to ignore all issues, specify "*".`]]);
129
- (0, _defineProperty2().default)(this, "migration", true);
130
- (0, _defineProperty2().default)(this, "remoteOp", true);
131
- this.description = `record component changes and lock versions.
132
- if component ids are entered, you can specify a version per id using "@" sign, e.g. bit tag foo@1.0.0 bar@minor baz@major
133
- https://${docsDomain}/components/tags
134
- ${(0, _constants().WILDCARD_HELP)('tag')}`;
135
- } // eslint-disable-next-line complexity
136
-
137
-
138
- async report([id = []], {
139
- message = '',
140
- ver,
141
- all = false,
142
- editor = '',
143
- snapped = false,
144
- patch,
145
- minor,
146
- major,
147
- preRelease,
148
- force = false,
149
- verbose = false,
150
- ignoreUnresolvedDependencies,
151
- ignoreIssues,
152
- ignoreNewestVersion = false,
153
- skipTests = false,
154
- skipAutoTag = false,
155
- scope,
156
- build,
157
- soft = false,
158
- persist = false,
159
- disableDeployPipeline = false,
160
- disableTagPipeline = false,
161
- forceDeploy = false,
162
- incrementBy = 1
163
- }) {
164
- build = (0, _featureToggle().isFeatureEnabled)(_featureToggle().BUILD_ON_CI) ? Boolean(build) : true;
165
- if (soft) build = false;
166
-
167
- function getVersion() {
168
- if (scope && (0, _utils().isString)(scope)) return scope;
169
- if (all && (0, _utils().isString)(all)) return all;
170
- if (snapped && (0, _utils().isString)(snapped)) return snapped;
171
- return ver;
172
- }
173
-
174
- if (!id.length && !all && !snapped && !scope && !persist) {
175
- throw new (_generalError().default)('missing [id]. to tag all components, please use --all flag');
176
- }
177
-
178
- if (id.length && all) {
179
- throw new (_generalError().default)('you can use either a specific component [id] to tag a particular component or --all flag to tag them all');
180
- }
181
-
182
- if (typeof ignoreUnresolvedDependencies === 'boolean') {
183
- throw new Error(`--ignore-unresolved-dependencies has been removed, please use --ignore-issues instead`);
184
- }
185
-
186
- if (ignoreIssues && typeof ignoreIssues === 'boolean') {
187
- throw new Error(`--ignore-issues expects issues to be ignored, please run "bit tag -h" for the issues list`);
188
- }
189
-
190
- if (id.length === 2) {
191
- const secondArg = id[1]; // previously, the synopsis of this command was `bit tag [id] [version]`, show a descriptive
192
- // error when users still use it.
193
-
194
- if (_semver().default.valid(secondArg)) {
195
- throw new (_generalError().default)(`seems like you entered a version as the second arg, this is not supported anymore, please use "@" sign or --ver flag instead`);
196
- }
197
- }
198
-
199
- const disableTagAndSnapPipelines = disableTagPipeline || disableDeployPipeline;
200
-
201
- if (disableTagAndSnapPipelines && forceDeploy) {
202
- throw new (_generalError().default)('you can use either force-deploy or disable-tag-pipeline, but not both');
203
- }
204
-
205
- if (all && persist) {
206
- throw new (_generalError().default)('you can use either --all or --persist, but not both');
207
- }
208
-
209
- if (editor && persist) {
210
- throw new (_generalError().default)('you can use either --editor or --persist, but not both');
211
- }
212
-
213
- if (editor && message) {
214
- throw new (_generalError().default)('you can use either --editor or --message, but not both');
215
- }
216
-
217
- const releaseFlags = [patch, minor, major, preRelease].filter(x => x);
218
-
219
- if (releaseFlags.length > 1) {
220
- throw new (_generalError().default)('you can use only one of the following - patch, minor, major, pre-release');
221
- }
222
-
223
- let releaseType = _constants().DEFAULT_BIT_RELEASE_TYPE;
224
-
225
- const includeImported = Boolean(scope && all);
226
- if (major) releaseType = 'major';else if (minor) releaseType = 'minor';else if (patch) releaseType = 'patch';else if (preRelease) releaseType = 'prerelease';
227
- const params = {
228
- ids: id,
229
- all: Boolean(all),
230
- snapped: Boolean(snapped),
231
- editor,
232
- message,
233
- exactVersion: getVersion(),
234
- releaseType,
235
- preRelease: typeof preRelease === 'string' ? preRelease : '',
236
- force,
237
- verbose,
238
- ignoreIssues,
239
- ignoreNewestVersion,
240
- skipTests,
241
- skipAutoTag,
242
- build,
243
- soft,
244
- persist,
245
- scope,
246
- includeImported,
247
- disableTagAndSnapPipelines,
248
- forceDeploy,
249
- incrementBy
250
- };
251
- const results = await (0, _consumer().tagAction)(params);
252
- if (!results) return _chalk().default.yellow(_tag().NOTHING_TO_TAG_MSG);
253
- const {
254
- taggedComponents,
255
- autoTaggedResults,
256
- warnings,
257
- newComponents
258
- } = results;
259
- const changedComponents = taggedComponents.filter(component => !newComponents.searchWithoutVersion(component.id));
260
- const addedComponents = taggedComponents.filter(component => newComponents.searchWithoutVersion(component.id));
261
- const autoTaggedCount = autoTaggedResults ? autoTaggedResults.length : 0;
262
- const warningsOutput = warnings && warnings.length ? `${_chalk().default.yellow(warnings.join('\n'))}\n\n` : '';
263
- const tagExplanationPersist = `\n(use "bit export [collection]" to push these components to a remote")
264
- (use "bit untag" to unstage versions)\n`;
265
- const tagExplanationSoft = `\n(use "bit tag --persist" to persist the changes")
266
- (use "bit untag --soft" to remove the soft-tags)\n`;
267
- const tagExplanation = results.isSoftTag ? tagExplanationSoft : tagExplanationPersist;
268
-
269
- const outputComponents = comps => {
270
- return comps.map(component => {
271
- let componentOutput = ` > ${component.id.toString()}`;
272
- const autoTag = autoTaggedResults.filter(result => result.triggeredBy.searchWithoutScopeAndVersion(component.id));
273
-
274
- if (autoTag.length) {
275
- const autoTagComp = autoTag.map(a => a.component.id.toString());
276
- componentOutput += `\n ${_tag().AUTO_TAGGED_MSG}:
277
- ${autoTagComp.join('\n ')}`;
278
- }
279
-
280
- return componentOutput;
281
- }).join('\n');
282
- };
283
-
284
- const publishOutput = () => {
285
- const {
286
- publishedPackages
287
- } = results;
288
- if (!publishedPackages || !publishedPackages.length) return '';
289
- const successTitle = `\n\n${_chalk().default.green(`published the following ${publishedPackages.length} component(s) successfully\n`)}`;
290
- const successCompsStr = publishedPackages.join('\n');
291
- const successOutput = successCompsStr ? successTitle + successCompsStr : '';
292
- return successOutput;
293
- };
294
-
295
- const softTagPrefix = results.isSoftTag ? 'soft-tagged ' : '';
296
-
297
- const outputIfExists = (label, explanation, components) => {
298
- if (!components.length) return '';
299
- return `\n${_chalk().default.underline(softTagPrefix + label)}\n(${explanation})\n${outputComponents(components)}\n`;
300
- };
301
-
302
- const newDesc = results.isSoftTag ? 'set to be tagged first version for components' : 'first version for components';
303
- const changedDesc = results.isSoftTag ? 'components that set to get a version bump' : 'components that got a version bump';
304
- const softTagClarification = results.isSoftTag ? _chalk().default.bold('keep in mind that this is a soft-tag (changes recorded to be tagged), to persist the changes use --persist flag') : '';
305
- return warningsOutput + _chalk().default.green(`${taggedComponents.length + autoTaggedCount} component(s) ${results.isSoftTag ? 'soft-' : ''}tagged`) + tagExplanation + outputIfExists('new components', newDesc, addedComponents) + outputIfExists('changed components', changedDesc, changedComponents) + publishOutput() + softTagClarification;
306
- }
307
-
308
- }
309
-
310
- exports.Tag = Tag;
311
-
312
- //# sourceMappingURL=tag-cmd.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["tag-cmd.ts"],"names":["Tag","constructor","docsDomain","Object","keys","IssuesClasses","join","description","report","id","message","ver","all","editor","snapped","patch","minor","major","preRelease","force","verbose","ignoreUnresolvedDependencies","ignoreIssues","ignoreNewestVersion","skipTests","skipAutoTag","scope","build","soft","persist","disableDeployPipeline","disableTagPipeline","forceDeploy","incrementBy","BUILD_ON_CI","Boolean","getVersion","length","GeneralError","Error","secondArg","semver","valid","disableTagAndSnapPipelines","releaseFlags","filter","x","releaseType","DEFAULT_BIT_RELEASE_TYPE","includeImported","params","ids","exactVersion","results","chalk","yellow","NOTHING_TO_TAG_MSG","taggedComponents","autoTaggedResults","warnings","newComponents","changedComponents","component","searchWithoutVersion","addedComponents","autoTaggedCount","warningsOutput","tagExplanationPersist","tagExplanationSoft","tagExplanation","isSoftTag","outputComponents","comps","map","componentOutput","toString","autoTag","result","triggeredBy","searchWithoutScopeAndVersion","autoTagComp","a","AUTO_TAGGED_MSG","publishOutput","publishedPackages","successTitle","green","successCompsStr","successOutput","softTagPrefix","outputIfExists","label","explanation","components","underline","newDesc","changedDesc","softTagClarification","bold"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAEA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAMA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;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GAAGD,eAAe,GAAGF,YAAY,GAAGE,eAAlB,GAAoC,EAAzE;AACA,aAAOC,aAAP;AACD,KATD;;AAWA,UAAMC,aAAa,GAAGpC,OAAO,CAACiB,SAAR,GAAoB,cAApB,GAAqC,EAA3D;;AACA,UAAMoB,cAAc,GAAG,CAACC,KAAD,EAAQC,WAAR,EAAqBC,UAArB,KAAoC;AACzD,UAAI,CAACA,UAAU,CAACxD,MAAhB,EAAwB,OAAO,EAAP;AACxB,aAAQ,KAAIiB,iBAAMwC,SAAN,CAAgBL,aAAa,GAAGE,KAAhC,CAAuC,MAAKC,WAAY,MAAKrB,gBAAgB,CAACsB,UAAD,CAAa,IAAtG;AACD,KAHD;;AAKA,UAAME,OAAO,GAAG1C,OAAO,CAACiB,SAAR,GACZ,+CADY,GAEZ,8BAFJ;AAGA,UAAM0B,WAAW,GAAG3C,OAAO,CAACiB,SAAR,GAChB,2CADgB,GAEhB,oCAFJ;AAGA,UAAM2B,oBAAoB,GAAG5C,OAAO,CAACiB,SAAR,GACzBhB,iBAAM4C,IAAN,CACE,iHADF,CADyB,GAIzB,EAJJ;AAKA,WACEhC,cAAc,GACdZ,iBAAMgC,KAAN,CACG,GAAE7B,gBAAgB,CAACpB,MAAjB,GAA0B4B,eAAgB,iBAAgBZ,OAAO,CAACiB,SAAR,GAAoB,OAApB,GAA8B,EAAG,QADhG,CADA,GAIAD,cAJA,GAKAqB,cAAc,CAAC,gBAAD,EAAmBK,OAAnB,EAA4B/B,eAA5B,CALd,GAMA0B,cAAc,CAAC,oBAAD,EAAuBM,WAAvB,EAAoCnC,iBAApC,CANd,GAOAsB,aAAa,EAPb,GAQAc,oBATF;AAWD;;AA/PiC","sourcesContent":["import chalk from 'chalk';\nimport semver, { ReleaseType } from 'semver';\nimport { Command, CommandOptions } from '@teambit/cli';\nimport { tagAction } from '@teambit/legacy/dist/api/consumer';\nimport {\n TagResults,\n NOTHING_TO_TAG_MSG,\n AUTO_TAGGED_MSG,\n BasicTagParams,\n} from '@teambit/legacy/dist/api/consumer/lib/tag';\nimport { isString } from '@teambit/legacy/dist/utils';\nimport { DEFAULT_BIT_RELEASE_TYPE, WILDCARD_HELP } from '@teambit/legacy/dist/constants';\nimport GeneralError from '@teambit/legacy/dist/error/general-error';\nimport { isFeatureEnabled, BUILD_ON_CI } from '@teambit/legacy/dist/api/consumer/lib/feature-toggle';\nimport { IssuesClasses } from '@teambit/component-issues';\n\nexport class Tag implements Command {\n name = 'tag [id...]';\n group = 'development';\n shortDescription = 'record component changes and lock versions';\n description: string;\n alias = 't';\n loader = true;\n options = [\n ['m', 'message <message>', 'log message describing the user changes'],\n ['a', 'all [version]', 'tag all new and modified components'],\n ['s', 'scope [version]', 'tag all components of the current scope'],\n [\n '',\n 'editor [editor]',\n 'EXPERIMENTAL. open an editor to edit the tag messages per component, optionally specify the editor-name, default to vim',\n ],\n ['', 'snapped [version]', 'tag components that their head is a snap (not a tag)'],\n ['', 'ver <version>', 'tag specified components with the given version'],\n ['p', 'patch', 'increment the patch version number'],\n ['', 'minor', 'increment the minor version number'],\n ['', 'major', 'increment the major version number'],\n ['', 'pre-release [identifier]', 'EXPERIMENTAL. increment a pre-release version (e.g. 1.0.0-dev.1)'],\n ['f', 'force', 'force-tag even if tests are failing and even when component has not changed'],\n ['v', 'verbose', 'show specs output on failure'],\n ['I', 'ignore-newest-version', 'ignore existing of newer versions (default = false)'],\n ['', 'skip-tests', 'skip running component tests during tag process'],\n ['', 'skip-auto-tag', 'skip auto tagging dependents'],\n ['b', 'build', 'EXPERIMENTAL. not needed for now. run the pipeline build and complete the tag'],\n ['', 'soft', 'do not persist. only keep note of the changes to be made'],\n ['', 'persist', 'persist the changes generated by --soft tag'],\n ['', 'disable-deploy-pipeline', 'DEPRECATED. use --disable-tag-pipeline instead'],\n ['', 'disable-tag-pipeline', 'skip the tag pipeline to avoid publishing the components'],\n ['', 'force-deploy', 'run the tag pipeline although the build failed'],\n [\n '',\n 'increment-by <number>',\n '(default to 1) increment semver flag (patch/minor/major) by. e.g. incrementing patch by 2: 0.0.1 -> 0.0.3.',\n ],\n [\n 'i',\n 'ignore-issues [issues]',\n `ignore component issues (shown in \"bit status\" as \"issues found\"), issues to ignore:\n[${Object.keys(IssuesClasses).join(', ')}]\nto ignore multiple issues, separate them by a comma and wrap with quotes. to ignore all issues, specify \"*\".`,\n ],\n ] as CommandOptions;\n migration = true;\n remoteOp = true; // In case a compiler / tester is not installed\n\n constructor(private docsDomain: string) {\n this.description = `record component changes and lock versions.\nif component ids are entered, you can specify a version per id using \"@\" sign, e.g. bit tag foo@1.0.0 bar@minor baz@major\nhttps://${docsDomain}/components/tags\n${WILDCARD_HELP('tag')}`;\n }\n\n // eslint-disable-next-line complexity\n async report(\n [id = []]: [string[]],\n {\n message = '',\n ver,\n all = false,\n editor = '',\n snapped = false,\n patch,\n minor,\n major,\n preRelease,\n force = false,\n verbose = false,\n ignoreUnresolvedDependencies,\n ignoreIssues,\n ignoreNewestVersion = false,\n skipTests = false,\n skipAutoTag = false,\n scope,\n build,\n soft = false,\n persist = false,\n disableDeployPipeline = false,\n disableTagPipeline = false,\n forceDeploy = false,\n incrementBy = 1,\n }: {\n all?: boolean | string;\n snapped?: boolean | string;\n ver?: string;\n patch?: boolean;\n minor?: boolean;\n major?: boolean;\n ignoreUnresolvedDependencies?: boolean;\n ignoreIssues?: string;\n scope?: string | boolean;\n incrementBy?: number;\n disableDeployPipeline?: boolean;\n disableTagPipeline?: boolean;\n } & Partial<BasicTagParams>\n ): Promise<string> {\n build = isFeatureEnabled(BUILD_ON_CI) ? Boolean(build) : true;\n if (soft) build = false;\n function getVersion(): string | undefined {\n if (scope && isString(scope)) return scope;\n if (all && isString(all)) return all;\n if (snapped && isString(snapped)) return snapped;\n return ver;\n }\n\n if (!id.length && !all && !snapped && !scope && !persist) {\n throw new GeneralError('missing [id]. to tag all components, please use --all flag');\n }\n if (id.length && all) {\n throw new GeneralError(\n 'you can use either a specific component [id] to tag a particular component or --all flag to tag them all'\n );\n }\n if (typeof ignoreUnresolvedDependencies === 'boolean') {\n throw new Error(`--ignore-unresolved-dependencies has been removed, please use --ignore-issues instead`);\n }\n if (ignoreIssues && typeof ignoreIssues === 'boolean') {\n throw new Error(`--ignore-issues expects issues to be ignored, please run \"bit tag -h\" for the issues list`);\n }\n if (id.length === 2) {\n const secondArg = id[1];\n // previously, the synopsis of this command was `bit tag [id] [version]`, show a descriptive\n // error when users still use it.\n if (semver.valid(secondArg)) {\n throw new GeneralError(\n `seems like you entered a version as the second arg, this is not supported anymore, please use \"@\" sign or --ver flag instead`\n );\n }\n }\n const disableTagAndSnapPipelines = disableTagPipeline || disableDeployPipeline;\n if (disableTagAndSnapPipelines && forceDeploy) {\n throw new GeneralError('you can use either force-deploy or disable-tag-pipeline, but not both');\n }\n if (all && persist) {\n throw new GeneralError('you can use either --all or --persist, but not both');\n }\n if (editor && persist) {\n throw new GeneralError('you can use either --editor or --persist, but not both');\n }\n if (editor && message) {\n throw new GeneralError('you can use either --editor or --message, but not both');\n }\n\n const releaseFlags = [patch, minor, major, preRelease].filter((x) => x);\n if (releaseFlags.length > 1) {\n throw new GeneralError('you can use only one of the following - patch, minor, major, pre-release');\n }\n\n let releaseType: ReleaseType = DEFAULT_BIT_RELEASE_TYPE;\n const includeImported = Boolean(scope && all);\n\n if (major) releaseType = 'major';\n else if (minor) releaseType = 'minor';\n else if (patch) releaseType = 'patch';\n else if (preRelease) releaseType = 'prerelease';\n\n const params = {\n ids: id,\n all: Boolean(all),\n snapped: Boolean(snapped),\n editor,\n message,\n exactVersion: getVersion(),\n releaseType,\n preRelease: typeof preRelease === 'string' ? preRelease : '',\n force,\n verbose,\n ignoreIssues,\n ignoreNewestVersion,\n skipTests,\n skipAutoTag,\n build,\n soft,\n persist,\n scope,\n includeImported,\n disableTagAndSnapPipelines,\n forceDeploy,\n incrementBy,\n };\n\n const results = await tagAction(params);\n if (!results) return chalk.yellow(NOTHING_TO_TAG_MSG);\n const { taggedComponents, autoTaggedResults, warnings, newComponents }: TagResults = results;\n const changedComponents = taggedComponents.filter((component) => !newComponents.searchWithoutVersion(component.id));\n const addedComponents = taggedComponents.filter((component) => newComponents.searchWithoutVersion(component.id));\n const autoTaggedCount = autoTaggedResults ? autoTaggedResults.length : 0;\n\n const warningsOutput = warnings && warnings.length ? `${chalk.yellow(warnings.join('\\n'))}\\n\\n` : '';\n const tagExplanationPersist = `\\n(use \"bit export [collection]\" to push these components to a remote\")\n(use \"bit untag\" to unstage versions)\\n`;\n const tagExplanationSoft = `\\n(use \"bit tag --persist\" to persist the changes\")\n(use \"bit untag --soft\" to remove the soft-tags)\\n`;\n\n const tagExplanation = results.isSoftTag ? tagExplanationSoft : tagExplanationPersist;\n\n const outputComponents = (comps) => {\n return comps\n .map((component) => {\n let componentOutput = ` > ${component.id.toString()}`;\n const autoTag = autoTaggedResults.filter((result) =>\n result.triggeredBy.searchWithoutScopeAndVersion(component.id)\n );\n if (autoTag.length) {\n const autoTagComp = autoTag.map((a) => a.component.id.toString());\n componentOutput += `\\n ${AUTO_TAGGED_MSG}:\n ${autoTagComp.join('\\n ')}`;\n }\n return componentOutput;\n })\n .join('\\n');\n };\n\n const publishOutput = () => {\n const { publishedPackages } = results;\n if (!publishedPackages || !publishedPackages.length) return '';\n const successTitle = `\\n\\n${chalk.green(\n `published the following ${publishedPackages.length} component(s) successfully\\n`\n )}`;\n const successCompsStr = publishedPackages.join('\\n');\n const successOutput = successCompsStr ? successTitle + successCompsStr : '';\n return successOutput;\n };\n\n const softTagPrefix = results.isSoftTag ? 'soft-tagged ' : '';\n const outputIfExists = (label, explanation, components) => {\n if (!components.length) return '';\n return `\\n${chalk.underline(softTagPrefix + label)}\\n(${explanation})\\n${outputComponents(components)}\\n`;\n };\n\n const newDesc = results.isSoftTag\n ? 'set to be tagged first version for components'\n : 'first version for components';\n const changedDesc = results.isSoftTag\n ? 'components that set to get a version bump'\n : 'components that got a version bump';\n const softTagClarification = results.isSoftTag\n ? chalk.bold(\n 'keep in mind that this is a soft-tag (changes recorded to be tagged), to persist the changes use --persist flag'\n )\n : '';\n return (\n warningsOutput +\n chalk.green(\n `${taggedComponents.length + autoTaggedCount} component(s) ${results.isSoftTag ? 'soft-' : ''}tagged`\n ) +\n tagExplanation +\n outputIfExists('new components', newDesc, addedComponents) +\n outputIfExists('changed components', changedDesc, changedComponents) +\n publishOutput() +\n softTagClarification\n );\n }\n}\n"]}
@@ -1 +0,0 @@
1
- export { WorkspaceComponentsDrawer } from './workspace-components.drawer';
@@ -1,23 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- Object.defineProperty(exports, "WorkspaceComponentsDrawer", {
7
- enumerable: true,
8
- get: function () {
9
- return _workspaceComponents().WorkspaceComponentsDrawer;
10
- }
11
- });
12
-
13
- function _workspaceComponents() {
14
- const data = require("./workspace-components.drawer");
15
-
16
- _workspaceComponents = function () {
17
- return data;
18
- };
19
-
20
- return data;
21
- }
22
-
23
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA","sourcesContent":["export { WorkspaceComponentsDrawer } from './workspace-components.drawer';\n"]}
@@ -1,51 +0,0 @@
1
- .emptyWorkspace {
2
- padding: 8px 8px 0 28px;
3
- display: block;
4
- }
5
-
6
- .widgetIcon {
7
- padding: 4px;
8
- border-radius: 8px;
9
- align-items: center;
10
- display: flex;
11
- &:hover,
12
- &.open {
13
- background-color: var(--bit-border-color-lightest, #ededed);
14
- }
15
- img {
16
- width: 16px;
17
- }
18
- &:active img,
19
- &.open img {
20
- filter: invert(38%) sepia(33%) saturate(7140%) hue-rotate(234deg) brightness(96%) contrast(87%);
21
- }
22
- }
23
-
24
- .filterWidgetIcon {
25
- margin-right: 8px;
26
- }
27
-
28
- .deprecateFilter {
29
- display: flex;
30
- flex-direction: row;
31
- font-size: 14px;
32
- justify-content: space-between;
33
- padding: 8px;
34
- margin: 4px 8px;
35
-
36
- > div {
37
- line-height: 16px;
38
- display: flex;
39
- }
40
-
41
- .filterIcon {
42
- img {
43
- width: 16px;
44
- }
45
-
46
- .filterIconLabel {
47
- margin: 0px 8px;
48
- font-size: 14px;
49
- }
50
- }
51
- }
@@ -1,15 +0,0 @@
1
- /// <reference types="react" />
2
- import type { DrawerType } from '@teambit/ui-foundation.ui.tree.drawer';
3
- import { ComponentTreeSlot } from '@teambit/component-tree';
4
- export declare class WorkspaceComponentsDrawer implements DrawerType {
5
- private treeNodeSlot;
6
- constructor(treeNodeSlot: ComponentTreeSlot);
7
- id: string;
8
- name: string;
9
- widgets: JSX.Element[];
10
- Context: ({ children }: {
11
- children: any;
12
- }) => JSX.Element;
13
- Filters: JSX.Element[];
14
- render: () => JSX.Element;
15
- }