@teambit/diagnostic 0.0.1
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/__preview-1645365357220.js +1 -0
- package/dist/diagnostic.aspect.d.ts +2 -0
- package/dist/diagnostic.aspect.js +24 -0
- package/dist/diagnostic.aspect.js.map +1 -0
- package/dist/diagnostic.d.ts +4 -0
- package/dist/diagnostic.js +3 -0
- package/dist/diagnostic.js.map +1 -0
- package/dist/diagnostic.main.runtime.d.ts +20 -0
- package/dist/diagnostic.main.runtime.js +137 -0
- package/dist/diagnostic.main.runtime.js.map +1 -0
- package/dist/diagnostic.route.d.ts +10 -0
- package/dist/diagnostic.route.js +48 -0
- package/dist/diagnostic.route.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +28 -0
- package/dist/index.js.map +1 -0
- package/package-tar/teambit-diagnostic-0.0.1.tgz +0 -0
- package/package.json +81 -0
- package/tsconfig.json +34 -0
- package/types/asset.d.ts +29 -0
- package/types/style.d.ts +42 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.DiagnosticAspect = void 0;
|
|
7
|
+
|
|
8
|
+
function _harmony() {
|
|
9
|
+
const data = require("@teambit/harmony");
|
|
10
|
+
|
|
11
|
+
_harmony = function () {
|
|
12
|
+
return data;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
return data;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const DiagnosticAspect = _harmony().Aspect.create({
|
|
19
|
+
id: 'teambit.harmony/diagnostic'
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
exports.DiagnosticAspect = DiagnosticAspect;
|
|
23
|
+
|
|
24
|
+
//# sourceMappingURL=diagnostic.aspect.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["diagnostic.aspect.ts"],"names":["DiagnosticAspect","Aspect","create","id"],"mappings":";;;;;;;AAAA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAEO,MAAMA,gBAAgB,GAAGC,kBAAOC,MAAP,CAAc;AAC5CC,EAAAA,EAAE,EAAE;AADwC,CAAd,CAAzB","sourcesContent":["import { Aspect } from '@teambit/harmony';\n\nexport const DiagnosticAspect = Aspect.create({\n id: 'teambit.harmony/diagnostic',\n});\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { SlotRegistry } from '@teambit/harmony';
|
|
2
|
+
import { ExpressMain } from '@teambit/express';
|
|
3
|
+
import { Diagnostic } from './diagnostic';
|
|
4
|
+
export declare type DiagnosticSlot = SlotRegistry<Diagnostic[]>;
|
|
5
|
+
export declare class DiagnosticMain {
|
|
6
|
+
/** the diagnostic entity slot */
|
|
7
|
+
private diagnosticSlot;
|
|
8
|
+
constructor(
|
|
9
|
+
/** the diagnostic entity slot */
|
|
10
|
+
diagnosticSlot: DiagnosticSlot);
|
|
11
|
+
static slots: ((registerFn: () => string) => SlotRegistry<Diagnostic[]>)[];
|
|
12
|
+
static dependencies: import("@teambit/harmony").Aspect[];
|
|
13
|
+
static runtime: import("@teambit/harmony").RuntimeDefinition;
|
|
14
|
+
register(...diagnostic: Diagnostic[]): void;
|
|
15
|
+
getDiagnosticData(): {};
|
|
16
|
+
static getBitVersion(): {
|
|
17
|
+
version: any;
|
|
18
|
+
};
|
|
19
|
+
static provider([express]: [ExpressMain], config: any, [diagnosticSlot]: [DiagnosticSlot]): Promise<DiagnosticMain>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
require("core-js/modules/es.array.iterator.js");
|
|
6
|
+
|
|
7
|
+
require("core-js/modules/es.promise.js");
|
|
8
|
+
|
|
9
|
+
Object.defineProperty(exports, "__esModule", {
|
|
10
|
+
value: true
|
|
11
|
+
});
|
|
12
|
+
exports.DiagnosticMain = void 0;
|
|
13
|
+
|
|
14
|
+
function _defineProperty2() {
|
|
15
|
+
const data = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
16
|
+
|
|
17
|
+
_defineProperty2 = function () {
|
|
18
|
+
return data;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
return data;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
function _bootstrap() {
|
|
25
|
+
const data = require("@teambit/legacy/dist/bootstrap");
|
|
26
|
+
|
|
27
|
+
_bootstrap = function () {
|
|
28
|
+
return data;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
return data;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function _harmony() {
|
|
35
|
+
const data = require("@teambit/harmony");
|
|
36
|
+
|
|
37
|
+
_harmony = function () {
|
|
38
|
+
return data;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
return data;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function _cli() {
|
|
45
|
+
const data = require("@teambit/cli");
|
|
46
|
+
|
|
47
|
+
_cli = function () {
|
|
48
|
+
return data;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
return data;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
function _express() {
|
|
55
|
+
const data = require("@teambit/express");
|
|
56
|
+
|
|
57
|
+
_express = function () {
|
|
58
|
+
return data;
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
return data;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
function _diagnostic() {
|
|
65
|
+
const data = require("./diagnostic.aspect");
|
|
66
|
+
|
|
67
|
+
_diagnostic = function () {
|
|
68
|
+
return data;
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
return data;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
function _diagnostic2() {
|
|
75
|
+
const data = require("./diagnostic.route");
|
|
76
|
+
|
|
77
|
+
_diagnostic2 = function () {
|
|
78
|
+
return data;
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
return data;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
class DiagnosticMain {
|
|
85
|
+
constructor(
|
|
86
|
+
/** the diagnostic entity slot */
|
|
87
|
+
diagnosticSlot) {
|
|
88
|
+
this.diagnosticSlot = diagnosticSlot;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
register(...diagnostic) {
|
|
92
|
+
this.diagnosticSlot.register(diagnostic);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
getDiagnosticData() {
|
|
96
|
+
const slots = this.diagnosticSlot.toArray();
|
|
97
|
+
return slots.reduce((prev, cSlot) => {
|
|
98
|
+
const [aspectId, diagnostic] = cSlot;
|
|
99
|
+
prev[aspectId] = {
|
|
100
|
+
reports: []
|
|
101
|
+
};
|
|
102
|
+
diagnostic.forEach(diag => {
|
|
103
|
+
const {
|
|
104
|
+
diagnosticFn
|
|
105
|
+
} = diag;
|
|
106
|
+
prev[aspectId].reports.push(diagnosticFn());
|
|
107
|
+
});
|
|
108
|
+
return prev;
|
|
109
|
+
}, {});
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
static getBitVersion() {
|
|
113
|
+
const version = (0, _bootstrap().getHarmonyVersion)(true);
|
|
114
|
+
return {
|
|
115
|
+
version
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
static async provider([express], config, [diagnosticSlot]) {
|
|
120
|
+
const diagnosticMain = new DiagnosticMain(diagnosticSlot);
|
|
121
|
+
diagnosticMain.register({
|
|
122
|
+
diagnosticFn: DiagnosticMain.getBitVersion
|
|
123
|
+
});
|
|
124
|
+
express.register([new (_diagnostic2().DiagnosticRoute)(diagnosticMain)]);
|
|
125
|
+
return diagnosticMain;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
exports.DiagnosticMain = DiagnosticMain;
|
|
131
|
+
(0, _defineProperty2().default)(DiagnosticMain, "slots", [_harmony().Slot.withType()]);
|
|
132
|
+
(0, _defineProperty2().default)(DiagnosticMain, "dependencies", [_express().ExpressAspect]);
|
|
133
|
+
(0, _defineProperty2().default)(DiagnosticMain, "runtime", _cli().MainRuntime);
|
|
134
|
+
|
|
135
|
+
_diagnostic().DiagnosticAspect.addRuntime(DiagnosticMain);
|
|
136
|
+
|
|
137
|
+
//# sourceMappingURL=diagnostic.main.runtime.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["diagnostic.main.runtime.ts"],"names":["DiagnosticMain","constructor","diagnosticSlot","register","diagnostic","getDiagnosticData","slots","toArray","reduce","prev","cSlot","aspectId","reports","forEach","diag","diagnosticFn","push","getBitVersion","version","provider","express","config","diagnosticMain","DiagnosticRoute","Slot","withType","ExpressAspect","MainRuntime","DiagnosticAspect","addRuntime"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAEA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAKO,MAAMA,cAAN,CAAqB;AAC1BC,EAAAA,WAAW;AACT;AACQC,EAAAA,cAFC,EAGT;AAAA,SADQA,cACR,GADQA,cACR;AAAE;;AAKJC,EAAAA,QAAQ,CAAC,GAAGC,UAAJ,EAA8B;AACpC,SAAKF,cAAL,CAAoBC,QAApB,CAA6BC,UAA7B;AACD;;AAEDC,EAAAA,iBAAiB,GAAG;AAClB,UAAMC,KAAK,GAAG,KAAKJ,cAAL,CAAoBK,OAApB,EAAd;AACA,WAAOD,KAAK,CAACE,MAAN,CAAa,CAACC,IAAD,EAAOC,KAAP,KAAiB;AACnC,YAAM,CAACC,QAAD,EAAWP,UAAX,IAAyBM,KAA/B;AACAD,MAAAA,IAAI,CAACE,QAAD,CAAJ,GAAiB;AAAEC,QAAAA,OAAO,EAAE;AAAX,OAAjB;AACAR,MAAAA,UAAU,CAACS,OAAX,CAAoBC,IAAD,IAAU;AAC3B,cAAM;AAAEC,UAAAA;AAAF,YAAmBD,IAAzB;AACAL,QAAAA,IAAI,CAACE,QAAD,CAAJ,CAAeC,OAAf,CAAuBI,IAAvB,CAA4BD,YAAY,EAAxC;AACD,OAHD;AAIA,aAAON,IAAP;AACD,KARM,EAQJ,EARI,CAAP;AASD;;AAEmB,SAAbQ,aAAa,GAAG;AACrB,UAAMC,OAAO,GAAG,oCAAkB,IAAlB,CAAhB;AACA,WAAO;AAAEA,MAAAA;AAAF,KAAP;AACD;;AAEoB,eAARC,QAAQ,CAAC,CAACC,OAAD,CAAD,EAA2BC,MAA3B,EAAwC,CAACnB,cAAD,CAAxC,EAA4E;AAC/F,UAAMoB,cAAc,GAAG,IAAItB,cAAJ,CAAmBE,cAAnB,CAAvB;AACAoB,IAAAA,cAAc,CAACnB,QAAf,CAAwB;AAAEY,MAAAA,YAAY,EAAEf,cAAc,CAACiB;AAA/B,KAAxB;AACAG,IAAAA,OAAO,CAACjB,QAAR,CAAiB,CAAC,KAAIoB,8BAAJ,EAAoBD,cAApB,CAAD,CAAjB;AACA,WAAOA,cAAP;AACD;;AApCyB;;;gCAAftB,c,WAKI,CAACwB,gBAAKC,QAAL,EAAD,C;gCALJzB,c,kBAMW,CAAC0B,wBAAD,C;gCANX1B,c,aAOM2B,kB;;AAgCnBC,+BAAiBC,UAAjB,CAA4B7B,cAA5B","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], config: any, [diagnosticSlot]: [DiagnosticSlot]) {\n const diagnosticMain = new DiagnosticMain(diagnosticSlot);\n diagnosticMain.register({ diagnosticFn: DiagnosticMain.getBitVersion });\n express.register([new DiagnosticRoute(diagnosticMain)]);\n return diagnosticMain;\n }\n}\n\nDiagnosticAspect.addRuntime(DiagnosticMain);\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Route, Verb, Request, Response } from '@teambit/express';
|
|
2
|
+
import type { DiagnosticMain } from './diagnostic.main.runtime';
|
|
3
|
+
export declare class DiagnosticRoute implements Route {
|
|
4
|
+
readonly diagnosticMain: DiagnosticMain;
|
|
5
|
+
constructor(diagnosticMain: DiagnosticMain);
|
|
6
|
+
method: string;
|
|
7
|
+
route: string;
|
|
8
|
+
verb: Verb;
|
|
9
|
+
middlewares: ((req: Request, res: Response) => Promise<void>)[];
|
|
10
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
require("core-js/modules/es.promise.js");
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "__esModule", {
|
|
8
|
+
value: true
|
|
9
|
+
});
|
|
10
|
+
exports.DiagnosticRoute = void 0;
|
|
11
|
+
|
|
12
|
+
function _defineProperty2() {
|
|
13
|
+
const data = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
14
|
+
|
|
15
|
+
_defineProperty2 = function () {
|
|
16
|
+
return data;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
return data;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function _express() {
|
|
23
|
+
const data = require("@teambit/express");
|
|
24
|
+
|
|
25
|
+
_express = function () {
|
|
26
|
+
return data;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
return data;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
class DiagnosticRoute {
|
|
33
|
+
constructor(diagnosticMain) {
|
|
34
|
+
this.diagnosticMain = diagnosticMain;
|
|
35
|
+
(0, _defineProperty2().default)(this, "method", 'GET');
|
|
36
|
+
(0, _defineProperty2().default)(this, "route", '/_diagnostic');
|
|
37
|
+
(0, _defineProperty2().default)(this, "verb", _express().Verb.READ);
|
|
38
|
+
(0, _defineProperty2().default)(this, "middlewares", [async (req, res) => {
|
|
39
|
+
const diagnosticData = this.diagnosticMain.getDiagnosticData();
|
|
40
|
+
res.json(diagnosticData);
|
|
41
|
+
}]);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
exports.DiagnosticRoute = DiagnosticRoute;
|
|
47
|
+
|
|
48
|
+
//# sourceMappingURL=diagnostic.route.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["diagnostic.route.ts"],"names":["DiagnosticRoute","constructor","diagnosticMain","Verb","READ","req","res","diagnosticData","getDiagnosticData","json"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAGO,MAAMA,eAAN,CAAuC;AAC5CC,EAAAA,WAAW,CAAUC,cAAV,EAA0C;AAAA,SAAhCA,cAAgC,GAAhCA,cAAgC;AAAA,oDAE5C,KAF4C;AAAA,mDAG7C,cAH6C;AAAA,kDAI9CC,gBAAKC,IAJyC;AAAA,yDAMvC,CACZ,OAAOC,GAAP,EAAqBC,GAArB,KAAuC;AACrC,YAAMC,cAAc,GAAG,KAAKL,cAAL,CAAoBM,iBAApB,EAAvB;AACAF,MAAAA,GAAG,CAACG,IAAJ,CAASF,cAAT;AACD,KAJW,CANuC;AAAE;;AADX","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"]}
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "DiagnosticAspect", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _diagnostic().DiagnosticAspect;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
exports.default = void 0;
|
|
13
|
+
|
|
14
|
+
function _diagnostic() {
|
|
15
|
+
const data = require("./diagnostic.aspect");
|
|
16
|
+
|
|
17
|
+
_diagnostic = function () {
|
|
18
|
+
return data;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
return data;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
var _default = _diagnostic().DiagnosticAspect;
|
|
25
|
+
|
|
26
|
+
exports.default = _default;
|
|
27
|
+
|
|
28
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["index.ts"],"names":["DiagnosticAspect"],"mappings":";;;;;;;;;;;;;AAAA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;eAGeA,8B","sourcesContent":["import { DiagnosticAspect } from './diagnostic.aspect';\n\nexport type { DiagnosticMain } from './diagnostic.main.runtime';\nexport default DiagnosticAspect;\nexport { DiagnosticAspect };\n"]}
|
|
Binary file
|
package/package.json
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@teambit/diagnostic",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"main": "dist/index.js",
|
|
5
|
+
"componentId": {
|
|
6
|
+
"scope": "teambit.harmony",
|
|
7
|
+
"name": "diagnostic",
|
|
8
|
+
"version": "0.0.1"
|
|
9
|
+
},
|
|
10
|
+
"dependencies": {
|
|
11
|
+
"@teambit/harmony": "0.2.11",
|
|
12
|
+
"@babel/runtime": "7.12.18",
|
|
13
|
+
"core-js": "^3.0.0",
|
|
14
|
+
"@teambit/cli": "0.0.445",
|
|
15
|
+
"@teambit/express": "0.0.539"
|
|
16
|
+
},
|
|
17
|
+
"devDependencies": {
|
|
18
|
+
"@types/mocha": "9.1.0",
|
|
19
|
+
"@types/testing-library__jest-dom": "5.9.5",
|
|
20
|
+
"@types/jest": "^26.0.0",
|
|
21
|
+
"@types/react-dom": "^17.0.5",
|
|
22
|
+
"@types/react": "^17.0.8",
|
|
23
|
+
"@types/node": "12.20.4"
|
|
24
|
+
},
|
|
25
|
+
"peerDependencies": {
|
|
26
|
+
"@teambit/legacy": "1.0.223",
|
|
27
|
+
"react-dom": "^16.8.0 || ^17.0.0",
|
|
28
|
+
"react": "^16.8.0 || ^17.0.0"
|
|
29
|
+
},
|
|
30
|
+
"license": "Apache-2.0",
|
|
31
|
+
"bit": {
|
|
32
|
+
"bindingPrefix": "@teambit",
|
|
33
|
+
"env": {},
|
|
34
|
+
"overrides": {
|
|
35
|
+
"dependencies": {
|
|
36
|
+
"@teambit/legacy": "-",
|
|
37
|
+
"@babel/runtime": "7.12.18",
|
|
38
|
+
"core-js": "^3.0.0",
|
|
39
|
+
"react-dom": "-",
|
|
40
|
+
"react": "-"
|
|
41
|
+
},
|
|
42
|
+
"devDependencies": {
|
|
43
|
+
"@teambit/legacy": "-",
|
|
44
|
+
"@types/mocha": "9.1.0",
|
|
45
|
+
"@types/testing-library__jest-dom": "5.9.5",
|
|
46
|
+
"@types/jest": "^26.0.0",
|
|
47
|
+
"@types/react-dom": "^17.0.5",
|
|
48
|
+
"@types/react": "^17.0.8",
|
|
49
|
+
"@types/node": "12.20.4",
|
|
50
|
+
"react-dom": "-",
|
|
51
|
+
"react": "-"
|
|
52
|
+
},
|
|
53
|
+
"peerDependencies": {
|
|
54
|
+
"@teambit/legacy": "1.0.223",
|
|
55
|
+
"react-dom": "^16.8.0 || ^17.0.0",
|
|
56
|
+
"react": "^16.8.0 || ^17.0.0"
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"private": false,
|
|
61
|
+
"engines": {
|
|
62
|
+
"node": ">=12.22.0"
|
|
63
|
+
},
|
|
64
|
+
"repository": {
|
|
65
|
+
"type": "git",
|
|
66
|
+
"url": "https://github.com/teambit/bit"
|
|
67
|
+
},
|
|
68
|
+
"keywords": [
|
|
69
|
+
"bit",
|
|
70
|
+
"bit-aspect",
|
|
71
|
+
"components",
|
|
72
|
+
"collaboration",
|
|
73
|
+
"web",
|
|
74
|
+
"react",
|
|
75
|
+
"react-components",
|
|
76
|
+
"angular",
|
|
77
|
+
"angular-components",
|
|
78
|
+
"vue",
|
|
79
|
+
"vue-components"
|
|
80
|
+
]
|
|
81
|
+
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"lib": [
|
|
4
|
+
"es2019",
|
|
5
|
+
"DOM",
|
|
6
|
+
"ES6",
|
|
7
|
+
"DOM.Iterable",
|
|
8
|
+
"ScriptHost"
|
|
9
|
+
],
|
|
10
|
+
"target": "es2015",
|
|
11
|
+
"module": "commonjs",
|
|
12
|
+
"jsx": "react",
|
|
13
|
+
"declaration": true,
|
|
14
|
+
"sourceMap": true,
|
|
15
|
+
"skipLibCheck": true,
|
|
16
|
+
"moduleResolution": "node",
|
|
17
|
+
"esModuleInterop": true,
|
|
18
|
+
"resolveJsonModule": true,
|
|
19
|
+
"composite": true,
|
|
20
|
+
"emitDeclarationOnly": true,
|
|
21
|
+
"outDir": "dist",
|
|
22
|
+
"experimentalDecorators": true,
|
|
23
|
+
"emitDecoratorMetadata": true,
|
|
24
|
+
"allowSyntheticDefaultImports": true,
|
|
25
|
+
"strictPropertyInitialization": false,
|
|
26
|
+
"strict": true,
|
|
27
|
+
"noImplicitAny": false,
|
|
28
|
+
"rootDir": ".",
|
|
29
|
+
"preserveConstEnums": true
|
|
30
|
+
},
|
|
31
|
+
"exclude": [
|
|
32
|
+
"dist"
|
|
33
|
+
]
|
|
34
|
+
}
|
package/types/asset.d.ts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
declare module '*.png' {
|
|
2
|
+
const value: any;
|
|
3
|
+
export = value;
|
|
4
|
+
}
|
|
5
|
+
declare module '*.svg' {
|
|
6
|
+
import type { FunctionComponent, SVGProps } from 'react';
|
|
7
|
+
|
|
8
|
+
export const ReactComponent: FunctionComponent<SVGProps<SVGSVGElement> & { title?: string }>;
|
|
9
|
+
const src: string;
|
|
10
|
+
export default src;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
// @TODO Gilad
|
|
14
|
+
declare module '*.jpg' {
|
|
15
|
+
const value: any;
|
|
16
|
+
export = value;
|
|
17
|
+
}
|
|
18
|
+
declare module '*.jpeg' {
|
|
19
|
+
const value: any;
|
|
20
|
+
export = value;
|
|
21
|
+
}
|
|
22
|
+
declare module '*.gif' {
|
|
23
|
+
const value: any;
|
|
24
|
+
export = value;
|
|
25
|
+
}
|
|
26
|
+
declare module '*.bmp' {
|
|
27
|
+
const value: any;
|
|
28
|
+
export = value;
|
|
29
|
+
}
|
package/types/style.d.ts
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
declare module '*.module.css' {
|
|
2
|
+
const classes: { readonly [key: string]: string };
|
|
3
|
+
export default classes;
|
|
4
|
+
}
|
|
5
|
+
declare module '*.module.scss' {
|
|
6
|
+
const classes: { readonly [key: string]: string };
|
|
7
|
+
export default classes;
|
|
8
|
+
}
|
|
9
|
+
declare module '*.module.sass' {
|
|
10
|
+
const classes: { readonly [key: string]: string };
|
|
11
|
+
export default classes;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
declare module '*.module.less' {
|
|
15
|
+
const classes: { readonly [key: string]: string };
|
|
16
|
+
export default classes;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
declare module '*.less' {
|
|
20
|
+
const classes: { readonly [key: string]: string };
|
|
21
|
+
export default classes;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
declare module '*.css' {
|
|
25
|
+
const classes: { readonly [key: string]: string };
|
|
26
|
+
export default classes;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
declare module '*.sass' {
|
|
30
|
+
const classes: { readonly [key: string]: string };
|
|
31
|
+
export default classes;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
declare module '*.scss' {
|
|
35
|
+
const classes: { readonly [key: string]: string };
|
|
36
|
+
export default classes;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
declare module '*.mdx' {
|
|
40
|
+
const component: any;
|
|
41
|
+
export default component;
|
|
42
|
+
}
|