@teambit/diagnostic 1.0.397 → 1.0.398

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,4 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <testsuites tests="0" failures="0" errors="0" skipped="0">
3
- <testsuite name="teambit.harmony/diagnostic@1.0.397" tests="0" failures="0" errors="0" skipped="0"/>
3
+ <testsuite name="teambit.harmony/diagnostic@1.0.398" tests="0" failures="0" errors="0" skipped="0"/>
4
4
  </testsuites>
@@ -826,7 +826,7 @@
826
826
  "componentId": {
827
827
  "scope": "teambit.harmony",
828
828
  "name": "diagnostic",
829
- "version": "1.0.397"
829
+ "version": "1.0.398"
830
830
  },
831
831
  "taggedModuleExports": []
832
832
  }
@@ -64,7 +64,7 @@ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object
64
64
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
65
65
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
66
66
  class DiagnosticMain {
67
- constructor( /** the diagnostic entity slot */
67
+ constructor(/** the diagnostic entity slot */
68
68
  diagnosticSlot) {
69
69
  this.diagnosticSlot = diagnosticSlot;
70
70
  }
@@ -1 +1 @@
1
- {"version":3,"names":["_bit","data","require","_harmony","_cli","_express","_graphql","_diagnostic","_diagnostic2","_diagnostic3","_defineProperty","e","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","DiagnosticMain","constructor","diagnosticSlot","register","diagnostic","getDiagnosticData","slots","toArray","reduce","prev","cSlot","aspectId","reports","forEach","diag","diagnosticFn","push","getBitVersion","version","provider","express","graphql","config","diagnosticMain","DiagnosticRoute","DiagnosticGraphql","exports","Slot","withType","ExpressAspect","GraphqlAspect","MainRuntime","DiagnosticAspect","addRuntime"],"sources":["diagnostic.main.runtime.ts"],"sourcesContent":["import { getBitVersion } from '@teambit/bit.get-bit-version';\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 = getBitVersion();\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,SAAAA,KAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,IA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G;IACrB,MAAMC,OAAO,GAAG,IAAAD,oBAAa,EAAC,CAAC;IAC/B,OAAO;MAAEC;IAAQ,CAAC;EACpB;EAEA,aAAaC,QAAQA,CACnB,CAACC,OAAO,EAAEC,OAAO,CAA6B,EAC9CC,MAAW,EACX,CAACpB,cAAc,CAAmB,EAClC;IACA,MAAMqB,cAAc,GAAG,IAAIvB,cAAc,CAACE,cAAc,CAAC;IACzDqB,cAAc,CAACpB,QAAQ,CAAC;MAAEY,YAAY,EAAEf,cAAc,CAACiB;IAAc,CAAC,CAAC;IACvEG,OAAO,CAACjB,QAAQ,CAAC,CAAC,KAAIqB,8BAAe,EAACD,cAAc,CAAC,CAAC,CAAC;IACvDF,OAAO,CAAClB,QAAQ,CAAC,KAAIsB,gCAAiB,EAACF,cAAc,CAAC,CAAC;IACvD,OAAOA,cAAc;EACvB;AACF;AAACG,OAAA,CAAA1B,cAAA,GAAAA,cAAA;AAAAnB,eAAA,CA1CYmB,cAAc,WAKV,CAAC2B,eAAI,CAACC,QAAQ,CAAe,CAAC,CAAC;AAAA/C,eAAA,CALnCmB,cAAc,kBAMH,CAAC6B,wBAAa,EAAEC,wBAAa,CAAC;AAAAjD,eAAA,CANzCmB,cAAc,aAOR+B,kBAAW;AAqC9BC,8BAAgB,CAACC,UAAU,CAACjC,cAAc,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_bit","data","require","_harmony","_cli","_express","_graphql","_diagnostic","_diagnostic2","_diagnostic3","_defineProperty","e","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","DiagnosticMain","constructor","diagnosticSlot","register","diagnostic","getDiagnosticData","slots","toArray","reduce","prev","cSlot","aspectId","reports","forEach","diag","diagnosticFn","push","getBitVersion","version","provider","express","graphql","config","diagnosticMain","DiagnosticRoute","DiagnosticGraphql","exports","Slot","withType","ExpressAspect","GraphqlAspect","MainRuntime","DiagnosticAspect","addRuntime"],"sources":["diagnostic.main.runtime.ts"],"sourcesContent":["import { getBitVersion } from '@teambit/bit.get-bit-version';\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 = getBitVersion();\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,SAAAA,KAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,IAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA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,OAAO;MAAEC;IAAQ,CAAC;EACpB;EAEA,aAAaC,QAAQA,CACnB,CAACC,OAAO,EAAEC,OAAO,CAA6B,EAC9CC,MAAW,EACX,CAACpB,cAAc,CAAmB,EAClC;IACA,MAAMqB,cAAc,GAAG,IAAIvB,cAAc,CAACE,cAAc,CAAC;IACzDqB,cAAc,CAACpB,QAAQ,CAAC;MAAEY,YAAY,EAAEf,cAAc,CAACiB;IAAc,CAAC,CAAC;IACvEG,OAAO,CAACjB,QAAQ,CAAC,CAAC,KAAIqB,8BAAe,EAACD,cAAc,CAAC,CAAC,CAAC;IACvDF,OAAO,CAAClB,QAAQ,CAAC,KAAIsB,gCAAiB,EAACF,cAAc,CAAC,CAAC;IACvD,OAAOA,cAAc;EACvB;AACF;AAACG,OAAA,CAAA1B,cAAA,GAAAA,cAAA;AAAAnB,eAAA,CA1CYmB,cAAc,WAKV,CAAC2B,eAAI,CAACC,QAAQ,CAAe,CAAC,CAAC;AAAA/C,eAAA,CALnCmB,cAAc,kBAMH,CAAC6B,wBAAa,EAAEC,wBAAa,CAAC;AAAAjD,eAAA,CANzCmB,cAAc,aAOR+B,kBAAW;AAqC9BC,8BAAgB,CAACC,UAAU,CAACjC,cAAc,CAAC","ignoreList":[]}
package/package.json CHANGED
@@ -1,20 +1,20 @@
1
1
  {
2
2
  "name": "@teambit/diagnostic",
3
- "version": "1.0.397",
3
+ "version": "1.0.398",
4
4
  "homepage": "https://bit.cloud/teambit/harmony/diagnostic",
5
5
  "main": "dist/index.js",
6
6
  "componentId": {
7
7
  "scope": "teambit.harmony",
8
8
  "name": "diagnostic",
9
- "version": "1.0.397"
9
+ "version": "1.0.398"
10
10
  },
11
11
  "dependencies": {
12
12
  "graphql-tag": "2.12.1",
13
13
  "@teambit/harmony": "0.4.6",
14
- "@teambit/graphql": "1.0.397",
14
+ "@teambit/graphql": "1.0.398",
15
15
  "@teambit/bit.get-bit-version": "0.0.1",
16
- "@teambit/cli": "0.0.974",
17
- "@teambit/express": "0.0.1073"
16
+ "@teambit/cli": "0.0.975",
17
+ "@teambit/express": "0.0.1074"
18
18
  },
19
19
  "devDependencies": {
20
20
  "@types/mocha": "9.1.0",