@mxpicture/gcp-functions-generator 1.1.14 → 1.1.16
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { DecoNames } from "@mxpicture/gcp-functions-common/decorator";
|
|
1
|
+
import { DecoNames, DecoratorData } from "@mxpicture/gcp-functions-common/decorator";
|
|
2
2
|
import { Generator, GeneratorCode, GeneratorRunItem, GeneratorRunItems } from "./Generator.js";
|
|
3
3
|
import { GeneratorEnv } from "../common/types.common.js";
|
|
4
|
-
import {
|
|
4
|
+
import { AnnotationsHeader, DecoImport } from "@mxpicture/gcp-functions-common/types";
|
|
5
5
|
/**
|
|
6
6
|
* Generator that produces backend-specific code including API classes, stores, functions, and factory helpers.
|
|
7
7
|
*
|
|
@@ -12,10 +12,22 @@ import { DecoRoutes } from "@mxpicture/gcp-functions-common/types";
|
|
|
12
12
|
export declare class GeneratorBackend extends Generator {
|
|
13
13
|
constructor();
|
|
14
14
|
protected runHeader(current: GeneratorRunItem, all: GeneratorRunItems, env: GeneratorEnv): Promise<GeneratorCode | null>;
|
|
15
|
-
protected buildApi(
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
protected buildApi(header: AnnotationsHeader, raw: DecoratorData, names: DecoNames): {
|
|
16
|
+
code: string[];
|
|
17
|
+
imports: DecoImport[];
|
|
18
|
+
};
|
|
19
|
+
protected buildFunction(names: DecoNames, datePaths: string[]): {
|
|
20
|
+
code: string[];
|
|
21
|
+
imports: DecoImport[];
|
|
22
|
+
};
|
|
23
|
+
protected buildStore(names: DecoNames, namespace: string): {
|
|
24
|
+
code: string[];
|
|
25
|
+
imports: DecoImport[];
|
|
26
|
+
};
|
|
27
|
+
protected buildCreate(names: DecoNames, region: string, serviceAccount: string): {
|
|
28
|
+
code: string[];
|
|
29
|
+
imports: DecoImport[];
|
|
30
|
+
};
|
|
19
31
|
}
|
|
20
32
|
declare const _default: GeneratorBackend;
|
|
21
33
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GeneratorBackend.d.ts","sourceRoot":"","sources":["../../src/generator/GeneratorBackend.ts"],"names":[],"mappings":"AAAA,OAAO,EAOL,SAAS,
|
|
1
|
+
{"version":3,"file":"GeneratorBackend.d.ts","sourceRoot":"","sources":["../../src/generator/GeneratorBackend.ts"],"names":[],"mappings":"AAAA,OAAO,EAOL,SAAS,EACT,aAAa,EACd,MAAM,2CAA2C,CAAC;AACnD,OAAO,EACL,SAAS,EACT,aAAa,EACb,gBAAgB,EAChB,iBAAiB,EAClB,MAAM,gBAAgB,CAAC;AAIxB,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EACL,iBAAiB,EACjB,UAAU,EACX,MAAM,uCAAuC,CAAC;AAG/C;;;;;;GAMG;AACH,qBAAa,gBAAiB,SAAQ,SAAS;;cAUpB,SAAS,CAChC,OAAO,EAAE,gBAAgB,EACzB,GAAG,EAAE,iBAAiB,EACtB,GAAG,EAAE,YAAY,GAChB,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC;IAmHhC,SAAS,CAAC,QAAQ,CAChB,MAAM,EAAE,iBAAiB,EACzB,GAAG,EAAE,aAAa,EAClB,KAAK,EAAE,SAAS,GACf;QAAE,IAAI,EAAE,MAAM,EAAE,CAAC;QAAC,OAAO,EAAE,UAAU,EAAE,CAAA;KAAE;IAoE5C,SAAS,CAAC,aAAa,CACrB,KAAK,EAAE,SAAS,EAChB,SAAS,EAAE,MAAM,EAAE,GAClB;QAAE,IAAI,EAAE,MAAM,EAAE,CAAC;QAAC,OAAO,EAAE,UAAU,EAAE,CAAA;KAAE;IAkB5C,SAAS,CAAC,UAAU,CAClB,KAAK,EAAE,SAAS,EAChB,SAAS,EAAE,MAAM,GAChB;QAAE,IAAI,EAAE,MAAM,EAAE,CAAC;QAAC,OAAO,EAAE,UAAU,EAAE,CAAA;KAAE;IAW5C,SAAS,CAAC,WAAW,CACnB,KAAK,EAAE,SAAS,EAChB,MAAM,EAAE,MAAM,EACd,cAAc,EAAE,MAAM,GACrB;QAAE,IAAI,EAAE,MAAM,EAAE,CAAC;QAAC,OAAO,EAAE,UAAU,EAAE,CAAA;KAAE;CAoB7C;;AAED,wBAAsC"}
|
|
@@ -21,88 +21,121 @@ export class GeneratorBackend extends Generator {
|
|
|
21
21
|
const names = current.names;
|
|
22
22
|
const header = current.decorator.extractAnnotations();
|
|
23
23
|
const datePaths = extractAnnotationsPaths(header.properties, DecoPropertyType.date);
|
|
24
|
+
const imports = [
|
|
25
|
+
{
|
|
26
|
+
path: "@mxpicture/gcp-functions-common/types",
|
|
27
|
+
props: [
|
|
28
|
+
"ApiFromRoutes",
|
|
29
|
+
"FunctionRequest",
|
|
30
|
+
"FunctionResponse",
|
|
31
|
+
"DocumentData",
|
|
32
|
+
],
|
|
33
|
+
isType: true,
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
path: "@mxpicture/gcp-functions-backend/store",
|
|
37
|
+
props: ["Store"],
|
|
38
|
+
isType: false,
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
path: "@mxpicture/gcp-functions-backend/validation",
|
|
42
|
+
props: ["Validation"],
|
|
43
|
+
isType: false,
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
path: "@mxpicture/gcp-functions-backend/api",
|
|
47
|
+
props: ["BackendApi"],
|
|
48
|
+
isType: false,
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
path: "firebase-admin/firestore",
|
|
52
|
+
props: ["FirestoreDataConverter"],
|
|
53
|
+
isType: true,
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
path: "firebase-functions/v2/https",
|
|
57
|
+
props: ["CallableFunction"],
|
|
58
|
+
isType: true,
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
path: this.importCommon(DecoFileType.routes),
|
|
62
|
+
props: [names.routes],
|
|
63
|
+
isType: true,
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
path: this.importCommon(DecoFileType.doc),
|
|
67
|
+
props: [names.doc, names.docStore],
|
|
68
|
+
isType: true,
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
path: "@mxpicture/gcp-functions-backend/function",
|
|
72
|
+
props: ["IBackendFunction"],
|
|
73
|
+
isType: false,
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
path: this.importCommon(DecoFileType.routes),
|
|
77
|
+
props: [names.routesName],
|
|
78
|
+
isType: false,
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
path: this.importBackend(DecoFileType.zod),
|
|
82
|
+
props: [names.shape],
|
|
83
|
+
isType: false,
|
|
84
|
+
},
|
|
85
|
+
];
|
|
86
|
+
const builtFunction = this.buildFunction(names, datePaths);
|
|
87
|
+
const builtApi = this.buildApi(header, raw, names);
|
|
88
|
+
const builtStore = this.buildStore(names, namespace);
|
|
89
|
+
const builtCreate = this.buildCreate(names, env.region, env.serviceAccount);
|
|
90
|
+
const code = [
|
|
91
|
+
...builtFunction.code,
|
|
92
|
+
"",
|
|
93
|
+
...builtApi.code,
|
|
94
|
+
"",
|
|
95
|
+
...builtStore.code,
|
|
96
|
+
"",
|
|
97
|
+
...builtCreate.code,
|
|
98
|
+
];
|
|
99
|
+
for (const imp of [
|
|
100
|
+
...builtFunction.imports,
|
|
101
|
+
...builtApi.imports,
|
|
102
|
+
...builtStore.imports,
|
|
103
|
+
...builtCreate.imports,
|
|
104
|
+
]) {
|
|
105
|
+
let found = imports.find((i) => i.path === imp.path && i.isType === imp.isType);
|
|
106
|
+
if (!found) {
|
|
107
|
+
found = { path: imp.path, isType: imp.isType, props: [] };
|
|
108
|
+
imports.push(found);
|
|
109
|
+
}
|
|
110
|
+
for (const prop of imp.props)
|
|
111
|
+
if (!found.props.includes(prop))
|
|
112
|
+
found.props.push(prop);
|
|
113
|
+
}
|
|
24
114
|
return {
|
|
25
|
-
code
|
|
26
|
-
|
|
27
|
-
"",
|
|
28
|
-
...this.buildApi(raw.routes, names),
|
|
29
|
-
"",
|
|
30
|
-
...this.buildStore(names, namespace),
|
|
31
|
-
"",
|
|
32
|
-
...this.buildCreate(names, env.region, env.serviceAccount),
|
|
33
|
-
],
|
|
34
|
-
imports: [
|
|
35
|
-
{
|
|
36
|
-
path: "@mxpicture/gcp-functions-common/types",
|
|
37
|
-
props: [
|
|
38
|
-
"ApiFromRoutes",
|
|
39
|
-
"FunctionRequest",
|
|
40
|
-
"FunctionResponse",
|
|
41
|
-
"DocumentData",
|
|
42
|
-
],
|
|
43
|
-
isType: true,
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
path: "@mxpicture/gcp-functions-backend/store",
|
|
47
|
-
props: ["Store"],
|
|
48
|
-
isType: false,
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
path: "@mxpicture/gcp-functions-backend/validation",
|
|
52
|
-
props: ["Validation"],
|
|
53
|
-
isType: false,
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
path: "@mxpicture/gcp-functions-backend/api",
|
|
57
|
-
props: ["BackendApi"],
|
|
58
|
-
isType: false,
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
path: "firebase-admin/firestore",
|
|
62
|
-
props: ["FirestoreDataConverter"],
|
|
63
|
-
isType: true,
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
path: "firebase-functions/v2/https",
|
|
67
|
-
props: ["CallableFunction"],
|
|
68
|
-
isType: true,
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
path: this.importCommon(DecoFileType.routes),
|
|
72
|
-
props: [names.routes],
|
|
73
|
-
isType: true,
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
path: this.importCommon(DecoFileType.doc),
|
|
77
|
-
props: [names.doc],
|
|
78
|
-
isType: true,
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
path: "@mxpicture/gcp-functions-backend/function",
|
|
82
|
-
props: ["IBackendFunction"],
|
|
83
|
-
isType: false,
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
path: this.importCommon(DecoFileType.routes),
|
|
87
|
-
props: [names.routesName],
|
|
88
|
-
isType: false,
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
path: this.importBackend(DecoFileType.zod),
|
|
92
|
-
props: [names.shape],
|
|
93
|
-
isType: false,
|
|
94
|
-
},
|
|
95
|
-
],
|
|
115
|
+
code,
|
|
116
|
+
imports,
|
|
96
117
|
name: raw.name,
|
|
97
118
|
};
|
|
98
119
|
}
|
|
99
|
-
buildApi(
|
|
120
|
+
buildApi(header, raw, names) {
|
|
100
121
|
const code = [];
|
|
101
|
-
const superClassName = hasCrudRoute(Object.keys(routes))
|
|
122
|
+
const superClassName = hasCrudRoute(Object.keys(raw.routes ?? {}))
|
|
102
123
|
? "BackendApi"
|
|
103
124
|
: "IBackendApi";
|
|
104
|
-
|
|
105
|
-
|
|
125
|
+
const virtuals = header.properties.filter((prop) => prop.common.virtual);
|
|
126
|
+
const additionalImports = ["DecoPropertyVirtual"];
|
|
127
|
+
code.push(`const ${names.basenameLower}VirtualKeys: DecoPropertyVirtual[] = [`, ...virtuals.map((virt) => `"${virt.propertyKey}",`), "];", "", `export abstract class I${names.api} extends ${superClassName}<${names.docStore}, ${names.doc}, ${names.store}, Validation<${names.doc}>>`, `implements ApiFromRoutes<${names.routes}>`, "{", ` public constructor() { super("${names.basenameLower}", ${names.basenameLower}DatePaths, ${names.basenameLower}VirtualKeys); }`, "");
|
|
128
|
+
if (virtuals.length > 0) {
|
|
129
|
+
const hasVirtualNonOpt = !!header.properties.find((prop) => prop.common.virtual);
|
|
130
|
+
if (!hasVirtualNonOpt) {
|
|
131
|
+
// create dummy method with 1:1 mapping
|
|
132
|
+
code.push("", `// 1:1 mapping`, `. protected async loadVirtualFields(doc: WithKey<${names.docStore}>): Promise<WithKey<${names.doc}>> {return doc as WithKey<${names.doc}>;}`, "");
|
|
133
|
+
if (!additionalImports.find((i) => i === "WithKey"))
|
|
134
|
+
additionalImports.push("WithKey");
|
|
135
|
+
}
|
|
136
|
+
// else: leave method as abstract
|
|
137
|
+
}
|
|
138
|
+
for (const [routeName, params] of Object.entries(raw.routes ?? {})) {
|
|
106
139
|
if (isCrudRoute(routeName))
|
|
107
140
|
continue; // ignore crud --> provided by super class
|
|
108
141
|
let definition = routeName;
|
|
@@ -114,45 +147,64 @@ export class GeneratorBackend extends Generator {
|
|
|
114
147
|
code.push(` public abstract ${definition};`);
|
|
115
148
|
}
|
|
116
149
|
code.push("}");
|
|
117
|
-
return
|
|
150
|
+
return {
|
|
151
|
+
code,
|
|
152
|
+
imports: additionalImports.length > 0
|
|
153
|
+
? [
|
|
154
|
+
{
|
|
155
|
+
path: "@mxpicture/gcp-functions-common/types",
|
|
156
|
+
props: additionalImports,
|
|
157
|
+
},
|
|
158
|
+
]
|
|
159
|
+
: [],
|
|
160
|
+
};
|
|
118
161
|
}
|
|
119
162
|
buildFunction(names, datePaths) {
|
|
120
|
-
return
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
163
|
+
return {
|
|
164
|
+
imports: [],
|
|
165
|
+
code: [
|
|
166
|
+
`const ${names.basenameLower}DatePaths: string[] = [`,
|
|
167
|
+
...datePaths.map((datePath) => `"${datePath}",`),
|
|
168
|
+
"];",
|
|
169
|
+
"",
|
|
170
|
+
`export class ${names.func} extends IBackendFunction<${names.docStore}, ${names.doc}, I${names.api}> {`,
|
|
171
|
+
` public constructor(region: string, serviceAccount: string, api?: I${names.api}) { super("${names.functionName}", region, serviceAccount, ${names.basenameLower}DatePaths); this.useRoutes(${names.routesName}); if (api) this.useApi(api); }`,
|
|
172
|
+
"",
|
|
173
|
+
" // defined to be able to debug ingress",
|
|
174
|
+
" public override async ingress<REQ, RES extends DocumentData>(request: FunctionRequest<REQ>): Promise<FunctionResponse<RES>> { return super.ingress(request); }",
|
|
175
|
+
"}",
|
|
176
|
+
],
|
|
177
|
+
};
|
|
132
178
|
}
|
|
133
179
|
buildStore(names, namespace) {
|
|
134
|
-
return
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
180
|
+
return {
|
|
181
|
+
imports: [],
|
|
182
|
+
code: [
|
|
183
|
+
`export class ${names.store} extends Store<${names.doc}> {`,
|
|
184
|
+
` public constructor(converter?: FirestoreDataConverter<${names.doc}>) { super("${names.basenameLower}", "${namespace}", converter); }`,
|
|
185
|
+
"}",
|
|
186
|
+
],
|
|
187
|
+
};
|
|
139
188
|
}
|
|
140
189
|
buildCreate(names, region, serviceAccount) {
|
|
141
|
-
return
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
190
|
+
return {
|
|
191
|
+
imports: [],
|
|
192
|
+
code: [
|
|
193
|
+
`export const create${names.basename}Function = (api: I${names.api}): CallableFunction<FunctionRequest<unknown>,Promise<FunctionResponse<unknown>>,unknown> => {`,
|
|
194
|
+
` const store = new ${names.store}();`,
|
|
195
|
+
"",
|
|
196
|
+
` const val = new Validation<${names.doc}>("${names.basenameLower}");`,
|
|
197
|
+
` val.useShape(${names.shape});`,
|
|
198
|
+
"",
|
|
199
|
+
` const func = new ${names.func}("${region}", "${serviceAccount}", api);`,
|
|
200
|
+
"",
|
|
201
|
+
" api.useStore(store);",
|
|
202
|
+
" api.useValidation(val);",
|
|
203
|
+
"",
|
|
204
|
+
" return func.buildFunction();",
|
|
205
|
+
"};",
|
|
206
|
+
],
|
|
207
|
+
};
|
|
156
208
|
}
|
|
157
209
|
}
|
|
158
210
|
export default new GeneratorBackend();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GeneratorBackend.js","sourceRoot":"","sources":["../../src/generator/GeneratorBackend.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,WAAW,EACX,iBAAiB,EACjB,YAAY,EACZ,gBAAgB,EAChB,cAAc,
|
|
1
|
+
{"version":3,"file":"GeneratorBackend.js","sourceRoot":"","sources":["../../src/generator/GeneratorBackend.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,WAAW,EACX,iBAAiB,EACjB,YAAY,EACZ,gBAAgB,EAChB,cAAc,GAGf,MAAM,2CAA2C,CAAC;AACnD,OAAO,EACL,SAAS,GAIV,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAQnD,OAAO,EAAE,uBAAuB,EAAE,MAAM,4CAA4C,CAAC;AAErF;;;;;;GAMG;AACH,MAAM,OAAO,gBAAiB,SAAQ,SAAS;IAC7C;QACE,KAAK,CACH,YAAY,CAAC,OAAO,EACpB,iBAAiB,CAAC,EAAE,EACpB,cAAc,CAAC,OAAO,EACtB,SAAS,CAAC,QAAQ,EAAE,CACrB,CAAC;IACJ,CAAC;IAEkB,KAAK,CAAC,SAAS,CAChC,OAAyB,EACzB,GAAsB,EACtB,GAAiB;QAEjB,MAAM,GAAG,GAAG,OAAO,CAAC,SAAS,CAAC,UAAU,EAAE,CAAC;QAC3C,IAAI,CAAC,GAAG,CAAC,MAAM,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,IAAI,CAAC;QACrE,MAAM,SAAS,GAAG,GAAG,CAAC,SAAS,IAAI,SAAS,CAAC;QAC7C,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;QAE5B,MAAM,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,kBAAkB,EAAE,CAAC;QACtD,MAAM,SAAS,GAAG,uBAAuB,CACvC,MAAM,C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AE,EAAE;YACX,IAAI,EAAE;gBACJ,sBAAsB,KAAK,CAAC,QAAQ,qBAAqB,KAAK,CAAC,GAAG,+FAA+F;gBACjK,uBAAuB,KAAK,CAAC,KAAK,KAAK;gBACvC,EAAE;gBACF,gCAAgC,KAAK,CAAC,GAAG,MAAM,KAAK,CAAC,aAAa,KAAK;gBACvE,kBAAkB,KAAK,CAAC,KAAK,IAAI;gBACjC,EAAE;gBACF,sBAAsB,KAAK,CAAC,IAAI,KAAK,MAAM,OAAO,cAAc,UAAU;gBAC1E,EAAE;gBACF,wBAAwB;gBACxB,2BAA2B;gBAC3B,EAAE;gBACF,gCAAgC;gBAChC,IAAI;aACL;SACF,CAAC;IACJ,CAAC;CACF;AAED,eAAe,IAAI,gBAAgB,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mxpicture/gcp-functions-generator",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.16",
|
|
4
4
|
"description": "Tools for google cloud functions",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "MXPicture",
|
|
@@ -34,9 +34,9 @@
|
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@mxpicture/build-api": "^0.2.58",
|
|
37
|
-
"@mxpicture/gcp-functions-backend": "^1.1.
|
|
38
|
-
"@mxpicture/gcp-functions-common": "^1.1.
|
|
39
|
-
"@mxpicture/gcp-functions-frontend": "^1.1.
|
|
37
|
+
"@mxpicture/gcp-functions-backend": "^1.1.16",
|
|
38
|
+
"@mxpicture/gcp-functions-common": "^1.1.16",
|
|
39
|
+
"@mxpicture/gcp-functions-frontend": "^1.1.16"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@types/node": "^25.2.3",
|