@ldsg/cli 0.3.49 → 0.3.50
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/.rush/temp/package-deps_build.json +5 -5
- package/.tsbuildinfo +1 -1
- package/CHANGELOG.json +29 -0
- package/CHANGELOG.md +8 -1
- package/dist/commands/generate/utils/generate-application/index.js +27 -1
- package/dist/commands/generate/utils/generate-application/index.js.map +1 -1
- package/dist/commands/generate/utils/generate-application/utils/load-generator-app/index.js +2 -0
- package/dist/commands/generate/utils/generate-application/utils/load-generator-app/index.js.map +1 -1
- package/package.json +6 -6
- package/src/commands/generate/utils/generate-application/index.ts +55 -3
- package/src/commands/generate/utils/generate-application/utils/load-generator-app/index.ts +4 -0
package/CHANGELOG.json
CHANGED
|
@@ -1,6 +1,35 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ldsg/cli",
|
|
3
3
|
"entries": [
|
|
4
|
+
{
|
|
5
|
+
"version": "0.3.50",
|
|
6
|
+
"tag": "@ldsg/cli_v0.3.50",
|
|
7
|
+
"date": "Thu, 05 Nov 2026 13:10:58 GMT",
|
|
8
|
+
"comments": {
|
|
9
|
+
"patch": [
|
|
10
|
+
{
|
|
11
|
+
"comment": "发布更新"
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
"dependency": [
|
|
15
|
+
{
|
|
16
|
+
"comment": "Updating dependency \"@ldsg/generator-app\" to `0.3.50`"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"comment": "Updating dependency \"@ldsg/handler\" to `0.3.50`"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"comment": "Updating dependency \"@ldsg/resource\" to `0.3.50`"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"comment": "Updating dependency \"@ldsg/utils\" to `0.3.50`"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"comment": "Updating dependency \"@ldsg/types\" to `0.3.50`"
|
|
29
|
+
}
|
|
30
|
+
]
|
|
31
|
+
}
|
|
32
|
+
},
|
|
4
33
|
{
|
|
5
34
|
"version": "0.3.49",
|
|
6
35
|
"tag": "@ldsg/cli_v0.3.49",
|
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
# Change Log - @ldsg/cli
|
|
2
2
|
|
|
3
|
-
This log was last generated on Thu, 05 Nov 2026
|
|
3
|
+
This log was last generated on Thu, 05 Nov 2026 13:10:58 GMT and should not be manually modified.
|
|
4
|
+
|
|
5
|
+
## 0.3.50
|
|
6
|
+
Thu, 05 Nov 2026 13:10:58 GMT
|
|
7
|
+
|
|
8
|
+
### Patches
|
|
9
|
+
|
|
10
|
+
- 发布更新
|
|
4
11
|
|
|
5
12
|
## 0.3.49
|
|
6
13
|
Thu, 05 Nov 2026 00:13:54 GMT
|
|
@@ -20,6 +20,22 @@ const generateApplication = async (params) => {
|
|
|
20
20
|
requiredResourceKinds: generatorRequiredResourceKinds,
|
|
21
21
|
resourceRecords: dataResourceRecords,
|
|
22
22
|
}).requiredResourceRecords;
|
|
23
|
+
const rawRootResourceId = dataResourceRecords.find((resourceRecord) => !resourceRecord.parentId).id;
|
|
24
|
+
generatorRequiredResourceRecords = lodash_1.default.map(generatorRequiredResourceRecords, (resourceRecord) => {
|
|
25
|
+
const { kind } = resourceRecord;
|
|
26
|
+
if (kind === "generator_app") {
|
|
27
|
+
return lodash_1.default.omit(resourceRecord, "parentId");
|
|
28
|
+
}
|
|
29
|
+
return resourceRecord;
|
|
30
|
+
});
|
|
31
|
+
const newRootResourceId = generatorRequiredResourceRecords.find((resourceRecord) => !resourceRecord.parentId).id;
|
|
32
|
+
const oldResourceIdToNewResourceIdMap = {
|
|
33
|
+
[rawRootResourceId]: newRootResourceId,
|
|
34
|
+
};
|
|
35
|
+
generatorRequiredResourceRecords = (0, utils_1.replaceResourceIds)({
|
|
36
|
+
source: generatorRequiredResourceRecords,
|
|
37
|
+
oldResourceIdToNewResourceIdMap,
|
|
38
|
+
}).replacement;
|
|
23
39
|
const generatorResourceRecords = lodash_1.default.filter(generatorRequiredResourceRecords, (resourceRecord) => {
|
|
24
40
|
const { kind } = resourceRecord;
|
|
25
41
|
return kind === "generator";
|
|
@@ -29,14 +45,24 @@ const generateApplication = async (params) => {
|
|
|
29
45
|
return lodash_1.default.snakeCase(slug);
|
|
30
46
|
});
|
|
31
47
|
}
|
|
48
|
+
console.debug("generatorNames", generatorNames);
|
|
49
|
+
await fs_extra_1.default.writeJSON("a.json", generatorRequiredResourceRecords);
|
|
32
50
|
let metaGenerator;
|
|
33
51
|
{
|
|
34
52
|
const hasMetaGenerator = generatorNames.includes("meta");
|
|
35
53
|
if (hasMetaGenerator) {
|
|
36
|
-
const
|
|
54
|
+
const buildMetaGeneratorAppParams = {
|
|
55
|
+
...params,
|
|
56
|
+
data: {
|
|
57
|
+
...(params.data ?? {}),
|
|
58
|
+
resourceRecords: generatorRequiredResourceRecords,
|
|
59
|
+
},
|
|
60
|
+
};
|
|
61
|
+
const buildMetaGeneratorAppRes = await (0, utils_2.buildMetaGeneratorApp)(buildMetaGeneratorAppParams);
|
|
37
62
|
metaGenerator = buildMetaGeneratorAppRes.metaGenerator;
|
|
38
63
|
}
|
|
39
64
|
}
|
|
65
|
+
console.debug("metaGenerator", metaGenerator);
|
|
40
66
|
let appGenerator;
|
|
41
67
|
{
|
|
42
68
|
const hasAppGenerator = generatorNames.includes("app");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/commands/generate/utils/generate-application/index.ts"],"names":[],"mappings":";;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/commands/generate/utils/generate-application/index.ts"],"names":[],"mappings":";;;;;;AAAA,uCAAoG;AACpG,wDAA0B;AAC1B,oDAAuB;AACvB,0DAA6B;AAE7B,mCAKiB;AAaV,MAAM,mBAAmB,GAAwB,KAAK,EAAE,MAAM,EAAE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GAAG,MAAM,EAAE,CAAC,CAAC;YAEzF,YAAY,GAAG,uBAAuB,CAAC,YAAY,CAAC;QACtD,CAAC;IACH,CAAC;IAKD,MAAM,cAAc,GAAG,MAAM,IAAA,mBAAW,EAAC,EAAE,YAAY,EAAE,GAAG,MAAM,EAAE,CAAC,CAAC;IAKtE,CAAC;QACC,MAAM,EAAE,OAAO,EAAE,GAAG,cAAc,CAAC;QAEnC,IAAI,KAAK,EAAE,CAAC;YACV,MAAM,aAAa,GAAG,mBAAI,CAAC,IAAI,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC;YAEvD,MAAM,kBAAE,CAAC,UAAU,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC;QAC9C,CAAC;aAAM,CAAC;YACN,IAAA,0BAAkB,EAAC,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC,CAAC;QAC9C,CAAC;IACH,CAAC;AACH,CAAC,CAAC;AAhJW,QAAA,mBAAmB,uBAgJ9B"}
|
|
@@ -22,7 +22,9 @@ const loadGeneratorApp = async (params) => {
|
|
|
22
22
|
const entryUrl = `${(0, node_url_1.pathToFileURL)(entryPath).href}?t=${Date.now()}`;
|
|
23
23
|
const { instantiateAppResource } = (await importModule(entryUrl));
|
|
24
24
|
const appResource = await instantiateAppResource();
|
|
25
|
+
console.debug("loadGeneratorApp appResource", appResource);
|
|
25
26
|
const { app: generatorApp } = appResource.createGeneratorApp();
|
|
27
|
+
console.debug("loadGeneratorApp generatorApp", generatorApp);
|
|
26
28
|
return generatorApp;
|
|
27
29
|
};
|
|
28
30
|
exports.loadGeneratorApp = loadGeneratorApp;
|
package/dist/commands/generate/utils/generate-application/utils/load-generator-app/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/commands/generate/utils/generate-application/utils/load-generator-app/index.ts"],"names":[],"mappings":";;;;;;AAAA,uCAA8F;AAE9F,wDAA0B;AAC1B,0DAA6B;AAC7B,uCAAyC;AAiBlC,MAAM,gBAAgB,GAAqB,KAAK,EAAE,MAAM,EAAE,EAAE;IACjE,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,GAAG,MAAM,CAAC;IAKvC,MAAM,kBAAE,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;IAE5B,IAAA,0BAAkB,EAAC;QACjB,OAAO;QACP,UAAU;KACX,CAAC,CAAC;IAEH,MAAM,IAAA,2BAAmB,EAAC,EAAE,GAAG,EAAE,UAAU,EAAE,CAAC,CAAC;IAE/C,MAAM,IAAA,8BAAsB,EAAC,EAAE,GAAG,EAAE,UAAU,EAAE,CAAC,CAAC;IAOlD,MAAM,YAAY,GAAG,IAAI,QAAQ,CAAC,WAAW,EAAE,0BAA0B,CAEpD,CAAC;IAEtB,MAAM,SAAS,GAAG,mBAAI,CAAC,IAAI,CAAC,UAAU,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC;IAK5D,MAAM,QAAQ,GAAG,GAAG,IAAA,wBAAa,EAAC,SAAS,CAAC,CAAC,IAAI,MAAM,IAAI,CAAC,GAAG,EAAE,EAAE,CAAC;IAEpE,MAAM,EAAE,sBAAsB,EAAE,GAAG,CAAC,MAAM,YAAY,CAAC,QAAQ,CAAC,CAE/D,CAAC;IAEF,MAAM,WAAW,GAAG,MAAM,sBAAsB,EAAE,CAAC;IAEnD,MAAM,EAAE,GAAG,EAAE,YAAY,EAAE,GAAG,WAAW,CAAC,kBAAkB,EAAE,CAAC;IAE/D,OAAO,YAAY,CAAC;AACtB,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/commands/generate/utils/generate-application/utils/load-generator-app/index.ts"],"names":[],"mappings":";;;;;;AAAA,uCAA8F;AAE9F,wDAA0B;AAC1B,0DAA6B;AAC7B,uCAAyC;AAiBlC,MAAM,gBAAgB,GAAqB,KAAK,EAAE,MAAM,EAAE,EAAE;IACjE,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,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
|
17
17
|
"commander": "^12.0.0",
|
|
18
18
|
"fs-extra": "^11.3.0",
|
|
19
19
|
"js-yaml": "^4.1.0",
|
|
20
|
-
"@ldsg/generator-app": "0.3.
|
|
21
|
-
"@ldsg/resource": "0.3.
|
|
22
|
-
"@ldsg/
|
|
23
|
-
"@ldsg/
|
|
20
|
+
"@ldsg/generator-app": "0.3.50",
|
|
21
|
+
"@ldsg/resource": "0.3.50",
|
|
22
|
+
"@ldsg/utils": "0.3.50",
|
|
23
|
+
"@ldsg/handler": "0.3.50"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@types/fs-extra": "^11.0.4",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"ts-node": "^10.9.2",
|
|
40
40
|
"tslib": "^2.8.1",
|
|
41
41
|
"typescript": "^5.3.3",
|
|
42
|
-
"@ldsg/types": "0.3.
|
|
42
|
+
"@ldsg/types": "0.3.50"
|
|
43
43
|
},
|
|
44
44
|
"scripts": {
|
|
45
45
|
"build": "tsc --project tsconfig.build.json",
|
|
@@ -1,9 +1,14 @@
|
|
|
1
|
-
import { extractZipToFolder, filterRequiredResourceRecords } from "@ldsg/utils";
|
|
1
|
+
import { extractZipToFolder, filterRequiredResourceRecords, replaceResourceIds } from "@ldsg/utils";
|
|
2
2
|
import fs from "fs-extra";
|
|
3
3
|
import _ from "lodash";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import type { GenerateParams, Generator, ResourceRecords } from "@ldsg/types";
|
|
6
|
-
import {
|
|
6
|
+
import {
|
|
7
|
+
buildAppGeneratorApp,
|
|
8
|
+
buildMetaGeneratorApp,
|
|
9
|
+
BuildMetaGeneratorAppParams,
|
|
10
|
+
generateApp,
|
|
11
|
+
} from "./utils";
|
|
7
12
|
|
|
8
13
|
interface GenerateApplicationParams extends GenerateParams {}
|
|
9
14
|
|
|
@@ -36,6 +41,39 @@ export const generateApplication: GenerateApplication = async (params) => {
|
|
|
36
41
|
resourceRecords: dataResourceRecords,
|
|
37
42
|
}).requiredResourceRecords;
|
|
38
43
|
|
|
44
|
+
/**
|
|
45
|
+
* 找出原应用的根资源ID
|
|
46
|
+
*/
|
|
47
|
+
const rawRootResourceId = dataResourceRecords.find(
|
|
48
|
+
(resourceRecord) => !resourceRecord.parentId,
|
|
49
|
+
).id;
|
|
50
|
+
|
|
51
|
+
generatorRequiredResourceRecords = _.map(generatorRequiredResourceRecords, (resourceRecord) => {
|
|
52
|
+
const { kind } = resourceRecord;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* 通过移除 parentId 以提升为 generator_app 资源为根资源
|
|
56
|
+
*/
|
|
57
|
+
if (kind === "generator_app") {
|
|
58
|
+
return _.omit(resourceRecord, "parentId");
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
return resourceRecord;
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
const newRootResourceId = generatorRequiredResourceRecords.find(
|
|
65
|
+
(resourceRecord) => !resourceRecord.parentId,
|
|
66
|
+
).id;
|
|
67
|
+
|
|
68
|
+
const oldResourceIdToNewResourceIdMap: Record<string, string> = {
|
|
69
|
+
[rawRootResourceId]: newRootResourceId,
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
generatorRequiredResourceRecords = replaceResourceIds({
|
|
73
|
+
source: generatorRequiredResourceRecords,
|
|
74
|
+
oldResourceIdToNewResourceIdMap,
|
|
75
|
+
}).replacement;
|
|
76
|
+
|
|
39
77
|
const generatorResourceRecords = _.filter(
|
|
40
78
|
generatorRequiredResourceRecords,
|
|
41
79
|
(resourceRecord) => {
|
|
@@ -52,6 +90,10 @@ export const generateApplication: GenerateApplication = async (params) => {
|
|
|
52
90
|
});
|
|
53
91
|
}
|
|
54
92
|
|
|
93
|
+
console.debug("generatorNames", generatorNames);
|
|
94
|
+
|
|
95
|
+
await fs.writeJSON("a.json", generatorRequiredResourceRecords);
|
|
96
|
+
|
|
55
97
|
let metaGenerator: Generator | undefined;
|
|
56
98
|
|
|
57
99
|
/**
|
|
@@ -67,12 +109,22 @@ export const generateApplication: GenerateApplication = async (params) => {
|
|
|
67
109
|
const hasMetaGenerator = generatorNames.includes("meta");
|
|
68
110
|
|
|
69
111
|
if (hasMetaGenerator) {
|
|
70
|
-
const
|
|
112
|
+
const buildMetaGeneratorAppParams: BuildMetaGeneratorAppParams = {
|
|
113
|
+
...params,
|
|
114
|
+
data: {
|
|
115
|
+
...(params.data ?? {}),
|
|
116
|
+
resourceRecords: generatorRequiredResourceRecords,
|
|
117
|
+
},
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
const buildMetaGeneratorAppRes = await buildMetaGeneratorApp(buildMetaGeneratorAppParams);
|
|
71
121
|
|
|
72
122
|
metaGenerator = buildMetaGeneratorAppRes.metaGenerator;
|
|
73
123
|
}
|
|
74
124
|
}
|
|
75
125
|
|
|
126
|
+
console.debug("metaGenerator", metaGenerator);
|
|
127
|
+
|
|
76
128
|
let appGenerator: Generator | undefined;
|
|
77
129
|
|
|
78
130
|
/**
|
|
@@ -58,7 +58,11 @@ export const loadGeneratorApp: LoadGeneratorApp = async (params) => {
|
|
|
58
58
|
|
|
59
59
|
const appResource = await instantiateAppResource();
|
|
60
60
|
|
|
61
|
+
console.debug("loadGeneratorApp appResource", appResource);
|
|
62
|
+
|
|
61
63
|
const { app: generatorApp } = appResource.createGeneratorApp();
|
|
62
64
|
|
|
65
|
+
console.debug("loadGeneratorApp generatorApp", generatorApp);
|
|
66
|
+
|
|
63
67
|
return generatorApp;
|
|
64
68
|
};
|