@teambit/component 1.0.679 → 1.0.680
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.
|
@@ -2,7 +2,6 @@ import type { Graph } from '@teambit/graph.cleargraph';
|
|
|
2
2
|
import type { BitId } from '@teambit/legacy-bit-id';
|
|
3
3
|
import type { ComponentID } from '@teambit/component-id';
|
|
4
4
|
import type { ConsumerComponent } from '@teambit/legacy.consumer-component';
|
|
5
|
-
import type { CompIdGraph } from '@teambit/graph';
|
|
6
5
|
import type { ComponentLog } from '@teambit/objects';
|
|
7
6
|
import type { AspectDefinition } from '@teambit/aspect-loader';
|
|
8
7
|
import type { DependencyList } from '@teambit/dependency-resolver';
|
|
@@ -28,6 +27,10 @@ export type LoadAspectsOptions = {
|
|
|
28
27
|
forceLoad?: boolean;
|
|
29
28
|
[key: string]: any;
|
|
30
29
|
};
|
|
30
|
+
/**
|
|
31
|
+
* don't use this type from @teambit/graph to not create a circular dependency.
|
|
32
|
+
*/
|
|
33
|
+
type CompIdGraph = Graph<ComponentID, 'prod' | 'dev' | 'ext' | 'peer'>;
|
|
31
34
|
export type FilterAspectsOptions = {
|
|
32
35
|
/**
|
|
33
36
|
* Do not return results for the core aspects
|
|
@@ -157,3 +160,4 @@ export interface ComponentFactory {
|
|
|
157
160
|
*/
|
|
158
161
|
priority?: boolean;
|
|
159
162
|
}
|
|
163
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["component-factory.ts"],"sourcesContent":["import type { Graph } from '@teambit/graph.cleargraph';\nimport type { BitId } from '@teambit/legacy-bit-id';\nimport type { ComponentID } from '@teambit/component-id';\nimport type { ConsumerComponent } from '@teambit/legacy.consumer-component';\nimport type {
|
|
1
|
+
{"version":3,"names":[],"sources":["component-factory.ts"],"sourcesContent":["import type { Graph } from '@teambit/graph.cleargraph';\nimport type { BitId } from '@teambit/legacy-bit-id';\nimport type { ComponentID } from '@teambit/component-id';\nimport type { ConsumerComponent } from '@teambit/legacy.consumer-component';\nimport type { ComponentLog } from '@teambit/objects';\nimport type { AspectDefinition } from '@teambit/aspect-loader';\nimport type { DependencyList } from '@teambit/dependency-resolver';\nimport type { Component, InvalidComponent } from './component';\nimport type { State } from './state';\nimport type { Snap } from './snap';\n\nexport type ResolveAspectsOptions = FilterAspectsOptions & {\n throwOnError?: boolean;\n useScopeAspectsCapsule?: boolean;\n workspaceName?: string;\n skipDeps?: boolean;\n resolveEnvsFromRoots?: boolean;\n packageManagerConfigRootDir?: string;\n};\n\nexport type LoadAspectsOptions = {\n /* `throwOnError` is an optional parameter that can be passed to the loadAspects method in the `ComponentFactory` interface. If\n set to `true`, it will cause the method to throw an error if an error occurs during its execution. If set to `false`\n or not provided, the method will print a warning instead of throwing it. */\n throwOnError?: boolean;\n /* `hideMissingModuleError` is an optional parameter that can be passed to the `loadAspects` method in the\n `ComponentFactory` interface. If set to `true`, it will prevent the method from throwing/printing an error if a required module\n is missing during the loading of an aspect. Instead, it will continue loading the other\n aspects. If set to `false` or not provided, the method will print/throw an error if a required module is missing.\n (considering throwOnError as well) */\n hideMissingModuleError?: boolean;\n\n /* The `ignoreErrorFunc` property is an optional parameter that can be passed to the `LoadAspectsOptions` object in\n the `ComponentFactory` interface. If provided, it will be called with the error that occurred during the loading of\n aspects. If the function returns `true`, the method will ignore the error and continue loading the other aspects.\n If the function returns `false`, the method will print/throw the error. */\n ignoreErrorFunc?: (err: Error) => boolean;\n\n /* The `ignoreErrors` property is an optional boolean parameter that can be passed to the `LoadAspectsOptions` object in\n the `ComponentFactory` interface. If set to `true`, it will cause the `loadAspects` method to ignore any errors that\n occur during the loading of aspects and continue loading the other aspects. If set to `false` or not provided, the\n method will print/throw an error if a required module is missing or if any other error occurs during the loading of\n aspects. */\n ignoreErrors?: boolean;\n\n /**\n * Force load the aspect from the host, even if it's already loaded.\n */\n forceLoad?: boolean;\n\n [key: string]: any;\n};\n\n/**\n * don't use this type from @teambit/graph to not create a circular dependency.\n */\ntype CompIdGraph = Graph<ComponentID, 'prod' | 'dev' | 'ext' | 'peer'>;\n\nexport type FilterAspectsOptions = {\n /**\n * Do not return results for the core aspects\n */\n excludeCore?: boolean;\n /**\n * Only return results for the provided list of ids\n */\n requestedOnly?: boolean;\n /**\n * Only return results for aspects that have a path to the specified runtime name\n */\n filterByRuntime?: boolean;\n};\n\nexport interface ComponentFactory {\n /**\n * name of the component host.\n */\n name: string;\n\n /**\n * path to the component host.\n */\n path: string;\n\n isLegacy: boolean;\n\n /**\n * resolve a `string` component ID to an instance of a ComponentID.\n */\n resolveComponentId(id: string | BitId | ComponentID): Promise<ComponentID>;\n\n /**\n * resolve multiple `string` component ID to an instance of a ComponentID.\n */\n resolveMultipleComponentIds(ids: (string | BitId | ComponentID)[]): Promise<ComponentID[]>;\n\n /**\n * returns a component by ID.\n */\n get(id: ComponentID): Promise<Component | undefined>;\n\n /**\n * returns the legacy representation of a component with minimal loading.\n * when loaded from the workspace, it won't run any Harmony hooks and even won't load dependencies.\n * it's good to get raw aspects data or some basic properties.\n * use carefully. prefer using `get()` instead.\n */\n getLegacyMinimal(id: ComponentID): Promise<ConsumerComponent | undefined>;\n\n /**\n * returns many components by ids.\n */\n getMany(ids: ComponentID[]): Promise<Component[]>;\n\n /**\n * returns many components by their legacy representation.\n */\n getManyByLegacy(components: ConsumerComponent[]): Promise<Component[]>;\n\n /**\n * get a component from a remote without importing it\n */\n getRemoteComponent?: (id: ComponentID) => Promise<Component>;\n\n /**\n * important - prefer using `getGraphIds()` if you don't need the component objects.\n * this method has a performance penalty. it must import all flattened-dependencies objects from the remotes.\n */\n getGraph(ids?: ComponentID[], shouldThrowOnMissingDep?: boolean): Promise<Graph<Component, string>>;\n\n /**\n * get graph of the given component-ids and all their dependencies (recursively/flattened).\n * the nodes are ComponentIds and is much faster than `this.getGraph()`.\n */\n getGraphIds(ids?: ComponentID[], shouldThrowOnMissingDep?: boolean): Promise<CompIdGraph>;\n\n getLogs(id: ComponentID, shortHash?: boolean, startsFrom?: string): Promise<ComponentLog[]>;\n\n getDependencies(component: Component): DependencyList;\n\n componentPackageName(component: Component): string;\n\n /**\n * returns a specific state of a component by hash or semver.\n */\n getState(id: ComponentID, snapId: string): Promise<State>;\n\n /**\n * returns a specific snap of a component by hash.\n */\n getSnap(id: ComponentID, snapId: string): Promise<Snap>;\n\n /**\n * load aspects.\n * returns the loaded aspect ids including the loaded versions.\n */\n loadAspects: (ids: string[], throwOnError?: boolean, neededFor?: string, opts?: any) => Promise<string[]>;\n\n /**\n * Resolve dirs for aspects\n */\n resolveAspects: (\n runtimeName?: string,\n componentIds?: ComponentID[],\n opts?: ResolveAspectsOptions\n ) => Promise<AspectDefinition[]>;\n\n /**\n * list all components in the host.\n */\n list(filter?: { offset: number; limit: number }): Promise<Component[]>;\n\n /**\n * list invalid components, such as components with missing files on the fs.\n */\n listInvalid(): Promise<InvalidComponent[]>;\n\n listIds(): Promise<ComponentID[]> | ComponentID[];\n\n /**\n * get component-ids matching the given pattern. a pattern can have multiple patterns separated by a comma.\n * it uses multimatch (https://www.npmjs.com/package/multimatch) package for the matching algorithm, which supports\n * (among others) negate character \"!\" to exclude ids. See the package page for more supported characters.\n */\n idsByPattern(pattern: string, throwForNoMatch?: boolean): Promise<ComponentID[]>;\n\n hasId(componentId: ComponentID): Promise<boolean> | boolean;\n\n /**\n * Check if the host has the id, if no, search for the id in inner host (for example, workspace will search in the scope)\n * @param componentId\n */\n hasIdNested(componentId: ComponentID, includeCache?: boolean): Promise<boolean>;\n\n /**\n * whether a component is not the same as its head.\n * for a new component, it'll return \"true\" as it has no head yet.\n * this is relevant for component from the workspace, where it can be locally changed. on the scope it's always false\n */\n isModified(component: Component): Promise<boolean>;\n\n /**\n * whether the component exists on the remote.\n */\n isExported(componentId: ComponentID): boolean;\n\n /**\n * write the component to the filesystem when applicable (no-op for scope).\n * to change the component-path, specify the \"rootPath\", which should be a relative path inside the workspace.\n */\n write(component: Component, rootPath?: string): Promise<void>;\n\n /**\n * determine whether host should be the prior one in case multiple hosts persist.\n */\n priority?: boolean;\n}\n"],"mappings":"","ignoreList":[]}
|
|
@@ -71,7 +71,7 @@ export declare class ComponentMain {
|
|
|
71
71
|
*/
|
|
72
72
|
registerShowFragments(showFragments: ShowFragment[]): this;
|
|
73
73
|
private _priorHost;
|
|
74
|
-
static slots: (((registerFn: () => string) => SlotRegistry<
|
|
74
|
+
static slots: (((registerFn: () => string) => SlotRegistry<ComponentFactory>) | ((registerFn: () => string) => SlotRegistry<Route[]>) | ((registerFn: () => string) => SlotRegistry<ShowFragment[]>))[];
|
|
75
75
|
static runtime: import("@teambit/harmony").RuntimeDefinition;
|
|
76
76
|
static dependencies: import("@teambit/harmony").Aspect[];
|
|
77
77
|
static provider([graphql, express, cli, loggerMain]: [GraphqlMain, ExpressMain, CLIMain, LoggerMain], config: any, [hostSlot, showFragmentSlot]: [ComponentHostSlot, ShowFragmentSlot]): Promise<ComponentMain>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.component_component@1.0.
|
|
2
|
-
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.component_component@1.0.
|
|
1
|
+
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.component_component@1.0.680/dist/component.composition.js';
|
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.component_component@1.0.680/dist/component.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/component",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.680",
|
|
4
4
|
"homepage": "https://bit.cloud/teambit/component/component",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.component",
|
|
8
8
|
"name": "component",
|
|
9
|
-
"version": "1.0.
|
|
9
|
+
"version": "1.0.680"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@teambit/any-fs": "0.0.5",
|
|
@@ -25,14 +25,20 @@
|
|
|
25
25
|
"classnames": "2.2.6",
|
|
26
26
|
"lodash.compact": "3.0.1",
|
|
27
27
|
"@teambit/component-id": "1.2.4",
|
|
28
|
+
"@teambit/legacy.extension-data": "0.0.64",
|
|
28
29
|
"@teambit/ui-foundation.ui.menu-widget-icon": "0.0.502",
|
|
29
30
|
"@teambit/graph.cleargraph": "0.0.11",
|
|
30
31
|
"@teambit/legacy-bit-id": "1.1.3",
|
|
32
|
+
"@teambit/legacy.consumer-component": "0.0.63",
|
|
33
|
+
"@teambit/component.sources": "0.0.114",
|
|
31
34
|
"@teambit/toolbox.path.match-patterns": "0.0.19",
|
|
32
35
|
"@teambit/toolbox.string.eol": "0.0.5",
|
|
33
36
|
"@teambit/toolbox.string.capitalize": "0.0.500",
|
|
34
37
|
"@teambit/harmony": "0.4.7",
|
|
35
38
|
"@teambit/toolbox.path.path": "0.0.8",
|
|
39
|
+
"@teambit/cli": "0.0.1252",
|
|
40
|
+
"@teambit/express": "0.0.1351",
|
|
41
|
+
"@teambit/logger": "0.0.1345",
|
|
36
42
|
"@teambit/bit-error": "0.0.404",
|
|
37
43
|
"@teambit/legacy.constants": "0.0.14",
|
|
38
44
|
"@teambit/component-package-version": "0.0.440",
|
|
@@ -46,19 +52,27 @@
|
|
|
46
52
|
"@teambit/pkg.modules.semver-helper": "0.0.13",
|
|
47
53
|
"@teambit/ui-foundation.ui.hooks.use-data-query": "0.0.506",
|
|
48
54
|
"@teambit/cli-table": "0.0.50",
|
|
55
|
+
"@teambit/legacy.bit-map": "0.0.119",
|
|
56
|
+
"@teambit/pkg.modules.component-package-name": "0.0.69",
|
|
49
57
|
"@teambit/ui-foundation.ui.react-router.use-query": "0.0.505",
|
|
50
58
|
"@teambit/legacy-component-log": "0.0.408",
|
|
51
59
|
"@teambit/component-descriptor": "0.0.437",
|
|
60
|
+
"@teambit/design.ui.empty-box": "0.0.363",
|
|
61
|
+
"@teambit/documenter.ui.heading": "4.1.1",
|
|
62
|
+
"@teambit/documenter.ui.separator": "4.1.1",
|
|
63
|
+
"@teambit/harmony.ui.aspect-box": "0.0.508",
|
|
64
|
+
"@teambit/semantics.doc-parser": "0.0.70",
|
|
65
|
+
"@teambit/legacy.consumer": "0.0.62",
|
|
66
|
+
"@teambit/legacy.dependency-graph": "0.0.65",
|
|
52
67
|
"@teambit/legacy.loader": "0.0.9",
|
|
68
|
+
"@teambit/legacy.scope": "0.0.62",
|
|
69
|
+
"@teambit/scope.remotes": "0.0.62",
|
|
70
|
+
"@teambit/legacy.component-diff": "0.0.116",
|
|
53
71
|
"@teambit/design.ui.pages.not-found": "0.0.371",
|
|
54
72
|
"@teambit/design.ui.pages.server-error": "0.0.368",
|
|
55
73
|
"@teambit/design.ui.styles.ellipsis": "0.0.357",
|
|
56
74
|
"@teambit/envs.ui.env-icon": "0.0.507",
|
|
57
75
|
"@teambit/explorer.ui.command-bar": "2.0.17",
|
|
58
|
-
"@teambit/design.ui.empty-box": "0.0.363",
|
|
59
|
-
"@teambit/documenter.ui.heading": "4.1.1",
|
|
60
|
-
"@teambit/documenter.ui.separator": "4.1.1",
|
|
61
|
-
"@teambit/harmony.ui.aspect-box": "0.0.508",
|
|
62
76
|
"@teambit/design.navigation.responsive-navbar": "0.0.8",
|
|
63
77
|
"@teambit/workspace.ui.use-workspace-mode": "0.0.2",
|
|
64
78
|
"@teambit/base-ui.layout.breakpoints": "1.0.0",
|
|
@@ -66,33 +80,18 @@
|
|
|
66
80
|
"@teambit/lanes.hooks.use-lanes": "0.0.290",
|
|
67
81
|
"@teambit/lanes.ui.models.lanes-model": "0.0.229",
|
|
68
82
|
"@teambit/ui-foundation.ui.use-box.dropdown": "0.0.143",
|
|
69
|
-
"@teambit/
|
|
70
|
-
"@teambit/
|
|
71
|
-
"@teambit/
|
|
72
|
-
"@teambit/
|
|
73
|
-
"@teambit/
|
|
74
|
-
"@teambit/
|
|
75
|
-
"@teambit/
|
|
76
|
-
"@teambit/
|
|
77
|
-
"@teambit/
|
|
78
|
-
"@teambit/
|
|
79
|
-
"@teambit/
|
|
80
|
-
"@teambit/
|
|
81
|
-
"@teambit/preview": "1.0.679",
|
|
82
|
-
"@teambit/pubsub": "1.0.679",
|
|
83
|
-
"@teambit/react-router": "1.0.679",
|
|
84
|
-
"@teambit/ui": "1.0.679",
|
|
85
|
-
"@teambit/legacy.bit-map": "0.0.119",
|
|
86
|
-
"@teambit/pkg.modules.component-package-name": "0.0.69",
|
|
87
|
-
"@teambit/semantics.doc-parser": "0.0.70",
|
|
88
|
-
"@teambit/legacy.consumer": "0.0.62",
|
|
89
|
-
"@teambit/legacy.dependency-graph": "0.0.65",
|
|
90
|
-
"@teambit/legacy.scope": "0.0.62",
|
|
91
|
-
"@teambit/scope.remotes": "0.0.62",
|
|
92
|
-
"@teambit/legacy.component-diff": "0.0.116",
|
|
93
|
-
"@teambit/compositions": "1.0.679",
|
|
94
|
-
"@teambit/deprecation": "1.0.679",
|
|
95
|
-
"@teambit/envs": "1.0.679"
|
|
83
|
+
"@teambit/aspect-loader": "1.0.680",
|
|
84
|
+
"@teambit/dependency-resolver": "1.0.680",
|
|
85
|
+
"@teambit/objects": "0.0.187",
|
|
86
|
+
"@teambit/graphql": "1.0.680",
|
|
87
|
+
"@teambit/command-bar": "1.0.680",
|
|
88
|
+
"@teambit/preview": "1.0.680",
|
|
89
|
+
"@teambit/pubsub": "1.0.680",
|
|
90
|
+
"@teambit/react-router": "1.0.680",
|
|
91
|
+
"@teambit/ui": "1.0.680",
|
|
92
|
+
"@teambit/compositions": "1.0.680",
|
|
93
|
+
"@teambit/deprecation": "1.0.680",
|
|
94
|
+
"@teambit/envs": "1.0.680"
|
|
96
95
|
},
|
|
97
96
|
"devDependencies": {
|
|
98
97
|
"@types/lodash": "4.14.165",
|