@gct-paas/cli 0.1.2 → 0.1.4-dev.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/CHANGELOG.md +6 -0
- package/dist/actions/gen-api/gen-api.cjs +1 -0
- package/dist/core/handlebars/helpers/format-import-item/format-import-item.cjs +9 -0
- package/es/actions/gen-api/gen-api.mjs +1 -0
- package/es/core/handlebars/helpers/format-import-item/format-import-item.mjs +9 -0
- package/hbs-temp/{{api}}.service.ts.hbs +6 -3
- package/package.json +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -22,6 +22,7 @@ class GenApiAction {
|
|
|
22
22
|
configs = {
|
|
23
23
|
platform: "/gct-platform/v2/api-docs?group=%E7%AE%A1%E7%90%86%E5%B9%B3%E5%8F%B0API",
|
|
24
24
|
apaas: "/gct-apaas/v2/api-docs?group=apaas%E5%B9%B3%E5%8F%B0API",
|
|
25
|
+
ipaas: "/gct-ipaas/v2/api-docs?group=ipaas%E5%B9%B3%E5%8F%B0API",
|
|
25
26
|
rag: "/gct-rag/v2/api-docs?group=%E7%AE%A1%E7%90%86%E5%B9%B3%E5%8F%B0API"
|
|
26
27
|
};
|
|
27
28
|
/**
|
|
@@ -42,8 +42,17 @@ class HelperFormatImportItem extends _helperBase.HelperBase {
|
|
|
42
42
|
const val = keys.join(",");
|
|
43
43
|
if (isType) {
|
|
44
44
|
if (type === "List") {
|
|
45
|
+
if (val === "Tree") {
|
|
46
|
+
return "IObject[]";
|
|
47
|
+
}
|
|
45
48
|
return val + "[]";
|
|
46
49
|
}
|
|
50
|
+
if (type === "PageBase") {
|
|
51
|
+
return `IPage<${val}>`;
|
|
52
|
+
}
|
|
53
|
+
if (type === "Tree") {
|
|
54
|
+
return "IObject";
|
|
55
|
+
}
|
|
47
56
|
}
|
|
48
57
|
return val;
|
|
49
58
|
}
|
|
@@ -13,6 +13,7 @@ export class GenApiAction {
|
|
|
13
13
|
configs = {
|
|
14
14
|
platform: "/gct-platform/v2/api-docs?group=%E7%AE%A1%E7%90%86%E5%B9%B3%E5%8F%B0API",
|
|
15
15
|
apaas: "/gct-apaas/v2/api-docs?group=apaas%E5%B9%B3%E5%8F%B0API",
|
|
16
|
+
ipaas: "/gct-ipaas/v2/api-docs?group=ipaas%E5%B9%B3%E5%8F%B0API",
|
|
16
17
|
rag: "/gct-rag/v2/api-docs?group=%E7%AE%A1%E7%90%86%E5%B9%B3%E5%8F%B0API"
|
|
17
18
|
};
|
|
18
19
|
/**
|
|
@@ -36,8 +36,17 @@ export class HelperFormatImportItem extends HelperBase {
|
|
|
36
36
|
const val = keys.join(",");
|
|
37
37
|
if (isType) {
|
|
38
38
|
if (type === "List") {
|
|
39
|
+
if (val === "Tree") {
|
|
40
|
+
return "IObject[]";
|
|
41
|
+
}
|
|
39
42
|
return val + "[]";
|
|
40
43
|
}
|
|
44
|
+
if (type === "PageBase") {
|
|
45
|
+
return `IPage<${val}>`;
|
|
46
|
+
}
|
|
47
|
+
if (type === "Tree") {
|
|
48
|
+
return "IObject";
|
|
49
|
+
}
|
|
41
50
|
}
|
|
42
51
|
return val;
|
|
43
52
|
}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import type { IHttpResponse } from '
|
|
1
|
+
import type { IHttpResponse } from '@gct-paas/core';
|
|
2
2
|
{{#eq tag 'apaas'}}
|
|
3
|
-
import {
|
|
3
|
+
import { APaasBaseService } from '../base/apaas-base.service';
|
|
4
|
+
{{/eq}}
|
|
5
|
+
{{#eq tag 'ipaas'}}
|
|
6
|
+
import { IPaasBaseService } from '../base/ipaas-base.service';
|
|
4
7
|
{{/eq}}
|
|
5
8
|
{{#eq tag 'platform'}}
|
|
6
9
|
import { PlatformBaseService } from '../base/platform-base.service';
|
|
@@ -21,7 +24,7 @@ export interface {{ method.mode }}{{#if method.name}}{{pascalCase (camelCase met
|
|
|
21
24
|
}
|
|
22
25
|
{{/gt}}
|
|
23
26
|
{{/each}}
|
|
24
|
-
export class {{pascalCase (camelCase entityName) }}Service extends {{#eq tag 'apaas'}}
|
|
27
|
+
export class {{pascalCase (camelCase entityName) }}Service extends {{#eq tag 'apaas'}}APaasBaseService{{/eq}}{{#eq tag 'platform'}}PlatformBaseService{{/eq}}{{#eq tag 'rag'}}RagBaseService{{/eq}}{{#eq tag 'ipaas'}}IPaasBaseService{{/eq}} {
|
|
25
28
|
constructor() {
|
|
26
29
|
super('{{ entityName }}');
|
|
27
30
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gct-paas/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4-dev.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "paas 平台核心包",
|
|
6
6
|
"bin": {
|
|
@@ -62,8 +62,9 @@
|
|
|
62
62
|
"@types/fs-extra": "^11.0.4",
|
|
63
63
|
"@types/lodash-es": "^4.17.12",
|
|
64
64
|
"@types/node": "^22.13.9",
|
|
65
|
+
"tsx": "^4.20.4",
|
|
65
66
|
"typescript": "^5.8.2",
|
|
66
67
|
"unbuild": "^3.5.0"
|
|
67
68
|
},
|
|
68
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "c9621d762856690ccbe36c93a3cf50dd1060602a"
|
|
69
70
|
}
|