@teambit/component 1.0.1195 → 1.0.1197

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/dist/index.d.ts CHANGED
@@ -29,7 +29,7 @@ export { componentFields, componentIdFields, componentOverviewFields } from './u
29
29
  export type { NavPlugin, ConsumePlugin, MenuNavProps } from './ui/menu';
30
30
  export { CollapsibleMenuNav, ComponentMenu, VersionRelatedDropdowns } from './ui/menu';
31
31
  export type { RegisteredComponentRoute, ComponentUrlParams } from './component.route';
32
- export type { ComponentModelProps } from './ui/component-model';
32
+ export type { ComponentModelProps, DeprecationInfo } from './ui/component-model';
33
33
  export { ComponentModel } from './ui/component-model';
34
34
  export { TopBarNav } from './ui/top-bar-nav';
35
35
  export type { ShowFragment, ShowRow, ShowJSONRow } from './show';
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"names":["_component","data","require","_host","_component2","_componentId","_componentFs","_interopRequireDefault","_aspectEntry","_snap","_tag","_state","_tagMap","_componentMap","_componentContext","_context","_ui","_menu","_componentModel","_topBarNav","_config","e","__esModule","default","_default","exports","ComponentAspect"],"sources":["index.ts"],"sourcesContent":["import { ComponentAspect } from './component.aspect';\nimport type { ConsumerComponent } from '@teambit/legacy.consumer-component';\n\nexport type { GetComponentsOptions } from './get-component-opts';\nexport type { UseComponentType } from './ui/use-component';\nexport type { ConsumerComponent };\nexport { useComponentHost } from './host';\nexport { Component, InvalidComponent } from './component';\nexport { ComponentID } from '@teambit/component-id';\nexport { default as ComponentFS } from './component-fs';\nexport type { Config as ComponentConfig } from './config';\nexport type {\n ComponentFactory,\n ResolveAspectsOptions,\n FilterAspectsOptions,\n LoadAspectsOptions,\n} from './component-factory';\nexport type { AspectList } from './aspect-list';\nexport { AspectEntry, AspectData, ResolveComponentIdFunc } from './aspect-entry';\n// TODO: check why it's not working when using the index in snap dir like this:\n// export { Snap, Author } from './snap';\nexport { Snap, SnapProps } from './snap/snap';\nexport type { Author } from './snap/author';\n// TODO: check why it's not working when using the index in tag dir like this:\n// export { Tag } from './tag';\nexport { Tag, TagProps } from './tag/tag';\nexport type { IComponent } from './component-interface';\nexport { State } from './state';\nexport type { Hash } from './hash';\nexport { TagMap } from './tag-map';\nexport { ComponentMap } from './component-map';\nexport type { ComponentMain } from './component.main.runtime';\nexport type { ComponentUI } from './component.ui.runtime';\nexport type { Section } from './section';\nexport { ComponentContext, ComponentDescriptorContext, useComponentDescriptor } from './ui/context/component-context';\nexport type { ComponentProviderProps, ComponentDescriptorProviderProps } from './ui/context';\nexport { ComponentProvider, ComponentDescriptorProvider } from './ui/context';\nexport { componentFields, componentIdFields, componentOverviewFields } from './ui';\nexport type { NavPlugin, ConsumePlugin, MenuNavProps } from './ui/menu';\nexport { CollapsibleMenuNav, ComponentMenu, VersionRelatedDropdowns } from './ui/menu';\nexport type { RegisteredComponentRoute, ComponentUrlParams } from './component.route';\nexport type { ComponentModelProps } from './ui/component-model';\nexport { ComponentModel } from './ui/component-model';\nexport { TopBarNav } from './ui/top-bar-nav';\nexport type { ShowFragment, ShowRow, ShowJSONRow } from './show';\nexport { Config } from './config';\nexport { useComponent, useIdFromLocation, useComponentLogs, ComponentLogsResult, Filters } from './ui';\n\n// export { AspectList } from './aspect-list';\n// export { AspectEntry } from './aspect-entry';\nexport { ComponentAspect };\nexport default ComponentAspect;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAAA,WAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,UAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;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component","data","require","_host","_component2","_componentId","_componentFs","_interopRequireDefault","_aspectEntry","_snap","_tag","_state","_tagMap","_componentMap","_componentContext","_context","_ui","_menu","_componentModel","_topBarNav","_config","e","__esModule","default","_default","exports","ComponentAspect"],"sources":["index.ts"],"sourcesContent":["import { ComponentAspect } from './component.aspect';\nimport type { ConsumerComponent } from '@teambit/legacy.consumer-component';\n\nexport type { GetComponentsOptions } from './get-component-opts';\nexport type { UseComponentType } from './ui/use-component';\nexport type { ConsumerComponent };\nexport { useComponentHost } from './host';\nexport { Component, InvalidComponent } from './component';\nexport { ComponentID } from '@teambit/component-id';\nexport { default as ComponentFS } from './component-fs';\nexport type { Config as ComponentConfig } from './config';\nexport type {\n ComponentFactory,\n ResolveAspectsOptions,\n FilterAspectsOptions,\n LoadAspectsOptions,\n} from './component-factory';\nexport type { AspectList } from './aspect-list';\nexport { AspectEntry, AspectData, ResolveComponentIdFunc } from './aspect-entry';\n// TODO: check why it's not working when using the index in snap dir like this:\n// export { Snap, Author } from './snap';\nexport { Snap, SnapProps } from './snap/snap';\nexport type { Author } from './snap/author';\n// TODO: check why it's not working when using the index in tag dir like this:\n// export { Tag } from './tag';\nexport { Tag, TagProps } from './tag/tag';\nexport type { IComponent } from './component-interface';\nexport { State } from './state';\nexport type { Hash } from './hash';\nexport { TagMap } from './tag-map';\nexport { ComponentMap } from './component-map';\nexport type { ComponentMain } from './component.main.runtime';\nexport type { ComponentUI } from './component.ui.runtime';\nexport type { Section } from './section';\nexport { ComponentContext, ComponentDescriptorContext, useComponentDescriptor } from './ui/context/component-context';\nexport type { ComponentProviderProps, ComponentDescriptorProviderProps } from './ui/context';\nexport { ComponentProvider, ComponentDescriptorProvider } from './ui/context';\nexport { componentFields, componentIdFields, componentOverviewFields } from './ui';\nexport type { NavPlugin, ConsumePlugin, MenuNavProps } from './ui/menu';\nexport { CollapsibleMenuNav, ComponentMenu, VersionRelatedDropdowns } from './ui/menu';\nexport type { RegisteredComponentRoute, ComponentUrlParams } from './component.route';\nexport type { ComponentModelProps, DeprecationInfo } from './ui/component-model';\nexport { ComponentModel } from './ui/component-model';\nexport { TopBarNav } from './ui/top-bar-nav';\nexport type { ShowFragment, ShowRow, ShowJSONRow } from './show';\nexport { Config } from './config';\nexport { useComponent, useIdFromLocation, useComponentLogs, ComponentLogsResult, Filters } from './ui';\n\n// export { AspectList } from './aspect-list';\n// export { AspectEntry } from './aspect-entry';\nexport { ComponentAspect };\nexport default ComponentAspect;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAAA,WAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,UAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAMA,SAAAE,MAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,KAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,YAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,WAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,aAAA;EAAA,MAAAJ,IAAA,GAAAC,OAAA;EAAAG,YAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,aAAA;EAAA,MAAAL,IAAA,GAAAM,sBAAA,CAAAL,OAAA;EAAAI,YAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AASA,SAAAO,aAAA;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AAAhB,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGA,SAAAiB,gBAAA;EAAA,MAAAjB,IAAA,GAAAC,OAAA;EAAAgB,eAAA,YAAAA,CAAA;IAAA,OAAAjB,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAkB,WAAA;EAAA,MAAAlB,IAAA,GAAAC,OAAA;EAAAiB,UAAA,YAAAA,CAAA;IAAA,OAAAlB,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAmB,QAAA;EAAA,MAAAnB,IAAA,GAAAC,OAAA;EAAAkB,OAAA,YAAAA,CAAA;IAAA,OAAAnB,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAAkC,SAAAM,uBAAAc,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AA1BlC;AACA;AAGA;AACA;AAwBA;AACA;AAAA,IAAAG,QAAA,GAAAC,OAAA,CAAAF,OAAA,GAEeG,4BAAe","ignoreList":[]}
@@ -1,5 +1,5 @@
1
- import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.component_component@1.0.1195/dist/component.composition.js';
2
- import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.component_component@1.0.1195/dist/component.docs.mdx';
1
+ import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.component_component@1.0.1197/dist/component.composition.js';
2
+ import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.component_component@1.0.1197/dist/component.docs.mdx';
3
3
 
4
4
  export const compositions = [compositions_0];
5
5
  export const overview = [overview_0];
@@ -1,6 +1,5 @@
1
1
  import type { CompositionProps } from '@teambit/compositions';
2
2
  import { Composition } from '@teambit/compositions';
3
- import type { DeprecationInfo } from '@teambit/deprecation';
4
3
  import type { Descriptor } from '@teambit/envs';
5
4
  import type { ComponentIdObj } from '@teambit/component-id';
6
5
  import { ComponentID } from '@teambit/component-id';
@@ -8,6 +7,15 @@ import type { LegacyComponentLog } from '@teambit/legacy-component-log';
8
7
  import type { ComponentPreviewSize } from '@teambit/preview';
9
8
  import { TagMap } from '../../tag-map';
10
9
  import type { TagProps } from '../../tag/tag';
10
+ /**
11
+ * the deprecation data of a component. it lives here and not in the deprecation aspect, so the
12
+ * component model doesn't depend on that aspect (it depends on component).
13
+ */
14
+ export type DeprecationInfo = {
15
+ isDeprecate: boolean;
16
+ newId?: string;
17
+ range?: string;
18
+ };
11
19
  export type ComponentModelProps = {
12
20
  id: ComponentIdObj;
13
21
  description: string;
@@ -34,6 +34,11 @@ function _tagMap() {
34
34
  }
35
35
  // import { Snap } from '../../snap';
36
36
 
37
+ /**
38
+ * the deprecation data of a component. it lives here and not in the deprecation aspect, so the
39
+ * component model doesn't depend on that aspect (it depends on component).
40
+ */
41
+
37
42
  // ADDING MORE PROPERTIES HERE IS NOT ALLOWED!!! IF YOU NEED DATA PLEASE ADD A NEW
38
43
  // HOOK FROM YOUR ASPECT!!!
39
44
  // TODO: remove all properties from here to their rightful place in their aspects.
@@ -1 +1 @@
1
- {"version":3,"names":["_compositions","data","require","_componentId","_tag","_tagMap","ComponentModel","constructor","id","displayName","packageName","server","compositions","tags","buildStatus","issuesCount","status","deprecation","environment","description","labels","host","size","latest","preview","logs","version","from","env","ComponentID","fromObject","Composition","fromArray","TagMap","map","tag","Tag","log","hash","message","parents","componentsProps","rawComponent","empty","name","scope","url","exports"],"sources":["component-model.ts"],"sourcesContent":["import type { CompositionProps } from '@teambit/compositions';\nimport { Composition } from '@teambit/compositions';\nimport type { DeprecationInfo } from '@teambit/deprecation';\nimport type { Descriptor } from '@teambit/envs';\nimport type { ComponentIdObj } from '@teambit/component-id';\nimport { ComponentID } from '@teambit/component-id';\nimport type { LegacyComponentLog } from '@teambit/legacy-component-log';\nimport type { ComponentPreviewSize } from '@teambit/preview';\nimport { Tag } from '../../tag';\nimport { TagMap } from '../../tag-map';\nimport type { TagProps } from '../../tag/tag';\n// import { Snap } from '../../snap';\n\n// ADDING MORE PROPERTIES HERE IS NOT ALLOWED!!! IF YOU NEED DATA PLEASE ADD A NEW\n// HOOK FROM YOUR ASPECT!!!\n// TODO: remove all properties from here to their rightful place in their aspects.\nexport type ComponentModelProps = {\n id: ComponentIdObj;\n description: string;\n buildStatus?: string;\n server?: ComponentServer;\n displayName: string;\n packageName: string; // pkg aspect\n compositions?: CompositionProps[];\n tags?: TagProps[];\n issuesCount?: number; // component/issues aspect\n status?: any; // workspace aspect.\n deprecation?: DeprecationInfo; // deprecation aspect\n env?: Descriptor; // env aspect.\n labels?: string[];\n host?: string;\n latest?: string;\n preview?: ComponentPreview;\n logs?: LegacyComponentLog[];\n size?: ComponentPreviewSize;\n};\n\nexport type ComponentPreview = {\n includesEnvTemplate?: boolean;\n isScaling?: boolean;\n onlyOverview?: boolean;\n legacyHeader?: boolean;\n useNameParam?: boolean;\n skipIncludes?: boolean;\n};\n\nexport type ComponentServer = {\n env: string;\n /**\n * Full dev server url.\n */\n url?: string;\n\n /**\n * host of the component server (used mostly by cloud providers for remote scopes)\n */\n host?: string;\n\n /**\n * This is used mostly by cloud to proxy requests to the correct scope.\n */\n basePath?: string;\n};\n\nexport class ComponentModel {\n constructor(\n /**\n * id of the component\n */\n readonly id: ComponentID,\n\n /**\n * display name of the component.\n */\n readonly displayName: string,\n\n /**\n * package name of the component.\n */\n readonly packageName: string,\n\n /**\n * the component server.\n */\n readonly server: ComponentServer | undefined,\n\n /**\n * array of compositions\n */\n readonly compositions: Composition[],\n\n /**\n * tags of the component.\n */\n readonly tags: TagMap,\n\n /**\n * component build status\n */\n readonly buildStatus?: string,\n\n /**\n * issues of component.\n */\n readonly issuesCount?: number,\n /**\n * status of component.\n */\n readonly status?: any,\n\n /**\n * deprecation info of the component.\n */\n readonly deprecation?: DeprecationInfo,\n\n /**\n * env descriptor.\n */\n readonly environment?: Descriptor,\n\n /**\n * description of the component.\n */\n\n readonly description = '',\n\n readonly labels: string[] = [],\n\n /**\n * host of the component\n */\n readonly host?: string,\n\n /**\n *\n * size preview\n */\n readonly size?: ComponentPreviewSize,\n\n /**\n * latest version of component\n */\n readonly latest?: string,\n\n readonly preview?: ComponentPreview,\n\n readonly logs?: LegacyComponentLog[]\n ) {}\n\n get version() {\n if (!this.id.version) return 'new';\n return this.id.version;\n }\n\n /**\n * create an instance of a component from a plain object.\n */\n static from({\n id,\n server,\n displayName,\n compositions = [],\n packageName,\n tags = [],\n deprecation,\n buildStatus,\n env,\n status,\n issuesCount,\n description,\n labels,\n host,\n latest,\n preview,\n size,\n logs,\n }: ComponentModelProps) {\n return new ComponentModel(\n ComponentID.fromObject(id),\n displayName,\n packageName,\n server,\n Composition.fromArray(compositions),\n TagMap.fromArray(tags.map((tag) => Tag.fromObject(tag))),\n buildStatus,\n issuesCount,\n status,\n deprecation,\n env,\n description,\n labels,\n host,\n size,\n latest,\n preview,\n logs?.map((log) => log ?? { hash: '[error]', tag: '[error]', message: '', parents: [] })\n );\n }\n\n static fromArray(componentsProps: ComponentModelProps[]) {\n return componentsProps.map((rawComponent) => ComponentModel.from(rawComponent));\n }\n\n static empty() {\n return new ComponentModel(\n ComponentID.fromObject({ name: 'root', scope: 'temp' }),\n '',\n '',\n { env: '', url: '' },\n [],\n TagMap.empty()\n );\n }\n}\n"],"mappings":";;;;;;AACA,SAAAA,cAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,aAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAIA,SAAAE,aAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,YAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGA,SAAAG,KAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,IAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,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AAsC,EAAE;IACvD,OAAOA,eAAe,CAACP,GAAG,CAAEQ,YAAY,IAAKpC,cAAc,CAACqB,IAAI,CAACe,YAAY,CAAC,CAAC;EACjF;EAEA,OAAOC,KAAKA,CAAA,EAAG;IACb,OAAO,IAAIrC,cAAc,CACvBuB,0BAAW,CAACC,UAAU,CAAC;MAAEc,IAAI,EAAE,MAAM;MAAEC,KAAK,EAAE;IAAO,CAAC,CAAC,EACvD,EAAE,EACF,EAAE,EACF;MAAEjB,GAAG,EAAE,EAAE;MAAEkB,GAAG,EAAE;IAAG,CAAC,EACpB,EAAE,EACFb,gBAAM,CAACU,KAAK,CAAC,CACf,CAAC;EACH;AACF;AAACI,OAAA,CAAAzC,cAAA,GAAAA,cAAA","ignoreList":[]}
1
+ {"version":3,"names":["_compositions","data","require","_componentId","_tag","_tagMap","ComponentModel","constructor","id","displayName","packageName","server","compositions","tags","buildStatus","issuesCount","status","deprecation","environment","description","labels","host","size","latest","preview","logs","version","from","env","ComponentID","fromObject","Composition","fromArray","TagMap","map","tag","Tag","log","hash","message","parents","componentsProps","rawComponent","empty","name","scope","url","exports"],"sources":["component-model.ts"],"sourcesContent":["import type { CompositionProps } from '@teambit/compositions';\nimport { Composition } from '@teambit/compositions';\nimport type { Descriptor } from '@teambit/envs';\nimport type { ComponentIdObj } from '@teambit/component-id';\nimport { ComponentID } from '@teambit/component-id';\nimport type { LegacyComponentLog } from '@teambit/legacy-component-log';\nimport type { ComponentPreviewSize } from '@teambit/preview';\nimport { Tag } from '../../tag';\nimport { TagMap } from '../../tag-map';\nimport type { TagProps } from '../../tag/tag';\n// import { Snap } from '../../snap';\n\n/**\n * the deprecation data of a component. it lives here and not in the deprecation aspect, so the\n * component model doesn't depend on that aspect (it depends on component).\n */\nexport type DeprecationInfo = {\n isDeprecate: boolean;\n newId?: string;\n range?: string;\n};\n\n// ADDING MORE PROPERTIES HERE IS NOT ALLOWED!!! IF YOU NEED DATA PLEASE ADD A NEW\n// HOOK FROM YOUR ASPECT!!!\n// TODO: remove all properties from here to their rightful place in their aspects.\n\nexport type ComponentModelProps = {\n id: ComponentIdObj;\n description: string;\n buildStatus?: string;\n server?: ComponentServer;\n displayName: string;\n packageName: string; // pkg aspect\n compositions?: CompositionProps[];\n tags?: TagProps[];\n issuesCount?: number; // component/issues aspect\n status?: any; // workspace aspect.\n deprecation?: DeprecationInfo; // deprecation aspect\n env?: Descriptor; // env aspect.\n labels?: string[];\n host?: string;\n latest?: string;\n preview?: ComponentPreview;\n logs?: LegacyComponentLog[];\n size?: ComponentPreviewSize;\n};\n\nexport type ComponentPreview = {\n includesEnvTemplate?: boolean;\n isScaling?: boolean;\n onlyOverview?: boolean;\n legacyHeader?: boolean;\n useNameParam?: boolean;\n skipIncludes?: boolean;\n};\n\nexport type ComponentServer = {\n env: string;\n /**\n * Full dev server url.\n */\n url?: string;\n\n /**\n * host of the component server (used mostly by cloud providers for remote scopes)\n */\n host?: string;\n\n /**\n * This is used mostly by cloud to proxy requests to the correct scope.\n */\n basePath?: string;\n};\n\nexport class ComponentModel {\n constructor(\n /**\n * id of the component\n */\n readonly id: ComponentID,\n\n /**\n * display name of the component.\n */\n readonly displayName: string,\n\n /**\n * package name of the component.\n */\n readonly packageName: string,\n\n /**\n * the component server.\n */\n readonly server: ComponentServer | undefined,\n\n /**\n * array of compositions\n */\n readonly compositions: Composition[],\n\n /**\n * tags of the component.\n */\n readonly tags: TagMap,\n\n /**\n * component build status\n */\n readonly buildStatus?: string,\n\n /**\n * issues of component.\n */\n readonly issuesCount?: number,\n /**\n * status of component.\n */\n readonly status?: any,\n\n /**\n * deprecation info of the component.\n */\n readonly deprecation?: DeprecationInfo,\n\n /**\n * env descriptor.\n */\n readonly environment?: Descriptor,\n\n /**\n * description of the component.\n */\n\n readonly description = '',\n\n readonly labels: string[] = [],\n\n /**\n * host of the component\n */\n readonly host?: string,\n\n /**\n *\n * size preview\n */\n readonly size?: ComponentPreviewSize,\n\n /**\n * latest version of component\n */\n readonly latest?: string,\n\n readonly preview?: ComponentPreview,\n\n readonly logs?: LegacyComponentLog[]\n ) {}\n\n get version() {\n if (!this.id.version) return 'new';\n return this.id.version;\n }\n\n /**\n * create an instance of a component from a plain object.\n */\n static from({\n id,\n server,\n displayName,\n compositions = [],\n packageName,\n tags = [],\n deprecation,\n buildStatus,\n env,\n status,\n issuesCount,\n description,\n labels,\n host,\n latest,\n preview,\n size,\n logs,\n }: ComponentModelProps) {\n return new ComponentModel(\n ComponentID.fromObject(id),\n displayName,\n packageName,\n server,\n Composition.fromArray(compositions),\n TagMap.fromArray(tags.map((tag) => Tag.fromObject(tag))),\n buildStatus,\n issuesCount,\n status,\n deprecation,\n env,\n description,\n labels,\n host,\n size,\n latest,\n preview,\n logs?.map((log) => log ?? { hash: '[error]', tag: '[error]', message: '', parents: [] })\n );\n }\n\n static fromArray(componentsProps: ComponentModelProps[]) {\n return componentsProps.map((rawComponent) => ComponentModel.from(rawComponent));\n }\n\n static empty() {\n return new ComponentModel(\n ComponentID.fromObject({ name: 'root', scope: 'temp' }),\n '',\n '',\n { env: '', url: '' },\n [],\n TagMap.empty()\n );\n }\n}\n"],"mappings":";;;;;;AACA,SAAAA,cAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,aAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGA,SAAAE,aAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,YAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGA,SAAAG,KAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,IAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,QAAA;EAAA,MAAAJ,IAAA,GAAAC,OAAA;EAAAG,OAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA;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C,KAAKA,CAAA,EAAG;IACb,OAAO,IAAIrC,cAAc,CACvBuB,0BAAW,CAACC,UAAU,CAAC;MAAEc,IAAI,EAAE,MAAM;MAAEC,KAAK,EAAE;IAAO,CAAC,CAAC,EACvD,EAAE,EACF,EAAE,EACF;MAAEjB,GAAG,EAAE,EAAE;MAAEkB,GAAG,EAAE;IAAG,CAAC,EACpB,EAAE,EACFb,gBAAM,CAACU,KAAK,CAAC,CACf,CAAC;EACH;AACF;AAACI,OAAA,CAAAzC,cAAA,GAAAA,cAAA","ignoreList":[]}
@@ -1 +1 @@
1
- export { ComponentModel, ComponentModelProps } from './component-model';
1
+ export { ComponentModel, ComponentModelProps, DeprecationInfo } from './component-model';
@@ -15,6 +15,12 @@ Object.defineProperty(exports, "ComponentModelProps", {
15
15
  return _componentModel().ComponentModelProps;
16
16
  }
17
17
  });
18
+ Object.defineProperty(exports, "DeprecationInfo", {
19
+ enumerable: true,
20
+ get: function () {
21
+ return _componentModel().DeprecationInfo;
22
+ }
23
+ });
18
24
  function _componentModel() {
19
25
  const data = require("./component-model");
20
26
  _componentModel = function () {
@@ -1 +1 @@
1
- {"version":3,"names":["_componentModel","data","require"],"sources":["index.ts"],"sourcesContent":["export { ComponentModel, ComponentModelProps } from './component-model';\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA,SAAAA,gBAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,eAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA","ignoreList":[]}
1
+ {"version":3,"names":["_componentModel","data","require"],"sources":["index.ts"],"sourcesContent":["export { ComponentModel, ComponentModelProps, DeprecationInfo } from './component-model';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAAA,gBAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,eAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA","ignoreList":[]}
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/component",
3
- "version": "1.0.1195",
3
+ "version": "1.0.1197",
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.1195"
9
+ "version": "1.0.1197"
10
10
  },
11
11
  "dependencies": {
12
12
  "@teambit/any-fs": "0.0.5",
@@ -25,18 +25,14 @@
25
25
  "classnames": "^2.5.1",
26
26
  "lodash.compact": "3.0.1",
27
27
  "@teambit/component-id": "1.2.4",
28
- "@teambit/legacy.extension-data": "0.0.175",
29
28
  "@teambit/ui-foundation.ui.menu-widget-icon": "0.0.502",
30
29
  "@teambit/graph.cleargraph": "0.0.11",
31
30
  "@teambit/legacy-bit-id": "1.1.3",
32
- "@teambit/legacy.consumer-component": "0.0.174",
33
- "@teambit/component.sources": "0.0.225",
34
31
  "@teambit/toolbox.path.match-patterns": "0.0.35",
35
32
  "@teambit/toolbox.string.eol": "0.0.20",
36
33
  "@teambit/toolbox.string.capitalize": "0.0.516",
37
34
  "@teambit/harmony": "0.4.12",
38
35
  "@teambit/toolbox.path.path": "0.0.23",
39
- "@teambit/cli": "0.0.1404",
40
36
  "@teambit/express": "0.0.1500",
41
37
  "@teambit/harmony.modules.runtimes": "0.0.1",
42
38
  "@teambit/logger": "0.0.1494",
@@ -53,18 +49,10 @@
53
49
  "@teambit/pkg.modules.semver-helper": "0.0.36",
54
50
  "@teambit/ui-foundation.ui.hooks.use-data-query": "0.0.511",
55
51
  "@teambit/cli-table": "0.0.64",
56
- "@teambit/legacy.bit-map": "0.0.230",
57
- "@teambit/pkg.modules.component-package-name": "0.0.180",
58
52
  "@teambit/ui-foundation.ui.react-router.use-query": "0.0.505",
59
53
  "@teambit/legacy-component-log": "0.0.432",
60
54
  "@teambit/component-descriptor": "0.0.467",
61
- "@teambit/semantics.doc-parser": "0.0.181",
62
- "@teambit/legacy.consumer": "0.0.173",
63
- "@teambit/legacy.dependency-graph": "0.0.176",
64
55
  "@teambit/legacy.loader": "0.0.32",
65
- "@teambit/legacy.scope": "0.0.173",
66
- "@teambit/scope.remotes": "0.0.173",
67
- "@teambit/legacy.component-diff": "0.0.229",
68
56
  "@teambit/design.ui.empty-box": "0.0.364",
69
57
  "@teambit/documenter.ui.heading": "4.1.8",
70
58
  "@teambit/documenter.ui.separator": "4.1.7",
@@ -83,17 +71,28 @@
83
71
  "@teambit/lanes.hooks.use-lanes": "0.0.298",
84
72
  "@teambit/lanes.ui.models.lanes-model": "0.0.237",
85
73
  "@teambit/ui-foundation.ui.use-box.dropdown": "0.0.151",
86
- "@teambit/aspect-loader": "1.0.1195",
87
- "@teambit/dependency-resolver": "1.0.1195",
88
- "@teambit/objects": "0.0.702",
89
- "@teambit/graphql": "1.0.1195",
90
- "@teambit/command-bar": "1.0.1195",
91
- "@teambit/preview": "1.0.1195",
92
- "@teambit/pubsub": "1.0.1195",
93
- "@teambit/react-router": "1.0.1195",
94
- "@teambit/compositions": "1.0.1195",
95
- "@teambit/deprecation": "1.0.1195",
96
- "@teambit/envs": "1.0.1195"
74
+ "@teambit/legacy.extension-data": "0.0.176",
75
+ "@teambit/aspect-loader": "1.0.1197",
76
+ "@teambit/dependency-resolver": "1.0.1197",
77
+ "@teambit/legacy.consumer-component": "0.0.175",
78
+ "@teambit/objects": "0.0.704",
79
+ "@teambit/component.sources": "0.0.226",
80
+ "@teambit/graphql": "1.0.1197",
81
+ "@teambit/cli": "0.0.1405",
82
+ "@teambit/command-bar": "1.0.1197",
83
+ "@teambit/preview": "1.0.1197",
84
+ "@teambit/pubsub": "1.0.1197",
85
+ "@teambit/react-router": "1.0.1197",
86
+ "@teambit/legacy.bit-map": "0.0.231",
87
+ "@teambit/pkg.modules.component-package-name": "0.0.181",
88
+ "@teambit/semantics.doc-parser": "0.0.182",
89
+ "@teambit/legacy.consumer": "0.0.174",
90
+ "@teambit/legacy.dependency-graph": "0.0.177",
91
+ "@teambit/legacy.scope": "0.0.174",
92
+ "@teambit/scope.remotes": "0.0.174",
93
+ "@teambit/legacy.component-diff": "0.0.230",
94
+ "@teambit/compositions": "1.0.1197",
95
+ "@teambit/envs": "1.0.1197"
97
96
  },
98
97
  "devDependencies": {
99
98
  "@types/lodash": "4.14.165",
@@ -1,6 +1,5 @@
1
1
  import type { CompositionProps } from '@teambit/compositions';
2
2
  import { Composition } from '@teambit/compositions';
3
- import type { DeprecationInfo } from '@teambit/deprecation';
4
3
  import type { Descriptor } from '@teambit/envs';
5
4
  import type { ComponentIdObj } from '@teambit/component-id';
6
5
  import { ComponentID } from '@teambit/component-id';
@@ -11,9 +10,20 @@ import { TagMap } from '../../tag-map';
11
10
  import type { TagProps } from '../../tag/tag';
12
11
  // import { Snap } from '../../snap';
13
12
 
13
+ /**
14
+ * the deprecation data of a component. it lives here and not in the deprecation aspect, so the
15
+ * component model doesn't depend on that aspect (it depends on component).
16
+ */
17
+ export type DeprecationInfo = {
18
+ isDeprecate: boolean;
19
+ newId?: string;
20
+ range?: string;
21
+ };
22
+
14
23
  // ADDING MORE PROPERTIES HERE IS NOT ALLOWED!!! IF YOU NEED DATA PLEASE ADD A NEW
15
24
  // HOOK FROM YOUR ASPECT!!!
16
25
  // TODO: remove all properties from here to their rightful place in their aspects.
26
+
17
27
  export type ComponentModelProps = {
18
28
  id: ComponentIdObj;
19
29
  description: string;
@@ -1 +1 @@
1
- export { ComponentModel, ComponentModelProps } from './component-model';
1
+ export { ComponentModel, ComponentModelProps, DeprecationInfo } from './component-model';