testeranto 0.81.3 → 0.84.0

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.
Files changed (71) hide show
  1. package/dist/common/src/Node.js +4 -2
  2. package/dist/common/src/PM/main.js +188 -61
  3. package/dist/common/src/PM/node.js +32 -7
  4. package/dist/common/src/PM/web.js +28 -54
  5. package/dist/common/src/Project.js +0 -3
  6. package/dist/common/src/Puppeteer.js +9 -51
  7. package/dist/common/src/SubPackages/react-dom/jsx/web.js +11 -11
  8. package/dist/common/src/Web.js +7 -1
  9. package/dist/common/src/esbuildConfigs/featuresPlugin.js +39 -0
  10. package/dist/common/src/esbuildConfigs/inputFilesPlugin.js +62 -64
  11. package/dist/common/src/esbuildConfigs/node.js +10 -3
  12. package/dist/common/src/esbuildConfigs/web.js +6 -2
  13. package/dist/common/src/lib/abstractBase.js +348 -337
  14. package/dist/common/src/lib/basebuilder.js +9 -4
  15. package/dist/common/src/lib/core.js +1 -1
  16. package/dist/common/tsconfig.common.tsbuildinfo +1 -1
  17. package/dist/module/src/Node.js +3 -3
  18. package/dist/module/src/PM/main.js +188 -61
  19. package/dist/module/src/PM/node.js +32 -7
  20. package/dist/module/src/PM/web.js +28 -51
  21. package/dist/module/src/Project.js +0 -3
  22. package/dist/module/src/Puppeteer.js +9 -51
  23. package/dist/module/src/SubPackages/react-dom/jsx/web.js +10 -10
  24. package/dist/module/src/Web.js +6 -2
  25. package/dist/module/src/esbuildConfigs/featuresPlugin.js +34 -0
  26. package/dist/module/src/esbuildConfigs/inputFilesPlugin.js +62 -64
  27. package/dist/module/src/esbuildConfigs/node.js +10 -3
  28. package/dist/module/src/esbuildConfigs/web.js +6 -2
  29. package/dist/module/src/lib/abstractBase.js +348 -337
  30. package/dist/module/src/lib/basebuilder.js +9 -4
  31. package/dist/module/src/lib/core.js +1 -1
  32. package/dist/module/tsconfig.module.tsbuildinfo +1 -1
  33. package/dist/prebuild/Puppeteer.mjs +82033 -0
  34. package/dist/types/src/Node.d.ts +5 -1
  35. package/dist/types/src/PM/index.d.ts +10 -4
  36. package/dist/types/src/PM/main.d.ts +21 -9
  37. package/dist/types/src/PM/node.d.ts +11 -3
  38. package/dist/types/src/PM/web.d.ts +11 -2
  39. package/dist/types/src/SubPackages/react-dom/jsx/index.d.ts +1 -0
  40. package/dist/types/src/SubPackages/react-test-renderer/jsx/index.d.ts +1 -0
  41. package/dist/types/src/SubPackages/react-test-renderer/jsx-promised/index.d.ts +1 -0
  42. package/dist/types/src/Types.d.ts +2 -2
  43. package/dist/types/src/Web.d.ts +5 -1
  44. package/dist/types/src/esbuildConfigs/featuresPlugin.d.ts +5 -0
  45. package/dist/types/src/esbuildConfigs/inputFilesPlugin.d.ts +4 -2
  46. package/dist/types/src/lib/abstractBase.d.ts +5 -4
  47. package/dist/types/src/lib/core.d.ts +1 -1
  48. package/dist/types/src/lib/index.d.ts +1 -0
  49. package/dist/types/src/lib/types.d.ts +7 -5
  50. package/dist/types/tsconfig.types.tsbuildinfo +1 -1
  51. package/package.json +18 -45
  52. package/pupBuild.js +18 -0
  53. package/src/Node.ts +3 -5
  54. package/src/PM/index.ts +12 -3
  55. package/src/PM/main.ts +306 -140
  56. package/src/PM/node.ts +40 -7
  57. package/src/PM/web.ts +108 -58
  58. package/src/Project.ts +0 -8
  59. package/src/Puppeteer.ts +11 -57
  60. package/src/SubPackages/react-dom/jsx/web.ts +15 -10
  61. package/src/Types.ts +5 -2
  62. package/src/Web.ts +6 -2
  63. package/src/esbuildConfigs/featuresPlugin.ts +43 -0
  64. package/src/esbuildConfigs/inputFilesPlugin.ts +97 -90
  65. package/src/esbuildConfigs/node.ts +18 -3
  66. package/src/esbuildConfigs/web.ts +14 -2
  67. package/src/lib/abstractBase.ts +388 -366
  68. package/src/lib/basebuilder.ts +9 -9
  69. package/src/lib/core.ts +4 -2
  70. package/src/lib/index.ts +1 -0
  71. package/src/lib/types.ts +14 -6
@@ -82,6 +82,7 @@ export abstract class BaseBuilder<
82
82
  this.Check()
83
83
  );
84
84
 
85
+ // const f = this.specs[0].features;
85
86
  this.testJobs = this.specs.map((suite: BaseSuite<ITestShape>) => {
86
87
  const suiteRunner =
87
88
  (suite: BaseSuite<ITestShape>) =>
@@ -89,13 +90,13 @@ export abstract class BaseBuilder<
89
90
  puppetMaster: PM,
90
91
  tLog: ITLog
91
92
  ): Promise<BaseSuite<ITestShape>> => {
92
- const puppeteerBrowser = await puppetMaster.startPuppeteer(
93
- {
94
- browserWSEndpoint:
95
- puppetMaster.testResourceConfiguration.browserWSEndpoint,
96
- },
97
- puppetMaster.testResourceConfiguration.fs
98
- );
93
+ // const puppeteerBrowser = await puppetMaster.startPuppeteer(
94
+ // {
95
+ // browserWSEndpoint:
96
+ // puppetMaster.testResourceConfiguration.browserWSEndpoint,
97
+ // },
98
+ // puppetMaster.testResourceConfiguration.fs
99
+ // );
99
100
 
100
101
  const x = await suite.run(
101
102
  input,
@@ -128,8 +129,6 @@ export abstract class BaseBuilder<
128
129
  runner,
129
130
 
130
131
  receiveTestResourceConfig: async function (puppetMaster: PM) {
131
- // await puppetMaster.mkdirSync();
132
-
133
132
  const logFilePath = "log.txt";
134
133
  const access = await puppetMaster.createWriteStream(logFilePath);
135
134
  const tLog = (...l: string[]) => {
@@ -170,6 +169,7 @@ export abstract class BaseBuilder<
170
169
  failed: numberOfFailures,
171
170
  artifacts: this.artifacts || [],
172
171
  logPromise,
172
+ features: suiteDone.features(),
173
173
  };
174
174
  },
175
175
  };
package/src/lib/core.ts CHANGED
@@ -176,7 +176,7 @@ export default abstract class Testeranto<
176
176
  testResource: any,
177
177
  pm: PM
178
178
  ): Promise<ITestShape["iselection"]> {
179
- return fullTestInterface
179
+ return await fullTestInterface
180
180
  .butThen(store, thenCB, testResource, pm)
181
181
  .then(
182
182
  (v) => {
@@ -262,5 +262,7 @@ export default abstract class Testeranto<
262
262
  );
263
263
  }
264
264
 
265
- abstract receiveTestResourceConfig(partialTestResource: string);
265
+ abstract receiveTestResourceConfig(
266
+ partialTestResource: string
267
+ ): Promise<string[]>;
266
268
  }
package/src/lib/index.ts CHANGED
@@ -183,6 +183,7 @@ export type ITestJob<T = PM> = {
183
183
  failed: number;
184
184
  artifacts: Promise<unknown>[];
185
185
  logPromise: Promise<unknown>;
186
+ features: string[];
186
187
  }>;
187
188
  };
188
189
 
package/src/lib/types.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { IBaseTest } from "../Types";
2
2
 
3
- // import puppeteer from "puppeteer-core";
3
+ import type { Plugin } from "esbuild";
4
4
  import {
5
5
  IGivens,
6
6
  BaseCheck,
@@ -22,19 +22,26 @@ export type IJsonConfig = {
22
22
  botEmail: string;
23
23
  };
24
24
 
25
+ export type IPlugin = (
26
+ register: (entrypoint, sources) => any,
27
+ entrypoints
28
+ ) => Plugin;
29
+
25
30
  export type IBaseConfig = {
26
31
  clearScreen: boolean;
27
32
  debugger: boolean;
28
33
  devMode: boolean;
29
34
  externals: string[];
30
35
  minify: boolean;
31
- nodePlugins: any[];
32
36
  outbase: string;
33
37
  outdir: string;
34
38
  ports: string[];
35
39
  tests: ITestTypes[];
36
- webPlugins: any[];
37
- botEmail: string;
40
+
41
+ nodePlugins: IPlugin[];
42
+ webPlugins: IPlugin[];
43
+
44
+ featureIngestor: (s: string) => Promise<string>;
38
45
  };
39
46
 
40
47
  export type IBuiltConfig = { buildDir: string } & IBaseConfig;
@@ -66,7 +73,8 @@ export type IWebTestInterface<
66
73
  butThen: (
67
74
  store: ITestShape["istore"],
68
75
  thenCB,
69
- testResource: ITTestResourceConfiguration
76
+ testResource: ITTestResourceConfiguration,
77
+ utils: PM
70
78
  ) => Promise<ITestShape["iselection"]>;
71
79
 
72
80
  afterAll: (
@@ -205,7 +213,7 @@ export type ITestInterface<
205
213
  beforeEach: (
206
214
  subject: ITestShape["isubject"],
207
215
  initializer: (c?) => ITestShape["given"],
208
- artificer: ITestArtificer,
216
+ // artificer: ITestArtificer,
209
217
  testResource: ITTestResourceConfiguration,
210
218
  initialValues,
211
219
  pm: PM