@teambit/workspace 0.0.845 → 0.0.846
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 +1 -0
- package/dist/index.js.map +1 -1
- package/dist/workspace.d.ts +9 -60
- package/dist/workspace.js +23 -409
- package/dist/workspace.js.map +1 -1
- package/dist/workspace.main.runtime.js +1 -11
- package/dist/workspace.main.runtime.js.map +1 -1
- package/dist/workspace.provider.d.ts +2 -4
- package/dist/workspace.provider.js +3 -66
- package/dist/workspace.provider.js.map +1 -1
- package/package-tar/teambit-workspace-0.0.846.tgz +0 -0
- package/package.json +18 -27
- package/{preview-1662521943539.js → preview-1662608124038.js} +2 -2
- package/__snapshots__/pick-outdated-pkgs.spec.ts.snap +0 -171
- package/dist/__snapshots__/pick-outdated-pkgs.spec.js.snap +0 -171
- package/dist/__snapshots__/pick-outdated-pkgs.spec.ts.snap +0 -171
- package/dist/exceptions/dependency-type-not-supported-in-policy.d.ts +0 -4
- package/dist/exceptions/dependency-type-not-supported-in-policy.js +0 -27
- package/dist/exceptions/dependency-type-not-supported-in-policy.js.map +0 -1
- package/dist/exceptions/index.d.ts +0 -1
- package/dist/exceptions/index.js +0 -23
- package/dist/exceptions/index.js.map +0 -1
- package/dist/install.cmd.d.ts +0 -44
- package/dist/install.cmd.js +0 -85
- package/dist/install.cmd.js.map +0 -1
- package/dist/link/component-list-links.d.ts +0 -7
- package/dist/link/component-list-links.js +0 -98
- package/dist/link/component-list-links.js.map +0 -1
- package/dist/link/core-aspects-links.d.ts +0 -7
- package/dist/link/core-aspects-links.js +0 -95
- package/dist/link/core-aspects-links.js.map +0 -1
- package/dist/link/get-package-name-from-target.d.ts +0 -1
- package/dist/link/get-package-name-from-target.js +0 -16
- package/dist/link/get-package-name-from-target.js.map +0 -1
- package/dist/link/index.d.ts +0 -1
- package/dist/link/index.js +0 -23
- package/dist/link/index.js.map +0 -1
- package/dist/link/link-row.d.ts +0 -12
- package/dist/link/link-row.js +0 -38
- package/dist/link/link-row.js.map +0 -1
- package/dist/link/link-to-dir.d.ts +0 -2
- package/dist/link/link-to-dir.js +0 -45
- package/dist/link/link-to-dir.js.map +0 -1
- package/dist/link/link.cmd.d.ts +0 -44
- package/dist/link/link.cmd.js +0 -176
- package/dist/link/link.cmd.js.map +0 -1
- package/dist/link/nested-deps-in-nm-links.d.ts +0 -7
- package/dist/link/nested-deps-in-nm-links.js +0 -74
- package/dist/link/nested-deps-in-nm-links.js.map +0 -1
- package/dist/link/rewire-row.d.ts +0 -6
- package/dist/link/rewire-row.js +0 -31
- package/dist/link/rewire-row.js.map +0 -1
- package/dist/pick-outdated-pkgs.d.ts +0 -16
- package/dist/pick-outdated-pkgs.js +0 -308
- package/dist/pick-outdated-pkgs.js.map +0 -1
- package/dist/pick-outdated-pkgs.spec.d.ts +0 -1
- package/dist/pick-outdated-pkgs.spec.js +0 -121
- package/dist/pick-outdated-pkgs.spec.js.map +0 -1
- package/dist/uninstall.cmd.d.ts +0 -19
- package/dist/uninstall.cmd.js +0 -47
- package/dist/uninstall.cmd.js.map +0 -1
- package/dist/update.cmd.d.ts +0 -23
- package/dist/update.cmd.js +0 -47
- package/dist/update.cmd.js.map +0 -1
- package/exceptions/dependency-type-not-supported-in-policy.ts +0 -7
- package/exceptions/index.ts +0 -1
- package/install.cmd.tsx +0 -72
- package/link/component-list-links.ts +0 -50
- package/link/core-aspects-links.ts +0 -50
- package/link/get-package-name-from-target.ts +0 -5
- package/link/index.ts +0 -1
- package/link/link-row.ts +0 -20
- package/link/link-to-dir.ts +0 -13
- package/link/link.cmd.ts +0 -100
- package/link/nested-deps-in-nm-links.ts +0 -47
- package/link/rewire-row.ts +0 -17
- package/package-tar/teambit-workspace-0.0.845.tgz +0 -0
- package/uninstall.cmd.tsx +0 -23
- package/update.cmd.tsx +0 -29
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.CoreAspectsLinks = CoreAspectsLinks;
|
|
9
|
-
|
|
10
|
-
function _chalk() {
|
|
11
|
-
const data = _interopRequireDefault(require("chalk"));
|
|
12
|
-
|
|
13
|
-
_chalk = function () {
|
|
14
|
-
return data;
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
return data;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
function _getPackageNameFromTarget() {
|
|
21
|
-
const data = require("./get-package-name-from-target");
|
|
22
|
-
|
|
23
|
-
_getPackageNameFromTarget = function () {
|
|
24
|
-
return data;
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
return data;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
function _linkRow() {
|
|
31
|
-
const data = require("./link-row");
|
|
32
|
-
|
|
33
|
-
_linkRow = function () {
|
|
34
|
-
return data;
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
return data;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
function CoreAspectsLinks({
|
|
41
|
-
coreAspectsLinks,
|
|
42
|
-
verbose = false
|
|
43
|
-
}) {
|
|
44
|
-
if (!coreAspectsLinks || !coreAspectsLinks.length) {
|
|
45
|
-
return _chalk().default.cyan('No core aspects were linked');
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
const title = _chalk().default.cyan('Core aspects links');
|
|
49
|
-
|
|
50
|
-
const links = coreAspectsLinks.map(link => CoreAspectLinkRow({
|
|
51
|
-
coreAspectLink: link,
|
|
52
|
-
verbose
|
|
53
|
-
})).join('\n');
|
|
54
|
-
return `${title}\n${links}`;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
function CoreAspectLinkRow({
|
|
58
|
-
coreAspectLink,
|
|
59
|
-
verbose = false
|
|
60
|
-
}) {
|
|
61
|
-
if (verbose) return VerboseCoreAspectLink({
|
|
62
|
-
coreAspectLink
|
|
63
|
-
});
|
|
64
|
-
return RegularCoreAspectLink({
|
|
65
|
-
coreAspectLink
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
function RegularCoreAspectLink({
|
|
70
|
-
coreAspectLink
|
|
71
|
-
}) {
|
|
72
|
-
const id = coreAspectLink.aspectId.toString();
|
|
73
|
-
const packagePath = (0, _getPackageNameFromTarget().getPackageNameFromTarget)(coreAspectLink.linkDetail.to);
|
|
74
|
-
return (0, _linkRow().LinkRow)({
|
|
75
|
-
title: id,
|
|
76
|
-
target: packagePath,
|
|
77
|
-
padding: 50
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
function VerboseCoreAspectLink({
|
|
82
|
-
coreAspectLink
|
|
83
|
-
}) {
|
|
84
|
-
const id = coreAspectLink.aspectId.toString();
|
|
85
|
-
|
|
86
|
-
const title = _chalk().default.bold.cyan(id);
|
|
87
|
-
|
|
88
|
-
const link = (0, _linkRow().VerboseLinkRow)({
|
|
89
|
-
from: coreAspectLink.linkDetail.from,
|
|
90
|
-
to: coreAspectLink.linkDetail.to
|
|
91
|
-
});
|
|
92
|
-
return `${title}\n${link}`;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
//# sourceMappingURL=core-aspects-links.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["CoreAspectsLinks","coreAspectsLinks","verbose","length","chalk","cyan","title","links","map","link","CoreAspectLinkRow","coreAspectLink","join","VerboseCoreAspectLink","RegularCoreAspectLink","id","aspectId","toString","packagePath","getPackageNameFromTarget","linkDetail","to","LinkRow","target","padding","bold","VerboseLinkRow","from"],"sources":["core-aspects-links.ts"],"sourcesContent":["import { CoreAspectLinkResult } from '@teambit/dependency-resolver';\nimport chalk from 'chalk';\n\nimport { getPackageNameFromTarget } from './get-package-name-from-target';\nimport { LinkRow, VerboseLinkRow } from './link-row';\n\ntype CoreAspectsLinksProps = {\n coreAspectsLinks?: CoreAspectLinkResult[];\n verbose: boolean;\n};\n\nexport function CoreAspectsLinks({ coreAspectsLinks, verbose = false }: CoreAspectsLinksProps) {\n if (!coreAspectsLinks || !coreAspectsLinks.length) {\n return chalk.cyan('No core aspects were linked');\n }\n const title = chalk.cyan('Core aspects links');\n const links = coreAspectsLinks.map((link) => CoreAspectLinkRow({ coreAspectLink: link, verbose })).join('\\n');\n return `${title}\\n${links}`;\n}\n\ntype CoreAspectLinkProps = {\n coreAspectLink: CoreAspectLinkResult;\n verbose: boolean;\n};\nfunction CoreAspectLinkRow({ coreAspectLink, verbose = false }: CoreAspectLinkProps) {\n if (verbose) return VerboseCoreAspectLink({ coreAspectLink });\n return RegularCoreAspectLink({ coreAspectLink });\n}\n\ntype RegularCoreAspectLinkProps = {\n coreAspectLink: CoreAspectLinkResult;\n};\nfunction RegularCoreAspectLink({ coreAspectLink }: RegularCoreAspectLinkProps) {\n const id = coreAspectLink.aspectId.toString();\n const packagePath = getPackageNameFromTarget(coreAspectLink.linkDetail.to);\n return LinkRow({ title: id, target: packagePath, padding: 50 });\n}\n\ntype VerboseCoreAspectLinkProps = {\n coreAspectLink: CoreAspectLinkResult;\n};\nfunction VerboseCoreAspectLink({ coreAspectLink }: VerboseCoreAspectLinkProps) {\n const id = coreAspectLink.aspectId.toString();\n const title = chalk.bold.cyan(id);\n const link = VerboseLinkRow({\n from: coreAspectLink.linkDetail.from,\n to: coreAspectLink.linkDetail.to,\n });\n return `${title}\\n${link}`;\n}\n"],"mappings":";;;;;;;;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAEA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAOO,SAASA,gBAAT,CAA0B;EAAEC,gBAAF;EAAoBC,OAAO,GAAG;AAA9B,CAA1B,EAAwF;EAC7F,IAAI,CAACD,gBAAD,IAAqB,CAACA,gBAAgB,CA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;IAE1BN,EAAE,EAAEV,cAAc,CAACS,UAAf,CAA0BC;EAFJ,CAAf,CAAb;EAIA,OAAQ,GAAEf,KAAM,KAAIG,IAAK,EAAzB;AACD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function getPackageNameFromTarget(targetPath: string): string;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
require("core-js/modules/es.regexp.exec.js");
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.getPackageNameFromTarget = getPackageNameFromTarget;
|
|
9
|
-
|
|
10
|
-
function getPackageNameFromTarget(targetPath) {
|
|
11
|
-
const subPath = targetPath.substring(targetPath.lastIndexOf('node_modules'));
|
|
12
|
-
const packagePath = subPath.split('/').slice(0, 3).join('/');
|
|
13
|
-
return `./${packagePath}`;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
//# sourceMappingURL=get-package-name-from-target.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["getPackageNameFromTarget","targetPath","subPath","substring","lastIndexOf","packagePath","split","slice","join"],"sources":["get-package-name-from-target.ts"],"sourcesContent":["export function getPackageNameFromTarget(targetPath: string): string {\n const subPath = targetPath.substring(targetPath.lastIndexOf('node_modules'));\n const packagePath = subPath.split('/').slice(0, 3).join('/');\n return `./${packagePath}`;\n}\n"],"mappings":";;;;;;;;;AAAO,SAASA,wBAAT,CAAkCC,UAAlC,EAA8D;EACnE,MAAMC,OAAO,GAAGD,UAAU,CAACE,SAAX,CAAqBF,UAAU,CAACG,WAAX,CAAuB,cAAvB,CAArB,CAAhB;EACA,MAAMC,WAAW,GAAGH,OAAO,CAACI,KAAR,CAAc,GAAd,EAAmBC,KAAnB,CAAyB,CAAzB,EAA4B,CAA5B,EAA+BC,IAA/B,CAAoC,GAApC,CAApB;EACA,OAAQ,KAAIH,WAAY,EAAxB;AACD"}
|
package/dist/link/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { LinkCommand } from './link.cmd';
|
package/dist/link/index.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "LinkCommand", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function () {
|
|
9
|
-
return _link().LinkCommand;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
function _link() {
|
|
14
|
-
const data = require("./link.cmd");
|
|
15
|
-
|
|
16
|
-
_link = function () {
|
|
17
|
-
return data;
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
return data;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
//# sourceMappingURL=index.js.map
|
package/dist/link/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { LinkCommand } from './link.cmd';\n"],"mappings":";;;;;;;;;;;;AAAA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA"}
|
package/dist/link/link-row.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
declare type LinkRowProps = {
|
|
2
|
-
title: string;
|
|
3
|
-
target: string;
|
|
4
|
-
padding?: number;
|
|
5
|
-
};
|
|
6
|
-
export declare function LinkRow({ title, target, padding }: LinkRowProps): string;
|
|
7
|
-
declare type VerboseLinkRowProps = {
|
|
8
|
-
from: string;
|
|
9
|
-
to: string;
|
|
10
|
-
};
|
|
11
|
-
export declare function VerboseLinkRow({ from, to }: VerboseLinkRowProps): string;
|
|
12
|
-
export {};
|
package/dist/link/link-row.js
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.LinkRow = LinkRow;
|
|
9
|
-
exports.VerboseLinkRow = VerboseLinkRow;
|
|
10
|
-
|
|
11
|
-
function _chalk() {
|
|
12
|
-
const data = _interopRequireDefault(require("chalk"));
|
|
13
|
-
|
|
14
|
-
_chalk = function () {
|
|
15
|
-
return data;
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
return data;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
function LinkRow({
|
|
22
|
-
title,
|
|
23
|
-
target,
|
|
24
|
-
padding = 50
|
|
25
|
-
}) {
|
|
26
|
-
return _chalk().default.bold(`${title.padEnd(padding)} ${'>'} ${target}`);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
function VerboseLinkRow({
|
|
30
|
-
from,
|
|
31
|
-
to
|
|
32
|
-
}) {
|
|
33
|
-
return `${_chalk().default.bold('from')}: ${from}
|
|
34
|
-
${_chalk().default.bold('to')}: ${to}
|
|
35
|
-
`;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
//# sourceMappingURL=link-row.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["LinkRow","title","target","padding","chalk","bold","padEnd","VerboseLinkRow","from","to"],"sources":["link-row.ts"],"sourcesContent":["import chalk from 'chalk';\n\ntype LinkRowProps = {\n title: string;\n target: string;\n padding?: number;\n};\nexport function LinkRow({ title, target, padding = 50 }: LinkRowProps) {\n return chalk.bold(`${title.padEnd(padding)} ${'>'} ${target}`);\n}\n\ntype VerboseLinkRowProps = {\n from: string;\n to: string;\n};\nexport function VerboseLinkRow({ from, to }: VerboseLinkRowProps) {\n return `${chalk.bold('from')}: ${from}\n${chalk.bold('to')}: ${to}\n`;\n}\n"],"mappings":";;;;;;;;;;AAAA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAOO,SAASA,OAAT,CAAiB;EAAEC,KAAF;EAASC,MAAT;EAAiBC,OAAO,GAAG;AAA3B,CAAjB,EAAgE;EACrE,OAAOC,gBAAA,CAAMC,IAAN,CAAY,GAAEJ,KAAK,CAACK,MAAN,CAAaH,OAAb,CAAsB,IAAG,GAAI,IAAGD,MAAO,EAArD,CAAP;AACD;;AAMM,SAASK,cAAT,CAAwB;EAAEC,IAAF;EAAQC;AAAR,CAAxB,EAA2D;EAChE,OAAQ,GAAEL,gBAAA,CAAMC,IAAN,CAAW,MAAX,CAAmB,KAAIG,IAAK;AACxC,EAAEJ,gBAAA,CAAMC,IAAN,CAAW,IAAX,CAAiB,KAAII,EAAG;AAC1B,CAFE;AAGD"}
|
package/dist/link/link-to-dir.js
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.linkToDir = linkToDir;
|
|
9
|
-
|
|
10
|
-
function _chalk() {
|
|
11
|
-
const data = _interopRequireDefault(require("chalk"));
|
|
12
|
-
|
|
13
|
-
_chalk = function () {
|
|
14
|
-
return data;
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
return data;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
function _linkRow() {
|
|
21
|
-
const data = require("./link-row");
|
|
22
|
-
|
|
23
|
-
_linkRow = function () {
|
|
24
|
-
return data;
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
return data;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
function linkToDir(links) {
|
|
31
|
-
if (!links || !links.length) return '';
|
|
32
|
-
|
|
33
|
-
const title = _chalk().default.bold.cyan('Target Links');
|
|
34
|
-
|
|
35
|
-
const linksOutput = links.map(({
|
|
36
|
-
componentId,
|
|
37
|
-
linksDetail
|
|
38
|
-
}) => (0, _linkRow().LinkRow)({
|
|
39
|
-
title: componentId,
|
|
40
|
-
target: linksDetail.to
|
|
41
|
-
})).join('\n');
|
|
42
|
-
return `${title}\n${linksOutput}\n`;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
//# sourceMappingURL=link-to-dir.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["linkToDir","links","length","title","chalk","bold","cyan","linksOutput","map","componentId","linksDetail","LinkRow","target","to","join"],"sources":["link-to-dir.ts"],"sourcesContent":["import { LinkToDirResult } from '@teambit/dependency-resolver';\nimport chalk from 'chalk';\nimport { LinkRow } from './link-row';\n\nexport function linkToDir(links?: LinkToDirResult[]) {\n if (!links || !links.length) return '';\n const title = chalk.bold.cyan('Target Links');\n const linksOutput = links\n .map(({ componentId, linksDetail }) => LinkRow({ title: componentId, target: linksDetail.to }))\n .join('\\n');\n\n return `${title}\\n${linksOutput}\\n`;\n}\n"],"mappings":";;;;;;;;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAEO,SAASA,SAAT,CAAmBC,KAAnB,EAA8C;EACnD,IAAI,CAACA,KAAD,IAAU,CAACA,KAAK,CAACC,MAArB,EAA6B,OAAO,EAAP;;EAC7B,MAAMC,KAAK,GAAGC,gBAAA,CAAMC,IAAN,CAAWC,IAAX,CAAgB,cAAhB,CAAd;;EACA,MAAMC,WAAW,GAAGN,KAAK,CACtBO,GADiB,CACb,CAAC;IAAEC,WAAF;IAAeC;EAAf,CAAD,KAAkC,IAAAC,kBAAA,EAAQ;IAAER,KAAK,EAAEM,WAAT;IAAsBG,MAAM,EAAEF,WAAW,CAACG;EAA1C,CAAR,CADrB,EAEjBC,IAFiB,CAEZ,IAFY,CAApB;EAIA,OAAQ,GAAEX,KAAM,KAAII,WAAY,IAAhC;AACD"}
|
package/dist/link/link.cmd.d.ts
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { Command, CommandOptions } from '@teambit/cli';
|
|
2
|
-
import { LinkResults } from '@teambit/dependency-resolver';
|
|
3
|
-
import { Logger } from '@teambit/logger';
|
|
4
|
-
import { Workspace } from '../workspace';
|
|
5
|
-
declare type LinkCommandOpts = {
|
|
6
|
-
rewire: boolean;
|
|
7
|
-
verbose: boolean;
|
|
8
|
-
target: string;
|
|
9
|
-
skipFetchingObjects?: boolean;
|
|
10
|
-
};
|
|
11
|
-
export declare class LinkCommand implements Command {
|
|
12
|
-
/**
|
|
13
|
-
* workspace extension.
|
|
14
|
-
*/
|
|
15
|
-
private workspace;
|
|
16
|
-
/**
|
|
17
|
-
* logger extension.
|
|
18
|
-
*/
|
|
19
|
-
private logger;
|
|
20
|
-
private docsDomain;
|
|
21
|
-
name: string;
|
|
22
|
-
alias: string;
|
|
23
|
-
description: string;
|
|
24
|
-
extendedDescription: string;
|
|
25
|
-
group: string;
|
|
26
|
-
private: boolean;
|
|
27
|
-
arguments: {
|
|
28
|
-
name: string;
|
|
29
|
-
description: string;
|
|
30
|
-
}[];
|
|
31
|
-
options: CommandOptions;
|
|
32
|
-
constructor(
|
|
33
|
-
/**
|
|
34
|
-
* workspace extension.
|
|
35
|
-
*/
|
|
36
|
-
workspace: Workspace,
|
|
37
|
-
/**
|
|
38
|
-
* logger extension.
|
|
39
|
-
*/
|
|
40
|
-
logger: Logger, docsDomain: string);
|
|
41
|
-
report([ids]: [string[]], opts: LinkCommandOpts): Promise<string>;
|
|
42
|
-
json([ids]: [string[]], opts: LinkCommandOpts): Promise<LinkResults>;
|
|
43
|
-
}
|
|
44
|
-
export {};
|
package/dist/link/link.cmd.js
DELETED
|
@@ -1,176 +0,0 @@
|
|
|
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.LinkCommand = 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 _toolboxTime() {
|
|
25
|
-
const data = require("@teambit/toolbox.time.time-format");
|
|
26
|
-
|
|
27
|
-
_toolboxTime = function () {
|
|
28
|
-
return data;
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
return data;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
function _chalk() {
|
|
35
|
-
const data = _interopRequireDefault(require("chalk"));
|
|
36
|
-
|
|
37
|
-
_chalk = function () {
|
|
38
|
-
return data;
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
return data;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
function _componentListLinks() {
|
|
45
|
-
const data = require("./component-list-links");
|
|
46
|
-
|
|
47
|
-
_componentListLinks = function () {
|
|
48
|
-
return data;
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
return data;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
function _coreAspectsLinks() {
|
|
55
|
-
const data = require("./core-aspects-links");
|
|
56
|
-
|
|
57
|
-
_coreAspectsLinks = function () {
|
|
58
|
-
return data;
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
return data;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
function _nestedDepsInNmLinks() {
|
|
65
|
-
const data = require("./nested-deps-in-nm-links");
|
|
66
|
-
|
|
67
|
-
_nestedDepsInNmLinks = function () {
|
|
68
|
-
return data;
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
return data;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
function _rewireRow() {
|
|
75
|
-
const data = require("./rewire-row");
|
|
76
|
-
|
|
77
|
-
_rewireRow = function () {
|
|
78
|
-
return data;
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
return data;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
function _linkToDir() {
|
|
85
|
-
const data = require("./link-to-dir");
|
|
86
|
-
|
|
87
|
-
_linkToDir = function () {
|
|
88
|
-
return data;
|
|
89
|
-
};
|
|
90
|
-
|
|
91
|
-
return data;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
class LinkCommand {
|
|
95
|
-
constructor(
|
|
96
|
-
/**
|
|
97
|
-
* workspace extension.
|
|
98
|
-
*/
|
|
99
|
-
workspace,
|
|
100
|
-
/**
|
|
101
|
-
* logger extension.
|
|
102
|
-
*/
|
|
103
|
-
logger, docsDomain) {
|
|
104
|
-
this.workspace = workspace;
|
|
105
|
-
this.logger = logger;
|
|
106
|
-
this.docsDomain = docsDomain;
|
|
107
|
-
(0, _defineProperty2().default)(this, "name", 'link [component-names...]');
|
|
108
|
-
(0, _defineProperty2().default)(this, "alias", '');
|
|
109
|
-
(0, _defineProperty2().default)(this, "description", 'create links in the node_modules directory, to core aspects and to components in the workspace');
|
|
110
|
-
(0, _defineProperty2().default)(this, "extendedDescription", void 0);
|
|
111
|
-
(0, _defineProperty2().default)(this, "group", 'development');
|
|
112
|
-
(0, _defineProperty2().default)(this, "private", false);
|
|
113
|
-
(0, _defineProperty2().default)(this, "arguments", [{
|
|
114
|
-
name: 'component-names...',
|
|
115
|
-
description: 'names or IDs of the components to link'
|
|
116
|
-
}]);
|
|
117
|
-
(0, _defineProperty2().default)(this, "options", [['j', 'json', 'return the output as JSON'], ['', 'verbose', 'verbose output'], ['r', 'rewire', 'Replace relative paths with module paths in code (e.g. "../foo" => "@bit/foo")'], ['', 'target <dir>', 'EXPERIMENTAL. link to an external directory (similar to npm-link) so other projects could use these components'], ['', 'skip-fetching-objects', 'skip fetch missing objects from remotes before linking']]);
|
|
118
|
-
this.extendedDescription = `https://${this.docsDomain}/workspace/component-links`;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
async report([ids], opts) {
|
|
122
|
-
var _linkResults$legacyLi;
|
|
123
|
-
|
|
124
|
-
const startTime = Date.now();
|
|
125
|
-
const linkResults = await this.json([ids], opts);
|
|
126
|
-
const endTime = Date.now();
|
|
127
|
-
const numOfComponents = (_linkResults$legacyLi = linkResults.legacyLinkResults) === null || _linkResults$legacyLi === void 0 ? void 0 : _linkResults$legacyLi.length;
|
|
128
|
-
const timeDiff = (0, _toolboxTime().timeFormat)(endTime - startTime);
|
|
129
|
-
const coreAspectsLinksWithMainAspect = linkResults.coreAspectsLinks || [];
|
|
130
|
-
|
|
131
|
-
if (linkResults.teambitBitLink) {
|
|
132
|
-
coreAspectsLinksWithMainAspect.unshift(linkResults.teambitBitLink);
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
const numOfCoreAspects = coreAspectsLinksWithMainAspect.length;
|
|
136
|
-
const title = `Linked ${numOfComponents} components and ${numOfCoreAspects} core aspects to node_modules for workspace: ${this.workspace.name}`;
|
|
137
|
-
const coreLinks = (0, _coreAspectsLinks().CoreAspectsLinks)({
|
|
138
|
-
coreAspectsLinks: coreAspectsLinksWithMainAspect,
|
|
139
|
-
verbose: opts.verbose
|
|
140
|
-
});
|
|
141
|
-
const compsLinks = (0, _componentListLinks().ComponentListLinks)({
|
|
142
|
-
componentListLinks: linkResults.legacyLinkResults,
|
|
143
|
-
verbose: opts.verbose
|
|
144
|
-
});
|
|
145
|
-
const rewireRow = (0, _rewireRow().RewireRow)({
|
|
146
|
-
legacyCodemodResults: linkResults.legacyLinkCodemodResults
|
|
147
|
-
});
|
|
148
|
-
const nestedLinks = (0, _nestedDepsInNmLinks().NestedComponentLinksLinks)({
|
|
149
|
-
nestedDepsInNmLinks: linkResults.nestedDepsInNmLinks,
|
|
150
|
-
verbose: opts.verbose
|
|
151
|
-
});
|
|
152
|
-
const targetLinks = (0, _linkToDir().linkToDir)(linkResults.linkToDirResults);
|
|
153
|
-
const footer = `Finished. ${timeDiff}`;
|
|
154
|
-
return `${title}\n${coreLinks}\n${compsLinks}\n${rewireRow}${nestedLinks}${targetLinks}${footer}`;
|
|
155
|
-
} // eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
async json([ids], opts) {
|
|
159
|
-
this.logger.console(`Linking components and core aspects to node_modules for workspaces: '${_chalk().default.cyan(this.workspace.name)}'`);
|
|
160
|
-
const linkOpts = {
|
|
161
|
-
legacyLink: true,
|
|
162
|
-
rewire: opts.rewire,
|
|
163
|
-
linkCoreAspects: true,
|
|
164
|
-
linkTeambitBit: true,
|
|
165
|
-
linkToDir: opts.target,
|
|
166
|
-
fetchObject: !opts.skipFetchingObjects
|
|
167
|
-
};
|
|
168
|
-
const linkResults = await this.workspace.link(linkOpts);
|
|
169
|
-
return linkResults;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
exports.LinkCommand = LinkCommand;
|
|
175
|
-
|
|
176
|
-
//# sourceMappingURL=link.cmd.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["LinkCommand","constructor","workspace","logger","docsDomain","name","description","extendedDescription","report","ids","opts","startTime","Date","now","linkResults","json","endTime","numOfComponents","legacyLinkResults","length","timeDiff","timeFormat","coreAspectsLinksWithMainAspect","coreAspectsLinks","teambitBitLink","unshift","numOfCoreAspects","title","coreLinks","CoreAspectsLinks","verbose","compsLinks","ComponentListLinks","componentListLinks","rewireRow","RewireRow","legacyCodemodResults","legacyLinkCodemodResults","nestedLinks","NestedComponentLinksLinks","nestedDepsInNmLinks","targetLinks","linkToDir","linkToDirResults","footer","console","chalk","cyan","linkOpts","legacyLink","rewire","linkCoreAspects","linkTeambitBit","target","fetchObject","skipFetchingObjects","link"],"sources":["link.cmd.ts"],"sourcesContent":["import { Command, CommandOptions } from '@teambit/cli';\nimport { LinkResults } from '@teambit/dependency-resolver';\nimport { Logger } from '@teambit/logger';\nimport { timeFormat } from '@teambit/toolbox.time.time-format';\nimport chalk from 'chalk';\nimport { Workspace, WorkspaceLinkOptions } from '../workspace';\nimport { ComponentListLinks } from './component-list-links';\nimport { CoreAspectsLinks } from './core-aspects-links';\nimport { NestedComponentLinksLinks } from './nested-deps-in-nm-links';\nimport { RewireRow } from './rewire-row';\nimport { linkToDir } from './link-to-dir';\n\ntype LinkCommandOpts = {\n rewire: boolean;\n verbose: boolean;\n target: string;\n skipFetchingObjects?: boolean;\n};\nexport class LinkCommand implements Command {\n name = 'link [component-names...]';\n alias = '';\n description = 'create links in the node_modules directory, to core aspects and to components in the workspace';\n extendedDescription: string;\n group = 'development';\n private = false;\n arguments = [{ name: 'component-names...', description: 'names or IDs of the components to link' }];\n options = [\n ['j', 'json', 'return the output as JSON'],\n ['', 'verbose', 'verbose output'],\n ['r', 'rewire', 'Replace relative paths with module paths in code (e.g. \"../foo\" => \"@bit/foo\")'],\n [\n '',\n 'target <dir>',\n 'EXPERIMENTAL. link to an external directory (similar to npm-link) so other projects could use these components',\n ],\n ['', 'skip-fetching-objects', 'skip fetch missing objects from remotes before linking'],\n ] as CommandOptions;\n\n constructor(\n /**\n * workspace extension.\n */\n private workspace: Workspace,\n\n /**\n * logger extension.\n */\n private logger: Logger,\n\n private docsDomain: string\n ) {\n this.extendedDescription = `https://${this.docsDomain}/workspace/component-links`;\n }\n\n async report([ids]: [string[]], opts: LinkCommandOpts) {\n const startTime = Date.now();\n const linkResults = await this.json([ids], opts);\n const endTime = Date.now();\n const numOfComponents = linkResults.legacyLinkResults?.length;\n const timeDiff = timeFormat(endTime - startTime);\n const coreAspectsLinksWithMainAspect = linkResults.coreAspectsLinks || [];\n if (linkResults.teambitBitLink) {\n coreAspectsLinksWithMainAspect.unshift(linkResults.teambitBitLink);\n }\n const numOfCoreAspects = coreAspectsLinksWithMainAspect.length;\n\n const title = `Linked ${numOfComponents} components and ${numOfCoreAspects} core aspects to node_modules for workspace: ${this.workspace.name}`;\n const coreLinks = CoreAspectsLinks({\n coreAspectsLinks: coreAspectsLinksWithMainAspect,\n verbose: opts.verbose,\n });\n const compsLinks = ComponentListLinks({ componentListLinks: linkResults.legacyLinkResults, verbose: opts.verbose });\n const rewireRow = RewireRow({ legacyCodemodResults: linkResults.legacyLinkCodemodResults });\n const nestedLinks = NestedComponentLinksLinks({\n nestedDepsInNmLinks: linkResults.nestedDepsInNmLinks,\n verbose: opts.verbose,\n });\n const targetLinks = linkToDir(linkResults.linkToDirResults);\n const footer = `Finished. ${timeDiff}`;\n return `${title}\\n${coreLinks}\\n${compsLinks}\\n${rewireRow}${nestedLinks}${targetLinks}${footer}`;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n async json([ids]: [string[]], opts: LinkCommandOpts): Promise<LinkResults> {\n this.logger.console(\n `Linking components and core aspects to node_modules for workspaces: '${chalk.cyan(this.workspace.name)}'`\n );\n\n const linkOpts: WorkspaceLinkOptions = {\n legacyLink: true,\n rewire: opts.rewire,\n linkCoreAspects: true,\n linkTeambitBit: true,\n linkToDir: opts.target,\n fetchObject: !opts.skipFetchingObjects,\n };\n const linkResults = await this.workspace.link(linkOpts);\n return linkResults;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAGA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAEA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAQO,M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AAG;MACrCC,UAAU,EAAE,IADyB;MAErCC,MAAM,EAAExC,IAAI,CAACwC,MAFwB;MAGrCC,eAAe,EAAE,IAHoB;MAIrCC,cAAc,EAAE,IAJqB;MAKrCV,SAAS,EAAEhC,IAAI,CAAC2C,MALqB;MAMrCC,WAAW,EAAE,CAAC5C,IAAI,CAAC6C;IANkB,CAAvC;IAQA,MAAMzC,WAAW,GAAG,MAAM,KAAKZ,SAAL,CAAesD,IAAf,CAAoBR,QAApB,CAA1B;IACA,OAAOlC,WAAP;EACD;;AAhFyC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { NestedNMDepsLinksResult } from '@teambit/dependency-resolver';
|
|
2
|
-
declare type NestedComponentLinksLinksProps = {
|
|
3
|
-
nestedDepsInNmLinks?: NestedNMDepsLinksResult[];
|
|
4
|
-
verbose: boolean;
|
|
5
|
-
};
|
|
6
|
-
export declare function NestedComponentLinksLinks({ nestedDepsInNmLinks, verbose }: NestedComponentLinksLinksProps): string;
|
|
7
|
-
export {};
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.NestedComponentLinksLinks = NestedComponentLinksLinks;
|
|
9
|
-
|
|
10
|
-
function _chalk() {
|
|
11
|
-
const data = _interopRequireDefault(require("chalk"));
|
|
12
|
-
|
|
13
|
-
_chalk = function () {
|
|
14
|
-
return data;
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
return data;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
function _linkRow() {
|
|
21
|
-
const data = require("./link-row");
|
|
22
|
-
|
|
23
|
-
_linkRow = function () {
|
|
24
|
-
return data;
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
return data;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
function NestedComponentLinksLinks({
|
|
31
|
-
nestedDepsInNmLinks,
|
|
32
|
-
verbose = false
|
|
33
|
-
}) {
|
|
34
|
-
if (!verbose) return '';
|
|
35
|
-
|
|
36
|
-
if (!nestedDepsInNmLinks || !nestedDepsInNmLinks.length) {
|
|
37
|
-
return '';
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
const title = _chalk().default.bold.cyan('Nested dependencies links');
|
|
41
|
-
|
|
42
|
-
const links = nestedDepsInNmLinks.map(nestedComponentLinks => NestedComponentLinks({
|
|
43
|
-
nestedComponentLinks,
|
|
44
|
-
verbose
|
|
45
|
-
})).join('\n');
|
|
46
|
-
return `${title}\n${links}\n`;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
function NestedComponentLinks({
|
|
50
|
-
nestedComponentLinks,
|
|
51
|
-
verbose = false
|
|
52
|
-
}) {
|
|
53
|
-
if (!nestedComponentLinks.linksDetail || nestedComponentLinks.linksDetail.length < 1) return '';
|
|
54
|
-
if (verbose) return VerboseNestedComponentLinks({
|
|
55
|
-
nestedComponentLinks
|
|
56
|
-
});
|
|
57
|
-
return '';
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
function VerboseNestedComponentLinks({
|
|
61
|
-
nestedComponentLinks
|
|
62
|
-
}) {
|
|
63
|
-
const id = nestedComponentLinks.componentId.toString();
|
|
64
|
-
|
|
65
|
-
const title = _chalk().default.cyan.bold(id);
|
|
66
|
-
|
|
67
|
-
const links = nestedComponentLinks.linksDetail.map(link => (0, _linkRow().VerboseLinkRow)({
|
|
68
|
-
from: link.from,
|
|
69
|
-
to: link.to
|
|
70
|
-
})).join('\n');
|
|
71
|
-
return `${title}\n${links}\n`;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
//# sourceMappingURL=nested-deps-in-nm-links.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["NestedComponentLinksLinks","nestedDepsInNmLinks","verbose","length","title","chalk","bold","cyan","links","map","nestedComponentLinks","NestedComponentLinks","join","linksDetail","VerboseNestedComponentLinks","id","componentId","toString","link","VerboseLinkRow","from","to"],"sources":["nested-deps-in-nm-links.ts"],"sourcesContent":["import chalk from 'chalk';\nimport { NestedNMDepsLinksResult } from '@teambit/dependency-resolver';\nimport { VerboseLinkRow } from './link-row';\n\ntype NestedComponentLinksLinksProps = {\n nestedDepsInNmLinks?: NestedNMDepsLinksResult[];\n verbose: boolean;\n};\n\nexport function NestedComponentLinksLinks({ nestedDepsInNmLinks, verbose = false }: NestedComponentLinksLinksProps) {\n if (!verbose) return '';\n if (!nestedDepsInNmLinks || !nestedDepsInNmLinks.length) {\n return '';\n }\n const title = chalk.bold.cyan('Nested dependencies links');\n const links = nestedDepsInNmLinks\n .map((nestedComponentLinks) =>\n NestedComponentLinks({\n nestedComponentLinks,\n verbose,\n })\n )\n .join('\\n');\n return `${title}\\n${links}\\n`;\n}\n\ntype NestedComponentLinksProps = {\n nestedComponentLinks: NestedNMDepsLinksResult;\n verbose: boolean;\n};\nfunction NestedComponentLinks({ nestedComponentLinks, verbose = false }: NestedComponentLinksProps) {\n if (!nestedComponentLinks.linksDetail || nestedComponentLinks.linksDetail.length < 1) return '';\n if (verbose) return VerboseNestedComponentLinks({ nestedComponentLinks });\n return '';\n}\n\ntype VerboseNestedComponentLinksProps = {\n nestedComponentLinks: NestedNMDepsLinksResult;\n};\nfunction VerboseNestedComponentLinks({ nestedComponentLinks }: VerboseNestedComponentLinksProps) {\n const id = nestedComponentLinks.componentId.toString();\n const title = chalk.cyan.bold(id);\n const links = nestedComponentLinks.linksDetail\n .map((link) => VerboseLinkRow({ from: link.from, to: link.to }))\n .join('\\n');\n return `${title}\\n${links}\\n`;\n}\n"],"mappings":";;;;;;;;;AAAA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAEA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAOO,SAASA,yBAAT,CAAmC;EAAEC,mBAAF;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"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { CodemodResult } from '@teambit/legacy/dist/consumer/component-ops/codemod-components';
|
|
2
|
-
declare type RewireRowProps = {
|
|
3
|
-
legacyCodemodResults?: CodemodResult[];
|
|
4
|
-
};
|
|
5
|
-
export declare function RewireRow({ legacyCodemodResults }: RewireRowProps): string;
|
|
6
|
-
export {};
|
package/dist/link/rewire-row.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.RewireRow = RewireRow;
|
|
9
|
-
|
|
10
|
-
function _chalk() {
|
|
11
|
-
const data = _interopRequireDefault(require("chalk"));
|
|
12
|
-
|
|
13
|
-
_chalk = function () {
|
|
14
|
-
return data;
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
return data;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
function RewireRow({
|
|
21
|
-
legacyCodemodResults
|
|
22
|
-
}) {
|
|
23
|
-
if (!legacyCodemodResults || legacyCodemodResults.length < 1) return '';
|
|
24
|
-
const totalComps = legacyCodemodResults === null || legacyCodemodResults === void 0 ? void 0 : legacyCodemodResults.length;
|
|
25
|
-
const totalFiles = legacyCodemodResults.reduce((acc, curr) => {
|
|
26
|
-
return acc + curr.changedFiles.length || 0;
|
|
27
|
-
}, 0);
|
|
28
|
-
return `rewired ${_chalk().default.cyan(totalComps.toString())} components and total of ${_chalk().default.cyan(totalFiles.toString())} files\n`;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
//# sourceMappingURL=rewire-row.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["RewireRow","legacyCodemodResults","length","totalComps","totalFiles","reduce","acc","curr","changedFiles","chalk","cyan","toString"],"sources":["rewire-row.ts"],"sourcesContent":["import { CodemodResult } from '@teambit/legacy/dist/consumer/component-ops/codemod-components';\nimport chalk from 'chalk';\n\ntype RewireRowProps = {\n legacyCodemodResults?: CodemodResult[];\n};\nexport function RewireRow({ legacyCodemodResults }: RewireRowProps) {\n if (!legacyCodemodResults || legacyCodemodResults.length < 1) return '';\n const totalComps = legacyCodemodResults?.length;\n const totalFiles = legacyCodemodResults.reduce((acc, curr) => {\n return acc + curr.changedFiles.length || 0;\n }, 0);\n\n return `rewired ${chalk.cyan(totalComps.toString())} components and total of ${chalk.cyan(\n totalFiles.toString()\n )} files\\n`;\n}\n"],"mappings":";;;;;;;;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAKO,SAASA,SAAT,CAAmB;EAAEC;AAAF,CAAnB,EAA6D;EAClE,IAAI,CAACA,oBAAD,IAAyBA,oBAAoB,CAACC,MAArB,GAA8B,CAA3D,EAA8D,OAAO,EAAP;EAC9D,MAAMC,UAAU,GAAGF,oBAAH,aAAGA,oBAAH,uBAAGA,oBAAoB,CAAEC,MAAzC;EACA,MAAME,UAAU,GAAGH,oBAAoB,CAACI,MAArB,CAA4B,CAACC,GAAD,EAAMC,IAAN,KAAe;IAC5D,OAAOD,GAAG,GAAGC,IAAI,CAACC,YAAL,CAAkBN,MAAxB,IAAkC,CAAzC;EACD,CAFkB,EAEhB,CAFgB,CAAnB;EAIA,OAAQ,WAAUO,gBAAA,CAAMC,IAAN,CAAWP,UAAU,CAACQ,QAAX,EAAX,CAAkC,4BAA2BF,gBAAA,CAAMC,IAAN,CAC7EN,UAAU,CAACO,QAAX,EAD6E,CAE7E,UAFF;AAGD"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { OutdatedPkg } from '@teambit/dependency-resolver';
|
|
2
|
-
/**
|
|
3
|
-
* Lets the user pick the packages that should be updated.
|
|
4
|
-
*/
|
|
5
|
-
export declare function pickOutdatedPkgs(outdatedPkgs: OutdatedPkg[]): Promise<MergedOutdatedPkg[]>;
|
|
6
|
-
/**
|
|
7
|
-
* Groups the outdated packages and makes choices for enquirer's prompt.
|
|
8
|
-
*/
|
|
9
|
-
export declare function makeOutdatedPkgChoices(outdatedPkgs: OutdatedPkg[]): {
|
|
10
|
-
message: string;
|
|
11
|
-
choices: unknown;
|
|
12
|
-
}[];
|
|
13
|
-
export interface MergedOutdatedPkg extends OutdatedPkg {
|
|
14
|
-
dependentComponents?: string[];
|
|
15
|
-
hasDifferentRanges?: boolean;
|
|
16
|
-
}
|