@teambit/deprecation 0.0.1108 → 0.0.1110

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.
@@ -1 +1 @@
1
- {"version":3,"names":["DeprecateCmd","constructor","deprecation","workspace","name","description","report","id","newId","result","deprecate","chalk","green","bold","componentId","resolveComponentId","newComponentId","undefined"],"sources":["deprecate-cmd.ts"],"sourcesContent":["import chalk from 'chalk';\nimport { Workspace } from '@teambit/workspace';\nimport { Command, CommandOptions } from '@teambit/cli';\nimport { DeprecationMain } from './deprecation.main.runtime';\n\nexport class DeprecateCmd implements Command {\n name = 'deprecate <component-name>';\n arguments = [{ name: 'component-name', description: 'component name or component id' }];\n description = 'deprecate a component';\n group = 'collaborate';\n skipWorkspace = true;\n alias = 'd';\n options = [['', 'new-id <string>', 'if replaced by another component, enter the new component id']] as CommandOptions;\n loader = true;\n migration = true;\n remoteOp = true;\n helpUrl = 'docs/components/removing-components';\n\n constructor(private deprecation: DeprecationMain, private workspace: Workspace) {}\n\n async report([id]: [string], { newId }: { newId?: string }): Promise<string> {\n const result = await this.deprecate(id, newId);\n if (result) {\n return chalk.green(`the component \"${id}\" has been deprecated successfully`);\n }\n return chalk.bold(`the component \"${id}\" is already deprecated. no changes have been made`);\n }\n\n private async deprecate(id: string, newId?: string): Promise<boolean> {\n const componentId = await this.workspace.resolveComponentId(id);\n const newComponentId = newId ? await this.workspace.resolveComponentId(newId) : undefined;\n return this.deprecation.deprecate(componentId, newComponentId);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAKO,MAAMA,YAAY,CAAoB;EAa3CC,WAAW,CAASC,WAA4B,EAAUC,SAAoB,EAAE;IAAA,KAA5DD,WAA4B,GAA5BA,WAA4B;IAAA,KAAUC,SAAoB,GAApBA,SAAoB;IAAA,8CAZvE,4BAA4B;IAAA,mDACvB,CAAC;MAAEC,IAAI,EAAE,gBAAgB;MAAEC,WAAW,EAAE;IAAiC,CAAC,CAAC;IAAA,qDACzE,uBAAuB;IAAA,+CAC7B,aAAa;IAAA,uDACL,IAAI;IAAA,+CACZ,GAAG;IAAA,iDACD,CAAC,CAAC,EAAE,EAAE,iBAAiB,EAAE,8DAA8D,CAAC,CAAC;IAAA,gDAC1F,IAAI;IAAA,mDACD,IAAI;IAAA,kDACL,IAAI;IAAA,iDACL,qCAAqC;EAEkC;EAEjF,MAAMC,MAAM,CAAC,CAACC,EAAE,CAAW,EAAE;IAAEC;EAA0B,CAAC,EAAmB;IAC3E,MAAMC,MAAM,GAAG,MAAM,IAAI,CAACC,SAAS,CAACH,EAAE,EAAEC,KAAK,CAAC;IAC9C,IAAIC,MAAM,EAAE;MACV,OAAOE,gBAAK,CAACC,KAAK,CAAE,kBAAiBL,EAAG,oCAAmC,CAAC;IAC9E;IACA,OAAOI,gBAAK,CAACE,IAAI,CAAE,kBAAiBN,EAAG,oDAAmD,CAAC;EAC7F;EAEA,MAAcG,SAAS,CAACH,EAAU,EAAEC,KAAc,EAAoB;IACpE,MAAMM,WAAW,GAAG,MAAM,IAAI,CAACX,SAAS,CAACY,kBAAkB,CAACR,EAAE,CAAC;IAC/D,MAAMS,cAAc,GAAGR,KAAK,GAAG,MAAM,IAAI,CAACL,SAAS,CAACY,kBAAkB,CAACP,KAAK,CAAC,GAAGS,SAAS;IACzF,OAAO,IAAI,CAACf,WAAW,CAACQ,SAAS,CAACI,WAAW,EAAEE,cAAc,CAAC;EAChE;AACF;AAAC"}
1
+ {"version":3,"names":["_chalk","data","_interopRequireDefault","require","DeprecateCmd","constructor","deprecation","workspace","_defineProperty2","default","name","description","report","id","newId","result","deprecate","chalk","green","bold","componentId","resolveComponentId","newComponentId","undefined","exports"],"sources":["deprecate-cmd.ts"],"sourcesContent":["import chalk from 'chalk';\nimport { Workspace } from '@teambit/workspace';\nimport { Command, CommandOptions } from '@teambit/cli';\nimport { DeprecationMain } from './deprecation.main.runtime';\n\nexport class DeprecateCmd implements Command {\n name = 'deprecate <component-name>';\n arguments = [{ name: 'component-name', description: 'component name or component id' }];\n description = 'deprecate a component';\n group = 'collaborate';\n skipWorkspace = true;\n alias = 'd';\n options = [['', 'new-id <string>', 'if replaced by another component, enter the new component id']] as CommandOptions;\n loader = true;\n migration = true;\n remoteOp = true;\n helpUrl = 'docs/components/removing-components';\n\n constructor(private deprecation: DeprecationMain, private workspace: Workspace) {}\n\n async report([id]: [string], { newId }: { newId?: string }): Promise<string> {\n const result = await this.deprecate(id, newId);\n if (result) {\n return chalk.green(`the component \"${id}\" has been deprecated successfully`);\n }\n return chalk.bold(`the component \"${id}\" is already deprecated. no changes have been made`);\n }\n\n private async deprecate(id: string, newId?: string): Promise<boolean> {\n const componentId = await this.workspace.resolveComponentId(id);\n const newComponentId = newId ? await this.workspace.resolveComponentId(newId) : undefined;\n return this.deprecation.deprecate(componentId, newComponentId);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAKO,MAAMG,YAAY,CAAoB;EAa3CC,WAAWA,CAASC,WAA4B,EAAUC,SAAoB,EAAE;IAAA,KAA5DD,WAA4B,GAA5BA,WAA4B;IAAA,KAAUC,SAAoB,GAApBA,SAAoB;IAAA,IAAAC,gBAAA,GAAAC,OAAA,gBAZvE,4BAA4B;IAAA,IAAAD,gBAAA,GAAAC,OAAA,qBACvB,CAAC;MAAEC,IAAI,EAAE,gBAAgB;MAAEC,WAAW,EAAE;IAAiC,CAAC,CAAC;IAAA,IAAAH,gBAAA,GAAAC,OAAA,uBACzE,uBAAuB;IAAA,IAAAD,gBAAA,GAAAC,OAAA,iBAC7B,aAAa;IAAA,IAAAD,gBAAA,GAAAC,OAAA,yBACL,IAAI;IAAA,IAAAD,gBAAA,GAAAC,OAAA,iBACZ,GAAG;IAAA,IAAAD,gBAAA,GAAAC,OAAA,mBACD,CAAC,CAAC,EAAE,EAAE,iBAAiB,EAAE,8DAA8D,CAAC,CAAC;IAAA,IAAAD,gBAAA,GAAAC,OAAA,kBAC1F,IAAI;IAAA,IAAAD,gBAAA,GAAAC,OAAA,qBACD,IAAI;IAAA,IAAAD,gBAAA,GAAAC,OAAA,oBACL,IAAI;IAAA,IAAAD,gBAAA,GAAAC,OAAA,mBACL,qCAAqC;EAEkC;EAEjF,MAAMG,MAAMA,CAAC,CAACC,EAAE,CAAW,EAAE;IAAEC;EAA0B,CAAC,EAAmB;IAC3E,MAAMC,MAAM,GAAG,MAAM,IAAI,CAACC,SAAS,CAACH,EAAE,EAAEC,KAAK,CAAC;IAC9C,IAAIC,MAAM,EAAE;MACV,OAAOE,gBAAK,CAACC,KAAK,CAAE,kBAAiBL,EAAG,oCAAmC,CAAC;IAC9E;IACA,OAAOI,gBAAK,CAACE,IAAI,CAAE,kBAAiBN,EAAG,oDAAmD,CAAC;EAC7F;EAEA,MAAcG,SAASA,CAACH,EAAU,EAAEC,KAAc,EAAoB;IACpE,MAAMM,WAAW,GAAG,MAAM,IAAI,CAACb,SAAS,CAACc,kBAAkB,CAACR,EAAE,CAAC;IAC/D,MAAMS,cAAc,GAAGR,KAAK,GAAG,MAAM,IAAI,CAACP,SAAS,CAACc,kBAAkB,CAACP,KAAK,CAAC,GAAGS,SAAS;IACzF,OAAO,IAAI,CAACjB,WAAW,CAACU,SAAS,CAACI,WAAW,EAAEE,cAAc,CAAC;EAChE;AACF;AAACE,OAAA,CAAApB,YAAA,GAAAA,YAAA"}
@@ -1 +1 @@
1
- {"version":3,"names":["DeprecationAspect","Aspect","create","id","dependencies","defaultConfig"],"sources":["deprecation.aspect.ts"],"sourcesContent":["import { Aspect } from '@teambit/harmony';\n\nexport const DeprecationAspect = Aspect.create({\n id: 'teambit.component/deprecation',\n dependencies: [],\n defaultConfig: {},\n});\n\nexport default DeprecationAspect;\n"],"mappings":";;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEO,MAAMA,iBAAiB,GAAGC,iBAAM,CAACC,MAAM,CAAC;EAC7CC,EAAE,EAAE,+BAA+B;EACnCC,YAAY,EAAE,EAAE;EAChBC,aAAa,EAAE,CAAC;AAClB,CAAC,CAAC;AAAC;AAAA,eAEYL,iBAAiB;AAAA"}
1
+ {"version":3,"names":["_harmony","data","require","DeprecationAspect","Aspect","create","id","dependencies","defaultConfig","exports","_default","default"],"sources":["deprecation.aspect.ts"],"sourcesContent":["import { Aspect } from '@teambit/harmony';\n\nexport const DeprecationAspect = Aspect.create({\n id: 'teambit.component/deprecation',\n dependencies: [],\n defaultConfig: {},\n});\n\nexport default DeprecationAspect;\n"],"mappings":";;;;;;AAAA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEO,MAAME,iBAAiB,GAAGC,iBAAM,CAACC,MAAM,CAAC;EAC7CC,EAAE,EAAE,+BAA+B;EACnCC,YAAY,EAAE,EAAE;EAChBC,aAAa,EAAE,CAAC;AAClB,CAAC,CAAC;AAACC,OAAA,CAAAN,iBAAA,GAAAA,iBAAA;AAAA,IAAAO,QAAA,GAEYP,iBAAiB;AAAAM,OAAA,CAAAE,OAAA,GAAAD,QAAA"}
@@ -1 +1 @@
1
- {"version":3,"names":["Logo","height","display","justifyContent","width"],"sources":["deprecation.composition.tsx"],"sourcesContent":["import React from 'react';\n\nexport const Logo = () => (\n <div style={{ height: '100%', display: 'flex', justifyContent: 'center' }}>\n <img style={{ width: 70 }} src=\"https://static.bit.dev/extensions-icons/deprecation.svg\" />\n </div>\n);\n"],"mappings":";;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEO,MAAMA,IAAI,GAAG,mBAClB;EAAK,KAAK,EAAE;IAAEC,MAAM,EAAE,MAAM;IAAEC,OAAO,EAAE,MAAM;IAAEC,cAAc,EAAE;EAAS;AAAE,gBACxE;EAAK,KAAK,EAAE;IAAEC,KAAK,EAAE;EAAG,CAAE;EAAC,GAAG,EAAC;AAAyD,EAAG,CAE9F;AAAC"}
1
+ {"version":3,"names":["_react","data","_interopRequireDefault","require","Logo","default","createElement","style","height","display","justifyContent","width","src","exports"],"sources":["deprecation.composition.tsx"],"sourcesContent":["import React from 'react';\n\nexport const Logo = () => (\n <div style={{ height: '100%', display: 'flex', justifyContent: 'center' }}>\n <img style={{ width: 70 }} src=\"https://static.bit.dev/extensions-icons/deprecation.svg\" />\n </div>\n);\n"],"mappings":";;;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEO,MAAMG,IAAI,GAAGA,CAAA,kBAClBJ,MAAA,GAAAK,OAAA,CAAAC,aAAA;EAAKC,KAAK,EAAE;IAAEC,MAAM,EAAE,MAAM;IAAEC,OAAO,EAAE,MAAM;IAAEC,cAAc,EAAE;EAAS;AAAE,gBACxEV,MAAA,GAAAK,OAAA,CAAAC,aAAA;EAAKC,KAAK,EAAE;IAAEI,KAAK,EAAE;EAAG,CAAE;EAACC,GAAG,EAAC;AAAyD,CAAE,CACvF,CACN;AAACC,OAAA,CAAAT,IAAA,GAAAA,IAAA"}
@@ -1 +1 @@
1
- {"version":3,"names":["DeprecationFragment","constructor","deprecation","renderRow","component","deprecationInfo","getDeprecationInfo","isDeprecate","toString","newId","title","content","json"],"sources":["deprecation.fragment.ts"],"sourcesContent":["import { Component, ShowFragment } from '@teambit/component';\nimport { DeprecationMain } from './deprecation.main.runtime';\n\nexport class DeprecationFragment implements ShowFragment {\n constructor(private deprecation: DeprecationMain) {}\n\n title = 'deprecated';\n\n async renderRow(component: Component) {\n const deprecationInfo = await this.deprecation.getDeprecationInfo(component);\n const isDeprecate = deprecationInfo.isDeprecate.toString();\n const newId = deprecationInfo.newId ? ` (new-id: ${deprecationInfo.newId})` : '';\n return {\n title: this.title,\n content: isDeprecate + newId,\n };\n }\n\n async json(component: Component) {\n return {\n title: this.title,\n json: await this.deprecation.getDeprecationInfo(component),\n };\n }\n\n weight = 3;\n}\n"],"mappings":";;;;;;;;;;;;;;;AAGO,MAAMA,mBAAmB,CAAyB;EACvDC,WAAW,CAASC,WAA4B,EAAE;IAAA,KAA9BA,WAA4B,GAA5BA,WAA4B;IAAA,+CAExC,YAAY;IAAA,gDAmBX,CAAC;EArByC;EAInD,MAAMC,SAAS,CAACC,SAAoB,EAAE;IACpC,MAAMC,eAAe,GAAG,MAAM,IAAI,CAACH,WAAW,CAACI,kBAAkB,CAACF,SAAS,CAAC;IAC5E,MAAMG,WAAW,GAAGF,eAAe,CAACE,WAAW,CAACC,QAAQ,EAAE;IAC1D,MAAMC,KAAK,GAAGJ,eAAe,CAACI,KAAK,GAAI,aAAYJ,eAAe,CAACI,KAAM,GAAE,GAAG,EAAE;IAChF,OAAO;MACLC,KAAK,EAAE,IAAI,CAACA,KAAK;MACjBC,OAAO,EAAEJ,WAAW,GAAGE;IACzB,CAAC;EACH;EAEA,MAAMG,IAAI,CAACR,SAAoB,EAAE;IAC/B,OAAO;MACLM,KAAK,EAAE,IAAI,CAACA,KAAK;MACjBE,IAAI,EAAE,MAAM,IAAI,CAACV,WAAW,CAACI,kBAAkB,CAACF,SAAS;IAC3D,CAAC;EACH;AAGF;AAAC"}
1
+ {"version":3,"names":["DeprecationFragment","constructor","deprecation","_defineProperty2","default","renderRow","component","deprecationInfo","getDeprecationInfo","isDeprecate","toString","newId","title","content","json","exports"],"sources":["deprecation.fragment.ts"],"sourcesContent":["import { Component, ShowFragment } from '@teambit/component';\nimport { DeprecationMain } from './deprecation.main.runtime';\n\nexport class DeprecationFragment implements ShowFragment {\n constructor(private deprecation: DeprecationMain) {}\n\n title = 'deprecated';\n\n async renderRow(component: Component) {\n const deprecationInfo = await this.deprecation.getDeprecationInfo(component);\n const isDeprecate = deprecationInfo.isDeprecate.toString();\n const newId = deprecationInfo.newId ? ` (new-id: ${deprecationInfo.newId})` : '';\n return {\n title: this.title,\n content: isDeprecate + newId,\n };\n }\n\n async json(component: Component) {\n return {\n title: this.title,\n json: await this.deprecation.getDeprecationInfo(component),\n };\n }\n\n weight = 3;\n}\n"],"mappings":";;;;;;;;;;;;;;;AAGO,MAAMA,mBAAmB,CAAyB;EACvDC,WAAWA,CAASC,WAA4B,EAAE;IAAA,KAA9BA,WAA4B,GAA5BA,WAA4B;IAAA,IAAAC,gBAAA,GAAAC,OAAA,iBAExC,YAAY;IAAA,IAAAD,gBAAA,GAAAC,OAAA,kBAmBX,CAAC;EArByC;EAInD,MAAMC,SAASA,CAACC,SAAoB,EAAE;IACpC,MAAMC,eAAe,GAAG,MAAM,IAAI,CAACL,WAAW,CAACM,kBAAkB,CAACF,SAAS,CAAC;IAC5E,MAAMG,WAAW,GAAGF,eAAe,CAACE,WAAW,CAACC,QAAQ,CAAC,CAAC;IAC1D,MAAMC,KAAK,GAAGJ,eAAe,CAACI,KAAK,GAAI,aAAYJ,eAAe,CAACI,KAAM,GAAE,GAAG,EAAE;IAChF,OAAO;MACLC,KAAK,EAAE,IAAI,CAACA,KAAK;MACjBC,OAAO,EAAEJ,WAAW,GAAGE;IACzB,CAAC;EACH;EAEA,MAAMG,IAAIA,CAACR,SAAoB,EAAE;IAC/B,OAAO;MACLM,KAAK,EAAE,IAAI,CAACA,KAAK;MACjBE,IAAI,EAAE,MAAM,IAAI,CAACZ,WAAW,CAACM,kBAAkB,CAACF,SAAS;IAC3D,CAAC;EACH;AAGF;AAACS,OAAA,CAAAf,mBAAA,GAAAA,mBAAA"}
@@ -1 +1 @@
1
- {"version":3,"names":["deprecationSchema","deprecation","typeDefs","gql","resolvers","Component","component","getDeprecationInfo"],"sources":["deprecation.graphql.ts"],"sourcesContent":["import { Component } from '@teambit/component';\nimport { Schema } from '@teambit/graphql';\nimport gql from 'graphql-tag';\n\nimport { DeprecationMain } from './deprecation.main.runtime';\n\nexport function deprecationSchema(deprecation: DeprecationMain): Schema {\n return {\n typeDefs: gql`\n extend type Component {\n deprecation: DeprecationInfo\n }\n\n type DeprecationInfo {\n isDeprecate: Boolean\n newId: String\n }\n\n type DeprecationResult {\n bitIds: [String]\n missingComponents: [String]\n }\n\n type Mutation {\n # deprecate components\n deprecate(bitIds: [String!]!): DeprecationResult\n\n # undo deprecate to components\n undeprecate(bitIds: [String!]!): DeprecationResult\n }\n `,\n resolvers: {\n // Mutation: {\n // deprecate: (req: any, { bitIds }: { bitIds: string[] }, context: { verb: string }) => {\n // if (context.verb !== 'write') throw new Error('You are not authorized');\n // return deprecation.deprecate(bitIds);\n // },\n\n // undeprecate: (req: any, { bitIds }: { bitIds: string[] }, context: { verb: string }) => {\n // if (context.verb !== 'write') throw new Error('You are not authorized');\n // return deprecation.unDeprecate(bitIds);\n // },\n // },\n Component: {\n deprecation: (component: Component) => {\n return deprecation.getDeprecationInfo(component);\n },\n },\n },\n };\n}\n"],"mappings":";;;;;;;AAEA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAIO,SAASA,iBAAiB,CAACC,WAA4B,EAAU;EACtE,OAAO;IACLC,QAAQ,EAAE,IAAAC,qBAAG,CAAC;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;IACDC,SAAS,EAAE;MACT;MACA;MACA;MACA;MACA;;MAEA;MACA;MACA;MACA;MACA;MACAC,SAAS,EAAE;QACTJ,WAAW,EAAGK,SAAoB,IAAK;UACrC,OAAOL,WAAW,CAACM,kBAAkB,CAACD,SAAS,CAAC;QAClD;MACF;IACF;EACF,CAAC;AACH"}
1
+ {"version":3,"names":["_graphqlTag","data","_interopRequireDefault","require","deprecationSchema","deprecation","typeDefs","gql","resolvers","Component","component","getDeprecationInfo"],"sources":["deprecation.graphql.ts"],"sourcesContent":["import { Component } from '@teambit/component';\nimport { Schema } from '@teambit/graphql';\nimport gql from 'graphql-tag';\n\nimport { DeprecationMain } from './deprecation.main.runtime';\n\nexport function deprecationSchema(deprecation: DeprecationMain): Schema {\n return {\n typeDefs: gql`\n extend type Component {\n deprecation: DeprecationInfo\n }\n\n type DeprecationInfo {\n isDeprecate: Boolean\n newId: String\n }\n\n type DeprecationResult {\n bitIds: [String]\n missingComponents: [String]\n }\n\n type Mutation {\n # deprecate components\n deprecate(bitIds: [String!]!): DeprecationResult\n\n # undo deprecate to components\n undeprecate(bitIds: [String!]!): DeprecationResult\n }\n `,\n resolvers: {\n // Mutation: {\n // deprecate: (req: any, { bitIds }: { bitIds: string[] }, context: { verb: string }) => {\n // if (context.verb !== 'write') throw new Error('You are not authorized');\n // return deprecation.deprecate(bitIds);\n // },\n\n // undeprecate: (req: any, { bitIds }: { bitIds: string[] }, context: { verb: string }) => {\n // if (context.verb !== 'write') throw new Error('You are not authorized');\n // return deprecation.unDeprecate(bitIds);\n // },\n // },\n Component: {\n deprecation: (component: Component) => {\n return deprecation.getDeprecationInfo(component);\n },\n },\n },\n };\n}\n"],"mappings":";;;;;;;AAEA,SAAAA,YAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,WAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAIO,SAASG,iBAAiBA,CAACC,WAA4B,EAAU;EACtE,OAAO;IACLC,QAAQ,EAAE,IAAAC,qBAAG,CAAC;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;IACDC,SAAS,EAAE;MACT;MACA;MACA;MACA;MACA;;MAEA;MACA;MACA;MACA;MACA;MACAC,SAAS,EAAE;QACTJ,WAAW,EAAGK,SAAoB,IAAK;UACrC,OAAOL,WAAW,CAACM,kBAAkB,CAACD,SAAS,CAAC;QAClD;MACF;IACF;EACF,CAAC;AACH"}
@@ -1 +1 @@
1
- {"version":3,"names":["DeprecationMain","constructor","scope","workspace","getDeprecationInfo","component","data","config","extensions","findExtension","DeprecationAspect","id","deprecatedBackwardCompatibility","state","_consumer","deprecated","isDeprecate","Boolean","deprecate","newId","ComponentID","fromObject","toString","undefined","componentId","results","bitMap","addComponentConfig","toObject","write","unDeprecate","provider","graphql","componentAspect","cli","deprecation","register","DeprecateCmd","UndeprecateCmd","registerShowFragments","DeprecationFragment","deprecationSchema","MainRuntime","GraphqlAspect","ScopeAspect","ComponentAspect","WorkspaceAspect","CLIAspect","addRuntime"],"sources":["deprecation.main.runtime.ts"],"sourcesContent":["import { CLIAspect, CLIMain, MainRuntime } from '@teambit/cli';\nimport { ComponentMain, ComponentAspect, Component, ComponentID } from '@teambit/component';\nimport { ScopeMain, ScopeAspect } from '@teambit/scope';\nimport WorkspaceAspect, { Workspace } from '@teambit/workspace';\nimport { GraphqlAspect, GraphqlMain } from '@teambit/graphql';\nimport { ComponentIdObj } from '@teambit/component-id';\nimport { DeprecationAspect } from './deprecation.aspect';\nimport { deprecationSchema } from './deprecation.graphql';\nimport { DeprecationFragment } from './deprecation.fragment';\nimport { DeprecateCmd } from './deprecate-cmd';\nimport { UndeprecateCmd } from './undeprecate-cmd';\n\nexport type DeprecationInfo = {\n isDeprecate: boolean;\n newId?: string;\n};\n\nexport type DeprecationMetadata = {\n deprecate?: boolean;\n newId?: ComponentIdObj;\n};\n\nexport class DeprecationMain {\n constructor(private scope: ScopeMain, private workspace: Workspace) {}\n static runtime = MainRuntime;\n static dependencies = [GraphqlAspect, ScopeAspect, ComponentAspect, WorkspaceAspect, CLIAspect];\n\n async getDeprecationInfo(component: Component): Promise<DeprecationInfo> {\n const data = component.config.extensions.findExtension(DeprecationAspect.id)?.config as\n | DeprecationMetadata\n | undefined;\n const deprecatedBackwardCompatibility = component.state._consumer.deprecated;\n const isDeprecate = Boolean(data?.deprecate || deprecatedBackwardCompatibility);\n const newId = data?.newId ? ComponentID.fromObject(data?.newId).toString() : undefined;\n return {\n isDeprecate,\n newId,\n };\n }\n\n /**\n * mark a component as deprecated. after this change, the component will be modified.\n * tag and export the component to have it deprecated on the remote.\n *\n * @param componentId\n * @param newId\n * @returns boolean whether or not the component has been deprecated\n */\n async deprecate(componentId: ComponentID, newId?: ComponentID): Promise<boolean> {\n const results = this.workspace.bitMap.addComponentConfig(componentId, DeprecationAspect.id, {\n deprecate: true,\n newId: newId?.toObject(),\n });\n await this.workspace.bitMap.write();\n\n return results;\n }\n\n async unDeprecate(componentId: ComponentID) {\n const results = this.workspace.bitMap.addComponentConfig(componentId, DeprecationAspect.id, {\n deprecate: false,\n newId: '',\n });\n await this.workspace.bitMap.write();\n\n return results;\n }\n\n static async provider([graphql, scope, componentAspect, workspace, cli]: [\n GraphqlMain,\n ScopeMain,\n ComponentMain,\n Workspace,\n CLIMain\n ]) {\n const deprecation = new DeprecationMain(scope, workspace);\n cli.register(new DeprecateCmd(deprecation, workspace), new UndeprecateCmd(deprecation, workspace));\n componentAspect.registerShowFragments([new DeprecationFragment(deprecation)]);\n graphql.register(deprecationSchema(deprecation));\n\n return deprecation;\n }\n}\n\nDeprecationAspect.addRuntime(DeprecationMain);\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;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,MAAMC,OAAO,GAAG,IAAI,CAACtB,SAAS,CAACuB,MAAM,CAACC,kBAAkB,CAACH,WAAW,EAAEd,gCAAiB,CAACC,EAAE,EAAE;MAC1FO,SAAS,EAAE,KAAK;MAChBC,KAAK,EAAE;IACT,CAAC,CAAC;IACF,MAAM,IAAI,CAAChB,SAAS,CAACuB,MAAM,CAACG,KAAK,EAAE;IAEnC,OAAOJ,OAAO;EAChB;EAEA,aAAaM,QAAQ,CAAC,CAACC,OAAO,EAAE9B,KAAK,EAAE+B,eAAe,EAAE9B,SAAS,EAAE+B,GAAG,CAMrE,EAAE;IACD,MAAMC,WAAW,GAAG,IAAInC,eAAe,CAACE,KAAK,EAAEC,SAAS,CAAC;IACzD+B,GAAG,CAACE,QAAQ,CAAC,KAAIC,4BAAY,EAACF,WAAW,EAAEhC,SAAS,CAAC,EAAE,KAAImC,gCAAc,EAACH,WAAW,EAAEhC,SAAS,CAAC,CAAC;IAClG8B,eAAe,CAACM,qBAAqB,CAAC,CAAC,KAAIC,mCAAmB,EAACL,WAAW,CAAC,CAAC,CAAC;IAC7EH,OAAO,CAACI,QAAQ,CAAC,IAAAK,iCAAiB,EAACN,WAAW,CAAC,CAAC;IAEhD,OAAOA,WAAW;EACpB;AACF;AAAC;AAAA,gCA5DYnC,eAAe,aAET0C,kBAAW;AAAA,gCAFjB1C,eAAe,kBAGJ,CAAC2C,wBAAa,EAAEC,oBAAW,EAAEC,4BAAe,EAAEC,oBAAe,EAAEC,gBAAS,CAAC;AA2DjGrC,gCAAiB,CAACsC,UAAU,CAAChD,eAAe,CAAC"}
1
+ {"version":3,"names":["_cli","data","require","_component","_scope","_workspace","_interopRequireDefault","_graphql","_deprecation","_deprecation2","_deprecation3","_deprecateCmd","_undeprecateCmd","DeprecationMain","constructor","scope","workspace","getDeprecationInfo","component","_component$config$ext","config","extensions","findExtension","DeprecationAspect","id","deprecatedBackwardCompatibility","state","_consumer","deprecated","isDeprecate","Boolean","deprecate","newId","ComponentID","fromObject","toString","undefined","componentId","results","bitMap","addComponentConfig","toObject","write","unDeprecate","provider","graphql","componentAspect","cli","deprecation","register","DeprecateCmd","UndeprecateCmd","registerShowFragments","DeprecationFragment","deprecationSchema","exports","_defineProperty2","default","MainRuntime","GraphqlAspect","ScopeAspect","ComponentAspect","WorkspaceAspect","CLIAspect","addRuntime"],"sources":["deprecation.main.runtime.ts"],"sourcesContent":["import { CLIAspect, CLIMain, MainRuntime } from '@teambit/cli';\nimport { ComponentMain, ComponentAspect, Component, ComponentID } from '@teambit/component';\nimport { ScopeMain, ScopeAspect } from '@teambit/scope';\nimport WorkspaceAspect, { Workspace } from '@teambit/workspace';\nimport { GraphqlAspect, GraphqlMain } from '@teambit/graphql';\nimport { ComponentIdObj } from '@teambit/component-id';\nimport { DeprecationAspect } from './deprecation.aspect';\nimport { deprecationSchema } from './deprecation.graphql';\nimport { DeprecationFragment } from './deprecation.fragment';\nimport { DeprecateCmd } from './deprecate-cmd';\nimport { UndeprecateCmd } from './undeprecate-cmd';\n\nexport type DeprecationInfo = {\n isDeprecate: boolean;\n newId?: string;\n};\n\nexport type DeprecationMetadata = {\n deprecate?: boolean;\n newId?: ComponentIdObj;\n};\n\nexport class DeprecationMain {\n constructor(private scope: ScopeMain, private workspace: Workspace) {}\n static runtime = MainRuntime;\n static dependencies = [GraphqlAspect, ScopeAspect, ComponentAspect, WorkspaceAspect, CLIAspect];\n\n async getDeprecationInfo(component: Component): Promise<DeprecationInfo> {\n const data = component.config.extensions.findExtension(DeprecationAspect.id)?.config as\n | DeprecationMetadata\n | undefined;\n const deprecatedBackwardCompatibility = component.state._consumer.deprecated;\n const isDeprecate = Boolean(data?.deprecate || deprecatedBackwardCompatibility);\n const newId = data?.newId ? ComponentID.fromObject(data?.newId).toString() : undefined;\n return {\n isDeprecate,\n newId,\n };\n }\n\n /**\n * mark a component as deprecated. after this change, the component will be modified.\n * tag and export the component to have it deprecated on the remote.\n *\n * @param componentId\n * @param newId\n * @returns boolean whether or not the component has been deprecated\n */\n async deprecate(componentId: ComponentID, newId?: ComponentID): Promise<boolean> {\n const results = this.workspace.bitMap.addComponentConfig(componentId, DeprecationAspect.id, {\n deprecate: true,\n newId: newId?.toObject(),\n });\n await this.workspace.bitMap.write();\n\n return results;\n }\n\n async unDeprecate(componentId: ComponentID) {\n const results = this.workspace.bitMap.addComponentConfig(componentId, DeprecationAspect.id, {\n deprecate: false,\n newId: '',\n });\n await this.workspace.bitMap.write();\n\n return results;\n }\n\n static async provider([graphql, scope, componentAspect, workspace, cli]: [\n GraphqlMain,\n ScopeMain,\n ComponentMain,\n Workspace,\n CLIMain\n ]) {\n const deprecation = new DeprecationMain(scope, workspace);\n cli.register(new DeprecateCmd(deprecation, workspace), new UndeprecateCmd(deprecation, workspace));\n componentAspect.registerShowFragments([new DeprecationFragment(deprecation)]);\n graphql.register(deprecationSchema(deprecation));\n\n return deprecation;\n }\n}\n\nDeprecationAspect.addRuntime(DeprecationMain);\n"],"mappings":";;;;;;;;;;;;;;;;AAAA,SAAAA,KAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,IAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,WAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,UAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,OAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,MAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,WAAA;EAAA,MAAAJ,IAAA,GAAAK,sBAAA,CAAAJ,OAAA;EAAAG,UAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,SAAA;EAAA,MAAAN,IAAA,GAAAC,OAAA;EAAAK,QAAA,YAAAA,CAAA;IAAA,OAAAN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,EAACF,WAAW,EAAEhC,SAAS,CAAC,EAAE,KAAImC,gCAAc,EAACH,WAAW,EAAEhC,SAAS,CAAC,CAAC;IAClG8B,eAAe,CAACM,qBAAqB,CAAC,CAAC,KAAIC,mCAAmB,EAACL,WAAW,CAAC,CAAC,CAAC;IAC7EH,OAAO,CAACI,QAAQ,CAAC,IAAAK,iCAAiB,EAACN,WAAW,CAAC,CAAC;IAEhD,OAAOA,WAAW;EACpB;AACF;AAACO,OAAA,CAAA1C,eAAA,GAAAA,eAAA;AAAA,IAAA2C,gBAAA,GAAAC,OAAA,EA5DY5C,eAAe,aAET6C,kBAAW;AAAA,IAAAF,gBAAA,GAAAC,OAAA,EAFjB5C,eAAe,kBAGJ,CAAC8C,wBAAa,EAAEC,oBAAW,EAAEC,4BAAe,EAAEC,oBAAe,EAAEC,gBAAS,CAAC;AA2DjGxC,gCAAiB,CAACyC,UAAU,CAACnD,eAAe,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"names":["DeprecationUIRuntime","provider","docsUI","registerTitleBadge","component","Badge","legacyComponentModel","deprecation","weight","DocsAspect","UIRuntime","DeprecationAspect","addRuntime"],"sources":["deprecation.ui.runtime.tsx"],"sourcesContent":["import React from 'react';\nimport { UIRuntime } from '@teambit/ui';\nimport { ComponentModel } from '@teambit/component';\nimport { DocsAspect, DocsUI } from '@teambit/docs';\nimport { ComponentDeprecated } from '@teambit/component.ui.component-deprecated';\nimport { DeprecationAspect } from './deprecation.aspect';\n\nexport class DeprecationUIRuntime {\n static dependencies = [DocsAspect];\n\n static runtime = UIRuntime;\n\n static async provider([docsUI]: [DocsUI]) {\n docsUI.registerTitleBadge({\n component: function Badge({ legacyComponentModel }: { legacyComponentModel: ComponentModel }) {\n return <ComponentDeprecated deprecation={legacyComponentModel.deprecation} />;\n },\n weight: 40,\n });\n }\n}\n\nDeprecationAspect.addRuntime(DeprecationUIRuntime);\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEO,MAAMA,oBAAoB,CAAC;EAKhC,aAAaC,QAAQ,CAAC,CAACC,MAAM,CAAW,EAAE;IACxCA,MAAM,CAACC,kBAAkB,CAAC;MACxBC,SAAS,EAAE,SAASC,KAAK,CAAC;QAAEC;MAA+D,CAAC,EAAE;QAC5F,oBAAO,+BAAC,kCAAmB;UAAC,WAAW,EAAEA,oBAAoB,CAACC;QAAY,EAAG;MAC/E,CAAC;MACDC,MAAM,EAAE;IACV,CAAC,CAAC;EACJ;AACF;AAAC;AAAA,gCAbYR,oBAAoB,kBACT,CAACS,kBAAU,CAAC;AAAA,gCADvBT,oBAAoB,aAGdU,eAAS;AAY5BC,gCAAiB,CAACC,UAAU,CAACZ,oBAAoB,CAAC"}
1
+ {"version":3,"names":["_react","data","_interopRequireDefault","require","_ui","_docs","_componentUi","_deprecation","DeprecationUIRuntime","provider","docsUI","registerTitleBadge","component","Badge","legacyComponentModel","default","createElement","ComponentDeprecated","deprecation","weight","exports","_defineProperty2","DocsAspect","UIRuntime","DeprecationAspect","addRuntime"],"sources":["deprecation.ui.runtime.tsx"],"sourcesContent":["import React from 'react';\nimport { UIRuntime } from '@teambit/ui';\nimport { ComponentModel } from '@teambit/component';\nimport { DocsAspect, DocsUI } from '@teambit/docs';\nimport { ComponentDeprecated } from '@teambit/component.ui.component-deprecated';\nimport { DeprecationAspect } from './deprecation.aspect';\n\nexport class DeprecationUIRuntime {\n static dependencies = [DocsAspect];\n\n static runtime = UIRuntime;\n\n static async provider([docsUI]: [DocsUI]) {\n docsUI.registerTitleBadge({\n component: function Badge({ legacyComponentModel }: { legacyComponentModel: ComponentModel }) {\n return <ComponentDeprecated deprecation={legacyComponentModel.deprecation} />;\n },\n weight: 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,gBAAA,GAAAN,OAAA,EADvBP,oBAAoB,aAGde,eAAS;AAY5BC,gCAAiB,CAACC,UAAU,CAACjB,oBAAoB,CAAC"}
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export type { DeprecationMain, DeprecationInfo, DeprecationMetadata } from './deprecation.main.runtime';\nexport { DeprecationAspect, DeprecationAspect as default } from './deprecation.aspect';\n"],"mappings":";;;;;;;;;;;;;;;;;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA"}
1
+ {"version":3,"names":["_deprecation","data","require"],"sources":["index.ts"],"sourcesContent":["export type { DeprecationMain, DeprecationInfo, DeprecationMetadata } from './deprecation.main.runtime';\nexport { DeprecationAspect, DeprecationAspect as default } from './deprecation.aspect';\n"],"mappings":";;;;;;;;;;;;;;;;;AACA,SAAAA,aAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,YAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA"}
@@ -1,5 +1,5 @@
1
- import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_deprecation@0.0.1108/dist/deprecation.composition.js';
2
- import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_deprecation@0.0.1108/dist/deprecation.docs.mdx';
1
+ import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_deprecation@0.0.1110/dist/deprecation.composition.js';
2
+ import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_deprecation@0.0.1110/dist/deprecation.docs.mdx';
3
3
 
4
4
  export const compositions = [compositions_0];
5
5
  export const overview = [overview_0];
@@ -1 +1 @@
1
- {"version":3,"names":["UndeprecateCmd","constructor","deprecation","workspace","report","id","result","undeprecate","chalk","green","bold","componentId","resolveComponentId","unDeprecate"],"sources":["undeprecate-cmd.ts"],"sourcesContent":["import chalk from 'chalk';\nimport { Workspace } from '@teambit/workspace';\nimport { Command, CommandOptions } from '@teambit/cli';\nimport { DeprecationMain } from './deprecation.main.runtime';\n\nexport class UndeprecateCmd implements Command {\n name = 'undeprecate <id>';\n group = 'collaborate';\n description = 'undeprecate a deprecated component (local/remote)';\n alias = '';\n options = [] as CommandOptions;\n loader = true;\n migration = true;\n skipWorkspace = true;\n remoteOp = true;\n\n constructor(private deprecation: DeprecationMain, private workspace: Workspace) {}\n\n async report([id]: [string]): Promise<string> {\n const result = await this.undeprecate(id);\n if (result) {\n return chalk.green(`the component \"${id}\" has been undeprecated successfully`);\n }\n return chalk.bold(`the component \"${id}\" is already undeprecated. no changes have been made`);\n }\n\n private async undeprecate(id: string) {\n const componentId = await this.workspace.resolveComponentId(id);\n return this.deprecation.unDeprecate(componentId);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAKO,MAAMA,cAAc,CAAoB;EAW7CC,WAAW,CAASC,WAA4B,EAAUC,SAAoB,EAAE;IAAA,KAA5DD,WAA4B,GAA5BA,WAA4B;IAAA,KAAUC,SAAoB,GAApBA,SAAoB;IAAA,8CAVvE,kBAAkB;IAAA,+CACjB,aAAa;IAAA,qDACP,mDAAmD;IAAA,+CACzD,EAAE;IAAA,iDACA,EAAE;IAAA,gDACH,IAAI;IAAA,mDACD,IAAI;IAAA,uDACA,IAAI;IAAA,kDACT,IAAI;EAEkE;EAEjF,MAAMC,MAAM,CAAC,CAACC,EAAE,CAAW,EAAmB;IAC5C,MAAMC,MAAM,GAAG,MAAM,IAAI,CAACC,WAAW,CAACF,EAAE,CAAC;IACzC,IAAIC,MAAM,EAAE;MACV,OAAOE,gBAAK,CAACC,KAAK,CAAE,kBAAiBJ,EAAG,sCAAqC,CAAC;IAChF;IACA,OAAOG,gBAAK,CAACE,IAAI,CAAE,kBAAiBL,EAAG,sDAAqD,CAAC;EAC/F;EAEA,MAAcE,WAAW,CAACF,EAAU,EAAE;IACpC,MAAMM,WAAW,GAAG,MAAM,IAAI,CAACR,SAAS,CAACS,kBAAkB,CAACP,EAAE,CAAC;IAC/D,OAAO,IAAI,CAACH,WAAW,CAACW,WAAW,CAACF,WAAW,CAAC;EAClD;AACF;AAAC"}
1
+ {"version":3,"names":["_chalk","data","_interopRequireDefault","require","UndeprecateCmd","constructor","deprecation","workspace","_defineProperty2","default","report","id","result","undeprecate","chalk","green","bold","componentId","resolveComponentId","unDeprecate","exports"],"sources":["undeprecate-cmd.ts"],"sourcesContent":["import chalk from 'chalk';\nimport { Workspace } from '@teambit/workspace';\nimport { Command, CommandOptions } from '@teambit/cli';\nimport { DeprecationMain } from './deprecation.main.runtime';\n\nexport class UndeprecateCmd implements Command {\n name = 'undeprecate <id>';\n group = 'collaborate';\n description = 'undeprecate a deprecated component (local/remote)';\n alias = '';\n options = [] as CommandOptions;\n loader = true;\n migration = true;\n skipWorkspace = true;\n remoteOp = true;\n\n constructor(private deprecation: DeprecationMain, private workspace: Workspace) {}\n\n async report([id]: [string]): Promise<string> {\n const result = await this.undeprecate(id);\n if (result) {\n return chalk.green(`the component \"${id}\" has been undeprecated successfully`);\n }\n return chalk.bold(`the component \"${id}\" is already undeprecated. no changes have been made`);\n }\n\n private async undeprecate(id: string) {\n const componentId = await this.workspace.resolveComponentId(id);\n return this.deprecation.unDeprecate(componentId);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAKO,MAAMG,cAAc,CAAoB;EAW7CC,WAAWA,CAASC,WAA4B,EAAUC,SAAoB,EAAE;IAAA,KAA5DD,WAA4B,GAA5BA,WAA4B;IAAA,KAAUC,SAAoB,GAApBA,SAAoB;IAAA,IAAAC,gBAAA,GAAAC,OAAA,gBAVvE,kBAAkB;IAAA,IAAAD,gBAAA,GAAAC,OAAA,iBACjB,aAAa;IAAA,IAAAD,gBAAA,GAAAC,OAAA,uBACP,mDAAmD;IAAA,IAAAD,gBAAA,GAAAC,OAAA,iBACzD,EAAE;IAAA,IAAAD,gBAAA,GAAAC,OAAA,mBACA,EAAE;IAAA,IAAAD,gBAAA,GAAAC,OAAA,kBACH,IAAI;IAAA,IAAAD,gBAAA,GAAAC,OAAA,qBACD,IAAI;IAAA,IAAAD,gBAAA,GAAAC,OAAA,yBACA,IAAI;IAAA,IAAAD,gBAAA,GAAAC,OAAA,oBACT,IAAI;EAEkE;EAEjF,MAAMC,MAAMA,CAAC,CAACC,EAAE,CAAW,EAAmB;IAC5C,MAAMC,MAAM,GAAG,MAAM,IAAI,CAACC,WAAW,CAACF,EAAE,CAAC;IACzC,IAAIC,MAAM,EAAE;MACV,OAAOE,gBAAK,CAACC,KAAK,CAAE,kBAAiBJ,EAAG,sCAAqC,CAAC;IAChF;IACA,OAAOG,gBAAK,CAACE,IAAI,CAAE,kBAAiBL,EAAG,sDAAqD,CAAC;EAC/F;EAEA,MAAcE,WAAWA,CAACF,EAAU,EAAE;IACpC,MAAMM,WAAW,GAAG,MAAM,IAAI,CAACV,SAAS,CAACW,kBAAkB,CAACP,EAAE,CAAC;IAC/D,OAAO,IAAI,CAACL,WAAW,CAACa,WAAW,CAACF,WAAW,CAAC;EAClD;AACF;AAACG,OAAA,CAAAhB,cAAA,GAAAA,cAAA"}
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/deprecation",
3
- "version": "0.0.1108",
3
+ "version": "0.0.1110",
4
4
  "homepage": "https://bit.cloud/teambit/component/deprecation",
5
5
  "main": "dist/index.js",
6
6
  "componentId": {
7
7
  "scope": "teambit.component",
8
8
  "name": "deprecation",
9
- "version": "0.0.1108"
9
+ "version": "0.0.1110"
10
10
  },
11
11
  "dependencies": {
12
12
  "chalk": "2.4.2",
@@ -15,14 +15,14 @@
15
15
  "@babel/runtime": "7.20.0",
16
16
  "@teambit/harmony": "0.4.6",
17
17
  "@teambit/component-id": "0.0.427",
18
- "@teambit/cli": "0.0.741",
19
- "@teambit/workspace": "0.0.1108",
20
- "@teambit/component": "0.0.1108",
21
- "@teambit/graphql": "0.0.1108",
22
- "@teambit/scope": "0.0.1108",
18
+ "@teambit/cli": "0.0.742",
19
+ "@teambit/workspace": "0.0.1110",
20
+ "@teambit/component": "0.0.1110",
21
+ "@teambit/graphql": "0.0.1110",
22
+ "@teambit/scope": "0.0.1110",
23
23
  "@teambit/component.ui.component-deprecated": "0.0.34",
24
- "@teambit/docs": "0.0.1108",
25
- "@teambit/ui": "0.0.1108"
24
+ "@teambit/docs": "0.0.1110",
25
+ "@teambit/ui": "0.0.1110"
26
26
  },
27
27
  "devDependencies": {
28
28
  "@types/react": "^17.0.8",