@mxpicture/gcp-functions-generator 2.1.37 → 2.1.38
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/dist/4testing/templates/template.deep.d.ts +2 -0
- package/dist/4testing/templates/template.deep.d.ts.map +1 -0
- package/dist/4testing/templates/template.deep.js +28 -0
- package/dist/4testing/templates/template.deep.js.map +1 -0
- package/dist/decorator/DecoExtractor.d.ts.map +1 -1
- package/dist/decorator/DecoExtractor.js +6 -1
- package/dist/decorator/DecoExtractor.js.map +1 -1
- package/package.json +4 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"template.deep.d.ts","sourceRoot":"","sources":["../../../src/4testing/templates/template.deep.ts"],"names":[],"mappings":"AA0BA,eAAO,MAAM,IAAI,+DASb,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { createDecorator, decoNumber, decoObject, decoString, } from "@mxpicture/gcp-functions-common/decorator";
|
|
2
|
+
import { fileURLToPath } from "url";
|
|
3
|
+
const decorator = createDecorator(fileURLToPath(import.meta.url));
|
|
4
|
+
// Intentionally NOT exported: reachable only through decoObject() from the
|
|
5
|
+
// lead decorator below. Exercises deep-structure code generation.
|
|
6
|
+
const deepInner = decorator("DeepInner")
|
|
7
|
+
.title("Deep Inner")
|
|
8
|
+
.properties({
|
|
9
|
+
code: decoString().title("Code"),
|
|
10
|
+
qty: decoNumber().title("Qty").min(0).optional(),
|
|
11
|
+
});
|
|
12
|
+
const deepMiddle = decorator("DeepMiddle")
|
|
13
|
+
.title("Deep Middle")
|
|
14
|
+
.properties({
|
|
15
|
+
label: decoString().title("Label"),
|
|
16
|
+
inner: decoObject(deepInner).title("Inner").optional(),
|
|
17
|
+
});
|
|
18
|
+
export const deep = decorator("Deep")
|
|
19
|
+
.title("Deep")
|
|
20
|
+
.namespace("dp")
|
|
21
|
+
.lead()
|
|
22
|
+
.routesCrud()
|
|
23
|
+
.properties({
|
|
24
|
+
id: decoString().key().title("Deep ID"),
|
|
25
|
+
name: decoString().title("Name").optional(),
|
|
26
|
+
middle: decoObject(deepMiddle).title("Middle").optional(),
|
|
27
|
+
});
|
|
28
|
+
//# sourceMappingURL=template.deep.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"template.deep.js","sourceRoot":"","sources":["../../../src/4testing/templates/template.deep.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,UAAU,EACV,UAAU,EACV,UAAU,GACX,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AAEpC,MAAM,SAAS,GAAG,eAAe,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAElE,2EAA2E;AAC3E,kEAAkE;AAClE,MAAM,SAAS,GAAG,SAAS,CAAC,WAAW,CAAC;KACrC,KAAK,CAAC,YAAY,CAAC;KACnB,UAAU,CAAC;IACV,IAAI,EAAE,UAAU,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC;IAChC,GAAG,EAAE,UAAU,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;CACjD,CAAC,CAAC;AAEL,MAAM,UAAU,GAAG,SAAS,CAAC,YAAY,CAAC;KACvC,KAAK,CAAC,aAAa,CAAC;KACpB,UAAU,CAAC;IACV,KAAK,EAAE,UAAU,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC;IAClC,KAAK,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE;CACvD,CAAC,CAAC;AAEL,MAAM,CAAC,MAAM,IAAI,GAAG,SAAS,CAAC,MAAM,CAAC;KAClC,KAAK,CAAC,MAAM,CAAC;KACb,SAAS,CAAC,IAAI,CAAC;KACf,IAAI,EAAE;KACN,UAAU,EAAE;KACZ,UAAU,CAAC;IACV,EAAE,EAAE,UAAU,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC;IACvC,IAAI,EAAE,UAAU,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE;IAC3C,MAAM,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,QAAQ,EAAE;CAC1D,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DecoExtractor.d.ts","sourceRoot":"","sources":["../../src/decorator/DecoExtractor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uCAAuC,CAAC;AAKtE;;GAEG;AACH,qBAAa,aAAa;aAQN,QAAQ,EAAE,MAAM;aAChB,OAAO,EAAE,MAAM;IARjC;;;;;OAKG;gBAEe,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM;IAGjC;;;;OAIG;IACU,GAAG,IAAI,OAAO,CAAC,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"DecoExtractor.d.ts","sourceRoot":"","sources":["../../src/decorator/DecoExtractor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uCAAuC,CAAC;AAKtE;;GAEG;AACH,qBAAa,aAAa;aAQN,QAAQ,EAAE,MAAM;aAChB,OAAO,EAAE,MAAM;IARjC;;;;;OAKG;gBAEe,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM;IAGjC;;;;OAIG;IACU,GAAG,IAAI,OAAO,CAAC,QAAQ,CAAC;CAoBtC"}
|
|
@@ -24,7 +24,12 @@ export class DecoExtractor {
|
|
|
24
24
|
*/
|
|
25
25
|
async run() {
|
|
26
26
|
const imported = await import(this.filePath);
|
|
27
|
-
const
|
|
27
|
+
const exported = Object.values(imported).filter((v) => v instanceof Decorator);
|
|
28
|
+
// Include nested decorators reachable via decoObject() so deep structures
|
|
29
|
+
// get their own generated code, not just top-level exports. A shared `seen`
|
|
30
|
+
// set de-duplicates across exports (and breaks cycles).
|
|
31
|
+
const seen = new Set();
|
|
32
|
+
const decorators = exported.flatMap((deco) => deco.collectDeep(seen));
|
|
28
33
|
enumRegistry().collectByDecorator(...decorators);
|
|
29
34
|
return {
|
|
30
35
|
templateFilePath: this.filePath,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DecoExtractor.js","sourceRoot":"","sources":["../../src/decorator/DecoExtractor.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,2CAA2C,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,wCAAwC,CAAC;AAEtE;;GAEG;AACH,MAAM,OAAO,aAAa;IAQN;IACA;IARlB;;;;;OAKG;IACH,YACkB,QAAgB,EAChB,OAAe;QADf,aAAQ,GAAR,QAAQ,CAAQ;QAChB,YAAO,GAAP,OAAO,CAAQ;IAC9B,CAAC;IAEJ;;;;OAIG;IACI,KAAK,CAAC,GAAG;QACd,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC7C,MAAM,
|
|
1
|
+
{"version":3,"file":"DecoExtractor.js","sourceRoot":"","sources":["../../src/decorator/DecoExtractor.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,2CAA2C,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,wCAAwC,CAAC;AAEtE;;GAEG;AACH,MAAM,OAAO,aAAa;IAQN;IACA;IARlB;;;;;OAKG;IACH,YACkB,QAAgB,EAChB,OAAe;QADf,aAAQ,GAAR,QAAQ,CAAQ;QAChB,YAAO,GAAP,OAAO,CAAQ;IAC9B,CAAC;IAEJ;;;;OAIG;IACI,KAAK,CAAC,GAAG;QACd,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC7C,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,MAAM,CAC7C,CAAC,CAAC,EAAkB,EAAE,CAAC,CAAC,YAAY,SAAS,CAC9C,CAAC;QAEF,0EAA0E;QAC1E,4EAA4E;QAC5E,wDAAwD;QACxD,MAAM,IAAI,GAAG,IAAI,GAAG,EAAa,CAAC;QAClC,MAAM,UAAU,GAAG,QAAQ,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC;QAEtE,YAAY,EAAE,CAAC,kBAAkB,CAAC,GAAG,UAAU,CAAC,CAAC;QAEjD,OAAO;YACL,gBAAgB,EAAE,IAAI,CAAC,QAAQ;YAC/B,oBAAoB,EAAE,QAAQ,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,QAAQ,CAAC;YAC3D,UAAU;SACX,CAAC;IACJ,CAAC;CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mxpicture/gcp-functions-generator",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.38",
|
|
4
4
|
"description": "Tools for google cloud functions",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "MXPicture",
|
|
@@ -49,9 +49,9 @@
|
|
|
49
49
|
"dependencies": {
|
|
50
50
|
"@google-cloud/scheduler": "^5.3.1",
|
|
51
51
|
"@mxpicture/build-api": "^0.4.42",
|
|
52
|
-
"@mxpicture/gcp-functions-backend": "^2.1.
|
|
53
|
-
"@mxpicture/gcp-functions-common": "^2.1.
|
|
54
|
-
"@mxpicture/gcp-functions-frontend": "^2.1.
|
|
52
|
+
"@mxpicture/gcp-functions-backend": "^2.1.38",
|
|
53
|
+
"@mxpicture/gcp-functions-common": "^2.1.38",
|
|
54
|
+
"@mxpicture/gcp-functions-frontend": "^2.1.38",
|
|
55
55
|
"google-auth-library": "^10.6.2",
|
|
56
56
|
"googleapis": "^171.4.0",
|
|
57
57
|
"json5": "^2.2.3"
|