@thinkwise/testwise 0.2.0-beta.0 → 0.2.0-beta.22
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/Testwise.ts +7 -4
- package/artifact-builder/ArtifactManager.ts +0 -1
- package/artifact-builder/InterfaceGenerator.ts +65 -83
- package/artifact-builder/ModelDataBuilder.ts +50 -33
- package/artifact-builder/ModelDataRefiner.ts +10 -9
- package/artifact-builder/SchemaGenerator.ts +1 -4
- package/artifact-builder/ScreenInterfaceRefiner.ts +0 -5
- package/artifact-builder/SubjectGenerator.ts +2 -2
- package/artifact-builder/SubjectRegistration.ts +0 -5
- package/artifact-builder/helpers/DataRetriever.ts +2 -2
- package/artifact-builder/helpers/NamingHandler.ts +3 -1
- package/artifact-builder/helpers/Stopwatch.ts +13 -0
- package/artifact-builder/helpers/index.ts +1 -0
- package/dist/Testwise.d.ts +1 -0
- package/dist/Testwise.js +16 -5
- package/dist/Testwise.js.map +1 -1
- package/dist/artifact-builder/ArtifactManager.js.map +1 -1
- package/dist/artifact-builder/InterfaceGenerator.d.ts +0 -1
- package/dist/artifact-builder/InterfaceGenerator.js +55 -67
- package/dist/artifact-builder/InterfaceGenerator.js.map +1 -1
- package/dist/artifact-builder/ModelDataBuilder.js +26 -13
- package/dist/artifact-builder/ModelDataBuilder.js.map +1 -1
- package/dist/artifact-builder/ModelDataRefiner.js +3 -3
- package/dist/artifact-builder/ModelDataRefiner.js.map +1 -1
- package/dist/artifact-builder/SchemaGenerator.js +0 -2
- package/dist/artifact-builder/SchemaGenerator.js.map +1 -1
- package/dist/artifact-builder/ScreenInterfaceRefiner.js +0 -5
- package/dist/artifact-builder/ScreenInterfaceRefiner.js.map +1 -1
- package/dist/artifact-builder/SubjectGenerator.js.map +1 -1
- package/dist/artifact-builder/SubjectRegistration.d.ts +0 -1
- package/dist/artifact-builder/SubjectRegistration.js +0 -1
- package/dist/artifact-builder/SubjectRegistration.js.map +1 -1
- package/dist/artifact-builder/helpers/DataRetriever.js +2 -2
- package/dist/artifact-builder/helpers/DataRetriever.js.map +1 -1
- package/dist/artifact-builder/helpers/NamingHandler.js +3 -1
- package/dist/artifact-builder/helpers/NamingHandler.js.map +1 -1
- package/dist/artifact-builder/helpers/Stopwatch.d.ts +5 -0
- package/dist/artifact-builder/helpers/Stopwatch.js +13 -0
- package/dist/artifact-builder/helpers/Stopwatch.js.map +1 -0
- package/dist/artifact-builder/helpers/index.d.ts +1 -0
- package/dist/artifact-builder/helpers/index.js +1 -0
- package/dist/artifact-builder/helpers/index.js.map +1 -1
- package/enums/ElementTypes.ts +1 -1
- package/interfaces/IRegisteredSubjects.ts +1 -1
- package/package.json +4 -3
- package/scripts/main.js +84 -82
- package/scripts/postinstall.js +4 -7
- package/scripts/setup.js +37 -37
- package/scripts/sync.js +56 -23
- package/services/ConfigBuilder.ts +1 -1
- package/types/Components.ts +1 -1
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { performance } from 'node:perf_hooks';
|
|
2
|
+
export class Stopwatch {
|
|
3
|
+
start(message) {
|
|
4
|
+
const startTime = performance.now();
|
|
5
|
+
return {
|
|
6
|
+
stop() {
|
|
7
|
+
const duration = ((performance.now() - startTime) / 1000).toFixed(3);
|
|
8
|
+
console.log(`[${duration}s]: ${message}`);
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=Stopwatch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Stopwatch.js","sourceRoot":"","sources":["../../../artifact-builder/helpers/Stopwatch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,MAAM,OAAO,SAAS;IACpB,KAAK,CAAC,OAAe;QACnB,MAAM,SAAS,GAAG,WAAW,CAAC,GAAG,EAAE,CAAC;QACpC,OAAO;YACL,IAAI;gBACF,MAAM,QAAQ,GAAG,CAAC,CAAC,WAAW,CAAC,GAAG,EAAE,GAAG,SAAS,CAAC,GAAG,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;gBACrE,OAAO,CAAC,GAAG,CAAC,IAAI,QAAQ,OAAO,OAAO,EAAE,CAAC,CAAC;YAC5C,CAAC;SACF,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../artifact-builder/helpers/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../artifact-builder/helpers/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC"}
|
package/enums/ElementTypes.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thinkwise/testwise",
|
|
3
|
-
"version": "0.2.0-beta.
|
|
3
|
+
"version": "0.2.0-beta.22",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -18,15 +18,16 @@
|
|
|
18
18
|
"license": "ISC",
|
|
19
19
|
"description": "",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@thinkwise/backups": "^1.0.
|
|
21
|
+
"@thinkwise/backups": "^1.0.12",
|
|
22
22
|
"@types/node": "^22.15.29",
|
|
23
23
|
"axios": "^1.9.0",
|
|
24
24
|
"chalk": "^5.4.1",
|
|
25
25
|
"csv-parse": "^5.6.0",
|
|
26
26
|
"dotenv": "^17.2.2",
|
|
27
|
+
"playwright-bdd": "^8.4.2",
|
|
27
28
|
"prettier": "^3.6.2",
|
|
28
29
|
"prompts": "^2.4.2",
|
|
29
|
-
"quicktype": "^23.2.6",
|
|
30
|
+
"quicktype-core": "^23.2.6",
|
|
30
31
|
"rimraf": "^6.0.1",
|
|
31
32
|
"ts-node": "^10.9.2",
|
|
32
33
|
"typescript": "^5.8.3"
|
package/scripts/main.js
CHANGED
|
@@ -1,82 +1,84 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import fs from 'node:fs';
|
|
3
|
-
import path from 'node:path';
|
|
4
|
-
import process from 'node:process';
|
|
5
|
-
import { PathResolver } from '../dist/helpers/index.js';
|
|
6
|
-
import { postinstall } from './postinstall.js';
|
|
7
|
-
import { setup } from './setup.js';
|
|
8
|
-
import { sync } from './sync.js';
|
|
9
|
-
|
|
10
|
-
await setup();
|
|
11
|
-
const { testwiseConfig } = await import('../dist/services/index.js');
|
|
12
|
-
const config = testwiseConfig();
|
|
13
|
-
const configBuilder = await config.load();
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
if (process.
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
const
|
|
30
|
-
const
|
|
31
|
-
const
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
fs.mkdirSync(
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
const
|
|
74
|
-
const
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import fs from 'node:fs';
|
|
3
|
+
import path from 'node:path';
|
|
4
|
+
import process from 'node:process';
|
|
5
|
+
import { PathResolver } from '../dist/helpers/index.js';
|
|
6
|
+
import { postinstall } from './postinstall.js';
|
|
7
|
+
import { setup } from './setup.js';
|
|
8
|
+
import { sync } from './sync.js';
|
|
9
|
+
|
|
10
|
+
await setup();
|
|
11
|
+
const { testwiseConfig } = await import('../dist/services/index.js');
|
|
12
|
+
const config = testwiseConfig();
|
|
13
|
+
const configBuilder = await config.load();
|
|
14
|
+
|
|
15
|
+
if (process.argv[2] === 'postinstall') {
|
|
16
|
+
if (!(await verifiedSeedData())) process.exit(0);
|
|
17
|
+
|
|
18
|
+
postinstall();
|
|
19
|
+
} else if (process.argv[2] === 'sync') {
|
|
20
|
+
if (!(await verifiedSeedData())) process.exit(0);
|
|
21
|
+
|
|
22
|
+
sync();
|
|
23
|
+
} else {
|
|
24
|
+
console.warn('Command unknown.');
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
async function verifiedSeedData() {
|
|
28
|
+
const consumerRoot = new PathResolver().getConsumerRootDirectory();
|
|
29
|
+
const seedDataDir = path.join(consumerRoot, 'seed-data');
|
|
30
|
+
const subjectsJson = path.join(seedDataDir, 'subjects.json');
|
|
31
|
+
const screensDir = path.join(seedDataDir, 'screen-schemas');
|
|
32
|
+
const projectIsConfigured = await isConfigured();
|
|
33
|
+
|
|
34
|
+
if (!fs.existsSync(seedDataDir)) {
|
|
35
|
+
if (projectIsConfigured) {
|
|
36
|
+
fs.mkdirSync(seedDataDir);
|
|
37
|
+
fs.mkdirSync(screensDir);
|
|
38
|
+
|
|
39
|
+
console.log('Created seed-data directory structure.');
|
|
40
|
+
return true;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
console.info('No seed-data directory found.');
|
|
44
|
+
return false;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
if (!fs.existsSync(subjectsJson) && !projectIsConfigured) {
|
|
48
|
+
console.info('No subjects.json');
|
|
49
|
+
return false;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
if (!fs.existsSync(screensDir)) {
|
|
53
|
+
if (projectIsConfigured) {
|
|
54
|
+
fs.mkdirSync(screensDir);
|
|
55
|
+
console.log('Created screen-schemas directory.');
|
|
56
|
+
return true;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
console.info('No screen-schemas directory found.');
|
|
60
|
+
return false;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
const screenFiles = fs.readdirSync(screensDir).filter((f) => f.endsWith('.json'));
|
|
64
|
+
if (screenFiles.length === 0 && !projectIsConfigured) {
|
|
65
|
+
console.info('No screen JSON files found in seed-data/screen-schemas');
|
|
66
|
+
return false;
|
|
67
|
+
}
|
|
68
|
+
return true;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
async function isConfigured() {
|
|
72
|
+
const user = configBuilder.get('environmentSettings.authUser');
|
|
73
|
+
const password = configBuilder.get('environmentSettings.authUserPassword');
|
|
74
|
+
const guiApplAlias = configBuilder.get('environmentSettings.guiApplAlias');
|
|
75
|
+
|
|
76
|
+
return Boolean(
|
|
77
|
+
user &&
|
|
78
|
+
user !== 'ExampleUser' &&
|
|
79
|
+
password &&
|
|
80
|
+
password !== 'ExamplePassword@1' &&
|
|
81
|
+
guiApplAlias &&
|
|
82
|
+
guiApplAlias !== 'ExampleName'
|
|
83
|
+
);
|
|
84
|
+
}
|
package/scripts/postinstall.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
1
|
import { execSync } from 'node:child_process';
|
|
4
2
|
import path from 'node:path';
|
|
5
3
|
import process from 'node:process';
|
|
@@ -12,7 +10,6 @@ const _filename = fileURLToPath(import.meta.url);
|
|
|
12
10
|
const _dirname = path.dirname(_filename);
|
|
13
11
|
|
|
14
12
|
export async function postinstall() {
|
|
15
|
-
|
|
16
13
|
try {
|
|
17
14
|
const autoSync = testwiseConfig().get('featureSettings.other.autoSync') ?? true;
|
|
18
15
|
if (!autoSync) return;
|
|
@@ -25,12 +22,12 @@ export async function postinstall() {
|
|
|
25
22
|
console.info('Restored artifacts from backup.');
|
|
26
23
|
|
|
27
24
|
// const { SubjectRegistration } = await import('../dist/artifact-builder/index.js');
|
|
28
|
-
// new SubjectRegistration().run();
|
|
29
|
-
|
|
25
|
+
// new SubjectRegistration().run();
|
|
26
|
+
|
|
30
27
|
execSync('npx tsc', { cwd: rootDir, stdio: 'inherit' });
|
|
31
28
|
|
|
32
29
|
console.info('Postinstall restore process completed successfully.');
|
|
33
|
-
|
|
30
|
+
|
|
34
31
|
return;
|
|
35
32
|
}
|
|
36
33
|
|
|
@@ -38,5 +35,5 @@ export async function postinstall() {
|
|
|
38
35
|
} catch (error) {
|
|
39
36
|
console.error('Postinstall process failed:', error.message);
|
|
40
37
|
process.exit(1);
|
|
41
|
-
}
|
|
38
|
+
}
|
|
42
39
|
}
|
package/scripts/setup.js
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import fs from 'node:fs';
|
|
2
|
-
import path from 'node:path';
|
|
3
|
-
import { fileURLToPath } from 'node:url';
|
|
4
|
-
import { PathResolver } from '../dist/helpers/index.js';
|
|
5
|
-
|
|
6
|
-
const _filename = fileURLToPath(import.meta.url);
|
|
7
|
-
const _dirname = path.dirname(_filename);
|
|
8
|
-
|
|
9
|
-
export async function setup() {
|
|
10
|
-
try {
|
|
11
|
-
const consumerRoot = new PathResolver().getConsumerRootDirectory();
|
|
12
|
-
const testwiseConfigFile = path.resolve(consumerRoot, 'Testwise.json');
|
|
13
|
-
const testwiseConfigTemplateFile = path.join(_dirname, 'Testwise.template.json');
|
|
14
|
-
const tsConfigFile = path.resolve(consumerRoot, 'tsconfig.json');
|
|
15
|
-
const tsConfigTemplateFile = path.join(_dirname, 'tsconfig.template.json');
|
|
16
|
-
|
|
17
|
-
let filesCreated = false;
|
|
18
|
-
|
|
19
|
-
if (!fs.existsSync(testwiseConfigFile)) {
|
|
20
|
-
fs.copyFileSync(testwiseConfigTemplateFile, testwiseConfigFile);
|
|
21
|
-
console.info('Testwise.json config file created.');
|
|
22
|
-
filesCreated = true;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
if (!fs.existsSync(tsConfigFile)) {
|
|
26
|
-
fs.copyFileSync(tsConfigTemplateFile, tsConfigFile);
|
|
27
|
-
console.info('tsconfig.json config file created.');
|
|
28
|
-
filesCreated = true;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
if (!filesCreated) {
|
|
32
|
-
await new Promise(resolve => setTimeout(resolve, 1000));
|
|
33
|
-
}
|
|
34
|
-
} catch (error) {
|
|
35
|
-
console.error('Error during installation:', error.message);
|
|
36
|
-
}
|
|
37
|
-
}
|
|
1
|
+
import fs from 'node:fs';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import { fileURLToPath } from 'node:url';
|
|
4
|
+
import { PathResolver } from '../dist/helpers/index.js';
|
|
5
|
+
|
|
6
|
+
const _filename = fileURLToPath(import.meta.url);
|
|
7
|
+
const _dirname = path.dirname(_filename);
|
|
8
|
+
|
|
9
|
+
export async function setup() {
|
|
10
|
+
try {
|
|
11
|
+
const consumerRoot = new PathResolver().getConsumerRootDirectory();
|
|
12
|
+
const testwiseConfigFile = path.resolve(consumerRoot, 'Testwise.json');
|
|
13
|
+
const testwiseConfigTemplateFile = path.join(_dirname, 'Testwise.template.json');
|
|
14
|
+
const tsConfigFile = path.resolve(consumerRoot, 'tsconfig.json');
|
|
15
|
+
const tsConfigTemplateFile = path.join(_dirname, 'tsconfig.template.json');
|
|
16
|
+
|
|
17
|
+
let filesCreated = false;
|
|
18
|
+
|
|
19
|
+
if (!fs.existsSync(testwiseConfigFile)) {
|
|
20
|
+
fs.copyFileSync(testwiseConfigTemplateFile, testwiseConfigFile);
|
|
21
|
+
console.info('Testwise.json config file created.');
|
|
22
|
+
filesCreated = true;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
if (!fs.existsSync(tsConfigFile)) {
|
|
26
|
+
fs.copyFileSync(tsConfigTemplateFile, tsConfigFile);
|
|
27
|
+
console.info('tsconfig.json config file created.');
|
|
28
|
+
filesCreated = true;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
if (!filesCreated) {
|
|
32
|
+
await new Promise((resolve) => setTimeout(resolve, 1000));
|
|
33
|
+
}
|
|
34
|
+
} catch (error) {
|
|
35
|
+
console.error('Error during installation:', error.message);
|
|
36
|
+
}
|
|
37
|
+
}
|
package/scripts/sync.js
CHANGED
|
@@ -1,69 +1,102 @@
|
|
|
1
|
-
|
|
2
1
|
/* eslint-disable @typescript-eslint/naming-convention */
|
|
3
|
-
|
|
4
2
|
import { execSync } from 'node:child_process';
|
|
5
3
|
import path from 'node:path';
|
|
6
4
|
import process from 'node:process';
|
|
7
5
|
import { fileURLToPath } from 'node:url';
|
|
6
|
+
import { Stopwatch } from '../dist/artifact-builder/helpers/index.js';
|
|
8
7
|
import { ArtifactManager } from '../dist/artifact-builder/index.js';
|
|
9
8
|
|
|
10
9
|
const _filename = fileURLToPath(import.meta.url);
|
|
11
10
|
const _dirname = path.dirname(_filename);
|
|
11
|
+
const stopwatch = new Stopwatch();
|
|
12
|
+
const timerTotal = stopwatch.start('Sync process start to end');
|
|
12
13
|
|
|
13
14
|
export async function sync() {
|
|
14
|
-
|
|
15
15
|
try {
|
|
16
16
|
const rootDir = path.resolve(_dirname, '..');
|
|
17
|
+
let timer;
|
|
17
18
|
|
|
19
|
+
// 1. Cleanup
|
|
20
|
+
timer = stopwatch.start('Clear distribution directory');
|
|
18
21
|
const { rimrafSync } = await import('rimraf');
|
|
19
|
-
|
|
20
|
-
// Remove dist folder synchronously
|
|
21
22
|
rimrafSync(path.join(rootDir, 'dist'));
|
|
23
|
+
timer.stop();
|
|
22
24
|
|
|
23
|
-
//
|
|
25
|
+
// 2. Initial Compilation
|
|
26
|
+
timer = stopwatch.start('Recompile TypeScript sources');
|
|
24
27
|
execSync('npx tsc', { cwd: rootDir, stdio: 'inherit' });
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
const {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
28
|
+
timer.stop();
|
|
29
|
+
|
|
30
|
+
// Lazy imports...
|
|
31
|
+
const {
|
|
32
|
+
InterfaceGenerator,
|
|
33
|
+
ScreenInterfaceRefiner,
|
|
34
|
+
SchemaGenerator,
|
|
35
|
+
SubjectComponentGenerator,
|
|
36
|
+
SubjectGenerator,
|
|
37
|
+
// SubjectRegistration,
|
|
38
|
+
ModelDataRefiner
|
|
39
|
+
} = await import('../dist/artifact-builder/index.js');
|
|
33
40
|
const { buildSubjects, buildScreens } = await import('../dist/artifact-builder/ModelDataBuilder.js');
|
|
34
|
-
// const { SubjectRegistration } = await import('../dist/artifact-builder/index.js'); - do not remove: future feature
|
|
35
41
|
|
|
36
|
-
//
|
|
42
|
+
// 3. Data Building
|
|
43
|
+
timer = stopwatch.start('Build subjects from model data');
|
|
37
44
|
await buildSubjects();
|
|
45
|
+
timer.stop();
|
|
46
|
+
|
|
47
|
+
timer = stopwatch.start('Build screens from model data');
|
|
38
48
|
await buildScreens();
|
|
49
|
+
timer.stop();
|
|
39
50
|
|
|
40
|
-
//
|
|
51
|
+
// 4. Refinement
|
|
52
|
+
timer = stopwatch.start('Refine model data');
|
|
41
53
|
await new ModelDataRefiner().run();
|
|
42
|
-
|
|
54
|
+
timer.stop();
|
|
43
55
|
|
|
44
|
-
//
|
|
56
|
+
// 5. Artifact Generation
|
|
45
57
|
const interfaceGenerator = new InterfaceGenerator();
|
|
46
58
|
|
|
59
|
+
timer = stopwatch.start('Generate screen interfaces from screen schemas');
|
|
47
60
|
await interfaceGenerator.generateScreenInterfacesFromSchemas();
|
|
61
|
+
timer.stop();
|
|
48
62
|
|
|
63
|
+
timer = stopwatch.start('Refine interfaces');
|
|
49
64
|
new ScreenInterfaceRefiner().refine();
|
|
65
|
+
timer.stop();
|
|
66
|
+
|
|
67
|
+
timer = stopwatch.start('Generate subject component schemas');
|
|
50
68
|
new SchemaGenerator().generateSchema();
|
|
69
|
+
timer.stop();
|
|
51
70
|
|
|
71
|
+
timer = stopwatch.start('Generate subject component interfaces from schemas');
|
|
52
72
|
await interfaceGenerator.generateSubjectInterfacesFromSchemas();
|
|
73
|
+
timer.stop();
|
|
53
74
|
|
|
75
|
+
timer = stopwatch.start('Build components that implement interfaces');
|
|
54
76
|
new SubjectComponentGenerator().run();
|
|
77
|
+
timer.stop();
|
|
78
|
+
|
|
79
|
+
timer = stopwatch.start('Generate subjects classes');
|
|
55
80
|
new SubjectGenerator().run();
|
|
56
|
-
|
|
81
|
+
timer.stop();
|
|
82
|
+
|
|
83
|
+
// timer = stopwatch.start('Add subjects to registry');
|
|
84
|
+
// new SubjectRegistration().run();
|
|
85
|
+
// timer.stop();
|
|
57
86
|
|
|
58
|
-
//
|
|
87
|
+
// 6. Final Compilation
|
|
88
|
+
timer = stopwatch.start('Compile generated artifacts');
|
|
59
89
|
execSync('npx tsc', { cwd: rootDir, stdio: 'inherit' });
|
|
90
|
+
timer.stop();
|
|
60
91
|
|
|
61
92
|
console.info('Sync process completed successfully.');
|
|
62
93
|
} catch (error) {
|
|
63
|
-
// reinstate the backup -- simulate this to see what happens first
|
|
64
94
|
console.error('Sync process failed:', error.message);
|
|
65
|
-
process.exit(1);
|
|
95
|
+
process.exit(1);
|
|
66
96
|
} finally {
|
|
97
|
+
const timerBackup = stopwatch.start('Perform Backup');
|
|
67
98
|
new ArtifactManager().performBackup();
|
|
99
|
+
timerBackup.stop();
|
|
100
|
+
timerTotal.stop();
|
|
68
101
|
}
|
|
69
102
|
}
|
package/types/Components.ts
CHANGED
|
@@ -52,4 +52,4 @@ export const subjectComponents: SubjectComponents[] = ['Form', 'Grid'];
|
|
|
52
52
|
|
|
53
53
|
export type ScreenComponents = SubjectComponents | SubjectAgnosticComponents;
|
|
54
54
|
export const screenComponents: ScreenComponents[] = [...coreComponents, ...subjectComponents];
|
|
55
|
-
export const disabledScreenComponents: ScreenComponents[] = ['Splitter'];
|
|
55
|
+
export const disabledScreenComponents: ScreenComponents[] = ['Splitter'];
|