@teambit/status 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/status-cmd.d.ts +44 -0
- package/dist/status-cmd.js +307 -0
- package/dist/status-cmd.js.map +1 -0
- package/dist/status.aspect.d.ts +2 -0
- package/dist/status.aspect.js +24 -0
- package/dist/status.aspect.js.map +1 -0
- package/dist/status.main.runtime.d.ts +33 -0
- package/dist/status.main.runtime.js +223 -0
- package/dist/status.main.runtime.js.map +1 -0
- package/package-tar/teambit-status-0.0.1.tgz +0 -0
- package/package.json +85 -0
- package/preview-1648178582015.js +1 -0
- package/tsconfig.json +34 -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, "StatusAspect", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _status().StatusAspect;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
exports.default = void 0;
|
|
13
|
+
|
|
14
|
+
function _status() {
|
|
15
|
+
const data = require("./status.aspect");
|
|
16
|
+
|
|
17
|
+
_status = function () {
|
|
18
|
+
return data;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
return data;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
var _default = _status().StatusAspect;
|
|
25
|
+
|
|
26
|
+
exports.default = _default;
|
|
27
|
+
|
|
28
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["index.ts"],"names":["StatusAspect"],"mappings":";;;;;;;;;;;;;AAAA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;eAGeA,sB","sourcesContent":["import { StatusAspect } from './status.aspect';\n\nexport type { StatusMain } from './status.main.runtime';\nexport default StatusAspect;\nexport { StatusAspect };\n"]}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { Command, CommandOptions } from '@teambit/cli';
|
|
2
|
+
import Component from '@teambit/legacy/dist/consumer/component';
|
|
3
|
+
import { StatusMain } from './status.main.runtime';
|
|
4
|
+
export declare class StatusCmd implements Command {
|
|
5
|
+
private status;
|
|
6
|
+
name: string;
|
|
7
|
+
shortDescription: string;
|
|
8
|
+
group: string;
|
|
9
|
+
description: string;
|
|
10
|
+
alias: string;
|
|
11
|
+
options: CommandOptions;
|
|
12
|
+
loader: boolean;
|
|
13
|
+
migration: boolean;
|
|
14
|
+
constructor(status: StatusMain);
|
|
15
|
+
json(): Promise<{
|
|
16
|
+
newComponents: Component[];
|
|
17
|
+
modifiedComponent: string[];
|
|
18
|
+
stagedComponents: string[];
|
|
19
|
+
componentsWithIssues: {
|
|
20
|
+
id: string;
|
|
21
|
+
issues: {
|
|
22
|
+
type: string;
|
|
23
|
+
description: string;
|
|
24
|
+
data: any;
|
|
25
|
+
}[];
|
|
26
|
+
}[];
|
|
27
|
+
importPendingComponents: string[];
|
|
28
|
+
autoTagPendingComponents: string[];
|
|
29
|
+
invalidComponents: import("@teambit/legacy/dist/consumer/component/consumer-component").InvalidComponent[];
|
|
30
|
+
outdatedComponents: string[];
|
|
31
|
+
mergePendingComponents: string[];
|
|
32
|
+
componentsDuringMergeState: string[];
|
|
33
|
+
componentsWithIndividualFiles: string[];
|
|
34
|
+
componentsWithTrackDirs: string[];
|
|
35
|
+
softTaggedComponents: string[];
|
|
36
|
+
snappedComponents: string[];
|
|
37
|
+
}>;
|
|
38
|
+
report(_args: any, { strict }: {
|
|
39
|
+
strict?: boolean;
|
|
40
|
+
}): Promise<{
|
|
41
|
+
data: string;
|
|
42
|
+
code: number;
|
|
43
|
+
}>;
|
|
44
|
+
}
|
|
@@ -0,0 +1,307 @@
|
|
|
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.array.sort.js");
|
|
8
|
+
|
|
9
|
+
require("core-js/modules/es.promise.js");
|
|
10
|
+
|
|
11
|
+
Object.defineProperty(exports, "__esModule", {
|
|
12
|
+
value: true
|
|
13
|
+
});
|
|
14
|
+
exports.StatusCmd = 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 _ramda() {
|
|
37
|
+
const data = _interopRequireDefault(require("ramda"));
|
|
38
|
+
|
|
39
|
+
_ramda = function () {
|
|
40
|
+
return data;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
return data;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
function _legacyBitId() {
|
|
47
|
+
const data = require("@teambit/legacy-bit-id");
|
|
48
|
+
|
|
49
|
+
_legacyBitId = function () {
|
|
50
|
+
return data;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
return data;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
function _component() {
|
|
57
|
+
const data = _interopRequireDefault(require("@teambit/legacy/dist/consumer/component"));
|
|
58
|
+
|
|
59
|
+
_component = 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 _chalkBox() {
|
|
77
|
+
const data = require("@teambit/legacy/dist/cli/chalk-box");
|
|
78
|
+
|
|
79
|
+
_chalkBox = function () {
|
|
80
|
+
return data;
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
return data;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
function _componentIssuesTemplate() {
|
|
87
|
+
const data = require("@teambit/legacy/dist/cli/templates/component-issues-template");
|
|
88
|
+
|
|
89
|
+
_componentIssuesTemplate = function () {
|
|
90
|
+
return data;
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
return data;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
function _models() {
|
|
97
|
+
const data = require("@teambit/legacy/dist/scope/models");
|
|
98
|
+
|
|
99
|
+
_models = function () {
|
|
100
|
+
return data;
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
return data;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
function _constants() {
|
|
107
|
+
const data = require("@teambit/legacy/dist/constants");
|
|
108
|
+
|
|
109
|
+
_constants = function () {
|
|
110
|
+
return data;
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
return data;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
const TROUBLESHOOTING_MESSAGE = `${_chalk().default.yellow(`learn more at https://${_constants().BASE_DOCS_DOMAIN}/components/adding-components`)}`;
|
|
117
|
+
const individualFilesDesc = `these components were added as individual files and not as directories, which are invalid in Harmony
|
|
118
|
+
please make sure each component has its own directory and re-add it. alternatively, use "bit move --component" to help with the move.`;
|
|
119
|
+
const trackDirDesc = `these components were added by an older version of Bit and therefore have "trackDir" record in the .bitmap file
|
|
120
|
+
please run "bit migrate --harmony" to convert these records to "rootDir".`;
|
|
121
|
+
|
|
122
|
+
class StatusCmd {
|
|
123
|
+
constructor(status) {
|
|
124
|
+
this.status = status;
|
|
125
|
+
(0, _defineProperty2().default)(this, "name", 'status');
|
|
126
|
+
(0, _defineProperty2().default)(this, "shortDescription", 'show the working area component(s) status');
|
|
127
|
+
(0, _defineProperty2().default)(this, "group", 'development');
|
|
128
|
+
(0, _defineProperty2().default)(this, "description", `show the working area component(s) status.\n https://${_constants().BASE_DOCS_DOMAIN}/workspace/workspace-status`);
|
|
129
|
+
(0, _defineProperty2().default)(this, "alias", 's');
|
|
130
|
+
(0, _defineProperty2().default)(this, "options", [['j', 'json', 'return a json version of the component'], ['', 'strict', 'in case issues found, exit with code 1']]);
|
|
131
|
+
(0, _defineProperty2().default)(this, "loader", true);
|
|
132
|
+
(0, _defineProperty2().default)(this, "migration", true);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
async json() {
|
|
136
|
+
const {
|
|
137
|
+
newComponents,
|
|
138
|
+
modifiedComponent,
|
|
139
|
+
stagedComponents,
|
|
140
|
+
componentsWithIssues,
|
|
141
|
+
importPendingComponents,
|
|
142
|
+
autoTagPendingComponents,
|
|
143
|
+
invalidComponents,
|
|
144
|
+
outdatedComponents,
|
|
145
|
+
mergePendingComponents,
|
|
146
|
+
componentsDuringMergeState,
|
|
147
|
+
componentsWithIndividualFiles,
|
|
148
|
+
componentsWithTrackDirs,
|
|
149
|
+
softTaggedComponents,
|
|
150
|
+
snappedComponents
|
|
151
|
+
} = await this.status.status();
|
|
152
|
+
return {
|
|
153
|
+
newComponents,
|
|
154
|
+
modifiedComponent: modifiedComponent.map(c => c.id.toString()),
|
|
155
|
+
stagedComponents: stagedComponents.map(c => c.id()),
|
|
156
|
+
componentsWithIssues: componentsWithIssues.map(c => {
|
|
157
|
+
var _c$issues;
|
|
158
|
+
|
|
159
|
+
return {
|
|
160
|
+
id: c.id.toString(),
|
|
161
|
+
issues: (_c$issues = c.issues) === null || _c$issues === void 0 ? void 0 : _c$issues.toObject()
|
|
162
|
+
};
|
|
163
|
+
}),
|
|
164
|
+
importPendingComponents: importPendingComponents.map(id => id.toString()),
|
|
165
|
+
autoTagPendingComponents: autoTagPendingComponents.map(s => s.toString()),
|
|
166
|
+
invalidComponents,
|
|
167
|
+
outdatedComponents: outdatedComponents.map(c => c.id.toString()),
|
|
168
|
+
mergePendingComponents: mergePendingComponents.map(c => c.id.toString()),
|
|
169
|
+
componentsDuringMergeState: componentsDuringMergeState.map(id => id.toString()),
|
|
170
|
+
componentsWithIndividualFiles: componentsWithIndividualFiles.map(c => c.id.toString()),
|
|
171
|
+
componentsWithTrackDirs: componentsWithTrackDirs.map(c => c.id.toString()),
|
|
172
|
+
softTaggedComponents: softTaggedComponents.map(s => s.toString()),
|
|
173
|
+
snappedComponents: snappedComponents.map(s => s.toString())
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
async report(_args, {
|
|
178
|
+
strict
|
|
179
|
+
}) {
|
|
180
|
+
const {
|
|
181
|
+
newComponents,
|
|
182
|
+
modifiedComponent,
|
|
183
|
+
stagedComponents,
|
|
184
|
+
componentsWithIssues,
|
|
185
|
+
importPendingComponents,
|
|
186
|
+
autoTagPendingComponents,
|
|
187
|
+
invalidComponents,
|
|
188
|
+
outdatedComponents,
|
|
189
|
+
mergePendingComponents,
|
|
190
|
+
componentsDuringMergeState,
|
|
191
|
+
componentsWithIndividualFiles,
|
|
192
|
+
componentsWithTrackDirs,
|
|
193
|
+
softTaggedComponents,
|
|
194
|
+
snappedComponents,
|
|
195
|
+
laneName
|
|
196
|
+
} = await this.status.status(); // If there is problem with at least one component we want to show a link to the
|
|
197
|
+
// troubleshooting doc
|
|
198
|
+
|
|
199
|
+
let showTroubleshootingLink = false;
|
|
200
|
+
|
|
201
|
+
function format(component, showVersions = false, message) {
|
|
202
|
+
const getBitId = () => {
|
|
203
|
+
if (component instanceof _legacyBitId().BitId) return component;
|
|
204
|
+
if (component instanceof _component().default) return component.id;
|
|
205
|
+
if (component instanceof _models().ModelComponent) return component.toBitId();
|
|
206
|
+
throw new Error(`type of component ${component} is not supported`);
|
|
207
|
+
};
|
|
208
|
+
|
|
209
|
+
const bitId = getBitId();
|
|
210
|
+
const issues = componentsWithIssues.find(compWithIssue => compWithIssue.id.isEqual(bitId));
|
|
211
|
+
const softTagged = softTaggedComponents.find(softTaggedId => softTaggedId.isEqual(bitId));
|
|
212
|
+
const messageStatusText = message || 'ok';
|
|
213
|
+
const messageStatusTextWithSoftTag = softTagged ? `${messageStatusText} (soft-tagged)` : messageStatusText;
|
|
214
|
+
const color = message ? 'yellow' : 'green';
|
|
215
|
+
|
|
216
|
+
const messageStatus = _chalk().default[color](messageStatusTextWithSoftTag);
|
|
217
|
+
|
|
218
|
+
if (component instanceof _legacyBitId().BitId) {
|
|
219
|
+
return `${(0, _chalkBox().formatBitString)(component.toStringWithoutVersion())} ... ${messageStatus}`;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
let bitFormatted = `${(0, _chalkBox().formatNewBit)(component)}`;
|
|
223
|
+
|
|
224
|
+
if (showVersions) {
|
|
225
|
+
if (!(component instanceof _models().ModelComponent)) {
|
|
226
|
+
throw new Error(`expect "${component}" to be instance of ModelComponent`);
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
const localVersions = component.getLocalTagsOrHashes();
|
|
230
|
+
bitFormatted += `. versions: ${localVersions.join(', ')}`;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
bitFormatted += ' ... ';
|
|
234
|
+
if (!issues) return `${bitFormatted}${messageStatus}`;
|
|
235
|
+
showTroubleshootingLink = true;
|
|
236
|
+
return `${bitFormatted} ${_chalk().default.red(_constants().statusFailureMsg)}${(0, _componentIssuesTemplate().formatIssues)(issues)}`;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
const importPendingWarning = importPendingComponents.length ? _chalk().default.yellow(`${_constants().IMPORT_PENDING_MSG}.\n`) : '';
|
|
240
|
+
|
|
241
|
+
const splitByMissing = _ramda().default.groupBy(component => {
|
|
242
|
+
return component.includes(_constants().statusFailureMsg) ? 'missing' : 'nonMissing';
|
|
243
|
+
});
|
|
244
|
+
|
|
245
|
+
const {
|
|
246
|
+
missing,
|
|
247
|
+
nonMissing
|
|
248
|
+
} = splitByMissing(newComponents.map(c => format(c)));
|
|
249
|
+
|
|
250
|
+
const outdatedTitle = _chalk().default.underline.white('pending updates');
|
|
251
|
+
|
|
252
|
+
const outdatedDesc = '(use "bit checkout [version] [component_id]" to merge changes)\n(use "bit diff [component_id] [new_version]" to compare changes)\n(use "bit log [component_id]" to list all available versions)\n';
|
|
253
|
+
const outdatedComps = outdatedComponents.map(component => {
|
|
254
|
+
return ` > ${_chalk().default.cyan(component.id.toStringWithoutVersion())} current: ${component.id.version} latest: ${// @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
|
|
255
|
+
component.latestVersion}\n`;
|
|
256
|
+
}).join('');
|
|
257
|
+
const outdatedStr = outdatedComponents.length ? [outdatedTitle, outdatedDesc, outdatedComps].join('\n') : '';
|
|
258
|
+
|
|
259
|
+
const pendingMergeTitle = _chalk().default.underline.white('pending merge');
|
|
260
|
+
|
|
261
|
+
const pendingMergeDesc = `(use "bit untag" to add local changes on top of the remote and discard local tags.
|
|
262
|
+
alternatively, to keep local tags/snaps history, use "bit merge <remote-name>/<lane-name> [component-id]")\n`;
|
|
263
|
+
const pendingMergeComps = mergePendingComponents.map(component => {
|
|
264
|
+
return ` > ${_chalk().default.cyan(component.id.toString())} local and remote have diverged and have ${component.diverge.snapsOnLocalOnly.length} and ${component.diverge.snapsOnRemoteOnly.length} different snaps each, respectively\n`;
|
|
265
|
+
}).join('');
|
|
266
|
+
const pendingMergeStr = pendingMergeComps.length ? [pendingMergeTitle, pendingMergeDesc, pendingMergeComps].join('\n') : '';
|
|
267
|
+
|
|
268
|
+
const compWithConflictsTitle = _chalk().default.underline.white('components during merge state');
|
|
269
|
+
|
|
270
|
+
const compWithConflictsDesc = `(use "bit merge [component-id] --resolve" to mark them as resolved and snap the changes
|
|
271
|
+
or use "bit merge [component-id] --abort" to cancel the merge operation)\n`;
|
|
272
|
+
const compWithConflictsComps = componentsDuringMergeState.map(id => {
|
|
273
|
+
return ` > ${_chalk().default.cyan(id.toString())}`;
|
|
274
|
+
}).join('');
|
|
275
|
+
const compWithConflictsStr = compWithConflictsComps.length ? [compWithConflictsTitle, compWithConflictsDesc, compWithConflictsComps].join('\n') : '';
|
|
276
|
+
const newComponentDescription = '\n(use "bit tag --all [version]" to lock a version with all your changes)\n';
|
|
277
|
+
const newComponentsTitle = newComponents.length ? _chalk().default.underline.white('new components') + newComponentDescription : '';
|
|
278
|
+
const newComponentsOutput = [newComponentsTitle, ...(nonMissing || []), ...(missing || [])].join('\n');
|
|
279
|
+
const modifiedDesc = '(use "bit diff" to compare changes)\n';
|
|
280
|
+
const modifiedComponentOutput = (0, _utils().immutableUnshift)(modifiedComponent.map(c => format(c)), modifiedComponent.length ? _chalk().default.underline.white('modified components') + newComponentDescription + modifiedDesc : '').join('\n');
|
|
281
|
+
const autoTagPendingOutput = (0, _utils().immutableUnshift)(autoTagPendingComponents.map(c => format(c)), autoTagPendingComponents.length ? _chalk().default.underline.white('components pending to be tagged automatically (when their dependencies are tagged)') : '').join('\n');
|
|
282
|
+
const invalidDesc = '\nthese components were failed to load.\n';
|
|
283
|
+
const invalidComponentOutput = (0, _utils().immutableUnshift)(invalidComponents.map(c => format(c.id, true, (0, _componentIssuesTemplate().getInvalidComponentLabel)(c.error))).sort(), invalidComponents.length ? _chalk().default.underline.white(_constants().statusInvalidComponentsMsg) + invalidDesc : '').join('\n');
|
|
284
|
+
const individualFilesOutput = (0, _utils().immutableUnshift)(componentsWithIndividualFiles.map(c => format(c.id, false, 'individual files')).sort(), componentsWithIndividualFiles.length ? `${_chalk().default.underline.white('components with individual files')}\n${individualFilesDesc}\n` : '').join('\n');
|
|
285
|
+
const trackDirOutput = (0, _utils().immutableUnshift)(componentsWithTrackDirs.map(c => format(c.id, false, 'trackDir record')).sort(), componentsWithTrackDirs.length ? `${_chalk().default.underline.white('components with trackDir record')}\n${trackDirDesc}\n` : '').join('\n');
|
|
286
|
+
const stagedDesc = '\n(use "bit export to push these components to a remote scope")\n';
|
|
287
|
+
const stagedComponentsOutput = (0, _utils().immutableUnshift)( // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
|
|
288
|
+
stagedComponents.map(c => format(c, true)), stagedComponents.length ? _chalk().default.underline.white('staged components') + stagedDesc : '').join('\n');
|
|
289
|
+
const snappedDesc = '\n(use "bit tag --all [version]" or "bit tag --snapped [version]" to lock a version)\n';
|
|
290
|
+
const snappedComponentsOutput = (0, _utils().immutableUnshift)( // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
|
|
291
|
+
snappedComponents.map(c => format(c, true)), snappedComponents.length ? _chalk().default.underline.white('snapped components') + snappedDesc : '').join('\n');
|
|
292
|
+
const laneStr = laneName ? `\non ${_chalk().default.bold(laneName)} lane` : '';
|
|
293
|
+
const troubleshootingStr = showTroubleshootingLink ? `\n${TROUBLESHOOTING_MESSAGE}` : '';
|
|
294
|
+
const statusMsg = importPendingWarning + [outdatedStr, pendingMergeStr, compWithConflictsStr, newComponentsOutput, modifiedComponentOutput, snappedComponentsOutput, stagedComponentsOutput, autoTagPendingOutput, invalidComponentOutput, individualFilesOutput, trackDirOutput].filter(x => x).join(_chalk().default.underline('\n \n') + _chalk().default.white('\n')) + troubleshootingStr;
|
|
295
|
+
const results = (statusMsg || _chalk().default.yellow(_constants().statusWorkspaceIsCleanMsg)) + laneStr;
|
|
296
|
+
const exitCode = componentsWithIssues.length && strict ? 1 : 0;
|
|
297
|
+
return {
|
|
298
|
+
data: results,
|
|
299
|
+
code: exitCode
|
|
300
|
+
};
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
exports.StatusCmd = StatusCmd;
|
|
306
|
+
|
|
307
|
+
//# sourceMappingURL=status-cmd.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["status-cmd.ts"],"names":["TROUBLESHOOTING_MESSAGE","chalk","yellow","BASE_DOCS_DOMAIN","individualFilesDesc","trackDirDesc","StatusCmd","constructor","status","json","newComponents","modifiedComponent","stagedComponents","componentsWithIssues","importPendingComponents","autoTagPendingComponents","invalidComponents","outdatedComponents","mergePendingComponents","componentsDuringMergeState","componentsWithIndividualFiles","componentsWithTrackDirs","softTaggedComponents","snappedComponents","map","c","id","toString","issues","toObject","s","report","_args","strict","laneName","showTroubleshootingLink","format","component","showVersions","message","getBitId","BitId","Component","ModelComponent","toBitId","Error","bitId","find","compWithIssue","isEqual","softTagged","softTaggedId","messageStatusText","messageStatusTextWithSoftTag","color","messageStatus","toStringWithoutVersion","bitFormatted","localVersions","getLocalTagsOrHashes","join","red","statusFailureMsg","importPendingWarning","length","IMPORT_PENDING_MSG","splitByMissing","R","groupBy","includes","missing","nonMissing","outdatedTitle","underline","white","outdatedDesc","outdatedComps","cyan","version","latestVersion","outdatedStr","pendingMergeTitle","pendingMergeDesc","pendingMergeComps","diverge","snapsOnLocalOnly","snapsOnRemoteOnly","pendingMergeStr","compWithConflictsTitle","compWithConflictsDesc","compWithConflictsComps","compWithConflictsStr","newComponentDescription","newComponentsTitle","newComponentsOutput","modifiedDesc","modifiedComponentOutput","autoTagPendingOutput","invalidDesc","invalidComponentOutput","error","sort","statusInvalidComponentsMsg","individualFilesOutput","trackDirOutput","stagedDesc","stagedComponentsOutput","snappedDesc","snappedComponentsOutput","laneStr","bold","troubleshootingStr","statusMsg","filter","x","results","statusWorkspaceIsCleanMsg","exitCode","data","code"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;;A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I,QAAOjC,iBAAM6G,IAAN,CAAW5E,QAAX,CAAqB,OAAhC,GAAyC,EAAjE;AAEA,UAAM6E,kBAAkB,GAAG5E,uBAAuB,GAAI,KAAInC,uBAAwB,EAAhC,GAAoC,EAAtF;AAEA,UAAMgH,SAAS,GACbjD,oBAAoB,GACpB,CACEiB,WADF,EAEEO,eAFF,EAGEI,oBAHF,EAIEG,mBAJF,EAKEE,uBALF,EAMEY,uBANF,EAOEF,sBAPF,EAQET,oBARF,EASEE,sBATF,EAUEI,qBAVF,EAWEC,cAXF,EAaGS,MAbH,CAaWC,CAAD,IAAOA,CAbjB,EAcGtD,IAdH,CAcQ3D,iBAAMwE,SAAN,CAAgB,+BAAhB,IAAmDxE,iBAAMyE,KAAN,CAAY,IAAZ,CAd3D,CADA,GAgBAqC,kBAjBF;AAmBA,UAAMI,OAAO,GAAG,CAACH,SAAS,IAAI/G,iBAAMC,MAAN,CAAakH,sCAAb,CAAd,IAAyDP,OAAzE;AAEA,UAAMQ,QAAQ,GAAGxG,oBAAoB,CAACmD,MAArB,IAA+B/B,MAA/B,GAAwC,CAAxC,GAA4C,CAA7D;AAEA,WAAO;AACLqF,MAAAA,IAAI,EAAEH,OADD;AAELI,MAAAA,IAAI,EAAEF;AAFD,KAAP;AAID;;AApPuC","sourcesContent":["import chalk from 'chalk';\nimport R from 'ramda';\nimport { Command, CommandOptions } from '@teambit/cli';\nimport { BitId } from '@teambit/legacy-bit-id';\nimport Component from '@teambit/legacy/dist/consumer/component';\nimport { immutableUnshift } from '@teambit/legacy/dist/utils';\nimport { formatBitString, formatNewBit } from '@teambit/legacy/dist/cli/chalk-box';\nimport { getInvalidComponentLabel, formatIssues } from '@teambit/legacy/dist/cli/templates/component-issues-template';\nimport { ModelComponent } from '@teambit/legacy/dist/scope/models';\nimport {\n BASE_DOCS_DOMAIN,\n IMPORT_PENDING_MSG,\n statusFailureMsg,\n statusInvalidComponentsMsg,\n statusWorkspaceIsCleanMsg,\n} from '@teambit/legacy/dist/constants';\nimport { StatusMain, StatusResult } from './status.main.runtime';\n\nconst TROUBLESHOOTING_MESSAGE = `${chalk.yellow(\n `learn more at https://${BASE_DOCS_DOMAIN}/components/adding-components`\n)}`;\n\nconst individualFilesDesc = `these components were added as individual files and not as directories, which are invalid in Harmony\nplease make sure each component has its own directory and re-add it. alternatively, use \"bit move --component\" to help with the move.`;\nconst trackDirDesc = `these components were added by an older version of Bit and therefore have \"trackDir\" record in the .bitmap file\nplease run \"bit migrate --harmony\" to convert these records to \"rootDir\".`;\n\nexport class StatusCmd implements Command {\n name = 'status';\n shortDescription = 'show the working area component(s) status';\n group = 'development';\n description = `show the working area component(s) status.\\n https://${BASE_DOCS_DOMAIN}/workspace/workspace-status`;\n alias = 's';\n options = [\n ['j', 'json', 'return a json version of the component'],\n ['', 'strict', 'in case issues found, exit with code 1'],\n ] as CommandOptions;\n loader = true;\n migration = true;\n\n constructor(private status: StatusMain) {}\n\n async json() {\n const {\n newComponents,\n modifiedComponent,\n stagedComponents,\n componentsWithIssues,\n importPendingComponents,\n autoTagPendingComponents,\n invalidComponents,\n outdatedComponents,\n mergePendingComponents,\n componentsDuringMergeState,\n componentsWithIndividualFiles,\n componentsWithTrackDirs,\n softTaggedComponents,\n snappedComponents,\n }: StatusResult = await this.status.status();\n return {\n newComponents,\n modifiedComponent: modifiedComponent.map((c) => c.id.toString()),\n stagedComponents: stagedComponents.map((c) => c.id()),\n componentsWithIssues: componentsWithIssues.map((c) => ({\n id: c.id.toString(),\n issues: c.issues?.toObject(),\n })),\n importPendingComponents: importPendingComponents.map((id) => id.toString()),\n autoTagPendingComponents: autoTagPendingComponents.map((s) => s.toString()),\n invalidComponents,\n outdatedComponents: outdatedComponents.map((c) => c.id.toString()),\n mergePendingComponents: mergePendingComponents.map((c) => c.id.toString()),\n componentsDuringMergeState: componentsDuringMergeState.map((id) => id.toString()),\n componentsWithIndividualFiles: componentsWithIndividualFiles.map((c) => c.id.toString()),\n componentsWithTrackDirs: componentsWithTrackDirs.map((c) => c.id.toString()),\n softTaggedComponents: softTaggedComponents.map((s) => s.toString()),\n snappedComponents: snappedComponents.map((s) => s.toString()),\n };\n }\n\n async report(_args, { strict }: { strict?: boolean }) {\n const {\n newComponents,\n modifiedComponent,\n stagedComponents,\n componentsWithIssues,\n importPendingComponents,\n autoTagPendingComponents,\n invalidComponents,\n outdatedComponents,\n mergePendingComponents,\n componentsDuringMergeState,\n componentsWithIndividualFiles,\n componentsWithTrackDirs,\n softTaggedComponents,\n snappedComponents,\n laneName,\n }: StatusResult = await this.status.status();\n // If there is problem with at least one component we want to show a link to the\n // troubleshooting doc\n let showTroubleshootingLink = false;\n\n function format(component: BitId | Component | ModelComponent, showVersions = false, message?: string): string {\n const getBitId = () => {\n if (component instanceof BitId) return component;\n if (component instanceof Component) return component.id;\n if (component instanceof ModelComponent) return component.toBitId();\n throw new Error(`type of component ${component} is not supported`);\n };\n const bitId = getBitId();\n const issues = componentsWithIssues.find((compWithIssue: Component) => compWithIssue.id.isEqual(bitId));\n const softTagged = softTaggedComponents.find((softTaggedId) => softTaggedId.isEqual(bitId));\n\n const messageStatusText = message || 'ok';\n const messageStatusTextWithSoftTag = softTagged ? `${messageStatusText} (soft-tagged)` : messageStatusText;\n const color = message ? 'yellow' : 'green';\n const messageStatus = chalk[color](messageStatusTextWithSoftTag);\n\n if (component instanceof BitId) {\n return `${formatBitString(component.toStringWithoutVersion())} ... ${messageStatus}`;\n }\n let bitFormatted = `${formatNewBit(component)}`;\n if (showVersions) {\n if (!(component instanceof ModelComponent)) {\n throw new Error(`expect \"${component}\" to be instance of ModelComponent`);\n }\n const localVersions = component.getLocalTagsOrHashes();\n bitFormatted += `. versions: ${localVersions.join(', ')}`;\n }\n bitFormatted += ' ... ';\n if (!issues) return `${bitFormatted}${messageStatus}`;\n showTroubleshootingLink = true;\n return `${bitFormatted} ${chalk.red(statusFailureMsg)}${formatIssues(issues)}`;\n }\n\n const importPendingWarning = importPendingComponents.length ? chalk.yellow(`${IMPORT_PENDING_MSG}.\\n`) : '';\n\n const splitByMissing = R.groupBy((component) => {\n return component.includes(statusFailureMsg) ? 'missing' : 'nonMissing';\n });\n const { missing, nonMissing } = splitByMissing(newComponents.map((c) => format(c)));\n\n const outdatedTitle = chalk.underline.white('pending updates');\n const outdatedDesc =\n '(use \"bit checkout [version] [component_id]\" to merge changes)\\n(use \"bit diff [component_id] [new_version]\" to compare changes)\\n(use \"bit log [component_id]\" to list all available versions)\\n';\n const outdatedComps = outdatedComponents\n .map((component) => {\n return ` > ${chalk.cyan(component.id.toStringWithoutVersion())} current: ${component.id.version} latest: ${\n // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n component.latestVersion\n }\\n`;\n })\n .join('');\n\n const outdatedStr = outdatedComponents.length ? [outdatedTitle, outdatedDesc, outdatedComps].join('\\n') : '';\n\n const pendingMergeTitle = chalk.underline.white('pending merge');\n const pendingMergeDesc = `(use \"bit untag\" to add local changes on top of the remote and discard local tags.\nalternatively, to keep local tags/snaps history, use \"bit merge <remote-name>/<lane-name> [component-id]\")\\n`;\n const pendingMergeComps = mergePendingComponents\n .map((component) => {\n return ` > ${chalk.cyan(component.id.toString())} local and remote have diverged and have ${\n component.diverge.snapsOnLocalOnly.length\n } and ${component.diverge.snapsOnRemoteOnly.length} different snaps each, respectively\\n`;\n })\n .join('');\n\n const pendingMergeStr = pendingMergeComps.length\n ? [pendingMergeTitle, pendingMergeDesc, pendingMergeComps].join('\\n')\n : '';\n\n const compWithConflictsTitle = chalk.underline.white('components during merge state');\n const compWithConflictsDesc = `(use \"bit merge [component-id] --resolve\" to mark them as resolved and snap the changes\nor use \"bit merge [component-id] --abort\" to cancel the merge operation)\\n`;\n const compWithConflictsComps = componentsDuringMergeState\n .map((id) => {\n return ` > ${chalk.cyan(id.toString())}`;\n })\n .join('');\n\n const compWithConflictsStr = compWithConflictsComps.length\n ? [compWithConflictsTitle, compWithConflictsDesc, compWithConflictsComps].join('\\n')\n : '';\n\n const newComponentDescription = '\\n(use \"bit tag --all [version]\" to lock a version with all your changes)\\n';\n const newComponentsTitle = newComponents.length\n ? chalk.underline.white('new components') + newComponentDescription\n : '';\n\n const newComponentsOutput = [newComponentsTitle, ...(nonMissing || []), ...(missing || [])].join('\\n');\n\n const modifiedDesc = '(use \"bit diff\" to compare changes)\\n';\n const modifiedComponentOutput = immutableUnshift(\n modifiedComponent.map((c) => format(c)),\n modifiedComponent.length\n ? chalk.underline.white('modified components') + newComponentDescription + modifiedDesc\n : ''\n ).join('\\n');\n\n const autoTagPendingOutput = immutableUnshift(\n autoTagPendingComponents.map((c) => format(c)),\n autoTagPendingComponents.length\n ? chalk.underline.white('components pending to be tagged automatically (when their dependencies are tagged)')\n : ''\n ).join('\\n');\n\n const invalidDesc = '\\nthese components were failed to load.\\n';\n const invalidComponentOutput = immutableUnshift(\n invalidComponents.map((c) => format(c.id, true, getInvalidComponentLabel(c.error))).sort(),\n invalidComponents.length ? chalk.underline.white(statusInvalidComponentsMsg) + invalidDesc : ''\n ).join('\\n');\n\n const individualFilesOutput = immutableUnshift(\n componentsWithIndividualFiles.map((c) => format(c.id, false, 'individual files')).sort(),\n componentsWithIndividualFiles.length\n ? `${chalk.underline.white('components with individual files')}\\n${individualFilesDesc}\\n`\n : ''\n ).join('\\n');\n\n const trackDirOutput = immutableUnshift(\n componentsWithTrackDirs.map((c) => format(c.id, false, 'trackDir record')).sort(),\n componentsWithTrackDirs.length\n ? `${chalk.underline.white('components with trackDir record')}\\n${trackDirDesc}\\n`\n : ''\n ).join('\\n');\n\n const stagedDesc = '\\n(use \"bit export to push these components to a remote scope\")\\n';\n const stagedComponentsOutput = immutableUnshift(\n // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n stagedComponents.map((c) => format(c, true)),\n stagedComponents.length ? chalk.underline.white('staged components') + stagedDesc : ''\n ).join('\\n');\n\n const snappedDesc = '\\n(use \"bit tag --all [version]\" or \"bit tag --snapped [version]\" to lock a version)\\n';\n const snappedComponentsOutput = immutableUnshift(\n // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n snappedComponents.map((c) => format(c, true)),\n snappedComponents.length ? chalk.underline.white('snapped components') + snappedDesc : ''\n ).join('\\n');\n\n const laneStr = laneName ? `\\non ${chalk.bold(laneName)} lane` : '';\n\n const troubleshootingStr = showTroubleshootingLink ? `\\n${TROUBLESHOOTING_MESSAGE}` : '';\n\n const statusMsg =\n importPendingWarning +\n [\n outdatedStr,\n pendingMergeStr,\n compWithConflictsStr,\n newComponentsOutput,\n modifiedComponentOutput,\n snappedComponentsOutput,\n stagedComponentsOutput,\n autoTagPendingOutput,\n invalidComponentOutput,\n individualFilesOutput,\n trackDirOutput,\n ]\n .filter((x) => x)\n .join(chalk.underline('\\n \\n') + chalk.white('\\n')) +\n troubleshootingStr;\n\n const results = (statusMsg || chalk.yellow(statusWorkspaceIsCleanMsg)) + laneStr;\n\n const exitCode = componentsWithIssues.length && strict ? 1 : 0;\n\n return {\n data: results,\n code: exitCode,\n };\n }\n}\n"]}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.StatusAspect = 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 StatusAspect = _harmony().Aspect.create({
|
|
19
|
+
id: 'teambit.component/status'
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
exports.StatusAspect = StatusAspect;
|
|
23
|
+
|
|
24
|
+
//# sourceMappingURL=status.aspect.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["status.aspect.ts"],"names":["StatusAspect","Aspect","create","id"],"mappings":";;;;;;;AAAA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAEO,MAAMA,YAAY,GAAGC,kBAAOC,MAAP,CAAc;AACxCC,EAAAA,EAAE,EAAE;AADoC,CAAd,CAArB","sourcesContent":["import { Aspect } from '@teambit/harmony';\n\nexport const StatusAspect = Aspect.create({\n id: 'teambit.component/status',\n});\n"]}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { CLIMain } from '@teambit/cli';
|
|
2
|
+
import { Workspace } from '@teambit/workspace';
|
|
3
|
+
import { BitId, BitIds } from '@teambit/legacy/dist/bit-id';
|
|
4
|
+
import Component from '@teambit/legacy/dist/consumer/component';
|
|
5
|
+
import { DivergedComponent } from '@teambit/legacy/dist/consumer/component/components-list';
|
|
6
|
+
import { InvalidComponent } from '@teambit/legacy/dist/consumer/component/consumer-component';
|
|
7
|
+
import { ModelComponent } from '@teambit/legacy/dist/scope/models';
|
|
8
|
+
export declare type StatusResult = {
|
|
9
|
+
newComponents: Component[];
|
|
10
|
+
modifiedComponent: Component[];
|
|
11
|
+
stagedComponents: ModelComponent[];
|
|
12
|
+
componentsWithIssues: Component[];
|
|
13
|
+
importPendingComponents: BitId[];
|
|
14
|
+
autoTagPendingComponents: BitId[];
|
|
15
|
+
invalidComponents: InvalidComponent[];
|
|
16
|
+
outdatedComponents: Component[];
|
|
17
|
+
mergePendingComponents: DivergedComponent[];
|
|
18
|
+
componentsDuringMergeState: BitIds;
|
|
19
|
+
componentsWithIndividualFiles: Component[];
|
|
20
|
+
componentsWithTrackDirs: Component[];
|
|
21
|
+
softTaggedComponents: BitId[];
|
|
22
|
+
snappedComponents: BitId[];
|
|
23
|
+
laneName: string | null;
|
|
24
|
+
};
|
|
25
|
+
export declare class StatusMain {
|
|
26
|
+
private workspace;
|
|
27
|
+
constructor(workspace: Workspace);
|
|
28
|
+
status(): Promise<StatusResult>;
|
|
29
|
+
static slots: never[];
|
|
30
|
+
static dependencies: import("@teambit/harmony").Aspect[];
|
|
31
|
+
static runtime: import("@teambit/harmony").RuntimeDefinition;
|
|
32
|
+
static provider([cli, workspace]: [CLIMain, Workspace]): Promise<StatusMain>;
|
|
33
|
+
}
|
|
@@ -0,0 +1,223 @@
|
|
|
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.StatusMain = 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 _componentIssues() {
|
|
35
|
+
const data = require("@teambit/component-issues");
|
|
36
|
+
|
|
37
|
+
_componentIssues = 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 _analytics() {
|
|
55
|
+
const data = require("@teambit/legacy/dist/analytics/analytics");
|
|
56
|
+
|
|
57
|
+
_analytics = 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 _loaderMessages() {
|
|
75
|
+
const data = require("@teambit/legacy/dist/cli/loader/loader-messages");
|
|
76
|
+
|
|
77
|
+
_loaderMessages = function () {
|
|
78
|
+
return data;
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
return data;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
function _componentsPendingImport() {
|
|
85
|
+
const data = _interopRequireDefault(require("@teambit/legacy/dist/consumer/component-ops/exceptions/components-pending-import"));
|
|
86
|
+
|
|
87
|
+
_componentsPendingImport = function () {
|
|
88
|
+
return data;
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
return data;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
function _componentsList() {
|
|
95
|
+
const data = _interopRequireDefault(require("@teambit/legacy/dist/consumer/component/components-list"));
|
|
96
|
+
|
|
97
|
+
_componentsList = function () {
|
|
98
|
+
return data;
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
return data;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
function _exceptions() {
|
|
105
|
+
const data = require("@teambit/legacy/dist/consumer/exceptions");
|
|
106
|
+
|
|
107
|
+
_exceptions = function () {
|
|
108
|
+
return data;
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
return data;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
function _statusCmd() {
|
|
115
|
+
const data = require("./status-cmd");
|
|
116
|
+
|
|
117
|
+
_statusCmd = function () {
|
|
118
|
+
return data;
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
return data;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
function _status() {
|
|
125
|
+
const data = require("./status.aspect");
|
|
126
|
+
|
|
127
|
+
_status = function () {
|
|
128
|
+
return data;
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
return data;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
class StatusMain {
|
|
135
|
+
constructor(workspace) {
|
|
136
|
+
this.workspace = workspace;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
async status() {
|
|
140
|
+
if (!this.workspace) throw new (_exceptions().ConsumerNotFound)();
|
|
141
|
+
|
|
142
|
+
_loader().default.start(_loaderMessages().BEFORE_STATUS);
|
|
143
|
+
|
|
144
|
+
const consumer = this.workspace.consumer;
|
|
145
|
+
const laneObj = await consumer.getCurrentLaneObject();
|
|
146
|
+
const componentsList = new (_componentsList().default)(consumer);
|
|
147
|
+
const newComponents = await componentsList.listNewComponents(true);
|
|
148
|
+
const modifiedComponent = await componentsList.listModifiedComponents(true);
|
|
149
|
+
const stagedComponents = await componentsList.listExportPendingComponents(laneObj);
|
|
150
|
+
const autoTagPendingComponents = await componentsList.listAutoTagPendingComponents();
|
|
151
|
+
const autoTagPendingComponentsIds = autoTagPendingComponents.map(component => component.id);
|
|
152
|
+
const allInvalidComponents = await componentsList.listInvalidComponents();
|
|
153
|
+
const importPendingComponents = allInvalidComponents // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
|
|
154
|
+
.filter(c => c.error instanceof _componentsPendingImport().default) // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
|
|
155
|
+
.map(i => i.id); // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
|
|
156
|
+
|
|
157
|
+
const invalidComponents = allInvalidComponents.filter(c => !(c.error instanceof _componentsPendingImport().default));
|
|
158
|
+
const outdatedComponents = await componentsList.listOutdatedComponents();
|
|
159
|
+
const mergePendingComponents = await componentsList.listMergePendingComponents();
|
|
160
|
+
const newAndModified = newComponents.concat(modifiedComponent);
|
|
161
|
+
const componentsWithIssues = newAndModified.filter(component => {
|
|
162
|
+
if (consumer.isLegacy && component.issues) {
|
|
163
|
+
component.issues.delete(_componentIssues().IssuesClasses.RelativeComponentsAuthored);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
return component.issues && !component.issues.isEmpty();
|
|
167
|
+
});
|
|
168
|
+
const componentsDuringMergeState = componentsList.listDuringMergeStateComponents();
|
|
169
|
+
const softTaggedComponents = componentsList.listSoftTaggedComponents();
|
|
170
|
+
const snappedComponents = (await componentsList.listSnappedComponentsOnMain()).map(c => c.toBitId());
|
|
171
|
+
const currentLane = consumer.getCurrentLaneId();
|
|
172
|
+
const laneName = currentLane.isDefault() ? null : currentLane.name;
|
|
173
|
+
|
|
174
|
+
_analytics().Analytics.setExtraData('new_components', newComponents.length);
|
|
175
|
+
|
|
176
|
+
_analytics().Analytics.setExtraData('staged_components', stagedComponents.length);
|
|
177
|
+
|
|
178
|
+
_analytics().Analytics.setExtraData('num_components_with_missing_dependencies', componentsWithIssues.length);
|
|
179
|
+
|
|
180
|
+
_analytics().Analytics.setExtraData('autoTagPendingComponents', autoTagPendingComponents.length);
|
|
181
|
+
|
|
182
|
+
_analytics().Analytics.setExtraData('deleted', invalidComponents.length);
|
|
183
|
+
|
|
184
|
+
await consumer.onDestroy();
|
|
185
|
+
return {
|
|
186
|
+
newComponents: _componentsList().default.sortComponentsByName(newComponents),
|
|
187
|
+
// @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
|
|
188
|
+
modifiedComponent: _componentsList().default.sortComponentsByName(modifiedComponent),
|
|
189
|
+
stagedComponents: _componentsList().default.sortComponentsByName(stagedComponents),
|
|
190
|
+
componentsWithIssues,
|
|
191
|
+
// no need to sort, we don't print it as is
|
|
192
|
+
importPendingComponents,
|
|
193
|
+
// no need to sort, we use only its length
|
|
194
|
+
autoTagPendingComponents: _componentsList().default.sortComponentsByName(autoTagPendingComponentsIds),
|
|
195
|
+
// @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
|
|
196
|
+
invalidComponents,
|
|
197
|
+
outdatedComponents,
|
|
198
|
+
mergePendingComponents,
|
|
199
|
+
componentsDuringMergeState,
|
|
200
|
+
componentsWithIndividualFiles: await componentsList.listComponentsWithIndividualFiles(),
|
|
201
|
+
componentsWithTrackDirs: await componentsList.listComponentsWithTrackDir(),
|
|
202
|
+
softTaggedComponents,
|
|
203
|
+
snappedComponents,
|
|
204
|
+
laneName
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
static async provider([cli, workspace]) {
|
|
209
|
+
const statusMain = new StatusMain(workspace);
|
|
210
|
+
cli.register(new (_statusCmd().StatusCmd)(statusMain));
|
|
211
|
+
return statusMain;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
exports.StatusMain = StatusMain;
|
|
217
|
+
(0, _defineProperty2().default)(StatusMain, "slots", []);
|
|
218
|
+
(0, _defineProperty2().default)(StatusMain, "dependencies", [_cli().CLIAspect, _workspace().default]);
|
|
219
|
+
(0, _defineProperty2().default)(StatusMain, "runtime", _cli().MainRuntime);
|
|
220
|
+
|
|
221
|
+
_status().StatusAspect.addRuntime(StatusMain);
|
|
222
|
+
|
|
223
|
+
//# sourceMappingURL=status.main.runtime.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["status.main.runtime.ts"],"names":["StatusMain","constructor","workspace","status","ConsumerNotFound","loader","start","BEFORE_STATUS","consumer","laneObj","getCurrentLaneObject","componentsList","ComponentsList","newComponents","listNewComponents","modifiedComponent","listModifiedComponents","stagedComponents","listExportPendingComponents","autoTagPendingComponents","listAutoTagPendingComponents","autoTagPendingComponentsIds","map","component","id","allInvalidComponents","listInvalidComponents","importPendingComponents","filter","c","error","ComponentsPendingImport","i","invalidComponents","outdatedComponents","listOutdatedComponents","mergePendingComponents","listMergePendingComponents","newAndModified","concat","componentsWithIssues","isLegacy","issues","delete","IssuesClasses","RelativeComponentsAuthored","isEmpty","componentsDuringMergeState","listDuringMergeStateComponents","softTaggedComponents","listSoftTaggedComponents","snappedComponents","listSnappedComponentsOnMain","toBitId","currentLane","getCurrentLaneId","laneName","isDefault","name","Analytics","setExtraData","length","onDestroy","sortComponentsByName","componentsWithIndividualFiles","listComponentsWithIndividualFiles","componentsWithTrackDirs","listComponentsWithTrackDir","provider","cli","statusMain","register","StatusCmd","CLIAspect","WorkspaceAspect","MainRuntime","StatusAspect","addRuntime"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;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;;AAEA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAGA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAEA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAoBO,MAAMA,UAAN,CAAiB;AACtBC,EAAAA,WAAW,CAASC,SAAT,EAA+B;AAAA,SAAtBA,SAAsB,GAAtBA,SAAsB;AAAE;;AAEhC,QAANC,MAAM,GAA0B;AACpC,QAAI,CAAC,KAAKD,SAAV,EAAqB,MAAM,KAAIE,8BAAJ,GAAN;;AACrBC,sBAAOC,KAAP,CAAaC,+BAAb;;AACA,UAAMC,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Jb;AAKLuB,MAAAA,oBALK;AAKiB;AACtBb,MAAAA,uBANK;AAMoB;AACzBR,MAAAA,wBAAwB,EAAEP,0BAAemD,oBAAf,CAAoC1C,2BAApC,CAPrB;AAQL;AACAY,MAAAA,iBATK;AAULC,MAAAA,kBAVK;AAWLE,MAAAA,sBAXK;AAYLW,MAAAA,0BAZK;AAaLiB,MAAAA,6BAA6B,EAAE,MAAMrD,cAAc,CAACsD,iCAAf,EAbhC;AAcLC,MAAAA,uBAAuB,EAAE,MAAMvD,cAAc,CAACwD,0BAAf,EAd1B;AAeLlB,MAAAA,oBAfK;AAgBLE,MAAAA,iBAhBK;AAiBLK,MAAAA;AAjBK,KAAP;AAmBD;;AAKoB,eAARY,QAAQ,CAAC,CAACC,GAAD,EAAMnE,SAAN,CAAD,EAAyC;AAC5D,UAAMoE,UAAU,GAAG,IAAItE,UAAJ,CAAeE,SAAf,CAAnB;AACAmE,IAAAA,GAAG,CAACE,QAAJ,CAAa,KAAIC,sBAAJ,EAAcF,UAAd,CAAb;AACA,WAAOA,UAAP;AACD;;AAtEqB;;;gCAAXtE,U,WA+DI,E;gCA/DJA,U,kBAgEW,CAACyE,gBAAD,EAAYC,oBAAZ,C;gCAhEX1E,U,aAiEM2E,kB;;AAQnBC,uBAAaC,UAAb,CAAwB7E,UAAxB","sourcesContent":["import { CLIAspect, CLIMain, MainRuntime } from '@teambit/cli';\nimport { IssuesClasses } from '@teambit/component-issues';\nimport WorkspaceAspect, { Workspace } from '@teambit/workspace';\nimport { Analytics } from '@teambit/legacy/dist/analytics/analytics';\nimport { BitId, BitIds } from '@teambit/legacy/dist/bit-id';\nimport loader from '@teambit/legacy/dist/cli/loader';\nimport { BEFORE_STATUS } from '@teambit/legacy/dist/cli/loader/loader-messages';\nimport Component from '@teambit/legacy/dist/consumer/component';\nimport ComponentsPendingImport from '@teambit/legacy/dist/consumer/component-ops/exceptions/components-pending-import';\nimport ComponentsList, { DivergedComponent } from '@teambit/legacy/dist/consumer/component/components-list';\nimport { InvalidComponent } from '@teambit/legacy/dist/consumer/component/consumer-component';\nimport { ModelComponent } from '@teambit/legacy/dist/scope/models';\nimport { ConsumerNotFound } from '@teambit/legacy/dist/consumer/exceptions';\n\nimport { StatusCmd } from './status-cmd';\nimport { StatusAspect } from './status.aspect';\n\nexport type StatusResult = {\n newComponents: Component[];\n modifiedComponent: Component[];\n stagedComponents: ModelComponent[];\n componentsWithIssues: Component[];\n importPendingComponents: BitId[];\n autoTagPendingComponents: BitId[];\n invalidComponents: InvalidComponent[];\n outdatedComponents: Component[];\n mergePendingComponents: DivergedComponent[];\n componentsDuringMergeState: BitIds;\n componentsWithIndividualFiles: Component[];\n componentsWithTrackDirs: Component[];\n softTaggedComponents: BitId[];\n snappedComponents: BitId[];\n laneName: string | null; // null if default\n};\n\nexport class StatusMain {\n constructor(private workspace: Workspace) {}\n\n async status(): Promise<StatusResult> {\n if (!this.workspace) throw new ConsumerNotFound();\n loader.start(BEFORE_STATUS);\n const consumer = this.workspace.consumer;\n const laneObj = await consumer.getCurrentLaneObject();\n const componentsList = new ComponentsList(consumer);\n const newComponents: Component[] = (await componentsList.listNewComponents(true)) as Component[];\n const modifiedComponent = (await componentsList.listModifiedComponents(true)) as Component[];\n const stagedComponents: ModelComponent[] = await componentsList.listExportPendingComponents(laneObj);\n const autoTagPendingComponents = await componentsList.listAutoTagPendingComponents();\n const autoTagPendingComponentsIds = autoTagPendingComponents.map((component) => component.id);\n const allInvalidComponents = await componentsList.listInvalidComponents();\n const importPendingComponents = allInvalidComponents\n // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n .filter((c) => c.error instanceof ComponentsPendingImport)\n // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n .map((i) => i.id);\n // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n const invalidComponents = allInvalidComponents.filter((c) => !(c.error instanceof ComponentsPendingImport));\n const outdatedComponents = await componentsList.listOutdatedComponents();\n const mergePendingComponents = await componentsList.listMergePendingComponents();\n const newAndModified: Component[] = newComponents.concat(modifiedComponent);\n const componentsWithIssues = newAndModified.filter((component: Component) => {\n if (consumer.isLegacy && component.issues) {\n component.issues.delete(IssuesClasses.RelativeComponentsAuthored);\n }\n return component.issues && !component.issues.isEmpty();\n });\n const componentsDuringMergeState = componentsList.listDuringMergeStateComponents();\n const softTaggedComponents = componentsList.listSoftTaggedComponents();\n const snappedComponents = (await componentsList.listSnappedComponentsOnMain()).map((c) => c.toBitId());\n const currentLane = consumer.getCurrentLaneId();\n const laneName = currentLane.isDefault() ? null : currentLane.name;\n Analytics.setExtraData('new_components', newComponents.length);\n Analytics.setExtraData('staged_components', stagedComponents.length);\n Analytics.setExtraData('num_components_with_missing_dependencies', componentsWithIssues.length);\n Analytics.setExtraData('autoTagPendingComponents', autoTagPendingComponents.length);\n Analytics.setExtraData('deleted', invalidComponents.length);\n await consumer.onDestroy();\n return {\n newComponents: ComponentsList.sortComponentsByName(newComponents),\n // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n modifiedComponent: ComponentsList.sortComponentsByName(modifiedComponent),\n stagedComponents: ComponentsList.sortComponentsByName(stagedComponents),\n componentsWithIssues, // no need to sort, we don't print it as is\n importPendingComponents, // no need to sort, we use only its length\n autoTagPendingComponents: ComponentsList.sortComponentsByName(autoTagPendingComponentsIds),\n // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n invalidComponents,\n outdatedComponents,\n mergePendingComponents,\n componentsDuringMergeState,\n componentsWithIndividualFiles: await componentsList.listComponentsWithIndividualFiles(),\n componentsWithTrackDirs: await componentsList.listComponentsWithTrackDir(),\n softTaggedComponents,\n snappedComponents,\n laneName,\n };\n }\n\n static slots = [];\n static dependencies = [CLIAspect, WorkspaceAspect];\n static runtime = MainRuntime;\n static async provider([cli, workspace]: [CLIMain, Workspace]) {\n const statusMain = new StatusMain(workspace);\n cli.register(new StatusCmd(statusMain));\n return statusMain;\n }\n}\n\nStatusAspect.addRuntime(StatusMain);\n"]}
|
|
Binary file
|
package/package.json
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@teambit/status",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"main": "dist/index.js",
|
|
5
|
+
"componentId": {
|
|
6
|
+
"scope": "teambit.component",
|
|
7
|
+
"name": "status",
|
|
8
|
+
"version": "0.0.1"
|
|
9
|
+
},
|
|
10
|
+
"dependencies": {
|
|
11
|
+
"chalk": "2.4.2",
|
|
12
|
+
"ramda": "0.27.1",
|
|
13
|
+
"@teambit/harmony": "0.2.11",
|
|
14
|
+
"@babel/runtime": "7.12.18",
|
|
15
|
+
"core-js": "^3.0.0",
|
|
16
|
+
"@teambit/cli": "0.0.461",
|
|
17
|
+
"@teambit/legacy-bit-id": "0.0.399",
|
|
18
|
+
"@teambit/component-issues": "0.0.48",
|
|
19
|
+
"@teambit/workspace": "0.0.689"
|
|
20
|
+
},
|
|
21
|
+
"devDependencies": {
|
|
22
|
+
"@types/mocha": "9.1.0",
|
|
23
|
+
"@types/testing-library__jest-dom": "5.9.5",
|
|
24
|
+
"@types/jest": "^26.0.0",
|
|
25
|
+
"@types/react-dom": "^17.0.5",
|
|
26
|
+
"@types/react": "^17.0.8",
|
|
27
|
+
"@types/node": "12.20.4"
|
|
28
|
+
},
|
|
29
|
+
"peerDependencies": {
|
|
30
|
+
"@teambit/legacy": "1.0.240",
|
|
31
|
+
"react-dom": "^16.8.0 || ^17.0.0",
|
|
32
|
+
"react": "^16.8.0 || ^17.0.0"
|
|
33
|
+
},
|
|
34
|
+
"license": "Apache-2.0",
|
|
35
|
+
"bit": {
|
|
36
|
+
"bindingPrefix": "@teambit",
|
|
37
|
+
"env": {},
|
|
38
|
+
"overrides": {
|
|
39
|
+
"dependencies": {
|
|
40
|
+
"@teambit/legacy": "-",
|
|
41
|
+
"@babel/runtime": "7.12.18",
|
|
42
|
+
"core-js": "^3.0.0",
|
|
43
|
+
"react-dom": "-",
|
|
44
|
+
"react": "-"
|
|
45
|
+
},
|
|
46
|
+
"devDependencies": {
|
|
47
|
+
"@teambit/legacy": "-",
|
|
48
|
+
"@types/mocha": "9.1.0",
|
|
49
|
+
"@types/testing-library__jest-dom": "5.9.5",
|
|
50
|
+
"@types/jest": "^26.0.0",
|
|
51
|
+
"@types/react-dom": "^17.0.5",
|
|
52
|
+
"@types/react": "^17.0.8",
|
|
53
|
+
"@types/node": "12.20.4",
|
|
54
|
+
"react-dom": "-",
|
|
55
|
+
"react": "-"
|
|
56
|
+
},
|
|
57
|
+
"peerDependencies": {
|
|
58
|
+
"@teambit/legacy": "1.0.240",
|
|
59
|
+
"react-dom": "^16.8.0 || ^17.0.0",
|
|
60
|
+
"react": "^16.8.0 || ^17.0.0"
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"private": false,
|
|
65
|
+
"engines": {
|
|
66
|
+
"node": ">=12.22.0"
|
|
67
|
+
},
|
|
68
|
+
"repository": {
|
|
69
|
+
"type": "git",
|
|
70
|
+
"url": "https://github.com/teambit/bit"
|
|
71
|
+
},
|
|
72
|
+
"keywords": [
|
|
73
|
+
"bit",
|
|
74
|
+
"bit-aspect",
|
|
75
|
+
"components",
|
|
76
|
+
"collaboration",
|
|
77
|
+
"web",
|
|
78
|
+
"react",
|
|
79
|
+
"react-components",
|
|
80
|
+
"angular",
|
|
81
|
+
"angular-components",
|
|
82
|
+
"vue",
|
|
83
|
+
"vue-components"
|
|
84
|
+
]
|
|
85
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
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
|
+
"declaration": true,
|
|
14
|
+
"sourceMap": true,
|
|
15
|
+
"skipLibCheck": true,
|
|
16
|
+
"moduleResolution": "node",
|
|
17
|
+
"esModuleInterop": true,
|
|
18
|
+
"resolveJsonModule": true,
|
|
19
|
+
"composite": true,
|
|
20
|
+
"emitDeclarationOnly": true,
|
|
21
|
+
"outDir": "dist",
|
|
22
|
+
"experimentalDecorators": true,
|
|
23
|
+
"emitDecoratorMetadata": true,
|
|
24
|
+
"allowSyntheticDefaultImports": true,
|
|
25
|
+
"strictPropertyInitialization": false,
|
|
26
|
+
"strict": true,
|
|
27
|
+
"noImplicitAny": false,
|
|
28
|
+
"rootDir": ".",
|
|
29
|
+
"preserveConstEnums": true
|
|
30
|
+
},
|
|
31
|
+
"exclude": [
|
|
32
|
+
"dist"
|
|
33
|
+
]
|
|
34
|
+
}
|
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
|
+
}
|