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

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.cjs CHANGED
@@ -940,6 +940,9 @@ var TsSchemaGenerator = class {
940
940
  // subModels
941
941
  ...subModels.length > 0 ? [
942
942
  ts.factory.createPropertyAssignment("subModels", ts.factory.createArrayLiteralExpression(subModels.map((subModel) => ts.factory.createStringLiteral(subModel))))
943
+ ] : [],
944
+ ...dm.isView ? [
945
+ ts.factory.createPropertyAssignment("isView", ts.factory.createTrue())
943
946
  ] : []
944
947
  ];
945
948
  const computedFields = dm.fields.filter((f) => hasAttribute(f, "@computed"));
@@ -968,9 +971,9 @@ var TsSchemaGenerator = class {
968
971
  }
969
972
  createComputedFieldsObject(fields) {
970
973
  return ts.factory.createObjectLiteralExpression(fields.map((field) => ts.factory.createMethodDeclaration(void 0, void 0, field.name, void 0, void 0, [
971
- // parameter: `context: { currentModel: string }`
974
+ // parameter: `context: { modelAlias: string }`
972
975
  ts.factory.createParameterDeclaration(void 0, void 0, "_context", void 0, ts.factory.createTypeLiteralNode([
973
- ts.factory.createPropertySignature(void 0, "currentModel", void 0, ts.factory.createKeywordTypeNode(ts.SyntaxKind.StringKeyword))
976
+ ts.factory.createPropertySignature(void 0, "modelAlias", void 0, ts.factory.createKeywordTypeNode(ts.SyntaxKind.StringKeyword))
974
977
  ]), void 0)
975
978
  ], ts.factory.createTypeReferenceNode("OperandExpression", [
976
979
  ts.factory.createTypeReferenceNode(this.mapFieldTypeToTSType(field.type))