definition-generator-framework 1.7.19 → 1.8.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.
- package/dist/decorators/definition-generator.d.ts +2 -1
- package/dist/decorators/definition-generator.js +1 -1
- package/dist/decorators/definition-generator.js.map +1 -1
- package/dist/framework/context.d.ts +6 -1
- package/dist/framework/context.js +19 -1
- package/dist/framework/context.js.map +1 -1
- package/dist/framework/file-content-generator/file-content-generator.d.ts +19 -0
- package/dist/framework/file-content-generator/file-content-generator.js +117 -0
- package/dist/framework/file-content-generator/file-content-generator.js.map +1 -0
- package/dist/framework/file-content-generator/file-content-generator.test.d.ts +24 -0
- package/dist/framework/file-content-generator/file-content-generator.test.js +161 -0
- package/dist/framework/file-content-generator/file-content-generator.test.js.map +1 -0
- package/dist/framework/index-file-generator/index-file-generator.d.ts +8 -0
- package/dist/framework/index-file-generator/index-file-generator.js +110 -0
- package/dist/framework/index-file-generator/index-file-generator.js.map +1 -0
- package/dist/framework/interfaces.d.ts +14 -1
- package/dist/framework/kernel.d.ts +1 -1
- package/dist/framework/kernel.js +13 -17
- package/dist/framework/kernel.js.map +1 -1
- package/dist/index.d.ts +6 -7
- package/dist/index.js +11 -13
- package/dist/index.js.map +1 -1
- package/dist/pipeline/3-config.js +11 -3
- package/dist/pipeline/3-config.js.map +1 -1
- package/package.json +2 -2
- package/package.json.bak +2 -2
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { DefinitionComponentClassType } from './definition-component';
|
|
2
2
|
interface DefinitionGeneratorMeta {
|
|
3
3
|
modules: DefinitionComponentClassType<any>[];
|
|
4
|
-
|
|
4
|
+
indexFilePretext: string;
|
|
5
|
+
outputIndexFile: string;
|
|
5
6
|
}
|
|
6
7
|
export declare function DefinitionGeneratorDecorator(meta: DefinitionGeneratorMeta): (ModuleClass: DefinitionGeneratorClassType) => any;
|
|
7
8
|
export type DefinitionGeneratorClassType = new (...args: any[]) => DefinitionGenerator;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definition-generator.js","sourceRoot":"","sources":["../../src/decorators/definition-generator.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"definition-generator.js","sourceRoot":"","sources":["../../src/decorators/definition-generator.ts"],"names":[],"mappings":";;;AAAA,gDAA6C;AAS7C,IAAI,kBAAkB,GAAG,KAAK,CAAC;AAC/B,SAAgB,4BAA4B,CAAC,IAA6B;IACxE,OAAO,UAAU,WAAyC;QACxD,IAAI,kBAAkB,EAAE,CAAC;YACvB,OAAO,CAAC,KAAK,CAAC,0CAA0C,CAAC,CAAC;QAC5D,CAAC;aAAM,CAAC;YACN,kBAAkB,GAAG,IAAI,CAAC;YAC1B,eAAM,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,gBAAgB,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC;QAC5E,CAAC;IACH,CAAC,CAAC;AACJ,CAAC;AATD,oEASC;AAID,MAAsB,mBAAmB;CAAG;AAA5C,kDAA4C"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Config, ErrorLog, FileInfo, RawDefinition } from './interfaces';
|
|
1
|
+
import { AddFileOptions, Config, ErrorLog, FileInfo, RawDefinition } from './interfaces';
|
|
2
2
|
export declare class Context {
|
|
3
3
|
static compilerExecutionPath: string;
|
|
4
4
|
static outputPath: string;
|
|
@@ -6,6 +6,11 @@ export declare class Context {
|
|
|
6
6
|
static rawDefinitions: RawDefinition[];
|
|
7
7
|
static files: FileInfo[];
|
|
8
8
|
static output: FileInfo[];
|
|
9
|
+
static exports: {
|
|
10
|
+
variableName: string;
|
|
11
|
+
path: string;
|
|
12
|
+
}[];
|
|
13
|
+
static addFile(request: AddFileOptions): Promise<void>;
|
|
9
14
|
static get successful(): boolean;
|
|
10
15
|
static addErrorLog(errorLog: ErrorLog | ErrorLog[], priority?: 'lowPriority' | 'default'): void;
|
|
11
16
|
static flushErrorLogs(): void;
|
|
@@ -2,15 +2,33 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Context = void 0;
|
|
4
4
|
const helpers_lib_1 = require("helpers-lib");
|
|
5
|
+
const file_content_generator_1 = require("./file-content-generator/file-content-generator");
|
|
5
6
|
class Context {
|
|
6
7
|
static { this.compilerExecutionPath = ''; }
|
|
7
8
|
static { this.outputPath = ''; }
|
|
8
9
|
static { this.config = {
|
|
9
|
-
projectRoot: ''
|
|
10
|
+
projectRoot: '',
|
|
11
|
+
compilerModulesPath: ''
|
|
10
12
|
}; }
|
|
11
13
|
static { this.rawDefinitions = []; }
|
|
12
14
|
static { this.files = []; }
|
|
13
15
|
static { this.output = []; }
|
|
16
|
+
static { this.exports = []; }
|
|
17
|
+
static async addFile(request) {
|
|
18
|
+
this.exports.push({ variableName: request.variableName, path: request.path });
|
|
19
|
+
this.output.push({
|
|
20
|
+
path: request.path,
|
|
21
|
+
content: await file_content_generator_1.FileContentGenerator.generate({
|
|
22
|
+
preText: request.preText,
|
|
23
|
+
variableName: request.variableName,
|
|
24
|
+
variableType: request.variableType,
|
|
25
|
+
variable: request.variable,
|
|
26
|
+
replaceMap: request.replaceMap,
|
|
27
|
+
filePath: request.path,
|
|
28
|
+
assetUrl: request.assetUrl
|
|
29
|
+
})
|
|
30
|
+
});
|
|
31
|
+
}
|
|
14
32
|
// ERROR LOGS
|
|
15
33
|
static get successful() {
|
|
16
34
|
return this.errorLogs.length === 0;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../src/framework/context.ts"],"names":[],"mappings":";;;AAAA,6CAAyC;
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../src/framework/context.ts"],"names":[],"mappings":";;;AAAA,6CAAyC;AACzC,4FAAuF;AAGvF,MAAa,OAAO;aACX,0BAAqB,GAAW,EAAE,CAAC;aACnC,eAAU,GAAW,EAAE,CAAC;aACxB,WAAM,GAAW;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,CAAC,GAAG,QAAQ,CAAC,CAAC;YACxC,CAAC;QACH,CAAC;aAAM,CAAC;YACN,IAAI,QAAQ,KAAK,aAAa,EAAE,CAAC;gBAC/B,IAAI,CAAC,cAAc,GAAG,CAAC,QAAQ,EAAE,GAAG,IAAI,CAAC,cAAc,CAAC,CAAC;YAC3D,CAAC;iBAAM,CAAC;gBACN,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;YACrC,CAAC;QACH,CAAC;IACH,CAAC;IAED,MAAM,CAAC,cAAc;QACnB,IAAI,CAAC,SAAS,GAAG,CAAC,GAAG,IAAI,CAAC,cAAc,EAAE,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC;QAC7D,IAAI,CAAC,cAAc,GAAG,EAAE,CAAC;IAC3B,CAAC;aAEM,cAAS,GAAe,EAAE,CAAC;aACnB,mBAAc,GAAe,EAAE,CAAC;;AAvDjD,0BAwDC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare class FileContentGenerator {
|
|
2
|
+
static generate(options: {
|
|
3
|
+
preText?: string;
|
|
4
|
+
variableName: string;
|
|
5
|
+
variableType?: string;
|
|
6
|
+
variable: any;
|
|
7
|
+
replaceMap?: {
|
|
8
|
+
target: string;
|
|
9
|
+
replace: string;
|
|
10
|
+
}[];
|
|
11
|
+
filePath?: string;
|
|
12
|
+
assetUrl?: string;
|
|
13
|
+
}): Promise<string>;
|
|
14
|
+
static format(str: string): Promise<string>;
|
|
15
|
+
private static convertToRelativePath;
|
|
16
|
+
private static replaceOutput;
|
|
17
|
+
private static convertAssetUrls;
|
|
18
|
+
private static stringify;
|
|
19
|
+
}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.FileContentGenerator = void 0;
|
|
30
|
+
const path_1 = __importDefault(require("path"));
|
|
31
|
+
const ESTree = __importStar(require("prettier/plugins/estree"));
|
|
32
|
+
const TsParser = __importStar(require("prettier/plugins/typescript"));
|
|
33
|
+
const standalone_1 = require("prettier/standalone");
|
|
34
|
+
const helpers_lib_1 = require("helpers-lib");
|
|
35
|
+
const context_1 = require("../context");
|
|
36
|
+
class FileContentGenerator {
|
|
37
|
+
static generate(options) {
|
|
38
|
+
let output = '';
|
|
39
|
+
if (options.preText) {
|
|
40
|
+
output += `${options.preText}\n\n`;
|
|
41
|
+
}
|
|
42
|
+
let assetsReplaceMap;
|
|
43
|
+
if (options.assetUrl) {
|
|
44
|
+
if (!options.filePath) {
|
|
45
|
+
throw new Error('filePath is required when using assetUrl');
|
|
46
|
+
}
|
|
47
|
+
if (!helpers_lib_1.Comparator.isArray(options.variable)) {
|
|
48
|
+
throw new Error('variable should be an array when using assetUrl');
|
|
49
|
+
}
|
|
50
|
+
let { assetImports, replaceMap } = this.convertAssetUrls(options.variable, options.assetUrl, options.filePath);
|
|
51
|
+
output += assetImports + '\n\n';
|
|
52
|
+
assetsReplaceMap = replaceMap;
|
|
53
|
+
}
|
|
54
|
+
if (options.variableType) {
|
|
55
|
+
output += `export const ${options.variableName}: ${options.variableType} = ${this.stringify(options.variable)}`;
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
output += `export const ${options.variableName} = ${this.stringify(options.variable)}`;
|
|
59
|
+
}
|
|
60
|
+
if (assetsReplaceMap) {
|
|
61
|
+
output = this.replaceOutput(output, assetsReplaceMap);
|
|
62
|
+
}
|
|
63
|
+
if (options.replaceMap) {
|
|
64
|
+
output = this.replaceOutput(output, options.replaceMap);
|
|
65
|
+
}
|
|
66
|
+
return this.format(output);
|
|
67
|
+
}
|
|
68
|
+
static async format(str) {
|
|
69
|
+
return (0, standalone_1.format)(str, {
|
|
70
|
+
parser: 'typescript',
|
|
71
|
+
trailingComma: 'none',
|
|
72
|
+
tabWidth: 2,
|
|
73
|
+
printWidth: 130,
|
|
74
|
+
singleQuote: true,
|
|
75
|
+
arrowParens: 'avoid',
|
|
76
|
+
plugins: [TsParser, ESTree]
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
static convertToRelativePath(filePath, relativePathFromRoot) {
|
|
80
|
+
let fromPath = context_1.Context.outputPath + filePath.substring(0, filePath.lastIndexOf('/'));
|
|
81
|
+
let toPath = context_1.Context.config.projectRoot + relativePathFromRoot.substring(1);
|
|
82
|
+
return path_1.default.relative(fromPath, toPath).replace(/\\/g, '/');
|
|
83
|
+
}
|
|
84
|
+
static replaceOutput(output, replaceMap) {
|
|
85
|
+
replaceMap.forEach(item => {
|
|
86
|
+
output = output.replace(new RegExp(item.target, 'g'), item.replace);
|
|
87
|
+
});
|
|
88
|
+
return output;
|
|
89
|
+
}
|
|
90
|
+
static convertAssetUrls(variable, assetUrl, filePath) {
|
|
91
|
+
let urls = variable.map(item => {
|
|
92
|
+
let url = helpers_lib_1.JsonHelper.deepFind(item, assetUrl);
|
|
93
|
+
if (!url) {
|
|
94
|
+
throw new Error(`OutputHelperClass: Asset url is not found in the given variable! item: "${JSON.stringify(item)}", assetUrl: "${assetUrl}"`);
|
|
95
|
+
}
|
|
96
|
+
return url;
|
|
97
|
+
});
|
|
98
|
+
let assetUrlToNameMap = new Map();
|
|
99
|
+
urls.forEach(url => {
|
|
100
|
+
if (!assetUrlToNameMap.has(url)) {
|
|
101
|
+
let name = `asset${assetUrlToNameMap.size}`;
|
|
102
|
+
assetUrlToNameMap.set(url, name);
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
let assetImports = Array.from(assetUrlToNameMap, ([key, value]) => ({ name: value, url: key }))
|
|
106
|
+
.map(item => `import ${item.name} from '${this.convertToRelativePath(filePath, item.url)}';`)
|
|
107
|
+
.join('\n');
|
|
108
|
+
let replaceMap = urls.reduce((map, url) => [...map, { target: `"${url}"`, replace: assetUrlToNameMap.get(url) }], []);
|
|
109
|
+
return { assetImports, replaceMap };
|
|
110
|
+
}
|
|
111
|
+
static stringify(obj) {
|
|
112
|
+
// eslint-disable-next-line no-null/no-null
|
|
113
|
+
return JSON.stringify(obj, (k, v) => (v === undefined ? null : v)).replace(/null/gm, 'undefined');
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
exports.FileContentGenerator = FileContentGenerator;
|
|
117
|
+
//# sourceMappingURL=file-content-generator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-content-generator.js","sourceRoot":"","sources":["../../../src/framework/file-content-generator/file-content-generator.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA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AC1B,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC,CAAC,GAAG,GAAG,EAAE,EAAE,MAAM,EAAE,IAAI,GAAG,GAAG,EAAE,OAAO,EAAE,iBAAiB,CAAC,GAAG,CAAC,GAAG,CAAE,EAAE,CAAC,EACpF,EAA2C,CAC5C,CAAC;QAEF,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,CAAC;IACtC,CAAC;IAEO,MAAM,CAAC,SAAS,CAAC,GAAQ;QAC/B,2CAA2C;QAC3C,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC;IACpG,CAAC;CACF;AAnHD,oDAmHC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export declare const Const: {
|
|
2
|
+
type: string;
|
|
3
|
+
material: string;
|
|
4
|
+
maxQuantity: number;
|
|
5
|
+
mainHand: undefined;
|
|
6
|
+
offHand: undefined;
|
|
7
|
+
bothHands: {
|
|
8
|
+
imageOnCharacter: string;
|
|
9
|
+
parryDice: undefined;
|
|
10
|
+
attacks: {
|
|
11
|
+
actionIcon: string;
|
|
12
|
+
attackDices: string[];
|
|
13
|
+
range: string;
|
|
14
|
+
requiresSetup: boolean;
|
|
15
|
+
unparryable: boolean;
|
|
16
|
+
lowersQuantity: boolean;
|
|
17
|
+
projectileType: string;
|
|
18
|
+
sounds: {
|
|
19
|
+
hit: string;
|
|
20
|
+
pre: string;
|
|
21
|
+
};
|
|
22
|
+
}[];
|
|
23
|
+
};
|
|
24
|
+
};
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Const = void 0;
|
|
4
|
+
const vitest_1 = require("vitest");
|
|
5
|
+
const mocks_1 = require("../../_mocks/mocks");
|
|
6
|
+
const context_1 = require("../context");
|
|
7
|
+
const file_content_generator_1 = require("./file-content-generator");
|
|
8
|
+
let complexObject = {
|
|
9
|
+
type: 'bow',
|
|
10
|
+
material: 'WoodenItemMaterial',
|
|
11
|
+
maxQuantity: 10,
|
|
12
|
+
mainHand: undefined,
|
|
13
|
+
offHand: undefined,
|
|
14
|
+
bothHands: {
|
|
15
|
+
imageOnCharacter: 'BodyPartImageNames',
|
|
16
|
+
parryDice: undefined,
|
|
17
|
+
attacks: [
|
|
18
|
+
{
|
|
19
|
+
actionIcon: 'AssetNames.characterActionBowAttack',
|
|
20
|
+
attackDices: ['DiceType.d6', 'DiceType.d6'],
|
|
21
|
+
range: 'WeaponRange.ranged',
|
|
22
|
+
requiresSetup: false,
|
|
23
|
+
unparryable: true,
|
|
24
|
+
lowersQuantity: true,
|
|
25
|
+
projectileType: 'ProjectileType.arrow',
|
|
26
|
+
sounds: {
|
|
27
|
+
hit: 'AssetGroups.battleSoundArrowHit',
|
|
28
|
+
pre: 'AssetGroups.battleSoundArrowShot'
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
exports.Const = {
|
|
35
|
+
type: 'bow',
|
|
36
|
+
material: 'WoodenItemMaterial',
|
|
37
|
+
maxQuantity: 10,
|
|
38
|
+
mainHand: undefined,
|
|
39
|
+
offHand: undefined,
|
|
40
|
+
bothHands: {
|
|
41
|
+
imageOnCharacter: 'BodyPartImageNames',
|
|
42
|
+
parryDice: undefined,
|
|
43
|
+
attacks: [
|
|
44
|
+
{
|
|
45
|
+
actionIcon: 'AssetNames.characterActionBowAttack',
|
|
46
|
+
attackDices: ['DiceType.d6', 'DiceType.d6'],
|
|
47
|
+
range: 'WeaponRange.ranged',
|
|
48
|
+
requiresSetup: false,
|
|
49
|
+
unparryable: true,
|
|
50
|
+
lowersQuantity: true,
|
|
51
|
+
projectileType: 'ProjectileType.arrow',
|
|
52
|
+
sounds: {
|
|
53
|
+
hit: 'AssetGroups.battleSoundArrowHit',
|
|
54
|
+
pre: 'AssetGroups.battleSoundArrowShot'
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
]
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
let noTypeExpected = `export const ConstSample = { type: 'item' };
|
|
61
|
+
`;
|
|
62
|
+
let basicConstExpected = `export const ConstSample: string = 'basic';
|
|
63
|
+
`;
|
|
64
|
+
let complexConstExpected = `export const ConstSample: any = {
|
|
65
|
+
type: 'bow',
|
|
66
|
+
material: 'WoodenItemMaterial',
|
|
67
|
+
maxQuantity: 10,
|
|
68
|
+
mainHand: undefined,
|
|
69
|
+
offHand: undefined,
|
|
70
|
+
bothHands: {
|
|
71
|
+
imageOnCharacter: 'BodyPartImageNames',
|
|
72
|
+
parryDice: undefined,
|
|
73
|
+
attacks: [
|
|
74
|
+
{
|
|
75
|
+
actionIcon: 'AssetNames.characterActionBowAttack',
|
|
76
|
+
attackDices: ['DiceType.d6', 'DiceType.d6'],
|
|
77
|
+
range: 'WeaponRange.ranged',
|
|
78
|
+
requiresSetup: false,
|
|
79
|
+
unparryable: true,
|
|
80
|
+
lowersQuantity: true,
|
|
81
|
+
projectileType: 'ProjectileType.arrow',
|
|
82
|
+
sounds: { hit: 'AssetGroups.battleSoundArrowHit', pre: 'AssetGroups.battleSoundArrowShot' }
|
|
83
|
+
}
|
|
84
|
+
]
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
`;
|
|
88
|
+
let complexConstReplaceExpected = `export const ConstSample: any = {
|
|
89
|
+
type: 'bow',
|
|
90
|
+
material: 'WoodenItemMaterial',
|
|
91
|
+
maxQuantity: 10,
|
|
92
|
+
mainHand: undefined,
|
|
93
|
+
offHand: undefined,
|
|
94
|
+
bothHands: {
|
|
95
|
+
imageOnCharacter: 'BodyPartImageNames',
|
|
96
|
+
parryDice: undefined,
|
|
97
|
+
attacks: [
|
|
98
|
+
{
|
|
99
|
+
actionIcon: 'AssetNames.characterActionBowAttack',
|
|
100
|
+
attackDices: ['DiceType.d6', 'DiceType.d6'],
|
|
101
|
+
range: WeaponRange,
|
|
102
|
+
requiresSetup: false,
|
|
103
|
+
unparryable: true,
|
|
104
|
+
lowersQuantity: true,
|
|
105
|
+
projectileType: 'ProjectileType.arrow',
|
|
106
|
+
sounds: { hit: 'AssetGroups.battleSoundArrowHit', pre: 'AssetGroups.battleSoundArrowShot' }
|
|
107
|
+
}
|
|
108
|
+
]
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
`;
|
|
112
|
+
(0, vitest_1.describe)('File Content Generator: Const Output', () => {
|
|
113
|
+
(0, vitest_1.test)('should handle no type', async () => {
|
|
114
|
+
let output = await file_content_generator_1.FileContentGenerator.generate({ variableName: 'ConstSample', variable: { type: 'item' } });
|
|
115
|
+
(0, vitest_1.expect)(output).toStrictEqual(noTypeExpected);
|
|
116
|
+
});
|
|
117
|
+
(0, vitest_1.test)('should handle basic value', async () => {
|
|
118
|
+
let output = await file_content_generator_1.FileContentGenerator.generate({ variableName: 'ConstSample', variableType: 'string', variable: 'basic' });
|
|
119
|
+
(0, vitest_1.expect)(output).toStrictEqual(basicConstExpected);
|
|
120
|
+
});
|
|
121
|
+
(0, vitest_1.test)('should handle complex object', async () => {
|
|
122
|
+
let output = await file_content_generator_1.FileContentGenerator.generate({
|
|
123
|
+
variableName: 'ConstSample',
|
|
124
|
+
variableType: 'any',
|
|
125
|
+
variable: complexObject
|
|
126
|
+
});
|
|
127
|
+
(0, vitest_1.expect)(output).toStrictEqual(complexConstExpected);
|
|
128
|
+
});
|
|
129
|
+
(0, vitest_1.test)('should handle replacing complex object', async () => {
|
|
130
|
+
let output = await file_content_generator_1.FileContentGenerator.generate({
|
|
131
|
+
variableName: 'ConstSample',
|
|
132
|
+
variableType: 'any',
|
|
133
|
+
variable: complexObject,
|
|
134
|
+
replaceMap: [{ target: `"WeaponRange.ranged"`, replace: 'WeaponRange' }]
|
|
135
|
+
});
|
|
136
|
+
(0, vitest_1.expect)(output).toStrictEqual(complexConstReplaceExpected);
|
|
137
|
+
});
|
|
138
|
+
});
|
|
139
|
+
(0, vitest_1.describe)('File Content Generator: stringify', () => {
|
|
140
|
+
(0, vitest_1.test)('should not lose properties with undefined or null value', async () => {
|
|
141
|
+
let output = await file_content_generator_1.FileContentGenerator['stringify']({
|
|
142
|
+
a: undefined,
|
|
143
|
+
// eslint-disable-next-line no-null/no-null
|
|
144
|
+
b: null
|
|
145
|
+
});
|
|
146
|
+
(0, vitest_1.expect)(output).toStrictEqual('{"a":undefined,"b":undefined}');
|
|
147
|
+
});
|
|
148
|
+
});
|
|
149
|
+
(0, vitest_1.describe)('File Content Generator: convertToRelativePath', () => {
|
|
150
|
+
(0, vitest_1.test)('should convert to relative path', async () => {
|
|
151
|
+
(0, mocks_1.resetContext)();
|
|
152
|
+
context_1.Context.outputPath = 'D:/Projects/Game-Dev/Starfighter/Starfighter-Definitions-Generator/src/.asset-build';
|
|
153
|
+
context_1.Context.config.projectRoot = 'D:/Projects/Game-Dev/Starfighter/Starfighter-Definitions-Generator/';
|
|
154
|
+
let original = '.src/definitions-sample/images/nested/test2.png';
|
|
155
|
+
let desired = '../../../definitions-sample/images/nested/test2.png';
|
|
156
|
+
let filePath = '/0-global-definitions/assets/images.ts';
|
|
157
|
+
let output = file_content_generator_1.FileContentGenerator['convertToRelativePath'](filePath, original);
|
|
158
|
+
(0, vitest_1.expect)(output).toStrictEqual(desired);
|
|
159
|
+
});
|
|
160
|
+
});
|
|
161
|
+
//# sourceMappingURL=file-content-generator.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-content-generator.test.js","sourceRoot":"","sources":["../../../src/framework/file-content-generator/file-content-generator.test.ts"],"names":[],"mappings":";;;AAAA,mCAAgD;AAEhD,8CAAkD;AAClD,wCAAqC;AACrC,qEAAgE;AAEhE,IAAI,a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ileGenerator {
|
|
2
|
+
static generateIndexFile(pretext: string, outputIndexFile: string): void;
|
|
3
|
+
private static generateIndexFileBuildMode;
|
|
4
|
+
private static generateIndexFileDevMode;
|
|
5
|
+
private static generateExportsContent;
|
|
6
|
+
private static generateInterfacesContent;
|
|
7
|
+
private static getInterfacesFromFile;
|
|
8
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.IndexFileGenerator = void 0;
|
|
27
|
+
const fs = __importStar(require("fs"));
|
|
28
|
+
const glob = __importStar(require("glob"));
|
|
29
|
+
const helpers_lib_1 = require("helpers-lib");
|
|
30
|
+
const context_1 = require("../context");
|
|
31
|
+
const START_COMMAND = '// ---- INDEX OUTPUT ----';
|
|
32
|
+
const END_COMMAND = '// ---- END ----';
|
|
33
|
+
const NEW_LINE_LENGTH = 2;
|
|
34
|
+
const FILE_EXTENSION_LENGTH = 3;
|
|
35
|
+
class IndexFileGenerator {
|
|
36
|
+
static generateIndexFile(pretext, outputIndexFile) {
|
|
37
|
+
if (context_1.Context.config.compilerModulesPath) {
|
|
38
|
+
this.generateIndexFileDevMode(pretext);
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
this.generateIndexFileBuildMode(outputIndexFile);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
static generateIndexFileBuildMode(outputIndexFile) {
|
|
45
|
+
context_1.Context.output.push({
|
|
46
|
+
path: '/index.ts',
|
|
47
|
+
content: outputIndexFile
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
static async generateIndexFileDevMode(pretext) {
|
|
51
|
+
let fileUrls = glob.sync(`${context_1.Context.config.compilerModulesPath}/**/*.ts`).map(filePath => filePath.replace(/\\/g, '/'));
|
|
52
|
+
if (fileUrls.length === 0) {
|
|
53
|
+
helpers_lib_1.ConsoleHelper.log(`No typescript file found to generate index.ts file.`, 'red');
|
|
54
|
+
}
|
|
55
|
+
let exportsContent = this.generateExportsContent();
|
|
56
|
+
let interfacesContent = this.generateInterfacesContent(fileUrls);
|
|
57
|
+
if (interfacesContent !== undefined) {
|
|
58
|
+
let output = `${pretext}\n${exportsContent}\n\n${interfacesContent}`;
|
|
59
|
+
context_1.Context.output.push({
|
|
60
|
+
path: '/index.ts',
|
|
61
|
+
content: output
|
|
62
|
+
});
|
|
63
|
+
fs.writeFileSync(`${context_1.Context.compilerExecutionPath}/output-index-file.ts`, `// AUTO GENERATED - CHANGES WILL BE REPLACED\nexport const OutputIndexFile = \`${output}\`;\n`);
|
|
64
|
+
helpers_lib_1.ConsoleHelper.log(`Index content 'output-index-file.ts' is generated.`, 'green');
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
static generateExportsContent() {
|
|
68
|
+
return context_1.Context.exports
|
|
69
|
+
.map(exportItem => `export { ${exportItem.variableName} } from '.${exportItem.path.substring(0, exportItem.path.length - FILE_EXTENSION_LENGTH)}';`)
|
|
70
|
+
.join('\n');
|
|
71
|
+
}
|
|
72
|
+
static generateInterfacesContent(fileUrls) {
|
|
73
|
+
let errorCount = 0;
|
|
74
|
+
let outputs = [];
|
|
75
|
+
fileUrls.forEach(fileUrl => {
|
|
76
|
+
let fileName = fileUrl.substring(fileUrl.lastIndexOf('/') + 1, fileUrl.lastIndexOf('.'));
|
|
77
|
+
let fileContent = fs.readFileSync(fileUrl, 'utf-8');
|
|
78
|
+
try {
|
|
79
|
+
let output = this.getInterfacesFromFile(fileName, fileContent);
|
|
80
|
+
if (output) {
|
|
81
|
+
outputs.push(output);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
catch (error) {
|
|
85
|
+
errorCount++;
|
|
86
|
+
helpers_lib_1.ConsoleHelper.log(`Error parsing file: ${fileUrl}, error: '${error.message}'`, 'red');
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
let output = `//-------------------------- DEFINITIONS --------------------------\n${outputs.join('\n')}`;
|
|
90
|
+
return errorCount === 0 ? output : undefined;
|
|
91
|
+
}
|
|
92
|
+
static getInterfacesFromFile(fileName, fileContent) {
|
|
93
|
+
let index = fileContent.indexOf(START_COMMAND);
|
|
94
|
+
let definitionsFound = index !== -1;
|
|
95
|
+
let contents = [];
|
|
96
|
+
while (index !== -1) {
|
|
97
|
+
let endIndex = fileContent.indexOf(END_COMMAND, index);
|
|
98
|
+
if (endIndex === -1) {
|
|
99
|
+
throw new Error(`No end command found.`);
|
|
100
|
+
}
|
|
101
|
+
contents.push(fileContent.substring(index + START_COMMAND.length + NEW_LINE_LENGTH, endIndex));
|
|
102
|
+
index = fileContent.indexOf(START_COMMAND, endIndex);
|
|
103
|
+
}
|
|
104
|
+
if (definitionsFound) {
|
|
105
|
+
return `// ---- ${fileName} ----\n${contents.join('\n')}`;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
exports.IndexFileGenerator = IndexFileGenerator;
|
|
110
|
+
//# sourceMappingURL=index-file-generator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-file-generator.js","sourceRoot":"","sources":["../../../src/framework/index-file-generator/index-file-generator.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AACzB,2CAA6B;AAC7B,6CAA4C;AAE5C,wCAAqC;AAErC,MAAM,aAAa,GAAG,2BAA2B,CAAC;AAClD,MAAM,WAAW,GAAG,kBAAkB,CAAC;AACvC,MAAM,eAAe,GAAG,CAAC,CAAC;AAC1B,MAAM,qBAAqB,GAAG,CAAC,CAAC;AAEhC,MAAa,kBAAkB;IAC7B,MAAM,CAAC,iBAAiB,CAAC,OAAe,EAAE,eAAuB;QAC/D,IAAI,iBAAO,CAAC,MAAM,CAAC,mBAAmB,EAAE,CAAC;YACvC,IAAI,CAAC,wBAAwB,CAAC,OAAO,CAAC,CAAC;QACzC,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,0BAA0B,CAAC,eAAe,CAAC,CAAC;QACnD,CAAC;IACH,CAAC;IAEO,MAAM,CAAC,0BAA0B,CAAC,eAAuB;QAC/D,iBAAO,CAAC,MAAM,CAAC,IAAI,CAAC;YAClB,IAAI,EAAE,WAAW;YACjB,OAAO,EAAE,eAAe;SACzB,CAAC,CAAC;IACL,CAAC;IAEO,MAAM,CAAC,KAAK,CAAC,wBAAwB,CAAC,OAAe;QAC3D,IAAI,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,iBAAO,CAAC,MAAM,CAAC,mBAAmB,UAAU,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG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KAAK,GAAG,aAAa,CAAC,MAAM,GAAG,eAAe,EAAE,QAAQ,CAAC,CAAC,CAAC;YAC/F,KAAK,GAAG,WAAW,CAAC,OAAO,CAAC,aAAa,EAAE,QAAQ,CAAC,CAAC;QACvD,CAAC;QAED,IAAI,gBAAgB,EAAE,CAAC;YACrB,OAAO,WAAW,QAAQ,UAAU,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;QAC5D,CAAC;IACH,CAAC;CACF;AA/FD,gDA+FC"}
|
|
@@ -5,6 +5,18 @@ export interface FileInfo {
|
|
|
5
5
|
path: string;
|
|
6
6
|
content: string;
|
|
7
7
|
}
|
|
8
|
+
export interface AddFileOptions {
|
|
9
|
+
path: string;
|
|
10
|
+
variableName: string;
|
|
11
|
+
variable: any;
|
|
12
|
+
preText?: string;
|
|
13
|
+
variableType?: string;
|
|
14
|
+
replaceMap?: {
|
|
15
|
+
target: string;
|
|
16
|
+
replace: string;
|
|
17
|
+
}[];
|
|
18
|
+
assetUrl?: string;
|
|
19
|
+
}
|
|
8
20
|
export interface LocationInFile {
|
|
9
21
|
readonly path: string;
|
|
10
22
|
readonly line: number;
|
|
@@ -15,6 +27,7 @@ export interface ErrorLog {
|
|
|
15
27
|
}
|
|
16
28
|
export interface Config {
|
|
17
29
|
projectRoot: string;
|
|
30
|
+
compilerModulesPath: string;
|
|
18
31
|
}
|
|
19
32
|
export type RawData = undefined | string | ParsedStructure[] | Record<string, ParsedStructure>;
|
|
20
33
|
export interface ParsedStructure {
|
|
@@ -27,6 +40,6 @@ export interface RawDefinition {
|
|
|
27
40
|
readonly location: LocationInFile;
|
|
28
41
|
}
|
|
29
42
|
export interface Output {
|
|
30
|
-
addFile: (
|
|
43
|
+
addFile: (request: AddFileOptions) => Promise<void>;
|
|
31
44
|
addError: (errorLog: ErrorLog) => void;
|
|
32
45
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DefinitionComponentClassType } from '../decorators/definition-component';
|
|
2
2
|
export declare const ConfigDefinitionComponentName = "CONFIG";
|
|
3
3
|
export declare class Kernel {
|
|
4
|
-
static process(modules: DefinitionComponentClassType<any>[],
|
|
4
|
+
static process(modules: DefinitionComponentClassType<any>[], indexFilePretext: string, outputIndexFile: string): Promise<void>;
|
|
5
5
|
private static readFiles;
|
|
6
6
|
private static writeFiles;
|
|
7
7
|
private static removeEmptyFolders;
|
package/dist/framework/kernel.js
CHANGED
|
@@ -26,24 +26,25 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
26
26
|
exports.Kernel = exports.ConfigDefinitionComponentName = void 0;
|
|
27
27
|
const fs = __importStar(require("fs"));
|
|
28
28
|
const glob = __importStar(require("glob"));
|
|
29
|
-
const path = __importStar(require("path"));
|
|
30
29
|
const helpers_lib_1 = require("helpers-lib");
|
|
31
|
-
const
|
|
32
|
-
const validator_1 = require("../helpers/validator/validator");
|
|
30
|
+
const path = __importStar(require("path"));
|
|
33
31
|
const custom_validator_helper_1 = require("../helpers/validator/custom-validator-helper/custom-validator.helper");
|
|
34
|
-
const
|
|
32
|
+
const validator_1 = require("../helpers/validator/validator");
|
|
33
|
+
const raw_data_parser_1 = require("../pipeline/raw-data-parser");
|
|
35
34
|
const context_1 = require("./context");
|
|
35
|
+
const definition_store_1 = require("./definition-store");
|
|
36
|
+
const index_file_generator_1 = require("./index-file-generator/index-file-generator");
|
|
36
37
|
exports.ConfigDefinitionComponentName = 'CONFIG';
|
|
37
38
|
const KeyValueRegex = /^[a-z]+([a-zA-Z0-9]+)*$/;
|
|
38
39
|
class Kernel {
|
|
39
|
-
static async process(modules,
|
|
40
|
+
static async process(modules, indexFilePretext, outputIndexFile) {
|
|
40
41
|
definition_store_1.DefinitionStore['setComponentNames']([
|
|
41
42
|
exports.ConfigDefinitionComponentName,
|
|
42
43
|
...modules.map(module => module.$meta.componentName)
|
|
43
44
|
]);
|
|
44
45
|
helpers_lib_1.ConsoleHelper.log('Compilation is in progress.', 'white');
|
|
45
46
|
this.readFiles();
|
|
46
|
-
let outputFiles = await this.generateOutputFiles(modules,
|
|
47
|
+
let outputFiles = await this.generateOutputFiles(modules, indexFilePretext, outputIndexFile);
|
|
47
48
|
this.writeFiles(outputFiles, context_1.Context.outputPath);
|
|
48
49
|
}
|
|
49
50
|
static readFiles() {
|
|
@@ -136,22 +137,14 @@ class Kernel {
|
|
|
136
137
|
}
|
|
137
138
|
return isEmpty;
|
|
138
139
|
}
|
|
139
|
-
static async generateOutputFiles(modules,
|
|
140
|
-
context_1.Context.output.push({
|
|
141
|
-
path: '/index.ts',
|
|
142
|
-
content: interfaces
|
|
143
|
-
});
|
|
140
|
+
static async generateOutputFiles(modules, indexFilePretext, outputIndexFile) {
|
|
144
141
|
raw_data_parser_1.RawDataParser.process();
|
|
145
142
|
context_1.Context.flushErrorLogs();
|
|
146
143
|
let preparedItems = modules.map(ModuleClass => {
|
|
147
144
|
let meta = ModuleClass.$meta;
|
|
148
145
|
let output = {
|
|
149
|
-
addFile: (
|
|
150
|
-
|
|
151
|
-
},
|
|
152
|
-
addError: (errorLog) => {
|
|
153
|
-
context_1.Context.addErrorLog(errorLog);
|
|
154
|
-
}
|
|
146
|
+
addFile: (request) => context_1.Context.addFile(request),
|
|
147
|
+
addError: (errorLog) => context_1.Context.addErrorLog(errorLog)
|
|
155
148
|
};
|
|
156
149
|
this.iterateOnKeyNames(meta.keyName, meta.componentName, ModuleClass);
|
|
157
150
|
let itemToProcess;
|
|
@@ -179,6 +172,9 @@ class Kernel {
|
|
|
179
172
|
}
|
|
180
173
|
}
|
|
181
174
|
custom_validator_helper_1.CustomValidatorHelper.logDuplicates();
|
|
175
|
+
if (context_1.Context.successful) {
|
|
176
|
+
index_file_generator_1.IndexFileGenerator.generateIndexFile(indexFilePretext, outputIndexFile);
|
|
177
|
+
}
|
|
182
178
|
return this.getOutputFiles();
|
|
183
179
|
}
|
|
184
180
|
static iterateOnKeyNames(keyName, componentName, ModuleClass) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kernel.js","sourceRoot":"","sources":["../../src/framework/kernel.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AACzB,2CAA6B;AAC7B,
|
|
1
|
+
{"version":3,"file":"kernel.js","sourceRoot":"","sources":["../../src/framework/kernel.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AACzB,2CAA6B;AAC7B,6CAAwD;AACxD,2CAA6B;AAG7B,kHAA6G;AAC7G,8DAA2D;AAC3D,iEAA4D;AAC5D,uCAAoC;AACpC,yDAAqD;AACrD,sFAAiF;AAGpE,QAAA,6BAA6B,GAAG,QAAQ,CAAC;AACtD,MAAM,aAAa,GAAG,yBAAyB,CAAC;AAEhD,MAAa,MAAM;IACjB,MAAM,CAAC,KAAK,CAAC,OAAO,CAClB,OAA4C,EAC5C,gBAAwB,EACxB,eAAuB;QAEvB,kCAAe,CAAC,mBAAmB,CAAC,CAAC;YACnC,qCAA6B;YAC7B,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAO,MAAO,CAAC,KAAK,CAAC,aAAa,CAAC;SAC5D,CAAC,CAAC;QAEH,2BAAa,CAAC,GAAG,CAAC,6BAA6B,EAAE,OAAO,CAAC,CAAC;QAC1D,IAAI,CAAC,SAAS,EAAE,CAAC;QACjB,IAAI,WAAW,GAAG,MAAM,IAAI,CAAC,mBAAmB,CAAC,OAAO,EAAE,gBAAgB,EAAE,eAAe,CAAC,CAAC;QAC7F,IAAI,CAAC,UAAU,CAAC,WAAW,EAAE,iBAAO,CAAC,UAAU,CAAC,CAAC;IACnD,CAAC;IAEO,MAAM,CAAC,SAAS;QACtB,iBAAO,CAAC,qBAAqB,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;QACvE,iBAAO,CAAC,UAAU,GAAG,GAAG,iBAAO,CAAC,qBAAqB,eAA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H,EAAE,KAAK,EAAE,SAAS,EAAE,CACrB,CAAC;YACF,2BAAa,CAAC,GAAG,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC;YAEzC,OAAO;gBACL;oBACE,IAAI,EAAE,gBAAgB;oBACtB,OAAO,EAAE,iBAAO,CAAC,SAAS;yBACvB,GAAG,CACF,QAAQ,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,WAAW,cAAc,QAAQ,CAAC,QAAQ,CAAC,IAAI,aAAa,QAAQ,CAAC,QAAQ,CAAC,IAAI,OAAO,CAClH;yBACA,IAAI,CAAC,MAAM,CAAC;iBAChB;aACF,CAAC;QACJ,CAAC;IACH,CAAC;CACF;AAtQD,wBAsQC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export { JoiCustomValidators } from './helpers/validator/joi-custom-validators';
|
|
3
|
-
export { ValidatedSpriteUrl } from './helpers/validator/custom-validators/sprite.custom-validator';
|
|
4
|
-
export { DefinitionStore } from './framework/definition-store';
|
|
1
|
+
export { DefinitionComponent, DefinitionComponentClassType, DefinitionComponentDecorator, SingleDefinitionComponent } from './decorators/definition-component';
|
|
5
2
|
export { DefinitionGenerator, DefinitionGeneratorDecorator } from './decorators/definition-generator';
|
|
6
|
-
export {
|
|
7
|
-
export {
|
|
8
|
-
export {
|
|
3
|
+
export { DefinitionStore } from './framework/definition-store';
|
|
4
|
+
export { ErrorLog, Output } from './framework/interfaces';
|
|
5
|
+
export { ValidatedSpriteUrl } from './helpers/validator/custom-validators/sprite.custom-validator';
|
|
6
|
+
export { JoiCustomValidators } from './helpers/validator/joi-custom-validators';
|
|
7
|
+
export { Validator } from './helpers/validator/validator';
|
package/dist/index.js
CHANGED
|
@@ -1,19 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
var validator_1 = require("./helpers/validator/validator");
|
|
5
|
-
Object.defineProperty(exports, "Validator", { enumerable: true, get: function () { return validator_1.Validator; } });
|
|
6
|
-
var joi_custom_validators_1 = require("./helpers/validator/joi-custom-validators");
|
|
7
|
-
Object.defineProperty(exports, "JoiCustomValidators", { enumerable: true, get: function () { return joi_custom_validators_1.JoiCustomValidators; } });
|
|
8
|
-
var definition_store_1 = require("./framework/definition-store");
|
|
9
|
-
Object.defineProperty(exports, "DefinitionStore", { enumerable: true, get: function () { return definition_store_1.DefinitionStore; } });
|
|
10
|
-
var definition_generator_1 = require("./decorators/definition-generator");
|
|
11
|
-
Object.defineProperty(exports, "DefinitionGenerator", { enumerable: true, get: function () { return definition_generator_1.DefinitionGenerator; } });
|
|
12
|
-
Object.defineProperty(exports, "DefinitionGeneratorDecorator", { enumerable: true, get: function () { return definition_generator_1.DefinitionGeneratorDecorator; } });
|
|
3
|
+
exports.Validator = exports.JoiCustomValidators = exports.DefinitionStore = exports.DefinitionGeneratorDecorator = exports.DefinitionGenerator = exports.SingleDefinitionComponent = exports.DefinitionComponentDecorator = exports.DefinitionComponent = void 0;
|
|
13
4
|
var definition_component_1 = require("./decorators/definition-component");
|
|
14
5
|
Object.defineProperty(exports, "DefinitionComponent", { enumerable: true, get: function () { return definition_component_1.DefinitionComponent; } });
|
|
15
|
-
Object.defineProperty(exports, "SingleDefinitionComponent", { enumerable: true, get: function () { return definition_component_1.SingleDefinitionComponent; } });
|
|
16
6
|
Object.defineProperty(exports, "DefinitionComponentDecorator", { enumerable: true, get: function () { return definition_component_1.DefinitionComponentDecorator; } });
|
|
17
|
-
|
|
18
|
-
|
|
7
|
+
Object.defineProperty(exports, "SingleDefinitionComponent", { enumerable: true, get: function () { return definition_component_1.SingleDefinitionComponent; } });
|
|
8
|
+
var definition_generator_1 = require("./decorators/definition-generator");
|
|
9
|
+
Object.defineProperty(exports, "DefinitionGenerator", { enumerable: true, get: function () { return definition_generator_1.DefinitionGenerator; } });
|
|
10
|
+
Object.defineProperty(exports, "DefinitionGeneratorDecorator", { enumerable: true, get: function () { return definition_generator_1.DefinitionGeneratorDecorator; } });
|
|
11
|
+
var definition_store_1 = require("./framework/definition-store");
|
|
12
|
+
Object.defineProperty(exports, "DefinitionStore", { enumerable: true, get: function () { return definition_store_1.DefinitionStore; } });
|
|
13
|
+
var joi_custom_validators_1 = require("./helpers/validator/joi-custom-validators");
|
|
14
|
+
Object.defineProperty(exports, "JoiCustomValidators", { enumerable: true, get: function () { return joi_custom_validators_1.JoiCustomValidators; } });
|
|
15
|
+
var validator_1 = require("./helpers/validator/validator");
|
|
16
|
+
Object.defineProperty(exports, "Validator", { enumerable: true, get: function () { return validator_1.Validator; } });
|
|
19
17
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,0EAK2C;AAJzC,2HAAA,mBAAmB,OAAA;AAEnB,oIAAA,4BAA4B,OAAA;AAC5B,iIAAA,yBAAyB,OAAA;AAE3B,0EAAsG;AAA7F,2HAAA,mBAAmB,OAAA;AAAE,oIAAA,4BAA4B,OAAA;AAC1D,iEAA+D;AAAtD,mHAAA,eAAe,OAAA;AAGxB,mFAAgF;AAAvE,4HAAA,mBAAmB,OAAA;AAC5B,2DAA0D;AAAjD,sGAAA,SAAS,OAAA"}
|
|
@@ -5,13 +5,16 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.Config = void 0;
|
|
7
7
|
const joi_1 = __importDefault(require("joi"));
|
|
8
|
-
const validator_1 = require("../helpers/validator/validator");
|
|
9
8
|
const context_1 = require("../framework/context");
|
|
10
9
|
const kernel_1 = require("../framework/kernel");
|
|
10
|
+
const validator_1 = require("../helpers/validator/validator");
|
|
11
11
|
const ConfigSchema = joi_1.default.object().keys({
|
|
12
12
|
projectRoot: joi_1.default.string()
|
|
13
13
|
.regex(/^[\S]+$/)
|
|
14
|
-
.required()
|
|
14
|
+
.required(),
|
|
15
|
+
compilerModulesPath: joi_1.default.string()
|
|
16
|
+
.regex(/^[\S]+$/)
|
|
17
|
+
.optional()
|
|
15
18
|
});
|
|
16
19
|
class Config {
|
|
17
20
|
static { this.$meta = {
|
|
@@ -20,7 +23,12 @@ class Config {
|
|
|
20
23
|
}; }
|
|
21
24
|
static process() {
|
|
22
25
|
let definition = validator_1.Validator.validateAndConvertSingular(kernel_1.ConfigDefinitionComponentName, ConfigSchema);
|
|
23
|
-
|
|
26
|
+
if (definition) {
|
|
27
|
+
context_1.Context.config.projectRoot = definition.projectRoot;
|
|
28
|
+
if (definition.compilerModulesPath) {
|
|
29
|
+
context_1.Context.config.compilerModulesPath = `${definition.projectRoot}${definition.compilerModulesPath.replace('./', '')}`;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
24
32
|
}
|
|
25
33
|
}
|
|
26
34
|
exports.Config = Config;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"3-config.js","sourceRoot":"","sources":["../../src/pipeline/3-config.ts"],"names":[],"mappings":";;;;;;AAAA,8CAAsB;AAEtB,
|
|
1
|
+
{"version":3,"file":"3-config.js","sourceRoot":"","sources":["../../src/pipeline/3-config.ts"],"names":[],"mappings":";;;;;;AAAA,8CAAsB;AAEtB,kDAA+C;AAC/C,gDAAoE;AACpE,8DAA2D;AAE3D,MAAM,YAAY,GAAqB,aAAG,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC;IACvD,WAAW,EAAE,aAAG,CAAC,MAAM,EAAE;SACtB,KAAK,CAAC,SAAS,CAAC;SAChB,QAAQ,EAAE;IACb,mBAAmB,EAAE,aAAG,CAAC,MAAM,EAAE;SAC9B,KAAK,CAAC,SAAS,CAAC;SAChB,QAAQ,EAAE;CACd,CAAC,CAAC;AAOH,MAAa,MAAM;aACH,UAAK,GAAG;QACpB,aAAa,EAAE,sCAA6B;QAC5C,gBAAgB,EAAE,YAAY;KAC/B,CAAC;IAEF,MAAM,CAAC,OAAO;QACZ,IAAI,UAAU,GAAG,qBAAS,CAAC,0BAA0B,CAAmB,sCAA6B,EAAE,YAAY,CAAC,CAAC;QAErH,IAAI,UAAU,EAAE,CAAC;YACf,iBAAO,CAAC,MAAM,CAAC,WAAW,GAAG,UAAU,CAAC,WAAW,CAAC;YACpD,IAAI,UAAU,CAAC,mBAAmB,EAAE,CAAC;gBACnC,iBAAO,CAAC,MAAM,CAAC,mBAAmB,GAAG,GAAG,UAAU,CAAC,WAAW,GAAG,UAAU,CAAC,mBAAmB,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,EAAE,CAAC;YACtH,CAAC;QACH,CAAC;IACH,CAAC;;AAfH,wBAgBC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "definition-generator-framework",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.8.0",
|
|
4
4
|
"description": "Definition Generator Framework",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"publishConfig": {
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"helpers-lib": "1.10.8",
|
|
39
39
|
"image-size": "1.1.1",
|
|
40
40
|
"joi": "17.11.0",
|
|
41
|
-
"prettier": "3.
|
|
41
|
+
"prettier": "3.3.3"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@types/glob": "8.1.0",
|
package/package.json.bak
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "definition-generator-framework",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.8.0",
|
|
4
4
|
"description": "Definition Generator Framework",
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"publishConfig": {
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"helpers-lib": "1.10.8",
|
|
39
39
|
"image-size": "1.1.1",
|
|
40
40
|
"joi": "17.11.0",
|
|
41
|
-
"prettier": "3.
|
|
41
|
+
"prettier": "3.3.3"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@types/glob": "8.1.0",
|