@teambit/workspace 1.0.108 → 1.0.109

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/types.ts DELETED
@@ -1,71 +0,0 @@
1
- interface VendorConfig {
2
- directory: string;
3
- }
4
-
5
- export interface WorkspaceExtConfig {
6
- /**
7
- * name of the workspace.
8
- */
9
- name: string;
10
-
11
- /**
12
- * path to icon.
13
- */
14
- icon: string;
15
-
16
- /**
17
- * set the default scope when there is no matching for the component in the components array.
18
- */
19
- defaultScope: string;
20
-
21
- /**
22
- * set the default directory when there is no matching for the component in the components array.
23
- */
24
- defaultDirectory: string;
25
-
26
- /**
27
- * set the default structure of components in your project
28
- */
29
- vendor: VendorConfig;
30
-
31
- /**
32
- * All component extensions applied by default on all components in the workspace (except vendor components)
33
- */
34
- extensions: { [extensionsId: string]: string };
35
-
36
- /**
37
- * If set to
38
- * `true`, it allows the workspace to resolve scope's aspects from node modules
39
- * installed in the workspace's `node_modules` directory. If not set or set to `false`, aspects will only be resolved
40
- * from the scope aspects capsule.
41
- */
42
- resolveAspectsFromNodeModules?: boolean;
43
-
44
- /**
45
- * If set to `true`, it allows the workspace to resolve envs from node modules
46
- * installed in the workspace's `node_modules` directory.
47
- * the envs will be resolved from the node_modules of the env's root (workspace/node_modules/.bit_roots/{envId})
48
- * and if not found (usually when the env was hoisted to the root node_modules) then from the node_modules of the
49
- * workspace.
50
- * If not set or set to `false`, envs will only be resolved from the scope envs capsule.
51
- */
52
- resolveEnvsFromRoots?: boolean;
53
-
54
- /**
55
- * If set to `true`, bit will try to load aspects dependencies automatically.
56
- * even if the aspects dependencies are not configured in the workspace.jsonc root config.
57
- * for example having the aspect
58
- * main aspect
59
- * export class MainAspectMain {
60
- * ...
61
- * static dependencies = [MyDepAspect];
62
- * }
63
- * and the in the workspace.jsonc file:
64
- * {
65
- * ...
66
- * main-aspect: {}
67
- * }
68
- * when set to true, bit will try to load MyDepAspect automatically.
69
- */
70
- autoLoadAspectsDeps?: boolean;
71
- }
package/use.cmd.ts DELETED
@@ -1,25 +0,0 @@
1
- import { Command, CommandOptions } from '@teambit/cli';
2
- import chalk from 'chalk';
3
- import { Workspace } from './workspace';
4
-
5
- export class UseCmd implements Command {
6
- name = 'use <component-id>';
7
- group = 'collaborate';
8
- description = 'set aspects in the workspace/scope config to make them loadable by the workspace/scope';
9
- helpUrl = 'reference/workspace/workspace-json#adding-an-aspect-to-the-workspace';
10
- arguments = [{ name: 'component-id', description: 'the component ID of the aspect' }];
11
- alias = '';
12
- options = [] as CommandOptions;
13
- loader = true;
14
- migration = true;
15
- remoteOp = true;
16
-
17
- constructor(private workspace: Workspace) {}
18
-
19
- async report([id]: [string]): Promise<any> {
20
- const aspectIdAdded = await this.workspace.use(id);
21
- return chalk.green(
22
- `workspace.jsonc updated successfully! features and extensions from "${aspectIdAdded}" are now available.`
23
- );
24
- }
25
- }