@needle-tools/needle-component-compiler 3.0.0-alpha.3.0d84287 → 3.0.0-alpha.4.196a6ea
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.
|
@@ -97,6 +97,8 @@ var BlenderWriter = /** @class */ (function (_super) {
|
|
|
97
97
|
return typeName;
|
|
98
98
|
};
|
|
99
99
|
BlenderWriter.prototype.startNewType = function (filePath, typeName, baseTypes, comments) {
|
|
100
|
+
if (comments === null || comments === void 0 ? void 0 : comments.includes("@dont-generate-component"))
|
|
101
|
+
return false;
|
|
100
102
|
var isSupportedType = false;
|
|
101
103
|
for (var i = 0; i < knownBaseTypes.length; i++) {
|
|
102
104
|
if (baseTypes.includes(knownBaseTypes[i])) {
|
|
@@ -104,12 +106,9 @@ var BlenderWriter = /** @class */ (function (_super) {
|
|
|
104
106
|
break;
|
|
105
107
|
}
|
|
106
108
|
}
|
|
107
|
-
// console.log(baseTypes, knownBaseTypes, isSupportedType)
|
|
108
109
|
if (!isSupportedType)
|
|
109
110
|
return false;
|
|
110
111
|
this.writer.beginBlock("{");
|
|
111
|
-
if (comments)
|
|
112
|
-
console.log(comments);
|
|
113
112
|
this.writer.beginBlock("\"" + typeName + "\": {");
|
|
114
113
|
};
|
|
115
114
|
BlenderWriter.prototype.endNewType = function (filePath, typeName) {
|
|
@@ -120,6 +119,14 @@ var BlenderWriter = /** @class */ (function (_super) {
|
|
|
120
119
|
BlenderWriter.prototype.writeMember = function (visibility, name, isArray, type, initialValue, comments) {
|
|
121
120
|
if (visibility !== base_compiler_1.Visibility.Public)
|
|
122
121
|
return;
|
|
122
|
+
// @nonSerialized → skip entirely
|
|
123
|
+
if (comments === null || comments === void 0 ? void 0 : comments.some(function (c) { return c.startsWith("@nonSerialized"); }))
|
|
124
|
+
return;
|
|
125
|
+
// @type override
|
|
126
|
+
var typeOverride = comments === null || comments === void 0 ? void 0 : comments.find(function (c) { return c.startsWith("@type "); });
|
|
127
|
+
if (typeOverride) {
|
|
128
|
+
type = typeOverride.substring("@type ".length).trim();
|
|
129
|
+
}
|
|
123
130
|
// Check if type is a registered TypeScript enum
|
|
124
131
|
var enumMembers = this._enumRegistry.get(type);
|
|
125
132
|
if (enumMembers && enumMembers.length > 0) {
|
package/package.json
CHANGED