@teambit/component-issues 0.0.0-7421ebdfe0c6b818a20883e12b57e2abe9b48dff

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.
Files changed (107) hide show
  1. package/circular-dependencies.ts +11 -0
  2. package/component-issue.ts +75 -0
  3. package/deprecated-dependencies.ts +11 -0
  4. package/dist/circular-dependencies.d.ts +8 -0
  5. package/dist/circular-dependencies.js +24 -0
  6. package/dist/circular-dependencies.js.map +1 -0
  7. package/dist/component-issue.d.ts +32 -0
  8. package/dist/component-issue.js +81 -0
  9. package/dist/component-issue.js.map +1 -0
  10. package/dist/deprecated-dependencies.d.ts +8 -0
  11. package/dist/deprecated-dependencies.js +25 -0
  12. package/dist/deprecated-dependencies.js.map +1 -0
  13. package/dist/duplicate-component-and-package.d.ts +8 -0
  14. package/dist/duplicate-component-and-package.js +24 -0
  15. package/dist/duplicate-component-and-package.js.map +1 -0
  16. package/dist/external-env-without-version.d.ts +14 -0
  17. package/dist/external-env-without-version.js +27 -0
  18. package/dist/external-env-without-version.js.map +1 -0
  19. package/dist/import-from-directory.d.ts +8 -0
  20. package/dist/import-from-directory.js +23 -0
  21. package/dist/import-from-directory.js.map +1 -0
  22. package/dist/import-non-main-files.d.ts +7 -0
  23. package/dist/import-non-main-files.js +22 -0
  24. package/dist/import-non-main-files.js.map +1 -0
  25. package/dist/index.d.ts +5 -0
  26. package/dist/index.js +83 -0
  27. package/dist/index.js.map +1 -0
  28. package/dist/issues-list.d.ts +109 -0
  29. package/dist/issues-list.js +300 -0
  30. package/dist/issues-list.js.map +1 -0
  31. package/dist/legacy-inside-harmony.d.ts +8 -0
  32. package/dist/legacy-inside-harmony.js +24 -0
  33. package/dist/legacy-inside-harmony.js.map +1 -0
  34. package/dist/merge-config-has-conflict.d.ts +8 -0
  35. package/dist/merge-config-has-conflict.js +24 -0
  36. package/dist/merge-config-has-conflict.js.map +1 -0
  37. package/dist/missing-dependencies-on-fs.d.ts +6 -0
  38. package/dist/missing-dependencies-on-fs.js +21 -0
  39. package/dist/missing-dependencies-on-fs.js.map +1 -0
  40. package/dist/missing-dists.d.ts +8 -0
  41. package/dist/missing-dists.js +24 -0
  42. package/dist/missing-dists.js.map +1 -0
  43. package/dist/missing-links-from-nm-to-src.d.ts +8 -0
  44. package/dist/missing-links-from-nm-to-src.js +24 -0
  45. package/dist/missing-links-from-nm-to-src.js.map +1 -0
  46. package/dist/missing-manually-configured-packages.d.ts +7 -0
  47. package/dist/missing-manually-configured-packages.js +24 -0
  48. package/dist/missing-manually-configured-packages.js.map +1 -0
  49. package/dist/missing-packages-dependencies-on-fs.d.ts +12 -0
  50. package/dist/missing-packages-dependencies-on-fs.js +24 -0
  51. package/dist/missing-packages-dependencies-on-fs.js.map +1 -0
  52. package/dist/multiple-envs.d.ts +8 -0
  53. package/dist/multiple-envs.js +25 -0
  54. package/dist/multiple-envs.js.map +1 -0
  55. package/dist/non-loaded-env.d.ts +8 -0
  56. package/dist/non-loaded-env.js +24 -0
  57. package/dist/non-loaded-env.js.map +1 -0
  58. package/dist/parse-errors.d.ts +8 -0
  59. package/dist/parse-errors.js +21 -0
  60. package/dist/parse-errors.js.map +1 -0
  61. package/dist/relative-components-authored.d.ts +23 -0
  62. package/dist/relative-components-authored.js +56 -0
  63. package/dist/relative-components-authored.js.map +1 -0
  64. package/dist/relative-components.d.ts +11 -0
  65. package/dist/relative-components.js +25 -0
  66. package/dist/relative-components.js.map +1 -0
  67. package/dist/removed-dependencies.d.ts +8 -0
  68. package/dist/removed-dependencies.js +25 -0
  69. package/dist/removed-dependencies.js.map +1 -0
  70. package/dist/removed-env.d.ts +8 -0
  71. package/dist/removed-env.js +25 -0
  72. package/dist/removed-env.js.map +1 -0
  73. package/dist/resolve-errors.d.ts +8 -0
  74. package/dist/resolve-errors.js +21 -0
  75. package/dist/resolve-errors.js.map +1 -0
  76. package/dist/self-reference.d.ts +9 -0
  77. package/dist/self-reference.js +22 -0
  78. package/dist/self-reference.js.map +1 -0
  79. package/dist/untracked-dependencies.d.ts +19 -0
  80. package/dist/untracked-dependencies.js +48 -0
  81. package/dist/untracked-dependencies.js.map +1 -0
  82. package/duplicate-component-and-package.ts +11 -0
  83. package/external-env-without-version.ts +19 -0
  84. package/import-from-directory.ts +9 -0
  85. package/import-non-main-files.ts +8 -0
  86. package/index.ts +5 -0
  87. package/issues-list.ts +172 -0
  88. package/legacy-inside-harmony.ts +11 -0
  89. package/merge-config-has-conflict.ts +11 -0
  90. package/missing-dependencies-on-fs.ts +7 -0
  91. package/missing-dists.ts +11 -0
  92. package/missing-links-from-nm-to-src.ts +11 -0
  93. package/missing-manually-configured-packages.ts +10 -0
  94. package/missing-packages-dependencies-on-fs.ts +18 -0
  95. package/multiple-envs.ts +12 -0
  96. package/non-loaded-env.ts +11 -0
  97. package/package.json +38 -0
  98. package/parse-errors.ts +7 -0
  99. package/relative-components-authored.ts +49 -0
  100. package/relative-components.ts +12 -0
  101. package/removed-dependencies.ts +12 -0
  102. package/removed-env.ts +12 -0
  103. package/resolve-errors.ts +7 -0
  104. package/self-reference.ts +8 -0
  105. package/types/asset.d.ts +41 -0
  106. package/types/style.d.ts +42 -0
  107. package/untracked-dependencies.ts +41 -0
@@ -0,0 +1,11 @@
1
+ import { ComponentIssue, formatTitle } from './component-issue';
2
+
3
+ export class CircularDependencies extends ComponentIssue {
4
+ description = 'circular dependencies';
5
+ solution = 'run `bit insights "circular"` to get the component-ids participating in the circular';
6
+ data: boolean;
7
+ isTagBlocker = true;
8
+ outputForCLI() {
9
+ return formatTitle(this.descriptionWithSolution, false);
10
+ }
11
+ }
@@ -0,0 +1,75 @@
1
+ import chalk from 'chalk';
2
+ import { ComponentID } from '@teambit/component-id';
3
+
4
+ export type StringsPerFilePath = { [filePath: string]: string[] };
5
+
6
+ export const ISSUE_FORMAT_SPACE_COUNT = 10;
7
+ export const ISSUE_FORMAT_SPACE = ' '.repeat(ISSUE_FORMAT_SPACE_COUNT);
8
+
9
+ export type IssueObject = {
10
+ type: string;
11
+ description: string;
12
+ solution: string;
13
+ isTagBlocker: boolean;
14
+ data: any;
15
+ };
16
+
17
+ export class ComponentIssue {
18
+ description: string; // issue description
19
+ solution: string; // suggest how to fix the issue
20
+ data: any;
21
+ isTagBlocker = true; // if true, it stops the tag process and shows the issue
22
+ isCacheBlocker = true; // if true, it doesn't cache the component in the filesystem
23
+ formatDataFunction: FormatIssueFunc = componentIssueToString;
24
+ get descriptionWithSolution() {
25
+ const solution = this.formatSolution();
26
+ return `${this.description} ${solution}`;
27
+ }
28
+ formatSolution(): string {
29
+ return this.solution ? ` (${this.solution})` : '';
30
+ }
31
+ outputForCLI(): string {
32
+ return formatTitle(this.descriptionWithSolution) + chalk.white(this.dataToString());
33
+ }
34
+ dataToString(): string {
35
+ return Object.keys(this.data)
36
+ .map((k) => {
37
+ return `${ISSUE_FORMAT_SPACE}${k} -> ${this.formatDataFunction(this.data[k])}`;
38
+ })
39
+ .join('\n');
40
+ }
41
+ toObject(): IssueObject {
42
+ return {
43
+ type: this.constructor.name,
44
+ description: this.description,
45
+ solution: this.solution,
46
+ isTagBlocker: this.isTagBlocker,
47
+ data: this.data,
48
+ };
49
+ }
50
+ serialize(): string {
51
+ return JSON.stringify(this.data);
52
+ }
53
+ deserialize(data: string) {
54
+ return JSON.parse(data);
55
+ }
56
+ }
57
+
58
+ export function formatTitle(issueTitle: string, hasMoreData = true): string {
59
+ const colon = hasMoreData ? ':' : '';
60
+ return chalk.yellow(`\n ${issueTitle}${colon} \n`);
61
+ }
62
+
63
+ type FormatIssueFunc = (value: any) => string;
64
+
65
+ export function componentIssueToString(value: string[] | string) {
66
+ return Array.isArray(value) ? value.join(', ') : value;
67
+ }
68
+
69
+ export function deserializeWithBitId(dataStr: string) {
70
+ const data = JSON.parse(dataStr);
71
+ Object.keys(data).forEach((filePath) => {
72
+ data[filePath] = data[filePath].map((id) => new ComponentID(id));
73
+ });
74
+ return data;
75
+ }
@@ -0,0 +1,11 @@
1
+ import { ComponentIssue, ISSUE_FORMAT_SPACE } from './component-issue';
2
+
3
+ export class DeprecatedDependencies extends ComponentIssue {
4
+ description = 'dependencies used in the code were deprecated';
5
+ solution = 'replace them with alternative dependencies. or remove them if not needed anymore';
6
+ data: string[]; // deps ids
7
+ isTagBlocker = false;
8
+ dataToString() {
9
+ return ISSUE_FORMAT_SPACE + this.data.join(', ');
10
+ }
11
+ }
@@ -0,0 +1,8 @@
1
+ import { ComponentIssue } from './component-issue';
2
+ export declare class CircularDependencies extends ComponentIssue {
3
+ description: string;
4
+ solution: string;
5
+ data: boolean;
6
+ isTagBlocker: boolean;
7
+ outputForCLI(): string;
8
+ }
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.CircularDependencies = void 0;
7
+ function _componentIssue() {
8
+ const data = require("./component-issue");
9
+ _componentIssue = function () {
10
+ return data;
11
+ };
12
+ return data;
13
+ }
14
+ class CircularDependencies extends _componentIssue().ComponentIssue {
15
+ description = 'circular dependencies';
16
+ solution = 'run `bit insights "circular"` to get the component-ids participating in the circular';
17
+ isTagBlocker = true;
18
+ outputForCLI() {
19
+ return (0, _componentIssue().formatTitle)(this.descriptionWithSolution, false);
20
+ }
21
+ }
22
+ exports.CircularDependencies = CircularDependencies;
23
+
24
+ //# sourceMappingURL=circular-dependencies.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_componentIssue","data","require","CircularDependencies","ComponentIssue","description","solution","isTagBlocker","outputForCLI","formatTitle","descriptionWithSolution","exports"],"sources":["circular-dependencies.ts"],"sourcesContent":["import { ComponentIssue, formatTitle } from './component-issue';\n\nexport class CircularDependencies extends ComponentIssue {\n description = 'circular dependencies';\n solution = 'run `bit insights \"circular\"` to get the component-ids participating in the circular';\n data: boolean;\n isTagBlocker = true;\n outputForCLI() {\n return formatTitle(this.descriptionWithSolution, false);\n }\n}\n"],"mappings":";;;;;;AAAA,SAAAA,gBAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,eAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEO,MAAME,oBAAoB,SAASC,gCAAc,CAAC;EACvDC,WAAW,GAAG,uBAAuB;EACrCC,QAAQ,GAAG,sFAAsF;EAEjGC,YAAY,GAAG,IAAI;EACnBC,YAAYA,CAAA,EAAG;IACb,OAAO,IAAAC,6BAAW,EAAC,IAAI,CAACC,uBAAuB,EAAE,KAAK,CAAC;EACzD;AACF;AAACC,OAAA,CAAAR,oBAAA,GAAAA,oBAAA","ignoreList":[]}
@@ -0,0 +1,32 @@
1
+ export type StringsPerFilePath = {
2
+ [filePath: string]: string[];
3
+ };
4
+ export declare const ISSUE_FORMAT_SPACE_COUNT = 10;
5
+ export declare const ISSUE_FORMAT_SPACE: string;
6
+ export type IssueObject = {
7
+ type: string;
8
+ description: string;
9
+ solution: string;
10
+ isTagBlocker: boolean;
11
+ data: any;
12
+ };
13
+ export declare class ComponentIssue {
14
+ description: string;
15
+ solution: string;
16
+ data: any;
17
+ isTagBlocker: boolean;
18
+ isCacheBlocker: boolean;
19
+ formatDataFunction: FormatIssueFunc;
20
+ get descriptionWithSolution(): string;
21
+ formatSolution(): string;
22
+ outputForCLI(): string;
23
+ dataToString(): string;
24
+ toObject(): IssueObject;
25
+ serialize(): string;
26
+ deserialize(data: string): any;
27
+ }
28
+ export declare function formatTitle(issueTitle: string, hasMoreData?: boolean): string;
29
+ type FormatIssueFunc = (value: any) => string;
30
+ export declare function componentIssueToString(value: string[] | string): string;
31
+ export declare function deserializeWithBitId(dataStr: string): any;
32
+ export {};
@@ -0,0 +1,81 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.ISSUE_FORMAT_SPACE_COUNT = exports.ISSUE_FORMAT_SPACE = exports.ComponentIssue = void 0;
7
+ exports.componentIssueToString = componentIssueToString;
8
+ exports.deserializeWithBitId = deserializeWithBitId;
9
+ exports.formatTitle = formatTitle;
10
+ function _chalk() {
11
+ const data = _interopRequireDefault(require("chalk"));
12
+ _chalk = function () {
13
+ return data;
14
+ };
15
+ return data;
16
+ }
17
+ function _componentId() {
18
+ const data = require("@teambit/component-id");
19
+ _componentId = function () {
20
+ return data;
21
+ };
22
+ return data;
23
+ }
24
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
25
+ const ISSUE_FORMAT_SPACE_COUNT = exports.ISSUE_FORMAT_SPACE_COUNT = 10;
26
+ const ISSUE_FORMAT_SPACE = exports.ISSUE_FORMAT_SPACE = ' '.repeat(ISSUE_FORMAT_SPACE_COUNT);
27
+ class ComponentIssue {
28
+ // issue description
29
+ // suggest how to fix the issue
30
+
31
+ isTagBlocker = true; // if true, it stops the tag process and shows the issue
32
+ isCacheBlocker = true; // if true, it doesn't cache the component in the filesystem
33
+ formatDataFunction = componentIssueToString;
34
+ get descriptionWithSolution() {
35
+ const solution = this.formatSolution();
36
+ return `${this.description} ${solution}`;
37
+ }
38
+ formatSolution() {
39
+ return this.solution ? ` (${this.solution})` : '';
40
+ }
41
+ outputForCLI() {
42
+ return formatTitle(this.descriptionWithSolution) + _chalk().default.white(this.dataToString());
43
+ }
44
+ dataToString() {
45
+ return Object.keys(this.data).map(k => {
46
+ return `${ISSUE_FORMAT_SPACE}${k} -> ${this.formatDataFunction(this.data[k])}`;
47
+ }).join('\n');
48
+ }
49
+ toObject() {
50
+ return {
51
+ type: this.constructor.name,
52
+ description: this.description,
53
+ solution: this.solution,
54
+ isTagBlocker: this.isTagBlocker,
55
+ data: this.data
56
+ };
57
+ }
58
+ serialize() {
59
+ return JSON.stringify(this.data);
60
+ }
61
+ deserialize(data) {
62
+ return JSON.parse(data);
63
+ }
64
+ }
65
+ exports.ComponentIssue = ComponentIssue;
66
+ function formatTitle(issueTitle, hasMoreData = true) {
67
+ const colon = hasMoreData ? ':' : '';
68
+ return _chalk().default.yellow(`\n ${issueTitle}${colon} \n`);
69
+ }
70
+ function componentIssueToString(value) {
71
+ return Array.isArray(value) ? value.join(', ') : value;
72
+ }
73
+ function deserializeWithBitId(dataStr) {
74
+ const data = JSON.parse(dataStr);
75
+ Object.keys(data).forEach(filePath => {
76
+ data[filePath] = data[filePath].map(id => new (_componentId().ComponentID)(id));
77
+ });
78
+ return data;
79
+ }
80
+
81
+ //# sourceMappingURL=component-issue.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_chalk","data","_interopRequireDefault","require","_componentId","e","__esModule","default","ISSUE_FORMAT_SPACE_COUNT","exports","ISSUE_FORMAT_SPACE","repeat","ComponentIssue","isTagBlocker","isCacheBlocker","formatDataFunction","componentIssueToString","descriptionWithSolution","solution","formatSolution","description","outputForCLI","formatTitle","chalk","white","dataToString","Object","keys","map","k","join","toObject","type","constructor","name","serialize","JSON","stringify","deserialize","parse","issueTitle","hasMoreData","colon","yellow","value","Array","isArray","deserializeWithBitId","dataStr","forEach","filePath","id","ComponentID"],"sources":["component-issue.ts"],"sourcesContent":["import chalk from 'chalk';\nimport { ComponentID } from '@teambit/component-id';\n\nexport type StringsPerFilePath = { [filePath: string]: string[] };\n\nexport const ISSUE_FORMAT_SPACE_COUNT = 10;\nexport const ISSUE_FORMAT_SPACE = ' '.repeat(ISSUE_FORMAT_SPACE_COUNT);\n\nexport type IssueObject = {\n type: string;\n description: string;\n solution: string;\n isTagBlocker: boolean;\n data: any;\n};\n\nexport class ComponentIssue {\n description: string; // issue description\n solution: string; // suggest how to fix the issue\n data: any;\n isTagBlocker = true; // if true, it stops the tag process and shows the issue\n isCacheBlocker = true; // if true, it doesn't cache the component in the filesystem\n formatDataFunction: FormatIssueFunc = componentIssueToString;\n get descriptionWithSolution() {\n const solution = this.formatSolution();\n return `${this.description} ${solution}`;\n }\n formatSolution(): string {\n return this.solution ? ` (${this.solution})` : '';\n }\n outputForCLI(): string {\n return formatTitle(this.descriptionWithSolution) + chalk.white(this.dataToString());\n }\n dataToString(): string {\n return Object.keys(this.data)\n .map((k) => {\n return `${ISSUE_FORMAT_SPACE}${k} -> ${this.formatDataFunction(this.data[k])}`;\n })\n .join('\\n');\n }\n toObject(): IssueObject {\n return {\n type: this.constructor.name,\n description: this.description,\n solution: this.solution,\n isTagBlocker: this.isTagBlocker,\n data: this.data,\n };\n }\n serialize(): string {\n return JSON.stringify(this.data);\n }\n deserialize(data: string) {\n return JSON.parse(data);\n }\n}\n\nexport function formatTitle(issueTitle: string, hasMoreData = true): string {\n const colon = hasMoreData ? ':' : '';\n return chalk.yellow(`\\n ${issueTitle}${colon} \\n`);\n}\n\ntype FormatIssueFunc = (value: any) => string;\n\nexport function componentIssueToString(value: string[] | string) {\n return Array.isArray(value) ? value.join(', ') : value;\n}\n\nexport function deserializeWithBitId(dataStr: string) {\n const data = JSON.parse(dataStr);\n Object.keys(data).forEach((filePath) => {\n data[filePath] = data[filePath].map((id) => new ComponentID(id));\n });\n return data;\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;AACA,SAAAG,aAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,YAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAAoD,SAAAC,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAI7C,MAAMG,wBAAwB,GAAAC,OAAA,CAAAD,wBAAA,GAAG,EAAE;AACnC,MAAME,kBAAkB,GAAAD,OAAA,CAAAC,kBAAA,GAAG,GAAG,CAACC,MAAM,CAACH,wBAAwB,CAAC;AAU/D,MAAMI,cAAc,CAAC;EACL;EACH;;EAElBC,YAAY,GAAG,IAAI,CAAC,CAAC;EACrBC,cAAc,GAAG,IAAI,CAAC,CAAC;EACvBC,kBAAkB,GAAoBC,sBAAsB;EAC5D,IAAIC,uBAAuBA,CAAA,EAAG;IAC5B,MAAMC,QAAQ,GAAG,IAAI,CAACC,cAAc,CAAC,CAAC;IACtC,OAAO,GAAG,IAAI,CAACC,WAAW,IAAIF,QAAQ,EAAE;EAC1C;EACAC,cAAcA,CAAA,EAAW;IACvB,OAAO,IAAI,CAACD,QAAQ,GAAG,KAAK,IAAI,CAACA,QAAQ,GAAG,GAAG,EAAE;EACnD;EACAG,YAAYA,CAAA,EAAW;IACrB,OAAOC,WAAW,CAAC,IAAI,CAACL,uBAAuB,CAAC,GAAGM,gBAAK,CAACC,KAAK,CAAC,IAAI,CAACC,YAAY,CAAC,CAAC,CAAC;EACrF;EACAA,YAAYA,CAAA,EAAW;IACrB,OAAOC,MAAM,CAACC,IAAI,CAAC,IAAI,CAAC1B,IAAI,CAAC,CAC1B2B,GAAG,CAAEC,CAAC,IAAK;MACV,OAAO,GAAGnB,kBAAkB,GAAGmB,CAAC,OAAO,IAAI,CAACd,kBAAkB,CAAC,IAAI,CAACd,IAAI,CAAC4B,CAAC,CAAC,CAAC,EAAE;IAChF,CAAC,CAAC,CACDC,IAAI,CAAC,IAAI,CAAC;EACf;EACAC,QAAQA,CAAA,EAAgB;IACtB,OAAO;MACLC,IAAI,EAAE,IAAI,CAACC,WAAW,CAACC,IAAI;MAC3Bd,WAAW,EAAE,IAAI,CAACA,WAAW;MAC7BF,QAAQ,EAAE,IAAI,CAACA,QAAQ;MACvBL,YAAY,EAAE,IAAI,CAACA,YAAY;MAC/BZ,IAAI,EAAE,IAAI,CAACA;IACb,CAAC;EACH;EACAkC,SAASA,CAAA,EAAW;IAClB,OAAOC,IAAI,CAACC,SAAS,CAAC,IAAI,CAACpC,IAAI,CAAC;EAClC;EACAqC,WAAWA,CAACrC,IAAY,EAAE;IACxB,OAAOmC,IAAI,CAACG,KAAK,CAACtC,IAAI,CAAC;EACzB;AACF;AAACQ,OAAA,CAAAG,cAAA,GAAAA,cAAA;AAEM,SAASU,WAAWA,CAACkB,UAAkB,EAAEC,WAAW,GAAG,IAAI,EAAU;EAC1E,MAAMC,KAAK,GAAGD,WAAW,GAAG,GAAG,GAAG,EAAE;EACpC,OAAOlB,gBAAK,CAACoB,MAAM,CAAC,YAAYH,UAAU,GAAGE,KAAK,KAAK,CAAC;AAC1D;AAIO,SAAS1B,sBAAsBA,CAAC4B,KAAwB,EAAE;EAC/D,OAAOC,KAAK,CAACC,OAAO,CAACF,KAAK,CAAC,GAAGA,KAAK,CAACd,IAAI,CAAC,IAAI,CAAC,GAAGc,KAAK;AACxD;AAEO,SAASG,oBAAoBA,CAACC,OAAe,EAAE;EACpD,MAAM/C,IAAI,GAAGmC,IAAI,CAACG,KAAK,CAACS,OAAO,CAAC;EAChCtB,MAAM,CAACC,IAAI,CAAC1B,IAAI,CAAC,CAACgD,OAAO,CAAEC,QAAQ,IAAK;IACtCjD,IAAI,CAACiD,QAAQ,CAAC,GAAGjD,IAAI,CAACiD,QAAQ,CAAC,CAACtB,GAAG,CAAEuB,EAAE,IAAK,KAAIC,0BAAW,EAACD,EAAE,CAAC,CAAC;EAClE,CAAC,CAAC;EACF,OAAOlD,IAAI;AACb","ignoreList":[]}
@@ -0,0 +1,8 @@
1
+ import { ComponentIssue } from './component-issue';
2
+ export declare class DeprecatedDependencies extends ComponentIssue {
3
+ description: string;
4
+ solution: string;
5
+ data: string[];
6
+ isTagBlocker: boolean;
7
+ dataToString(): string;
8
+ }
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.DeprecatedDependencies = void 0;
7
+ function _componentIssue() {
8
+ const data = require("./component-issue");
9
+ _componentIssue = function () {
10
+ return data;
11
+ };
12
+ return data;
13
+ }
14
+ class DeprecatedDependencies extends _componentIssue().ComponentIssue {
15
+ description = 'dependencies used in the code were deprecated';
16
+ solution = 'replace them with alternative dependencies. or remove them if not needed anymore';
17
+ // deps ids
18
+ isTagBlocker = false;
19
+ dataToString() {
20
+ return _componentIssue().ISSUE_FORMAT_SPACE + this.data.join(', ');
21
+ }
22
+ }
23
+ exports.DeprecatedDependencies = DeprecatedDependencies;
24
+
25
+ //# sourceMappingURL=deprecated-dependencies.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_componentIssue","data","require","DeprecatedDependencies","ComponentIssue","description","solution","isTagBlocker","dataToString","ISSUE_FORMAT_SPACE","join","exports"],"sources":["deprecated-dependencies.ts"],"sourcesContent":["import { ComponentIssue, ISSUE_FORMAT_SPACE } from './component-issue';\n\nexport class DeprecatedDependencies extends ComponentIssue {\n description = 'dependencies used in the code were deprecated';\n solution = 'replace them with alternative dependencies. or remove them if not needed anymore';\n data: string[]; // deps ids\n isTagBlocker = false;\n dataToString() {\n return ISSUE_FORMAT_SPACE + this.data.join(', ');\n }\n}\n"],"mappings":";;;;;;AAAA,SAAAA,gBAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,eAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEO,MAAME,sBAAsB,SAASC,gCAAc,CAAC;EACzDC,WAAW,GAAG,+CAA+C;EAC7DC,QAAQ,GAAG,kFAAkF;EAC7E;EAChBC,YAAY,GAAG,KAAK;EACpBC,YAAYA,CAAA,EAAG;IACb,OAAOC,oCAAkB,GAAG,IAAI,CAACR,IAAI,CAACS,IAAI,CAAC,IAAI,CAAC;EAClD;AACF;AAACC,OAAA,CAAAR,sBAAA,GAAAA,sBAAA","ignoreList":[]}
@@ -0,0 +1,8 @@
1
+ import { ComponentIssue } from './component-issue';
2
+ export declare class DuplicateComponentAndPackage extends ComponentIssue {
3
+ description: string;
4
+ solution: string;
5
+ data: string;
6
+ isTagBlocker: boolean;
7
+ dataToString(): string;
8
+ }
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.DuplicateComponentAndPackage = void 0;
7
+ function _componentIssue() {
8
+ const data = require("./component-issue");
9
+ _componentIssue = function () {
10
+ return data;
11
+ };
12
+ return data;
13
+ }
14
+ class DuplicateComponentAndPackage extends _componentIssue().ComponentIssue {
15
+ description = 'tracked component added as a package';
16
+ solution = 'either remove the package from the workspace.jsonc (bit uninstall) or remove the component (bit remove)';
17
+ isTagBlocker = true;
18
+ dataToString() {
19
+ return _componentIssue().ISSUE_FORMAT_SPACE + this.data;
20
+ }
21
+ }
22
+ exports.DuplicateComponentAndPackage = DuplicateComponentAndPackage;
23
+
24
+ //# sourceMappingURL=duplicate-component-and-package.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_componentIssue","data","require","DuplicateComponentAndPackage","ComponentIssue","description","solution","isTagBlocker","dataToString","ISSUE_FORMAT_SPACE","exports"],"sources":["duplicate-component-and-package.ts"],"sourcesContent":["import { ComponentIssue, ISSUE_FORMAT_SPACE } from './component-issue';\n\nexport class DuplicateComponentAndPackage extends ComponentIssue {\n description = 'tracked component added as a package';\n solution = 'either remove the package from the workspace.jsonc (bit uninstall) or remove the component (bit remove)';\n data: string;\n isTagBlocker = true;\n dataToString() {\n return ISSUE_FORMAT_SPACE + this.data;\n }\n}\n"],"mappings":";;;;;;AAAA,SAAAA,gBAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,eAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEO,MAAME,4BAA4B,SAASC,gCAAc,CAAC;EAC/DC,WAAW,GAAG,sCAAsC;EACpDC,QAAQ,GAAG,yGAAyG;EAEpHC,YAAY,GAAG,IAAI;EACnBC,YAAYA,CAAA,EAAG;IACb,OAAOC,oCAAkB,GAAG,IAAI,CAACR,IAAI;EACvC;AACF;AAACS,OAAA,CAAAP,4BAAA,GAAAA,4BAAA","ignoreList":[]}
@@ -0,0 +1,14 @@
1
+ import { ComponentIssue } from './component-issue';
2
+ type DataType = {
3
+ envId: string;
4
+ componentId: string;
5
+ };
6
+ export declare class ExternalEnvWithoutVersion extends ComponentIssue {
7
+ description: string;
8
+ data: DataType;
9
+ solution: string;
10
+ isTagBlocker: boolean;
11
+ formatSolution(): string;
12
+ dataToString(): string;
13
+ }
14
+ export {};
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.ExternalEnvWithoutVersion = void 0;
7
+ function _componentIssue() {
8
+ const data = require("./component-issue");
9
+ _componentIssue = function () {
10
+ return data;
11
+ };
12
+ return data;
13
+ }
14
+ class ExternalEnvWithoutVersion extends _componentIssue().ComponentIssue {
15
+ description = 'failed loading env - external env without a version';
16
+ solution = '';
17
+ isTagBlocker = true;
18
+ formatSolution() {
19
+ return `(run "bit env set ${this.data.componentId} ${this.data.envId}")`;
20
+ }
21
+ dataToString() {
22
+ return _componentIssue().ISSUE_FORMAT_SPACE + this.data.envId;
23
+ }
24
+ }
25
+ exports.ExternalEnvWithoutVersion = ExternalEnvWithoutVersion;
26
+
27
+ //# sourceMappingURL=external-env-without-version.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_componentIssue","data","require","ExternalEnvWithoutVersion","ComponentIssue","description","solution","isTagBlocker","formatSolution","componentId","envId","dataToString","ISSUE_FORMAT_SPACE","exports"],"sources":["external-env-without-version.ts"],"sourcesContent":["import { ComponentIssue, ISSUE_FORMAT_SPACE } from './component-issue';\n\ntype DataType = {\n envId: string;\n componentId: string;\n};\n\nexport class ExternalEnvWithoutVersion extends ComponentIssue {\n description = 'failed loading env - external env without a version';\n data: DataType;\n solution = '';\n isTagBlocker = true;\n formatSolution(): string {\n return `(run \"bit env set ${this.data.componentId} ${this.data.envId}\")`;\n }\n dataToString() {\n return ISSUE_FORMAT_SPACE + this.data.envId;\n }\n}\n"],"mappings":";;;;;;AAAA,SAAAA,gBAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,eAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAOO,MAAME,yBAAyB,SAASC,gCAAc,CAAC;EAC5DC,WAAW,GAAG,qDAAqD;EAEnEC,QAAQ,GAAG,EAAE;EACbC,YAAY,GAAG,IAAI;EACnBC,cAAcA,CAAA,EAAW;IACvB,OAAO,qBAAqB,IAAI,CAACP,IAAI,CAACQ,WAAW,IAAI,IAAI,CAACR,IAAI,CAACS,KAAK,IAAI;EAC1E;EACAC,YAAYA,CAAA,EAAG;IACb,OAAOC,oCAAkB,GAAG,IAAI,CAACX,IAAI,CAACS,KAAK;EAC7C;AACF;AAACG,OAAA,CAAAV,yBAAA,GAAAA,yBAAA","ignoreList":[]}
@@ -0,0 +1,8 @@
1
+ import { ComponentIssue, StringsPerFilePath } from './component-issue';
2
+ export declare class ImportFromDirectory extends ComponentIssue {
3
+ description: string;
4
+ solution: string;
5
+ data: StringsPerFilePath;
6
+ isCacheBlocker: boolean;
7
+ isTagBlocker: boolean;
8
+ }
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.ImportFromDirectory = void 0;
7
+ function _componentIssue() {
8
+ const data = require("./component-issue");
9
+ _componentIssue = function () {
10
+ return data;
11
+ };
12
+ return data;
13
+ }
14
+ class ImportFromDirectory extends _componentIssue().ComponentIssue {
15
+ description = 'relative import from a directory';
16
+ solution = 'change the import statement to a specific file';
17
+ data = {};
18
+ isCacheBlocker = false;
19
+ isTagBlocker = false;
20
+ }
21
+ exports.ImportFromDirectory = ImportFromDirectory;
22
+
23
+ //# sourceMappingURL=import-from-directory.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_componentIssue","data","require","ImportFromDirectory","ComponentIssue","description","solution","isCacheBlocker","isTagBlocker","exports"],"sources":["import-from-directory.ts"],"sourcesContent":["import { ComponentIssue, StringsPerFilePath } from './component-issue';\n\nexport class ImportFromDirectory extends ComponentIssue {\n description = 'relative import from a directory';\n solution = 'change the import statement to a specific file';\n data: StringsPerFilePath = {};\n isCacheBlocker = false;\n isTagBlocker = false;\n}\n"],"mappings":";;;;;;AAAA,SAAAA,gBAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,eAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEO,MAAME,mBAAmB,SAASC,gCAAc,CAAC;EACtDC,WAAW,GAAG,kCAAkC;EAChDC,QAAQ,GAAG,gDAAgD;EAC3DL,IAAI,GAAuB,CAAC,CAAC;EAC7BM,cAAc,GAAG,KAAK;EACtBC,YAAY,GAAG,KAAK;AACtB;AAACC,OAAA,CAAAN,mBAAA,GAAAA,mBAAA","ignoreList":[]}
@@ -0,0 +1,7 @@
1
+ import { ComponentIssue, StringsPerFilePath } from './component-issue';
2
+ export declare class ImportNonMainFiles extends ComponentIssue {
3
+ description: string;
4
+ solution: string;
5
+ data: StringsPerFilePath;
6
+ isCacheBlocker: boolean;
7
+ }
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.ImportNonMainFiles = void 0;
7
+ function _componentIssue() {
8
+ const data = require("./component-issue");
9
+ _componentIssue = function () {
10
+ return data;
11
+ };
12
+ return data;
13
+ }
14
+ class ImportNonMainFiles extends _componentIssue().ComponentIssue {
15
+ description = 'importing non-main files';
16
+ solution = 'the dependency should expose its API from the main file';
17
+ data = {};
18
+ isCacheBlocker = false;
19
+ }
20
+ exports.ImportNonMainFiles = ImportNonMainFiles;
21
+
22
+ //# sourceMappingURL=import-non-main-files.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_componentIssue","data","require","ImportNonMainFiles","ComponentIssue","description","solution","isCacheBlocker","exports"],"sources":["import-non-main-files.ts"],"sourcesContent":["import { ComponentIssue, StringsPerFilePath } from './component-issue';\n\nexport class ImportNonMainFiles extends ComponentIssue {\n description = 'importing non-main files';\n solution = 'the dependency should expose its API from the main file';\n data: StringsPerFilePath = {};\n isCacheBlocker = false;\n}\n"],"mappings":";;;;;;AAAA,SAAAA,gBAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,eAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEO,MAAME,kBAAkB,SAASC,gCAAc,CAAC;EACrDC,WAAW,GAAG,0BAA0B;EACxCC,QAAQ,GAAG,yDAAyD;EACpEL,IAAI,GAAuB,CAAC,CAAC;EAC7BM,cAAc,GAAG,KAAK;AACxB;AAACC,OAAA,CAAAL,kBAAA,GAAAA,kBAAA","ignoreList":[]}
@@ -0,0 +1,5 @@
1
+ export { IssuesList, IssuesClasses, IssuesNames } from './issues-list';
2
+ export { ISSUE_FORMAT_SPACE as MISSING_DEPS_SPACE, ComponentIssue } from './component-issue';
3
+ export { UntrackedFileDependencyEntry, MISSING_NESTED_DEPS_SPACE } from './untracked-dependencies';
4
+ export { RelativeComponentsAuthoredEntry } from './relative-components-authored';
5
+ export type { MissingPackagesData } from './missing-packages-dependencies-on-fs';
package/dist/index.js ADDED
@@ -0,0 +1,83 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "ComponentIssue", {
7
+ enumerable: true,
8
+ get: function () {
9
+ return _componentIssue().ComponentIssue;
10
+ }
11
+ });
12
+ Object.defineProperty(exports, "IssuesClasses", {
13
+ enumerable: true,
14
+ get: function () {
15
+ return _issuesList().IssuesClasses;
16
+ }
17
+ });
18
+ Object.defineProperty(exports, "IssuesList", {
19
+ enumerable: true,
20
+ get: function () {
21
+ return _issuesList().IssuesList;
22
+ }
23
+ });
24
+ Object.defineProperty(exports, "IssuesNames", {
25
+ enumerable: true,
26
+ get: function () {
27
+ return _issuesList().IssuesNames;
28
+ }
29
+ });
30
+ Object.defineProperty(exports, "MISSING_DEPS_SPACE", {
31
+ enumerable: true,
32
+ get: function () {
33
+ return _componentIssue().ISSUE_FORMAT_SPACE;
34
+ }
35
+ });
36
+ Object.defineProperty(exports, "MISSING_NESTED_DEPS_SPACE", {
37
+ enumerable: true,
38
+ get: function () {
39
+ return _untrackedDependencies().MISSING_NESTED_DEPS_SPACE;
40
+ }
41
+ });
42
+ Object.defineProperty(exports, "RelativeComponentsAuthoredEntry", {
43
+ enumerable: true,
44
+ get: function () {
45
+ return _relativeComponentsAuthored().RelativeComponentsAuthoredEntry;
46
+ }
47
+ });
48
+ Object.defineProperty(exports, "UntrackedFileDependencyEntry", {
49
+ enumerable: true,
50
+ get: function () {
51
+ return _untrackedDependencies().UntrackedFileDependencyEntry;
52
+ }
53
+ });
54
+ function _issuesList() {
55
+ const data = require("./issues-list");
56
+ _issuesList = function () {
57
+ return data;
58
+ };
59
+ return data;
60
+ }
61
+ function _componentIssue() {
62
+ const data = require("./component-issue");
63
+ _componentIssue = function () {
64
+ return data;
65
+ };
66
+ return data;
67
+ }
68
+ function _untrackedDependencies() {
69
+ const data = require("./untracked-dependencies");
70
+ _untrackedDependencies = function () {
71
+ return data;
72
+ };
73
+ return data;
74
+ }
75
+ function _relativeComponentsAuthored() {
76
+ const data = require("./relative-components-authored");
77
+ _relativeComponentsAuthored = function () {
78
+ return data;
79
+ };
80
+ return data;
81
+ }
82
+
83
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_issuesList","data","require","_componentIssue","_untrackedDependencies","_relativeComponentsAuthored"],"sources":["index.ts"],"sourcesContent":["export { IssuesList, IssuesClasses, IssuesNames } from './issues-list';\nexport { ISSUE_FORMAT_SPACE as MISSING_DEPS_SPACE, ComponentIssue } from './component-issue';\nexport { UntrackedFileDependencyEntry, MISSING_NESTED_DEPS_SPACE } from './untracked-dependencies';\nexport { RelativeComponentsAuthoredEntry } from './relative-components-authored';\nexport type { MissingPackagesData } from './missing-packages-dependencies-on-fs';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAAA,YAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,WAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,gBAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,eAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,uBAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,sBAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,4BAAA;EAAA,MAAAJ,IAAA,GAAAC,OAAA;EAAAG,2BAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA","ignoreList":[]}