@ddd-tool/domain-designer-generator 0.1.0-beta.9 → 0.3.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/common.d.ts +8 -8
- package/domain/generator-agg.d.ts +9681 -3700
- package/domain/types.d.ts +145 -0
- package/domain-plugin/generator-csharp-plugin.d.ts +514 -190
- package/domain-plugin/generator-go-plugin.d.ts +514 -190
- package/domain-plugin/generator-java-plugin.d.ts +514 -190
- package/domain-plugin/generator-kotlin-plugin.d.ts +514 -190
- package/index.d.ts +10 -10
- package/index.js +1822 -1606
- package/package.json +5 -13
- package/domain/define.d.ts +0 -96
package/package.json
CHANGED
|
@@ -1,25 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ddd-tool/domain-designer-generator",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
|
+
"main": "index.js",
|
|
6
7
|
"keywords": [],
|
|
7
8
|
"author": "",
|
|
8
9
|
"license": "ISC",
|
|
9
10
|
"devDependencies": {
|
|
10
|
-
"@ddd-tool/domain-designer-core": "0.1.0-beta.7",
|
|
11
|
-
"@types/node": "^22.13.10",
|
|
12
|
-
"@vitest/coverage-v8": "3.0.9",
|
|
13
|
-
"@vue/reactivity": "^3.5.13",
|
|
14
|
-
"npm-run-all2": "^7.0.2",
|
|
15
11
|
"read-pkg": "^9.0.1",
|
|
16
|
-
"
|
|
17
|
-
"vitest": "^3.0.9",
|
|
18
|
-
"vue-fn": "0.1.0-beta.1",
|
|
19
|
-
"vue-tsc": "^2.2.8"
|
|
12
|
+
"@ddd-tool/domain-designer-core": "^0.3.0"
|
|
20
13
|
},
|
|
21
14
|
"peerDependencies": {
|
|
22
|
-
"@vue/reactivity": "
|
|
23
|
-
}
|
|
24
|
-
"main": "index.js"
|
|
15
|
+
"@vue/reactivity": "3.5.27"
|
|
16
|
+
}
|
|
25
17
|
}
|
package/domain/define.d.ts
DELETED
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import { DomainDesignInfo, DomainDesignInfoType, DomainDesignReadModel, type DomainDesignAgg, type DomainDesignCommand, type DomainDesignEvent, type DomainDesignFacadeCommand, type DomainDesignInfoRecord } from '@ddd-tool/domain-designer-core';
|
|
2
|
-
export type DomainNode = DomainDesignCommand<DomainDesignInfoRecord> | DomainDesignFacadeCommand<DomainDesignInfoRecord> | DomainDesignAgg<DomainDesignInfoRecord> | DomainDesignEvent<DomainDesignInfoRecord> | DomainDesignReadModel<DomainDesignInfoRecord>;
|
|
3
|
-
export declare function isStruct(o: object): o is DomainNode;
|
|
4
|
-
export declare enum Language {
|
|
5
|
-
Java = "java",
|
|
6
|
-
Kotlin = "kotlin",
|
|
7
|
-
CSharp = "csharp",
|
|
8
|
-
Go = "go"
|
|
9
|
-
}
|
|
10
|
-
export declare class CodeFile {
|
|
11
|
-
private readonly imports;
|
|
12
|
-
private parentDir;
|
|
13
|
-
private name;
|
|
14
|
-
private content;
|
|
15
|
-
constructor(parentDir: string[], name: string);
|
|
16
|
-
addImport(imp: string): void;
|
|
17
|
-
addImports(imports: string[] | Set<string>): void;
|
|
18
|
-
getImports(): string[];
|
|
19
|
-
appendContent(content: string): void;
|
|
20
|
-
appendContentln(content: string): void;
|
|
21
|
-
getContent(): string;
|
|
22
|
-
getName(): string;
|
|
23
|
-
setName(name: string): void;
|
|
24
|
-
getParentDir(): string[];
|
|
25
|
-
setParentDir(parentDir: string[]): void;
|
|
26
|
-
}
|
|
27
|
-
export interface CodeSnippets<TYPE extends 'Info' | 'Agg' | 'AggImpl' | 'Command' | 'CommandHandler' | 'Event' | 'FacadeCommand' | 'FacadeCommandHandler' | 'ReadMode'> {
|
|
28
|
-
type: TYPE;
|
|
29
|
-
imports: Set<string>;
|
|
30
|
-
content: string;
|
|
31
|
-
}
|
|
32
|
-
export declare namespace java {
|
|
33
|
-
enum JavaGeneratorAddition {
|
|
34
|
-
Lombok = "Lombok",
|
|
35
|
-
LombokBuilder = "LombokBuilder",
|
|
36
|
-
RecordValueObject = "RecordValueObject",
|
|
37
|
-
CommandHandler = "CommandHandler",
|
|
38
|
-
Jpa = "Jpa",
|
|
39
|
-
Timezone = "Timezone",
|
|
40
|
-
SpringFramework = "SpringFramework"
|
|
41
|
-
}
|
|
42
|
-
enum IdGenStrategy {
|
|
43
|
-
TABLE = "TABLE",
|
|
44
|
-
SEQUENCE = "SEQUENCE",
|
|
45
|
-
IDENTITY = "IDENTITY",
|
|
46
|
-
UUID = "UUID",
|
|
47
|
-
AUTO = "AUTO"
|
|
48
|
-
}
|
|
49
|
-
interface JavaContext extends GeneratorContext<Language.Java> {
|
|
50
|
-
nonNullAnnotation: string;
|
|
51
|
-
nullableAnnotation: string;
|
|
52
|
-
jdkVersion: '8' | '17' | '21';
|
|
53
|
-
idGenStrategy: IdGenStrategy;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
export declare namespace kotlin {
|
|
57
|
-
enum KotlinGeneratorAddition {
|
|
58
|
-
ValueClass = "ValueClass",
|
|
59
|
-
CommandHandler = "CommandHandler",
|
|
60
|
-
Timezone = "Timezone"
|
|
61
|
-
}
|
|
62
|
-
interface KotlinContext extends GeneratorContext<Language.Kotlin> {
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
export declare namespace csharp {
|
|
66
|
-
enum CSharpGeneratorAddition {
|
|
67
|
-
Timezone = "Timezone",
|
|
68
|
-
RecordStruct = "RecordStruct",
|
|
69
|
-
PrimaryConstructor = "PrimaryConstructor",
|
|
70
|
-
CommandHandlerInterface = "CommandHandlerInterface",
|
|
71
|
-
AggInterface = "AggInterface"
|
|
72
|
-
}
|
|
73
|
-
interface CSharpContext extends GeneratorContext<Language.CSharp> {
|
|
74
|
-
commandHandlerInterface?: string;
|
|
75
|
-
aggInterface?: string;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
export declare namespace go {
|
|
79
|
-
enum GoGeneratorAddition {
|
|
80
|
-
SinglePackageEachDesigner = "SinglePackageEachDesigner"
|
|
81
|
-
}
|
|
82
|
-
interface GoContext extends GeneratorContext<Language.Go> {
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
export type GeneratorAddition<LANG extends Language> = LANG extends 'java' ? java.JavaGeneratorAddition : LANG extends 'kotlin' ? kotlin.KotlinGeneratorAddition : LANG extends 'csharp' ? csharp.CSharpGeneratorAddition : LANG extends 'go' ? go.GoGeneratorAddition : never;
|
|
86
|
-
export interface GeneratorContext<LANG extends Language> {
|
|
87
|
-
namespace: string;
|
|
88
|
-
moduleName: string;
|
|
89
|
-
additions: Set<GeneratorAddition<LANG>>;
|
|
90
|
-
}
|
|
91
|
-
export type InfoCodeProvider = (info: DomainDesignInfo<DomainDesignInfoType, string>) => CodeSnippets<'Info'>[];
|
|
92
|
-
export type CommandCodeProvider = (cmd: DomainDesignCommand<DomainDesignInfoRecord>) => CodeSnippets<'Command' | 'CommandHandler'>[];
|
|
93
|
-
export type FacadeCommandCodeProvider = (cmd: DomainDesignFacadeCommand<DomainDesignInfoRecord>) => CodeSnippets<'FacadeCommand' | 'FacadeCommandHandler'>[];
|
|
94
|
-
export type AggCodeProvider = (agg: DomainDesignAgg<DomainDesignInfoRecord>) => CodeSnippets<'Agg' | 'AggImpl'>[];
|
|
95
|
-
export type EventCodeProvider = (event: DomainDesignEvent<DomainDesignInfoRecord>) => CodeSnippets<'Event'>[];
|
|
96
|
-
export type ReadModelCodeProvider = (readModel: DomainDesignReadModel<DomainDesignInfoRecord>) => CodeSnippets<'ReadMode'>[];
|