@teambit/scope 1.0.317 → 1.0.319

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 (47) hide show
  1. package/artifacts/__bit_junit.xml +1 -1
  2. package/artifacts/preview/teambit_scope_scope-preview.js +1 -1
  3. package/artifacts/schema.json +1528 -1528
  4. package/debug-commands/cat-component-cmd.ts +23 -0
  5. package/debug-commands/cat-component.ts +21 -0
  6. package/debug-commands/cat-lane-cmd.ts +17 -0
  7. package/debug-commands/cat-lane.ts +12 -0
  8. package/debug-commands/cat-object-cmd.ts +24 -0
  9. package/debug-commands/cat-object.ts +12 -0
  10. package/debug-commands/cat-scope-cmd.ts +45 -0
  11. package/debug-commands/cat-scope.ts +10 -0
  12. package/dist/debug-commands/cat-component-cmd.d.ts +11 -0
  13. package/dist/debug-commands/cat-component-cmd.js +38 -0
  14. package/dist/debug-commands/cat-component-cmd.js.map +1 -0
  15. package/dist/debug-commands/cat-component.d.ts +1 -0
  16. package/dist/debug-commands/cat-component.js +39 -0
  17. package/dist/debug-commands/cat-component.js.map +1 -0
  18. package/dist/debug-commands/cat-lane-cmd.d.ts +11 -0
  19. package/dist/debug-commands/cat-lane-cmd.js +34 -0
  20. package/dist/debug-commands/cat-lane-cmd.js.map +1 -0
  21. package/dist/debug-commands/cat-lane.d.ts +17 -0
  22. package/dist/debug-commands/cat-lane.js +31 -0
  23. package/dist/debug-commands/cat-lane.js.map +1 -0
  24. package/dist/debug-commands/cat-object-cmd.d.ts +15 -0
  25. package/dist/debug-commands/cat-object-cmd.js +38 -0
  26. package/dist/debug-commands/cat-object-cmd.js.map +1 -0
  27. package/dist/debug-commands/cat-object.d.ts +1 -0
  28. package/dist/debug-commands/cat-object.js +25 -0
  29. package/dist/debug-commands/cat-object.js.map +1 -0
  30. package/dist/debug-commands/cat-scope-cmd.d.ts +18 -0
  31. package/dist/debug-commands/cat-scope-cmd.js +71 -0
  32. package/dist/debug-commands/cat-scope-cmd.js.map +1 -0
  33. package/dist/debug-commands/cat-scope.d.ts +2 -0
  34. package/dist/debug-commands/cat-scope.js +26 -0
  35. package/dist/debug-commands/cat-scope.js.map +1 -0
  36. package/dist/{preview-1719458409904.js → preview-1719631375170.js} +2 -2
  37. package/dist/run-action/run-action.cmd.d.ts +10 -0
  38. package/dist/run-action/run-action.cmd.js +34 -0
  39. package/dist/run-action/run-action.cmd.js.map +1 -0
  40. package/dist/run-action/run-action.d.ts +1 -0
  41. package/dist/run-action/run-action.js +28 -0
  42. package/dist/run-action/run-action.js.map +1 -0
  43. package/dist/scope.main.runtime.js +37 -1
  44. package/dist/scope.main.runtime.js.map +1 -1
  45. package/package.json +23 -21
  46. package/run-action/run-action.cmd.ts +17 -0
  47. package/run-action/run-action.ts +9 -0
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/scope",
3
- "version": "1.0.317",
3
+ "version": "1.0.319",
4
4
  "homepage": "https://bit.cloud/teambit/scope/scope",
5
5
  "main": "dist/index.js",
6
6
  "componentId": {
7
7
  "scope": "teambit.scope",
8
8
  "name": "scope",
9
- "version": "1.0.317"
9
+ "version": "1.0.319"
10
10
  },
11
11
  "dependencies": {
12
12
  "fs-extra": "10.0.0",
@@ -17,6 +17,7 @@
17
17
  "graphql-tag": "2.12.1",
18
18
  "@teambit/chokidar": "3.5.6",
19
19
  "multimatch": "5.0.0",
20
+ "cli-table": "0.3.6",
20
21
  "classnames": "2.2.6",
21
22
  "reset-css": "5.0.1",
22
23
  "@teambit/ui-foundation.ui.tree.drawer": "0.0.518",
@@ -40,44 +41,44 @@
40
41
  "@teambit/ui-foundation.ui.hooks.use-is-mobile": "0.0.198",
41
42
  "@teambit/ui-foundation.ui.top-bar": "0.0.514",
42
43
  "@teambit/scope.ui.hooks.use-scope": "0.0.453",
44
+ "@teambit/ui-foundation.ui.use-box.dropdown": "0.0.142",
45
+ "@teambit/ui-foundation.ui.use-box.scope-menu": "0.0.146",
43
46
  "@teambit/explorer.ui.gallery.component-grid": "0.0.496",
44
47
  "@teambit/scope.ui.empty-scope": "0.0.509",
45
48
  "@teambit/scope.ui.scope-details": "0.0.526",
46
49
  "@teambit/scopes.scope-id": "0.0.7",
47
50
  "@teambit/explorer.ui.component-card": "0.0.30",
48
- "@teambit/ui-foundation.ui.use-box.dropdown": "0.0.142",
49
- "@teambit/ui-foundation.ui.use-box.scope-menu": "0.0.146",
50
51
  "@teambit/component.modules.component-url": "0.0.167",
51
52
  "@teambit/scope.models.scope-model": "0.0.510",
52
53
  "@teambit/scope.ui.hooks.scope-context": "0.0.504",
53
- "@teambit/aspect-loader": "1.0.317",
54
- "@teambit/cli": "0.0.894",
55
- "@teambit/compiler": "1.0.317",
56
- "@teambit/component": "1.0.317",
57
- "@teambit/dependency-resolver": "1.0.317",
58
- "@teambit/envs": "1.0.317",
59
- "@teambit/global-config": "0.0.897",
54
+ "@teambit/aspect-loader": "1.0.319",
55
+ "@teambit/cli": "0.0.896",
56
+ "@teambit/compiler": "1.0.319",
57
+ "@teambit/component": "1.0.319",
58
+ "@teambit/dependency-resolver": "1.0.319",
59
+ "@teambit/envs": "1.0.319",
60
+ "@teambit/global-config": "0.0.899",
60
61
  "@teambit/harmony.modules.requireable-component": "0.0.497",
61
- "@teambit/isolator": "1.0.317",
62
- "@teambit/logger": "0.0.987",
62
+ "@teambit/isolator": "1.0.319",
63
+ "@teambit/logger": "0.0.989",
63
64
  "@teambit/legacy-component-log": "0.0.403",
64
- "@teambit/builder": "1.0.317",
65
- "@teambit/express": "0.0.993",
66
- "@teambit/graph": "1.0.317",
67
- "@teambit/graphql": "1.0.317",
68
- "@teambit/ui": "1.0.317",
65
+ "@teambit/builder": "1.0.319",
66
+ "@teambit/express": "0.0.995",
67
+ "@teambit/graph": "1.0.319",
68
+ "@teambit/graphql": "1.0.319",
69
+ "@teambit/ui": "1.0.319",
69
70
  "@teambit/workspace.modules.match-pattern": "0.0.505",
70
71
  "@teambit/component.ui.component-drawer": "0.0.401",
71
72
  "@teambit/lanes.hooks.use-lane-components": "0.0.264",
72
73
  "@teambit/lanes.hooks.use-lanes": "0.0.264",
73
74
  "@teambit/lanes.ui.models.lanes-model": "0.0.216",
74
- "@teambit/command-bar": "1.0.317",
75
- "@teambit/component-tree": "1.0.317",
75
+ "@teambit/command-bar": "1.0.319",
76
+ "@teambit/component-tree": "1.0.319",
76
77
  "@teambit/component.ui.component-filters.component-filter-context": "0.0.222",
77
78
  "@teambit/component.ui.component-filters.deprecate-filter": "0.0.220",
78
79
  "@teambit/component.ui.component-filters.env-filter": "0.0.230",
79
80
  "@teambit/component.ui.component-filters.show-main-filter": "0.0.213",
80
- "@teambit/sidebar": "1.0.317",
81
+ "@teambit/sidebar": "1.0.319",
81
82
  "@teambit/ui-foundation.ui.react-router.slot-router": "0.0.509",
82
83
  "@teambit/ui-foundation.ui.buttons.collapser": "0.0.222",
83
84
  "@teambit/component-descriptor": "0.0.421",
@@ -88,6 +89,7 @@
88
89
  "@types/fs-extra": "9.0.7",
89
90
  "@types/lodash": "4.14.165",
90
91
  "@types/semver": "7.3.4",
92
+ "@types/cli-table": "^0.3.0",
91
93
  "@types/classnames": "2.2.11",
92
94
  "@types/mocha": "9.1.0",
93
95
  "chai": "4.3.0",
@@ -0,0 +1,17 @@
1
+ import { runAction } from './run-action';
2
+ import { Command, CommandOptions } from '@teambit/cli';
3
+
4
+ export class RunActionCmd implements Command {
5
+ name = 'run-action <action-name> <remote> <options>';
6
+ description = 'run an action on a remote';
7
+ private = true;
8
+ alias = '';
9
+ options = [] as CommandOptions;
10
+ loadAspects = false;
11
+
12
+ async report([actionName, remote, options]: [string, string, string]) {
13
+ const optionsParsed = JSON.parse(options);
14
+ const result = await runAction(actionName, remote, optionsParsed);
15
+ return result || '';
16
+ }
17
+ }
@@ -0,0 +1,9 @@
1
+ import { loadScope, Scope } from '@teambit/legacy/dist/scope';
2
+ import { getScopeRemotes } from '@teambit/legacy/dist/scope/scope-remotes';
3
+
4
+ export async function runAction(actionName: string, remote: string, options = {}): Promise<any> {
5
+ const scope: Scope = await loadScope();
6
+ const scopeRemotes = await getScopeRemotes(scope);
7
+ const remoteObj = await scopeRemotes.resolve(remote, scope);
8
+ return remoteObj.action(actionName, options);
9
+ }