@teambit/deprecation 0.0.1158 → 0.0.1160
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/deprecate-cmd.js +15 -21
- package/dist/deprecate-cmd.js.map +1 -1
- package/dist/deprecation.composition.js +1 -1
- package/dist/deprecation.composition.js.map +1 -1
- package/dist/deprecation.fragment.js +5 -11
- package/dist/deprecation.fragment.js.map +1 -1
- package/dist/deprecation.graphql.js +1 -1
- package/dist/deprecation.graphql.js.map +1 -1
- package/dist/deprecation.main.runtime.js +6 -12
- package/dist/deprecation.main.runtime.js.map +1 -1
- package/dist/deprecation.ui.runtime.js +6 -12
- package/dist/deprecation.ui.runtime.js.map +1 -1
- package/dist/{preview-1694575035715.js → preview-1694661423555.js} +2 -2
- package/dist/undeprecate-cmd.js +13 -19
- package/dist/undeprecate-cmd.js.map +1 -1
- package/package.json +11 -13
package/dist/deprecate-cmd.js
CHANGED
|
@@ -1,19 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
require("core-js/modules/es.array.iterator.js");
|
|
5
|
-
require("core-js/modules/es.promise.js");
|
|
6
3
|
Object.defineProperty(exports, "__esModule", {
|
|
7
4
|
value: true
|
|
8
5
|
});
|
|
9
6
|
exports.DeprecateCmd = void 0;
|
|
10
|
-
function _defineProperty2() {
|
|
11
|
-
const data = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
12
|
-
_defineProperty2 = function () {
|
|
13
|
-
return data;
|
|
14
|
-
};
|
|
15
|
-
return data;
|
|
16
|
-
}
|
|
17
7
|
function _chalk() {
|
|
18
8
|
const data = _interopRequireDefault(require("chalk"));
|
|
19
9
|
_chalk = function () {
|
|
@@ -21,24 +11,28 @@ function _chalk() {
|
|
|
21
11
|
};
|
|
22
12
|
return data;
|
|
23
13
|
}
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
16
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
17
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
24
18
|
class DeprecateCmd {
|
|
25
19
|
constructor(deprecation, workspace) {
|
|
26
20
|
this.deprecation = deprecation;
|
|
27
21
|
this.workspace = workspace;
|
|
28
|
-
(
|
|
29
|
-
(
|
|
22
|
+
_defineProperty(this, "name", 'deprecate <component-name>');
|
|
23
|
+
_defineProperty(this, "arguments", [{
|
|
30
24
|
name: 'component-name',
|
|
31
25
|
description: 'component name or component id'
|
|
32
26
|
}]);
|
|
33
|
-
(
|
|
34
|
-
(
|
|
35
|
-
(
|
|
36
|
-
(
|
|
37
|
-
(
|
|
38
|
-
(
|
|
39
|
-
(
|
|
40
|
-
(
|
|
41
|
-
(
|
|
27
|
+
_defineProperty(this, "description", 'deprecate a component');
|
|
28
|
+
_defineProperty(this, "group", 'collaborate');
|
|
29
|
+
_defineProperty(this, "skipWorkspace", true);
|
|
30
|
+
_defineProperty(this, "alias", 'd');
|
|
31
|
+
_defineProperty(this, "options", [['', 'new-id <string>', 'if replaced by another component, enter the new component id. alternatively use "bit rename" to do this automatically']]);
|
|
32
|
+
_defineProperty(this, "loader", true);
|
|
33
|
+
_defineProperty(this, "migration", true);
|
|
34
|
+
_defineProperty(this, "remoteOp", true);
|
|
35
|
+
_defineProperty(this, "helpUrl", 'reference/components/removing-components');
|
|
42
36
|
}
|
|
43
37
|
async report([id], {
|
|
44
38
|
newId
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_chalk","data","_interopRequireDefault","require","
|
|
1
|
+
{"version":3,"names":["_chalk","data","_interopRequireDefault","require","obj","__esModule","default","_defineProperty","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","arg","_toPrimitive","String","input","hint","prim","Symbol","toPrimitive","undefined","res","call","TypeError","Number","DeprecateCmd","constructor","deprecation","workspace","name","description","report","id","newId","result","deprecate","chalk","green","bold","componentId","resolveComponentId","newComponentId","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\" to do this automatically',\n ],\n ] as CommandOptions;\n loader = true;\n migration = 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 }: { 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;E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;IAAAA,eAAA,gBACZ,GAAG;IAAAA,eAAA,kBACD,CACR,CACE,EAAE,EACF,iBAAiB,EACjB,uHAAuH,CACxH,CACF;IAAAA,eAAA,iBACQ,IAAI;IAAAA,eAAA,oBACD,IAAI;IAAAA,eAAA,mBACL,IAAI;IAAAA,eAAA,kBACL,0CAA0C;EAE6B;EAEjF,MAAM4B,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,CAACX,SAAS,CAACY,kBAAkB,CAACR,EAAE,CAAC;IAC/D,MAAMS,cAAc,GAAGR,KAAK,GAAG,MAAM,IAAI,CAACL,SAAS,CAACY,kBAAkB,CAACP,KAAK,CAAC,GAAGb,SAAS;IACzF,OAAO,IAAI,CAACO,WAAW,CAACQ,SAAS,CAACI,WAAW,EAAEE,cAAc,CAAC;EAChE;AACF;AAACC,OAAA,CAAAjB,YAAA,GAAAA,YAAA"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
@@ -12,6 +11,7 @@ function _react() {
|
|
|
12
11
|
};
|
|
13
12
|
return data;
|
|
14
13
|
}
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
15
|
const Logo = () => /*#__PURE__*/_react().default.createElement("div", {
|
|
16
16
|
style: {
|
|
17
17
|
height: '100%',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","data","_interopRequireDefault","require","
|
|
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,23 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
require("core-js/modules/es.promise.js");
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
8
6
|
exports.DeprecationFragment = void 0;
|
|
9
|
-
function
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
return data;
|
|
13
|
-
};
|
|
14
|
-
return data;
|
|
15
|
-
}
|
|
7
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
8
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
9
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
16
10
|
class DeprecationFragment {
|
|
17
11
|
constructor(deprecation) {
|
|
18
12
|
this.deprecation = deprecation;
|
|
19
|
-
(
|
|
20
|
-
(
|
|
13
|
+
_defineProperty(this, "title", 'deprecated');
|
|
14
|
+
_defineProperty(this, "weight", 3);
|
|
21
15
|
}
|
|
22
16
|
async renderRow(component) {
|
|
23
17
|
const deprecationInfo = await this.deprecation.getDeprecationInfo(component);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["DeprecationFragment","constructor","deprecation","
|
|
1
|
+
{"version":3,"names":["DeprecationFragment","constructor","deprecation","_defineProperty","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;IAAAC,eAAA,gBAExC,YAAY;IAAAA,eAAA,iBAmBX,CAAC;EArByC;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,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,CAACX,WAAW,CAACK,kBAAkB,CAACF,SAAS;IAC3D,CAAC;EACH;AAGF;AAACS,OAAA,CAAAd,mBAAA,GAAAA,mBAAA"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
@@ -12,6 +11,7 @@ function _graphqlTag() {
|
|
|
12
11
|
};
|
|
13
12
|
return data;
|
|
14
13
|
}
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
15
|
function deprecationSchema(deprecation) {
|
|
16
16
|
return {
|
|
17
17
|
typeDefs: (0, _graphqlTag().default)`
|
|
@@ -1 +1 @@
|
|
|
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":"
|
|
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,19 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
require("core-js/modules/es.array.iterator.js");
|
|
5
|
-
require("core-js/modules/es.promise.js");
|
|
6
3
|
Object.defineProperty(exports, "__esModule", {
|
|
7
4
|
value: true
|
|
8
5
|
});
|
|
9
6
|
exports.DeprecationMain = void 0;
|
|
10
|
-
function _defineProperty2() {
|
|
11
|
-
const data = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
12
|
-
_defineProperty2 = function () {
|
|
13
|
-
return data;
|
|
14
|
-
};
|
|
15
|
-
return data;
|
|
16
|
-
}
|
|
17
7
|
function _cli() {
|
|
18
8
|
const data = require("@teambit/cli");
|
|
19
9
|
_cli = function () {
|
|
@@ -84,6 +74,10 @@ function _undeprecateCmd() {
|
|
|
84
74
|
};
|
|
85
75
|
return data;
|
|
86
76
|
}
|
|
77
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
78
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
79
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
80
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
87
81
|
class DeprecationMain {
|
|
88
82
|
constructor(scope, workspace) {
|
|
89
83
|
this.scope = scope;
|
|
@@ -134,8 +128,8 @@ class DeprecationMain {
|
|
|
134
128
|
}
|
|
135
129
|
}
|
|
136
130
|
exports.DeprecationMain = DeprecationMain;
|
|
137
|
-
(
|
|
138
|
-
(
|
|
131
|
+
_defineProperty(DeprecationMain, "runtime", _cli().MainRuntime);
|
|
132
|
+
_defineProperty(DeprecationMain, "dependencies", [_graphql().GraphqlAspect, _scope().ScopeAspect, _component().ComponentAspect, _workspace().default, _cli().CLIAspect]);
|
|
139
133
|
_deprecation().DeprecationAspect.addRuntime(DeprecationMain);
|
|
140
134
|
|
|
141
135
|
//# sourceMappingURL=deprecation.main.runtime.js.map
|
|
@@ -1 +1 @@
|
|
|
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","
|
|
1
|
+
{"version":3,"names":["_cli","data","require","_component","_scope","_workspace","_interopRequireDefault","_graphql","_deprecation","_deprecation2","_deprecation3","_deprecateCmd","_undeprecateCmd","obj","__esModule","default","_defineProperty","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","arg","_toPrimitive","String","input","hint","prim","Symbol","toPrimitive","undefined","res","call","TypeError","Number","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","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 { 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,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAO,aAAA;EAAA,MAAAP,IAAA,GAAAC,OAAA;EAAAM,YAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAQ,cAAA;EAAA,MAAAR,IAAA,GAAAC,OAAA;EAAAO,aAAA,YAAAA,CAAA;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equireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
require("core-js/modules/es.array.iterator.js");
|
|
5
|
-
require("core-js/modules/es.promise.js");
|
|
6
3
|
Object.defineProperty(exports, "__esModule", {
|
|
7
4
|
value: true
|
|
8
5
|
});
|
|
9
6
|
exports.DeprecationUIRuntime = void 0;
|
|
10
|
-
function _defineProperty2() {
|
|
11
|
-
const data = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
12
|
-
_defineProperty2 = function () {
|
|
13
|
-
return data;
|
|
14
|
-
};
|
|
15
|
-
return data;
|
|
16
|
-
}
|
|
17
7
|
function _react() {
|
|
18
8
|
const data = _interopRequireDefault(require("react"));
|
|
19
9
|
_react = function () {
|
|
@@ -49,6 +39,10 @@ function _deprecation() {
|
|
|
49
39
|
};
|
|
50
40
|
return data;
|
|
51
41
|
}
|
|
42
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
43
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
44
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
45
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
52
46
|
class DeprecationUIRuntime {
|
|
53
47
|
static async provider([docsUI]) {
|
|
54
48
|
docsUI.registerTitleBadge({
|
|
@@ -64,8 +58,8 @@ class DeprecationUIRuntime {
|
|
|
64
58
|
}
|
|
65
59
|
}
|
|
66
60
|
exports.DeprecationUIRuntime = DeprecationUIRuntime;
|
|
67
|
-
(
|
|
68
|
-
(
|
|
61
|
+
_defineProperty(DeprecationUIRuntime, "dependencies", [_docs().DocsAspect]);
|
|
62
|
+
_defineProperty(DeprecationUIRuntime, "runtime", _ui().UIRuntime);
|
|
69
63
|
_deprecation().DeprecationAspect.addRuntime(DeprecationUIRuntime);
|
|
70
64
|
|
|
71
65
|
//# sourceMappingURL=deprecation.ui.runtime.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","data","_interopRequireDefault","require","_ui","_docs","_componentUi","_deprecation","DeprecationUIRuntime","provider","docsUI","registerTitleBadge","component","Badge","legacyComponentModel","
|
|
1
|
+
{"version":3,"names":["_react","data","_interopRequireDefault","require","_ui","_docs","_componentUi","_deprecation","obj","__esModule","default","_defineProperty","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","arg","_toPrimitive","String","input","hint","prim","Symbol","toPrimitive","undefined","res","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,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AAAG,SAAA,QAAAC,GAAA,GAAAJ,IAAA,CAAAK,IAAA,CAAAP,KAAA,EAAAC,IAAA,2BAAAK,GAAA,sBAAAA,GAAA,YAAAE,SAAA,4DAAAP,IAAA,gBAAAF,MAAA,GAAAU,MAAA,EAAAT,KAAA;AAElD,MAAMU,oBAAoB,CAAC;EAKhC,aAAaC,QAAQA,CAAC,CAACC,MAAM,CAAW,EAAE;IACxCA,MAAM,CAACC,kBAAkB,CAAC;MACxBC,SAAS,EAAE,SAASC,KAAKA,CAAC;QAAEC;MAA+D,CAAC,EAAE;QAC5F,oBAAOvC,MAAA,GAAAU,OAAA,CAAA8B,aAAA,CAAClC,YAAA,GAAAmC,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;AAAAtB,eAAA,CAbYsB,oBAAoB,kBACT,CAACY,kBAAU,CAAC;AAAAlC,eAAA,CADvBsB,oBAAoB,aAGda,eAAS;AAY5BC,gCAAiB,CAACC,UAAU,CAACf,oBAAoB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_deprecation@0.0.
|
|
2
|
-
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_deprecation@0.0.
|
|
1
|
+
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_deprecation@0.0.1160/dist/deprecation.composition.js';
|
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_deprecation@0.0.1160/dist/deprecation.docs.mdx';
|
|
3
3
|
|
|
4
4
|
export const compositions = [compositions_0];
|
|
5
5
|
export const overview = [overview_0];
|
package/dist/undeprecate-cmd.js
CHANGED
|
@@ -1,19 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
require("core-js/modules/es.array.iterator.js");
|
|
5
|
-
require("core-js/modules/es.promise.js");
|
|
6
3
|
Object.defineProperty(exports, "__esModule", {
|
|
7
4
|
value: true
|
|
8
5
|
});
|
|
9
6
|
exports.UndeprecateCmd = void 0;
|
|
10
|
-
function _defineProperty2() {
|
|
11
|
-
const data = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
12
|
-
_defineProperty2 = function () {
|
|
13
|
-
return data;
|
|
14
|
-
};
|
|
15
|
-
return data;
|
|
16
|
-
}
|
|
17
7
|
function _chalk() {
|
|
18
8
|
const data = _interopRequireDefault(require("chalk"));
|
|
19
9
|
_chalk = function () {
|
|
@@ -21,19 +11,23 @@ function _chalk() {
|
|
|
21
11
|
};
|
|
22
12
|
return data;
|
|
23
13
|
}
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
16
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
17
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
24
18
|
class UndeprecateCmd {
|
|
25
19
|
constructor(deprecation, workspace) {
|
|
26
20
|
this.deprecation = deprecation;
|
|
27
21
|
this.workspace = workspace;
|
|
28
|
-
(
|
|
29
|
-
(
|
|
30
|
-
(
|
|
31
|
-
(
|
|
32
|
-
(
|
|
33
|
-
(
|
|
34
|
-
(
|
|
35
|
-
(
|
|
36
|
-
(
|
|
22
|
+
_defineProperty(this, "name", 'undeprecate <id>');
|
|
23
|
+
_defineProperty(this, "group", 'collaborate');
|
|
24
|
+
_defineProperty(this, "description", 'undeprecate a deprecated component (local/remote)');
|
|
25
|
+
_defineProperty(this, "alias", '');
|
|
26
|
+
_defineProperty(this, "options", []);
|
|
27
|
+
_defineProperty(this, "loader", true);
|
|
28
|
+
_defineProperty(this, "migration", true);
|
|
29
|
+
_defineProperty(this, "skipWorkspace", true);
|
|
30
|
+
_defineProperty(this, "remoteOp", true);
|
|
37
31
|
}
|
|
38
32
|
async report([id]) {
|
|
39
33
|
const result = await this.undeprecate(id);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_chalk","data","_interopRequireDefault","require","
|
|
1
|
+
{"version":3,"names":["_chalk","data","_interopRequireDefault","require","obj","__esModule","default","_defineProperty","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","arg","_toPrimitive","String","input","hint","prim","Symbol","toPrimitive","undefined","res","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 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 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,GAAA,QAAAR,GAAA,GAAAS,YAAA,CAAAD,GAAA,2BAAAR,GAAA,gBAAAA,GAAA,GAAAU,MAAA,CAAAV,GAAA;AAAA,SAAAS,aAAAE,KAAA,EAAAC,IAAA,eAAAD,KAAA,iBAAAA,KAAA,kBAAAA,KAAA,MAAAE,IAAA,GAAAF,KAAA,CAAAG,MAAA,CAAAC,WAAA,OAAAF,IAAA,KAAAG,SAAA,QAAAC,GAAA,GAAAJ,IAAA,CAAAK,IAAA,CAAAP,KAAA,EAAAC,IAAA,2BAAAK,GAAA,sBAAAA,GAAA,YAAAE,SAAA,4DAAAP,IAAA,gBAAAF,MAAA,GAAAU,MAAA,EAAAT,KAAA;AAKnB,MAAMU,cAAc,CAAoB;EAW7CC,WAAWA,CAASC,WAA4B,EAAUC,SAAoB,EAAE;IAAA,KAA5DD,WAA4B,GAA5BA,WAA4B;IAAA,KAAUC,SAAoB,GAApBA,SAAoB;IAAAzB,eAAA,eAVvE,kBAAkB;IAAAA,eAAA,gBACjB,aAAa;IAAAA,eAAA,sBACP,mDAAmD;IAAAA,eAAA,gBACzD,EAAE;IAAAA,eAAA,kBACA,EAAE;IAAAA,eAAA,iBACH,IAAI;IAAAA,eAAA,oBACD,IAAI;IAAAA,eAAA,wBACA,IAAI;IAAAA,eAAA,mBACT,IAAI;EAEkE;EAEjF,MAAM0B,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"}
|
package/package.json
CHANGED
|
@@ -1,28 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/deprecation",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.1160",
|
|
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.
|
|
9
|
+
"version": "0.0.1160"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"chalk": "2.4.2",
|
|
13
13
|
"graphql-tag": "2.12.1",
|
|
14
|
-
"core-js": "^3.0.0",
|
|
15
|
-
"@babel/runtime": "7.20.0",
|
|
16
14
|
"@teambit/harmony": "0.4.6",
|
|
17
15
|
"@teambit/component-id": "0.0.427",
|
|
18
|
-
"@teambit/cli": "0.0.
|
|
19
|
-
"@teambit/workspace": "0.0.
|
|
20
|
-
"@teambit/component": "0.0.
|
|
21
|
-
"@teambit/graphql": "0.0.
|
|
22
|
-
"@teambit/scope": "0.0.
|
|
23
|
-
"@teambit/component.ui.component-deprecated": "0.0.
|
|
24
|
-
"@teambit/docs": "0.0.
|
|
25
|
-
"@teambit/ui": "0.0.
|
|
16
|
+
"@teambit/cli": "0.0.774",
|
|
17
|
+
"@teambit/workspace": "0.0.1160",
|
|
18
|
+
"@teambit/component": "0.0.1160",
|
|
19
|
+
"@teambit/graphql": "0.0.1160",
|
|
20
|
+
"@teambit/scope": "0.0.1160",
|
|
21
|
+
"@teambit/component.ui.component-deprecated": "0.0.35",
|
|
22
|
+
"@teambit/docs": "0.0.1160",
|
|
23
|
+
"@teambit/ui": "0.0.1160"
|
|
26
24
|
},
|
|
27
25
|
"devDependencies": {
|
|
28
26
|
"@types/react": "^17.0.8",
|
|
@@ -33,7 +31,7 @@
|
|
|
33
31
|
"@types/testing-library__jest-dom": "5.9.5"
|
|
34
32
|
},
|
|
35
33
|
"peerDependencies": {
|
|
36
|
-
"@teambit/legacy": "1.0.
|
|
34
|
+
"@teambit/legacy": "1.0.559",
|
|
37
35
|
"react": "^16.8.0 || ^17.0.0",
|
|
38
36
|
"react-dom": "^16.8.0 || ^17.0.0"
|
|
39
37
|
},
|