testeranto 0.75.0 → 0.79.3
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/README.md +25 -24
- package/devBot.dockerfile +12 -0
- package/dist/common/Node.js +1 -0
- package/dist/common/PM/index.js +0 -64
- package/dist/common/PM/main.js +278 -7
- package/dist/common/PM/node.js +4 -0
- package/dist/common/PM/web.js +3 -0
- package/dist/common/Project.js +6 -2
- package/dist/common/Puppeteer.js +12 -17
- package/dist/common/Reporter.js +1 -8
- package/dist/common/SubPackages/react-dom/component/web.js +5 -25
- package/dist/common/SubPackages/react-dom/jsx/web.js +80 -55
- package/dist/common/SubPackages/react-test-renderer/component/index.js +0 -86
- package/dist/common/SubPackages/react-test-renderer/component/interface.js +68 -0
- package/dist/common/SubPackages/react-test-renderer/component/node.js +2 -2
- package/dist/common/SubPackages/react-test-renderer/component/web.js +2 -2
- package/dist/common/TaskManBackEnd.js +156 -0
- package/dist/common/Types.js +0 -2
- package/dist/common/esbuildConfigs/index.js +1 -0
- package/dist/common/esbuildConfigs/inputFilesPlugin.js +49 -0
- package/dist/common/esbuildConfigs/node.js +3 -1
- package/dist/common/esbuildConfigs/web.js +3 -1
- package/dist/common/lib/abstractBase.js +222 -17
- package/dist/common/lib/basebuilder.js +4 -38
- package/dist/common/lib/classBuilder.js +1 -3
- package/dist/common/lib/core.js +3 -5
- package/dist/common/mongooseSchemas.js +56 -0
- package/dist/common/tsconfig.common.tsbuildinfo +1 -1
- package/dist/common/utils.js +16 -0
- package/dist/module/ExampleTab.js +112 -0
- package/dist/module/Node.js +1 -0
- package/dist/module/PM/index.js +0 -64
- package/dist/module/PM/main.js +278 -7
- package/dist/module/PM/node.js +4 -0
- package/dist/module/PM/web.js +3 -0
- package/dist/module/Project.js +6 -2
- package/dist/module/Puppeteer.js +12 -17
- package/dist/module/Reporter.js +1 -8
- package/dist/module/SubPackages/react-dom/component/web.js +5 -25
- package/dist/module/SubPackages/react-dom/jsx/web.js +80 -55
- package/dist/module/SubPackages/react-test-renderer/component/index.js +1 -59
- package/dist/module/SubPackages/react-test-renderer/component/interface.js +39 -0
- package/dist/module/SubPackages/react-test-renderer/component/node.js +1 -1
- package/dist/module/SubPackages/react-test-renderer/component/web.js +1 -1
- package/dist/module/TaskManBackEnd.js +151 -0
- package/dist/module/TaskManFrontEnd.js +600 -0
- package/dist/module/Types.js +0 -2
- package/dist/module/esbuildConfigs/index.js +1 -0
- package/dist/module/esbuildConfigs/inputFilesPlugin.js +44 -0
- package/dist/module/esbuildConfigs/node.js +3 -1
- package/dist/module/esbuildConfigs/web.js +3 -1
- package/dist/module/lib/abstractBase.js +222 -17
- package/dist/module/lib/basebuilder.js +4 -38
- package/dist/module/lib/classBuilder.js +1 -3
- package/dist/module/lib/core.js +3 -5
- package/dist/module/mongooseSchemas.js +50 -0
- package/dist/module/tsconfig.module.tsbuildinfo +1 -1
- package/dist/module/utils.js +9 -0
- package/dist/prebuild/Report.js +117 -36
- package/dist/prebuild/TaskManBackEnd.mjs +185 -0
- package/dist/prebuild/TaskManFrontEnd.css +12301 -0
- package/dist/prebuild/TaskManFrontEnd.js +81737 -0
- package/dist/types/Node.d.ts +1 -1
- package/dist/types/PM/index.d.ts +2 -1
- package/dist/types/PM/main.d.ts +6 -3
- package/dist/types/PM/node.d.ts +2 -0
- package/dist/types/PM/web.d.ts +1 -0
- package/dist/types/SubPackages/puppeteer.d.ts +1 -1
- package/dist/types/SubPackages/react/component/node.d.ts +1 -1
- package/dist/types/SubPackages/react/component/web.d.ts +1 -1
- package/dist/types/SubPackages/react/jsx/node.d.ts +2 -2
- package/dist/types/SubPackages/react/jsx/web.d.ts +2 -2
- package/dist/types/SubPackages/react-dom/component/node.d.ts +2 -2
- package/dist/types/SubPackages/react-dom/component/web.d.ts +8 -2
- package/dist/types/SubPackages/react-dom/jsx/node.d.ts +2 -2
- package/dist/types/SubPackages/react-dom/jsx/web.d.ts +2 -2
- package/dist/types/SubPackages/react-test-renderer/MemoExoticComponent/node.d.ts +2 -2
- package/dist/types/SubPackages/react-test-renderer/component/index.d.ts +0 -7
- package/dist/types/SubPackages/react-test-renderer/component/interface.d.ts +9 -0
- package/dist/types/SubPackages/react-test-renderer/component/node.d.ts +1 -2
- package/dist/types/SubPackages/react-test-renderer/component/web.d.ts +1 -2
- package/dist/types/SubPackages/react-test-renderer/fc/node.d.ts +1 -1
- package/dist/types/SubPackages/react-test-renderer/fc/web.d.ts +1 -1
- package/dist/types/SubPackages/react-test-renderer/jsx/node.d.ts +1 -2
- package/dist/types/SubPackages/react-test-renderer/jsx/web.d.ts +1 -2
- package/dist/types/SubPackages/react-test-renderer/jsx-promised/node.d.ts +1 -2
- package/dist/types/SubPackages/react-test-renderer/jsx-promised/web.d.ts +1 -2
- package/dist/types/TaskManBackEnd.d.ts +1 -0
- package/dist/types/Types.d.ts +19 -19
- package/dist/types/Web.d.ts +1 -1
- package/dist/types/esbuildConfigs/inputFilesPlugin.d.ts +5 -0
- package/dist/types/lib/abstractBase.d.ts +8 -8
- package/dist/types/lib/basebuilder.d.ts +1 -1
- package/dist/types/lib/classBuilder.d.ts +1 -1
- package/dist/types/lib/core.d.ts +1 -1
- package/dist/types/lib/index.d.ts +5 -5
- package/dist/types/lib/types.d.ts +15 -13
- package/dist/types/mongooseSchemas.d.ts +124 -0
- package/dist/types/tsconfig.types.tsbuildinfo +1 -1
- package/dist/types/utils.d.ts +2 -0
- package/docker-compose-dev.yml +9 -0
- package/docker-compose-prod.yml +18 -0
- package/package.json +20 -7
- package/src/ExampleTab.tsx +219 -0
- package/src/Node.ts +31 -2
- package/src/PM/index.ts +6 -83
- package/src/PM/main.ts +389 -11
- package/src/PM/node.ts +6 -0
- package/src/PM/web.ts +4 -0
- package/src/Project.ts +10 -2
- package/src/Puppeteer.ts +16 -17
- package/src/Report.tsx +17 -40
- package/src/Reporter.ts +1 -9
- package/src/SubPackages/react-dom/component/web.ts +10 -30
- package/src/SubPackages/react-dom/jsx/web.ts +111 -74
- package/src/SubPackages/react-test-renderer/component/index.ts +0 -66
- package/src/SubPackages/react-test-renderer/component/interface.ts +48 -0
- package/src/SubPackages/react-test-renderer/component/node.ts +2 -1
- package/src/SubPackages/react-test-renderer/component/web.ts +2 -1
- package/src/TaskManBackEnd.ts +200 -0
- package/src/TaskManFrontEnd.tsx +1222 -0
- package/src/Types.ts +136 -28
- package/src/Web.ts +32 -2
- package/src/esbuildConfigs/index.ts +1 -0
- package/src/esbuildConfigs/inputFilesPlugin.ts +65 -0
- package/src/esbuildConfigs/node.ts +3 -1
- package/src/esbuildConfigs/web.ts +4 -0
- package/src/lib/abstractBase.ts +337 -34
- package/src/lib/basebuilder.ts +17 -52
- package/src/lib/classBuilder.ts +14 -2
- package/src/lib/core.ts +18 -7
- package/src/lib/index.ts +115 -7
- package/src/lib/types.ts +143 -35
- package/src/mongooseSchemas.ts +105 -0
- package/src/utils.ts +15 -0
- package/yarn-error.log +3144 -0
package/src/lib/index.ts
CHANGED
|
@@ -12,7 +12,22 @@ import { ITestInterface } from "./types.js";
|
|
|
12
12
|
|
|
13
13
|
// import { INodeUtils, ITestInterface, IUtils, IWebUtils } from "./types.js";
|
|
14
14
|
|
|
15
|
-
export const BaseTestInterface: ITestInterface<
|
|
15
|
+
export const BaseTestInterface: ITestInterface<
|
|
16
|
+
IBaseTest<
|
|
17
|
+
unknown,
|
|
18
|
+
unknown,
|
|
19
|
+
unknown,
|
|
20
|
+
unknown,
|
|
21
|
+
unknown,
|
|
22
|
+
unknown,
|
|
23
|
+
unknown,
|
|
24
|
+
Record<string, any>,
|
|
25
|
+
Record<string, any>,
|
|
26
|
+
Record<string, any>,
|
|
27
|
+
Record<string, any>,
|
|
28
|
+
Record<string, any>
|
|
29
|
+
>
|
|
30
|
+
> = {
|
|
16
31
|
beforeAll: async (s) => s,
|
|
17
32
|
beforeEach: async function (
|
|
18
33
|
subject: any,
|
|
@@ -24,8 +39,39 @@ export const BaseTestInterface: ITestInterface<IBaseTest> = {
|
|
|
24
39
|
return subject as any;
|
|
25
40
|
},
|
|
26
41
|
afterEach: async (s) => s,
|
|
27
|
-
afterAll: (
|
|
28
|
-
|
|
42
|
+
afterAll: (
|
|
43
|
+
store: IBaseTest<
|
|
44
|
+
unknown,
|
|
45
|
+
unknown,
|
|
46
|
+
unknown,
|
|
47
|
+
unknown,
|
|
48
|
+
unknown,
|
|
49
|
+
unknown,
|
|
50
|
+
unknown,
|
|
51
|
+
Record<string, any>,
|
|
52
|
+
Record<string, any>,
|
|
53
|
+
Record<string, any>,
|
|
54
|
+
Record<string, any>,
|
|
55
|
+
Record<string, any>
|
|
56
|
+
>["istore"]
|
|
57
|
+
) => undefined,
|
|
58
|
+
butThen: async (
|
|
59
|
+
store: IBaseTest<
|
|
60
|
+
unknown,
|
|
61
|
+
unknown,
|
|
62
|
+
unknown,
|
|
63
|
+
unknown,
|
|
64
|
+
unknown,
|
|
65
|
+
unknown,
|
|
66
|
+
unknown,
|
|
67
|
+
Record<string, any>,
|
|
68
|
+
Record<string, any>,
|
|
69
|
+
Record<string, any>,
|
|
70
|
+
Record<string, any>,
|
|
71
|
+
Record<string, any>
|
|
72
|
+
>["istore"],
|
|
73
|
+
thenCb
|
|
74
|
+
) => thenCb(store),
|
|
29
75
|
andWhen: (a) => a,
|
|
30
76
|
assertThis: () => null,
|
|
31
77
|
};
|
|
@@ -73,8 +119,38 @@ export type ITestArtificer = (key: string, data: any) => void;
|
|
|
73
119
|
type ITest = {
|
|
74
120
|
toObj(): object;
|
|
75
121
|
name: string;
|
|
76
|
-
givens: IGivens<
|
|
77
|
-
|
|
122
|
+
givens: IGivens<
|
|
123
|
+
IBaseTest<
|
|
124
|
+
unknown,
|
|
125
|
+
unknown,
|
|
126
|
+
unknown,
|
|
127
|
+
unknown,
|
|
128
|
+
unknown,
|
|
129
|
+
unknown,
|
|
130
|
+
unknown,
|
|
131
|
+
Record<string, any>,
|
|
132
|
+
Record<string, any>,
|
|
133
|
+
Record<string, any>,
|
|
134
|
+
Record<string, any>,
|
|
135
|
+
Record<string, any>
|
|
136
|
+
>
|
|
137
|
+
>;
|
|
138
|
+
checks: BaseCheck<
|
|
139
|
+
IBaseTest<
|
|
140
|
+
unknown,
|
|
141
|
+
unknown,
|
|
142
|
+
unknown,
|
|
143
|
+
unknown,
|
|
144
|
+
unknown,
|
|
145
|
+
unknown,
|
|
146
|
+
unknown,
|
|
147
|
+
Record<string, any>,
|
|
148
|
+
Record<string, any>,
|
|
149
|
+
Record<string, any>,
|
|
150
|
+
Record<string, any>,
|
|
151
|
+
Record<string, any>
|
|
152
|
+
>
|
|
153
|
+
>[];
|
|
78
154
|
testResourceConfiguration: ITTestResourceConfiguration;
|
|
79
155
|
};
|
|
80
156
|
|
|
@@ -84,7 +160,24 @@ export type ITestJob<T = PM> = {
|
|
|
84
160
|
runner: (
|
|
85
161
|
x: ITTestResourceConfiguration,
|
|
86
162
|
t: ITLog
|
|
87
|
-
) => Promise<
|
|
163
|
+
) => Promise<
|
|
164
|
+
BaseSuite<
|
|
165
|
+
IBaseTest<
|
|
166
|
+
unknown,
|
|
167
|
+
unknown,
|
|
168
|
+
unknown,
|
|
169
|
+
unknown,
|
|
170
|
+
unknown,
|
|
171
|
+
unknown,
|
|
172
|
+
unknown,
|
|
173
|
+
Record<string, any>,
|
|
174
|
+
Record<string, any>,
|
|
175
|
+
Record<string, any>,
|
|
176
|
+
Record<string, any>,
|
|
177
|
+
Record<string, any>
|
|
178
|
+
>
|
|
179
|
+
>
|
|
180
|
+
>;
|
|
88
181
|
testResourceRequirement: ITTestResourceRequirement;
|
|
89
182
|
receiveTestResourceConfig: (pm: PM) => Promise<{
|
|
90
183
|
failed: number;
|
|
@@ -101,7 +194,22 @@ export const defaultTestResourceRequirement: ITTestResourceRequest = {
|
|
|
101
194
|
|
|
102
195
|
export type ITestArtifactory = (key: string, value: unknown) => unknown;
|
|
103
196
|
|
|
104
|
-
export type ITestCheckCallback<
|
|
197
|
+
export type ITestCheckCallback<
|
|
198
|
+
ITestShape extends IBaseTest<
|
|
199
|
+
unknown,
|
|
200
|
+
unknown,
|
|
201
|
+
unknown,
|
|
202
|
+
unknown,
|
|
203
|
+
unknown,
|
|
204
|
+
unknown,
|
|
205
|
+
unknown,
|
|
206
|
+
Record<string, any>,
|
|
207
|
+
Record<string, any>,
|
|
208
|
+
Record<string, any>,
|
|
209
|
+
Record<string, any>,
|
|
210
|
+
Record<string, any>
|
|
211
|
+
>
|
|
212
|
+
> = {
|
|
105
213
|
[K in keyof ITestShape["checks"]]: (
|
|
106
214
|
name: string,
|
|
107
215
|
features: string[],
|
package/src/lib/types.ts
CHANGED
|
@@ -20,6 +20,7 @@ export type IJsonConfig = {
|
|
|
20
20
|
outdir: string;
|
|
21
21
|
tests: ITestTypes[];
|
|
22
22
|
features: string;
|
|
23
|
+
botEmail: string;
|
|
23
24
|
};
|
|
24
25
|
|
|
25
26
|
export type IBaseConfig = {
|
|
@@ -35,17 +36,34 @@ export type IBaseConfig = {
|
|
|
35
36
|
ports: string[];
|
|
36
37
|
tests: ITestTypes[];
|
|
37
38
|
webPlugins: any[];
|
|
39
|
+
botEmail: string;
|
|
38
40
|
};
|
|
39
41
|
|
|
40
42
|
export type IBuiltConfig = { buildDir: string } & IBaseConfig;
|
|
41
43
|
|
|
42
|
-
export type IWebTestInterface<
|
|
44
|
+
export type IWebTestInterface<
|
|
45
|
+
ITestShape extends IBaseTest<
|
|
46
|
+
unknown,
|
|
47
|
+
unknown,
|
|
48
|
+
unknown,
|
|
49
|
+
unknown,
|
|
50
|
+
unknown,
|
|
51
|
+
unknown,
|
|
52
|
+
unknown,
|
|
53
|
+
Record<string, any>,
|
|
54
|
+
Record<string, any>,
|
|
55
|
+
Record<string, any>,
|
|
56
|
+
Record<string, any>,
|
|
57
|
+
Record<string, any>
|
|
58
|
+
>
|
|
59
|
+
> = {
|
|
43
60
|
assertThis: (x: ITestShape["then"]) => void;
|
|
44
61
|
|
|
45
62
|
andWhen: (
|
|
46
63
|
store: ITestShape["istore"],
|
|
47
64
|
whenCB: ITestShape["when"],
|
|
48
|
-
testResource: ITTestResourceConfiguration
|
|
65
|
+
testResource: ITTestResourceConfiguration,
|
|
66
|
+
utils: PM
|
|
49
67
|
) => Promise<ITestShape["istore"]>;
|
|
50
68
|
butThen: (
|
|
51
69
|
store: ITestShape["istore"],
|
|
@@ -81,17 +99,34 @@ export type IWebTestInterface<ITestShape extends IBaseTest> = {
|
|
|
81
99
|
};
|
|
82
100
|
// & ITestInterface<ITestShape>;
|
|
83
101
|
|
|
84
|
-
export type INodeTestInterface<
|
|
102
|
+
export type INodeTestInterface<
|
|
103
|
+
ITestShape extends IBaseTest<
|
|
104
|
+
unknown,
|
|
105
|
+
unknown,
|
|
106
|
+
unknown,
|
|
107
|
+
unknown,
|
|
108
|
+
unknown,
|
|
109
|
+
unknown,
|
|
110
|
+
unknown,
|
|
111
|
+
Record<string, any>,
|
|
112
|
+
Record<string, any>,
|
|
113
|
+
Record<string, any>,
|
|
114
|
+
Record<string, any>,
|
|
115
|
+
Record<string, any>
|
|
116
|
+
>
|
|
117
|
+
> = {
|
|
85
118
|
assertThis: (x: ITestShape["then"]) => void;
|
|
86
119
|
andWhen: (
|
|
87
120
|
store: ITestShape["istore"],
|
|
88
121
|
whenCB: ITestShape["when"],
|
|
89
|
-
testResource: ITTestResourceConfiguration
|
|
122
|
+
testResource: ITTestResourceConfiguration,
|
|
123
|
+
utils: PM
|
|
90
124
|
) => Promise<ITestShape["istore"]>;
|
|
91
125
|
butThen: (
|
|
92
126
|
store: ITestShape["istore"],
|
|
93
127
|
thenCB,
|
|
94
|
-
testResource: ITTestResourceConfiguration
|
|
128
|
+
testResource: ITTestResourceConfiguration,
|
|
129
|
+
utils: PM
|
|
95
130
|
) => Promise<ITestShape["iselection"]>;
|
|
96
131
|
afterAll: (
|
|
97
132
|
store: ITestShape["istore"],
|
|
@@ -115,13 +150,28 @@ export type INodeTestInterface<ITestShape extends IBaseTest> = {
|
|
|
115
150
|
initializer: (c?) => ITestShape["given"],
|
|
116
151
|
artificer: ITestArtificer,
|
|
117
152
|
testResource: ITTestResourceConfiguration,
|
|
118
|
-
initialValues
|
|
119
|
-
|
|
153
|
+
initialValues,
|
|
154
|
+
pm: PM
|
|
120
155
|
) => Promise<ITestShape["istore"]>;
|
|
121
156
|
};
|
|
122
157
|
// & ITestInterface<ITestShape>;
|
|
123
158
|
|
|
124
|
-
export type ITestInterface<
|
|
159
|
+
export type ITestInterface<
|
|
160
|
+
ITestShape extends IBaseTest<
|
|
161
|
+
unknown,
|
|
162
|
+
unknown,
|
|
163
|
+
unknown,
|
|
164
|
+
unknown,
|
|
165
|
+
unknown,
|
|
166
|
+
unknown,
|
|
167
|
+
unknown,
|
|
168
|
+
Record<string, any>,
|
|
169
|
+
Record<string, any>,
|
|
170
|
+
Record<string, any>,
|
|
171
|
+
Record<string, any>,
|
|
172
|
+
Record<string, any>
|
|
173
|
+
>
|
|
174
|
+
> = {
|
|
125
175
|
assertThis: (x: ITestShape["then"]) => void;
|
|
126
176
|
|
|
127
177
|
andWhen: (
|
|
@@ -133,7 +183,8 @@ export type ITestInterface<ITestShape extends IBaseTest> = {
|
|
|
133
183
|
butThen: (
|
|
134
184
|
store: ITestShape["istore"],
|
|
135
185
|
thenCB,
|
|
136
|
-
testResource: ITTestResourceConfiguration
|
|
186
|
+
testResource: ITTestResourceConfiguration,
|
|
187
|
+
pm: PM
|
|
137
188
|
) => Promise<ITestShape["iselection"]>;
|
|
138
189
|
|
|
139
190
|
afterAll: (
|
|
@@ -163,35 +214,92 @@ export type ITestInterface<ITestShape extends IBaseTest> = {
|
|
|
163
214
|
) => Promise<ITestShape["istore"]>;
|
|
164
215
|
};
|
|
165
216
|
|
|
166
|
-
export type ISuiteKlasser<
|
|
217
|
+
export type ISuiteKlasser<
|
|
218
|
+
ITestShape extends IBaseTest<
|
|
219
|
+
unknown,
|
|
220
|
+
unknown,
|
|
221
|
+
unknown,
|
|
222
|
+
unknown,
|
|
223
|
+
unknown,
|
|
224
|
+
unknown,
|
|
225
|
+
unknown,
|
|
226
|
+
Record<string, any>,
|
|
227
|
+
Record<string, any>,
|
|
228
|
+
Record<string, any>,
|
|
229
|
+
Record<string, any>,
|
|
230
|
+
Record<string, any>
|
|
231
|
+
>
|
|
232
|
+
> = (
|
|
167
233
|
name: string,
|
|
168
234
|
index: number,
|
|
169
235
|
givens: IGivens<ITestShape>,
|
|
170
236
|
checks: BaseCheck<ITestShape>[]
|
|
171
237
|
) => BaseSuite<ITestShape>;
|
|
172
238
|
|
|
173
|
-
export type IGivenKlasser<
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
239
|
+
export type IGivenKlasser<
|
|
240
|
+
ITestShape extends IBaseTest<
|
|
241
|
+
unknown,
|
|
242
|
+
unknown,
|
|
243
|
+
unknown,
|
|
244
|
+
unknown,
|
|
245
|
+
unknown,
|
|
246
|
+
unknown,
|
|
247
|
+
unknown,
|
|
248
|
+
Record<string, any>,
|
|
249
|
+
Record<string, any>,
|
|
250
|
+
Record<string, any>,
|
|
251
|
+
Record<string, any>,
|
|
252
|
+
Record<string, any>
|
|
253
|
+
>
|
|
254
|
+
> = (name, features, whens, thens, givenCB) => BaseGiven<ITestShape>;
|
|
255
|
+
|
|
256
|
+
export type IWhenKlasser<
|
|
257
|
+
ITestShape extends IBaseTest<
|
|
258
|
+
unknown,
|
|
259
|
+
unknown,
|
|
260
|
+
unknown,
|
|
261
|
+
unknown,
|
|
262
|
+
unknown,
|
|
263
|
+
unknown,
|
|
264
|
+
unknown,
|
|
265
|
+
Record<string, any>,
|
|
266
|
+
Record<string, any>,
|
|
267
|
+
Record<string, any>,
|
|
268
|
+
Record<string, any>,
|
|
269
|
+
Record<string, any>
|
|
270
|
+
>
|
|
271
|
+
> = (s, o) => BaseWhen<ITestShape>;
|
|
272
|
+
|
|
273
|
+
export type IThenKlasser<
|
|
274
|
+
ITestShape extends IBaseTest<
|
|
275
|
+
unknown,
|
|
276
|
+
unknown,
|
|
277
|
+
unknown,
|
|
278
|
+
unknown,
|
|
279
|
+
unknown,
|
|
280
|
+
unknown,
|
|
281
|
+
unknown,
|
|
282
|
+
Record<string, any>,
|
|
283
|
+
Record<string, any>,
|
|
284
|
+
Record<string, any>,
|
|
285
|
+
Record<string, any>,
|
|
286
|
+
Record<string, any>
|
|
287
|
+
>
|
|
288
|
+
> = (s, o) => BaseThen<ITestShape>;
|
|
289
|
+
|
|
290
|
+
export type ICheckKlasser<
|
|
291
|
+
ITestShape extends IBaseTest<
|
|
292
|
+
unknown,
|
|
293
|
+
unknown,
|
|
294
|
+
unknown,
|
|
295
|
+
unknown,
|
|
296
|
+
unknown,
|
|
297
|
+
unknown,
|
|
298
|
+
unknown,
|
|
299
|
+
Record<string, any>,
|
|
300
|
+
Record<string, any>,
|
|
301
|
+
Record<string, any>,
|
|
302
|
+
Record<string, any>,
|
|
303
|
+
Record<string, any>
|
|
304
|
+
>
|
|
305
|
+
> = (n, f, cb, w, t) => BaseCheck<ITestShape>;
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import mongoose from "mongoose";
|
|
2
|
+
|
|
3
|
+
export interface IUser {
|
|
4
|
+
email: string;
|
|
5
|
+
channels: string[];
|
|
6
|
+
dmgroups: string[];
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export const userSchema = new mongoose.Schema<IUser>({
|
|
10
|
+
email: String,
|
|
11
|
+
channels: [{ type: mongoose.Schema.Types.ObjectId, ref: "Channel" }],
|
|
12
|
+
dmgroups: [{ type: mongoose.Schema.Types.ObjectId, ref: "Dmgroup" }],
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
userSchema.virtual("features", {
|
|
16
|
+
ref: "Feature",
|
|
17
|
+
localField: "_id",
|
|
18
|
+
foreignField: "owner",
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
export interface IKanban {
|
|
22
|
+
title: string;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export const kanbanSchema = new mongoose.Schema<IKanban>({
|
|
26
|
+
title: String,
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
export interface IGantt {
|
|
30
|
+
name: string;
|
|
31
|
+
type: "task" | "milestone" | "project";
|
|
32
|
+
start: Date;
|
|
33
|
+
end: Date;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export const ganttSchema = new mongoose.Schema<IGantt>({
|
|
37
|
+
name: String,
|
|
38
|
+
type: String,
|
|
39
|
+
start: Date,
|
|
40
|
+
end: Date,
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
export interface IFeature {
|
|
44
|
+
title: string;
|
|
45
|
+
state: string;
|
|
46
|
+
owner: {
|
|
47
|
+
type: mongoose.Schema.Types.ObjectId;
|
|
48
|
+
required: true;
|
|
49
|
+
ref: "User";
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export const featuresSchema = new mongoose.Schema<IFeature>({
|
|
54
|
+
title: String,
|
|
55
|
+
state: String,
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
export const channelsFeature = new mongoose.Schema<IChatChannel>({});
|
|
59
|
+
|
|
60
|
+
export const chatCatMessageSchema = new mongoose.Schema({
|
|
61
|
+
user: {
|
|
62
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
63
|
+
ref: "User",
|
|
64
|
+
required: true,
|
|
65
|
+
},
|
|
66
|
+
room: {
|
|
67
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
68
|
+
ref: "ChatCatRoom",
|
|
69
|
+
required: true,
|
|
70
|
+
maxlength: 100,
|
|
71
|
+
},
|
|
72
|
+
timestamp: {
|
|
73
|
+
type: Date,
|
|
74
|
+
default: Date.now(),
|
|
75
|
+
},
|
|
76
|
+
text: {
|
|
77
|
+
type: String,
|
|
78
|
+
maxlength: 1000,
|
|
79
|
+
},
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
// A channel is a base type, extended by both a huddle and room
|
|
83
|
+
export interface IChatChannel {
|
|
84
|
+
users: string[];
|
|
85
|
+
messages: [{ type: mongoose.Schema.Types.ObjectId; ref: "Message" }];
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export interface IChatCatHuddle {
|
|
89
|
+
users: {
|
|
90
|
+
type: String;
|
|
91
|
+
unique: true;
|
|
92
|
+
required: true;
|
|
93
|
+
}[];
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export const HuddleSchema = new mongoose.Schema<IChatCatHuddle>({});
|
|
97
|
+
|
|
98
|
+
// a room is just a channel with a name
|
|
99
|
+
export interface IChatCatRoom {
|
|
100
|
+
name: string;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export const RoomSchema = new mongoose.Schema<IChatCatRoom>({
|
|
104
|
+
name: { type: String, required: true },
|
|
105
|
+
});
|
package/src/utils.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// import { configs } from "eslint-plugin-react";
|
|
2
|
+
import path from "path";
|
|
3
|
+
import { IBuiltConfig, IRunTime } from "./lib/types";
|
|
4
|
+
|
|
5
|
+
export const destinationOfRuntime = (
|
|
6
|
+
f: string,
|
|
7
|
+
r: IRunTime,
|
|
8
|
+
configs: IBuiltConfig
|
|
9
|
+
) => {
|
|
10
|
+
return path
|
|
11
|
+
.normalize(`${configs.buildDir}/${r}/${f}`)
|
|
12
|
+
.split(".")
|
|
13
|
+
.slice(0, -1)
|
|
14
|
+
.join(".");
|
|
15
|
+
};
|