@contember/client-content-generator 1.3.0-alpha.10
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/development/ContemberClientGenerator.cjs +45 -0
- package/dist/development/ContemberClientGenerator.cjs.map +1 -0
- package/dist/development/ContemberClientGenerator.js +45 -0
- package/dist/development/ContemberClientGenerator.js.map +1 -0
- package/dist/development/EntityTypeSchemaGenerator.cjs +171 -0
- package/dist/development/EntityTypeSchemaGenerator.cjs.map +1 -0
- package/dist/development/EntityTypeSchemaGenerator.js +171 -0
- package/dist/development/EntityTypeSchemaGenerator.js.map +1 -0
- package/dist/development/EnumTypeSchemaGenerator.cjs +14 -0
- package/dist/development/EnumTypeSchemaGenerator.cjs.map +1 -0
- package/dist/development/EnumTypeSchemaGenerator.js +14 -0
- package/dist/development/EnumTypeSchemaGenerator.js.map +1 -0
- package/dist/development/NameSchemaGenerator.cjs +38 -0
- package/dist/development/NameSchemaGenerator.cjs.map +1 -0
- package/dist/development/NameSchemaGenerator.js +38 -0
- package/dist/development/NameSchemaGenerator.js.map +1 -0
- package/dist/development/generate.cjs +62 -0
- package/dist/development/generate.cjs.map +1 -0
- package/dist/development/generate.js +44 -0
- package/dist/development/generate.js.map +1 -0
- package/dist/development/index.cjs +11 -0
- package/dist/development/index.cjs.map +1 -0
- package/dist/development/index.js +11 -0
- package/dist/development/index.js.map +1 -0
- package/dist/production/ContemberClientGenerator.cjs +45 -0
- package/dist/production/ContemberClientGenerator.cjs.map +1 -0
- package/dist/production/ContemberClientGenerator.js +45 -0
- package/dist/production/ContemberClientGenerator.js.map +1 -0
- package/dist/production/EntityTypeSchemaGenerator.cjs +171 -0
- package/dist/production/EntityTypeSchemaGenerator.cjs.map +1 -0
- package/dist/production/EntityTypeSchemaGenerator.js +171 -0
- package/dist/production/EntityTypeSchemaGenerator.js.map +1 -0
- package/dist/production/EnumTypeSchemaGenerator.cjs +14 -0
- package/dist/production/EnumTypeSchemaGenerator.cjs.map +1 -0
- package/dist/production/EnumTypeSchemaGenerator.js +14 -0
- package/dist/production/EnumTypeSchemaGenerator.js.map +1 -0
- package/dist/production/NameSchemaGenerator.cjs +38 -0
- package/dist/production/NameSchemaGenerator.cjs.map +1 -0
- package/dist/production/NameSchemaGenerator.js +38 -0
- package/dist/production/NameSchemaGenerator.js.map +1 -0
- package/dist/production/generate.cjs +62 -0
- package/dist/production/generate.cjs.map +1 -0
- package/dist/production/generate.js +44 -0
- package/dist/production/generate.js.map +1 -0
- package/dist/production/index.cjs +11 -0
- package/dist/production/index.cjs.map +1 -0
- package/dist/production/index.js +11 -0
- package/dist/production/index.js.map +1 -0
- package/dist/types/ContemberClientGenerator.d.ts +12 -0
- package/dist/types/ContemberClientGenerator.d.ts.map +1 -0
- package/dist/types/EntityTypeSchemaGenerator.d.ts +8 -0
- package/dist/types/EntityTypeSchemaGenerator.d.ts.map +1 -0
- package/dist/types/EnumTypeSchemaGenerator.d.ts +5 -0
- package/dist/types/EnumTypeSchemaGenerator.d.ts.map +1 -0
- package/dist/types/NameSchemaGenerator.d.ts +6 -0
- package/dist/types/NameSchemaGenerator.d.ts.map +1 -0
- package/dist/types/generate.d.ts +2 -0
- package/dist/types/generate.d.ts.map +1 -0
- package/dist/types/index.d.ts +5 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -0
- package/package.json +55 -0
- package/src/ContemberClientGenerator.ts +48 -0
- package/src/EntityTypeSchemaGenerator.ts +182 -0
- package/src/EnumTypeSchemaGenerator.ts +12 -0
- package/src/NameSchemaGenerator.ts +41 -0
- package/src/generate.ts +48 -0
- package/src/index.ts +4 -0
- package/src/tsconfig.json +10 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
class EnumTypeSchemaGenerator {
|
|
4
|
+
generate(model) {
|
|
5
|
+
let code = "";
|
|
6
|
+
for (const [enumName, values] of Object.entries(model.enums)) {
|
|
7
|
+
code += `export type ${enumName} = ${values.map((it) => "\n | " + JSON.stringify(it)).join("")}
|
|
8
|
+
`;
|
|
9
|
+
}
|
|
10
|
+
return code || "export {}\n";
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
exports.EnumTypeSchemaGenerator = EnumTypeSchemaGenerator;
|
|
14
|
+
//# sourceMappingURL=EnumTypeSchemaGenerator.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EnumTypeSchemaGenerator.cjs","sources":["../../src/EnumTypeSchemaGenerator.ts"],"sourcesContent":["import { Model } from '@contember/schema'\n\nexport class EnumTypeSchemaGenerator {\n\tgenerate(model: Model.Schema): string {\n\t\tlet code = ''\n\t\tfor (const [enumName, values] of Object.entries(model.enums)) {\n\t\t\tcode += `export type ${enumName} = ${values.map(it => '\\n\\t | ' + JSON.stringify(it)).join('')}\\n`\n\t\t}\n\n\t\treturn code || 'export {}\\n'\n\t}\n}\n"],"names":[],"mappings":";;AAEO,MAAM,wBAAwB;AAAA,EACpC,SAAS,OAA6B;AACrC,QAAI,OAAO;AACA,eAAA,CAAC,UAAU,MAAM,KAAK,OAAO,QAAQ,MAAM,KAAK,GAAG;AAC7D,cAAQ,eAAe,QAAQ,MAAM,OAAO,IAAI,CAAM,OAAA,WAAY,KAAK,UAAU,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC;AAAA;AAAA,IAC/F;AAEA,WAAO,QAAQ;AAAA,EAChB;AACD;;"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
class EnumTypeSchemaGenerator {
|
|
2
|
+
generate(model) {
|
|
3
|
+
let code = "";
|
|
4
|
+
for (const [enumName, values] of Object.entries(model.enums)) {
|
|
5
|
+
code += `export type ${enumName} = ${values.map((it) => "\n | " + JSON.stringify(it)).join("")}
|
|
6
|
+
`;
|
|
7
|
+
}
|
|
8
|
+
return code || "export {}\n";
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
EnumTypeSchemaGenerator
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=EnumTypeSchemaGenerator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EnumTypeSchemaGenerator.js","sources":["../../src/EnumTypeSchemaGenerator.ts"],"sourcesContent":["import { Model } from '@contember/schema'\n\nexport class EnumTypeSchemaGenerator {\n\tgenerate(model: Model.Schema): string {\n\t\tlet code = ''\n\t\tfor (const [enumName, values] of Object.entries(model.enums)) {\n\t\t\tcode += `export type ${enumName} = ${values.map(it => '\\n\\t | ' + JSON.stringify(it)).join('')}\\n`\n\t\t}\n\n\t\treturn code || 'export {}\\n'\n\t}\n}\n"],"names":[],"mappings":"AAEO,MAAM,wBAAwB;AAAA,EACpC,SAAS,OAA6B;AACrC,QAAI,OAAO;AACA,eAAA,CAAC,UAAU,MAAM,KAAK,OAAO,QAAQ,MAAM,KAAK,GAAG;AAC7D,cAAQ,eAAe,QAAQ,MAAM,OAAO,IAAI,CAAM,OAAA,WAAY,KAAK,UAAU,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC;AAAA;AAAA,IAC/F;AAEA,WAAO,QAAQ;AAAA,EAChB;AACD;"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const schemaUtils = require("@contember/schema-utils");
|
|
4
|
+
class NameSchemaGenerator {
|
|
5
|
+
generate(model) {
|
|
6
|
+
return {
|
|
7
|
+
entities: Object.fromEntries(
|
|
8
|
+
Object.values(model.entities).map((entity) => {
|
|
9
|
+
const fields = {};
|
|
10
|
+
const scalars = [];
|
|
11
|
+
schemaUtils.acceptEveryFieldVisitor(model, entity, {
|
|
12
|
+
visitHasOne: (ctx) => {
|
|
13
|
+
fields[ctx.relation.name] = {
|
|
14
|
+
type: "one",
|
|
15
|
+
entity: ctx.targetEntity.name
|
|
16
|
+
};
|
|
17
|
+
},
|
|
18
|
+
visitHasMany: (ctx) => {
|
|
19
|
+
fields[ctx.relation.name] = {
|
|
20
|
+
type: "many",
|
|
21
|
+
entity: ctx.targetEntity.name
|
|
22
|
+
};
|
|
23
|
+
},
|
|
24
|
+
visitColumn: (ctx) => {
|
|
25
|
+
scalars.push(ctx.column.name);
|
|
26
|
+
fields[ctx.column.name] = {
|
|
27
|
+
type: "column"
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
return [entity.name, { name: entity.name, fields, scalars }];
|
|
32
|
+
})
|
|
33
|
+
)
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
exports.NameSchemaGenerator = NameSchemaGenerator;
|
|
38
|
+
//# sourceMappingURL=NameSchemaGenerator.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NameSchemaGenerator.cjs","sources":["../../src/NameSchemaGenerator.ts"],"sourcesContent":["import { SchemaNames, SchemaEntityNames } from '@contember/client-content'\nimport { Model } from '@contember/schema'\nimport { acceptEveryFieldVisitor } from '@contember/schema-utils'\n\nexport class NameSchemaGenerator {\n\tgenerate(model: Model.Schema): SchemaNames {\n\t\treturn {\n\t\t\tentities: Object.fromEntries(\n\t\t\t\tObject.values(model.entities).map(entity => {\n\t\t\t\t\tconst fields: Record<string, SchemaEntityNames<any>['fields'][string]> = {}\n\t\t\t\t\tconst scalars: string[] = []\n\n\t\t\t\t\tacceptEveryFieldVisitor(model, entity, {\n\t\t\t\t\t\tvisitHasOne: ctx => {\n\t\t\t\t\t\t\tfields[ctx.relation.name] = {\n\t\t\t\t\t\t\t\ttype: 'one',\n\t\t\t\t\t\t\t\tentity: ctx.targetEntity.name,\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t\tvisitHasMany: ctx => {\n\t\t\t\t\t\t\tfields[ctx.relation.name] = {\n\t\t\t\t\t\t\t\ttype: 'many',\n\t\t\t\t\t\t\t\tentity: ctx.targetEntity.name,\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t\tvisitColumn: ctx => {\n\t\t\t\t\t\t\tscalars.push(ctx.column.name)\n\t\t\t\t\t\t\tfields[ctx.column.name] = {\n\t\t\t\t\t\t\t\ttype: 'column',\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t})\n\n\t\t\t\t\treturn [entity.name, { name: entity.name, fields, scalars }]\n\t\t\t\t}),\n\t\t\t),\n\t\t}\n\t}\n}\n\n\n"],"names":["acceptEveryFieldVisitor"],"mappings":";;;AAIO,MAAM,oBAAoB;AAAA,EAChC,SAAS,OAAkC;AACnC,WAAA;AAAA,MACN,UAAU,OAAO;AAAA,QAChB,OAAO,OAAO,MAAM,QAAQ,EAAE,IAAI,CAAU,WAAA;AAC3C,gBAAM,SAAmE,CAAA;AACzE,gBAAM,UAAoB,CAAA;AAE1BA,sBAAA,wBAAwB,OAAO,QAAQ;AAAA,YACtC,aAAa,CAAO,QAAA;AACZ,qBAAA,IAAI,SAAS,IAAI,IAAI;AAAA,gBAC3B,MAAM;AAAA,gBACN,QAAQ,IAAI,aAAa;AAAA,cAAA;AAAA,YAE3B;AAAA,YACA,cAAc,CAAO,QAAA;AACb,qBAAA,IAAI,SAAS,IAAI,IAAI;AAAA,gBAC3B,MAAM;AAAA,gBACN,QAAQ,IAAI,aAAa;AAAA,cAAA;AAAA,YAE3B;AAAA,YACA,aAAa,CAAO,QAAA;AACX,sBAAA,KAAK,IAAI,OAAO,IAAI;AACrB,qBAAA,IAAI,OAAO,IAAI,IAAI;AAAA,gBACzB,MAAM;AAAA,cAAA;AAAA,YAER;AAAA,UAAA,CACA;AAEM,iBAAA,CAAC,OAAO,MAAM,EAAE,MAAM,OAAO,MAAM,QAAQ,QAAA,CAAS;AAAA,QAAA,CAC3D;AAAA,MACF;AAAA,IAAA;AAAA,EAEF;AACD;;"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { acceptEveryFieldVisitor } from "@contember/schema-utils";
|
|
2
|
+
class NameSchemaGenerator {
|
|
3
|
+
generate(model) {
|
|
4
|
+
return {
|
|
5
|
+
entities: Object.fromEntries(
|
|
6
|
+
Object.values(model.entities).map((entity) => {
|
|
7
|
+
const fields = {};
|
|
8
|
+
const scalars = [];
|
|
9
|
+
acceptEveryFieldVisitor(model, entity, {
|
|
10
|
+
visitHasOne: (ctx) => {
|
|
11
|
+
fields[ctx.relation.name] = {
|
|
12
|
+
type: "one",
|
|
13
|
+
entity: ctx.targetEntity.name
|
|
14
|
+
};
|
|
15
|
+
},
|
|
16
|
+
visitHasMany: (ctx) => {
|
|
17
|
+
fields[ctx.relation.name] = {
|
|
18
|
+
type: "many",
|
|
19
|
+
entity: ctx.targetEntity.name
|
|
20
|
+
};
|
|
21
|
+
},
|
|
22
|
+
visitColumn: (ctx) => {
|
|
23
|
+
scalars.push(ctx.column.name);
|
|
24
|
+
fields[ctx.column.name] = {
|
|
25
|
+
type: "column"
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
return [entity.name, { name: entity.name, fields, scalars }];
|
|
30
|
+
})
|
|
31
|
+
)
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
export {
|
|
36
|
+
NameSchemaGenerator
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=NameSchemaGenerator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NameSchemaGenerator.js","sources":["../../src/NameSchemaGenerator.ts"],"sourcesContent":["import { SchemaNames, SchemaEntityNames } from '@contember/client-content'\nimport { Model } from '@contember/schema'\nimport { acceptEveryFieldVisitor } from '@contember/schema-utils'\n\nexport class NameSchemaGenerator {\n\tgenerate(model: Model.Schema): SchemaNames {\n\t\treturn {\n\t\t\tentities: Object.fromEntries(\n\t\t\t\tObject.values(model.entities).map(entity => {\n\t\t\t\t\tconst fields: Record<string, SchemaEntityNames<any>['fields'][string]> = {}\n\t\t\t\t\tconst scalars: string[] = []\n\n\t\t\t\t\tacceptEveryFieldVisitor(model, entity, {\n\t\t\t\t\t\tvisitHasOne: ctx => {\n\t\t\t\t\t\t\tfields[ctx.relation.name] = {\n\t\t\t\t\t\t\t\ttype: 'one',\n\t\t\t\t\t\t\t\tentity: ctx.targetEntity.name,\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t\tvisitHasMany: ctx => {\n\t\t\t\t\t\t\tfields[ctx.relation.name] = {\n\t\t\t\t\t\t\t\ttype: 'many',\n\t\t\t\t\t\t\t\tentity: ctx.targetEntity.name,\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t\tvisitColumn: ctx => {\n\t\t\t\t\t\t\tscalars.push(ctx.column.name)\n\t\t\t\t\t\t\tfields[ctx.column.name] = {\n\t\t\t\t\t\t\t\ttype: 'column',\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t})\n\n\t\t\t\t\treturn [entity.name, { name: entity.name, fields, scalars }]\n\t\t\t\t}),\n\t\t\t),\n\t\t}\n\t}\n}\n\n\n"],"names":[],"mappings":";AAIO,MAAM,oBAAoB;AAAA,EAChC,SAAS,OAAkC;AACnC,WAAA;AAAA,MACN,UAAU,OAAO;AAAA,QAChB,OAAO,OAAO,MAAM,QAAQ,EAAE,IAAI,CAAU,WAAA;AAC3C,gBAAM,SAAmE,CAAA;AACzE,gBAAM,UAAoB,CAAA;AAE1B,kCAAwB,OAAO,QAAQ;AAAA,YACtC,aAAa,CAAO,QAAA;AACZ,qBAAA,IAAI,SAAS,IAAI,IAAI;AAAA,gBAC3B,MAAM;AAAA,gBACN,QAAQ,IAAI,aAAa;AAAA,cAAA;AAAA,YAE3B;AAAA,YACA,cAAc,CAAO,QAAA;AACb,qBAAA,IAAI,SAAS,IAAI,IAAI;AAAA,gBAC3B,MAAM;AAAA,gBACN,QAAQ,IAAI,aAAa;AAAA,cAAA;AAAA,YAE3B;AAAA,YACA,aAAa,CAAO,QAAA;AACX,sBAAA,KAAK,IAAI,OAAO,IAAI;AACrB,qBAAA,IAAI,OAAO,IAAI,IAAI;AAAA,gBACzB,MAAM;AAAA,cAAA;AAAA,YAER;AAAA,UAAA,CACA;AAEM,iBAAA,CAAC,OAAO,MAAM,EAAE,MAAM,OAAO,MAAM,QAAQ,QAAA,CAAS;AAAA,QAAA,CAC3D;AAAA,MACF;AAAA,IAAA;AAAA,EAEF;AACD;"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
const fs = require("node:fs/promises");
|
|
4
|
+
const node_path = require("node:path");
|
|
5
|
+
const ContemberClientGenerator = require("./ContemberClientGenerator.cjs");
|
|
6
|
+
function _interopNamespaceDefault(e) {
|
|
7
|
+
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
8
|
+
if (e) {
|
|
9
|
+
for (const k in e) {
|
|
10
|
+
if (k !== "default") {
|
|
11
|
+
const d = Object.getOwnPropertyDescriptor(e, k);
|
|
12
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: () => e[k]
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
n.default = e;
|
|
20
|
+
return Object.freeze(n);
|
|
21
|
+
}
|
|
22
|
+
const fs__namespace = /* @__PURE__ */ _interopNamespaceDefault(fs);
|
|
23
|
+
(async () => {
|
|
24
|
+
const schemaPath = process.argv[2];
|
|
25
|
+
const outDir = process.argv[3];
|
|
26
|
+
if (!schemaPath || !outDir) {
|
|
27
|
+
console.error(`Usage:
|
|
28
|
+
|
|
29
|
+
From file:
|
|
30
|
+
yarn contember-client-generator <schema.json> <out-dir>
|
|
31
|
+
|
|
32
|
+
From stdin:
|
|
33
|
+
yarn run --silent contember project:print-schema --format=schema | yarn contember-client-generator - <out-dir>
|
|
34
|
+
`);
|
|
35
|
+
process.exit(1);
|
|
36
|
+
}
|
|
37
|
+
const sourceData = await (async () => {
|
|
38
|
+
if (schemaPath === "-") {
|
|
39
|
+
if (process.stdin.isTTY) {
|
|
40
|
+
throw new Error("Cannot read from stdin in TTY mode");
|
|
41
|
+
}
|
|
42
|
+
const buffer = [];
|
|
43
|
+
for await (const chunk of process.stdin) {
|
|
44
|
+
buffer.push(chunk);
|
|
45
|
+
}
|
|
46
|
+
return Buffer.concat(buffer).toString("utf8");
|
|
47
|
+
}
|
|
48
|
+
return await fs__namespace.readFile(node_path.resolve(process.cwd(), process.argv[2]), "utf8");
|
|
49
|
+
})();
|
|
50
|
+
const source = JSON.parse(sourceData);
|
|
51
|
+
const dir = node_path.resolve(process.cwd(), process.argv[3]);
|
|
52
|
+
const generator = new ContemberClientGenerator.ContemberClientGenerator();
|
|
53
|
+
const result = generator.generate(source.model);
|
|
54
|
+
await fs__namespace.mkdir(dir, { recursive: true });
|
|
55
|
+
for (const [name, content] of Object.entries(result)) {
|
|
56
|
+
await fs__namespace.writeFile(node_path.join(dir, name), content, "utf8");
|
|
57
|
+
}
|
|
58
|
+
})().catch((e) => {
|
|
59
|
+
console.error(e);
|
|
60
|
+
process.exit(1);
|
|
61
|
+
});
|
|
62
|
+
//# sourceMappingURL=generate.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate.cjs","sources":["../../src/generate.ts"],"sourcesContent":["import * as fs from 'node:fs/promises'\nimport { resolve, join } from 'node:path'\nimport { ContemberClientGenerator } from './ContemberClientGenerator';\n\n(async () => {\n\tconst schemaPath = process.argv[2]\n\tconst outDir = process.argv[3]\n\n\tif (!schemaPath || !outDir) {\n\t\tconsole.error(`Usage:\n\nFrom file:\nyarn contember-client-generator <schema.json> <out-dir>\n\nFrom stdin:\nyarn run --silent contember project:print-schema --format=schema | yarn contember-client-generator - <out-dir>\n`)\n\t\tprocess.exit(1)\n\t}\n\n\tconst sourceData = await (async () => {\n\t\tif (schemaPath === '-') {\n\t\t\tif (process.stdin.isTTY) {\n\t\t\t\tthrow new Error('Cannot read from stdin in TTY mode')\n\t\t\t}\n\t\t\tconst buffer = []\n\t\t\tfor await (const chunk of process.stdin) {\n\t\t\t\tbuffer.push(chunk)\n\t\t\t}\n\t\t\treturn Buffer.concat(buffer).toString('utf8')\n\t\t}\n\t\treturn await fs.readFile(resolve(process.cwd(), process.argv[2]), 'utf8')\n\t})()\n\n\tconst source = JSON.parse(sourceData)\n\n\tconst dir = resolve(process.cwd(), process.argv[3])\n\tconst generator = new ContemberClientGenerator()\n\tconst result = generator.generate(source.model)\n\tawait fs.mkdir(dir, { recursive: true })\n\tfor (const [name, content] of Object.entries(result)) {\n\t\tawait fs.writeFile(join(dir, name), content, 'utf8')\n\t}\n})().catch(e => {\n\tconsole.error(e)\n\tprocess.exit(1)\n})\n\n"],"names":["fs","resolve","ContemberClientGenerator","join"],"mappings":";;;;;;;;;;;;;;;;;;;;;;CAIC,YAAY;AACN,QAAA,aAAa,QAAQ,KAAK,CAAC;AAC3B,QAAA,SAAS,QAAQ,KAAK,CAAC;AAEzB,MAAA,CAAC,cAAc,CAAC,QAAQ;AAC3B,YAAQ,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAOf;AACC,YAAQ,KAAK,CAAC;AAAA,EACf;AAEM,QAAA,aAAa,OAAO,YAAY;AACrC,QAAI,eAAe,KAAK;AACnB,UAAA,QAAQ,MAAM,OAAO;AAClB,cAAA,IAAI,MAAM,oCAAoC;AAAA,MACrD;AACA,YAAM,SAAS,CAAA;AACE,uBAAA,SAAS,QAAQ,OAAO;AACxC,eAAO,KAAK,KAAK;AAAA,MAClB;AACA,aAAO,OAAO,OAAO,MAAM,EAAE,SAAS,MAAM;AAAA,IAC7C;AACA,WAAO,MAAMA,cAAG,SAASC,UAAAA,QAAQ,QAAQ,OAAO,QAAQ,KAAK,CAAC,CAAC,GAAG,MAAM;AAAA,EAAA;AAGnE,QAAA,SAAS,KAAK,MAAM,UAAU;AAE9B,QAAA,MAAMA,kBAAQ,QAAQ,OAAO,QAAQ,KAAK,CAAC,CAAC;AAC5C,QAAA,YAAY,IAAIC,yBAAAA;AACtB,QAAM,SAAS,UAAU,SAAS,OAAO,KAAK;AAC9C,QAAMF,cAAG,MAAM,KAAK,EAAE,WAAW,MAAM;AACvC,aAAW,CAAC,MAAM,OAAO,KAAK,OAAO,QAAQ,MAAM,GAAG;AACrD,UAAMA,cAAG,UAAUG,eAAK,KAAK,IAAI,GAAG,SAAS,MAAM;AAAA,EACpD;AACD,KAAK,MAAM,CAAK,MAAA;AACf,UAAQ,MAAM,CAAC;AACf,UAAQ,KAAK,CAAC;AACf,CAAC;"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import * as fs from "node:fs/promises";
|
|
3
|
+
import { resolve, join } from "node:path";
|
|
4
|
+
import { ContemberClientGenerator } from "./ContemberClientGenerator.js";
|
|
5
|
+
(async () => {
|
|
6
|
+
const schemaPath = process.argv[2];
|
|
7
|
+
const outDir = process.argv[3];
|
|
8
|
+
if (!schemaPath || !outDir) {
|
|
9
|
+
console.error(`Usage:
|
|
10
|
+
|
|
11
|
+
From file:
|
|
12
|
+
yarn contember-client-generator <schema.json> <out-dir>
|
|
13
|
+
|
|
14
|
+
From stdin:
|
|
15
|
+
yarn run --silent contember project:print-schema --format=schema | yarn contember-client-generator - <out-dir>
|
|
16
|
+
`);
|
|
17
|
+
process.exit(1);
|
|
18
|
+
}
|
|
19
|
+
const sourceData = await (async () => {
|
|
20
|
+
if (schemaPath === "-") {
|
|
21
|
+
if (process.stdin.isTTY) {
|
|
22
|
+
throw new Error("Cannot read from stdin in TTY mode");
|
|
23
|
+
}
|
|
24
|
+
const buffer = [];
|
|
25
|
+
for await (const chunk of process.stdin) {
|
|
26
|
+
buffer.push(chunk);
|
|
27
|
+
}
|
|
28
|
+
return Buffer.concat(buffer).toString("utf8");
|
|
29
|
+
}
|
|
30
|
+
return await fs.readFile(resolve(process.cwd(), process.argv[2]), "utf8");
|
|
31
|
+
})();
|
|
32
|
+
const source = JSON.parse(sourceData);
|
|
33
|
+
const dir = resolve(process.cwd(), process.argv[3]);
|
|
34
|
+
const generator = new ContemberClientGenerator();
|
|
35
|
+
const result = generator.generate(source.model);
|
|
36
|
+
await fs.mkdir(dir, { recursive: true });
|
|
37
|
+
for (const [name, content] of Object.entries(result)) {
|
|
38
|
+
await fs.writeFile(join(dir, name), content, "utf8");
|
|
39
|
+
}
|
|
40
|
+
})().catch((e) => {
|
|
41
|
+
console.error(e);
|
|
42
|
+
process.exit(1);
|
|
43
|
+
});
|
|
44
|
+
//# sourceMappingURL=generate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate.js","sources":["../../src/generate.ts"],"sourcesContent":["import * as fs from 'node:fs/promises'\nimport { resolve, join } from 'node:path'\nimport { ContemberClientGenerator } from './ContemberClientGenerator';\n\n(async () => {\n\tconst schemaPath = process.argv[2]\n\tconst outDir = process.argv[3]\n\n\tif (!schemaPath || !outDir) {\n\t\tconsole.error(`Usage:\n\nFrom file:\nyarn contember-client-generator <schema.json> <out-dir>\n\nFrom stdin:\nyarn run --silent contember project:print-schema --format=schema | yarn contember-client-generator - <out-dir>\n`)\n\t\tprocess.exit(1)\n\t}\n\n\tconst sourceData = await (async () => {\n\t\tif (schemaPath === '-') {\n\t\t\tif (process.stdin.isTTY) {\n\t\t\t\tthrow new Error('Cannot read from stdin in TTY mode')\n\t\t\t}\n\t\t\tconst buffer = []\n\t\t\tfor await (const chunk of process.stdin) {\n\t\t\t\tbuffer.push(chunk)\n\t\t\t}\n\t\t\treturn Buffer.concat(buffer).toString('utf8')\n\t\t}\n\t\treturn await fs.readFile(resolve(process.cwd(), process.argv[2]), 'utf8')\n\t})()\n\n\tconst source = JSON.parse(sourceData)\n\n\tconst dir = resolve(process.cwd(), process.argv[3])\n\tconst generator = new ContemberClientGenerator()\n\tconst result = generator.generate(source.model)\n\tawait fs.mkdir(dir, { recursive: true })\n\tfor (const [name, content] of Object.entries(result)) {\n\t\tawait fs.writeFile(join(dir, name), content, 'utf8')\n\t}\n})().catch(e => {\n\tconsole.error(e)\n\tprocess.exit(1)\n})\n\n"],"names":[],"mappings":";;;;CAIC,YAAY;AACN,QAAA,aAAa,QAAQ,KAAK,CAAC;AAC3B,QAAA,SAAS,QAAQ,KAAK,CAAC;AAEzB,MAAA,CAAC,cAAc,CAAC,QAAQ;AAC3B,YAAQ,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAOf;AACC,YAAQ,KAAK,CAAC;AAAA,EACf;AAEM,QAAA,aAAa,OAAO,YAAY;AACrC,QAAI,eAAe,KAAK;AACnB,UAAA,QAAQ,MAAM,OAAO;AAClB,cAAA,IAAI,MAAM,oCAAoC;AAAA,MACrD;AACA,YAAM,SAAS,CAAA;AACE,uBAAA,SAAS,QAAQ,OAAO;AACxC,eAAO,KAAK,KAAK;AAAA,MAClB;AACA,aAAO,OAAO,OAAO,MAAM,EAAE,SAAS,MAAM;AAAA,IAC7C;AACA,WAAO,MAAM,GAAG,SAAS,QAAQ,QAAQ,OAAO,QAAQ,KAAK,CAAC,CAAC,GAAG,MAAM;AAAA,EAAA;AAGnE,QAAA,SAAS,KAAK,MAAM,UAAU;AAE9B,QAAA,MAAM,QAAQ,QAAQ,OAAO,QAAQ,KAAK,CAAC,CAAC;AAC5C,QAAA,YAAY,IAAI;AACtB,QAAM,SAAS,UAAU,SAAS,OAAO,KAAK;AAC9C,QAAM,GAAG,MAAM,KAAK,EAAE,WAAW,MAAM;AACvC,aAAW,CAAC,MAAM,OAAO,KAAK,OAAO,QAAQ,MAAM,GAAG;AACrD,UAAM,GAAG,UAAU,KAAK,KAAK,IAAI,GAAG,SAAS,MAAM;AAAA,EACpD;AACD,KAAK,MAAM,CAAK,MAAA;AACf,UAAQ,MAAM,CAAC;AACf,UAAQ,KAAK,CAAC;AACf,CAAC;"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const ContemberClientGenerator = require("./ContemberClientGenerator.cjs");
|
|
4
|
+
const EntityTypeSchemaGenerator = require("./EntityTypeSchemaGenerator.cjs");
|
|
5
|
+
const EnumTypeSchemaGenerator = require("./EnumTypeSchemaGenerator.cjs");
|
|
6
|
+
const NameSchemaGenerator = require("./NameSchemaGenerator.cjs");
|
|
7
|
+
exports.ContemberClientGenerator = ContemberClientGenerator.ContemberClientGenerator;
|
|
8
|
+
exports.EntityTypeSchemaGenerator = EntityTypeSchemaGenerator.EntityTypeSchemaGenerator;
|
|
9
|
+
exports.EnumTypeSchemaGenerator = EnumTypeSchemaGenerator.EnumTypeSchemaGenerator;
|
|
10
|
+
exports.NameSchemaGenerator = NameSchemaGenerator.NameSchemaGenerator;
|
|
11
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ContemberClientGenerator } from "./ContemberClientGenerator.js";
|
|
2
|
+
import { EntityTypeSchemaGenerator } from "./EntityTypeSchemaGenerator.js";
|
|
3
|
+
import { EnumTypeSchemaGenerator } from "./EnumTypeSchemaGenerator.js";
|
|
4
|
+
import { NameSchemaGenerator } from "./NameSchemaGenerator.js";
|
|
5
|
+
export {
|
|
6
|
+
ContemberClientGenerator,
|
|
7
|
+
EntityTypeSchemaGenerator,
|
|
8
|
+
EnumTypeSchemaGenerator,
|
|
9
|
+
NameSchemaGenerator
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Model } from '@contember/schema';
|
|
2
|
+
import { EnumTypeSchemaGenerator } from './EnumTypeSchemaGenerator';
|
|
3
|
+
import { EntityTypeSchemaGenerator } from './EntityTypeSchemaGenerator';
|
|
4
|
+
import { NameSchemaGenerator } from './NameSchemaGenerator';
|
|
5
|
+
export declare class ContemberClientGenerator {
|
|
6
|
+
private readonly nameSchemaGenerator;
|
|
7
|
+
private readonly enumTypeSchemaGenerator;
|
|
8
|
+
private readonly entityTypeSchemaGenerator;
|
|
9
|
+
constructor(nameSchemaGenerator?: NameSchemaGenerator, enumTypeSchemaGenerator?: EnumTypeSchemaGenerator, entityTypeSchemaGenerator?: EntityTypeSchemaGenerator);
|
|
10
|
+
generate(model: Model.Schema): Record<string, string>;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=ContemberClientGenerator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContemberClientGenerator.d.ts","sourceRoot":"","sources":["../../src/ContemberClientGenerator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AACzC,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAA;AACnE,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AACvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAG3D,qBAAa,wBAAwB;IAEnC,OAAO,CAAC,QAAQ,CAAC,mBAAmB;IACpC,OAAO,CAAC,QAAQ,CAAC,uBAAuB;IACxC,OAAO,CAAC,QAAQ,CAAC,yBAAyB;gBAFzB,mBAAmB,GAAE,mBAA+C,EACpE,uBAAuB,GAAE,uBAAuD,EAChF,yBAAyB,GAAE,yBAA2D;IAIxG,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;CAiCrD"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Model } from '@contember/schema';
|
|
2
|
+
export declare class EntityTypeSchemaGenerator {
|
|
3
|
+
generate(model: Model.Schema): string;
|
|
4
|
+
private generateTypeEntityCode;
|
|
5
|
+
private formatReducedFields;
|
|
6
|
+
private formatUniqueFields;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=EntityTypeSchemaGenerator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EntityTypeSchemaGenerator.d.ts","sourceRoot":"","sources":["../../src/EntityTypeSchemaGenerator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAGzC,qBAAa,yBAAyB;IACrC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM;IA6BrC,OAAO,CAAC,sBAAsB;IAoC9B,OAAO,CAAC,mBAAmB;IA8C3B,OAAO,CAAC,kBAAkB;CAU1B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EnumTypeSchemaGenerator.d.ts","sourceRoot":"","sources":["../../src/EnumTypeSchemaGenerator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAEzC,qBAAa,uBAAuB;IACnC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM;CAQrC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NameSchemaGenerator.d.ts","sourceRoot":"","sources":["../../src/NameSchemaGenerator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAqB,MAAM,2BAA2B,CAAA;AAC1E,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAGzC,qBAAa,mBAAmB;IAC/B,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,MAAM,GAAG,WAAW;CAiC1C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../../src/generate.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAA;AAC1C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,2BAA2B,CAAA;AACzC,cAAc,uBAAuB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"program":{"fileNames":["../../../../node_modules/typescript/lib/lib.es5.d.ts","../../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../../node_modules/typescript/lib/lib.es2020.d.ts","../../../../node_modules/typescript/lib/lib.es2021.d.ts","../../../../node_modules/typescript/lib/lib.es2022.d.ts","../../../../node_modules/typescript/lib/lib.es2023.d.ts","../../../../node_modules/typescript/lib/lib.esnext.d.ts","../../../../node_modules/typescript/lib/lib.dom.d.ts","../../../../node_modules/typescript/lib/lib.dom.iterable.d.ts","../../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../../node_modules/typescript/lib/lib.es2017.date.d.ts","../../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2022.array.d.ts","../../../../node_modules/typescript/lib/lib.es2022.error.d.ts","../../../../node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2022.object.d.ts","../../../../node_modules/typescript/lib/lib.es2022.sharedmemory.d.ts","../../../../node_modules/typescript/lib/lib.es2022.string.d.ts","../../../../node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../../../node_modules/typescript/lib/lib.es2023.array.d.ts","../../../../node_modules/typescript/lib/lib.es2023.collection.d.ts","../../../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../../../node_modules/typescript/lib/lib.esnext.disposable.d.ts","../../../../node_modules/typescript/lib/lib.esnext.decorators.d.ts","../../../../node_modules/typescript/lib/lib.decorators.d.ts","../../../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../../../node_modules/@types/react/global.d.ts","../../../../node_modules/csstype/index.d.ts","../../../../node_modules/@types/prop-types/index.d.ts","../../../../node_modules/@types/scheduler/tracing.d.ts","../../../../node_modules/@types/react/index.d.ts","../../../../node_modules/@types/react/jsx-runtime.d.ts","../../../../node_modules/@contember/schema/dist/src/schema/value.d.ts","../../../../node_modules/@contember/schema/dist/src/schema/input.d.ts","../../../../node_modules/@contember/schema/dist/src/schema/json.d.ts","../../../../node_modules/@contember/schema/dist/src/schema/acl.d.ts","../../../../node_modules/@contember/schema/dist/src/schema/actions.d.ts","../../../../node_modules/@contember/schema/dist/src/schema/model.d.ts","../../../../node_modules/@contember/schema/dist/src/schema/result.d.ts","../../../../node_modules/@contember/schema/dist/src/schema/validation.d.ts","../../../../node_modules/@contember/schema/dist/src/schema/settings.d.ts","../../../../node_modules/@contember/schema/dist/src/ProjectRole.d.ts","../../../../node_modules/@contember/schema/dist/src/index.d.ts","../../src/EnumTypeSchemaGenerator.ts","../../../../node_modules/@contember/typesafe/dist/src/index.d.ts","../../../../node_modules/@contember/schema-utils/dist/src/model/modelUtils.d.ts","../../../../node_modules/@contember/schema-utils/dist/src/model/resolveDefaultColumnType.d.ts","../../../../node_modules/@contember/schema-utils/dist/src/model/NamingConventions.d.ts","../../../../node_modules/@contember/schema-utils/dist/src/model/index.d.ts","../../../../node_modules/@contember/schema-utils/dist/src/definition-generator/TsDefinitionGenerator.d.ts","../../../../node_modules/@contember/schema-utils/dist/src/definition-generator/DefinitionNamingConventions.d.ts","../../../../node_modules/@contember/schema-utils/dist/src/definition-generator/AclDefinitionCodeGenerator.d.ts","../../../../node_modules/@contember/schema-utils/dist/src/definition-generator/DefinitionCodeGenerator.d.ts","../../../../node_modules/@contember/schema-utils/dist/src/definition-generator/index.d.ts","../../../../node_modules/@contember/schema-utils/dist/src/SchemaDatabaseMetadata.d.ts","../../../../node_modules/@contember/schema-utils/dist/src/lax/schema.d.ts","../../../../node_modules/@contember/schema-utils/dist/src/lax/LaxSchemaConverter.d.ts","../../../../node_modules/@contember/schema-utils/dist/src/lax/index.d.ts","../../../../node_modules/@contember/schema-utils/dist/src/acl/AllowAllPermissionFactory.d.ts","../../../../node_modules/@contember/schema-utils/dist/src/acl/PredicateDefinitionProcessor.d.ts","../../../../node_modules/@contember/schema-utils/dist/src/acl/schemaUtils.d.ts","../../../../node_modules/@contember/schema-utils/dist/src/acl/index.d.ts","../../../../node_modules/@contember/schema-utils/dist/src/dataUtils.d.ts","../../../../node_modules/@contember/schema-utils/dist/src/validation/errors.d.ts","../../../../node_modules/@contember/schema-utils/dist/src/validation/AclValidator.d.ts","../../../../node_modules/@contember/schema-utils/dist/src/validation/ModelValidator.d.ts","../../../../node_modules/@contember/schema-utils/dist/src/validation/ValidationValidator.d.ts","../../../../node_modules/@contember/schema-utils/dist/src/validation/SchemaValidator.d.ts","../../../../node_modules/@contember/schema-utils/dist/src/validation/MembershipResolver.d.ts","../../../../node_modules/@contember/schema-utils/dist/src/validation/index.d.ts","../../../../node_modules/@contember/schema-utils/dist/src/schemaNormalizer.d.ts","../../../../node_modules/@contember/schema-utils/dist/src/schemaFilter.d.ts","../../../../node_modules/@contember/schema-utils/dist/src/utils/assertNever.d.ts","../../../../node_modules/@contember/schema-utils/dist/src/utils/isIt.d.ts","../../../../node_modules/@contember/schema-utils/dist/src/utils/deepCompare.d.ts","../../../../node_modules/@contember/schema-utils/dist/src/utils/index.d.ts","../../../../node_modules/@contember/schema-utils/dist/src/index.d.ts","../../src/EntityTypeSchemaGenerator.ts","../../../graphql-client/dist/types/GraphQlClientRequestOptions.d.ts","../../../graphql-client/dist/types/GraphQlClient.d.ts","../../../graphql-client/dist/types/GraphQlClientError.d.ts","../../../graphql-client/dist/types/index.d.ts","../../../client-content/dist/types/types/Schema.d.ts","../../../client-content/dist/types/types/Input.d.ts","../../../client-content/dist/types/types/Result.d.ts","../../../client-content/dist/types/types/index.d.ts","../../../graphql-builder/dist/types/nodes/GraphQlFragmentSpread.d.ts","../../../graphql-builder/dist/types/nodes/GraphQlInlineFragment.d.ts","../../../graphql-builder/dist/types/nodes/GraphQlField.d.ts","../../../graphql-builder/dist/types/nodes/GraphQlFragment.d.ts","../../../graphql-builder/dist/types/nodes/index.d.ts","../../../graphql-builder/dist/types/GraphQlQueryPrinter.d.ts","../../../graphql-builder/dist/types/index.d.ts","../../../client-content/dist/types/nodes/ContentEntitySelection.d.ts","../../../client-content/dist/types/nodes/ContentOperation.d.ts","../../../client-content/dist/types/nodes/TypedEntitySelection.d.ts","../../../client-content/dist/types/nodes/index.d.ts","../../../client-content/dist/types/ContentClient.d.ts","../../../client-content/dist/types/ContentQueryBuilder.d.ts","../../../client-content/dist/types/TypedContentQueryBuilder.d.ts","../../../client-content/dist/types/index.d.ts","../../src/NameSchemaGenerator.ts","../../src/ContemberClientGenerator.ts","../../src/generate.ts","../../src/index.ts","../../../../node_modules/@types/node/assert.d.ts","../../../../node_modules/@types/node/assert/strict.d.ts","../../../../node_modules/buffer/index.d.ts","../../../../node_modules/undici-types/header.d.ts","../../../../node_modules/undici-types/readable.d.ts","../../../../node_modules/undici-types/file.d.ts","../../../../node_modules/undici-types/fetch.d.ts","../../../../node_modules/undici-types/formdata.d.ts","../../../../node_modules/undici-types/connector.d.ts","../../../../node_modules/undici-types/client.d.ts","../../../../node_modules/undici-types/errors.d.ts","../../../../node_modules/undici-types/dispatcher.d.ts","../../../../node_modules/undici-types/global-dispatcher.d.ts","../../../../node_modules/undici-types/global-origin.d.ts","../../../../node_modules/undici-types/pool-stats.d.ts","../../../../node_modules/undici-types/pool.d.ts","../../../../node_modules/undici-types/handlers.d.ts","../../../../node_modules/undici-types/balanced-pool.d.ts","../../../../node_modules/undici-types/agent.d.ts","../../../../node_modules/undici-types/mock-interceptor.d.ts","../../../../node_modules/undici-types/mock-agent.d.ts","../../../../node_modules/undici-types/mock-client.d.ts","../../../../node_modules/undici-types/mock-pool.d.ts","../../../../node_modules/undici-types/mock-errors.d.ts","../../../../node_modules/undici-types/proxy-agent.d.ts","../../../../node_modules/undici-types/api.d.ts","../../../../node_modules/undici-types/cookies.d.ts","../../../../node_modules/undici-types/patch.d.ts","../../../../node_modules/undici-types/filereader.d.ts","../../../../node_modules/undici-types/diagnostics-channel.d.ts","../../../../node_modules/undici-types/websocket.d.ts","../../../../node_modules/undici-types/content-type.d.ts","../../../../node_modules/undici-types/cache.d.ts","../../../../node_modules/undici-types/interceptors.d.ts","../../../../node_modules/undici-types/index.d.ts","../../../../node_modules/@types/node/globals.d.ts","../../../../node_modules/@types/node/async_hooks.d.ts","../../../../node_modules/@types/node/buffer.d.ts","../../../../node_modules/@types/node/child_process.d.ts","../../../../node_modules/@types/node/cluster.d.ts","../../../../node_modules/@types/node/console.d.ts","../../../../node_modules/@types/node/constants.d.ts","../../../../node_modules/@types/node/crypto.d.ts","../../../../node_modules/@types/node/dgram.d.ts","../../../../node_modules/@types/node/diagnostics_channel.d.ts","../../../../node_modules/@types/node/dns.d.ts","../../../../node_modules/@types/node/dns/promises.d.ts","../../../../node_modules/@types/node/domain.d.ts","../../../../node_modules/@types/node/dom-events.d.ts","../../../../node_modules/@types/node/events.d.ts","../../../../node_modules/@types/node/fs.d.ts","../../../../node_modules/@types/node/fs/promises.d.ts","../../../../node_modules/@types/node/http.d.ts","../../../../node_modules/@types/node/http2.d.ts","../../../../node_modules/@types/node/https.d.ts","../../../../node_modules/@types/node/inspector.d.ts","../../../../node_modules/@types/node/module.d.ts","../../../../node_modules/@types/node/net.d.ts","../../../../node_modules/@types/node/os.d.ts","../../../../node_modules/@types/node/path.d.ts","../../../../node_modules/@types/node/perf_hooks.d.ts","../../../../node_modules/@types/node/process.d.ts","../../../../node_modules/@types/node/punycode.d.ts","../../../../node_modules/@types/node/querystring.d.ts","../../../../node_modules/@types/node/readline.d.ts","../../../../node_modules/@types/node/readline/promises.d.ts","../../../../node_modules/@types/node/repl.d.ts","../../../../node_modules/@types/node/stream.d.ts","../../../../node_modules/@types/node/stream/promises.d.ts","../../../../node_modules/@types/node/stream/consumers.d.ts","../../../../node_modules/@types/node/stream/web.d.ts","../../../../node_modules/@types/node/string_decoder.d.ts","../../../../node_modules/@types/node/test.d.ts","../../../../node_modules/@types/node/timers.d.ts","../../../../node_modules/@types/node/timers/promises.d.ts","../../../../node_modules/@types/node/tls.d.ts","../../../../node_modules/@types/node/trace_events.d.ts","../../../../node_modules/@types/node/tty.d.ts","../../../../node_modules/@types/node/url.d.ts","../../../../node_modules/@types/node/util.d.ts","../../../../node_modules/@types/node/v8.d.ts","../../../../node_modules/@types/node/vm.d.ts","../../../../node_modules/@types/node/wasi.d.ts","../../../../node_modules/@types/node/worker_threads.d.ts","../../../../node_modules/@types/node/zlib.d.ts","../../../../node_modules/@types/node/globals.global.d.ts","../../../../node_modules/@types/node/index.d.ts"],"fileInfos":[{"version":"f33e5332b24c3773e930e212cbb8b6867c8ba3ec4492064ea78e55a524d57450","affectsGlobalScope":true},"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","26f2f787e82c4222710f3b676b4d83eb5ad0a72fa7b746f03449e7a026ce5073","9a68c0c07ae2fa71b44384a839b7b8d81662a236d4b9ac30916718f7510b1b2d","5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","5514e54f17d6d74ecefedc73c504eadffdeda79c7ea205cf9febead32d45c4bc","1c0cdb8dc619bc549c3e5020643e7cf7ae7940058e8c7e5aefa5871b6d86f44b","bed7b7ba0eb5a160b69af72814b4dde371968e40b6c5e73d3a9f7bee407d158c",{"version":"21e41a76098aa7a191028256e52a726baafd45a925ea5cf0222eb430c96c1d83","affectsGlobalScope":true},{"version":"35299ae4a62086698444a5aaee27fc7aa377c68cbb90b441c9ace246ffd05c97","affectsGlobalScope":true},{"version":"138fb588d26538783b78d1e3b2c2cc12d55840b97bf5e08bca7f7a174fbe2f17","affectsGlobalScope":true},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true},{"version":"bc47685641087c015972a3f072480889f0d6c65515f12bd85222f49a98952ed7","affectsGlobalScope":true},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true},{"version":"93495ff27b8746f55d19fcbcdbaccc99fd95f19d057aed1bd2c0cafe1335fbf0","affectsGlobalScope":true},{"version":"6fc23bb8c3965964be8c597310a2878b53a0306edb71d4b5a4dfe760186bcc01","affectsGlobalScope":true},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true},{"version":"bb42a7797d996412ecdc5b2787720de477103a0b2e53058569069a0e2bae6c7e","affectsGlobalScope":true},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true},{"version":"61c37c1de663cf4171e1192466e52c7a382afa58da01b1dc75058f032ddf0839","affectsGlobalScope":true},{"version":"b541a838a13f9234aba650a825393ffc2292dc0fc87681a5d81ef0c96d281e7a","affectsGlobalScope":true},{"version":"e0275cd0e42990dc3a16f0b7c8bca3efe87f1c8ad404f80c6db1c7c0b828c59f","affectsGlobalScope":true},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true},{"version":"49ed889be54031e1044af0ad2c603d627b8bda8b50c1a68435fe85583901d072","affectsGlobalScope":true},{"version":"e93d098658ce4f0c8a0779e6cab91d0259efb88a318137f686ad76f8410ca270","affectsGlobalScope":true},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true},{"version":"bf14a426dbbf1022d11bd08d6b8e709a2e9d246f0c6c1032f3b2edb9a902adbe","affectsGlobalScope":true},{"version":"ec0104fee478075cb5171e5f4e3f23add8e02d845ae0165bfa3f1099241fa2aa","affectsGlobalScope":true},{"version":"2b72d528b2e2fe3c57889ca7baef5e13a56c957b946906d03767c642f386bbc3","affectsGlobalScope":true},{"version":"acae90d417bee324b1372813b5a00829d31c7eb670d299cd7f8f9a648ac05688","affectsGlobalScope":true},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true},{"version":"51e547984877a62227042850456de71a5c45e7fe86b7c975c6e68896c86fa23b","affectsGlobalScope":true},{"version":"62a4966981264d1f04c44eb0f4b5bdc3d81c1a54725608861e44755aa24ad6a5","affectsGlobalScope":true},{"version":"4fa6ed14e98aa80b91f61b9805c653ee82af3502dc21c9da5268d3857772ca05","affectsGlobalScope":true},{"version":"e6633e05da3ff36e6da2ec170d0d03ccf33de50ca4dc6f5aeecb572cedd162fb","affectsGlobalScope":true},{"version":"86a34c7a13de9cabc43161348f663624b56871ed80986e41d214932ddd8d6719","affectsGlobalScope":true},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true},{"version":"caccc56c72713969e1cfe5c3d44e5bab151544d9d2b373d7dbe5a1e4166652be","affectsGlobalScope":true},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true},{"version":"50d53ccd31f6667aff66e3d62adf948879a3a16f05d89882d1188084ee415bbc","affectsGlobalScope":true},{"version":"08a58483392df5fcc1db57d782e87734f77ae9eab42516028acbfe46f29a3ef7","affectsGlobalScope":true},{"version":"436aaf437562f276ec2ddbee2f2cdedac7664c1e4c1d2c36839ddd582eeb3d0a","affectsGlobalScope":true},{"version":"13f6e6380c78e15e140243dc4be2fa546c287c6d61f4729bc2dd7cf449605471","affectsGlobalScope":true},{"version":"4350e5922fecd4bedda2964d69c213a1436349d0b8d260dd902795f5b94dc74b","affectsGlobalScope":true},{"version":"d4b1d2c51d058fc21ec2629fff7a76249dec2e36e12960ea056e3ef89174080f","affectsGlobalScope":true},{"version":"33358442698bb565130f52ba79bfd3d4d484ac85fe33f3cb1759c54d18201393","affectsGlobalScope":true},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true},{"version":"0bd5e7096c7bc02bf70b2cc017fc45ef489cb19bd2f32a71af39ff5787f1b56a","affectsGlobalScope":true},"8a8eb4ebffd85e589a1cc7c178e291626c359543403d58c9cd22b81fab5b1fb9","6a386ff939f180ae8ef064699d8b7b6e62bc2731a62d7fbf5e02589383838dea","f5a8b384f182b3851cec3596ccc96cb7464f8d3469f48c74bf2befb782a19de5",{"version":"369b91cb44fdb8a8fa15de2bd6c28a7abfe6cc16d483ea42291cc7b1efff88d4","affectsGlobalScope":true},"2879a055439b6c0c0132a1467120a0f85b56b5d735c973ad235acd958b1b5345","3ae62be455efcb1874e7fd1f30f2bb83144757d2f349ceb0c6523bb9f7f7a860","be0f711ade459d8e51739f8544a565bc7d2ea56a9dda7ef6d5edd9d864737276","b1296831e111197bd9ebd73f0d15ad0fe2e11fcc51a6302edb23ffd93794db36","5610e8177b34fa50394973f3faba06fd5268b1264a2f4f7daaa71fee1194a94d","4dc29833bfcaa8597097a99fd486d72a0de9c38bb7a6dcd1dadb70e1b9c17282","9869fe612661e4bb3a63b339b3a0d0cdbb6c9e85dd4a59209c86383179e3fbd9","f42116e2e8ad600dc90bdf8ceade9dcf593c35812d8aaba9c03a3f1dbb87330e","dff2fee737ebe5174f549c9f28e114c0cabac4b5fe4e364654465ba528979ba4","86c9954d4c0c270f2952a8695b90fbf4a58210deae10911be98b6c31b84cc8db","466df547af9cf3861658b08baf3ecbd41c0eaad2101378fadfa54ab24db103e6","66b37de2f4b108cf4467570730a30cac8aa7d9ec94a0e335825c9192c1188094",{"version":"eca5cad3e8e191ea65e1486cdfb95565082734046f86c27323498bf43079438c","signature":"f0b0d83cf814e2d1f3cbe11a382f307774f4527d4c5c97cb37a9d7d96958ac60"},"b4bd6b53c9d607ed4f59eb7d79a763046defa80788c4ad6eb673d16f2199dfcd","de78748abf34d4d974f5fc95c30941f065cd23dbf704c439cf9dfcca5b68afd4","1208b368dc1c1e92d8fcbd3eac3f37dfea25672dc37134cce620455559e4da96","fb76be343c21f4e9dc23ddbb69f7a4a81dab90e9586c303668081dd3b4e30e58","daa9330eda367a2de8034fe1c11a387f25c1fb9c7b1a694facda6114bb22fef0","6c8f26d28cdb6bd0edc2d9d5b7040654b84776e85b2fb2da9ff5d23de67ff17c","bd25f7cb1c87f89392b2e5c6ed6846c4acc016e959783f1bc2d1c529b804492c","dc0b794be4f93caea87286e4f8a1b9bb1c8f2d6b26f35a3ea9f366b0b13478b6","2fa776928692b8d0cf9363ee7fd815b1539f207c91cae851639623e923174ae7","1120c659d2214c93367b3d93336d28a3ab1a45fccecd0ba3599ea99a20295af3","3e11c76fc81fb9414c55542be7681ca763d6f37343f188beaa8ed6aadfe0151d","d0419cdfd43aa71487c9ff6359a2d14d3949148cf6cf914255f9d8259e047d65","9dfd6d6aa56e7f5ab521b038c35b8c42fbf789abe3316cd917cebc5e9117d7e0","9ac8296db617c4ae910ee4b618bb78bb130cdfca956ad8c4502e8d3283381c99","aa03a6771a194845f7d08c94a5927aaf0b67d0c0c4d9ab06167c1d36eda18f2b","2e3f3ef49948c5ddaa9bc1187af0cefb685b8cc529460264548c434de625f5bc","7777d96bf1dd9d4a21853f1db7f8ac76b362f1534a882692c9fc8f7b3850dcab","8da1c5a41069f9cbcae8690056768f4d315ee9e020d3162fd1703013cf8c0325","1c7e479e7b890df91d2d214032f2a68f4478540edc5c3d99d01089a2dd8ff64b","1ab55d65db2bc181e91481b6ce92a2285eda09ccfea566f047c055d2ff0cb03c","d5bb605f28707fe26e7c87836418abc6fba7679cf5ee99a49ecf532c93846bf9","e9124ac92fb22b3e867d40dc8d9c1d9d1502fa69b3611d05ace7258be72f9777","a29fee10a827a80f5c211a21e5513185349ba264ea8b04a382a451982e23b294","5d995618ca866cf7530564278835f281c3fa9712952da777270edf3f438d80a0","3fa52693f21eed67e1bd50be0d25c7055d326580d78ceef9cca0c287e224656e","05ebf96323766ec1a492a055ada17f8e540142335b9467e1f430023c40f4592d","8b9c51e573464bff3b83adf232405f01a87447d1266b1a1a93a02fe3b713b588","8cf3d80aa530218e59750d58f63922099c102514ff34255480cc5ba24099711d","a95c25e1f9146dd90f7cb36c7e306a25a67bdef1eaae7319a60d2f9d3ff66804","0b95dcf0d66f6827416dc96a036abfe5748d96e4f05f91a2f6ee423455a6a178","c51e163a5110087ff0e59381f117d97fd23d275a80aa9c7bb4c7a58f52a3943a","b7f4d30efff05ede0b6358ded8aedefb29802ed4cf6fbd16e3921f9cf76780ae","7e247903f0d259ce44f34601207961982a4a6ef877a8cd04356dcad4c21a7c67",{"version":"cd802f8c2a3218ebf7a068e923c3ce7c3fcfa7b0f774aa1ea2384e7badab412e","signature":"360b9a2f734bdda3c3877cd6e5dd92fae9f3e914cf2c14d935dc8c9cc29ff4ce"},"8c56ed339fb7ea09a933aae91daa038e669730da6b6d422275d0a7e5293b46a7","711255f9dda18a35389ec1e3fa8ebe6e906e67902550afad96b0ac6c5a5de327","4d023a0827a63ad5e6b498f92830d79e40e6fd487ed6b7c6fc2528eb9b3c0937","e17fbde86ef68adc663fff12c63cce11175482b3f108afd90fa3c11754afe6c6","aae8862b104ce076ea1b097bc886c37b33a338efeb9960157f4725fdb5a5862b","89cffe3ee77d68a50629ee5997ce20ec2cc2cb1991549b64aa793aa8465ad622","f289c5204b0819632486cefeec845a20a7a9c769180fb6bede63b0d7f24839d2","feaceef383869ce3addd7d620c89fa6ff1d5753f7b451cffb1e926998df2b5e4","34e5c5b2be8aa1b3f75ccd21529ae8b9163f510dbdabae4caae3fec3010cc33b","45fb3525f5c652416e54f91bd8378464d41e22b0ccc108de7db918cf8e92ffd3","e2402a646d4471b0985495b6bfca6c9c731d335195bf206e8c982d8ca362692f","08d34fcbf615950f6d3dd6858437159f0c0af08d5af645ec415ebfeaeacf3bd0","13ce162c8088b92a985e41a2ddf61cbb191101c280214a74dd9e8d2fd3c9c905","d2689735d2498972d6f02fbaff989b1fa500b5a140af7e7c08a15fbc36c1d3d3","4b47e095287cc1351b5fa9c5112d1d2d255bd8916ce76347225837b244e97ed5","f104ff2c22b3c0919c63450b8b77fa227d183a47eed6ef54203ec40678674cb5","06c1e22ce1921cfd383c800f9e191972c5dfaca8996cca54d85c4b4cb41db49d","1a80b95a8d69b24fa553fd598aeeffbdeebd8d87b70df2ce757d8240cb36fa99","6c7327831239ec38e57c18eb15c5b191aa258ada0528de8dc93092efcba20896","3c4de8d194c64b484827151ff14582884166268c345cbb13f9c19e4be3912f54","ea924fbabda99a62bb4cde7f6a01048597027815366db11bff03c08ed576fed8","5e8c7ad4619cc15007aa5bc3f4e1a30cb01540c14beaa609fb8d17d21acaceba","f202558a35a4093e2eb6a5a2aa9f517f883dc3b949a350c9b36906f8c1a3e20a",{"version":"3ba31b0ae95aeb5491f764222294fe55d7599567c149854dbf999db97b5bb7af","signature":"d5efb5060898d1f076715772c3480d4ce727be55e2167fb299bd6556ae70eeae"},{"version":"6eea1cd7302667f74cf05794d56316644f2a94156c43f39ab56940c2ed9ac50c","signature":"64fc8e10187e3facc023e41fafcd45a40b767a607e41270184e0585efe894d81"},{"version":"64e1f5a6a5cfade16c82633c77b44d9598e756132ed72ce104245d69bae178e4","signature":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881"},{"version":"675668049a0b4175aa1ad4fd80c751267db0053152755a7fac646eef592c3882","signature":"5cb53013b1adc504c16bed8523675d1efdeab8e7b22cd9a880d1d074cd5357e4"},"efc7d584a33fe3422847783d228f315c4cd1afe74bd7cf8e3f0e4c1125129fef","7394959e5a741b185456e1ef5d64599c36c60a323207450991e7a42e08911419","4967529644e391115ca5592184d4b63980569adf60ee685f968fd59ab1557188","5929864ce17fba74232584d90cb721a89b7ad277220627cc97054ba15a98ea8f","7180c03fd3cb6e22f911ce9ba0f8a7008b1a6ddbe88ccf16a9c8140ef9ac1686","25c8056edf4314820382a5fdb4bb7816999acdcb929c8f75e3f39473b87e85bc","54cb85a47d760da1c13c00add10d26b5118280d44d58e6908d8e89abbd9d7725","3e4825171442666d31c845aeb47fcd34b62e14041bb353ae2b874285d78482aa","c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","a967bfe3ad4e62243eb604bf956101e4c740f5921277c60debaf325c1320bf88","e9775e97ac4877aebf963a0289c81abe76d1ec9a2a7778dbe637e5151f25c5f3","471e1da5a78350bc55ef8cef24eb3aca6174143c281b8b214ca2beda51f5e04a","cadc8aced301244057c4e7e73fbcae534b0f5b12a37b150d80e5a45aa4bebcbd","385aab901643aa54e1c36f5ef3107913b10d1b5bb8cbcd933d4263b80a0d7f20","9670d44354bab9d9982eca21945686b5c24a3f893db73c0dae0fd74217a4c219","db3435f3525cd785bf21ec6769bf8da7e8a776be1a99e2e7efb5f244a2ef5fee","c3b170c45fc031db31f782e612adf7314b167e60439d304b49e704010e7bafe5","40383ebef22b943d503c6ce2cb2e060282936b952a01bea5f9f493d5fb487cc7","4893a895ea92c85345017a04ed427cbd6a1710453338df26881a6019432febdd","3a84b7cb891141824bd00ef8a50b6a44596aded4075da937f180c90e362fe5f6","13f6f39e12b1518c6650bbb220c8985999020fe0f21d818e28f512b7771d00f9","9b5369969f6e7175740bf51223112ff209f94ba43ecd3bb09eefff9fd675624a","4fe9e626e7164748e8769bbf74b538e09607f07ed17c2f20af8d680ee49fc1da","24515859bc0b836719105bb6cc3d68255042a9f02a6022b3187948b204946bd2","33203609eba548914dc83ddf6cadbc0bcb6e8ef89f6d648ca0908ae887f9fcc5","0db18c6e78ea846316c012478888f33c11ffadab9efd1cc8bcc12daded7a60b6","89167d696a849fce5ca508032aabfe901c0868f833a8625d5a9c6e861ef935d2","e53a3c2a9f624d90f24bf4588aacd223e7bec1b9d0d479b68d2f4a9e6011147f","339dc5265ee5ed92e536a93a04c4ebbc2128f45eeec6ed29f379e0085283542c","9f0a92164925aa37d4a5d9dd3e0134cff8177208dba55fd2310cd74beea40ee2","8bfdb79bf1a9d435ec48d9372dc93291161f152c0865b81fc0b2694aedb4578d","2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","d32275be3546f252e3ad33976caf8c5e842c09cb87d468cb40d5f4cf092d1acc","4a0c3504813a3289f7fb1115db13967c8e004aa8e4f8a9021b95285502221bd1",{"version":"a14ed46fa3f5ffc7a8336b497cd07b45c2084213aaca933a22443fcb2eef0d07","affectsGlobalScope":true},"cce1f5f86974c1e916ec4a8cab6eec9aa8e31e8148845bf07fbaa8e1d97b1a2c",{"version":"185282b122cbca820c297a02a57b89cf5967ab43e220e3e174d872d3f9a94d2c","affectsGlobalScope":true},"16d74fe4d8e183344d3beb15d48b123c5980ff32ff0cc8c3b96614ddcdf9b239","7b43160a49cf2c6082da0465876c4a0b164e160b81187caeb0a6ca7a281e85ba",{"version":"41fb2a1c108fbf46609ce5a451b7ec78eb9b5ada95fd5b94643e4b26397de0b3","affectsGlobalScope":true},"a40826e8476694e90da94aa008283a7de50d1dafd37beada623863f1901cb7fb","e8968b394e4365588f8f89cfff86435258cf10062585c1d2224627ab92acda22","285e512c7a0db217a0599e18c462d565fa35be4a5153dd7b80bee88c83e83ddf","b5b719a47968cd61a6f83f437236bb6fe22a39223b6620da81ef89f5d7a78fb7","8806ae97308ef26363bd7ec8071bca4d07fb575f905ee3d8a91aff226df6d618","af5bf1db6f1804fb0069039ae77a05d60133c77a2158d9635ea27b6bb2828a8f","b7fe70be794e13d1b7940e318b8770cd1fb3eced7707805318a2e3aaac2c3e9e",{"version":"2c71199d1fc83bf17636ad5bf63a945633406b7b94887612bba4ef027c662b3e","affectsGlobalScope":true},{"version":"7ae9dc7dbb58cd843065639707815df85c044babaa0947116f97bdb824d07204","affectsGlobalScope":true},"7aae1df2053572c2cfc2089a77847aadbb38eedbaa837a846c6a49fb37c6e5bd","313a0b063f5188037db113509de1b934a0e286f14e9479af24fada241435e707","1f758340b027b18ae8773ac3d33a60648a2af49eaae9e4fde18d0a0dd608642c","87ef1a23caa071b07157c72077fa42b86d30568f9dc9e31eed24d5d14fc30ba8","396a8939b5e177542bdf9b5262b4eee85d29851b2d57681fa9d7eae30e225830","21773f5ac69ddf5a05636ba1f50b5239f4f2d27e4420db147fc2f76a5ae598ac",{"version":"dea4c00820d4fac5e530d4842aed2fb20d6744d75a674b95502cbd433f88bcb0","affectsGlobalScope":true},"a5fe4cc622c3bf8e09ababde5f4096ceac53163eefcd95e9cd53f062ff9bb67a","45b1053e691c5af9bfe85060a3e1542835f8d84a7e6e2e77ca305251eda0cb3c","0f05c06ff6196958d76b865ae17245b52d8fe01773626ac3c43214a2458ea7b7",{"version":"0d832a0650a74aafc276cb3f7bb26bde2e2270a6f87e6c871a64122e9203079b","affectsGlobalScope":true},{"version":"c6f3869f12bb5c3bb8ecd0b050ea20342b89b944eae18d313cde6b0ccc0925d7","affectsGlobalScope":true},"8abd0566d2854c4bd1c5e48e05df5c74927187f1541e6770001d9637ac41542e","d742ed2db6d5425b3b6ac5fb1f2e4b1ed2ae74fbeee8d0030d852121a4b05d2f","d8dba11dc34d50cb4202de5effa9a1b296d7a2f4a029eec871f894bddfb6430d","8b71dd18e7e63b6f991b511a201fad7c3bf8d1e0dd98acb5e3d844f335a73634","01d8e1419c84affad359cc240b2b551fb9812b450b4d3d456b64cda8102d4f60","8221b00f271cf7f535a8eeec03b0f80f0929c7a16116e2d2df089b41066de69b","269929a24b2816343a178008ac9ae9248304d92a8ba8e233055e0ed6dbe6ef71","93452d394fdd1dc551ec62f5042366f011a00d342d36d50793b3529bfc9bd633","f8c87b19eae111f8720b0345ab301af8d81add39621b63614dfc2d15fd6f140a","831c22d257717bf2cbb03afe9c4bcffc5ccb8a2074344d4238bf16d3a857bb12",{"version":"2225100373ca3d63bcc7f206e1177152d2e2161285a0bd83c8374db1503a0d1f","affectsGlobalScope":true},{"version":"7052b7b0c3829df3b4985bab2fd74531074b4835d5a7b263b75c82f0916ad62f","affectsGlobalScope":true},"aa34c3aa493d1c699601027c441b9664547c3024f9dbab1639df7701d63d18fa","eefcdf86cefff36e5d87de36a3638ab5f7d16c2b68932be4a72c14bb924e43c1","7c651f8dce91a927ab62925e73f190763574c46098f2b11fb8ddc1b147a6709a","7440ab60f4cb031812940cc38166b8bb6fbf2540cfe599f87c41c08011f0c1df",{"version":"4d0405568cf6e0ff36a4861c4a77e641366feaefa751600b0a4d12a5e8f730a8","affectsGlobalScope":true},{"version":"f5b5dc128973498b75f52b1b8c2d5f8629869104899733ae485100c2309b4c12","affectsGlobalScope":true},"e393915d3dc385e69c0e2390739c87b2d296a610662eb0b1cb85224e55992250","79bad8541d5779c85e82a9fb119c1fe06af77a71cc40f869d62ad379473d4b75","4a34b074b11c3597fb2ff890bc8f1484375b3b80793ab01f974534808d5777c7",{"version":"629d20681ca284d9e38c0a019f647108f5fe02f9c59ac164d56f5694fc3faf4d","affectsGlobalScope":true},"e7dbf5716d76846c7522e910896c5747b6df1abd538fee8f5291bdc843461795",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"b510d0a18e3db42ac9765d26711083ec1e8b4e21caaca6dc4d25ae6e8623f447"],"root":[83,117,[141,144]],"options":{"allowSyntheticDefaultImports":true,"composite":true,"declaration":true,"declarationMap":true,"emitDeclarationOnly":true,"esModuleInterop":true,"experimentalDecorators":true,"jsx":4,"module":99,"noEmitOnError":true,"noImplicitOverride":true,"outDir":"./","skipLibCheck":true,"sourceMap":true,"strict":true,"target":7,"useDefineForClassFields":true},"fileIdsList":[[82],[98,99,100],[82,90],[82,88,90,91],[82,88],[89,90,91,92],[82,84,88,93,94,97,101,102,109,110,111,115],[82,88,95],[95,96],[84],[85,86,87],[112,113,114],[82,103],[103,104,105,106,107,108],[72,73,74,75,76,77,78,79,80,81],[73,74],[74],[72],[73],[145],[181],[182,187,215],[183,194,195,202,212,223],[183,184,194,202],[185,224],[186,187,195,203],[187,212,220],[188,190,194,202],[189],[190,191],[194],[192,194],[181,194],[194,195,196,212,223],[194,195,196,209,212,215],[179,182,228],[190,194,197,202,212,223],[194,195,197,198,202,212,220,223],[197,199,212,220,223],[145,146,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230],[194,200],[201,223,228],[190,194,202,212],[203],[204],[181,205],[206,222,228],[207],[208],[194,209,210],[209,211,224,226],[182,194,212,213,214,215],[182,212,214],[212,213],[215],[216],[181,212],[194,218,219],[218,219],[187,202,212,220],[221],[202,222],[182,197,208,223],[187,224],[212,225],[201,226],[227],[182,187,194,196,205,212,223,226,228],[212,229],[66,67,68,69],[70],[156,160,223],[156,212,223],[151],[153,156,220,223],[202,220],[231],[151,231],[153,156,202,223],[148,149,152,155,182,194,212,223],[148,154],[152,156,182,215,223,231],[182,231],[172,182,231],[150,151,231],[156],[150,151,152,153,154,155,156,157,158,160,161,162,163,164,165,166,167,168,169,170,171,173,174,175,176,177,178],[156,163,164],[154,156,164,165],[155],[148,151,156],[156,160,164,165],[160],[154,156,159,223],[148,153,154,156,160,163],[182,212],[151,156,172,182,228,231],[71,82,83,117,141],[71,82,116],[71,82],[71,82,116,140],[71,142,196,204],[71,83,117,141,142],[121,136],[82,125,136],[125,136,138],[125,136,137,138,139],[82,125,132],[132],[122,125,133],[133,134,135],[82,122],[122,123,124],[82,130],[130,131],[82,126,127],[128],[126,127,128,129],[118],[118,119,120],[82,83,117,141],[82,140],[83,117,141,142]],"referencedMap":[[98,1],[99,1],[101,2],[100,1],[102,1],[91,3],[92,4],[89,5],[93,6],[116,7],[96,8],[97,9],[95,10],[88,11],[85,1],[86,1],[111,1],[110,1],[115,12],[104,13],[108,1],[105,13],[107,13],[106,13],[109,14],[82,15],[75,16],[76,17],[73,18],[77,19],[78,18],[79,17],[145,20],[146,20],[181,21],[182,22],[183,23],[184,24],[185,25],[186,26],[187,27],[188,28],[189,29],[190,30],[191,30],[193,31],[192,32],[194,33],[195,34],[196,35],[180,36],[197,37],[198,38],[199,39],[231,40],[200,41],[201,42],[202,43],[203,44],[204,45],[205,46],[206,47],[207,48],[208,49],[209,50],[210,50],[211,51],[212,52],[214,53],[213,54],[215,55],[216,56],[217,57],[218,58],[219,59],[220,60],[221,61],[222,62],[223,63],[224,64],[225,65],[226,66],[227,67],[228,68],[229,69],[70,70],[71,71],[163,72],[170,73],[162,72],[177,74],[154,75],[153,76],[176,77],[171,78],[174,79],[156,80],[155,81],[151,82],[150,83],[173,84],[152,85],[157,86],[161,86],[179,87],[178,86],[165,88],[166,89],[168,90],[164,91],[167,92],[172,77],[159,93],[160,94],[169,95],[149,96],[175,97],[142,98],[117,99],[83,100],[141,101],[143,102],[144,103],[137,104],[138,105],[139,106],[140,107],[133,108],[134,109],[135,110],[136,111],[123,112],[124,1],[122,1],[125,113],[131,114],[132,115],[128,116],[129,117],[127,117],[130,118],[119,119],[121,120]],"exportedModulesMap":[[98,1],[99,1],[101,2],[100,1],[102,1],[91,3],[92,4],[89,5],[93,6],[116,7],[96,8],[97,9],[95,10],[88,11],[85,1],[86,1],[111,1],[110,1],[115,12],[104,13],[108,1],[105,13],[107,13],[106,13],[109,14],[82,15],[75,16],[76,17],[73,18],[77,19],[78,18],[79,17],[145,20],[146,20],[181,21],[182,22],[183,23],[184,24],[185,25],[186,26],[187,27],[188,28],[189,29],[190,30],[191,30],[193,31],[192,32],[194,33],[195,34],[196,35],[180,36],[197,37],[198,38],[199,39],[231,40],[200,41],[201,42],[202,43],[203,44],[204,45],[205,46],[206,47],[207,48],[208,49],[209,50],[210,50],[211,51],[212,52],[214,53],[213,54],[215,55],[216,56],[217,57],[218,58],[219,59],[220,60],[221,61],[222,62],[223,63],[224,64],[225,65],[226,66],[227,67],[228,68],[229,69],[70,70],[71,71],[163,72],[170,73],[162,72],[177,74],[154,75],[153,76],[176,77],[171,78],[174,79],[156,80],[155,81],[151,82],[150,83],[173,84],[152,85],[157,86],[161,86],[179,87],[178,86],[165,88],[166,89],[168,90],[164,91],[167,92],[172,77],[159,93],[160,94],[169,95],[149,96],[175,97],[142,121],[117,1],[83,1],[141,122],[144,123],[137,104],[138,105],[139,106],[140,107],[133,108],[134,109],[135,110],[136,111],[123,112],[124,1],[122,1],[125,113],[131,114],[132,115],[128,116],[129,117],[127,117],[130,118],[119,119],[121,120]],"semanticDiagnosticsPerFile":[94,98,99,101,100,102,91,92,90,89,93,116,96,97,95,87,88,85,86,111,110,112,114,115,113,104,108,105,107,106,103,109,81,82,75,76,73,74,77,78,80,79,72,84,145,146,181,182,183,184,185,186,187,188,189,190,191,193,192,194,195,196,180,230,197,198,199,231,200,201,202,203,204,205,206,207,208,209,210,211,212,214,213,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,68,66,70,71,69,147,67,64,65,12,13,15,14,2,16,17,18,19,20,21,22,23,3,4,24,28,25,26,27,29,30,31,5,32,33,34,35,6,39,36,37,38,40,7,41,46,47,42,43,44,45,8,51,48,49,50,52,9,53,54,55,58,56,57,59,60,10,1,11,63,62,61,163,170,162,177,154,153,176,171,174,156,155,151,150,173,152,157,158,161,148,179,178,165,166,168,164,167,172,159,160,169,149,175,142,117,83,141,143,144,137,138,139,140,133,134,135,136,123,124,122,125,131,132,128,129,126,127,130,119,120,118,121],"latestChangedDtsFile":"./index.d.ts"},"version":"5.3.3"}
|
package/package.json
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@contember/client-content-generator",
|
|
3
|
+
"license": "Apache-2.0",
|
|
4
|
+
"version": "1.3.0-alpha.10",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"sideEffects": false,
|
|
7
|
+
"main": "./dist/production/index.js",
|
|
8
|
+
"bin": {
|
|
9
|
+
"contember-client-generator": "./dist/production/generate.cjs"
|
|
10
|
+
},
|
|
11
|
+
"exports": {
|
|
12
|
+
".": {
|
|
13
|
+
"import": {
|
|
14
|
+
"types": "./dist/types/index.d.ts",
|
|
15
|
+
"development": "./dist/development/index.js",
|
|
16
|
+
"production": "./dist/production/index.js",
|
|
17
|
+
"default": "./dist/production/index.js"
|
|
18
|
+
},
|
|
19
|
+
"require": {
|
|
20
|
+
"types": "./dist/types/index.d.ts",
|
|
21
|
+
"development": "./dist/development/index.cjs",
|
|
22
|
+
"production": "./dist/production/index.cjs",
|
|
23
|
+
"default": "./dist/production/index.cjs"
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"files": [
|
|
28
|
+
"dist/",
|
|
29
|
+
"src/"
|
|
30
|
+
],
|
|
31
|
+
"typings": "./dist/types/index.d.ts",
|
|
32
|
+
"scripts": {
|
|
33
|
+
"build": "yarn build:js:dev && yarn build:js:prod && chmod +x ./dist/production/generate.cjs",
|
|
34
|
+
"build:js:dev": "vite build --mode development",
|
|
35
|
+
"build:js:prod": "vite build --mode production",
|
|
36
|
+
"ae:build": "api-extractor run --local",
|
|
37
|
+
"ae:test": "api-extractor run",
|
|
38
|
+
"test": "vitest"
|
|
39
|
+
},
|
|
40
|
+
"dependencies": {
|
|
41
|
+
"@contember/client-content": "1.3.0-alpha.10",
|
|
42
|
+
"@contember/schema": "^1.3.6",
|
|
43
|
+
"@contember/schema-utils": "^1.3.6"
|
|
44
|
+
},
|
|
45
|
+
"devDependencies": {
|
|
46
|
+
"@contember/schema-definition": "^1.3.6",
|
|
47
|
+
"@types/node": "^20.10.5"
|
|
48
|
+
},
|
|
49
|
+
"repository": {
|
|
50
|
+
"type": "git",
|
|
51
|
+
"url": "https://github.com/contember/interface.git",
|
|
52
|
+
"directory": "packages/client-content-generator"
|
|
53
|
+
},
|
|
54
|
+
"stableVersion": "0.0.0"
|
|
55
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { Model } from '@contember/schema'
|
|
2
|
+
import { EnumTypeSchemaGenerator } from './EnumTypeSchemaGenerator'
|
|
3
|
+
import { EntityTypeSchemaGenerator } from './EntityTypeSchemaGenerator'
|
|
4
|
+
import { NameSchemaGenerator } from './NameSchemaGenerator'
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
export class ContemberClientGenerator {
|
|
8
|
+
constructor(
|
|
9
|
+
private readonly nameSchemaGenerator: NameSchemaGenerator = new NameSchemaGenerator(),
|
|
10
|
+
private readonly enumTypeSchemaGenerator: EnumTypeSchemaGenerator = new EnumTypeSchemaGenerator(),
|
|
11
|
+
private readonly entityTypeSchemaGenerator: EntityTypeSchemaGenerator = new EntityTypeSchemaGenerator(),
|
|
12
|
+
) {
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
generate(model: Model.Schema): Record<string, string> {
|
|
16
|
+
const nameSchema = this.nameSchemaGenerator.generate(model)
|
|
17
|
+
const enumTypeSchema = this.enumTypeSchemaGenerator.generate(model)
|
|
18
|
+
const entityTypeSchema = this.entityTypeSchemaGenerator.generate(model)
|
|
19
|
+
|
|
20
|
+
const namesCode = `import { SchemaNames } from '@contember/client-content'
|
|
21
|
+
export const ContemberClientNames: SchemaNames = ` + JSON.stringify(nameSchema, null, 2)
|
|
22
|
+
|
|
23
|
+
const indexCode = `
|
|
24
|
+
import { ContemberClientNames } from './names'
|
|
25
|
+
import type { ContemberClientSchema } from './entities'
|
|
26
|
+
import { ContentQueryBuilder, TypedContentQueryBuilder, TypedEntitySelection } from '@contember/client-content'
|
|
27
|
+
export * from './names'
|
|
28
|
+
export * from './enums'
|
|
29
|
+
export * from './entities'
|
|
30
|
+
|
|
31
|
+
export const queryBuilder = new ContentQueryBuilder(ContemberClientNames) as unknown as TypedContentQueryBuilder<ContemberClientSchema>
|
|
32
|
+
|
|
33
|
+
export type FragmentOf<EntityName extends keyof ContemberClientSchema['entities'] & string, Data = unknown> =
|
|
34
|
+
TypedEntitySelection<ContemberClientSchema, EntityName, ContemberClientSchema['entities'][EntityName], Data>
|
|
35
|
+
|
|
36
|
+
export type FragmentType<T extends TypedEntitySelection<any, any, any, any> = any> =
|
|
37
|
+
T extends TypedEntitySelection<any, any, any, infer TFields>
|
|
38
|
+
? TFields
|
|
39
|
+
: never
|
|
40
|
+
`
|
|
41
|
+
return {
|
|
42
|
+
'names.ts': namesCode,
|
|
43
|
+
'enums.ts': enumTypeSchema,
|
|
44
|
+
'entities.ts': entityTypeSchema,
|
|
45
|
+
'index.ts': indexCode,
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|