@smartive/graphql-magic 17.4.0 → 17.4.1

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/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
- # [17.4.0](https://github.com/smartive/graphql-magic/compare/v17.3.0...v17.4.0) (2025-04-09)
1
+ ## [17.4.1](https://github.com/smartive/graphql-magic/compare/v17.4.0...v17.4.1) (2025-04-15)
2
2
 
3
3
 
4
- ### Features
4
+ ### Bug Fixes
5
5
 
6
- * Add some lodash to static-eval ([#266](https://github.com/smartive/graphql-magic/issues/266)) ([df6a2a7](https://github.com/smartive/graphql-magic/commit/df6a2a73bd7d8b4c0a529fed533c52436482c05a))
6
+ * Readonly definitions ([d67cf22](https://github.com/smartive/graphql-magic/commit/d67cf2281cc9474b23c9d47c8b9a022313c3bc1b))
@@ -63,13 +63,13 @@ export type EntityFieldDefinition = FieldDefinitionBase & (FieldDefinitionBase2
63
63
  orderable?: boolean;
64
64
  comparable?: boolean;
65
65
  queriable?: boolean | {
66
- roles?: string[];
66
+ roles?: readonly string[];
67
67
  };
68
68
  creatable?: boolean | {
69
- roles?: string[];
69
+ roles?: readonly string[];
70
70
  };
71
71
  updatable?: boolean | {
72
- roles?: string[];
72
+ roles?: readonly string[];
73
73
  };
74
74
  tooltip?: string;
75
75
  required?: boolean;
@@ -125,11 +125,11 @@ export type ModelDefinition = {
125
125
  kind: 'scalar';
126
126
  } | {
127
127
  kind: 'enum';
128
- values: string[];
128
+ values: readonly string[];
129
129
  deleted?: true;
130
130
  } | {
131
131
  kind: 'raw-enum';
132
- values: string[];
132
+ values: readonly string[];
133
133
  } | {
134
134
  kind: 'interface';
135
135
  fields: EntityFieldDefinition[];
@@ -143,7 +143,7 @@ export type ModelDefinition = {
143
143
  kind: 'entity';
144
144
  root?: boolean;
145
145
  parent?: string;
146
- interfaces?: string[];
146
+ interfaces?: readonly string[];
147
147
  queriable?: boolean;
148
148
  listQueriable?: boolean;
149
149
  creatable?: boolean | {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smartive/graphql-magic",
3
- "version": "17.4.0",
3
+ "version": "17.4.1",
4
4
  "description": "",
5
5
  "source": "src/index.ts",
6
6
  "type": "module",
@@ -70,7 +70,7 @@
70
70
  "@types/jest": "29.5.14",
71
71
  "@types/lodash": "4.17.16",
72
72
  "@types/luxon": "3.6.2",
73
- "@types/pg": "8.11.11",
73
+ "@types/pg": "8.11.13",
74
74
  "@types/uuid": "10.0.0",
75
75
  "create-ts-index": "1.14.0",
76
76
  "del-cli": "6.0.0",
@@ -79,7 +79,7 @@
79
79
  "jest": "29.7.0",
80
80
  "mock-knex": "0.4.13",
81
81
  "prettier": "3.5.3",
82
- "ts-jest": "29.3.1",
82
+ "ts-jest": "29.3.2",
83
83
  "ts-node": "10.9.2",
84
84
  "typescript": "5.8.3"
85
85
  }
@@ -70,17 +70,17 @@ export type EntityFieldDefinition = FieldDefinitionBase &
70
70
  queriable?:
71
71
  | boolean
72
72
  | {
73
- roles?: string[];
73
+ roles?: readonly string[];
74
74
  };
75
75
  creatable?:
76
76
  | boolean
77
77
  | {
78
- roles?: string[];
78
+ roles?: readonly string[];
79
79
  };
80
80
  updatable?:
81
81
  | boolean
82
82
  | {
83
- roles?: string[];
83
+ roles?: readonly string[];
84
84
  };
85
85
  // The tooltip is "hidden" behind an icon in the admin forms
86
86
  tooltip?: string;
@@ -121,8 +121,8 @@ export type ModelDefinition = {
121
121
  description?: string;
122
122
  } & (
123
123
  | { kind: 'scalar' }
124
- | { kind: 'enum'; values: string[]; deleted?: true }
125
- | { kind: 'raw-enum'; values: string[] }
124
+ | { kind: 'enum'; values: readonly string[]; deleted?: true }
125
+ | { kind: 'raw-enum'; values: readonly string[] }
126
126
  | { kind: 'interface'; fields: EntityFieldDefinition[] }
127
127
  | {
128
128
  kind: 'input';
@@ -136,7 +136,7 @@ export type ModelDefinition = {
136
136
  kind: 'entity';
137
137
  root?: boolean;
138
138
  parent?: string;
139
- interfaces?: string[];
139
+ interfaces?: readonly string[];
140
140
  queriable?: boolean;
141
141
  listQueriable?: boolean;
142
142
  creatable?: boolean | { createdBy?: Partial<RelationFieldDefinition>; createdAt?: Partial<DateTimeFieldDefinition> };