@ddd-tool/domain-designer-cli 0.1.0-beta.0 → 0.1.0-beta.10
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 +46 -0
- package/bin/domain-designer-cli.cjs +18572 -232
- package/package.json +12 -13
- package/src/views/index.ts +2 -2
- package/templates/node_modules/@ddd-tool/domain-designer-core/common.d.ts +3 -2
- package/templates/node_modules/@ddd-tool/domain-designer-core/define.d.ts +3 -2
- package/templates/node_modules/@ddd-tool/domain-designer-core/index.d.ts +1 -0
- package/templates/node_modules/version.txt +1 -1
- package/vite.config.ts +1 -10
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ddd-tool/domain-designer-cli",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.10",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"type": "module",
|
|
@@ -27,32 +27,31 @@
|
|
|
27
27
|
"repository": "https://github.com/ddd-tool/domain-designer-cli-node",
|
|
28
28
|
"license": "Apache-2.0",
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@ddd-tool/domain-designer-core": "0.1.0-beta.
|
|
31
|
-
"@ddd-tool/domain-designer-ui-component": "0.1.0-beta.
|
|
30
|
+
"@ddd-tool/domain-designer-core": "0.1.0-beta.7",
|
|
31
|
+
"@ddd-tool/domain-designer-ui-component": "0.1.0-beta.6",
|
|
32
32
|
"@primeuix/themes": "^1.0.0",
|
|
33
33
|
"@types/node": "^22.13.10",
|
|
34
|
-
"@vitejs/plugin-vue": "^5.2.
|
|
34
|
+
"@vitejs/plugin-vue": "^5.2.3",
|
|
35
35
|
"@vue/tsconfig": "^0.7.0",
|
|
36
36
|
"esbuild": "^0.24.2",
|
|
37
37
|
"npm-run-all2": "^7.0.2",
|
|
38
38
|
"primeicons": "^7.0.0",
|
|
39
|
-
"primevue": "^4.3.
|
|
39
|
+
"primevue": "^4.3.2",
|
|
40
40
|
"typescript": "^5.8.2",
|
|
41
|
-
"vite": "^6.2.
|
|
42
|
-
"vite-plugin-top-level-await": "^1.5.0",
|
|
41
|
+
"vite": "^6.2.2",
|
|
43
42
|
"vue": "^3.5.13",
|
|
44
43
|
"vue-tsc": "^2.2.8",
|
|
45
|
-
"zx": "^8.4.
|
|
44
|
+
"zx": "^8.4.1"
|
|
46
45
|
},
|
|
47
46
|
"scripts": {
|
|
48
47
|
"dev": "vite",
|
|
49
48
|
"test": "run-p build:cli && run-p test:fun",
|
|
50
49
|
"test:fun": "vitest",
|
|
51
50
|
"verify": "tsc -p ./tsconfig.json",
|
|
52
|
-
"demo:init": "node ./bin/domain-designer-cli.cjs init --source=./demo",
|
|
53
|
-
"demo:runWeb": "node ./bin/domain-designer-cli.cjs runWeb --source=./demo",
|
|
54
|
-
"demo:update": "node ./bin/domain-designer-cli.cjs update --source=./demo",
|
|
55
|
-
"demo:info": "node ./bin/domain-designer-cli.cjs info",
|
|
56
|
-
"demo:genCode": "node ./bin/domain-designer-cli.cjs genCode --source=./demo"
|
|
51
|
+
"demo:init": "node ./bin/domain-designer-cli.cjs init --source=./demo --debug",
|
|
52
|
+
"demo:runWeb": "node ./bin/domain-designer-cli.cjs runWeb --source=./demo --debug",
|
|
53
|
+
"demo:update": "node ./bin/domain-designer-cli.cjs update --source=./demo --debug",
|
|
54
|
+
"demo:info": "node ./bin/domain-designer-cli.cjs info --debug",
|
|
55
|
+
"demo:genCode": "node ./bin/domain-designer-cli.cjs genCode --source=./demo --debug"
|
|
57
56
|
}
|
|
58
57
|
}
|
package/src/views/index.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type DomainDesigner, isDomainDesigner } from '@ddd-tool/domain-designer-core'
|
|
2
2
|
|
|
3
|
-
const __d1 = (await import('
|
|
4
|
-
const __d2 = (await import('
|
|
3
|
+
const __d1 = (await import('F:/vscode_projects/@ddd-tool/domain-designer-cli-node/demo/example-agg')).default
|
|
4
|
+
const __d2 = (await import('F:/vscode_projects/@ddd-tool/domain-designer-cli-node/demo/example')).default
|
|
5
5
|
|
|
6
6
|
const data: Record<string, DomainDesigner> = {}
|
|
7
7
|
|
|
@@ -4,7 +4,7 @@ type Rule = 'Info' | 'Actor' | 'Command' | 'FacadeCommand' | 'Agg' | 'Event' | '
|
|
|
4
4
|
export declare function genId(): string;
|
|
5
5
|
type ContextInitializer = () => {
|
|
6
6
|
id: string;
|
|
7
|
-
options
|
|
7
|
+
options: DomainDesignOptions;
|
|
8
8
|
createNote: DomainDesignNoteProvider;
|
|
9
9
|
createInfo: DomainDesignInfoProvider;
|
|
10
10
|
createActor: DomainDesignActorProvider;
|
|
@@ -17,13 +17,14 @@ type ContextInitializer = () => {
|
|
|
17
17
|
createSystem: DomainDesignSystemProvider;
|
|
18
18
|
createReadModel: DomainDesignReadModelProvider;
|
|
19
19
|
};
|
|
20
|
+
export declare function defaultOptions(): Required<DomainDesignOptions>;
|
|
20
21
|
export type DomainDesignInternalContext = ReturnType<typeof createInternalContext>;
|
|
21
22
|
declare function createInternalContext(initFn: ContextInitializer): {
|
|
22
23
|
startWorkflow(name: string): string;
|
|
23
24
|
defineUserStory(name: string, workflowNames: NonEmptyArray<string>): void;
|
|
24
25
|
linkTo(srcRule: Rule, srcId: string, targetRule: Rule, targetId: string, linkType?: LinkType): void;
|
|
25
26
|
getDesignerId(): string;
|
|
26
|
-
|
|
27
|
+
getDesignerOptions(): Required<DomainDesignOptions>;
|
|
27
28
|
getWorkflows(): Record<string, string[]>;
|
|
28
29
|
getUserStories(): Record<string, string[]>;
|
|
29
30
|
getLinks(): Record<string, LinkType>;
|
|
@@ -206,7 +206,8 @@ export interface DomainDesignReadModel<INFOS extends DomainDesignInfoRecord> ext
|
|
|
206
206
|
toFormat(): string;
|
|
207
207
|
}
|
|
208
208
|
export type DomainDesignOptions = {
|
|
209
|
-
moduleName
|
|
209
|
+
moduleName?: string;
|
|
210
|
+
ignoreValueObjects?: string[];
|
|
210
211
|
__toFormatType?: 'BngleBrackets' | 'JSON' | 'JSONPretty';
|
|
211
212
|
};
|
|
212
213
|
export type NonEmptyArray<T> = [T, ...T[]];
|
|
@@ -251,7 +252,7 @@ export type DomainDesigner = {
|
|
|
251
252
|
defineUserStory(name: string, workflowNames: NonEmptyArray<string>): void;
|
|
252
253
|
linkTo(srcRule: 'Info' | 'Actor' | 'Command' | 'FacadeCommand' | 'Agg' | 'Event' | 'Policy' | 'Service' | 'System' | 'ReadModel', srcId: string, targetRule: 'Info' | 'Actor' | 'Command' | 'FacadeCommand' | 'Agg' | 'Event' | 'Policy' | 'Service' | 'System' | 'ReadModel', targetId: string, linkType?: import('./common').LinkType): void;
|
|
253
254
|
getDesignerId(): string;
|
|
254
|
-
|
|
255
|
+
getDesignerOptions(): Required<DomainDesignOptions>;
|
|
255
256
|
getWorkflows(): Record<string, string[]>;
|
|
256
257
|
getUserStories(): Record<string, string[]>;
|
|
257
258
|
getLinks(): Record<string, import('./common').LinkType>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { DomainDesigner, DomainDesignOptions } from './define';
|
|
2
2
|
export declare function createDomainDesigner(opts?: DomainDesignOptions): DomainDesigner;
|
|
3
3
|
export { type DomainDesigner, type DomainDesignAgg, type DomainDesignCommand, type DomainDesignFacadeCommand, type DomainDesignNote, type DomainDesignEvent, type DomainDesignInfo, type DomainDesignInfoType, type DomainDesignActor, type DomainDesignSystem, type DomainDesignService, type DomainDesignPolicy, type DomainDesignInfoRecord, type DomainDesignReadModel, type DomainDesignObject, isDomainDesignInfo, isDomainDesignInfoFunc, isDomainDesignActor, isDomainDesignAgg, isDomainDesignCommand, isDomainDesignFacadeCommand, isDomainDesignEvent, isDomainDesignPolicy, isDomainDesignReadModel, isDomainDesignService, isDomainDesignSystem, isDomainDesigner, } from './define';
|
|
4
|
+
export { defaultOptions } from './common';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
0.1.0-beta.
|
|
1
|
+
0.1.0-beta.10
|
package/vite.config.ts
CHANGED
|
@@ -2,18 +2,9 @@ import { fileURLToPath, URL } from 'url'
|
|
|
2
2
|
|
|
3
3
|
import { defineConfig } from 'vite'
|
|
4
4
|
import vue from '@vitejs/plugin-vue'
|
|
5
|
-
import topLevelAwait from 'vite-plugin-top-level-await'
|
|
6
5
|
|
|
7
6
|
export default defineConfig({
|
|
8
|
-
plugins: [
|
|
9
|
-
vue(),
|
|
10
|
-
topLevelAwait({
|
|
11
|
-
// The export name of top-level await promise for each chunk module
|
|
12
|
-
promiseExportName: '__tla',
|
|
13
|
-
// The function to generate import names of top-level await promise in each chunk module
|
|
14
|
-
promiseImportName: (i) => `__tla_${i}`,
|
|
15
|
-
}),
|
|
16
|
-
],
|
|
7
|
+
plugins: [vue()],
|
|
17
8
|
esbuild: {
|
|
18
9
|
drop: ['console', 'debugger'], // 移除 console 和 debugger 语句
|
|
19
10
|
},
|