@teambit/component 0.0.1018 → 0.0.1020

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.
@@ -86,7 +86,7 @@ export interface ComponentFactory {
86
86
  * load aspects.
87
87
  * returns the loaded aspect ids including the loaded versions.
88
88
  */
89
- loadAspects: (ids: string[], throwOnError?: boolean, neededFor?: string) => Promise<string[]>;
89
+ loadAspects: (ids: string[], throwOnError?: boolean, neededFor?: string, opts?: any) => Promise<string[]>;
90
90
  /**
91
91
  * Resolve dirs for aspects
92
92
  */
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["component-factory.ts"],"sourcesContent":["import { Graph } from '@teambit/graph.cleargraph';\nimport { BitId } from '@teambit/legacy-bit-id';\nimport ConsumerComponent from '@teambit/legacy/dist/consumer/component';\nimport { CompIdGraph } from '@teambit/graph';\nimport type { ComponentLog } from '@teambit/legacy/dist/scope/models/model-component';\nimport type { AspectDefinition } from '@teambit/aspect-loader';\nimport { ComponentID } from '@teambit/component-id';\nimport { Component, InvalidComponent } from './component';\nimport { State } from './state';\nimport { Snap } from './snap';\n\nexport type ResolveAspectsOptions = FilterAspectsOptions & {\n throwOnError?: boolean\n useScopeAspectsCapsule?: boolean\n};\n\nexport type LoadAspectsOptions = {\n [key: string]: any\n}\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 | ComponentID | BitId): Promise<ComponentID>;\n\n /**\n * resolve multiple `string` component ID to an instance of a ComponentID.\n */\n resolveMultipleComponentIds(ids: (string | ComponentID | BitId)[]): Promise<ComponentID[]>;\n\n /**\n * returns a component by ID.\n */\n get(id: ComponentID): Promise<Component | 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 /**\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) => 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[]>;\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>;\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 * 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":""}
1
+ {"version":3,"names":[],"sources":["component-factory.ts"],"sourcesContent":["import { Graph } from '@teambit/graph.cleargraph';\nimport { BitId } from '@teambit/legacy-bit-id';\nimport ConsumerComponent from '@teambit/legacy/dist/consumer/component';\nimport { CompIdGraph } from '@teambit/graph';\nimport type { ComponentLog } from '@teambit/legacy/dist/scope/models/model-component';\nimport type { AspectDefinition } from '@teambit/aspect-loader';\nimport { ComponentID } from '@teambit/component-id';\nimport { Component, InvalidComponent } from './component';\nimport { State } from './state';\nimport { Snap } from './snap';\n\nexport type ResolveAspectsOptions = FilterAspectsOptions & {\n throwOnError?: boolean\n useScopeAspectsCapsule?: boolean\n};\n\nexport type LoadAspectsOptions = {\n [key: string]: any\n}\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 | ComponentID | BitId): Promise<ComponentID>;\n\n /**\n * resolve multiple `string` component ID to an instance of a ComponentID.\n */\n resolveMultipleComponentIds(ids: (string | ComponentID | BitId)[]): Promise<ComponentID[]>;\n\n /**\n * returns a component by ID.\n */\n get(id: ComponentID): Promise<Component | 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 /**\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[]>;\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>;\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 * 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":""}
@@ -1,5 +1,5 @@
1
- import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_component@0.0.1018/dist/component.composition.js';
2
- import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_component@0.0.1018/dist/component.docs.mdx';
1
+ import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_component@0.0.1020/dist/component.composition.js';
2
+ import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_component@0.0.1020/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": "0.0.1018",
3
+ "version": "0.0.1020",
4
4
  "homepage": "https://bit.dev/teambit/component/component",
5
5
  "main": "dist/index.js",
6
6
  "componentId": {
7
7
  "scope": "teambit.component",
8
8
  "name": "component",
9
- "version": "0.0.1018"
9
+ "version": "0.0.1020"
10
10
  },
11
11
  "dependencies": {
12
12
  "@teambit/any-fs": "0.0.5",
@@ -31,44 +31,44 @@
31
31
  "@teambit/base-ui.layout.breakpoints": "1.0.0",
32
32
  "@teambit/component-id": "0.0.427",
33
33
  "@teambit/ui-foundation.ui.menu-widget-icon": "0.0.497",
34
- "@teambit/aspect-loader": "0.0.1018",
35
- "@teambit/graph": "0.0.1018",
34
+ "@teambit/aspect-loader": "0.0.1020",
35
+ "@teambit/graph": "0.0.1020",
36
36
  "@teambit/legacy-bit-id": "0.0.423",
37
37
  "@teambit/toolbox.path.match-patterns": "0.0.9",
38
38
  "@teambit/toolbox.string.capitalize": "0.0.490",
39
- "@teambit/cli": "0.0.682",
40
- "@teambit/express": "0.0.780",
41
- "@teambit/graphql": "0.0.1018",
39
+ "@teambit/cli": "0.0.683",
40
+ "@teambit/express": "0.0.781",
41
+ "@teambit/graphql": "0.0.1020",
42
42
  "@teambit/bit-error": "0.0.402",
43
- "@teambit/command-bar": "0.0.1018",
43
+ "@teambit/command-bar": "0.0.1020",
44
44
  "@teambit/component-package-version": "0.0.422",
45
45
  "@teambit/component.ui.deprecation-icon": "0.0.504",
46
- "@teambit/preview": "0.0.1018",
47
- "@teambit/pubsub": "0.0.1018",
48
- "@teambit/react-router": "0.0.1018",
46
+ "@teambit/preview": "0.0.1020",
47
+ "@teambit/pubsub": "0.0.1020",
48
+ "@teambit/react-router": "0.0.1020",
49
49
  "@teambit/ui-foundation.ui.is-browser": "0.0.495",
50
50
  "@teambit/ui-foundation.ui.main-dropdown": "0.0.497",
51
51
  "@teambit/ui-foundation.ui.react-router.slot-router": "0.0.501",
52
52
  "@teambit/ui-foundation.ui.use-box.menu": "0.0.133",
53
- "@teambit/ui": "0.0.1018",
53
+ "@teambit/ui": "0.0.1020",
54
54
  "@teambit/component-issues": "0.0.88",
55
55
  "@teambit/ui-foundation.ui.hooks.use-data-query": "0.0.500",
56
56
  "@teambit/cli-table": "0.0.41",
57
- "@teambit/component-descriptor": "0.0.251",
57
+ "@teambit/component-descriptor": "0.0.252",
58
58
  "@teambit/ui-foundation.ui.react-router.use-query": "0.0.496",
59
+ "@teambit/design.ui.empty-box": "0.0.364",
60
+ "@teambit/harmony.ui.aspect-box": "0.0.497",
59
61
  "@teambit/design.ui.pages.not-found": "0.0.366",
60
62
  "@teambit/design.ui.pages.server-error": "0.0.366",
61
- "@teambit/compositions": "0.0.1018",
62
- "@teambit/deprecation": "0.0.1018",
63
- "@teambit/envs": "0.0.1018",
63
+ "@teambit/compositions": "0.0.1020",
64
+ "@teambit/deprecation": "0.0.1020",
65
+ "@teambit/envs": "0.0.1020",
64
66
  "@teambit/legacy-component-log": "0.0.399",
65
- "@teambit/design.ui.empty-box": "0.0.364",
66
- "@teambit/harmony.ui.aspect-box": "0.0.497",
67
67
  "@teambit/design.ui.styles.ellipsis": "0.0.357",
68
68
  "@teambit/envs.ui.env-icon": "0.0.495",
69
- "@teambit/component.ui.version-dropdown": "0.0.748",
70
- "@teambit/lanes.hooks.use-lanes": "0.0.145",
71
- "@teambit/lanes.ui.models.lanes-model": "0.0.107",
69
+ "@teambit/component.ui.version-dropdown": "0.0.749",
70
+ "@teambit/lanes.hooks.use-lanes": "0.0.146",
71
+ "@teambit/lanes.ui.models.lanes-model": "0.0.108",
72
72
  "@teambit/ui-foundation.ui.full-loader": "0.0.495",
73
73
  "@teambit/ui-foundation.ui.use-box.dropdown": "0.0.132"
74
74
  },
@@ -89,7 +89,7 @@
89
89
  "peerDependencies": {
90
90
  "@apollo/client": "^3.6.0",
91
91
  "react-router-dom": "^6.0.0",
92
- "@teambit/legacy": "1.0.461",
92
+ "@teambit/legacy": "1.0.462",
93
93
  "react": "^16.8.0 || ^17.0.0",
94
94
  "react-dom": "^16.8.0 || ^17.0.0"
95
95
  },