@teambit/diagnostic 0.0.77 → 0.0.80
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/diagnostic.graphql.d.ts +12 -0
- package/dist/diagnostic.graphql.js +53 -0
- package/dist/diagnostic.graphql.js.map +1 -0
- package/dist/diagnostic.main.runtime.d.ts +2 -1
- package/dist/diagnostic.main.runtime.js +23 -2
- package/dist/diagnostic.main.runtime.js.map +1 -1
- package/package-tar/teambit-diagnostic-0.0.80.tgz +0 -0
- package/package.json +7 -34
- /package/{preview-1657129833874.js → preview-1657623030826.js} +0 -0
- package/package-tar/teambit-diagnostic-0.0.77.tgz +0 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Schema } from '@teambit/graphql';
|
|
2
|
+
import { DiagnosticMain } from './diagnostic.main.runtime';
|
|
3
|
+
export declare class DiagnosticGraphql implements Schema {
|
|
4
|
+
private diagnosticMain;
|
|
5
|
+
constructor(diagnosticMain: DiagnosticMain);
|
|
6
|
+
typeDefs: import("graphql").DocumentNode;
|
|
7
|
+
resolvers: {
|
|
8
|
+
Query: {
|
|
9
|
+
_diagnostic: () => {};
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.DiagnosticGraphql = void 0;
|
|
9
|
+
|
|
10
|
+
function _defineProperty2() {
|
|
11
|
+
const data = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
12
|
+
|
|
13
|
+
_defineProperty2 = function () {
|
|
14
|
+
return data;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
return data;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function _graphqlTag() {
|
|
21
|
+
const data = require("graphql-tag");
|
|
22
|
+
|
|
23
|
+
_graphqlTag = function () {
|
|
24
|
+
return data;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
return data;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
class DiagnosticGraphql {
|
|
31
|
+
constructor(diagnosticMain) {
|
|
32
|
+
this.diagnosticMain = diagnosticMain;
|
|
33
|
+
(0, _defineProperty2().default)(this, "typeDefs", (0, _graphqlTag().gql)`
|
|
34
|
+
scalar JSONObject
|
|
35
|
+
|
|
36
|
+
type Query {
|
|
37
|
+
_diagnostic: JSONObject
|
|
38
|
+
}
|
|
39
|
+
`);
|
|
40
|
+
(0, _defineProperty2().default)(this, "resolvers", {
|
|
41
|
+
Query: {
|
|
42
|
+
_diagnostic: () => {
|
|
43
|
+
return this.diagnosticMain.getDiagnosticData();
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
exports.DiagnosticGraphql = DiagnosticGraphql;
|
|
52
|
+
|
|
53
|
+
//# sourceMappingURL=diagnostic.graphql.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["DiagnosticGraphql","constructor","diagnosticMain","gql","Query","_diagnostic","getDiagnosticData"],"sources":["diagnostic.graphql.ts"],"sourcesContent":["import { Schema } from '@teambit/graphql';\nimport { gql } from 'graphql-tag';\nimport { DiagnosticMain } from './diagnostic.main.runtime';\n\nexport class DiagnosticGraphql implements Schema {\n constructor(private diagnosticMain: DiagnosticMain) {}\n\n typeDefs = gql`\n scalar JSONObject\n\n type Query {\n _diagnostic: JSONObject\n }\n `;\n resolvers = {\n Query: {\n _diagnostic: () => {\n return this.diagnosticMain.getDiagnosticData();\n },\n },\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAGO,MAAMA,iBAAN,CAA0C;EAC/CC,WAAW,CAASC,cAAT,EAAyC;IAAA,KAAhCA,cAAgC,GAAhCA,cAAgC;IAAA,kDAEzC,IAAAC,iBAAA,CAAI;AACjB;AACA;AACA;AACA;AACA;AACA,GARsD;IAAA,mDASxC;MACVC,KAAK,EAAE;QACLC,WAAW,EAAE,MAAM;UACjB,OAAO,KAAKH,cAAL,CAAoBI,iBAApB,EAAP;QACD;MAHI;IADG,CATwC;EAAE;;AADP"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { SlotRegistry } from '@teambit/harmony';
|
|
2
2
|
import { ExpressMain } from '@teambit/express';
|
|
3
|
+
import { GraphqlMain } from '@teambit/graphql';
|
|
3
4
|
import { Diagnostic } from './diagnostic';
|
|
4
5
|
export declare type DiagnosticSlot = SlotRegistry<Diagnostic[]>;
|
|
5
6
|
export declare class DiagnosticMain {
|
|
@@ -16,5 +17,5 @@ export declare class DiagnosticMain {
|
|
|
16
17
|
static getBitVersion(): {
|
|
17
18
|
version: any;
|
|
18
19
|
};
|
|
19
|
-
static provider([express]: [ExpressMain], config: any, [diagnosticSlot]: [DiagnosticSlot]): Promise<DiagnosticMain>;
|
|
20
|
+
static provider([express, graphql]: [ExpressMain, GraphqlMain], config: any, [diagnosticSlot]: [DiagnosticSlot]): Promise<DiagnosticMain>;
|
|
20
21
|
}
|
|
@@ -61,6 +61,16 @@ function _express() {
|
|
|
61
61
|
return data;
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
+
function _graphql() {
|
|
65
|
+
const data = _interopRequireDefault(require("@teambit/graphql"));
|
|
66
|
+
|
|
67
|
+
_graphql = function () {
|
|
68
|
+
return data;
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
return data;
|
|
72
|
+
}
|
|
73
|
+
|
|
64
74
|
function _diagnostic() {
|
|
65
75
|
const data = require("./diagnostic.aspect");
|
|
66
76
|
|
|
@@ -81,6 +91,16 @@ function _diagnostic2() {
|
|
|
81
91
|
return data;
|
|
82
92
|
}
|
|
83
93
|
|
|
94
|
+
function _diagnostic3() {
|
|
95
|
+
const data = require("./diagnostic.graphql");
|
|
96
|
+
|
|
97
|
+
_diagnostic3 = function () {
|
|
98
|
+
return data;
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
return data;
|
|
102
|
+
}
|
|
103
|
+
|
|
84
104
|
class DiagnosticMain {
|
|
85
105
|
constructor(
|
|
86
106
|
/** the diagnostic entity slot */
|
|
@@ -116,12 +136,13 @@ class DiagnosticMain {
|
|
|
116
136
|
};
|
|
117
137
|
}
|
|
118
138
|
|
|
119
|
-
static async provider([express], config, [diagnosticSlot]) {
|
|
139
|
+
static async provider([express, graphql], config, [diagnosticSlot]) {
|
|
120
140
|
const diagnosticMain = new DiagnosticMain(diagnosticSlot);
|
|
121
141
|
diagnosticMain.register({
|
|
122
142
|
diagnosticFn: DiagnosticMain.getBitVersion
|
|
123
143
|
});
|
|
124
144
|
express.register([new (_diagnostic2().DiagnosticRoute)(diagnosticMain)]);
|
|
145
|
+
graphql.register(new (_diagnostic3().DiagnosticGraphql)(diagnosticMain));
|
|
125
146
|
return diagnosticMain;
|
|
126
147
|
}
|
|
127
148
|
|
|
@@ -129,7 +150,7 @@ class DiagnosticMain {
|
|
|
129
150
|
|
|
130
151
|
exports.DiagnosticMain = DiagnosticMain;
|
|
131
152
|
(0, _defineProperty2().default)(DiagnosticMain, "slots", [_harmony().Slot.withType()]);
|
|
132
|
-
(0, _defineProperty2().default)(DiagnosticMain, "dependencies", [_express().ExpressAspect]);
|
|
153
|
+
(0, _defineProperty2().default)(DiagnosticMain, "dependencies", [_express().ExpressAspect, _graphql().default]);
|
|
133
154
|
(0, _defineProperty2().default)(DiagnosticMain, "runtime", _cli().MainRuntime);
|
|
134
155
|
|
|
135
156
|
_diagnostic().DiagnosticAspect.addRuntime(DiagnosticMain);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["DiagnosticMain","constructor","diagnosticSlot","register","diagnostic","getDiagnosticData","slots","toArray","reduce","prev","cSlot","aspectId","reports","forEach","diag","diagnosticFn","push","getBitVersion","version","getHarmonyVersion","provider","express","config","diagnosticMain","DiagnosticRoute","Slot","withType","ExpressAspect","MainRuntime","DiagnosticAspect","addRuntime"],"sources":["diagnostic.main.runtime.ts"],"sourcesContent":["import { getHarmonyVersion } from '@teambit/legacy/dist/bootstrap';\n\nimport { Slot, SlotRegistry } from '@teambit/harmony';\nimport { MainRuntime } from '@teambit/cli';\nimport { ExpressAspect, ExpressMain } from '@teambit/express';\nimport { DiagnosticAspect } from './diagnostic.aspect';\nimport { DiagnosticRoute } from './diagnostic.route';\nimport { Diagnostic } from './diagnostic';\n\nexport type DiagnosticSlot = SlotRegistry<Diagnostic[]>;\n\nexport class DiagnosticMain {\n constructor(\n /** the diagnostic entity slot */\n private diagnosticSlot: DiagnosticSlot\n ) {}\n static slots = [Slot.withType<Diagnostic[]>()];\n static dependencies = [ExpressAspect];\n static runtime = MainRuntime;\n\n register(...diagnostic: Diagnostic[]) {\n this.diagnosticSlot.register(diagnostic);\n }\n\n getDiagnosticData() {\n const slots = this.diagnosticSlot.toArray();\n return slots.reduce((prev, cSlot) => {\n const [aspectId, diagnostic] = cSlot;\n prev[aspectId] = { reports: [] };\n diagnostic.forEach((diag) => {\n const { diagnosticFn } = diag;\n prev[aspectId].reports.push(diagnosticFn());\n });\n return prev;\n }, {});\n }\n\n static getBitVersion() {\n const version = getHarmonyVersion(true);\n return { version };\n }\n\n static async provider([express]: [ExpressMain
|
|
1
|
+
{"version":3,"names":["DiagnosticMain","constructor","diagnosticSlot","register","diagnostic","getDiagnosticData","slots","toArray","reduce","prev","cSlot","aspectId","reports","forEach","diag","diagnosticFn","push","getBitVersion","version","getHarmonyVersion","provider","express","graphql","config","diagnosticMain","DiagnosticRoute","DiagnosticGraphql","Slot","withType","ExpressAspect","GraphqlAspect","MainRuntime","DiagnosticAspect","addRuntime"],"sources":["diagnostic.main.runtime.ts"],"sourcesContent":["import { getHarmonyVersion } from '@teambit/legacy/dist/bootstrap';\n\nimport { Slot, SlotRegistry } from '@teambit/harmony';\nimport { MainRuntime } from '@teambit/cli';\nimport { ExpressAspect, ExpressMain } from '@teambit/express';\nimport GraphqlAspect, { GraphqlMain } from '@teambit/graphql';\nimport { DiagnosticAspect } from './diagnostic.aspect';\nimport { DiagnosticRoute } from './diagnostic.route';\nimport { DiagnosticGraphql } from './diagnostic.graphql';\nimport { Diagnostic } from './diagnostic';\n\nexport type DiagnosticSlot = SlotRegistry<Diagnostic[]>;\n\nexport class DiagnosticMain {\n constructor(\n /** the diagnostic entity slot */\n private diagnosticSlot: DiagnosticSlot\n ) {}\n static slots = [Slot.withType<Diagnostic[]>()];\n static dependencies = [ExpressAspect, GraphqlAspect];\n static runtime = MainRuntime;\n\n register(...diagnostic: Diagnostic[]) {\n this.diagnosticSlot.register(diagnostic);\n }\n\n getDiagnosticData() {\n const slots = this.diagnosticSlot.toArray();\n return slots.reduce((prev, cSlot) => {\n const [aspectId, diagnostic] = cSlot;\n prev[aspectId] = { reports: [] };\n diagnostic.forEach((diag) => {\n const { diagnosticFn } = diag;\n prev[aspectId].reports.push(diagnosticFn());\n });\n return prev;\n }, {});\n }\n\n static getBitVersion() {\n const version = getHarmonyVersion(true);\n return { version };\n }\n\n static async provider(\n [express, graphql]: [ExpressMain, GraphqlMain],\n config: any,\n [diagnosticSlot]: [DiagnosticSlot]\n ) {\n const diagnosticMain = new DiagnosticMain(diagnosticSlot);\n diagnosticMain.register({ diagnosticFn: DiagnosticMain.getBitVersion });\n express.register([new DiagnosticRoute(diagnosticMain)]);\n graphql.register(new DiagnosticGraphql(diagnosticMain));\n return diagnosticMain;\n }\n}\n\nDiagnosticAspect.addRuntime(DiagnosticMain);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAEA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;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AAnB,CAAvB;IACAsB,cAAc,CAACrB,QAAf,CAAwB;MAAEY,YAAY,EAAEf,cAAc,CAACiB;IAA/B,CAAxB;IACAI,OAAO,CAAClB,QAAR,CAAiB,CAAC,KAAIsB,8BAAJ,EAAoBD,cAApB,CAAD,CAAjB;IACAF,OAAO,CAACnB,QAAR,CAAiB,KAAIuB,gCAAJ,EAAsBF,cAAtB,CAAjB;IACA,OAAOA,cAAP;EACD;;AAzCyB;;;gCAAfxB,c,WAKI,CAAC2B,eAAA,CAAKC,QAAL,EAAD,C;gCALJ5B,c,kBAMW,CAAC6B,wBAAD,EAAgBC,kBAAhB,C;gCANX9B,c,aAOM+B,kB;;AAqCnBC,8BAAA,CAAiBC,UAAjB,CAA4BjC,cAA5B"}
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/diagnostic",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.80",
|
|
4
4
|
"homepage": "https://bit.dev/teambit/harmony/diagnostic",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.harmony",
|
|
8
8
|
"name": "diagnostic",
|
|
9
|
-
"version": "0.0.
|
|
9
|
+
"version": "0.0.80"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
+
"graphql-tag": "2.12.1",
|
|
12
13
|
"@babel/runtime": "7.12.18",
|
|
13
14
|
"core-js": "^3.0.0",
|
|
14
15
|
"@teambit/harmony": "0.3.3",
|
|
15
|
-
"@teambit/
|
|
16
|
-
"@teambit/
|
|
16
|
+
"@teambit/graphql": "0.0.787",
|
|
17
|
+
"@teambit/cli": "0.0.520",
|
|
18
|
+
"@teambit/express": "0.0.618"
|
|
17
19
|
},
|
|
18
20
|
"devDependencies": {
|
|
19
21
|
"@types/mocha": "9.1.0",
|
|
@@ -24,40 +26,11 @@
|
|
|
24
26
|
"@types/node": "12.20.4"
|
|
25
27
|
},
|
|
26
28
|
"peerDependencies": {
|
|
27
|
-
"@teambit/legacy": "1.0.
|
|
29
|
+
"@teambit/legacy": "1.0.301",
|
|
28
30
|
"react-dom": "^16.8.0 || ^17.0.0",
|
|
29
31
|
"react": "^16.8.0 || ^17.0.0"
|
|
30
32
|
},
|
|
31
33
|
"license": "Apache-2.0",
|
|
32
|
-
"bit": {
|
|
33
|
-
"bindingPrefix": "@teambit",
|
|
34
|
-
"env": {},
|
|
35
|
-
"overrides": {
|
|
36
|
-
"dependencies": {
|
|
37
|
-
"@teambit/legacy": "-",
|
|
38
|
-
"@babel/runtime": "7.12.18",
|
|
39
|
-
"core-js": "^3.0.0",
|
|
40
|
-
"react-dom": "-",
|
|
41
|
-
"react": "-"
|
|
42
|
-
},
|
|
43
|
-
"devDependencies": {
|
|
44
|
-
"@teambit/legacy": "-",
|
|
45
|
-
"@types/mocha": "9.1.0",
|
|
46
|
-
"@types/testing-library__jest-dom": "5.9.5",
|
|
47
|
-
"@types/jest": "^26.0.0",
|
|
48
|
-
"@types/react-dom": "^17.0.5",
|
|
49
|
-
"@types/react": "^17.0.8",
|
|
50
|
-
"@types/node": "12.20.4",
|
|
51
|
-
"react-dom": "-",
|
|
52
|
-
"react": "-"
|
|
53
|
-
},
|
|
54
|
-
"peerDependencies": {
|
|
55
|
-
"@teambit/legacy": "1.0.298",
|
|
56
|
-
"react-dom": "^16.8.0 || ^17.0.0",
|
|
57
|
-
"react": "^16.8.0 || ^17.0.0"
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
},
|
|
61
34
|
"private": false,
|
|
62
35
|
"engines": {
|
|
63
36
|
"node": ">=12.22.0"
|
|
File without changes
|
|
Binary file
|