@mxpicture/gcp-functions-generator 0.2.48 → 0.2.49
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GeneratorAnnotations.d.ts","sourceRoot":"","sources":["../../src/generator/GeneratorAnnotations.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,YAAY,EACZ,cAAc,EACf,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,uCAAuC,CAAC;AAClE,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAW1D,qBAAa,oBAAqB,SAAQ,SAAS;;cAUxB,SAAS,CAChC,UAAU,EAAE,YAAY,EACxB,KAAK,EAAE,SAAS,EAChB,SAAS,EAAE,cAAc,GACxB,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"GeneratorAnnotations.d.ts","sourceRoot":"","sources":["../../src/generator/GeneratorAnnotations.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,YAAY,EACZ,cAAc,EACf,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,uCAAuC,CAAC;AAClE,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAW1D,qBAAa,oBAAqB,SAAQ,SAAS;;cAUxB,SAAS,CAChC,UAAU,EAAE,YAAY,EACxB,KAAK,EAAE,SAAS,EAChB,SAAS,EAAE,cAAc,GACxB,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC;CA8GjC;;AAED,wBAA0C"}
|
|
@@ -20,16 +20,6 @@ export class GeneratorAnnotations extends Generator {
|
|
|
20
20
|
props: ["AnnotationsHeader"],
|
|
21
21
|
isType: true,
|
|
22
22
|
},
|
|
23
|
-
{
|
|
24
|
-
path: "@mxpicture/gcp-functions-common/meta",
|
|
25
|
-
props: ["MetaPropertyType"],
|
|
26
|
-
isType: false,
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
path: "@mxpicture/gcp-functions-common/meta",
|
|
30
|
-
props: ["MetaPropertyDataWoType"],
|
|
31
|
-
isType: true,
|
|
32
|
-
},
|
|
33
23
|
{
|
|
34
24
|
path: "@mxpicture/gcp-functions-common/helper",
|
|
35
25
|
props: ["annoDocInitial"],
|
|
@@ -43,6 +33,8 @@ export class GeneratorAnnotations extends Generator {
|
|
|
43
33
|
],
|
|
44
34
|
name: mainHeader.templateName,
|
|
45
35
|
};
|
|
36
|
+
const importMetaProps = new Set();
|
|
37
|
+
const importMetaTypeProps = new Set();
|
|
46
38
|
const header = mapAnnotationsHeader(mainHeader, allParams);
|
|
47
39
|
const json = await formatJsonStringify(JSON.stringify(header));
|
|
48
40
|
const lines = json.split("\n");
|
|
@@ -54,25 +46,29 @@ export class GeneratorAnnotations extends Generator {
|
|
|
54
46
|
let match = null;
|
|
55
47
|
match = line.match(typeRegex);
|
|
56
48
|
while (match && match.length > 1) {
|
|
49
|
+
importMetaProps.add("MetaPropertyType");
|
|
57
50
|
line = line.replace(typeRegex, `type: MetaPropertyType.${match[1]}`);
|
|
58
51
|
match = line.match(typeRegex);
|
|
59
52
|
}
|
|
60
53
|
// itemType
|
|
61
54
|
match = line.match(itemTypeRegex);
|
|
62
55
|
while (match && match.length > 2) {
|
|
56
|
+
importMetaProps.add("MetaPropertyType");
|
|
63
57
|
line = line.replace(itemTypeRegex, `itemType: MetaPropertyType.${match[2]}`);
|
|
64
58
|
match = line.match(itemTypeRegex);
|
|
65
59
|
}
|
|
66
60
|
// propertyRef
|
|
67
61
|
match = line.match(propertyRefRegex);
|
|
68
62
|
while (match && match.length > 1) {
|
|
63
|
+
importMetaTypeProps.add("MetaPropertyDataWoType");
|
|
69
64
|
line = line.replace(propertyRefRegex, `propertyRef: "${match[1]}" as keyof MetaPropertyDataWoType`);
|
|
70
65
|
match = line.match(propertyRefRegex);
|
|
71
66
|
}
|
|
72
67
|
// dateFormat
|
|
73
68
|
match = line.match(dateFormatRegex);
|
|
74
69
|
while (match && match.length > 1) {
|
|
75
|
-
|
|
70
|
+
importMetaTypeProps.add("MetaDateFormat");
|
|
71
|
+
line = line.replace(dateFormatRegex, `dateFormat: "${match[1]}" as MetaDateFormat`);
|
|
76
72
|
match = line.match(dateFormatRegex);
|
|
77
73
|
}
|
|
78
74
|
// subHeader(Name)
|
|
@@ -84,6 +80,18 @@ export class GeneratorAnnotations extends Generator {
|
|
|
84
80
|
res.code.push(line);
|
|
85
81
|
}
|
|
86
82
|
res.code.push(";");
|
|
83
|
+
if (importMetaTypeProps.size > 0)
|
|
84
|
+
res.imports.push({
|
|
85
|
+
path: "@mxpicture/gcp-functions-common/meta",
|
|
86
|
+
props: [...importMetaTypeProps],
|
|
87
|
+
isType: true,
|
|
88
|
+
});
|
|
89
|
+
if (importMetaProps.size > 0)
|
|
90
|
+
res.imports.push({
|
|
91
|
+
path: "@mxpicture/gcp-functions-common/meta",
|
|
92
|
+
props: [...importMetaProps],
|
|
93
|
+
isType: false,
|
|
94
|
+
});
|
|
87
95
|
return res;
|
|
88
96
|
}
|
|
89
97
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GeneratorAnnotations.js","sourceRoot":"","sources":["../../src/generator/GeneratorAnnotations.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,iBAAiB,EACjB,cAAc,EACd,oBAAoB,GAGrB,MAAM,sCAAsC,CAAC;AAE9C,OAAO,EAAE,SAAS,EAAiB,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAEhE,MAAM,SAAS,GAAG,sCAAsC,CAAC;AACzD,MAAM,aAAa,GACjB,+DAA+D,CAAC;AAClE,MAAM,gBAAgB,GAAG,6CAA6C,CAAC;AACvE,MAAM,kBAAkB,GAAG,+CAA+C,CAAC;AAC3E,MAAM,eAAe,GAAG,4CAA4C,CAAC;AAErE,MAAM,OAAO,oBAAqB,SAAQ,SAAS;IACjD;QACE,KAAK,CACH,YAAY,CAAC,WAAW,EACxB,iBAAiB,CAAC,EAAE,EACpB,cAAc,CAAC,MAAM,EACrB,SAAS,CAAC,QAAQ,EAAE,CACrB,CAAC;IACJ,CAAC;IAEkB,KAAK,CAAC,SAAS,CAChC,UAAwB,EACxB,KAAgB,EAChB,SAAyB;QAEzB,MAAM,GAAG,GAAkB;YACzB,IAAI,EAAE,EAAE;YACR,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,uCAAuC;oBAC7C,KAAK,EAAE,CAAC,mBAAmB,CAAC;oBAC5B,MAAM,EAAE,IAAI;iBACb;gBACD;oBACE,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"GeneratorAnnotations.js","sourceRoot":"","sources":["../../src/generator/GeneratorAnnotations.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,iBAAiB,EACjB,cAAc,EACd,oBAAoB,GAGrB,MAAM,sCAAsC,CAAC;AAE9C,OAAO,EAAE,SAAS,EAAiB,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAEhE,MAAM,SAAS,GAAG,sCAAsC,CAAC;AACzD,MAAM,aAAa,GACjB,+DAA+D,CAAC;AAClE,MAAM,gBAAgB,GAAG,6CAA6C,CAAC;AACvE,MAAM,kBAAkB,GAAG,+CAA+C,CAAC;AAC3E,MAAM,eAAe,GAAG,4CAA4C,CAAC;AAErE,MAAM,OAAO,oBAAqB,SAAQ,SAAS;IACjD;QACE,KAAK,CACH,YAAY,CAAC,WAAW,EACxB,iBAAiB,CAAC,EAAE,EACpB,cAAc,CAAC,MAAM,EACrB,SAAS,CAAC,QAAQ,EAAE,CACrB,CAAC;I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+1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mxpicture/gcp-functions-generator",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.49",
|
|
4
4
|
"description": "Tools for google cloud functions",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "MXPicture",
|
|
@@ -32,9 +32,9 @@
|
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@mxpicture/build-api": "^0.2.56",
|
|
35
|
-
"@mxpicture/gcp-functions-backend": "^0.2.
|
|
36
|
-
"@mxpicture/gcp-functions-common": "^0.2.
|
|
37
|
-
"@mxpicture/gcp-functions-frontend": "^0.2.
|
|
35
|
+
"@mxpicture/gcp-functions-backend": "^0.2.49",
|
|
36
|
+
"@mxpicture/gcp-functions-common": "^0.2.49",
|
|
37
|
+
"@mxpicture/gcp-functions-frontend": "^0.2.49"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@types/node": "^25.2.3",
|