@zenstackhq/sdk 3.0.0-beta.4 → 3.0.0-beta.5

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.js CHANGED
@@ -907,6 +907,9 @@ var TsSchemaGenerator = class {
907
907
  // subModels
908
908
  ...subModels.length > 0 ? [
909
909
  ts.factory.createPropertyAssignment("subModels", ts.factory.createArrayLiteralExpression(subModels.map((subModel) => ts.factory.createStringLiteral(subModel))))
910
+ ] : [],
911
+ ...dm.isView ? [
912
+ ts.factory.createPropertyAssignment("isView", ts.factory.createTrue())
910
913
  ] : []
911
914
  ];
912
915
  const computedFields = dm.fields.filter((f) => hasAttribute(f, "@computed"));
@@ -935,9 +938,9 @@ var TsSchemaGenerator = class {
935
938
  }
936
939
  createComputedFieldsObject(fields) {
937
940
  return ts.factory.createObjectLiteralExpression(fields.map((field) => ts.factory.createMethodDeclaration(void 0, void 0, field.name, void 0, void 0, [
938
- // parameter: `context: { currentModel: string }`
941
+ // parameter: `context: { modelAlias: string }`
939
942
  ts.factory.createParameterDeclaration(void 0, void 0, "_context", void 0, ts.factory.createTypeLiteralNode([
940
- ts.factory.createPropertySignature(void 0, "currentModel", void 0, ts.factory.createKeywordTypeNode(ts.SyntaxKind.StringKeyword))
943
+ ts.factory.createPropertySignature(void 0, "modelAlias", void 0, ts.factory.createKeywordTypeNode(ts.SyntaxKind.StringKeyword))
941
944
  ]), void 0)
942
945
  ], ts.factory.createTypeReferenceNode("OperandExpression", [
943
946
  ts.factory.createTypeReferenceNode(this.mapFieldTypeToTSType(field.type))