@teambit/component 1.0.222 → 1.0.224

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.
@@ -5,6 +5,7 @@ import ConsumerComponent from '@teambit/legacy/dist/consumer/component';
5
5
  import { CompIdGraph } from '@teambit/graph';
6
6
  import type { ComponentLog } from '@teambit/legacy/dist/scope/models/model-component';
7
7
  import type { AspectDefinition } from '@teambit/aspect-loader';
8
+ import type { DependencyList } from '@teambit/dependency-resolver';
8
9
  import { Component, InvalidComponent } from './component';
9
10
  import { State } from './state';
10
11
  import { Snap } from './snap';
@@ -88,6 +89,7 @@ export interface ComponentFactory {
88
89
  */
89
90
  getGraphIds(ids?: ComponentID[], shouldThrowOnMissingDep?: boolean): Promise<CompIdGraph>;
90
91
  getLogs(id: ComponentID, shortHash?: boolean, startsFrom?: string): Promise<ComponentLog[]>;
92
+ getDependencies(component: Component): DependencyList;
91
93
  /**
92
94
  * returns a specific state of a component by hash or semver.
93
95
  */
@@ -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 { ComponentID } from '@teambit/component-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 { Component, InvalidComponent } from './component';\nimport { State } from './state';\nimport { 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 `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 [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 | 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 /**\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>;\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":"","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["component-factory.ts"],"sourcesContent":["import { Graph } from '@teambit/graph.cleargraph';\nimport { BitId } from '@teambit/legacy-bit-id';\nimport { ComponentID } from '@teambit/component-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 type { DependencyList } from '@teambit/dependency-resolver';\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 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 `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 [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 | 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 /**\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>;\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":"","ignoreList":[]}
@@ -3,6 +3,7 @@ import { SemVer } from 'semver';
3
3
  import { ComponentID } from '@teambit/component-id';
4
4
  import { BuildStatus } from '@teambit/legacy/dist/constants';
5
5
  import { ComponentLog } from '@teambit/legacy/dist/scope/models/model-component';
6
+ import type { DependencyList } from '@teambit/dependency-resolver';
6
7
  import { ComponentFactory } from './component-factory';
7
8
  import ComponentFS from './component-fs';
8
9
  import { Config as ComponentConfig } from './config';
@@ -96,6 +97,7 @@ export declare class Component implements IComponent {
96
97
  head?: string;
97
98
  sort?: string;
98
99
  }): Promise<ComponentLog[]>;
100
+ getDependencies(): DependencyList;
99
101
  stringify(): string;
100
102
  /**
101
103
  * record component changes in the `Scope`.
package/dist/component.js CHANGED
@@ -151,6 +151,9 @@ class Component {
151
151
  }
152
152
  return filteredLogs;
153
153
  }
154
+ getDependencies() {
155
+ return this.factory.getDependencies(this);
156
+ }
154
157
  stringify() {
155
158
  return JSON.stringify({
156
159
  id: this.id,
@@ -1 +1 @@
1
- {"version":3,"names":["_toolboxString","data","require","_bitError","_lodash","_tagMap","_exceptions","Component","constructor","id","head","_state","tags","TagMap","factory","mainFile","state","config","filesystem","buildStatus","_consumer","headTag","undefined","byHash","hash","latest","getLatest","err","CouldNotFindLatest","get","aspects","serialize","getLogs","filter","allLogs","type","limit","offset","sort","typeFilter","snap","tag","filteredLogs","reverse","slice","stringify","JSON","displayName","tokens","name","split","map","token","capitalize","join","version","isModified","isDeleted","isRemoved","isOutdated","latestTag","byVersion","isNew","Promise","resolve","loadState","snapId","getState","loadSnap","snapToGet","BitError","getSnap","snapsIterable","options","snapToStart","nextSnaps","done","iterator","next","value","currSnapId","shift","parents","length","firstParentOnly","push","concat","stopFn","Symbol","asyncIterator","getClosestTag","snapToStartFrom","tagsHashMap","getHashMap","has","iterable","snaps","hashOfLastSnap","getTag","currentVersion","getSnapHash","hasVersion","getCurrentSnap","checkout","write","path","fs","equals","component","toString","exports"],"sources":["component.ts"],"sourcesContent":["import { AnyFS } from '@teambit/any-fs';\nimport { capitalize } from '@teambit/toolbox.string.capitalize';\nimport { SemVer } from 'semver';\nimport { ComponentID } from '@teambit/component-id';\nimport { BitError } from '@teambit/bit-error';\nimport { BuildStatus } from '@teambit/legacy/dist/constants';\nimport { ComponentLog } from '@teambit/legacy/dist/scope/models/model-component';\n\nimport { slice } from 'lodash';\nimport { ComponentFactory } from './component-factory';\nimport ComponentFS from './component-fs';\n// import { NothingToSnap } from './exceptions';\nimport { Config as ComponentConfig } from './config';\n// eslint-disable-next-line import/no-cycle\nimport { Snap } from './snap';\nimport { State } from './state';\nimport { TagMap } from './tag-map';\nimport { Tag } from './tag';\nimport { CouldNotFindLatest } from './exceptions';\nimport { IComponent, RawComponentMetadata } from './component-interface';\n// import { Author } from './types';\n\ntype SnapsIterableOpts = {\n firstParentOnly?: boolean;\n stopFn?: (snap: Snap) => Promise<boolean>;\n};\n\nexport type InvalidComponent = { id: ComponentID; err: Error };\n\n/**\n * in-memory representation of a component.\n */\nexport class Component implements IComponent {\n constructor(\n /**\n * component ID represented by the `ComponentId` type.\n */\n readonly id: ComponentID,\n\n /**\n * head version of the component. can be `null` for new components.\n * if on main, returns the head on main.\n * if on a lane, returns the head on the lane.\n */\n readonly head: Snap | null = null,\n\n /**\n * state of the component.\n */\n private _state: State,\n\n /**\n * tags of the component.\n */\n readonly tags: TagMap = new TagMap(),\n\n /**\n * the component factory\n */\n private factory: ComponentFactory\n ) {}\n\n get mainFile() {\n return this.state.mainFile;\n }\n\n get state(): State {\n return this._state;\n }\n\n set state(state: State) {\n this._state = state;\n }\n\n /**\n * component configuration which is later generated to a component `package.json` and `bit.json`.\n */\n get config(): ComponentConfig {\n return this.state.config;\n }\n\n /**\n * in-memory representation of the component current filesystem.\n */\n get filesystem(): ComponentFS {\n return this.state.filesystem;\n }\n\n /**\n * build status of the component\n */\n get buildStatus(): BuildStatus {\n return this._state._consumer.buildStatus;\n }\n\n get headTag() {\n if (!this.head) return undefined;\n return this.tags.byHash(this.head.hash);\n }\n\n get latest(): string | undefined {\n if (!this.head) return undefined;\n try {\n return this.tags.getLatest();\n } catch (err: any) {\n if (err instanceof CouldNotFindLatest) {\n return this.head.hash;\n }\n throw err;\n }\n }\n\n /**\n * get aspect data from current state.\n */\n get(id: string): RawComponentMetadata | undefined {\n return this.state.aspects.get(id)?.serialize();\n }\n\n async getLogs(filter?: {\n type?: string;\n offset?: number;\n limit?: number;\n head?: string;\n sort?: string;\n }): Promise<ComponentLog[]> {\n const allLogs = await this.factory.getLogs(this.id, false, filter?.head);\n\n if (!filter) return allLogs;\n\n const { type, limit, offset, sort } = filter;\n\n const typeFilter = (snap) => {\n if (type === 'tag') return snap.tag;\n if (type === 'snap') return !snap.tag;\n return true;\n };\n\n let filteredLogs = (type && allLogs.filter(typeFilter)) || allLogs;\n if (sort !== 'asc') filteredLogs = filteredLogs.reverse();\n\n if (limit) {\n filteredLogs = slice(filteredLogs, offset, limit + (offset || 0));\n }\n\n return filteredLogs;\n }\n\n stringify(): string {\n return JSON.stringify({\n id: this.id,\n head: this.head,\n });\n }\n\n /**\n * record component changes in the `Scope`.\n */\n // snap(author: Author, message = '') {\n // if (!this.isModified()) throw new NothingToSnap();\n // const snap = new Snap(this, author, message);\n\n // return new Component(this.id, snap, snap.state);\n // }\n\n /**\n * display name of the component.\n */\n get displayName() {\n const tokens = this.id.name.split('-').map((token) => capitalize(token));\n return tokens.join(' ');\n }\n\n /**\n * tag a component `Snap` with a semantic version. we follow SemVer specs as defined [here](https://semver.org/)).\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n tag(version: SemVer) {\n // const snap = this.snap();\n // const tag = new Tag(version, snap);\n // this.tags.set(tag);\n }\n\n /**\n * determines whether this component is modified in the workspace.\n */\n isModified(): Promise<boolean> {\n return this.factory.isModified(this);\n }\n\n /**\n * whether a component is marked as deleted.\n */\n isDeleted(): boolean {\n return this.state._consumer.isRemoved();\n }\n\n /**\n * is component isOutdated\n */\n isOutdated(): boolean {\n if (!this.latest) return false;\n const latestTag = this.tags.byVersion(this.latest);\n if (!latestTag) return false;\n if (this.head?.hash !== latestTag?.hash) return true;\n return false;\n }\n\n /**\n * determines whether this component is new.\n */\n isNew(): Promise<boolean> {\n return Promise.resolve(this.head === null);\n }\n\n // TODO: @david after snap we need to make sure to refactor here.\n loadState(snapId: string): Promise<State> {\n return this.factory.getState(this.id, snapId);\n }\n\n loadSnap(snapId?: string): Promise<Snap> {\n const snapToGet = snapId || this.head?.hash;\n if (!snapToGet) {\n throw new BitError('could not load snap for new components');\n }\n return this.factory.getSnap(this.id, snapToGet);\n }\n\n /**\n * Get iterable which iterate over snap parents lazily\n * @param snapId\n * @param options\n */\n snapsIterable(snapId?: string, options: SnapsIterableOpts = {}): AsyncIterable<Snap> {\n const snapToStart = snapId || this.head?.hash;\n let nextSnaps = [snapToStart];\n let done;\n if (!snapToStart) {\n done = true;\n }\n\n const iterator: AsyncIterator<Snap> = {\n next: async () => {\n if (done) {\n return { value: undefined, done };\n }\n const currSnapId = nextSnaps.shift();\n const snap = await this.loadSnap(currSnapId);\n if (snap.parents && snap.parents.length) {\n if (options.firstParentOnly) {\n nextSnaps.push(snap.parents[0]);\n } else {\n nextSnaps = nextSnaps.concat(snap.parents);\n }\n }\n if (!nextSnaps.length) {\n done = true;\n } else if (options.stopFn) {\n done = await options.stopFn(snap);\n }\n return { value: snap, done: undefined };\n },\n };\n return {\n [Symbol.asyncIterator]: () => iterator,\n };\n }\n\n /**\n * traverse recursively from the provided snap (or head) upwards until it finds a tag\n * @param snapToStartFrom\n */\n async getClosestTag(snapToStartFrom?: string): Promise<Tag | undefined> {\n const tagsHashMap = this.tags.getHashMap();\n const stopFn = async (snap: Snap) => {\n if (tagsHashMap.has(snap.hash)) {\n return true;\n }\n return false;\n };\n const iterable = this.snapsIterable(snapToStartFrom, { firstParentOnly: true, stopFn });\n const snaps: Snap[] = [];\n for await (const snap of iterable) {\n snaps.push(snap);\n }\n if (snaps.length) {\n const hashOfLastSnap = snaps[snaps.length - 1].hash;\n return tagsHashMap.get(hashOfLastSnap);\n }\n return undefined;\n }\n\n /**\n * id.version can be either a tag or a hash.\n * if it's a hash, it may have a tag point to it. if it does, return the tag.\n */\n getTag(): Tag | undefined {\n const currentVersion = this.id.version;\n if (!currentVersion) return undefined;\n return this.tags.byVersion(currentVersion) || this.tags.byHash(currentVersion);\n }\n\n /**\n * id.version can be either a tag or a hash.\n * if it's a tag, find the hash it points to.\n */\n getSnapHash(): string | undefined {\n if (!this.id.hasVersion()) return undefined;\n const tag = this.tags.byVersion(this.id.version);\n if (tag) return tag.hash;\n return this.id.version;\n }\n\n /**\n * in case a component is new, it returns undefined.\n * otherwise, it returns the Snap object (hash/parents/log) of the current component (according to the version in the id)\n */\n async getCurrentSnap(): Promise<Snap | undefined> {\n const snap = this.getSnapHash();\n if (!snap) return undefined;\n return this.loadSnap(snap);\n }\n\n /**\n * checkout the component to a different version in its working tree.\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n checkout(version: SemVer) {}\n\n /**\n * examine difference between two components.\n */\n // diff(other: Component): Difference {}\n\n /**\n * merge two different components\n */\n // merge(other: Component): Component {}\n\n /**\n * write a component to a given file system.\n * @param path root path to write the component\n * @param fs instance of any fs to use.\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n write(path: string, fs?: AnyFS) {}\n\n /**\n *\n * Check if 2 components are equal\n * @param {Component} component\n * @returns {boolean}\n * @memberof Component\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n equals(component: Component): boolean {\n return component.id.toString() === this.id.toString();\n }\n}\n"],"mappings":";;;;;;AACA,SAAAA,eAAA;EAAA,MAAAC,IAAA,GAAAC,OA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AM+C,cAAcA,CAAA,EAA8B;IAChD,MAAM9D,IAAI,GAAG,IAAI,CAAC4D,WAAW,CAAC,CAAC;IAC/B,IAAI,CAAC5D,IAAI,EAAE,OAAOlB,SAAS;IAC3B,OAAO,IAAI,CAAC8C,QAAQ,CAAC5B,IAAI,CAAC;EAC5B;;EAEA;AACF;AACA;EACE;EACA+D,QAAQA,CAAChD,OAAe,EAAE,CAAC;;EAE3B;AACF;AACA;EACE;;EAEA;AACF;AACA;EACE;;EAEA;AACF;AACA;AACA;AACA;EACE;EACAiD,KAAKA,CAACC,IAAY,EAAEC,EAAU,EAAE,CAAC;;EAEjC;AACF;AACA;AACA;AACA;AACA;AACA;EACE;EACAC,MAAMA,CAACC,SAAoB,EAAW;IACpC,OAAOA,SAAS,CAACnG,EAAE,CAACoG,QAAQ,CAAC,CAAC,KAAK,IAAI,CAACpG,EAAE,CAACoG,QAAQ,CAAC,CAAC;EACvD;AACF;AAACC,OAAA,CAAAvG,SAAA,GAAAA,SAAA","ignoreList":[]}
1
+ {"version":3,"names":["_toolboxString","data","require","_bitError","_lodash","_tagMap","_exceptions","Component","constructor","id","head","_state","tags","TagMap","factory","mainFile","state","config","filesystem","buildStatus","_consumer","headTag","undefined","byHash","hash","latest","getLatest","err","CouldNotFindLatest","get","aspects","serialize","getLogs","filter","allLogs","type","limit","offset","sort","typeFilter","snap","tag","filteredLogs","reverse","slice","getDependencies","stringify","JSON","displayName","tokens","name","split","map","token","capitalize","join","version","isModified","isDeleted","isRemoved","isOutdated","latestTag","byVersion","isNew","Promise","resolve","loadState","snapId","getState","loadSnap","snapToGet","BitError","getSnap","snapsIterable","options","snapToStart","nextSnaps","done","iterator","next","value","currSnapId","shift","parents","length","firstParentOnly","push","concat","stopFn","Symbol","asyncIterator","getClosestTag","snapToStartFrom","tagsHashMap","getHashMap","has","iterable","snaps","hashOfLastSnap","getTag","currentVersion","getSnapHash","hasVersion","getCurrentSnap","checkout","write","path","fs","equals","component","toString","exports"],"sources":["component.ts"],"sourcesContent":["import { AnyFS } from '@teambit/any-fs';\nimport { capitalize } from '@teambit/toolbox.string.capitalize';\nimport { SemVer } from 'semver';\nimport { ComponentID } from '@teambit/component-id';\nimport { BitError } from '@teambit/bit-error';\nimport { BuildStatus } from '@teambit/legacy/dist/constants';\nimport { ComponentLog } from '@teambit/legacy/dist/scope/models/model-component';\nimport type { DependencyList } from '@teambit/dependency-resolver';\nimport { slice } from 'lodash';\nimport { ComponentFactory } from './component-factory';\nimport ComponentFS from './component-fs';\n// import { NothingToSnap } from './exceptions';\nimport { Config as ComponentConfig } from './config';\n// eslint-disable-next-line import/no-cycle\nimport { Snap } from './snap';\nimport { State } from './state';\nimport { TagMap } from './tag-map';\nimport { Tag } from './tag';\nimport { CouldNotFindLatest } from './exceptions';\nimport { IComponent, RawComponentMetadata } from './component-interface';\n// import { Author } from './types';\n\ntype SnapsIterableOpts = {\n firstParentOnly?: boolean;\n stopFn?: (snap: Snap) => Promise<boolean>;\n};\n\nexport type InvalidComponent = { id: ComponentID; err: Error };\n\n/**\n * in-memory representation of a component.\n */\nexport class Component implements IComponent {\n constructor(\n /**\n * component ID represented by the `ComponentId` type.\n */\n readonly id: ComponentID,\n\n /**\n * head version of the component. can be `null` for new components.\n * if on main, returns the head on main.\n * if on a lane, returns the head on the lane.\n */\n readonly head: Snap | null = null,\n\n /**\n * state of the component.\n */\n private _state: State,\n\n /**\n * tags of the component.\n */\n readonly tags: TagMap = new TagMap(),\n\n /**\n * the component factory\n */\n private factory: ComponentFactory\n ) {}\n\n get mainFile() {\n return this.state.mainFile;\n }\n\n get state(): State {\n return this._state;\n }\n\n set state(state: State) {\n this._state = state;\n }\n\n /**\n * component configuration which is later generated to a component `package.json` and `bit.json`.\n */\n get config(): ComponentConfig {\n return this.state.config;\n }\n\n /**\n * in-memory representation of the component current filesystem.\n */\n get filesystem(): ComponentFS {\n return this.state.filesystem;\n }\n\n /**\n * build status of the component\n */\n get buildStatus(): BuildStatus {\n return this._state._consumer.buildStatus;\n }\n\n get headTag() {\n if (!this.head) return undefined;\n return this.tags.byHash(this.head.hash);\n }\n\n get latest(): string | undefined {\n if (!this.head) return undefined;\n try {\n return this.tags.getLatest();\n } catch (err: any) {\n if (err instanceof CouldNotFindLatest) {\n return this.head.hash;\n }\n throw err;\n }\n }\n\n /**\n * get aspect data from current state.\n */\n get(id: string): RawComponentMetadata | undefined {\n return this.state.aspects.get(id)?.serialize();\n }\n\n async getLogs(filter?: {\n type?: string;\n offset?: number;\n limit?: number;\n head?: string;\n sort?: string;\n }): Promise<ComponentLog[]> {\n const allLogs = await this.factory.getLogs(this.id, false, filter?.head);\n\n if (!filter) return allLogs;\n\n const { type, limit, offset, sort } = filter;\n\n const typeFilter = (snap) => {\n if (type === 'tag') return snap.tag;\n if (type === 'snap') return !snap.tag;\n return true;\n };\n\n let filteredLogs = (type && allLogs.filter(typeFilter)) || allLogs;\n if (sort !== 'asc') filteredLogs = filteredLogs.reverse();\n\n if (limit) {\n filteredLogs = slice(filteredLogs, offset, limit + (offset || 0));\n }\n\n return filteredLogs;\n }\n\n getDependencies(): DependencyList {\n return this.factory.getDependencies(this);\n }\n\n stringify(): string {\n return JSON.stringify({\n id: this.id,\n head: this.head,\n });\n }\n\n /**\n * record component changes in the `Scope`.\n */\n // snap(author: Author, message = '') {\n // if (!this.isModified()) throw new NothingToSnap();\n // const snap = new Snap(this, author, message);\n\n // return new Component(this.id, snap, snap.state);\n // }\n\n /**\n * display name of the component.\n */\n get displayName() {\n const tokens = this.id.name.split('-').map((token) => capitalize(token));\n return tokens.join(' ');\n }\n\n /**\n * tag a component `Snap` with a semantic version. we follow SemVer specs as defined [here](https://semver.org/)).\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n tag(version: SemVer) {\n // const snap = this.snap();\n // const tag = new Tag(version, snap);\n // this.tags.set(tag);\n }\n\n /**\n * determines whether this component is modified in the workspace.\n */\n isModified(): Promise<boolean> {\n return this.factory.isModified(this);\n }\n\n /**\n * whether a component is marked as deleted.\n */\n isDeleted(): boolean {\n return this.state._consumer.isRemoved();\n }\n\n /**\n * is component isOutdated\n */\n isOutdated(): boolean {\n if (!this.latest) return false;\n const latestTag = this.tags.byVersion(this.latest);\n if (!latestTag) return false;\n if (this.head?.hash !== latestTag?.hash) return true;\n return false;\n }\n\n /**\n * determines whether this component is new.\n */\n isNew(): Promise<boolean> {\n return Promise.resolve(this.head === null);\n }\n\n // TODO: @david after snap we need to make sure to refactor here.\n loadState(snapId: string): Promise<State> {\n return this.factory.getState(this.id, snapId);\n }\n\n loadSnap(snapId?: string): Promise<Snap> {\n const snapToGet = snapId || this.head?.hash;\n if (!snapToGet) {\n throw new BitError('could not load snap for new components');\n }\n return this.factory.getSnap(this.id, snapToGet);\n }\n\n /**\n * Get iterable which iterate over snap parents lazily\n * @param snapId\n * @param options\n */\n snapsIterable(snapId?: string, options: SnapsIterableOpts = {}): AsyncIterable<Snap> {\n const snapToStart = snapId || this.head?.hash;\n let nextSnaps = [snapToStart];\n let done;\n if (!snapToStart) {\n done = true;\n }\n\n const iterator: AsyncIterator<Snap> = {\n next: async () => {\n if (done) {\n return { value: undefined, done };\n }\n const currSnapId = nextSnaps.shift();\n const snap = await this.loadSnap(currSnapId);\n if (snap.parents && snap.parents.length) {\n if (options.firstParentOnly) {\n nextSnaps.push(snap.parents[0]);\n } else {\n nextSnaps = nextSnaps.concat(snap.parents);\n }\n }\n if (!nextSnaps.length) {\n done = true;\n } else if (options.stopFn) {\n done = await options.stopFn(snap);\n }\n return { value: snap, done: undefined };\n },\n };\n return {\n [Symbol.asyncIterator]: () => iterator,\n };\n }\n\n /**\n * traverse recursively from the provided snap (or head) upwards until it finds a tag\n * @param snapToStartFrom\n */\n async getClosestTag(snapToStartFrom?: string): Promise<Tag | undefined> {\n const tagsHashMap = this.tags.getHashMap();\n const stopFn = async (snap: Snap) => {\n if (tagsHashMap.has(snap.hash)) {\n return true;\n }\n return false;\n };\n const iterable = this.snapsIterable(snapToStartFrom, { firstParentOnly: true, stopFn });\n const snaps: Snap[] = [];\n for await (const snap of iterable) {\n snaps.push(snap);\n }\n if (snaps.length) {\n const hashOfLastSnap = snaps[snaps.length - 1].hash;\n return tagsHashMap.get(hashOfLastSnap);\n }\n return undefined;\n }\n\n /**\n * id.version can be either a tag or a hash.\n * if it's a hash, it may have a tag point to it. if it does, return the tag.\n */\n getTag(): Tag | undefined {\n const currentVersion = this.id.version;\n if (!currentVersion) return undefined;\n return this.tags.byVersion(currentVersion) || this.tags.byHash(currentVersion);\n }\n\n /**\n * id.version can be either a tag or a hash.\n * if it's a tag, find the hash it points to.\n */\n getSnapHash(): string | undefined {\n if (!this.id.hasVersion()) return undefined;\n const tag = this.tags.byVersion(this.id.version);\n if (tag) return tag.hash;\n return this.id.version;\n }\n\n /**\n * in case a component is new, it returns undefined.\n * otherwise, it returns the Snap object (hash/parents/log) of the current component (according to the version in the id)\n */\n async getCurrentSnap(): Promise<Snap | undefined> {\n const snap = this.getSnapHash();\n if (!snap) return undefined;\n return this.loadSnap(snap);\n }\n\n /**\n * checkout the component to a different version in its working tree.\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n checkout(version: SemVer) {}\n\n /**\n * examine difference between two components.\n */\n // diff(other: Component): Difference {}\n\n /**\n * merge two different components\n */\n // merge(other: Component): Component {}\n\n /**\n * write a component to a given file system.\n * @param path root path to write the component\n * @param fs instance of any fs to use.\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n write(path: string, fs?: AnyFS) {}\n\n /**\n *\n * Check if 2 components are equal\n * @param {Component} component\n * @returns {boolean}\n * @memberof Component\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n equals(component: Component): boolean {\n return component.id.toString() === this.id.toString();\n }\n}\n"],"mappings":";;;;;;AACA,SAAAA,eAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,cAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGA,SAAAE,UAAA;E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M+C,cAAcA,CAAA,EAA8B;IAChD,MAAM/D,IAAI,GAAG,IAAI,CAAC6D,WAAW,CAAC,CAAC;IAC/B,IAAI,CAAC7D,IAAI,EAAE,OAAOlB,SAAS;IAC3B,OAAO,IAAI,CAAC+C,QAAQ,CAAC7B,IAAI,CAAC;EAC5B;;EAEA;AACF;AACA;EACE;EACAgE,QAAQA,CAAChD,OAAe,EAAE,CAAC;;EAE3B;AACF;AACA;EACE;;EAEA;AACF;AACA;EACE;;EAEA;AACF;AACA;AACA;AACA;EACE;EACAiD,KAAKA,CAACC,IAAY,EAAEC,EAAU,EAAE,CAAC;;EAEjC;AACF;AACA;AACA;AACA;AACA;AACA;EACE;EACAC,MAAMA,CAACC,SAAoB,EAAW;IACpC,OAAOA,SAAS,CAACpG,EAAE,CAACqG,QAAQ,CAAC,CAAC,KAAK,IAAI,CAACrG,EAAE,CAACqG,QAAQ,CAAC,CAAC;EACvD;AACF;AAACC,OAAA,CAAAxG,SAAA,GAAAA,SAAA","ignoreList":[]}
@@ -1,5 +1,5 @@
1
- import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_component@1.0.222/dist/component.composition.js';
2
- import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_component@1.0.222/dist/component.docs.mdx';
1
+ import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_component@1.0.224/dist/component.composition.js';
2
+ import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_component@1.0.224/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.222",
3
+ "version": "1.0.224",
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.222"
9
+ "version": "1.0.224"
10
10
  },
11
11
  "dependencies": {
12
12
  "@teambit/any-fs": "0.0.5",
@@ -42,27 +42,28 @@
42
42
  "@teambit/design.navigation.responsive-navbar": "0.0.7",
43
43
  "@teambit/base-ui.layout.breakpoints": "1.0.0",
44
44
  "@teambit/ui-foundation.ui.use-box.dropdown": "0.0.142",
45
- "@teambit/aspect-loader": "1.0.222",
46
- "@teambit/graph": "1.0.222",
45
+ "@teambit/aspect-loader": "1.0.224",
46
+ "@teambit/dependency-resolver": "1.0.224",
47
+ "@teambit/graph": "1.0.224",
47
48
  "@teambit/toolbox.path.match-patterns": "0.0.15",
48
49
  "@teambit/toolbox.string.capitalize": "0.0.496",
49
50
  "@teambit/cli": "0.0.859",
50
51
  "@teambit/express": "0.0.958",
51
- "@teambit/graphql": "1.0.222",
52
- "@teambit/command-bar": "1.0.222",
52
+ "@teambit/graphql": "1.0.224",
53
+ "@teambit/command-bar": "1.0.224",
53
54
  "@teambit/component-package-version": "0.0.433",
54
- "@teambit/preview": "1.0.222",
55
- "@teambit/pubsub": "1.0.222",
56
- "@teambit/react-router": "1.0.222",
55
+ "@teambit/preview": "1.0.224",
56
+ "@teambit/pubsub": "1.0.224",
57
+ "@teambit/react-router": "1.0.224",
57
58
  "@teambit/ui-foundation.ui.react-router.slot-router": "0.0.508",
58
- "@teambit/ui": "1.0.222",
59
+ "@teambit/ui": "1.0.224",
59
60
  "@teambit/component-issues": "0.0.142",
60
61
  "@teambit/cli-table": "0.0.48",
61
62
  "@teambit/component-descriptor": "0.0.417",
62
63
  "@teambit/harmony.ui.aspect-box": "0.0.507",
63
- "@teambit/compositions": "1.0.222",
64
- "@teambit/deprecation": "1.0.222",
65
- "@teambit/envs": "1.0.222",
64
+ "@teambit/compositions": "1.0.224",
65
+ "@teambit/deprecation": "1.0.224",
66
+ "@teambit/envs": "1.0.224",
66
67
  "@teambit/envs.ui.env-icon": "0.0.505",
67
68
  "@teambit/component.ui.version-dropdown": "0.0.859",
68
69
  "@teambit/lanes.hooks.use-lanes": "0.0.264",