@teambit/insights 0.0.1083 → 0.0.1085
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/insights.main.runtime.js +1 -1
- package/dist/insights.main.runtime.js.map +1 -1
- package/dist/{preview-1687231140262.js → preview-1687418355028.js} +1 -1
- package/package-tar/teambit-insights-0.0.1085.tgz +0 -0
- package/package.json +7 -7
- package/package-tar/teambit-insights-0.0.1083.tgz +0 -0
|
@@ -112,7 +112,7 @@ class InsightsMain {
|
|
|
112
112
|
// TODO - get user-defined insights as well, and use them when instantiating InsightManager and InsightsCmd
|
|
113
113
|
const insightManager = new (_insightManager().InsightManager)(initialInsights);
|
|
114
114
|
const insightsMain = new InsightsMain(insightManager);
|
|
115
|
-
issues.registerAddComponentsIssues(insightsMain.addInsightsAsComponentIssues.bind(insightsMain));
|
|
115
|
+
if (issues) issues.registerAddComponentsIssues(insightsMain.addInsightsAsComponentIssues.bind(insightsMain));
|
|
116
116
|
const insightsCmd = new (_insights2().default)(insightsMain);
|
|
117
117
|
cli.register(insightsCmd);
|
|
118
118
|
return insightsMain;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["InsightsMain","constructor","insightManager","runInsights","names","opts","results","namesArr","run","runAll","listInsights","addInsightsAsComponentIssues","components","issuesToIgnore","insightNames","insights","map","name","getByName","includes","IssuesClasses","CircularDependencies","pMapSeries","insight","addAsComponentIssue","provider","graphMain","cli","issues","initialInsights","getCoreInsights","InsightManager","insightsMain","registerAddComponentsIssues","bind","insightsCmd","InsightsCmd","register","GraphAspect","CLIAspect","IssuesAspect","MainRuntime","silence","InsightsAspect","addRuntime"],"sources":["insights.main.runtime.ts"],"sourcesContent":["import { CLIAspect, MainRuntime, CLIMain } from '@teambit/cli';\nimport { GraphAspect, GraphMain } from '@teambit/graph';\nimport { IssuesClasses } from '@teambit/component-issues';\nimport IssuesAspect, { IssuesMain } from '@teambit/issues';\nimport pMapSeries from 'p-map-series';\nimport { Component } from '@teambit/component';\nimport { InsightsAspect } from './insights.aspect';\nimport getCoreInsights from './core-insights-getter';\nimport { Insight, InsightResult } from './insight';\nimport { InsightManager, RunInsightOptions } from './insight-manager';\nimport InsightsCmd from './insights.cmd';\n\nexport class InsightsMain {\n constructor(private insightManager: InsightManager) {}\n\n async runInsights(names: string[], opts: RunInsightOptions) {\n if (names) {\n let results: InsightResult[] = [];\n const namesArr = typeof names === 'string' ? [names] : names;\n results = await this.insightManager.run(namesArr, opts);\n return results;\n }\n const results = await this.insightManager.runAll(opts);\n return results;\n }\n\n listInsights() {\n return this.insightManager.listInsights();\n }\n\n async addInsightsAsComponentIssues(components: Component[], issuesToIgnore: string[]) {\n const insightNames: string[] = this.listInsights();\n const insights = insightNames.map((name) => this.insightManager.getByName(name));\n if (!issuesToIgnore.includes(IssuesClasses.CircularDependencies.name)) {\n await pMapSeries(insights, async (insight) => {\n if (insight && insight.addAsComponentIssue) {\n await insight.addAsComponentIssue(components);\n }\n });\n }\n }\n\n static slots = [];\n static dependencies = [GraphAspect, CLIAspect, IssuesAspect];\n static runtime = MainRuntime;\n static config = {\n silence: false,\n };\n static async provider([graphMain, cli, issues]: [GraphMain, CLIMain, IssuesMain]) {\n // get all insights from registry\n const initialInsights: Insight[] = getCoreInsights(graphMain);\n // register all insights in cli\n // TODO - get user-defined insights as well, and use them when instantiating InsightManager and InsightsCmd\n const insightManager = new InsightManager(initialInsights);\n const insightsMain = new InsightsMain(insightManager);\n issues.registerAddComponentsIssues(insightsMain.addInsightsAsComponentIssues.bind(insightsMain));\n const insightsCmd = new InsightsCmd(insightsMain);\n cli.register(insightsCmd);\n return insightsMain;\n }\n}\n\nInsightsAspect.addRuntime(InsightsMain);\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;E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AAO,IAAIA,OAAO,CAACC,mBAAmB,EAAE;UAC1C,MAAMD,OAAO,CAACC,mBAAmB,CAACZ,UAAU,CAAC;QAC/C;MACF,CAAC,CAAC;IACJ;EACF;EAQA,aAAaa,QAAQ,CAAC,CAACC,SAAS,EAAEC,GAAG,EAAEC,MAAM,CAAmC,EAAE;IAChF;IACA,MAAMC,eAA0B,GAAG,IAAAC,6BAAe,EAACJ,SAAS,CAAC;IAC7D;IACA;IACA,MAAMxB,cAAc,GAAG,KAAI6B,gCAAc,EAACF,eAAe,CAAC;IAC1D,MAAMG,YAAY,GAAG,IAAIhC,YAAY,CAACE,cAAc,CAAC;
|
|
1
|
+
{"version":3,"names":["InsightsMain","constructor","insightManager","runInsights","names","opts","results","namesArr","run","runAll","listInsights","addInsightsAsComponentIssues","components","issuesToIgnore","insightNames","insights","map","name","getByName","includes","IssuesClasses","CircularDependencies","pMapSeries","insight","addAsComponentIssue","provider","graphMain","cli","issues","initialInsights","getCoreInsights","InsightManager","insightsMain","registerAddComponentsIssues","bind","insightsCmd","InsightsCmd","register","GraphAspect","CLIAspect","IssuesAspect","MainRuntime","silence","InsightsAspect","addRuntime"],"sources":["insights.main.runtime.ts"],"sourcesContent":["import { CLIAspect, MainRuntime, CLIMain } from '@teambit/cli';\nimport { GraphAspect, GraphMain } from '@teambit/graph';\nimport { IssuesClasses } from '@teambit/component-issues';\nimport IssuesAspect, { IssuesMain } from '@teambit/issues';\nimport pMapSeries from 'p-map-series';\nimport { Component } from '@teambit/component';\nimport { InsightsAspect } from './insights.aspect';\nimport getCoreInsights from './core-insights-getter';\nimport { Insight, InsightResult } from './insight';\nimport { InsightManager, RunInsightOptions } from './insight-manager';\nimport InsightsCmd from './insights.cmd';\n\nexport class InsightsMain {\n constructor(private insightManager: InsightManager) {}\n\n async runInsights(names: string[], opts: RunInsightOptions) {\n if (names) {\n let results: InsightResult[] = [];\n const namesArr = typeof names === 'string' ? [names] : names;\n results = await this.insightManager.run(namesArr, opts);\n return results;\n }\n const results = await this.insightManager.runAll(opts);\n return results;\n }\n\n listInsights() {\n return this.insightManager.listInsights();\n }\n\n async addInsightsAsComponentIssues(components: Component[], issuesToIgnore: string[]) {\n const insightNames: string[] = this.listInsights();\n const insights = insightNames.map((name) => this.insightManager.getByName(name));\n if (!issuesToIgnore.includes(IssuesClasses.CircularDependencies.name)) {\n await pMapSeries(insights, async (insight) => {\n if (insight && insight.addAsComponentIssue) {\n await insight.addAsComponentIssue(components);\n }\n });\n }\n }\n\n static slots = [];\n static dependencies = [GraphAspect, CLIAspect, IssuesAspect];\n static runtime = MainRuntime;\n static config = {\n silence: false,\n };\n static async provider([graphMain, cli, issues]: [GraphMain, CLIMain, IssuesMain]) {\n // get all insights from registry\n const initialInsights: Insight[] = getCoreInsights(graphMain);\n // register all insights in cli\n // TODO - get user-defined insights as well, and use them when instantiating InsightManager and InsightsCmd\n const insightManager = new InsightManager(initialInsights);\n const insightsMain = new InsightsMain(insightManager);\n if (issues) issues.registerAddComponentsIssues(insightsMain.addInsightsAsComponentIssues.bind(insightsMain));\n const insightsCmd = new InsightsCmd(insightsMain);\n cli.register(insightsCmd);\n return insightsMain;\n }\n}\n\nInsightsAspect.addRuntime(InsightsMain);\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEO,MAAMA,YAAY,CAAC;EACxBC,WAAW,CAASC,cAA8B,EAAE;IAAA,KAAhCA,cAA8B,G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gCAAc,EAACF,eAAe,CAAC;IAC1D,MAAMG,YAAY,GAAG,IAAIhC,YAAY,CAACE,cAAc,CAAC;IACrD,IAAI0B,MAAM,EAAEA,MAAM,CAACK,2BAA2B,CAACD,YAAY,CAACrB,4BAA4B,CAACuB,IAAI,CAACF,YAAY,CAAC,CAAC;IAC5G,MAAMG,WAAW,GAAG,KAAIC,oBAAW,EAACJ,YAAY,CAAC;IACjDL,GAAG,CAACU,QAAQ,CAACF,WAAW,CAAC;IACzB,OAAOH,YAAY;EACrB;AACF;AAAC;AAAA,gCAhDYhC,YAAY,WA8BR,EAAE;AAAA,gCA9BNA,YAAY,kBA+BD,CAACsC,oBAAW,EAAEC,gBAAS,EAAEC,iBAAY,CAAC;AAAA,gCA/BjDxC,YAAY,aAgCNyC,kBAAW;AAAA,gCAhCjBzC,YAAY,YAiCP;EACd0C,OAAO,EAAE;AACX,CAAC;AAeHC,0BAAc,CAACC,UAAU,CAAC5C,YAAY,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
;
|
|
2
|
-
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.explorer_insights@0.0.
|
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.explorer_insights@0.0.1085/dist/insights.docs.mdx';
|
|
3
3
|
|
|
4
4
|
export const compositions = [];
|
|
5
5
|
export const overview = [overview_0];
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/insights",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.1085",
|
|
4
4
|
"homepage": "https://bit.cloud/teambit/explorer/insights",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.explorer",
|
|
8
8
|
"name": "insights",
|
|
9
|
-
"version": "0.0.
|
|
9
|
+
"version": "0.0.1085"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"p-map-series": "2.1.0",
|
|
@@ -16,11 +16,11 @@
|
|
|
16
16
|
"core-js": "^3.0.0",
|
|
17
17
|
"@babel/runtime": "7.20.0",
|
|
18
18
|
"@teambit/harmony": "0.4.6",
|
|
19
|
-
"@teambit/graph": "0.0.
|
|
20
|
-
"@teambit/component": "0.0.
|
|
21
|
-
"@teambit/cli": "0.0.
|
|
19
|
+
"@teambit/graph": "0.0.1085",
|
|
20
|
+
"@teambit/component": "0.0.1085",
|
|
21
|
+
"@teambit/cli": "0.0.729",
|
|
22
22
|
"@teambit/component-issues": "0.0.92",
|
|
23
|
-
"@teambit/issues": "0.0.
|
|
23
|
+
"@teambit/issues": "0.0.393",
|
|
24
24
|
"@teambit/bit-error": "0.0.402"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"@types/testing-library__jest-dom": "5.9.5"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
|
-
"@teambit/legacy": "1.0.
|
|
37
|
+
"@teambit/legacy": "1.0.510",
|
|
38
38
|
"react": "^16.8.0 || ^17.0.0",
|
|
39
39
|
"react-dom": "^16.8.0 || ^17.0.0"
|
|
40
40
|
},
|
|
Binary file
|