@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.
Files changed (86) hide show
  1. package/dist/index.d.ts +1 -0
  2. package/dist/index.js.map +1 -1
  3. package/dist/ui/workspace/use-workspace.js +3 -0
  4. package/dist/ui/workspace/use-workspace.js.map +1 -1
  5. package/dist/workspace.d.ts +9 -60
  6. package/dist/workspace.js +37 -409
  7. package/dist/workspace.js.map +1 -1
  8. package/dist/workspace.main.runtime.js +1 -11
  9. package/dist/workspace.main.runtime.js.map +1 -1
  10. package/dist/workspace.provider.d.ts +2 -4
  11. package/dist/workspace.provider.js +3 -66
  12. package/dist/workspace.provider.js.map +1 -1
  13. package/dist/workspace.ui.runtime.d.ts +2 -1
  14. package/dist/workspace.ui.runtime.js +27 -6
  15. package/dist/workspace.ui.runtime.js.map +1 -1
  16. package/package-tar/teambit-workspace-0.0.846.tgz +0 -0
  17. package/package.json +33 -42
  18. package/{preview-1662089982043.js → preview-1662608124038.js} +2 -2
  19. package/ui/workspace/use-workspace.ts +3 -0
  20. package/workspace.ui.runtime.tsx +16 -6
  21. package/__snapshots__/pick-outdated-pkgs.spec.ts.snap +0 -171
  22. package/dist/__snapshots__/pick-outdated-pkgs.spec.js.snap +0 -171
  23. package/dist/__snapshots__/pick-outdated-pkgs.spec.ts.snap +0 -171
  24. package/dist/exceptions/dependency-type-not-supported-in-policy.d.ts +0 -4
  25. package/dist/exceptions/dependency-type-not-supported-in-policy.js +0 -27
  26. package/dist/exceptions/dependency-type-not-supported-in-policy.js.map +0 -1
  27. package/dist/exceptions/index.d.ts +0 -1
  28. package/dist/exceptions/index.js +0 -23
  29. package/dist/exceptions/index.js.map +0 -1
  30. package/dist/install.cmd.d.ts +0 -44
  31. package/dist/install.cmd.js +0 -85
  32. package/dist/install.cmd.js.map +0 -1
  33. package/dist/link/component-list-links.d.ts +0 -7
  34. package/dist/link/component-list-links.js +0 -98
  35. package/dist/link/component-list-links.js.map +0 -1
  36. package/dist/link/core-aspects-links.d.ts +0 -7
  37. package/dist/link/core-aspects-links.js +0 -95
  38. package/dist/link/core-aspects-links.js.map +0 -1
  39. package/dist/link/get-package-name-from-target.d.ts +0 -1
  40. package/dist/link/get-package-name-from-target.js +0 -16
  41. package/dist/link/get-package-name-from-target.js.map +0 -1
  42. package/dist/link/index.d.ts +0 -1
  43. package/dist/link/index.js +0 -23
  44. package/dist/link/index.js.map +0 -1
  45. package/dist/link/link-row.d.ts +0 -12
  46. package/dist/link/link-row.js +0 -38
  47. package/dist/link/link-row.js.map +0 -1
  48. package/dist/link/link-to-dir.d.ts +0 -2
  49. package/dist/link/link-to-dir.js +0 -45
  50. package/dist/link/link-to-dir.js.map +0 -1
  51. package/dist/link/link.cmd.d.ts +0 -44
  52. package/dist/link/link.cmd.js +0 -176
  53. package/dist/link/link.cmd.js.map +0 -1
  54. package/dist/link/nested-deps-in-nm-links.d.ts +0 -7
  55. package/dist/link/nested-deps-in-nm-links.js +0 -74
  56. package/dist/link/nested-deps-in-nm-links.js.map +0 -1
  57. package/dist/link/rewire-row.d.ts +0 -6
  58. package/dist/link/rewire-row.js +0 -31
  59. package/dist/link/rewire-row.js.map +0 -1
  60. package/dist/pick-outdated-pkgs.d.ts +0 -16
  61. package/dist/pick-outdated-pkgs.js +0 -308
  62. package/dist/pick-outdated-pkgs.js.map +0 -1
  63. package/dist/pick-outdated-pkgs.spec.d.ts +0 -1
  64. package/dist/pick-outdated-pkgs.spec.js +0 -121
  65. package/dist/pick-outdated-pkgs.spec.js.map +0 -1
  66. package/dist/uninstall.cmd.d.ts +0 -19
  67. package/dist/uninstall.cmd.js +0 -47
  68. package/dist/uninstall.cmd.js.map +0 -1
  69. package/dist/update.cmd.d.ts +0 -23
  70. package/dist/update.cmd.js +0 -47
  71. package/dist/update.cmd.js.map +0 -1
  72. package/exceptions/dependency-type-not-supported-in-policy.ts +0 -7
  73. package/exceptions/index.ts +0 -1
  74. package/install.cmd.tsx +0 -72
  75. package/link/component-list-links.ts +0 -50
  76. package/link/core-aspects-links.ts +0 -50
  77. package/link/get-package-name-from-target.ts +0 -5
  78. package/link/index.ts +0 -1
  79. package/link/link-row.ts +0 -20
  80. package/link/link-to-dir.ts +0 -13
  81. package/link/link.cmd.ts +0 -100
  82. package/link/nested-deps-in-nm-links.ts +0 -47
  83. package/link/rewire-row.ts +0 -17
  84. package/package-tar/teambit-workspace-0.0.843.tgz +0 -0
  85. package/uninstall.cmd.tsx +0 -23
  86. 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
- }
@@ -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
- }
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
- }