@teambit/workspace 0.0.843 → 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/ui/workspace/use-workspace.js +3 -0
- package/dist/ui/workspace/use-workspace.js.map +1 -1
- package/dist/workspace.d.ts +9 -60
- package/dist/workspace.js +37 -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/dist/workspace.ui.runtime.d.ts +2 -1
- package/dist/workspace.ui.runtime.js +27 -6
- package/dist/workspace.ui.runtime.js.map +1 -1
- package/package-tar/teambit-workspace-0.0.846.tgz +0 -0
- package/package.json +33 -42
- package/{preview-1662089982043.js → preview-1662608124038.js} +2 -2
- package/ui/workspace/use-workspace.ts +3 -0
- package/workspace.ui.runtime.tsx +16 -6
- 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.843.tgz +0 -0
- package/uninstall.cmd.tsx +0 -23
- package/update.cmd.tsx +0 -29
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import chalk from 'chalk';
|
|
2
|
-
import { NestedNMDepsLinksResult } from '@teambit/dependency-resolver';
|
|
3
|
-
import { VerboseLinkRow } from './link-row';
|
|
4
|
-
|
|
5
|
-
type NestedComponentLinksLinksProps = {
|
|
6
|
-
nestedDepsInNmLinks?: NestedNMDepsLinksResult[];
|
|
7
|
-
verbose: boolean;
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
export function NestedComponentLinksLinks({ nestedDepsInNmLinks, verbose = false }: NestedComponentLinksLinksProps) {
|
|
11
|
-
if (!verbose) return '';
|
|
12
|
-
if (!nestedDepsInNmLinks || !nestedDepsInNmLinks.length) {
|
|
13
|
-
return '';
|
|
14
|
-
}
|
|
15
|
-
const title = chalk.bold.cyan('Nested dependencies links');
|
|
16
|
-
const links = nestedDepsInNmLinks
|
|
17
|
-
.map((nestedComponentLinks) =>
|
|
18
|
-
NestedComponentLinks({
|
|
19
|
-
nestedComponentLinks,
|
|
20
|
-
verbose,
|
|
21
|
-
})
|
|
22
|
-
)
|
|
23
|
-
.join('\n');
|
|
24
|
-
return `${title}\n${links}\n`;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
type NestedComponentLinksProps = {
|
|
28
|
-
nestedComponentLinks: NestedNMDepsLinksResult;
|
|
29
|
-
verbose: boolean;
|
|
30
|
-
};
|
|
31
|
-
function NestedComponentLinks({ nestedComponentLinks, verbose = false }: NestedComponentLinksProps) {
|
|
32
|
-
if (!nestedComponentLinks.linksDetail || nestedComponentLinks.linksDetail.length < 1) return '';
|
|
33
|
-
if (verbose) return VerboseNestedComponentLinks({ nestedComponentLinks });
|
|
34
|
-
return '';
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
type VerboseNestedComponentLinksProps = {
|
|
38
|
-
nestedComponentLinks: NestedNMDepsLinksResult;
|
|
39
|
-
};
|
|
40
|
-
function VerboseNestedComponentLinks({ nestedComponentLinks }: VerboseNestedComponentLinksProps) {
|
|
41
|
-
const id = nestedComponentLinks.componentId.toString();
|
|
42
|
-
const title = chalk.cyan.bold(id);
|
|
43
|
-
const links = nestedComponentLinks.linksDetail
|
|
44
|
-
.map((link) => VerboseLinkRow({ from: link.from, to: link.to }))
|
|
45
|
-
.join('\n');
|
|
46
|
-
return `${title}\n${links}\n`;
|
|
47
|
-
}
|
package/link/rewire-row.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { CodemodResult } from '@teambit/legacy/dist/consumer/component-ops/codemod-components';
|
|
2
|
-
import chalk from 'chalk';
|
|
3
|
-
|
|
4
|
-
type RewireRowProps = {
|
|
5
|
-
legacyCodemodResults?: CodemodResult[];
|
|
6
|
-
};
|
|
7
|
-
export function RewireRow({ legacyCodemodResults }: RewireRowProps) {
|
|
8
|
-
if (!legacyCodemodResults || legacyCodemodResults.length < 1) return '';
|
|
9
|
-
const totalComps = legacyCodemodResults?.length;
|
|
10
|
-
const totalFiles = legacyCodemodResults.reduce((acc, curr) => {
|
|
11
|
-
return acc + curr.changedFiles.length || 0;
|
|
12
|
-
}, 0);
|
|
13
|
-
|
|
14
|
-
return `rewired ${chalk.cyan(totalComps.toString())} components and total of ${chalk.cyan(
|
|
15
|
-
totalFiles.toString()
|
|
16
|
-
)} files\n`;
|
|
17
|
-
}
|
|
Binary file
|
package/uninstall.cmd.tsx
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { Command, CommandOptions } from '@teambit/cli';
|
|
2
|
-
|
|
3
|
-
import { Workspace } from './workspace';
|
|
4
|
-
|
|
5
|
-
export default class UninstallCmd implements Command {
|
|
6
|
-
name = 'uninstall [packages...]';
|
|
7
|
-
description = 'uninstall dependencies';
|
|
8
|
-
alias = 'un';
|
|
9
|
-
group = 'development';
|
|
10
|
-
options = [] as CommandOptions;
|
|
11
|
-
|
|
12
|
-
constructor(
|
|
13
|
-
/**
|
|
14
|
-
* workspace extension.
|
|
15
|
-
*/
|
|
16
|
-
private workspace: Workspace
|
|
17
|
-
) {}
|
|
18
|
-
|
|
19
|
-
async report([packages = []]: [string[]]) {
|
|
20
|
-
await this.workspace.uninstallDependencies(packages);
|
|
21
|
-
return '';
|
|
22
|
-
}
|
|
23
|
-
}
|
package/update.cmd.tsx
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { Command, CommandOptions } from '@teambit/cli';
|
|
2
|
-
|
|
3
|
-
import { Workspace } from './workspace';
|
|
4
|
-
|
|
5
|
-
type UpdateCmdOptions = {
|
|
6
|
-
yes?: boolean;
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
export default class UpdateCmd implements Command {
|
|
10
|
-
name = 'update';
|
|
11
|
-
description = 'update dependencies';
|
|
12
|
-
alias = 'up';
|
|
13
|
-
group = 'development';
|
|
14
|
-
options = [['y', 'yes', 'automatically update all outdated packages']] as CommandOptions;
|
|
15
|
-
|
|
16
|
-
constructor(
|
|
17
|
-
/**
|
|
18
|
-
* workspace extension.
|
|
19
|
-
*/
|
|
20
|
-
private workspace: Workspace
|
|
21
|
-
) {}
|
|
22
|
-
|
|
23
|
-
async report(args: [string[]], options: UpdateCmdOptions) {
|
|
24
|
-
await this.workspace.updateDependencies({
|
|
25
|
-
all: options.yes === true,
|
|
26
|
-
});
|
|
27
|
-
return '';
|
|
28
|
-
}
|
|
29
|
-
}
|