@teambit/diagnostic 1.0.187 → 1.0.189

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.187" tests="0" failures="0" errors="0" skipped="0"/>
3
+ <testsuite name="teambit.harmony/diagnostic@1.0.189" tests="0" failures="0" errors="0" skipped="0"/>
4
4
  </testsuites>
@@ -48,7 +48,8 @@
48
48
  "line": 17,
49
49
  "character": 29
50
50
  },
51
- "name": "DiagnosticSlot"
51
+ "name": "DiagnosticSlot",
52
+ "internalFilePath": "diagnostic.main.runtime.ts"
52
53
  },
53
54
  "isOptional": false,
54
55
  "isSpread": false
@@ -160,7 +161,8 @@
160
161
  "line": 23,
161
162
  "character": 27
162
163
  },
163
- "name": "Diagnostic"
164
+ "name": "Diagnostic",
165
+ "internalFilePath": "diagnostic.ts"
164
166
  }
165
167
  },
166
168
  "isOptional": false,
@@ -255,7 +257,11 @@
255
257
  "line": 46,
256
258
  "character": 26
257
259
  },
258
- "name": "ExpressMain"
260
+ "name": "ExpressMain",
261
+ "componentId": {
262
+ "scope": "teambit.harmony",
263
+ "name": "express"
264
+ }
259
265
  },
260
266
  {
261
267
  "__schema": "TypeRefSchema",
@@ -264,7 +270,11 @@
264
270
  "line": 46,
265
271
  "character": 39
266
272
  },
267
- "name": "GraphqlMain"
273
+ "name": "GraphqlMain",
274
+ "componentId": {
275
+ "scope": "teambit.harmony",
276
+ "name": "graphql"
277
+ }
268
278
  }
269
279
  ]
270
280
  },
@@ -314,7 +324,8 @@
314
324
  "line": 48,
315
325
  "character": 24
316
326
  },
317
- "name": "DiagnosticSlot"
327
+ "name": "DiagnosticSlot",
328
+ "internalFilePath": "diagnostic.main.runtime.ts"
318
329
  }
319
330
  ]
320
331
  },
@@ -405,6 +416,11 @@
405
416
  "character": 30
406
417
  },
407
418
  "name": "SlotRegistry",
419
+ "componentId": {
420
+ "scope": "teambit.harmony",
421
+ "name": "harmony",
422
+ "version": "0.4.6"
423
+ },
408
424
  "typeArgs": [
409
425
  {
410
426
  "__schema": "TypeArraySchema",
@@ -420,7 +436,8 @@
420
436
  "line": 12,
421
437
  "character": 43
422
438
  },
423
- "name": "Diagnostic"
439
+ "name": "Diagnostic",
440
+ "internalFilePath": "diagnostic.ts"
424
441
  }
425
442
  }
426
443
  ]
@@ -461,7 +478,8 @@
461
478
  "line": 17,
462
479
  "character": 29
463
480
  },
464
- "name": "DiagnosticSlot"
481
+ "name": "DiagnosticSlot",
482
+ "internalFilePath": "diagnostic.main.runtime.ts"
465
483
  },
466
484
  "isOptional": false,
467
485
  "isSpread": false
@@ -573,7 +591,8 @@
573
591
  "line": 23,
574
592
  "character": 27
575
593
  },
576
- "name": "Diagnostic"
594
+ "name": "Diagnostic",
595
+ "internalFilePath": "diagnostic.ts"
577
596
  }
578
597
  },
579
598
  "isOptional": false,
@@ -668,7 +687,11 @@
668
687
  "line": 46,
669
688
  "character": 26
670
689
  },
671
- "name": "ExpressMain"
690
+ "name": "ExpressMain",
691
+ "componentId": {
692
+ "scope": "teambit.harmony",
693
+ "name": "express"
694
+ }
672
695
  },
673
696
  {
674
697
  "__schema": "TypeRefSchema",
@@ -677,7 +700,11 @@
677
700
  "line": 46,
678
701
  "character": 39
679
702
  },
680
- "name": "GraphqlMain"
703
+ "name": "GraphqlMain",
704
+ "componentId": {
705
+ "scope": "teambit.harmony",
706
+ "name": "graphql"
707
+ }
681
708
  }
682
709
  ]
683
710
  },
@@ -727,7 +754,8 @@
727
754
  "line": 48,
728
755
  "character": 24
729
756
  },
730
- "name": "DiagnosticSlot"
757
+ "name": "DiagnosticSlot",
758
+ "internalFilePath": "diagnostic.main.runtime.ts"
731
759
  }
732
760
  ]
733
761
  },
@@ -808,7 +836,7 @@
808
836
  "componentId": {
809
837
  "scope": "teambit.harmony",
810
838
  "name": "diagnostic",
811
- "version": "1.0.187"
839
+ "version": "1.0.189"
812
840
  },
813
841
  "taggedModuleExports": []
814
842
  }
@@ -1 +1 @@
1
- {"version":3,"names":["_harmony","data","require","DiagnosticAspect","exports","Aspect","create","id"],"sources":["diagnostic.aspect.ts"],"sourcesContent":["import { Aspect } from '@teambit/harmony';\n\nexport const DiagnosticAspect = Aspect.create({\n id: 'teambit.harmony/diagnostic',\n});\n"],"mappings":";;;;;;AAAA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEO,MAAME,gBAAgB,GAAAC,OAAA,CAAAD,gBAAA,GAAGE,iBAAM,CAACC,MAAM,CAAC;EAC5CC,EAAE,EAAE;AACN,CAAC,CAAC"}
1
+ {"version":3,"names":["_harmony","data","require","DiagnosticAspect","exports","Aspect","create","id"],"sources":["diagnostic.aspect.ts"],"sourcesContent":["import { Aspect } from '@teambit/harmony';\n\nexport const DiagnosticAspect = Aspect.create({\n id: 'teambit.harmony/diagnostic',\n});\n"],"mappings":";;;;;;AAAA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEO,MAAME,gBAAgB,GAAAC,OAAA,CAAAD,gBAAA,GAAGE,iBAAM,CAACC,MAAM,CAAC;EAC5CC,EAAE,EAAE;AACN,CAAC,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_graphqlTag","data","require","_defineProperty","obj","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","String","r","e","Symbol","toPrimitive","call","TypeError","Number","DiagnosticGraphql","constructor","diagnosticMain","gql","Query","_diagnostic","getDiagnosticData","exports"],"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,SAAAA,YAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,WAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAAkC,SAAAE,gBAAAC,GAAA,EAAAC,GAAA,EAAAC,KAAA,IAAAD,GAAA,GAAAE,cAAA,CAAAF,GAAA,OAAAA,GAAA,IAAAD,GAAA,IAAAI,MAAA,CAAAC,cAAA,CAAAL,GAAA,EAAAC,GAAA,IAAAC,KAAA,EAAAA,KAAA,EAAAI,UAAA,QAAAC,YAAA,QAAAC,QAAA,oBAAAR,GAAA,CAAAC,GAAA,IAAAC,KAAA,WAAAF,GAAA;AAAA,SAAAG,eAAAM,CAAA,QAAAC,CAAA,GAAAC,YAAA,CAAAF,CAAA,uCAAAC,CAAA,GAAAA,CAAA,GAAAE,MAAA,CAAAF,CAAA;AAAA,SAAAC,aAAAF,CAAA,EAAAI,CAAA,2BAAAJ,CAAA,KAAAA,CAAA,SAAAA,CAAA,MAAAK,CAAA,GAAAL,CAAA,CAAAM,MAAA,CAAAC,WAAA,kBAAAF,CAAA,QAAAJ,CAAA,GAAAI,CAAA,CAAAG,IAAA,CAAAR,CAAA,EAAAI,CAAA,uCAAAH,CAAA,SAAAA,CAAA,YAAAQ,SAAA,yEAAAL,CAAA,GAAAD,MAAA,GAAAO,MAAA,EAAAV,CAAA;AAG3B,MAAMW,iBAAiB,CAAmB;EAC/CC,WAAWA,CAASC,cAA8B,EAAE;IAAA,KAAhCA,cAA8B,GAA9BA,cAA8B;IAAAvB,eAAA,mBAEvC,IAAAwB,iBAAG,CAAC;AACjB;AACA;AACA;AACA;AACA;AACA,GAAG;IAAAxB,eAAA,oBACW;MACVyB,KAAK,EAAE;QACLC,WAAW,EAAEA,CAAA,KAAM;UACjB,OAAO,IAAI,CAACH,cAAc,CAACI,iBAAiB,CAAC,CAAC;QAChD;MACF;IACF,CAAC;EAfoD;AAgBvD;AAACC,OAAA,CAAAP,iBAAA,GAAAA,iBAAA"}
1
+ {"version":3,"names":["_graphqlTag","data","require","_defineProperty","obj","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","String","r","e","Symbol","toPrimitive","call","TypeError","Number","DiagnosticGraphql","constructor","diagnosticMain","gql","Query","_diagnostic","getDiagnosticData","exports"],"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,SAAAA,YAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,WAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAAkC,SAAAE,gBAAAC,GAAA,EAAAC,GAAA,EAAAC,KAAA,IAAAD,GAAA,GAAAE,cAAA,CAAAF,GAAA,OAAAA,GAAA,IAAAD,GAAA,IAAAI,MAAA,CAAAC,cAAA,CAAAL,GAAA,EAAAC,GAAA,IAAAC,KAAA,EAAAA,KAAA,EAAAI,UAAA,QAAAC,YAAA,QAAAC,QAAA,oBAAAR,GAAA,CAAAC,GAAA,IAAAC,KAAA,WAAAF,GAAA;AAAA,SAAAG,eAAAM,CAAA,QAAAC,CAAA,GAAAC,YAAA,CAAAF,CAAA,uCAAAC,CAAA,GAAAA,CAAA,GAAAE,MAAA,CAAAF,CAAA;AAAA,SAAAC,aAAAF,CAAA,EAAAI,CAAA,2BAAAJ,CAAA,KAAAA,CAAA,SAAAA,CAAA,MAAAK,CAAA,GAAAL,CAAA,CAAAM,MAAA,CAAAC,WAAA,kBAAAF,CAAA,QAAAJ,CAAA,GAAAI,CAAA,CAAAG,IAAA,CAAAR,CAAA,EAAAI,CAAA,uCAAAH,CAAA,SAAAA,CAAA,YAAAQ,SAAA,yEAAAL,CAAA,GAAAD,MAAA,GAAAO,MAAA,EAAAV,CAAA;AAG3B,MAAMW,iBAAiB,CAAmB;EAC/CC,WAAWA,CAASC,cAA8B,EAAE;IAAA,KAAhCA,cAA8B,GAA9BA,cAA8B;IAAAvB,eAAA,mBAEvC,IAAAwB,iBAAG,CAAC;AACjB;AACA;AACA;AACA;AACA;AACA,GAAG;IAAAxB,eAAA,oBACW;MACVyB,KAAK,EAAE;QACLC,WAAW,EAAEA,CAAA,KAAM;UACjB,OAAO,IAAI,CAACH,cAAc,CAACI,iBAAiB,CAAC,CAAC;QAChD;MACF;IACF,CAAC;EAfoD;AAgBvD;AAACC,OAAA,CAAAP,iBAAA,GAAAA,iBAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["diagnostic.ts"],"sourcesContent":["export type DiagnosticFc = () => Object;\n\nexport interface Diagnostic {\n diagnosticFn: DiagnosticFc;\n}\n"],"mappings":""}
1
+ {"version":3,"names":[],"sources":["diagnostic.ts"],"sourcesContent":["export type DiagnosticFc = () => Object;\n\nexport interface Diagnostic {\n diagnosticFn: DiagnosticFc;\n}\n"],"mappings":"","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_bootstrap","data","require","_harmony","_cli","_express","_graphql","_diagnostic","_diagnostic2","_diagnostic3","_defineProperty","obj","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","String","r","e","Symbol","toPrimitive","call","TypeError","Number","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","exports","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,SAAAA,WAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,UAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAE,SAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,QAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,KAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,IAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,SAAA;EAAA,MAAAJ,IAAA,GAAAC,OAAA;EAAAG,QAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,SAAA;EAAA,MAAAL,IAAA,GAAAC,OAAA;EAAAI,QAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,YAAA;EAAA,MAAAN,IAAA,GAAAC,OAAA;EAAAK,WAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAO,aAAA;EAAA,MAAAP,IAAA,GAAAC,OAAA;EAAAM,YAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAQ,aAAA;EAAA,MAAAR,IAAA,GAAAC,OAAA;EAAAO,YAAA,YAAAA,CAAA;IAAA,OAAAR,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAAyD,SAAAS,gBAAAC,GAAA,EAAAC,GAAA,EAAAC,KAAA,IAAA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AAM;UAAEC;QAAa,CAAC,GAAGD,IAAI;QAC7BL,IAAI,CAACE,QAAQ,CAAC,CAACC,OAAO,CAACI,IAAI,CAACD,YAAY,CAAC,CAAC,CAAC;MAC7C,CAAC,CAAC;MACF,OAAON,IAAI;IACb,CAAC,EAAE,CAAC,CAAC,CAAC;EACR;EAEA,OAAOQ,aAAaA,CAAA,EAAG;IACrB,MAAMC,OAAO,GAAG,IAAAC,8BAAiB,EAAC,IAAI,CAAC;IACvC,OAAO;MAAED;IAAQ,CAAC;EACpB;EAEA,aAAaE,QAAQA,CACnB,CAACC,OAAO,EAAEC,OAAO,CAA6B,EAC9CC,MAAW,EACX,CAACrB,cAAc,CAAmB,EAClC;IACA,MAAMsB,cAAc,GAAG,IAAIxB,cAAc,CAACE,cAAc,CAAC;IACzDsB,cAAc,CAACrB,QAAQ,CAAC;MAAEY,YAAY,EAAEf,cAAc,CAACiB;IAAc,CAAC,CAAC;IACvEI,OAAO,CAAClB,QAAQ,CAAC,CAAC,KAAIsB,8BAAe,EAACD,cAAc,CAAC,CAAC,CAAC;IACvDF,OAAO,CAACnB,QAAQ,CAAC,KAAIuB,gCAAiB,EAACF,cAAc,CAAC,CAAC;IACvD,OAAOA,cAAc;EACvB;AACF;AAACG,OAAA,CAAA3B,cAAA,GAAAA,cAAA;AAAArB,eAAA,CA1CYqB,cAAc,WAKV,CAAC4B,eAAI,CAACC,QAAQ,CAAe,CAAC,CAAC;AAAAlD,eAAA,CALnCqB,cAAc,kBAMH,CAAC8B,wBAAa,EAAEC,wBAAa,CAAC;AAAApD,eAAA,CANzCqB,cAAc,aAORgC,kBAAW;AAqC9BC,8BAAgB,CAACC,UAAU,CAAClC,cAAc,CAAC"}
1
+ {"version":3,"names":["_bootstrap","data","require","_harmony","_cli","_express","_graphql","_diagnostic","_diagnostic2","_diagnostic3","_defineProperty","obj","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","String","r","e","Symbol","toPrimitive","call","TypeError","Number","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","exports","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,SAAAA,WAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,UAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAE,SAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,QAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,KAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,IAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,SAAA;EAAA,MAAAJ,IAAA,GAAAC,OAAA;EAAAG,QAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,SAAA;EAAA,MAAAL,IAAA,GAAAC,OAAA;EAAAI,QAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,YAAA;EAAA,MAAAN,IAAA,GAAAC,OAAA;EAAAK,WAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAO,aAAA;EAAA,MAAAP,IAAA,GAAAC,OAAA;EAAAM,YAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAQ,aAAA;EAAA,MAAAR,IAAA,GAAAC,OAAA;EAAAO,YAAA,YAAAA,CAAA;IAAA,OAAAR,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAAyD,SAAAS,gBAAAC,GAAA,EAAAC,GAAA,EAAAC,KAAA,IAAAD,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M;UAAEC;QAAa,CAAC,GAAGD,IAAI;QAC7BL,IAAI,CAACE,QAAQ,CAAC,CAACC,OAAO,CAACI,IAAI,CAACD,YAAY,CAAC,CAAC,CAAC;MAC7C,CAAC,CAAC;MACF,OAAON,IAAI;IACb,CAAC,EAAE,CAAC,CAAC,CAAC;EACR;EAEA,OAAOQ,aAAaA,CAAA,EAAG;IACrB,MAAMC,OAAO,GAAG,IAAAC,8BAAiB,EAAC,IAAI,CAAC;IACvC,OAAO;MAAED;IAAQ,CAAC;EACpB;EAEA,aAAaE,QAAQA,CACnB,CAACC,OAAO,EAAEC,OAAO,CAA6B,EAC9CC,MAAW,EACX,CAACrB,cAAc,CAAmB,EAClC;IACA,MAAMsB,cAAc,GAAG,IAAIxB,cAAc,CAACE,cAAc,CAAC;IACzDsB,cAAc,CAACrB,QAAQ,CAAC;MAAEY,YAAY,EAAEf,cAAc,CAACiB;IAAc,CAAC,CAAC;IACvEI,OAAO,CAAClB,QAAQ,CAAC,CAAC,KAAIsB,8BAAe,EAACD,cAAc,CAAC,CAAC,CAAC;IACvDF,OAAO,CAACnB,QAAQ,CAAC,KAAIuB,gCAAiB,EAACF,cAAc,CAAC,CAAC;IACvD,OAAOA,cAAc;EACvB;AACF;AAACG,OAAA,CAAA3B,cAAA,GAAAA,cAAA;AAAArB,eAAA,CA1CYqB,cAAc,WAKV,CAAC4B,eAAI,CAACC,QAAQ,CAAe,CAAC,CAAC;AAAAlD,eAAA,CALnCqB,cAAc,kBAMH,CAAC8B,wBAAa,EAAEC,wBAAa,CAAC;AAAApD,eAAA,CANzCqB,cAAc,aAORgC,kBAAW;AAqC9BC,8BAAgB,CAACC,UAAU,CAAClC,cAAc,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_express","data","require","_defineProperty","obj","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","String","r","e","Symbol","toPrimitive","call","TypeError","Number","DiagnosticRoute","constructor","diagnosticMain","Verb","READ","req","res","diagnosticData","getDiagnosticData","json","exports"],"sources":["diagnostic.route.ts"],"sourcesContent":["import { Route, Verb, Request, Response } from '@teambit/express';\nimport type { DiagnosticMain } from './diagnostic.main.runtime';\n\nexport class DiagnosticRoute implements Route {\n constructor(readonly diagnosticMain: DiagnosticMain) {}\n\n method = 'GET';\n route = '/_diagnostic';\n verb = Verb.READ;\n\n middlewares = [\n async (req: Request, res: Response) => {\n const diagnosticData = this.diagnosticMain.getDiagnosticData();\n res.json(diagnosticData);\n },\n ];\n}\n"],"mappings":";;;;;;AAAA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAAkE,SAAAE,gBAAAC,GAAA,EAAAC,GAAA,EAAAC,KAAA,IAAAD,GAAA,GAAAE,cAAA,CAAAF,GAAA,OAAAA,GAAA,IAAAD,GAAA,IAAAI,MAAA,CAAAC,cAAA,CAAAL,GAAA,EAAAC,GAAA,IAAAC,KAAA,EAAAA,KAAA,EAAAI,UAAA,QAAAC,YAAA,QAAAC,QAAA,oBAAAR,GAAA,CAAAC,GAAA,IAAAC,KAAA,WAAAF,GAAA;AAAA,SAAAG,eAAAM,CAAA,QAAAC,CAAA,GAAAC,YAAA,CAAAF,CAAA,uCAAAC,CAAA,GAAAA,CAAA,GAAAE,MAAA,CAAAF,CAAA;AAAA,SAAAC,aAAAF,CAAA,EAAAI,CAAA,2BAAAJ,CAAA,KAAAA,CAAA,SAAAA,CAAA,MAAAK,CAAA,GAAAL,CAAA,CAAAM,MAAA,CAAAC,WAAA,kBAAAF,CAAA,QAAAJ,CAAA,GAAAI,CAAA,CAAAG,IAAA,CAAAR,CAAA,EAAAI,CAAA,uCAAAH,CAAA,SAAAA,CAAA,YAAAQ,SAAA,yEAAAL,CAAA,GAAAD,MAAA,GAAAO,MAAA,EAAAV,CAAA;AAG3D,MAAMW,eAAe,CAAkB;EAC5CC,WAAWA,CAAUC,cAA8B,EAAE;IAAA,KAAhCA,cAA8B,GAA9BA,cAA8B;IAAAvB,eAAA,iBAE1C,KAAK;IAAAA,eAAA,gBACN,cAAc;IAAAA,eAAA,eACfwB,eAAI,CAACC,IAAI;IAAAzB,eAAA,sBAEF,CACZ,OAAO0B,GAAY,EAAEC,GAAa,KAAK;MACrC,MAAMC,cAAc,GAAG,IAAI,CAACL,cAAc,CAACM,iBAAiB,CAAC,CAAC;MAC9DF,GAAG,CAACG,IAAI,CAACF,cAAc,CAAC;IAC1B,CAAC,CACF;EAXqD;AAYxD;AAACG,OAAA,CAAAV,eAAA,GAAAA,eAAA"}
1
+ {"version":3,"names":["_express","data","require","_defineProperty","obj","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","String","r","e","Symbol","toPrimitive","call","TypeError","Number","DiagnosticRoute","constructor","diagnosticMain","Verb","READ","req","res","diagnosticData","getDiagnosticData","json","exports"],"sources":["diagnostic.route.ts"],"sourcesContent":["import { Route, Verb, Request, Response } from '@teambit/express';\nimport type { DiagnosticMain } from './diagnostic.main.runtime';\n\nexport class DiagnosticRoute implements Route {\n constructor(readonly diagnosticMain: DiagnosticMain) {}\n\n method = 'GET';\n route = '/_diagnostic';\n verb = Verb.READ;\n\n middlewares = [\n async (req: Request, res: Response) => {\n const diagnosticData = this.diagnosticMain.getDiagnosticData();\n res.json(diagnosticData);\n },\n ];\n}\n"],"mappings":";;;;;;AAAA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAAkE,SAAAE,gBAAAC,GAAA,EAAAC,GAAA,EAAAC,KAAA,IAAAD,GAAA,GAAAE,cAAA,CAAAF,GAAA,OAAAA,GAAA,IAAAD,GAAA,IAAAI,MAAA,CAAAC,cAAA,CAAAL,GAAA,EAAAC,GAAA,IAAAC,KAAA,EAAAA,KAAA,EAAAI,UAAA,QAAAC,YAAA,QAAAC,QAAA,oBAAAR,GAAA,CAAAC,GAAA,IAAAC,KAAA,WAAAF,GAAA;AAAA,SAAAG,eAAAM,CAAA,QAAAC,CAAA,GAAAC,YAAA,CAAAF,CAAA,uCAAAC,CAAA,GAAAA,CAAA,GAAAE,MAAA,CAAAF,CAAA;AAAA,SAAAC,aAAAF,CAAA,EAAAI,CAAA,2BAAAJ,CAAA,KAAAA,CAAA,SAAAA,CAAA,MAAAK,CAAA,GAAAL,CAAA,CAAAM,MAAA,CAAAC,WAAA,kBAAAF,CAAA,QAAAJ,CAAA,GAAAI,CAAA,CAAAG,IAAA,CAAAR,CAAA,EAAAI,CAAA,uCAAAH,CAAA,SAAAA,CAAA,YAAAQ,SAAA,yEAAAL,CAAA,GAAAD,MAAA,GAAAO,MAAA,EAAAV,CAAA;AAG3D,MAAMW,eAAe,CAAkB;EAC5CC,WAAWA,CAAUC,cAA8B,EAAE;IAAA,KAAhCA,cAA8B,GAA9BA,cAA8B;IAAAvB,eAAA,iBAE1C,KAAK;IAAAA,eAAA,gBACN,cAAc;IAAAA,eAAA,eACfwB,eAAI,CAACC,IAAI;IAAAzB,eAAA,sBAEF,CACZ,OAAO0B,GAAY,EAAEC,GAAa,KAAK;MACrC,MAAMC,cAAc,GAAG,IAAI,CAACL,cAAc,CAACM,iBAAiB,CAAC,CAAC;MAC9DF,GAAG,CAACG,IAAI,CAACF,cAAc,CAAC;IAC1B,CAAC,CACF;EAXqD;AAYxD;AAACG,OAAA,CAAAV,eAAA,GAAAA,eAAA","ignoreList":[]}
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"names":["_diagnostic","data","require","_default","exports","default","DiagnosticAspect"],"sources":["index.ts"],"sourcesContent":["import { DiagnosticAspect } from './diagnostic.aspect';\n\nexport type { DiagnosticMain } from './diagnostic.main.runtime';\nexport default DiagnosticAspect;\nexport { DiagnosticAspect };\n"],"mappings":";;;;;;;;;;;;AAAA,SAAAA,YAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,WAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAAuD,IAAAE,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAGxCC,8BAAgB"}
1
+ {"version":3,"names":["_diagnostic","data","require","_default","exports","default","DiagnosticAspect"],"sources":["index.ts"],"sourcesContent":["import { DiagnosticAspect } from './diagnostic.aspect';\n\nexport type { DiagnosticMain } from './diagnostic.main.runtime';\nexport default DiagnosticAspect;\nexport { DiagnosticAspect };\n"],"mappings":";;;;;;;;;;;;AAAA,SAAAA,YAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,WAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAAuD,IAAAE,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAGxCC,8BAAgB","ignoreList":[]}
package/package.json CHANGED
@@ -1,24 +1,24 @@
1
1
  {
2
2
  "name": "@teambit/diagnostic",
3
- "version": "1.0.187",
3
+ "version": "1.0.189",
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.187"
9
+ "version": "1.0.189"
10
10
  },
11
11
  "dependencies": {
12
12
  "graphql-tag": "2.12.1",
13
13
  "@teambit/harmony": "0.4.6",
14
- "@teambit/graphql": "1.0.187",
15
- "@teambit/cli": "0.0.855",
16
- "@teambit/express": "0.0.954"
14
+ "@teambit/graphql": "1.0.189",
15
+ "@teambit/cli": "0.0.856",
16
+ "@teambit/express": "0.0.955"
17
17
  },
18
18
  "devDependencies": {
19
19
  "@types/mocha": "9.1.0",
20
20
  "chai": "4.3.0",
21
- "@teambit/harmony.envs.core-aspect-env": "0.0.25"
21
+ "@teambit/harmony.envs.core-aspect-env": "0.0.27"
22
22
  },
23
23
  "peerDependencies": {
24
24
  "@teambit/legacy": "1.0.624"