@teambit/deprecation 0.0.784 → 0.0.787
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.d.ts +4 -0
- package/dist/deprecate-cmd.js +5 -27
- package/dist/deprecate-cmd.js.map +1 -1
- package/dist/undeprecate-cmd.js +0 -26
- package/dist/undeprecate-cmd.js.map +1 -1
- package/package-tar/teambit-deprecation-0.0.787.tgz +0 -0
- package/package.json +10 -39
- package/{preview-1657251036992.js → preview-1657623030826.js} +2 -2
- package/package-tar/teambit-deprecation-0.0.784.tgz +0 -0
package/dist/deprecate-cmd.d.ts
CHANGED
package/dist/deprecate-cmd.js
CHANGED
|
@@ -31,31 +31,15 @@ function _chalk() {
|
|
|
31
31
|
return data;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
function _componentsDeprecation() {
|
|
35
|
-
const data = require("@teambit/legacy/dist/scope/component-ops/components-deprecation");
|
|
36
|
-
|
|
37
|
-
_componentsDeprecation = function () {
|
|
38
|
-
return data;
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
return data;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
function _bitId() {
|
|
45
|
-
const data = require("@teambit/legacy/dist/bit-id");
|
|
46
|
-
|
|
47
|
-
_bitId = function () {
|
|
48
|
-
return data;
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
return data;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
34
|
class DeprecateCmd {
|
|
55
35
|
constructor(deprecation, workspace) {
|
|
56
36
|
this.deprecation = deprecation;
|
|
57
37
|
this.workspace = workspace;
|
|
58
|
-
(0, _defineProperty2().default)(this, "name", 'deprecate <
|
|
38
|
+
(0, _defineProperty2().default)(this, "name", 'deprecate <component-name>');
|
|
39
|
+
(0, _defineProperty2().default)(this, "arguments", [{
|
|
40
|
+
name: 'component-name',
|
|
41
|
+
description: 'component name or component id'
|
|
42
|
+
}]);
|
|
59
43
|
(0, _defineProperty2().default)(this, "description", 'deprecate a component');
|
|
60
44
|
(0, _defineProperty2().default)(this, "group", 'collaborate');
|
|
61
45
|
(0, _defineProperty2().default)(this, "skipWorkspace", true);
|
|
@@ -79,12 +63,6 @@ class DeprecateCmd {
|
|
|
79
63
|
}
|
|
80
64
|
|
|
81
65
|
async deprecate(id, newId) {
|
|
82
|
-
if (this.workspace.isLegacy) {
|
|
83
|
-
const bitId = this.workspace.consumer.getParsedId(id);
|
|
84
|
-
await (0, _componentsDeprecation().deprecateMany)(this.workspace.consumer.scope, new (_bitId().BitIds)(bitId));
|
|
85
|
-
return true;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
66
|
const componentId = await this.workspace.resolveComponentId(id);
|
|
89
67
|
const newComponentId = newId ? await this.workspace.resolveComponentId(newId) : undefined;
|
|
90
68
|
return this.deprecation.deprecate(componentId, newComponentId);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["DeprecateCmd","constructor","deprecation","workspace","report","id","newId","result","deprecate","chalk","green","bold","
|
|
1
|
+
{"version":3,"names":["DeprecateCmd","constructor","deprecation","workspace","name","description","report","id","newId","result","deprecate","chalk","green","bold","componentId","resolveComponentId","newComponentId","undefined"],"sources":["deprecate-cmd.ts"],"sourcesContent":["import chalk from 'chalk';\nimport { Workspace } from '@teambit/workspace';\nimport { Command, CommandOptions } from '@teambit/cli';\nimport { DeprecationMain } from './deprecation.main.runtime';\n\nexport class DeprecateCmd implements Command {\n name = 'deprecate <component-name>';\n arguments = [{ name: 'component-name', description: 'component name or component id' }];\n description = 'deprecate a component';\n group = 'collaborate';\n skipWorkspace = true;\n alias = 'd';\n options = [['', 'new-id <string>', 'if replaced by another component, enter the new component id']] as CommandOptions;\n loader = true;\n migration = true;\n remoteOp = true;\n\n constructor(private deprecation: DeprecationMain, private workspace: Workspace) {}\n\n async report([id]: [string], { newId }: { newId?: string }): Promise<string> {\n const result = await this.deprecate(id, newId);\n if (result) {\n return chalk.green(`the component \"${id}\" has been deprecated successfully`);\n }\n return chalk.bold(`the component \"${id}\" is already deprecated. no changes have been made`);\n }\n\n private async deprecate(id: string, newId?: string): Promise<boolean> {\n const componentId = await this.workspace.resolveComponentId(id);\n const newComponentId = newId ? await this.workspace.resolveComponentId(newId) : undefined;\n return this.deprecation.deprecate(componentId, newComponentId);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAKO,MAAMA,YAAN,CAAsC;EAY3CC,WAAW,CAASC,WAAT,EAA+CC,SAA/C,EAAqE;IAAA,KAA5DD,WAA4D,GAA5DA,WAA4D;IAAA,KAAtBC,SAAsB,GAAtBA,SAAsB;IAAA,8CAXzE,4BAWyE;IAAA,mDAVpE,CAAC;MAAEC,IAAI,EAAE,gBAAR;MAA0BC,WAAW,EAAE;IAAvC,CAAD,CAUoE;IAAA,qDATlE,uBASkE;IAAA,+CARxE,aAQwE;IAAA,uDAPhE,IAOgE;IAAA,+CANxE,GAMwE;IAAA,iDALtE,CAAC,CAAC,EAAD,EAAK,iBAAL,EAAwB,8DAAxB,CAAD,CAKsE;IAAA,gDAJvE,IAIuE;IAAA,mDAHpE,IAGoE;IAAA,kDAFrE,IAEqE;EAAE;;EAEtE,MAANC,MAAM,CAAC,CAACC,EAAD,CAAD,EAAiB;IAAEC;EAAF,CAAjB,EAAiE;IAC3E,MAAMC,MAAM,GAAG,MAAM,KAAKC,SAAL,CAAeH,EAAf,EAAmBC,KAAnB,CAArB;;IACA,IAAIC,MAAJ,EAAY;MACV,OAAOE,gBAAA,CAAMC,KAAN,CAAa,kBAAiBL,EAAG,oCAAjC,CAAP;IACD;;IACD,OAAOI,gBAAA,CAAME,IAAN,CAAY,kBAAiBN,EAAG,oDAAhC,CAAP;EACD;;EAEsB,MAATG,SAAS,CAACH,EAAD,EAAaC,KAAb,EAA+C;IACpE,MAAMM,WAAW,GAAG,MAAM,KAAKX,SAAL,CAAeY,kBAAf,CAAkCR,EAAlC,CAA1B;IACA,MAAMS,cAAc,GAAGR,KAAK,GAAG,MAAM,KAAKL,SAAL,CAAeY,kBAAf,CAAkCP,KAAlC,CAAT,GAAoDS,SAAhF;IACA,OAAO,KAAKf,WAAL,CAAiBQ,SAAjB,CAA2BI,WAA3B,EAAwCE,cAAxC,CAAP;EACD;;AA1B0C"}
|
package/dist/undeprecate-cmd.js
CHANGED
|
@@ -31,26 +31,6 @@ function _chalk() {
|
|
|
31
31
|
return data;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
function _componentsDeprecation() {
|
|
35
|
-
const data = require("@teambit/legacy/dist/scope/component-ops/components-deprecation");
|
|
36
|
-
|
|
37
|
-
_componentsDeprecation = function () {
|
|
38
|
-
return data;
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
return data;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
function _bitId() {
|
|
45
|
-
const data = require("@teambit/legacy/dist/bit-id");
|
|
46
|
-
|
|
47
|
-
_bitId = function () {
|
|
48
|
-
return data;
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
return data;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
34
|
class UndeprecateCmd {
|
|
55
35
|
constructor(deprecation, workspace) {
|
|
56
36
|
this.deprecation = deprecation;
|
|
@@ -77,12 +57,6 @@ class UndeprecateCmd {
|
|
|
77
57
|
}
|
|
78
58
|
|
|
79
59
|
async undeprecate(id) {
|
|
80
|
-
if (this.workspace.isLegacy) {
|
|
81
|
-
const bitId = this.workspace.consumer.getParsedId(id);
|
|
82
|
-
await (0, _componentsDeprecation().undeprecateMany)(this.workspace.consumer.scope, new (_bitId().BitIds)(bitId));
|
|
83
|
-
return true;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
60
|
const componentId = await this.workspace.resolveComponentId(id);
|
|
87
61
|
return this.deprecation.unDeprecate(componentId);
|
|
88
62
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["UndeprecateCmd","constructor","deprecation","workspace","report","id","result","undeprecate","chalk","green","bold","
|
|
1
|
+
{"version":3,"names":["UndeprecateCmd","constructor","deprecation","workspace","report","id","result","undeprecate","chalk","green","bold","componentId","resolveComponentId","unDeprecate"],"sources":["undeprecate-cmd.ts"],"sourcesContent":["import chalk from 'chalk';\nimport { Workspace } from '@teambit/workspace';\nimport { Command, CommandOptions } from '@teambit/cli';\nimport { DeprecationMain } from './deprecation.main.runtime';\n\nexport class UndeprecateCmd implements Command {\n name = 'undeprecate <id>';\n group = 'collaborate';\n description = 'undeprecate a deprecated component (local/remote)';\n alias = '';\n options = [] as CommandOptions;\n loader = true;\n migration = true;\n skipWorkspace = true;\n remoteOp = true;\n\n constructor(private deprecation: DeprecationMain, private workspace: Workspace) {}\n\n async report([id]: [string]): Promise<string> {\n const result = await this.undeprecate(id);\n if (result) {\n return chalk.green(`the component \"${id}\" has been undeprecated successfully`);\n }\n return chalk.bold(`the component \"${id}\" is already undeprecated. no changes have been made`);\n }\n\n private async undeprecate(id: string) {\n const componentId = await this.workspace.resolveComponentId(id);\n return this.deprecation.unDeprecate(componentId);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAKO,MAAMA,cAAN,CAAwC;EAW7CC,WAAW,CAASC,WAAT,EAA+CC,SAA/C,EAAqE;IAAA,KAA5DD,WAA4D,GAA5DA,WAA4D;IAAA,KAAtBC,SAAsB,GAAtBA,SAAsB;IAAA,8CAVzE,kBAUyE;IAAA,+CATxE,aASwE;IAAA,qDARlE,mDAQkE;IAAA,+CAPxE,EAOwE;IAAA,iDANtE,EAMsE;IAAA,gDALvE,IAKuE;IAAA,mDAJpE,IAIoE;IAAA,uDAHhE,IAGgE;IAAA,kDAFrE,IAEqE;EAAE;;EAEtE,MAANC,MAAM,CAAC,CAACC,EAAD,CAAD,EAAkC;IAC5C,MAAMC,MAAM,GAAG,MAAM,KAAKC,WAAL,CAAiBF,EAAjB,CAArB;;IACA,IAAIC,MAAJ,EAAY;MACV,OAAOE,gBAAA,CAAMC,KAAN,CAAa,kBAAiBJ,EAAG,sCAAjC,CAAP;IACD;;IACD,OAAOG,gBAAA,CAAME,IAAN,CAAY,kBAAiBL,EAAG,sDAAhC,CAAP;EACD;;EAEwB,MAAXE,WAAW,CAACF,EAAD,EAAa;IACpC,MAAMM,WAAW,GAAG,MAAM,KAAKR,SAAL,CAAeS,kBAAf,CAAkCP,EAAlC,CAA1B;IACA,OAAO,KAAKH,WAAL,CAAiBW,WAAjB,CAA6BF,WAA7B,CAAP;EACD;;AAxB4C"}
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/deprecation",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.787",
|
|
4
4
|
"homepage": "https://bit.dev/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.787"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"chalk": "2.4.2",
|
|
@@ -14,15 +14,15 @@
|
|
|
14
14
|
"@babel/runtime": "7.12.18",
|
|
15
15
|
"core-js": "^3.0.0",
|
|
16
16
|
"@teambit/harmony": "0.3.3",
|
|
17
|
-
"@teambit/cli": "0.0.
|
|
18
|
-
"@teambit/workspace": "0.0.
|
|
19
|
-
"@teambit/component": "0.0.
|
|
20
|
-
"@teambit/graphql": "0.0.
|
|
17
|
+
"@teambit/cli": "0.0.520",
|
|
18
|
+
"@teambit/workspace": "0.0.787",
|
|
19
|
+
"@teambit/component": "0.0.787",
|
|
20
|
+
"@teambit/graphql": "0.0.787",
|
|
21
21
|
"@teambit/component-id": "0.0.402",
|
|
22
|
-
"@teambit/scope": "0.0.
|
|
22
|
+
"@teambit/scope": "0.0.787",
|
|
23
23
|
"@teambit/component.ui.component-deprecated": "0.0.4",
|
|
24
|
-
"@teambit/docs": "0.0.
|
|
25
|
-
"@teambit/ui": "0.0.
|
|
24
|
+
"@teambit/docs": "0.0.787",
|
|
25
|
+
"@teambit/ui": "0.0.787"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@types/react": "^17.0.8",
|
|
@@ -33,40 +33,11 @@
|
|
|
33
33
|
"@types/node": "12.20.4"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
|
-
"@teambit/legacy": "1.0.
|
|
36
|
+
"@teambit/legacy": "1.0.301",
|
|
37
37
|
"react-dom": "^16.8.0 || ^17.0.0",
|
|
38
38
|
"react": "^16.8.0 || ^17.0.0"
|
|
39
39
|
},
|
|
40
40
|
"license": "Apache-2.0",
|
|
41
|
-
"bit": {
|
|
42
|
-
"bindingPrefix": "@teambit",
|
|
43
|
-
"env": {},
|
|
44
|
-
"overrides": {
|
|
45
|
-
"dependencies": {
|
|
46
|
-
"@teambit/legacy": "-",
|
|
47
|
-
"@babel/runtime": "7.12.18",
|
|
48
|
-
"core-js": "^3.0.0",
|
|
49
|
-
"react-dom": "-",
|
|
50
|
-
"react": "-"
|
|
51
|
-
},
|
|
52
|
-
"devDependencies": {
|
|
53
|
-
"@teambit/legacy": "-",
|
|
54
|
-
"@types/mocha": "9.1.0",
|
|
55
|
-
"@types/testing-library__jest-dom": "5.9.5",
|
|
56
|
-
"@types/jest": "^26.0.0",
|
|
57
|
-
"@types/react-dom": "^17.0.5",
|
|
58
|
-
"@types/react": "^17.0.8",
|
|
59
|
-
"@types/node": "12.20.4",
|
|
60
|
-
"react-dom": "-",
|
|
61
|
-
"react": "-"
|
|
62
|
-
},
|
|
63
|
-
"peerDependencies": {
|
|
64
|
-
"@teambit/legacy": "1.0.299",
|
|
65
|
-
"react-dom": "^16.8.0 || ^17.0.0",
|
|
66
|
-
"react": "^16.8.0 || ^17.0.0"
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
},
|
|
70
41
|
"private": false,
|
|
71
42
|
"engines": {
|
|
72
43
|
"node": ">=12.22.0"
|
|
@@ -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.787/dist/deprecation.composition.js';
|
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_deprecation@0.0.787/dist/deprecation.docs.mdx';
|
|
3
3
|
|
|
4
4
|
export const compositions = [compositions_0];
|
|
5
5
|
export const overview = [overview_0];
|
|
Binary file
|