@teambit/deprecation 1.0.187 → 1.0.189

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,4 +1,4 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <testsuites tests="0" failures="0" errors="0" skipped="0">
3
- <testsuite name="teambit.component/deprecation@1.0.187" tests="0" failures="0" errors="0" skipped="0"/>
3
+ <testsuite name="teambit.component/deprecation@1.0.189" tests="0" failures="0" errors="0" skipped="0"/>
4
4
  </testsuites>
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["teambit.component/deprecation-preview"]=t():e["teambit.component/deprecation-preview"]=t()}(self,(()=>(()=>{"use strict";var e={31952:(e,t,o)=>{var n={id:"teambit.component/deprecation@1.0.187",homepage:"https://bit.cloud/teambit/component/deprecation",exported:!0};function r(){const e=i(o(41594));return r=function(){return e},e}function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Logo=void 0,r.__bit_component=n,i.__bit_component=n;const p=()=>r().default.createElement("div",{style:{height:"100%",display:"flex",justifyContent:"center"}},r().default.createElement("img",{style:{width:70},src:"https://static.bit.dev/extensions-icons/deprecation.svg"}));p.__bit_component=n,t.Logo=p},41594:e=>{e.exports=React}},t={};function o(n){var r=t[n];if(void 0!==r)return r.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,o),i.exports}o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return(()=>{o.r(n),o.d(n,{compositions:()=>u,compositions_metadata:()=>l,overview:()=>f});var e={};o.r(e),o.d(e,{default:()=>d});var t=o(31952);o(41594);const r=MdxJsReact,i=TeambitMdxUiMdxScopeContext;var p=["components"];function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},c.apply(this,arguments)}var a={},s="wrapper";function d(e){var t=e.components,o=function(e,t){if(null==e)return{};var o,n,r=function(e,t){if(null==e)return{};var o,n,r={},i=Object.keys(e);for(n=0;n<i.length;n++)o=i[n],t.indexOf(o)>=0||(r[o]=e[o]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)o=i[n],t.indexOf(o)>=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(r[o]=e[o])}return r}(e,p);return(0,r.mdx)(s,c({},a,o,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)(i.MDXScopeProvider,{components:{},mdxType:"MDXScopeProvider"}))}d.isMDXComponent=!0;const u=[t],f=[e],l={compositions:[{displayName:"Logo",identifier:"Logo"}]}})(),n})()));
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["teambit.component/deprecation-preview"]=t():e["teambit.component/deprecation-preview"]=t()}(self,(()=>(()=>{"use strict";var e={27178:(e,t,o)=>{var n={id:"teambit.component/deprecation@1.0.189",homepage:"https://bit.cloud/teambit/component/deprecation",exported:!0};function r(){const e=i(o(41594));return r=function(){return e},e}function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Logo=void 0,r.__bit_component=n,i.__bit_component=n;const p=()=>r().default.createElement("div",{style:{height:"100%",display:"flex",justifyContent:"center"}},r().default.createElement("img",{style:{width:70},src:"https://static.bit.dev/extensions-icons/deprecation.svg"}));p.__bit_component=n,t.Logo=p},41594:e=>{e.exports=React}},t={};function o(n){var r=t[n];if(void 0!==r)return r.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,o),i.exports}o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return(()=>{o.r(n),o.d(n,{compositions:()=>u,compositions_metadata:()=>l,overview:()=>f});var e={};o.r(e),o.d(e,{default:()=>d});var t=o(27178);o(41594);const r=MdxJsReact,i=TeambitMdxUiMdxScopeContext;var p=["components"];function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},c.apply(this,arguments)}var a={},s="wrapper";function d(e){var t=e.components,o=function(e,t){if(null==e)return{};var o,n,r=function(e,t){if(null==e)return{};var o,n,r={},i=Object.keys(e);for(n=0;n<i.length;n++)o=i[n],t.indexOf(o)>=0||(r[o]=e[o]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)o=i[n],t.indexOf(o)>=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(r[o]=e[o])}return r}(e,p);return(0,r.mdx)(s,c({},a,o,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)(i.MDXScopeProvider,{components:{},mdxType:"MDXScopeProvider"}))}d.isMDXComponent=!0;const u=[t],f=[e],l={compositions:[{displayName:"Logo",identifier:"Logo"}]}})(),n})()));
@@ -48,7 +48,11 @@
48
48
  "line": 36,
49
49
  "character": 30
50
50
  },
51
- "name": "ScopeMain"
51
+ "name": "ScopeMain",
52
+ "componentId": {
53
+ "scope": "teambit.scope",
54
+ "name": "scope"
55
+ }
52
56
  },
53
57
  "isOptional": false,
54
58
  "isSpread": false
@@ -68,7 +72,11 @@
68
72
  "line": 36,
69
73
  "character": 60
70
74
  },
71
- "name": "Workspace"
75
+ "name": "Workspace",
76
+ "componentId": {
77
+ "scope": "teambit.workspace",
78
+ "name": "workspace"
79
+ }
72
80
  },
73
81
  "isOptional": false,
74
82
  "isSpread": false
@@ -152,7 +160,11 @@
152
160
  "line": 40,
153
161
  "character": 39
154
162
  },
155
- "name": "Component"
163
+ "name": "Component",
164
+ "componentId": {
165
+ "scope": "teambit.component",
166
+ "name": "component"
167
+ }
156
168
  },
157
169
  "isOptional": false,
158
170
  "isSpread": false
@@ -249,7 +261,11 @@
249
261
  "line": 82,
250
262
  "character": 32
251
263
  },
252
- "name": "ComponentID"
264
+ "name": "ComponentID",
265
+ "componentId": {
266
+ "scope": "teambit.component",
267
+ "name": "component"
268
+ }
253
269
  },
254
270
  "isOptional": false,
255
271
  "isSpread": false
@@ -269,7 +285,11 @@
269
285
  "line": 82,
270
286
  "character": 53
271
287
  },
272
- "name": "ComponentID"
288
+ "name": "ComponentID",
289
+ "componentId": {
290
+ "scope": "teambit.component",
291
+ "name": "component"
292
+ }
273
293
  },
274
294
  "isOptional": true,
275
295
  "isSpread": false
@@ -344,7 +364,11 @@
344
364
  "line": 93,
345
365
  "character": 34
346
366
  },
347
- "name": "ComponentID"
367
+ "name": "ComponentID",
368
+ "componentId": {
369
+ "scope": "teambit.component",
370
+ "name": "component"
371
+ }
348
372
  },
349
373
  "isOptional": false,
350
374
  "isSpread": false
@@ -396,7 +420,11 @@
396
420
  "line": 104,
397
421
  "character": 5
398
422
  },
399
- "name": "GraphqlMain"
423
+ "name": "GraphqlMain",
424
+ "componentId": {
425
+ "scope": "teambit.harmony",
426
+ "name": "graphql"
427
+ }
400
428
  },
401
429
  {
402
430
  "__schema": "TypeRefSchema",
@@ -405,7 +433,11 @@
405
433
  "line": 105,
406
434
  "character": 5
407
435
  },
408
- "name": "ScopeMain"
436
+ "name": "ScopeMain",
437
+ "componentId": {
438
+ "scope": "teambit.scope",
439
+ "name": "scope"
440
+ }
409
441
  },
410
442
  {
411
443
  "__schema": "TypeRefSchema",
@@ -414,7 +446,11 @@
414
446
  "line": 106,
415
447
  "character": 5
416
448
  },
417
- "name": "ComponentMain"
449
+ "name": "ComponentMain",
450
+ "componentId": {
451
+ "scope": "teambit.component",
452
+ "name": "component"
453
+ }
418
454
  },
419
455
  {
420
456
  "__schema": "TypeRefSchema",
@@ -423,7 +459,11 @@
423
459
  "line": 107,
424
460
  "character": 5
425
461
  },
426
- "name": "Workspace"
462
+ "name": "Workspace",
463
+ "componentId": {
464
+ "scope": "teambit.workspace",
465
+ "name": "workspace"
466
+ }
427
467
  },
428
468
  {
429
469
  "__schema": "TypeRefSchema",
@@ -432,7 +472,11 @@
432
472
  "line": 108,
433
473
  "character": 5
434
474
  },
435
- "name": "CLIMain"
475
+ "name": "CLIMain",
476
+ "componentId": {
477
+ "scope": "teambit.harmony",
478
+ "name": "cli"
479
+ }
436
480
  }
437
481
  ]
438
482
  },
@@ -611,7 +655,12 @@
611
655
  "line": 28,
612
656
  "character": 11
613
657
  },
614
- "name": "ComponentIdObj"
658
+ "name": "ComponentIdObj",
659
+ "componentId": {
660
+ "scope": "teambit.component",
661
+ "name": "component-id",
662
+ "version": "1.2.0"
663
+ }
615
664
  },
616
665
  "isOptional": true
617
666
  },
@@ -865,7 +914,12 @@
865
914
  "line": 28,
866
915
  "character": 11
867
916
  },
868
- "name": "ComponentIdObj"
917
+ "name": "ComponentIdObj",
918
+ "componentId": {
919
+ "scope": "teambit.component",
920
+ "name": "component-id",
921
+ "version": "1.2.0"
922
+ }
869
923
  },
870
924
  "isOptional": true
871
925
  },
@@ -937,7 +991,11 @@
937
991
  "line": 36,
938
992
  "character": 30
939
993
  },
940
- "name": "ScopeMain"
994
+ "name": "ScopeMain",
995
+ "componentId": {
996
+ "scope": "teambit.scope",
997
+ "name": "scope"
998
+ }
941
999
  },
942
1000
  "isOptional": false,
943
1001
  "isSpread": false
@@ -957,7 +1015,11 @@
957
1015
  "line": 36,
958
1016
  "character": 60
959
1017
  },
960
- "name": "Workspace"
1018
+ "name": "Workspace",
1019
+ "componentId": {
1020
+ "scope": "teambit.workspace",
1021
+ "name": "workspace"
1022
+ }
961
1023
  },
962
1024
  "isOptional": false,
963
1025
  "isSpread": false
@@ -1041,7 +1103,11 @@
1041
1103
  "line": 40,
1042
1104
  "character": 39
1043
1105
  },
1044
- "name": "Component"
1106
+ "name": "Component",
1107
+ "componentId": {
1108
+ "scope": "teambit.component",
1109
+ "name": "component"
1110
+ }
1045
1111
  },
1046
1112
  "isOptional": false,
1047
1113
  "isSpread": false
@@ -1138,7 +1204,11 @@
1138
1204
  "line": 82,
1139
1205
  "character": 32
1140
1206
  },
1141
- "name": "ComponentID"
1207
+ "name": "ComponentID",
1208
+ "componentId": {
1209
+ "scope": "teambit.component",
1210
+ "name": "component"
1211
+ }
1142
1212
  },
1143
1213
  "isOptional": false,
1144
1214
  "isSpread": false
@@ -1158,7 +1228,11 @@
1158
1228
  "line": 82,
1159
1229
  "character": 53
1160
1230
  },
1161
- "name": "ComponentID"
1231
+ "name": "ComponentID",
1232
+ "componentId": {
1233
+ "scope": "teambit.component",
1234
+ "name": "component"
1235
+ }
1162
1236
  },
1163
1237
  "isOptional": true,
1164
1238
  "isSpread": false
@@ -1233,7 +1307,11 @@
1233
1307
  "line": 93,
1234
1308
  "character": 34
1235
1309
  },
1236
- "name": "ComponentID"
1310
+ "name": "ComponentID",
1311
+ "componentId": {
1312
+ "scope": "teambit.component",
1313
+ "name": "component"
1314
+ }
1237
1315
  },
1238
1316
  "isOptional": false,
1239
1317
  "isSpread": false
@@ -1285,7 +1363,11 @@
1285
1363
  "line": 104,
1286
1364
  "character": 5
1287
1365
  },
1288
- "name": "GraphqlMain"
1366
+ "name": "GraphqlMain",
1367
+ "componentId": {
1368
+ "scope": "teambit.harmony",
1369
+ "name": "graphql"
1370
+ }
1289
1371
  },
1290
1372
  {
1291
1373
  "__schema": "TypeRefSchema",
@@ -1294,7 +1376,11 @@
1294
1376
  "line": 105,
1295
1377
  "character": 5
1296
1378
  },
1297
- "name": "ScopeMain"
1379
+ "name": "ScopeMain",
1380
+ "componentId": {
1381
+ "scope": "teambit.scope",
1382
+ "name": "scope"
1383
+ }
1298
1384
  },
1299
1385
  {
1300
1386
  "__schema": "TypeRefSchema",
@@ -1303,7 +1389,11 @@
1303
1389
  "line": 106,
1304
1390
  "character": 5
1305
1391
  },
1306
- "name": "ComponentMain"
1392
+ "name": "ComponentMain",
1393
+ "componentId": {
1394
+ "scope": "teambit.component",
1395
+ "name": "component"
1396
+ }
1307
1397
  },
1308
1398
  {
1309
1399
  "__schema": "TypeRefSchema",
@@ -1312,7 +1402,11 @@
1312
1402
  "line": 107,
1313
1403
  "character": 5
1314
1404
  },
1315
- "name": "Workspace"
1405
+ "name": "Workspace",
1406
+ "componentId": {
1407
+ "scope": "teambit.workspace",
1408
+ "name": "workspace"
1409
+ }
1316
1410
  },
1317
1411
  {
1318
1412
  "__schema": "TypeRefSchema",
@@ -1321,7 +1415,11 @@
1321
1415
  "line": 108,
1322
1416
  "character": 5
1323
1417
  },
1324
- "name": "CLIMain"
1418
+ "name": "CLIMain",
1419
+ "componentId": {
1420
+ "scope": "teambit.harmony",
1421
+ "name": "cli"
1422
+ }
1325
1423
  }
1326
1424
  ]
1327
1425
  },
@@ -1412,7 +1510,7 @@
1412
1510
  "componentId": {
1413
1511
  "scope": "teambit.component",
1414
1512
  "name": "deprecation",
1415
- "version": "1.0.187"
1513
+ "version": "1.0.189"
1416
1514
  },
1417
1515
  "taggedModuleExports": []
1418
1516
  }
@@ -1 +1 @@
1
- {"version":3,"names":["_chalk","data","_interopRequireDefault","require","obj","__esModule","default","_defineProperty","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","String","r","e","Symbol","toPrimitive","call","TypeError","Number","DeprecateCmd","constructor","deprecation","workspace","name","description","report","id","newId","range","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 = [\n [\n '',\n 'new-id <string>',\n 'if replaced by another component, enter the new component id. alternatively use \"bit rename --deprecate\" to do this automatically',\n ],\n [\n '',\n 'range <string>',\n 'enter a Semver range to deprecate specific versions. see https://www.npmjs.com/package/semver#ranges for the range syntax',\n ],\n ] as CommandOptions;\n loader = true;\n remoteOp = true;\n helpUrl = 'reference/components/removing-components';\n\n constructor(private deprecation: DeprecationMain, private workspace: Workspace) {}\n\n async report([id]: [string], { newId, range }: { newId?: string; range?: string }): Promise<string> {\n const result = await this.deprecate(id, newId, range);\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, range?: 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, range);\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;AAA0B,SAAAC,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,SAAAG,gBAAAH,GAAA,EAAAI,GAAA,EAAAC,KAAA,IAAAD,GAAA,GAAAE,cAAA,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0C;EAE6B;EAEjF,MAAM0B,MAAMA,CAAC,CAACC,EAAE,CAAW,EAAE;IAAEC,KAAK;IAAEC;EAA0C,CAAC,EAAmB;IAClG,MAAMC,MAAM,GAAG,MAAM,IAAI,CAACC,SAAS,CAACJ,EAAE,EAAEC,KAAK,EAAEC,KAAK,CAAC;IACrD,IAAIC,MAAM,EAAE;MACV,OAAOE,gBAAK,CAACC,KAAK,CAAE,kBAAiBN,EAAG,oCAAmC,CAAC;IAC9E;IACA,OAAOK,gBAAK,CAACE,IAAI,CAAE,kBAAiBP,EAAG,oDAAmD,CAAC;EAC7F;EAEA,MAAcI,SAASA,CAACJ,EAAU,EAAEC,KAAc,EAAEC,KAAc,EAAoB;IACpF,MAAMM,WAAW,GAAG,MAAM,IAAI,CAACZ,SAAS,CAACa,kBAAkB,CAACT,EAAE,CAAC;IAC/D,MAAMU,cAAc,GAAGT,KAAK,GAAG,MAAM,IAAI,CAACL,SAAS,CAACa,kBAAkB,CAACR,KAAK,CAAC,GAAGU,SAAS;IACzF,OAAO,IAAI,CAAChB,WAAW,CAACS,SAAS,CAACI,WAAW,EAAEE,cAAc,EAAER,KAAK,CAAC;EACvE;AACF;AAACU,OAAA,CAAAnB,YAAA,GAAAA,YAAA"}
1
+ {"version":3,"names":["_chalk","data","_interopRequireDefault","require","obj","__esModule","default","_defineProperty","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","String","r","e","Symbol","toPrimitive","call","TypeError","Number","DeprecateCmd","constructor","deprecation","workspace","name","description","report","id","newId","range","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 = [\n [\n '',\n 'new-id <string>',\n 'if replaced by another component, enter the new component id. alternatively use \"bit rename --deprecate\" to do this automatically',\n ],\n [\n '',\n 'range <string>',\n 'enter a Semver range to deprecate specific versions. see https://www.npmjs.com/package/semver#ranges for the range syntax',\n ],\n ] as CommandOptions;\n loader = true;\n remoteOp = true;\n helpUrl = 'reference/components/removing-components';\n\n constructor(private deprecation: DeprecationMain, private workspace: Workspace) {}\n\n async report([id]: [string], { newId, range }: { newId?: string; range?: string }): Promise<string> {\n const result = await this.deprecate(id, newId, range);\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, range?: 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, range);\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;AAA0B,SAAAC,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,SAAAG,gBAAAH,GAAA,EAAAI,GAAA,EAAAC,KAAA,IAAAD,GAAA,GAAAE,cAAA,CAAAF,GAAA,OAAAA,GAAA,IAAAJ,GAAA,IAAAO,MAAA,CAAAC,cAAA,CAAAR,GAAA,EAAAI,GAAA,IAAAC,KAAA,EAAAA,KAAA,EAAAI,UAAA,QAAAC,YAAA,QAAAC,QAAA,oBAAAX,GAAA,CAAAI,GAAA,IAAAC,KAAA,WAAAL,GAAA;AAAA,SAAAM,eAAAM,CAAA,QAAAC,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C,KAAK,CAAE,kBAAiBN,EAAG,oCAAmC,CAAC;IAC9E;IACA,OAAOK,gBAAK,CAACE,IAAI,CAAE,kBAAiBP,EAAG,oDAAmD,CAAC;EAC7F;EAEA,MAAcI,SAASA,CAACJ,EAAU,EAAEC,KAAc,EAAEC,KAAc,EAAoB;IACpF,MAAMM,WAAW,GAAG,MAAM,IAAI,CAACZ,SAAS,CAACa,kBAAkB,CAACT,EAAE,CAAC;IAC/D,MAAMU,cAAc,GAAGT,KAAK,GAAG,MAAM,IAAI,CAACL,SAAS,CAACa,kBAAkB,CAACR,KAAK,CAAC,GAAGU,SAAS;IACzF,OAAO,IAAI,CAAChB,WAAW,CAACS,SAAS,CAACI,WAAW,EAAEE,cAAc,EAAER,KAAK,CAAC;EACvE;AACF;AAACU,OAAA,CAAAnB,YAAA,GAAAA,YAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_harmony","data","require","DeprecationAspect","exports","Aspect","create","id","dependencies","defaultConfig","_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,GAAAC,OAAA,CAAAD,iBAAA,GAAGE,iBAAM,CAACC,MAAM,CAAC;EAC7CC,EAAE,EAAE,+BAA+B;EACnCC,YAAY,EAAE,EAAE;EAChBC,aAAa,EAAE,CAAC;AAClB,CAAC,CAAC;AAAC,IAAAC,QAAA,GAAAN,OAAA,CAAAO,OAAA,GAEYR,iBAAiB"}
1
+ {"version":3,"names":["_harmony","data","require","DeprecationAspect","exports","Aspect","create","id","dependencies","defaultConfig","_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,GAAAC,OAAA,CAAAD,iBAAA,GAAGE,iBAAM,CAACC,MAAM,CAAC;EAC7CC,EAAE,EAAE,+BAA+B;EACnCC,YAAY,EAAE,EAAE;EAChBC,aAAa,EAAE,CAAC;AAClB,CAAC,CAAC;AAAC,IAAAC,QAAA,GAAAN,OAAA,CAAAO,OAAA,GAEYR,iBAAiB","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_react","data","_interopRequireDefault","require","obj","__esModule","default","Logo","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;AAA0B,SAAAC,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAEnB,MAAMG,IAAI,GAAGA,CAAA,kBAClBP,MAAA,GAAAM,OAAA,CAAAE,aAAA;EAAKC,KAAK,EAAE;IAAEC,MAAM,EAAE,MAAM;IAAEC,OAAO,EAAE,MAAM;IAAEC,cAAc,EAAE;EAAS;AAAE,gBACxEZ,MAAA,GAAAM,OAAA,CAAAE,aAAA;EAAKC,KAAK,EAAE;IAAEI,KAAK,EAAE;EAAG,CAAE;EAACC,GAAG,EAAC;AAAyD,CAAE,CACvF,CACN;AAACC,OAAA,CAAAR,IAAA,GAAAA,IAAA"}
1
+ {"version":3,"names":["_react","data","_interopRequireDefault","require","obj","__esModule","default","Logo","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;AAA0B,SAAAC,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAEnB,MAAMG,IAAI,GAAGA,CAAA,kBAClBP,MAAA,GAAAM,OAAA,CAAAE,aAAA;EAAKC,KAAK,EAAE;IAAEC,MAAM,EAAE,MAAM;IAAEC,OAAO,EAAE,MAAM;IAAEC,cAAc,EAAE;EAAS;AAAE,gBACxEZ,MAAA,GAAAM,OAAA,CAAAE,aAAA;EAAKC,KAAK,EAAE;IAAEI,KAAK,EAAE;EAAG,CAAE;EAACC,GAAG,EAAC;AAAyD,CAAE,CACvF,CACN;AAACC,OAAA,CAAAR,IAAA,GAAAA,IAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["DeprecationFragment","constructor","deprecation","_defineProperty","renderRow","component","deprecationInfo","getDeprecationInfo","isDeprecate","toString","newId","range","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 const range = deprecationInfo.range ? ` (range: ${deprecationInfo.range})` : '';\n return {\n title: this.title,\n content: isDeprecate + newId + range,\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;IAAAC,eAAA,gBAExC,YAAY;IAAAA,eAAA,iBAoBX,CAAC;EAtByC;EAInD,MAAMC,SAASA,CAACC,SAAoB,EAAE;IACpC,MAAMC,eAAe,GAAG,MAAM,IAAI,CAACJ,WAAW,CAACK,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,MAAMC,KAAK,GAAGL,eAAe,CAACK,KAAK,GAAI,YAAWL,eAAe,CAACK,KAAM,GAAE,GAAG,EAAE;IAC/E,OAAO;MACLC,KAAK,EAAE,IAAI,CAACA,KAAK;MACjBC,OAAO,EAAEL,WAAW,GAAGE,KAAK,GAAGC;IACjC,CAAC;EACH;EAEA,MAAMG,IAAIA,CAACT,SAAoB,EAAE;IAC/B,OAAO;MACLO,KAAK,EAAE,IAAI,CAACA,KAAK;MACjBE,IAAI,EAAE,MAAM,IAAI,CAACZ,WAAW,CAACK,kBAAkB,CAACF,SAAS;IAC3D,CAAC;EACH;AAGF;AAACU,OAAA,CAAAf,mBAAA,GAAAA,mBAAA"}
1
+ {"version":3,"names":["DeprecationFragment","constructor","deprecation","_defineProperty","renderRow","component","deprecationInfo","getDeprecationInfo","isDeprecate","toString","newId","range","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 const range = deprecationInfo.range ? ` (range: ${deprecationInfo.range})` : '';\n return {\n title: this.title,\n content: isDeprecate + newId + range,\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;IAAAC,eAAA,gBAExC,YAAY;IAAAA,eAAA,iBAoBX,CAAC;EAtByC;EAInD,MAAMC,SAASA,CAACC,SAAoB,EAAE;IACpC,MAAMC,eAAe,GAAG,MAAM,IAAI,CAACJ,WAAW,CAACK,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,MAAMC,KAAK,GAAGL,eAAe,CAACK,KAAK,GAAI,YAAWL,eAAe,CAACK,KAAM,GAAE,GAAG,EAAE;IAC/E,OAAO;MACLC,KAAK,EAAE,IAAI,CAACA,KAAK;MACjBC,OAAO,EAAEL,WAAW,GAAGE,KAAK,GAAGC;IACjC,CAAC;EACH;EAEA,MAAMG,IAAIA,CAACT,SAAoB,EAAE;IAC/B,OAAO;MACLO,KAAK,EAAE,IAAI,CAACA,KAAK;MACjBE,IAAI,EAAE,MAAM,IAAI,CAACZ,WAAW,CAACK,kBAAkB,CAACF,SAAS;IAC3D,CAAC;EACH;AAGF;AAACU,OAAA,CAAAf,mBAAA,GAAAA,mBAAA","ignoreList":[]}
@@ -5,16 +5,15 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.deprecationSchema = deprecationSchema;
7
7
  function _graphqlTag() {
8
- const data = _interopRequireDefault(require("graphql-tag"));
8
+ const data = require("graphql-tag");
9
9
  _graphqlTag = function () {
10
10
  return data;
11
11
  };
12
12
  return data;
13
13
  }
14
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
14
  function deprecationSchema(deprecation) {
16
15
  return {
17
- typeDefs: (0, _graphqlTag().default)`
16
+ typeDefs: (0, _graphqlTag().gql)`
18
17
  extend type Component {
19
18
  deprecation: DeprecationInfo
20
19
  }
@@ -1 +1 @@
1
- {"version":3,"names":["_graphqlTag","data","_interopRequireDefault","require","obj","__esModule","default","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;AAA8B,SAAAC,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAIvB,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
+ {"version":3,"names":["_graphqlTag","data","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,OAAA;EAAAF,WAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAIO,SAASE,iBAAiBA,CAACC,WAA4B,EAAU;EACtE,OAAO;IACLC,QAAQ,EAAE,IAAAC,iBAAG,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","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_cli","data","require","_semver","_interopRequireDefault","_component","_scope","_workspace","_graphql","_deprecation","_deprecation2","_deprecation3","_deprecateCmd","_undeprecateCmd","obj","__esModule","default","_defineProperty","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","String","r","e","Symbol","toPrimitive","call","TypeError","Number","DeprecationMain","constructor","scope","workspace","getDeprecationInfo","component","headComponent","getHeadComponent","config","extensions","findExtension","DeprecationAspect","id","deprecatedBackwardCompatibility","state","_consumer","deprecated","isDeprecate","Boolean","deprecate","currentTag","getTag","isDeprecateByRange","range","semver","satisfies","version","newId","ComponentID","fromObject","toString","undefined","head","hash","headTag","headComp","get","changeVersion","Error","componentId","results","bitMap","addComponentConfig","toObject","write","unDeprecate","provider","graphql","componentAspect","cli","deprecation","register","DeprecateCmd","UndeprecateCmd","registerShowFragments","DeprecationFragment","deprecationSchema","exports","MainRuntime","GraphqlAspect","ScopeAspect","ComponentAspect","WorkspaceAspect","CLIAspect","addRuntime"],"sources":["deprecation.main.runtime.ts"],"sourcesContent":["import { CLIAspect, CLIMain, MainRuntime } from '@teambit/cli';\nimport semver from 'semver';\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 range?: string;\n};\n\nexport type DeprecationMetadata = {\n /**\n * whether the head is deprecated\n */\n deprecate?: boolean;\n /**\n * the new id to use instead of the current one\n */\n newId?: ComponentIdObj;\n /**\n * Semver range to deprecate previous versions\n */\n range?: string;\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 headComponent = await this.getHeadComponent(component);\n\n const data = headComponent.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 currentTag = component.getTag();\n const isDeprecateByRange = Boolean(data?.range && currentTag && semver.satisfies(currentTag.version, data.range));\n const newId = data?.newId ? ComponentID.fromObject(data?.newId).toString() : undefined;\n return {\n isDeprecate: isDeprecate || isDeprecateByRange,\n newId,\n range: data?.range,\n };\n }\n\n private async getHeadComponent(component: Component): Promise<Component> {\n if (\n component.id.version &&\n component.head &&\n component.id.version !== component.head?.hash &&\n component.id.version !== component.headTag?.version.version\n ) {\n const headComp = this.workspace // if workspace exits, prefer using the workspace as it may be modified\n ? await this.workspace.get(component.id.changeVersion(undefined))\n : await this.scope.get(component.id.changeVersion(component.head.hash));\n if (!headComp) throw new Error(`unable to get the head of ${component.id.toString()}`);\n return headComp;\n }\n return component;\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, range?: string): Promise<boolean> {\n const results = this.workspace.bitMap.addComponentConfig(componentId, DeprecationAspect.id, {\n deprecate: !range,\n newId: newId?.toObject(),\n range,\n });\n await this.workspace.bitMap.write(`deprecate ${componentId.toString()}`);\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(`undeprecate ${componentId.toString()}`);\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,QAAA;EAAA,MAAAF,IAAA,GAAAG,sBAAA,CAAAF,OAAA;EAAAC,OAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,WAAA;EAAA,MAAAJ,IAAA,GAAAC,OAAA;EAAAG,UAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,OAAA;EAAA,MAAAL,IAAA,GAAAC,OAAA;EAAAI,MAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,WAAA;EAAA,MAAAN,IAAA,GAAAC,OAAA;EAAAK,UAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAO,SAAA;EAAA,MAAAP,IAAA,GAAAC,OAAA;EAAAM,QAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAQ,aAAA;EAAA,MAAAR,IAAA,GAAAC,OAAA;EAAAO,YAAA,YAAA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;EAEA,MAAMK,WAAWA,CAACN,WAAwB,EAAE;IAC1C,MAAMC,OAAO,GAAG,IAAI,CAACrC,SAAS,CAACsC,MAAM,CAACC,kBAAkB,CAACH,WAAW,EAAE5B,gCAAiB,CAACC,EAAE,EAAE;MAC1FO,SAAS,EAAE,KAAK;MAChBQ,KAAK,EAAE;IACT,CAAC,CAAC;IACF,MAAM,IAAI,CAACxB,SAAS,CAACsC,MAAM,CAACG,KAAK,CAAE,eAAcL,WAAW,CAACT,QAAQ,CAAC,CAAE,EAAC,CAAC;IAE1E,OAAOU,OAAO;EAChB;EAEA,aAAaM,QAAQA,CAAC,CAACC,OAAO,EAAE7C,KAAK,EAAE8C,eAAe,EAAE7C,SAAS,EAAE8C,GAAG,CAMrE,EAAE;IACD,MAAMC,WAAW,GAAG,IAAIlD,eAAe,CAACE,KAAK,EAAEC,SAAS,CAAC;IACzD8C,GAAG,CAACE,QAAQ,CAAC,KAAIC,4BAAY,EAACF,WAAW,EAAE/C,SAAS,CAAC,EAAE,KAAIkD,gCAAc,EAACH,WAAW,EAAE/C,SAAS,CAAC,CAAC;IAClG6C,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,CAAAzD,eAAA,GAAAA,eAAA;AAAApB,eAAA,CAlFYoB,eAAe,aAET0D,kBAAW;AAAA9E,eAAA,CAFjBoB,eAAe,kBAGJ,CAAC2D,wBAAa,EAAEC,oBAAW,EAAEC,4BAAe,EAAEC,4BAAe,EAAEC,gBAAS,CAAC;AAiFjGpD,gCAAiB,CAACqD,UAAU,CAAChE,eAAe,CAAC"}
1
+ {"version":3,"names":["_cli","data","require","_semver","_interopRequireDefault","_component","_scope","_workspace","_graphql","_deprecation","_deprecation2","_deprecation3","_deprecateCmd","_undeprecateCmd","obj","__esModule","default","_defineProperty","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","String","r","e","Symbol","toPrimitive","call","TypeError","Number","DeprecationMain","constructor","scope","workspace","getDeprecationInfo","component","headComponent","getHeadComponent","config","extensions","findExtension","DeprecationAspect","id","deprecatedBackwardCompatibility","state","_consumer","deprecated","isDeprecate","Boolean","deprecate","currentTag","getTag","isDeprecateByRange","range","semver","satisfies","version","newId","ComponentID","fromObject","toString","undefined","head","hash","headTag","headComp","get","changeVersion","Error","componentId","results","bitMap","addComponentConfig","toObject","write","unDeprecate","provider","graphql","componentAspect","cli","deprecation","register","DeprecateCmd","UndeprecateCmd","registerShowFragments","DeprecationFragment","deprecationSchema","exports","MainRuntime","GraphqlAspect","ScopeAspect","ComponentAspect","WorkspaceAspect","CLIAspect","addRuntime"],"sources":["deprecation.main.runtime.ts"],"sourcesContent":["import { CLIAspect, CLIMain, MainRuntime } from '@teambit/cli';\nimport semver from 'semver';\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 range?: string;\n};\n\nexport type DeprecationMetadata = {\n /**\n * whether the head is deprecated\n */\n deprecate?: boolean;\n /**\n * the new id to use instead of the current one\n */\n newId?: ComponentIdObj;\n /**\n * Semver range to deprecate previous versions\n */\n range?: string;\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 headComponent = await this.getHeadComponent(component);\n\n const data = headComponent.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 currentTag = component.getTag();\n const isDeprecateByRange = Boolean(data?.range && currentTag && semver.satisfies(currentTag.version, data.range));\n const newId = data?.newId ? ComponentID.fromObject(data?.newId).toString() : undefined;\n return {\n isDeprecate: isDeprecate || isDeprecateByRange,\n newId,\n range: data?.range,\n };\n }\n\n private async getHeadComponent(component: Component): Promise<Component> {\n if (\n component.id.version &&\n component.head &&\n component.id.version !== component.head?.hash &&\n component.id.version !== component.headTag?.version.version\n ) {\n const headComp = this.workspace // if workspace exits, prefer using the workspace as it may be modified\n ? await this.workspace.get(component.id.changeVersion(undefined))\n : await this.scope.get(component.id.changeVersion(component.head.hash));\n if (!headComp) throw new Error(`unable to get the head of ${component.id.toString()}`);\n return headComp;\n }\n return component;\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, range?: string): Promise<boolean> {\n const results = this.workspace.bitMap.addComponentConfig(componentId, DeprecationAspect.id, {\n deprecate: !range,\n newId: newId?.toObject(),\n range,\n });\n await this.workspace.bitMap.write(`deprecate ${componentId.toString()}`);\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(`undeprecate ${componentId.toString()}`);\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,QAAA;EAAA,MAAAF,IAAA,GAAAG,sBAAA,CAAAF,OAAA;EAAAC,OAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,WAAA;EAAA,MAAAJ,IAAA,GAAAC,OAAA;EAAAG,UAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,OAAA;EAAA,MAAAL,IAAA,GAAAC,OAAA;EAAAI,MAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,WAAA;EAAA,MAAAN,IAAA,GAAAC,OAAA;EAAAK,UAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAO,SAAA;EAAA,MAAAP,IAAA,GAAAC,OAAA;EAAAM,QAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAQ,aAAA;EAAA,MAAAR,IAAA,GAAAC,OAAA;EAAAO,YAAA,YAAAA,CAAA;IAAA,OAAAR,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAS,cAAA;EAAA,MAAAT,IAAA,GAAAC,OAAA;E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kB,CAACH,WAAW,EAAE5B,gCAAiB,CAACC,EAAE,EAAE;MAC1FO,SAAS,EAAE,KAAK;MAChBQ,KAAK,EAAE;IACT,CAAC,CAAC;IACF,MAAM,IAAI,CAACxB,SAAS,CAACsC,MAAM,CAACG,KAAK,CAAE,eAAcL,WAAW,CAACT,QAAQ,CAAC,CAAE,EAAC,CAAC;IAE1E,OAAOU,OAAO;EAChB;EAEA,aAAaM,QAAQA,CAAC,CAACC,OAAO,EAAE7C,KAAK,EAAE8C,eAAe,EAAE7C,SAAS,EAAE8C,GAAG,CAMrE,EAAE;IACD,MAAMC,WAAW,GAAG,IAAIlD,eAAe,CAACE,KAAK,EAAEC,SAAS,CAAC;IACzD8C,GAAG,CAACE,QAAQ,CAAC,KAAIC,4BAAY,EAACF,WAAW,EAAE/C,SAAS,CAAC,EAAE,KAAIkD,gCAAc,EAACH,WAAW,EAAE/C,SAAS,CAAC,CAAC;IAClG6C,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,CAAAzD,eAAA,GAAAA,eAAA;AAAApB,eAAA,CAlFYoB,eAAe,aAET0D,kBAAW;AAAA9E,eAAA,CAFjBoB,eAAe,kBAGJ,CAAC2D,wBAAa,EAAEC,oBAAW,EAAEC,4BAAe,EAAEC,4BAAe,EAAEC,gBAAS,CAAC;AAiFjGpD,gCAAiB,CAACqD,UAAU,CAAChE,eAAe,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_react","data","_interopRequireDefault","require","_ui","_docs","_componentUi","_deprecation","obj","__esModule","default","_defineProperty","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","String","r","e","Symbol","toPrimitive","call","TypeError","Number","DeprecationUIRuntime","provider","docsUI","registerTitleBadge","component","Badge","legacyComponentModel","createElement","ComponentDeprecated","deprecation","weight","exports","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,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,IAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,GAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAI,MAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,KAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,aAAA;EAAA,MAAAL,IAAA,GAAAE,OAAA;EAAAG,YAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,aAAA;EAAA,MAAAN,IAAA,GAAAE,OAAA;EAAAI,YAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AA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AA,GAAAA,oBAAA;AAAApB,eAAA,CAbYoB,oBAAoB,kBACT,CAACY,kBAAU,CAAC;AAAAhC,eAAA,CADvBoB,oBAAoB,aAGda,eAAS;AAY5BC,gCAAiB,CAACC,UAAU,CAACf,oBAAoB,CAAC"}
1
+ {"version":3,"names":["_react","data","_interopRequireDefault","require","_ui","_docs","_componentUi","_deprecation","obj","__esModule","default","_defineProperty","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","String","r","e","Symbol","toPrimitive","call","TypeError","Number","DeprecationUIRuntime","provider","docsUI","registerTitleBadge","component","Badge","legacyComponentModel","createElement","ComponentDeprecated","deprecation","weight","exports","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,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,IAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,GAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAI,MAAA;EAAA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,aAAaC,QAAQA,CAAC,CAACC,MAAM,CAAW,EAAE;IACxCA,MAAM,CAACC,kBAAkB,CAAC;MACxBC,SAAS,EAAE,SAASC,KAAKA,CAAC;QAAEC;MAA+D,CAAC,EAAE;QAC5F,oBAAOrC,MAAA,GAAAU,OAAA,CAAA4B,aAAA,CAAChC,YAAA,GAAAiC,mBAAmB;UAACC,WAAW,EAAEH,oBAAoB,CAACG;QAAY,CAAE,CAAC;MAC/E,CAAC;MACDC,MAAM,EAAE;IACV,CAAC,CAAC;EACJ;AACF;AAACC,OAAA,CAAAX,oBAAA,GAAAA,oBAAA;AAAApB,eAAA,CAbYoB,oBAAoB,kBACT,CAACY,kBAAU,CAAC;AAAAhC,eAAA,CADvBoB,oBAAoB,aAGda,eAAS;AAY5BC,gCAAiB,CAACC,UAAU,CAACf,oBAAoB,CAAC","ignoreList":[]}
package/dist/index.js.map CHANGED
@@ -1 +1 @@
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
+ {"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","ignoreList":[]}
@@ -0,0 +1,7 @@
1
+ import * as compositions_0 from '/Users/giladshoham/Library/Caches/Bit/capsules/root/b5ea46ec36fa42b9dbedfc12ecb7bb63e03fcfe6/teambit.component_deprecation@1.0.189/dist/deprecation.composition.js';
2
+ import * as overview_0 from '/Users/giladshoham/Library/Caches/Bit/capsules/root/b5ea46ec36fa42b9dbedfc12ecb7bb63e03fcfe6/teambit.component_deprecation@1.0.189/dist/deprecation.docs.mdx';
3
+
4
+ export const compositions = [compositions_0];
5
+ export const overview = [overview_0];
6
+
7
+ export const compositions_metadata = {"compositions":[{"displayName":"Logo","identifier":"Logo"}]};
@@ -1 +1 @@
1
- {"version":3,"names":["_chalk","data","_interopRequireDefault","require","obj","__esModule","default","_defineProperty","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","String","r","e","Symbol","toPrimitive","call","TypeError","Number","UndeprecateCmd","constructor","deprecation","workspace","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 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 not currently deprecated. 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,MAA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AAI;IAAAA,eAAA,mBACT,IAAI;EAEkE;EAEjF,MAAMwB,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,0DAAyD,CAAC;EACnG;EAEA,MAAcE,WAAWA,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;AAACG,OAAA,CAAAd,cAAA,GAAAA,cAAA"}
1
+ {"version":3,"names":["_chalk","data","_interopRequireDefault","require","obj","__esModule","default","_defineProperty","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","String","r","e","Symbol","toPrimitive","call","TypeError","Number","UndeprecateCmd","constructor","deprecation","workspace","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 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 not currently deprecated. 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;AAA0B,SAAAC,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,SAAAG,gBAAAH,GAAA,EAAAI,GAAA,EAAAC,KAAA,IAAAD,GAAA,GAAAE,cAAA,CAAAF,GAAA,OAAAA,GAAA,IAAAJ,GAAA,IAAAO,MAAA,CAAAC,cAAA,CAAAR,GAAA,EAAAI,GAAA,IAAAC,KAAA,EAAAA,KAAA,EAAAI,UAAA,QAAAC,YAAA,QAAAC,QAAA,oBAAAX,GAAA,CAAAI,GAAA,IAAAC,KAAA,WAAAL,GAAA;AAAA,SAAAM,eAAAM,CAAA,QAAAC,CAAA,GAAAC,YAAA,CAAAF,CAAA,uCAAAC,CAAA,GAAAA,CAAA,GAAAE,MAAA,CAAAF,CAAA;AAAA,SAAAC,aAAAF,CAAA,EAAAI,CAAA,2BAAAJ,CAAA,KAAAA,CAAA,SAAAA,CAAA,MAAAK,CAAA,GAAAL,CAAA,CAAAM,MAAA,CAAAC,WAAA,kBAAAF,CAAA,QAAAJ,CAAA,GAAAI,CAAA,CAAAG,IAAA,CAAAR,CAAA,EAAAI,CAAA,uCAAAH,CAAA,SAAAA,CAAA,YAAAQ,SAAA,yEAAAL,CAAA,GAAAD,MAAA,GAAAO,MAAA,EAAAV,CAAA;AAKnB,MAAMW,cAAc,CAAoB;EAU7CC,WAAWA,CAASC,WAA4B,EAAUC,SAAoB,EAAE;IAAA,KAA5DD,WAA4B,GAA5BA,WAA4B;IAAA,KAAUC,SAAoB,GAApBA,SAAoB;IAAAvB,eAAA,eATvE,kBAAkB;IAAAA,eAAA,gBACjB,aAAa;IAAAA,eAAA,sBACP,mDAAmD;IAAAA,eAAA,gBACzD,EAAE;IAAAA,eAAA,kBACA,EAAE;IAAAA,eAAA,iBACH,IAAI;IAAAA,eAAA,wBACG,IAAI;IAAAA,eAAA,mBACT,IAAI;EAEkE;EAEjF,MAAMwB,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,0DAAyD,CAAC;EACnG;EAEA,MAAcE,WAAWA,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;AAACG,OAAA,CAAAd,cAAA,GAAAA,cAAA","ignoreList":[]}
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/deprecation",
3
- "version": "1.0.187",
3
+ "version": "1.0.189",
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": "1.0.187"
9
+ "version": "1.0.189"
10
10
  },
11
11
  "dependencies": {
12
12
  "chalk": "2.4.2",
@@ -15,19 +15,19 @@
15
15
  "@teambit/harmony": "0.4.6",
16
16
  "@teambit/component-id": "1.2.0",
17
17
  "@teambit/component.ui.component-deprecated": "0.0.39",
18
- "@teambit/cli": "0.0.855",
19
- "@teambit/workspace": "1.0.187",
20
- "@teambit/component": "1.0.187",
21
- "@teambit/graphql": "1.0.187",
22
- "@teambit/scope": "1.0.187",
23
- "@teambit/docs": "1.0.187",
24
- "@teambit/ui": "1.0.187"
18
+ "@teambit/cli": "0.0.856",
19
+ "@teambit/workspace": "1.0.189",
20
+ "@teambit/component": "1.0.189",
21
+ "@teambit/graphql": "1.0.189",
22
+ "@teambit/scope": "1.0.189",
23
+ "@teambit/docs": "1.0.189",
24
+ "@teambit/ui": "1.0.189"
25
25
  },
26
26
  "devDependencies": {
27
27
  "@types/semver": "7.3.4",
28
28
  "@types/mocha": "9.1.0",
29
29
  "chai": "4.3.0",
30
- "@teambit/harmony.envs.core-aspect-env": "0.0.25"
30
+ "@teambit/harmony.envs.core-aspect-env": "0.0.27"
31
31
  },
32
32
  "peerDependencies": {
33
33
  "react": "^17.0.0 || ^18.0.0",
@@ -1,7 +0,0 @@
1
- import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_deprecation@1.0.187/dist/deprecation.composition.js';
2
- import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_deprecation@1.0.187/dist/deprecation.docs.mdx';
3
-
4
- export const compositions = [compositions_0];
5
- export const overview = [overview_0];
6
-
7
- export const compositions_metadata = {"compositions":[{"displayName":"Logo","identifier":"Logo"}]};