@teambit/workspace 1.0.226 → 1.0.228
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/artifacts/__bit_junit.xml +1 -1
- package/artifacts/preview/teambit_workspace_workspace-preview.js +1 -1
- package/artifacts/schema.json +568 -2434
- package/dist/{preview-1712632644937.js → preview-1712805335812.js} +2 -2
- package/package.json +29 -29
- package/tsconfig.json +67 -1
- package/dist/aspects-merger.d.ts +0 -58
- package/dist/bit-map.d.ts +0 -75
- package/dist/build-graph-from-fs.d.ts +0 -64
- package/dist/build-graph-ids-from-fs.d.ts +0 -48
- package/dist/capsule.cmd.d.ts +0 -81
- package/dist/component-config-file/component-config-file.d.ts +0 -34
- package/dist/component-config-file/exceptions/already-exists.d.ts +0 -4
- package/dist/component-config-file/exceptions/index.d.ts +0 -1
- package/dist/component-config-file/index.d.ts +0 -2
- package/dist/component-tree.widget.d.ts +0 -4
- package/dist/constants.d.ts +0 -1
- package/dist/eject-conf.cmd.d.ts +0 -20
- package/dist/envs-subcommands/envs-replace.cmd.d.ts +0 -19
- package/dist/envs-subcommands/envs-set.cmd.d.ts +0 -20
- package/dist/envs-subcommands/envs-unset.cmd.d.ts +0 -16
- package/dist/envs-subcommands/envs-update.cmd.d.ts +0 -19
- package/dist/events/index.d.ts +0 -3
- package/dist/events/on-component-add-event.d.ts +0 -14
- package/dist/events/on-component-change-event.d.ts +0 -14
- package/dist/events/on-component-removed-event.d.ts +0 -12
- package/dist/exceptions/incorrect-env-aspect.d.ts +0 -4
- package/dist/exceptions/merge-config-conflict.d.ts +0 -4
- package/dist/exceptions/outside-workspace.d.ts +0 -4
- package/dist/filter.d.ts +0 -27
- package/dist/index.d.ts +0 -20
- package/dist/merge-conflict-file.d.ts +0 -23
- package/dist/on-component-events.d.ts +0 -16
- package/dist/pattern.cmd.d.ts +0 -19
- package/dist/scope-subcommands/scope-set.cmd.d.ts +0 -16
- package/dist/types.d.ts +0 -65
- package/dist/ui/index.d.ts +0 -1
- package/dist/ui/workspace/default-component.d.ts +0 -7
- package/dist/ui/workspace/index.d.ts +0 -1
- package/dist/ui/workspace/use-workspace.d.ts +0 -32
- package/dist/ui/workspace/workspace-context.d.ts +0 -3
- package/dist/ui/workspace/workspace-model.d.ts +0 -68
- package/dist/ui/workspace/workspace-overview/index.d.ts +0 -1
- package/dist/ui/workspace/workspace-overview/link-plugin.d.ts +0 -3
- package/dist/ui/workspace/workspace-overview/workspace-overview.d.ts +0 -6
- package/dist/ui/workspace/workspace-provider.d.ts +0 -16
- package/dist/ui/workspace/workspace.d.ts +0 -14
- package/dist/use.cmd.d.ts +0 -19
- package/dist/workspace-aspects-loader.d.ts +0 -121
- package/dist/workspace-component/comp-files.d.ts +0 -22
- package/dist/workspace-component/component-status-loader.d.ts +0 -38
- package/dist/workspace-component/component-status.d.ts +0 -75
- package/dist/workspace-component/index.d.ts +0 -2
- package/dist/workspace-component/workspace-component-loader.d.ts +0 -100
- package/dist/workspace-component/workspace-component.d.ts +0 -49
- package/dist/workspace-section.d.ts +0 -0
- package/dist/workspace.aspect.d.ts +0 -3
- package/dist/workspace.composition.d.ts +0 -1
- package/dist/workspace.d.ts +0 -543
- package/dist/workspace.graphql.d.ts +0 -44
- package/dist/workspace.main.runtime.d.ts +0 -64
- package/dist/workspace.ui-root.d.ts +0 -43
- package/dist/workspace.ui.drawer.d.ts +0 -13
- package/dist/workspace.ui.runtime.d.ts +0 -99
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.workspace_workspace@1.0.
|
|
2
|
-
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.workspace_workspace@1.0.
|
|
1
|
+
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.workspace_workspace@1.0.228/dist/workspace.composition.js';
|
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.workspace_workspace@1.0.228/dist/workspace.docs.mdx';
|
|
3
3
|
|
|
4
4
|
export const compositions = [compositions_0];
|
|
5
5
|
export const overview = [overview_0];
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/workspace",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.228",
|
|
4
4
|
"homepage": "https://bit.cloud/teambit/workspace/workspace",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.workspace",
|
|
8
8
|
"name": "workspace",
|
|
9
|
-
"version": "1.0.
|
|
9
|
+
"version": "1.0.228"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"lodash": "4.17.21",
|
|
@@ -54,47 +54,47 @@
|
|
|
54
54
|
"@teambit/explorer.ui.gallery.component-grid": "0.0.496",
|
|
55
55
|
"@teambit/scopes.scope-id": "0.0.7",
|
|
56
56
|
"@teambit/workspace.ui.empty-workspace": "0.0.508",
|
|
57
|
-
"@teambit/component": "1.0.
|
|
58
|
-
"@teambit/dependency-resolver": "1.0.
|
|
59
|
-
"@teambit/envs": "1.0.
|
|
60
|
-
"@teambit/logger": "0.0.
|
|
61
|
-
"@teambit/scope": "1.0.
|
|
62
|
-
"@teambit/graph": "1.0.
|
|
63
|
-
"@teambit/cli": "0.0.
|
|
64
|
-
"@teambit/isolator": "1.0.
|
|
65
|
-
"@teambit/component-tree": "1.0.
|
|
57
|
+
"@teambit/component": "1.0.228",
|
|
58
|
+
"@teambit/dependency-resolver": "1.0.228",
|
|
59
|
+
"@teambit/envs": "1.0.228",
|
|
60
|
+
"@teambit/logger": "0.0.954",
|
|
61
|
+
"@teambit/scope": "1.0.228",
|
|
62
|
+
"@teambit/graph": "1.0.228",
|
|
63
|
+
"@teambit/cli": "0.0.861",
|
|
64
|
+
"@teambit/isolator": "1.0.228",
|
|
65
|
+
"@teambit/component-tree": "1.0.228",
|
|
66
66
|
"@teambit/harmony.modules.resolved-component": "0.0.497",
|
|
67
|
-
"@teambit/watcher": "1.0.
|
|
68
|
-
"@teambit/aspect-loader": "1.0.
|
|
69
|
-
"@teambit/config": "0.0.
|
|
70
|
-
"@teambit/global-config": "0.0.
|
|
67
|
+
"@teambit/watcher": "1.0.228",
|
|
68
|
+
"@teambit/aspect-loader": "1.0.228",
|
|
69
|
+
"@teambit/config": "0.0.979",
|
|
70
|
+
"@teambit/global-config": "0.0.864",
|
|
71
71
|
"@teambit/harmony.modules.requireable-component": "0.0.497",
|
|
72
72
|
"@teambit/toolbox.modules.module-resolver": "0.0.7",
|
|
73
73
|
"@teambit/workspace.modules.node-modules-linker": "0.0.167",
|
|
74
|
-
"@teambit/graphql": "1.0.
|
|
75
|
-
"@teambit/bundler": "1.0.
|
|
76
|
-
"@teambit/pubsub": "1.0.
|
|
77
|
-
"@teambit/ui": "1.0.
|
|
78
|
-
"@teambit/variants": "0.0.
|
|
74
|
+
"@teambit/graphql": "1.0.228",
|
|
75
|
+
"@teambit/bundler": "1.0.228",
|
|
76
|
+
"@teambit/pubsub": "1.0.228",
|
|
77
|
+
"@teambit/ui": "1.0.228",
|
|
78
|
+
"@teambit/variants": "0.0.1072",
|
|
79
79
|
"@teambit/component-issues": "0.0.143",
|
|
80
80
|
"@teambit/workspace.modules.match-pattern": "0.0.505",
|
|
81
|
-
"@teambit/component.ui.component-drawer": "0.0.
|
|
82
|
-
"@teambit/lanes.hooks.use-lane-components": "0.0.
|
|
81
|
+
"@teambit/component.ui.component-drawer": "0.0.398",
|
|
82
|
+
"@teambit/lanes.hooks.use-lane-components": "0.0.261",
|
|
83
83
|
"@teambit/lanes.hooks.use-lanes": "0.0.264",
|
|
84
84
|
"@teambit/lanes.ui.models.lanes-model": "0.0.216",
|
|
85
|
-
"@teambit/command-bar": "1.0.
|
|
85
|
+
"@teambit/command-bar": "1.0.228",
|
|
86
86
|
"@teambit/component.ui.component-filters.component-filter-context": "0.0.222",
|
|
87
87
|
"@teambit/component.ui.component-filters.deprecate-filter": "0.0.220",
|
|
88
88
|
"@teambit/component.ui.component-filters.env-filter": "0.0.228",
|
|
89
89
|
"@teambit/component.ui.component-filters.show-main-filter": "0.0.213",
|
|
90
|
-
"@teambit/sidebar": "1.0.
|
|
90
|
+
"@teambit/sidebar": "1.0.228",
|
|
91
91
|
"@teambit/ui-foundation.ui.react-router.slot-router": "0.0.508",
|
|
92
|
-
"@teambit/component-descriptor": "0.0.
|
|
93
|
-
"@teambit/deprecation": "1.0.
|
|
92
|
+
"@teambit/component-descriptor": "0.0.418",
|
|
93
|
+
"@teambit/deprecation": "1.0.228",
|
|
94
94
|
"@teambit/ui-foundation.ui.buttons.collapser": "0.0.219",
|
|
95
95
|
"@teambit/cloud.hooks.use-cloud-scopes": "0.0.3",
|
|
96
|
-
"@teambit/preview.ui.preview-placeholder": "0.0.
|
|
97
|
-
"@teambit/workspace.ui.workspace-component-card": "0.0.
|
|
96
|
+
"@teambit/preview.ui.preview-placeholder": "0.0.517",
|
|
97
|
+
"@teambit/workspace.ui.workspace-component-card": "0.0.525"
|
|
98
98
|
},
|
|
99
99
|
"devDependencies": {
|
|
100
100
|
"@types/lodash": "4.14.165",
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
"@types/mocha": "9.1.0",
|
|
109
109
|
"chai": "4.3.0",
|
|
110
110
|
"@teambit/workspace.content.workspace-overview": "1.95.0",
|
|
111
|
-
"@teambit/harmony.envs.core-aspect-env": "0.0.
|
|
111
|
+
"@teambit/harmony.envs.core-aspect-env": "0.0.30"
|
|
112
112
|
},
|
|
113
113
|
"peerDependencies": {
|
|
114
114
|
"@apollo/client": "^3.6.0",
|
package/tsconfig.json
CHANGED
|
@@ -20,7 +20,8 @@
|
|
|
20
20
|
"emitDeclarationOnly": true,
|
|
21
21
|
"strict": true,
|
|
22
22
|
"strictPropertyInitialization": false,
|
|
23
|
-
"noImplicitAny": false
|
|
23
|
+
"noImplicitAny": false,
|
|
24
|
+
"composite": true
|
|
24
25
|
},
|
|
25
26
|
"exclude": [
|
|
26
27
|
"artifacts",
|
|
@@ -35,5 +36,70 @@
|
|
|
35
36
|
"include": [
|
|
36
37
|
"**/*",
|
|
37
38
|
"**/*.json"
|
|
39
|
+
],
|
|
40
|
+
"references": [
|
|
41
|
+
{
|
|
42
|
+
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_component@1.0.228"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.envs_envs@1.0.228"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_logger@0.0.954"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.scope_scope@1.0.228"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_graph@1.0.228"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_cli@0.0.861"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_isolator@1.0.228"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_component-tree@1.0.228"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.workspace_watcher@1.0.228"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_aspect-loader@1.0.228"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_config@0.0.979"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_global-config@0.0.864"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_graphql@1.0.228"
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.compilation_bundler@1.0.228"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_pubsub@1.0.228"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.ui-foundation_ui@1.0.228"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.workspace_variants@0.0.1072"
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.explorer_command-bar@1.0.228"
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.ui-foundation_sidebar@1.0.228"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_component-descriptor@0.0.418"
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_deprecation@1.0.228"
|
|
103
|
+
}
|
|
38
104
|
]
|
|
39
105
|
}
|
package/dist/aspects-merger.d.ts
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { Harmony } from '@teambit/harmony';
|
|
2
|
-
import { Component } from '@teambit/component';
|
|
3
|
-
import { ComponentID } from '@teambit/component-id';
|
|
4
|
-
import { ExtensionDataList } from '@teambit/legacy/dist/consumer/config/extension-data';
|
|
5
|
-
import { ExtensionsOrigin, Workspace } from './workspace';
|
|
6
|
-
import { MergeConflictFile } from './merge-conflict-file';
|
|
7
|
-
export declare class AspectsMerger {
|
|
8
|
-
private workspace;
|
|
9
|
-
private harmony;
|
|
10
|
-
readonly mergeConflictFile: MergeConflictFile;
|
|
11
|
-
private mergeConfigDepsResolverDataCache;
|
|
12
|
-
constructor(workspace: Workspace, harmony: Harmony);
|
|
13
|
-
getDepsDataOfMergeConfig(id: ComponentID): Record<string, any>;
|
|
14
|
-
/**
|
|
15
|
-
* Calculate the component config based on:
|
|
16
|
-
* the config property in the .bitmap file
|
|
17
|
-
* the component.json file in the component folder
|
|
18
|
-
* matching pattern in the variants config
|
|
19
|
-
* defaults extensions from workspace config
|
|
20
|
-
* extensions from the model.
|
|
21
|
-
*/
|
|
22
|
-
merge(componentId: ComponentID, componentFromScope?: Component, excludeOrigins?: ExtensionsOrigin[]): Promise<{
|
|
23
|
-
extensions: ExtensionDataList;
|
|
24
|
-
beforeMerge: Array<{
|
|
25
|
-
extensions: ExtensionDataList;
|
|
26
|
-
origin: ExtensionsOrigin;
|
|
27
|
-
extraData: any;
|
|
28
|
-
}>;
|
|
29
|
-
errors?: Error[];
|
|
30
|
-
}>;
|
|
31
|
-
/**
|
|
32
|
-
* before version 0.0.882 it was possible to save Version object with the same extension twice.
|
|
33
|
-
*/
|
|
34
|
-
private getComponentFromScopeWithoutDuplications;
|
|
35
|
-
/**
|
|
36
|
-
* from the merge-config we get the dep-resolver policy as an array, because it needs to support "force" prop.
|
|
37
|
-
* however, when we save the config, we want to save it as an object, so we need split the data into two:
|
|
38
|
-
* 1. force: true, which gets saved into the config.
|
|
39
|
-
* 2. force: false, which gets saved into the data.dependencies later on. see the workspace.getAutoDetectOverrides()
|
|
40
|
-
*/
|
|
41
|
-
private removeAutoDepsFromConfig;
|
|
42
|
-
/**
|
|
43
|
-
* this is needed because if the mergeConfig has a policy, it will be used, and any other policy along the line will be ignored.
|
|
44
|
-
* in case the model has some dependencies that were set explicitly they're gonna be ignored.
|
|
45
|
-
* this makes sure to add them to the policy of the mergeConfig.
|
|
46
|
-
* in a way, this is similar to what we do when a user is running `bit deps set` and the component had previous dependencies set,
|
|
47
|
-
* we copy those dependencies along with the current one to the .bitmap file, so they won't get lost.
|
|
48
|
-
*/
|
|
49
|
-
private addConfigDepsFromModelToConfigMerge;
|
|
50
|
-
private getUnmergedData;
|
|
51
|
-
private filterEnvsFromExtensionsIfNeeded;
|
|
52
|
-
/**
|
|
53
|
-
* This will mutate the entries with extensionId prop to have resolved legacy id
|
|
54
|
-
* This should be worked on the extension data list not the new aspect list
|
|
55
|
-
* @param extensionList
|
|
56
|
-
*/
|
|
57
|
-
private resolveExtensionListIds;
|
|
58
|
-
}
|
package/dist/bit-map.d.ts
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { ComponentID } from '@teambit/component-id';
|
|
2
|
-
import LegacyBitMap from '@teambit/legacy/dist/consumer/bit-map';
|
|
3
|
-
import { Consumer } from '@teambit/legacy/dist/consumer';
|
|
4
|
-
import { GetBitMapComponentOptions } from '@teambit/legacy/dist/consumer/bit-map/bit-map';
|
|
5
|
-
import ComponentMap from '@teambit/legacy/dist/consumer/bit-map/component-map';
|
|
6
|
-
import { LaneId } from '@teambit/lane-id';
|
|
7
|
-
import { PathOsBasedAbsolute } from '@teambit/legacy/dist/utils/path';
|
|
8
|
-
export type MergeOptions = {
|
|
9
|
-
mergeStrategy?: 'theirs' | 'ours' | 'manual';
|
|
10
|
-
};
|
|
11
|
-
/**
|
|
12
|
-
* consider extracting to a new component.
|
|
13
|
-
* (pro: making Workspace aspect smaller. con: it's an implementation details of the workspace)
|
|
14
|
-
*/
|
|
15
|
-
export declare class BitMap {
|
|
16
|
-
private legacyBitMap;
|
|
17
|
-
private consumer;
|
|
18
|
-
constructor(legacyBitMap: LegacyBitMap, consumer: Consumer);
|
|
19
|
-
mergeBitmaps(bitmapContent: string, otherBitmapContent: string, opts?: MergeOptions): string;
|
|
20
|
-
getPath(): PathOsBasedAbsolute;
|
|
21
|
-
getAllRootDirs(): string[];
|
|
22
|
-
/**
|
|
23
|
-
* adds component config to the .bitmap file.
|
|
24
|
-
* later, upon `bit tag`, the data is saved in the scope.
|
|
25
|
-
* returns a boolean indicating whether a change has been made.
|
|
26
|
-
*/
|
|
27
|
-
addComponentConfig(id: ComponentID, aspectId: string, config?: Record<string, any>, shouldMergeConfig?: boolean): boolean;
|
|
28
|
-
updateDefaultScope(oldScope: string, newScope: string): ComponentID[];
|
|
29
|
-
markAsChanged(): void;
|
|
30
|
-
removeComponentConfig(id: ComponentID, aspectId: string, markWithMinusIfNotExist: boolean): boolean;
|
|
31
|
-
removeEntireConfig(id: ComponentID): boolean;
|
|
32
|
-
setEntireConfig(id: ComponentID, config: Record<string, any>): void;
|
|
33
|
-
removeDefaultScope(id: ComponentID): void;
|
|
34
|
-
setDefaultScope(id: ComponentID, defaultScope: string): void;
|
|
35
|
-
/**
|
|
36
|
-
* write .bitmap object to the filesystem
|
|
37
|
-
* optionally pass a reason for the change to be saved in the local scope `bitmap-history-metadata.txt` file.
|
|
38
|
-
*/
|
|
39
|
-
write(reasonForChange?: string): Promise<void>;
|
|
40
|
-
/**
|
|
41
|
-
* get the data saved in the .bitmap file for this component-id.
|
|
42
|
-
* throws if not found
|
|
43
|
-
* @see this.getBitmapEntryIfExist
|
|
44
|
-
*/
|
|
45
|
-
getBitmapEntry(id: ComponentID, { ignoreVersion }?: GetBitMapComponentOptions): ComponentMap;
|
|
46
|
-
getBitmapEntryIfExist(id: ComponentID, { ignoreVersion }?: GetBitMapComponentOptions): ComponentMap | undefined;
|
|
47
|
-
getAspectIdFromConfig(componentId: ComponentID, aspectId: ComponentID, ignoreAspectVersion?: boolean): string | undefined;
|
|
48
|
-
/**
|
|
49
|
-
* components that were not tagged yet are safe to rename them from the .bitmap file.
|
|
50
|
-
*/
|
|
51
|
-
renameNewComponent(sourceId: ComponentID, targetId: ComponentID): void;
|
|
52
|
-
/**
|
|
53
|
-
* helpful when reaming an aspect and this aspect is used in the config of other components.
|
|
54
|
-
*/
|
|
55
|
-
renameAspectInConfig(sourceId: ComponentID, targetId: ComponentID): void;
|
|
56
|
-
removeComponent(id: ComponentID): void;
|
|
57
|
-
/**
|
|
58
|
-
* this is the lane-id of the recently exported lane. in case of a new lane, which was not exported yet, this will be
|
|
59
|
-
* empty.
|
|
60
|
-
*/
|
|
61
|
-
getExportedLaneId(): LaneId | undefined;
|
|
62
|
-
makeComponentsAvailableOnMain(ids: ComponentID[]): void;
|
|
63
|
-
/**
|
|
64
|
-
* whether .bitmap file has changed in-memory
|
|
65
|
-
*/
|
|
66
|
-
hasChanged(): boolean;
|
|
67
|
-
takeSnapshot(): ComponentMap[];
|
|
68
|
-
restoreFromSnapshot(componentMaps: ComponentMap[]): void;
|
|
69
|
-
/**
|
|
70
|
-
* .bitmap file could be changed by other sources (e.g. manually or by "git pull") not only by bit.
|
|
71
|
-
* this method returns the timestamp when the .bitmap has changed through bit. (e.g. as part of snap/tag/export/merge
|
|
72
|
-
* process)
|
|
73
|
-
*/
|
|
74
|
-
getLastModifiedBitmapThroughBit(): Promise<number | undefined>;
|
|
75
|
-
}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { Graph } from '@teambit/graph.cleargraph';
|
|
2
|
-
import { Component, ComponentID } from '@teambit/component';
|
|
3
|
-
import { DependencyResolverMain } from '@teambit/dependency-resolver';
|
|
4
|
-
import { Logger } from '@teambit/logger';
|
|
5
|
-
import { Workspace } from './workspace';
|
|
6
|
-
export type ShouldLoadFunc = (id: ComponentID) => Promise<boolean>;
|
|
7
|
-
export declare class GraphFromFsBuilder {
|
|
8
|
-
private workspace;
|
|
9
|
-
private logger;
|
|
10
|
-
private dependencyResolver;
|
|
11
|
-
private ignoreIds;
|
|
12
|
-
private shouldLoadItsDeps?;
|
|
13
|
-
private shouldThrowOnMissingDep;
|
|
14
|
-
private graph;
|
|
15
|
-
private completed;
|
|
16
|
-
private depth;
|
|
17
|
-
private consumer;
|
|
18
|
-
private importedIds;
|
|
19
|
-
private currentLane;
|
|
20
|
-
constructor(workspace: Workspace, logger: Logger, dependencyResolver: DependencyResolverMain, ignoreIds?: string[], shouldLoadItsDeps?: ShouldLoadFunc | undefined, shouldThrowOnMissingDep?: boolean);
|
|
21
|
-
/**
|
|
22
|
-
* create a graph with all dependencies and flattened dependencies of the given components.
|
|
23
|
-
* the nodes are components and the edges has a label of the dependency type.
|
|
24
|
-
*
|
|
25
|
-
* the way how it is done is iterations by depths. each depth we gather all the dependencies of
|
|
26
|
-
* that depths, make sure all objects exist and then check their dependencies for the next depth.
|
|
27
|
-
* once there is no dependency left, we're on the last depth level and the graph is ready.
|
|
28
|
-
*
|
|
29
|
-
* for example, imagine the following graph:
|
|
30
|
-
* A1 -> A2 -> A3
|
|
31
|
-
* B1 -> B2 -> B3
|
|
32
|
-
* C1 -> C2 -> C3
|
|
33
|
-
*
|
|
34
|
-
* where the buildGraph is given [A1, B1, C1].
|
|
35
|
-
* first, it saves all these components as nodes in the graph. then, it finds the dependencies of
|
|
36
|
-
* the next level, in this case they're [A2, B2, C2]. it runs `importMany` in case some objects
|
|
37
|
-
* are missing. then, it loads them all (some from FS, some from the model) and sets the edges
|
|
38
|
-
* between the component and the dependencies.
|
|
39
|
-
* once done, it finds all their dependencies, which are [A3, B3, C3] and repeat the process
|
|
40
|
-
* above. since there are no more dependencies, the graph is completed.
|
|
41
|
-
* in this case, the total depth levels are 3.
|
|
42
|
-
*
|
|
43
|
-
* even with a huge project, there are not many depth levels. by iterating through depth levels
|
|
44
|
-
* we keep performance sane as the importMany doesn't run multiple time and therefore the round
|
|
45
|
-
* trips to the remotes are minimal.
|
|
46
|
-
*
|
|
47
|
-
* normally, one importMany of the seeders is enough as importMany knows to fetch all flattened.
|
|
48
|
-
* however, since this buildGraph is performed on the workspace, a dependency may be new or
|
|
49
|
-
* modified and as such, we don't know its flattened yet.
|
|
50
|
-
*/
|
|
51
|
-
buildGraph(ids: ComponentID[]): Promise<Graph<Component, string>>;
|
|
52
|
-
private getAllDepsUnfiltered;
|
|
53
|
-
private getAllDepsFiltered;
|
|
54
|
-
private processManyComponents;
|
|
55
|
-
/**
|
|
56
|
-
* only for components from the workspace that can be modified to add/remove dependencies, we need to make sure that
|
|
57
|
-
* all their dependencies are imported.
|
|
58
|
-
* remember that `importMany` fetches all flattened dependencies. once a component from scope is imported, we know
|
|
59
|
-
* that all its flattened dependencies are there. no need to call importMany again for them.
|
|
60
|
-
*/
|
|
61
|
-
private importObjects;
|
|
62
|
-
private processOneComponent;
|
|
63
|
-
private loadManyComponents;
|
|
64
|
-
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { Graph } from '@teambit/graph.cleargraph';
|
|
2
|
-
import { ComponentID } from '@teambit/component';
|
|
3
|
-
import { ComponentDependency, DependencyResolverMain } from '@teambit/dependency-resolver';
|
|
4
|
-
import { DepEdgeType } from '@teambit/graph';
|
|
5
|
-
import { Logger } from '@teambit/logger';
|
|
6
|
-
import { Workspace } from './workspace';
|
|
7
|
-
export declare function lifecycleToDepType(compDep: ComponentDependency): DepEdgeType;
|
|
8
|
-
export declare class GraphIdsFromFsBuilder {
|
|
9
|
-
private workspace;
|
|
10
|
-
private logger;
|
|
11
|
-
private dependencyResolver;
|
|
12
|
-
private shouldThrowOnMissingDep;
|
|
13
|
-
private graph;
|
|
14
|
-
private completed;
|
|
15
|
-
private depth;
|
|
16
|
-
private consumer;
|
|
17
|
-
private loadedComponents;
|
|
18
|
-
private importedIds;
|
|
19
|
-
private shouldThrowOnInvalidDeps;
|
|
20
|
-
constructor(workspace: Workspace, logger: Logger, dependencyResolver: DependencyResolverMain, shouldThrowOnMissingDep?: boolean);
|
|
21
|
-
/**
|
|
22
|
-
* create a graph with all dependencies and flattened dependencies of the given components.
|
|
23
|
-
* the nodes are component-ids and the edges has a label of the dependency type.
|
|
24
|
-
* to get some info about this the graph build take a look into build-graph-from-fs.buildGraph() docs.
|
|
25
|
-
*/
|
|
26
|
-
buildGraph(ids: ComponentID[]): Promise<Graph<ComponentID, DepEdgeType>>;
|
|
27
|
-
private processManyComponents;
|
|
28
|
-
/**
|
|
29
|
-
* only for components from the workspace that can be modified to add/remove dependencies, we need to make sure that
|
|
30
|
-
* all their dependencies are imported.
|
|
31
|
-
* once a component from scope is imported, we know that either we have its dependency graph or all flattened deps
|
|
32
|
-
*/
|
|
33
|
-
private importObjects;
|
|
34
|
-
private processOneComponent;
|
|
35
|
-
/**
|
|
36
|
-
* this is tricky.
|
|
37
|
-
* the component is in the workspace so it can be modified. dependencies can be added/removed/updated/downgraded.
|
|
38
|
-
* we have the graph-dependencies from the last snap, so we prefer to use it whenever possible for performance reasons.
|
|
39
|
-
* if we can't use it, we have to recursively load dependencies components and get the data from there.
|
|
40
|
-
* to maximize the performance, we iterate the direct dependencies, if we find a dep with the same id in the graph,
|
|
41
|
-
* and that id is not in the workspace then ask the graph for all its successors. otherwise, if it's not there, or
|
|
42
|
-
* it's there but it's also in the workspace (which therefore can be modified), we recursively load the dep components
|
|
43
|
-
* and get its dependencies.
|
|
44
|
-
*/
|
|
45
|
-
private processCompFromWorkspaceWithGraph;
|
|
46
|
-
private addDepEdge;
|
|
47
|
-
private loadManyComponents;
|
|
48
|
-
}
|
package/dist/capsule.cmd.d.ts
DELETED
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import { Command, CommandOptions } from '@teambit/cli';
|
|
2
|
-
import { CapsuleList, IsolatorMain } from '@teambit/isolator';
|
|
3
|
-
import type { ScopeMain } from '@teambit/scope';
|
|
4
|
-
import { Workspace } from '.';
|
|
5
|
-
type CreateOpts = {
|
|
6
|
-
baseDir?: string;
|
|
7
|
-
rootBaseDir?: string;
|
|
8
|
-
alwaysNew?: boolean;
|
|
9
|
-
seedersOnly?: boolean;
|
|
10
|
-
useHash?: boolean;
|
|
11
|
-
id: string;
|
|
12
|
-
installPackages?: boolean;
|
|
13
|
-
};
|
|
14
|
-
export declare class CapsuleCreateCmd implements Command {
|
|
15
|
-
private workspace;
|
|
16
|
-
private scope;
|
|
17
|
-
private isolator;
|
|
18
|
-
name: string;
|
|
19
|
-
description: string;
|
|
20
|
-
helpUrl: string;
|
|
21
|
-
group: string;
|
|
22
|
-
alias: string;
|
|
23
|
-
options: CommandOptions;
|
|
24
|
-
constructor(workspace: Workspace | undefined, scope: ScopeMain, isolator: IsolatorMain);
|
|
25
|
-
create([componentIds]: [string[]], { baseDir, rootBaseDir, alwaysNew, id, installPackages, seedersOnly, useHash }: CreateOpts): Promise<CapsuleList>;
|
|
26
|
-
report([componentIds]: [string[]], opts: CreateOpts): Promise<string>;
|
|
27
|
-
json([componentIds]: [string[]], opts: CreateOpts): Promise<{
|
|
28
|
-
id: string;
|
|
29
|
-
path: string;
|
|
30
|
-
}[]>;
|
|
31
|
-
}
|
|
32
|
-
export declare class CapsuleListCmd implements Command {
|
|
33
|
-
private isolator;
|
|
34
|
-
private workspace;
|
|
35
|
-
private scope;
|
|
36
|
-
name: string;
|
|
37
|
-
description: string;
|
|
38
|
-
group: string;
|
|
39
|
-
alias: string;
|
|
40
|
-
options: CommandOptions;
|
|
41
|
-
constructor(isolator: IsolatorMain, workspace: Workspace | undefined, scope: ScopeMain);
|
|
42
|
-
report(): Promise<string>;
|
|
43
|
-
json(): Promise<{
|
|
44
|
-
capsules: string[];
|
|
45
|
-
scopeCapsules: string[];
|
|
46
|
-
workspaceCapsulesRootDir: any;
|
|
47
|
-
scopeAspectsCapsulesRootDir: any;
|
|
48
|
-
}>;
|
|
49
|
-
private getCapsulesRootDirs;
|
|
50
|
-
}
|
|
51
|
-
export declare class CapsuleDeleteCmd implements Command {
|
|
52
|
-
private isolator;
|
|
53
|
-
private scope;
|
|
54
|
-
private workspace?;
|
|
55
|
-
name: string;
|
|
56
|
-
description: string;
|
|
57
|
-
extendedDescription: string;
|
|
58
|
-
group: string;
|
|
59
|
-
alias: string;
|
|
60
|
-
options: CommandOptions;
|
|
61
|
-
constructor(isolator: IsolatorMain, scope: ScopeMain, workspace?: Workspace | undefined);
|
|
62
|
-
report(args: [], { all, scopeAspects }: {
|
|
63
|
-
all: boolean;
|
|
64
|
-
scopeAspects: boolean;
|
|
65
|
-
}): Promise<string>;
|
|
66
|
-
}
|
|
67
|
-
export declare class CapsuleCmd implements Command {
|
|
68
|
-
private isolator;
|
|
69
|
-
private workspace;
|
|
70
|
-
private scope;
|
|
71
|
-
name: string;
|
|
72
|
-
description: string;
|
|
73
|
-
extendedDescription: string;
|
|
74
|
-
alias: string;
|
|
75
|
-
group: string;
|
|
76
|
-
commands: Command[];
|
|
77
|
-
options: CommandOptions;
|
|
78
|
-
constructor(isolator: IsolatorMain, workspace: Workspace | undefined, scope: ScopeMain);
|
|
79
|
-
report(args: [string]): Promise<string>;
|
|
80
|
-
}
|
|
81
|
-
export {};
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { ComponentID, AspectList, ResolveComponentIdFunc } from '@teambit/component';
|
|
2
|
-
import { ExtensionDataList } from '@teambit/legacy/dist/consumer/config/extension-data';
|
|
3
|
-
import { PathOsBasedAbsolute } from '@teambit/legacy/dist/utils/path';
|
|
4
|
-
interface ComponentConfigFileOptions {
|
|
5
|
-
indent: number;
|
|
6
|
-
newLine: '\r\n' | '\n' | undefined;
|
|
7
|
-
}
|
|
8
|
-
interface WriteConfigFileOptions {
|
|
9
|
-
override?: boolean;
|
|
10
|
-
}
|
|
11
|
-
interface ComponentConfigFileJson {
|
|
12
|
-
componentId: any;
|
|
13
|
-
extensions: any;
|
|
14
|
-
propagate: boolean;
|
|
15
|
-
defaultScope?: string;
|
|
16
|
-
}
|
|
17
|
-
export declare class ComponentConfigFile {
|
|
18
|
-
componentId: ComponentID;
|
|
19
|
-
aspects: AspectList;
|
|
20
|
-
private componentDir;
|
|
21
|
-
propagate: boolean;
|
|
22
|
-
private options;
|
|
23
|
-
defaultScope?: string | undefined;
|
|
24
|
-
constructor(componentId: ComponentID, aspects: AspectList, componentDir: PathOsBasedAbsolute, propagate?: boolean, options?: ComponentConfigFileOptions, defaultScope?: string | undefined);
|
|
25
|
-
static load(componentDir: PathOsBasedAbsolute, aspectListFactory: (extensionDataList: ExtensionDataList) => Promise<AspectList>, outsideDefaultScope?: string): Promise<ComponentConfigFile | undefined>;
|
|
26
|
-
static composePath(componentRootFolder: string): string;
|
|
27
|
-
write(options?: WriteConfigFileOptions): Promise<void>;
|
|
28
|
-
addAspect(aspectId: string, config: any, resolveComponentId: ResolveComponentIdFunc, shouldMergeConfig?: boolean): Promise<void>;
|
|
29
|
-
removeAspect(aspectId: string, markWithMinusIfNotExist: boolean, resolveComponentId: ResolveComponentIdFunc): Promise<void>;
|
|
30
|
-
private aspectEntryFromConfigObject;
|
|
31
|
-
toJson(): ComponentConfigFileJson;
|
|
32
|
-
toString(): string;
|
|
33
|
-
}
|
|
34
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { AlreadyExistsError } from './already-exists';
|
package/dist/constants.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const EXT_NAME = "teambit.workspace/workspace";
|
package/dist/eject-conf.cmd.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { Command, CommandOptions } from '@teambit/cli';
|
|
2
|
-
import { EjectConfResult, Workspace } from './workspace';
|
|
3
|
-
type EjectConfArgs = [string];
|
|
4
|
-
type EjectConfOptionsCLI = {
|
|
5
|
-
propagate: string | boolean | undefined;
|
|
6
|
-
override: string | boolean | undefined;
|
|
7
|
-
};
|
|
8
|
-
export default class EjectConfCmd implements Command {
|
|
9
|
-
private workspace;
|
|
10
|
-
name: string;
|
|
11
|
-
description: string;
|
|
12
|
-
extendedDescription: string;
|
|
13
|
-
alias: string;
|
|
14
|
-
group: string;
|
|
15
|
-
options: CommandOptions;
|
|
16
|
-
constructor(workspace: Workspace);
|
|
17
|
-
report(args: EjectConfArgs, options: EjectConfOptionsCLI): Promise<string>;
|
|
18
|
-
json([pattern]: EjectConfArgs, options: EjectConfOptionsCLI): Promise<EjectConfResult[]>;
|
|
19
|
-
}
|
|
20
|
-
export {};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Command } from '@teambit/cli';
|
|
2
|
-
import { Workspace } from '../workspace';
|
|
3
|
-
export declare class EnvsReplaceCmd implements Command {
|
|
4
|
-
private workspace;
|
|
5
|
-
name: string;
|
|
6
|
-
description: string;
|
|
7
|
-
options: never[];
|
|
8
|
-
group: string;
|
|
9
|
-
arguments: {
|
|
10
|
-
name: string;
|
|
11
|
-
description: string;
|
|
12
|
-
}[];
|
|
13
|
-
examples: {
|
|
14
|
-
cmd: string;
|
|
15
|
-
description: string;
|
|
16
|
-
}[];
|
|
17
|
-
constructor(workspace: Workspace);
|
|
18
|
-
report([oldEnv, env]: [string, string]): Promise<string>;
|
|
19
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { Command } from '@teambit/cli';
|
|
2
|
-
import { Workspace } from '../workspace';
|
|
3
|
-
export declare const installAfterEnvChangesMsg: string;
|
|
4
|
-
export declare class EnvsSetCmd implements Command {
|
|
5
|
-
private workspace;
|
|
6
|
-
name: string;
|
|
7
|
-
description: string;
|
|
8
|
-
arguments: {
|
|
9
|
-
name: string;
|
|
10
|
-
description: string;
|
|
11
|
-
}[];
|
|
12
|
-
examples: {
|
|
13
|
-
cmd: string;
|
|
14
|
-
description: string;
|
|
15
|
-
}[];
|
|
16
|
-
options: never[];
|
|
17
|
-
group: string;
|
|
18
|
-
constructor(workspace: Workspace);
|
|
19
|
-
report([pattern, env]: [string, string]): Promise<string>;
|
|
20
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Command } from '@teambit/cli';
|
|
2
|
-
import { Workspace } from '../workspace';
|
|
3
|
-
export declare class EnvsUnsetCmd implements Command {
|
|
4
|
-
private workspace;
|
|
5
|
-
name: string;
|
|
6
|
-
description: string;
|
|
7
|
-
arguments: {
|
|
8
|
-
name: string;
|
|
9
|
-
description: string;
|
|
10
|
-
}[];
|
|
11
|
-
options: never[];
|
|
12
|
-
group: string;
|
|
13
|
-
extendedDescription: string;
|
|
14
|
-
constructor(workspace: Workspace);
|
|
15
|
-
report([pattern]: [string]): Promise<string>;
|
|
16
|
-
}
|