@xrmforge/typegen 0.8.7 → 0.10.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/dist/index.d.ts +2 -2
- package/dist/index.js +13 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1429,8 +1429,8 @@ declare function generateEntityNavigationProperties(info: EntityTypeInfo, option
|
|
|
1429
1429
|
* }
|
|
1430
1430
|
* ```
|
|
1431
1431
|
*/
|
|
1432
|
-
|
|
1433
|
-
|
|
1432
|
+
/** Options for entity names enum generation (reserved for future use) */
|
|
1433
|
+
type EntityNamesGeneratorOptions = Record<string, never>;
|
|
1434
1434
|
/**
|
|
1435
1435
|
* Generate a const enum mapping entity PascalCase names to logical names.
|
|
1436
1436
|
*
|
package/dist/index.js
CHANGED
|
@@ -1984,6 +1984,11 @@ function generateFormInterface(form, entityLogicalName, attributeMap, options =
|
|
|
1984
1984
|
fieldNames.add(control.datafieldname);
|
|
1985
1985
|
}
|
|
1986
1986
|
}
|
|
1987
|
+
for (const systemField of ["statuscode", "statecode"]) {
|
|
1988
|
+
if (attributeMap.has(systemField)) {
|
|
1989
|
+
fieldNames.add(systemField);
|
|
1990
|
+
}
|
|
1991
|
+
}
|
|
1987
1992
|
const fields = [];
|
|
1988
1993
|
const usedEnumNames = /* @__PURE__ */ new Set();
|
|
1989
1994
|
for (const fieldName of [...fieldNames].sort()) {
|
|
@@ -2207,6 +2212,14 @@ function generateFormInterface(form, entityLogicalName, attributeMap, options =
|
|
|
2207
2212
|
}
|
|
2208
2213
|
lines.push("};");
|
|
2209
2214
|
lines.push("");
|
|
2215
|
+
lines.push(`/** Type info for typedForm<${interfaceName}>(). Bundles Fields, AttributeMap, ControlMap. */`);
|
|
2216
|
+
lines.push(`export interface ${interfaceName}TypeInfo {`);
|
|
2217
|
+
lines.push(` fields: ${fieldsTypeName};`);
|
|
2218
|
+
lines.push(` attributes: ${attrMapName};`);
|
|
2219
|
+
lines.push(` controls: ${ctrlMapName};`);
|
|
2220
|
+
lines.push(` form: ${interfaceName};`);
|
|
2221
|
+
lines.push("}");
|
|
2222
|
+
lines.push("");
|
|
2210
2223
|
return lines.join("\n");
|
|
2211
2224
|
}
|
|
2212
2225
|
function generateEntityForms(forms, entityLogicalName, attributes, options = {}) {
|